From cdda80f70aba0a14b3b71d9a9565ea1213003235 Mon Sep 17 00:00:00 2001 From: "Igor Barkov [iwork]" Date: Tue, 11 Dec 2018 15:09:21 +0200 Subject: [PATCH] =?UTF-8?q?Fatal=20error:=20Uncaught=20exception=20fixed?= =?UTF-8?q?=20(=D0=9D=D0=B5=20=D0=BB=D0=B5=D0=BD=D0=B8=D1=82=D1=8C=D1=81?= =?UTF-8?q?=D1=8F=20=D0=B8=20=D0=BD=D0=B5=20=D0=B2=D1=8B=D0=BF=D0=B5=D0=BD?= =?UTF-8?q?=D0=B4=D1=80=D0=B8=D0=B2=D0=B0=D1=82=D1=8C=D1=81=D1=8F=20=D1=81?= =?UTF-8?q?=20=D1=83=D1=81=D0=BB=D0=BE=D0=B2=D0=B8=D1=8F=D0=BC=D0=B8=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=BE=D0=B2.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index aba71ac..61120f3 100644 --- a/functions.php +++ b/functions.php @@ -2266,8 +2266,9 @@ function ref_drop() return false; } } + $slot = ['sergi', 'kulon', 'weap', 'bron', 'r1', 'r2', 'r3', 'helm', 'perchi', 'shit', 'boots', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9', 'm10']; - $user = db::c()->query('SELECT ?af FROM `users` WHERE id = ?i',$slot,$_SESSION['uid'])->fetch_assoc(); + $user = db::c()->query('SELECT `sergi`,`kulon`,`weap`,`bron`,`r1`,`r2`,`r3`,`helm`,`perchi`,`shit`,`boots`,`m1`,`m2`,`m3`,`m4`,`m5`,`m6`,`m7`,`m8`,`m9`,`m10` FROM `users` WHERE id = ?i', $_SESSION['uid'])->fetch_assoc(); for ($i = 0; $i <= 20; $i++) { if ($user[$slot[$i]] && !derj($user[$slot[$i]])) { dropitem($i + 1); @@ -2852,8 +2853,9 @@ function SolveExp($at_id, $def_id, $damage) * @return bool * @throws \Krugozor\Database\Mysql\Exception */ -function addToDelo($message, $user_id = 0, $type = 1) { +function addToDelo($message, $user_id = 0, $type = 1) +{ if (empty($user_id)) $user_id = $_SESSION['uid']; - db::c()->query('INSERT INTO `delo` (pers, text, type, date) VALUES (?i,"?s",?i,?i)',$user_id,$message,$type,time()); + db::c()->query('INSERT INTO `delo` (pers, text, type, date) VALUES (?i,"?s",?i,?i)', $user_id, $message, $type, time()); return true; }