кавычка не там
This commit is contained in:
parent
a370ebf16f
commit
bc4b59764d
@ -45,7 +45,7 @@ function createbot($bot, $login = "")
|
|||||||
|
|
||||||
function getuserdata($id = 0)
|
function getuserdata($id = 0)
|
||||||
{
|
{
|
||||||
if (!$id) $id = {isset($_SESSION['uid']) ? $_SESSION['uid'] : null;} // Хорошее решение проверок, кстати.
|
if (!$id) {$id = isset($_SESSION['uid']) ? $_SESSION['uid'] : null;} // Хорошее решение проверок, кстати.
|
||||||
if (!$id) {return [];}
|
if (!$id) {return [];}
|
||||||
$rec = db::c()->query('SELECT `hp`, `maxhp`, `fullhptime`, `battle` FROM `users` WHERE `id` = "?s"', $id)->fetch_assoc();
|
$rec = db::c()->query('SELECT `hp`, `maxhp`, `fullhptime`, `battle` FROM `users` WHERE `id` = "?s"', $id)->fetch_assoc();
|
||||||
if ($rec['hp'] < $rec['maxhp'] && time() > $rec['fullhptime'] && !$rec['battle'] && ($rec['hp'] > 0)) {
|
if ($rec['hp'] < $rec['maxhp'] && time() > $rec['fullhptime'] && !$rec['battle'] && ($rec['hp'] > 0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user