From b2e77826f55ba6a84eb2caddd05a0588775b7241 Mon Sep 17 00:00:00 2001 From: lopar Date: Fri, 16 Feb 2018 01:43:18 +0200 Subject: [PATCH] =?UTF-8?q?=D0=81=D0=B1=D0=B0=D0=BD=D0=BD=D1=8B=D0=B9=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=87=D0=BD=D1=8B=D0=B9=20=D1=86=D0=B8=D0=BA=D0=BB?= =?UTF-8?q?!!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- enter.php | 6 +++--- inf.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/enter.php b/enter.php index 66c294c..87289a8 100644 --- a/enter.php +++ b/enter.php @@ -44,9 +44,9 @@ if (!$error) { $ip = $_SERVER['REMOTE_ADDR']; db::c()->query('INSERT INTO `iplog` (`owner`, `ip`, `date`) VALUES (?i, "?s", ?i)', $data['id'], $ip, time()); - $rs = db::c()->query('SELECT * FROM `telegraph` WHERE `owner` = ?i', $data['id'])->fetch_assoc(); - while ($rs) { - addchp($rs['text'], '{[]}' . $data['login'] . '{[]}'); + $rs = db::c()->query('SELECT * FROM `telegraph` WHERE `owner` = ?i', $data['id']); + while ($res = $rs->fetch_assoc()) { + addchp($res['text'], '{[]}' . $data['login'] . '{[]}'); } db::c()->query('DELETE FROM `telegraph` WHERE `owner` = ?i', $data['id']); header("Location: fight.php"); diff --git a/inf.php b/inf.php index e30e268..3acbc20 100644 --- a/inf.php +++ b/inf.php @@ -5,7 +5,7 @@ include("functions.php"); $login = urldecode(filter_input(INPUT_SERVER,'QUERY_STRING')); $uid = isset($_SESSION['uid'])?$_SESSION['uid']:NULL; -$user = db::c()->query('SELECT `id`,`login`,`married`,`win`,`medals`,borndate,`align`,`admin`,`realname`,`city`,`lozung`,`info`,`prof1`,`prof2`,`email`,`ip`,`exp`,`stats`,`money`,`room`,`doblest` +$user = db::c()->query('SELECT `id`,`login`,`married`,`win`,`medals`,borndate,`align`,`admin`,`realname`,`info`,`prof1`,`prof2`,`email`,`ip`,`exp`,`stats`,`money`,`room`,`doblest` FROM `users` WHERE `login` = "?s"', $login)->fetch_assoc(); $own = db::c()->query('SELECT `align`,`admin` FROM `users` WHERE `id` = "?s"', $uid)->fetch_assoc();