From 2672b97ae95ab1fecffc2b1280909c8de3b4b5c9 Mon Sep 17 00:00:00 2001 From: lopar Date: Tue, 15 Jan 2019 22:02:52 +0200 Subject: [PATCH] now it has a master! --- gotzamok.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gotzamok.php b/gotzamok.php index 89b48ee..2cc53ca 100644 --- a/gotzamok.php +++ b/gotzamok.php @@ -1,4 +1,4 @@ -= 37 AND $user['room'] <= 41)) { die(); } -$zam = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzamok')->fetch_assoc(); -if ($zam['value'] == $user['klan']) { +$castleOwners = db::c()->query('SELECT * FROM `clans` WHERE `short` = (SELECT * FROM `variables` WHERE `var` = "?s")', 'gotzamok'); + +if ($castleOwners['id'] == $user['klan']) { // если мой клан if ($_GET['goto'] == 'arsenal') $user['room'] = 38; if ($_GET['goto'] == 'home') $user['room'] = 37; @@ -50,7 +51,7 @@ if ($user['room'] == 38) { if ($_GET['add']) { $item = db::c()->query('SELECT * FROM `inventory` WHERE `dressed`=0 AND `setsale` = 0 AND `owner` =?i AND `id` = ?i', $_SESSION['uid'], $_GET['add'])->fetch_assoc(); - if ($_SESSION['uid'] == $it['owner']) { + if ($_SESSION['uid'] == $item['owner']) { $status = 'Вы оставили вещь в арсенале.'; db::c()->query('UPDATE `inventory` SET `owner` = ?i WHERE `id` = ?i', -5, $item['id']); db::c()->query('INSERT INTO `gotzam_arsenal` (`id_it`, `owner`) VALUES (?i, ?i)', $item['id'], $_SESSION['uid']); @@ -84,7 +85,7 @@ if ($user['room'] == 40) { - + -

Приветствую тебя в замке .gif'> , воин!

+

Приветствую тебя в замке .gif'> , воин!

+if ($castleOwners['id'] == $user['klan']) { ?>

Приветствую в родной обители, собрат !