Фикс входа в игру

This commit is contained in:
lopar 2018-02-13 23:13:56 +02:00
parent 672769cbaf
commit 814b7b301c

View File

@ -24,10 +24,9 @@ include("config.php");
</script>
<?php
$my_us = mysql_fetch_assoc(mysql_query("SELECT `enter_game`, `id` FROM `users` WHERE `id` = '" . $_SESSION['uid'] . "' LIMIT 1"));
$my_us = db::c()->query('SELECT `enter_game`, `id` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
if ($my_us['enter_game'] == 1) {
$my_us['enter_game'] = 0;
mysql_query("UPDATE `users` SET `enter_game` = '" . $my_us['enter_game'] . "' WHERE `id` = '" . $my_us['id'] . "' LIMIT 1");
db::c()->query('UPDATE `users` SET `enter_game` = 0 WHERE `id` = ?i', $my_us['id']);
?>
<script>clearc();</script>
<? } ?>
@ -107,17 +106,6 @@ include("config.php");
top.frames['refreshed'].location = 'ch.php?show=' + Math.random() + s;
}
var OnlineDelay = 12;
var OnlineTimerOn = -1;
var OnlineStop = true;
function rld(now) {
if (OnlineTimerOn < 0 || now) {
var tm = now ? 2000 : OnlineDelay * 1000;
OnlineTimerOn = setTimeout('onlineReload(' + now + ')', tm);
}
}
var changeroom = 1;
var localroom = 1;