game/active.php
2022-12-19 20:26:14 +02:00

44 lines
1.5 KiB
PHP

<?php
/*
Îáíîâëåíèå äàííûõ î êóðñå âíóòðåíåé âàëþòû
ûûûû
*/
die();
define('GAME',true);
setlocale(LC_CTYPE ,"ru_RU.CP1251");
require_once('_incl_data/__config.php');
require_once('_incl_data/class/__db_connect.php');
function error($e)
{
global $c;
die('');
}
$u = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login`="'.mysql_real_escape_string($_COOKIE['login']).'" AND `pass`="'.mysql_real_escape_string($_COOKIE['pass']).'"'));
if(isset($u['id'])) {
if($u['send'] == '0') {
error('Íåîáõîäèìî ââåñòè <b>e-mail</b> äëÿ àêòèâàöèè ïåðñîíàæà.<br>Îòêðîéòå ýòó ññûëêó â áðàóçåðå, â êîòîðîì Âû àâòîðèçèðîâàííû ñî ñâîåãî ïåðñîíàæà.');
}elseif($u['activ'] == 0) {
error('Ïåðñîíàæ &quot;'.$u['login'].'&quot; áûë àêòèâèðîâàí ðàíåå.');
}else{
if($_GET['code'] == md5($u['login'].'&[new-combats.com]') || $_GET['code'] == 'ILIKECOMBATS') {
mysql_query('UPDATE `users` SET `activ` = "0" WHERE `id` = "'.$u['id'].'" LIMIT 1');
error('Âû óñïåøíî àêòèâèðîâàëè ïåðñîíàæà, óñïåõîâ â íàøåì ìèðå!');
}else{
error('Íå âåðíûé êîä àêòèâàöèè.');
}
}
}else{
error('<form method="post" action="enter.php">'.
'Ââåäèòå ëîãèí è ïàðîëü îò ïåðñîíàæà:<br>'.
'Ëîãèí: &nbsp;<input name="login" type="text" style="width:200px;"><br />'.
'Ïàðîëü: <input name="pass" type="password" style="width:200px;">'.
'<input name="active_code_key" type="hidden" value="'.htmlspecialchars($_GET['code'],NULL,'cp1251').'" /><br />'.
'<input value="Àêòèâèðîâàòü ïåðñîíàæà" type="submit" />'.
'</form>');
}
?>