| 1 |
<?php |
| 2 |
/** |
| 3 |
* File functions: |
| 4 |
* Activation account |
| 5 |
* |
| 6 |
* @name : aktywacja.php |
| 7 |
* @copyright : (C) 2004,2005,2006 Vallheru Team based on Gamers-Fusion ver 2.5 |
| 8 |
* @author : thindil <thindil@users.sourceforge.net> |
| 9 |
* @author : eyescream <tduda@users.sourceforge.net> |
| 10 |
* @version : 1.4 |
| 11 |
* @since : 24.08.2007 |
| 12 |
* |
| 13 |
*/ |
| 14 |
|
| 15 |
// Published under GNU GPL 2 or later. See /install/README file for details. |
| 16 |
// $Id$ |
| 17 |
|
| 18 |
require_once ('includes/main/base.php'); |
| 19 |
require_once ('includes/getlang.php'); |
| 20 |
GetLang(); |
| 21 |
GetLoc('mainpage'); |
| 22 |
GetLoc ('aktywacja'); |
| 23 |
|
| 24 |
require_once ('includes/main/counter.php'); |
| 25 |
require_once ('includes/main/record.php'); |
| 26 |
require_once ('includes/main/usersever.php'); |
| 27 |
require_once ('includes/right.php'); |
| 28 |
require_once ('includes/security.php'); |
| 29 |
|
| 30 |
|
| 31 |
if (isset($_GET['kod']) && strictInt($_GET['kod'])) |
| 32 |
{ |
| 33 |
$arrAct = $db -> GetRow('SELECT * FROM `aktywacja` WHERE `aktyw`='.$_GET['kod']); |
| 34 |
if (!isset($arrAct['lang'])) |
| 35 |
GetLoc('aktywacja'); |
| 36 |
else |
| 37 |
GetLoc('aktywacja', $arrAct['lang']); |
| 38 |
|
| 39 |
if (!empty($arrAct)) |
| 40 |
{ |
| 41 |
$db -> Execute('INSERT INTO `players` (`user`, `email`, `pass`, `lang`, `ip`, `profile`) VALUES(\''.$arrAct['user'].'\',\''.$arrAct['email'].'\',\''.$arrAct['pass'].'\',\''.$arrAct['lang'].'\', \''.$arrAct['ip'].'\', \'\')'); |
| 42 |
$arrID = $db -> GetRow('SELECT `id` FROM `players` WHERE `user`=\''.$arrAct['user'].'\''); |
| 43 |
$db -> Execute('INSERT INTO `minerals` (`owner`, `pine`) VALUES ('.$arrID['id'].', 50)'); |
| 44 |
$db -> Execute('DELETE FROM `aktywacja` WHERE `aktyw`='.$_GET['kod']); |
| 45 |
require_once ('includes/main/online.php'); |
| 46 |
$smarty -> display ('activ.tpl'); |
| 47 |
} |
| 48 |
} |
| 49 |
else |
| 50 |
{ |
| 51 |
$smarty -> assign ('Error', ERROR); |
| 52 |
$smarty -> display ('error.tpl'); |
| 53 |
exit; |
| 54 |
} |
| 55 |
|
| 56 |
$db -> Close(); |
| 57 |
?> |