Файл: test.zfarm.mobi/mystylereg/mystyleend.php
Строк: 23
<?php
if(isset($_GET['mystylere']) && num($_GET['mystylere'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `mystyle_registration` WHERE `id` = '".num($_GET['mystylere'])."' LIMIT 1"),0)!=0){
$posts = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_registration` WHERE `id` = '".num($_GET['mystylere'])."'"));
//unset($_COOKIE['datereg']);
if(isset($_COOKIE['datereg'])){
header("Location: ./?NoReg");
exit;
}else{
setcookie('datereg',1,time()+3600);
mysql_query("INSERT INTO `mystyle_user` SET `guest` = '1', `date` = '".$time."'");
$post=mysql_insert_id();
$nick = 'Зомби '.$post.'';
$pass1 = rand(123456,999999);
$reg = encrypt($pass1);
$images = $posts['img'].'.png';
$online_time = $time+600;
mysql_query("UPDATE `mystyle_user` SET `avatar` = '".$images."', `machete` = '50', `pol` = '".num($posts['type'])."', `int_zadaniya` = '1', `level` = '1', `money` = '1000', `ruby` = '103', `nick` = '".$nick."', `pass` = '".$reg."', `pass1` = '".$pass1."' WHERE `id` = '".$post."'");
setcookie('id', $post, time() + 60 * 60 * 24 * 365);
setcookie('pass', $reg, time() + 60 * 60 * 24 * 365);
header("Location: ./");
exit;
}
}else{
header("Location: ./");
exit;
}
?>