Файл: bdls.ru/start.php
Строк: 13
<?php
include './system/common.php';
include './system/functions.php';
include './system/user.php';
if($user) {
header('location: /game.php');
exit;
}
$password = rand(1,999999);
if(mysql_query('INSERT INTO `users` (`login`,
`password`, `reg_time`, `exp`, `coin`) VALUEs ("Инкогнито",
"'.$password.'", "'.time().'", "0", "100")')) {
$id = mysql_insert_id();
$user = mysql_query('SELECT * FROM `users` WHERE `id` = "'.$id.'"');
$user = mysql_fetch_array($user);
setCookie('id', $user['id'], time() + 86400 * 365);
setCookie('password', $password, time() + 86400 * 365);
header('location: /game.php');
}
?>