Изменились названия полей базы
This commit is contained in:
parent
5d28be5f4f
commit
19b7f2e489
@ -39,7 +39,7 @@ if ($username && $password) {
|
||||
db::c()->query('INSERT INTO `online` (`id`, `date`, `room`) VALUES (?i, ?i, ?i)', $data['id'], time(), $data['room']);
|
||||
}
|
||||
|
||||
db::c()->query('UPDATE `users` SET `sid` = "?s", `enter_game` = ?i WHERE `id` = ?i LIMIT 1', session_id(), 1, $data['id']);
|
||||
db::c()->query('UPDATE `users` SET `sid` = "?s", `enter_game` = ?i WHERE `id` = ?i', session_id(), 1, $data['id']);
|
||||
$_SESSION['sid'] = session_id();
|
||||
|
||||
$sms = db::c()->query('SELECT * FROM `telegraph` WHERE `receiver` = ?i', $data['id']);
|
||||
|
18
register.php
18
register.php
@ -22,9 +22,8 @@ if ($hreject) {
|
||||
db::c()->query('INSERT INTO `users` (`login`,`pass`,`email`,`borndate`,`ip`,`sid`)
|
||||
VALUES ("?s", "?s", "?s", "?s", "?s", "?s")', $login, $password, $email, $birthday, $ip, session_id());
|
||||
$nid = db::c()->getLastInsertId();
|
||||
db::c()->query('INSERT INTO `online` (`id`, `date`, `room`) VALUES (?i, ?i, ?i)', $nid, time(), 1);
|
||||
db::c()->query('INSERT INTO `bank` (`id`) VALUES (?i)', $nid, 5);
|
||||
//db::c()->query('UPDATE `users` SET `sid` = "?s" WHERE `id` = ?i', session_id(), $nid);
|
||||
db::c()->query('INSERT INTO `online` (`user_id`, `date`, `room`) VALUES (?i, ?i, ?i)', $nid, time(), 1);
|
||||
db::c()->query('INSERT INTO `bank` (`user_id`) VALUES (?i)', $nid, 5);
|
||||
setcookie(GAMEDOMAIN, $nid, time() + 3600);
|
||||
setcookie("battle", time());
|
||||
$_SESSION['uid'] = $nid;
|
||||
@ -34,20 +33,9 @@ if ($hreject) {
|
||||
}
|
||||
}
|
||||
}
|
||||
//********************************************************************************************
|
||||
// Вот этого куска я не понял. Если что-то пойдёт не так, я буду отталкиваться от него.
|
||||
//session_start();
|
||||
//setcookie("battle", time());
|
||||
//$_SESSION['uid'] = $i;
|
||||
//mysql_query("UPDATE `users` SET `sid` = '" . session_id() . "' WHERE `id` = {$i} LIMIT 1");
|
||||
//
|
||||
//$_SESSION['sid'] = session_id();
|
||||
//header("Location: fight.php");
|
||||
//die();
|
||||
//***********************************************************************************************
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link href="css/main.css" rel="stylesheet"/>
|
||||
|
Loading…
Reference in New Issue
Block a user