From 834ee8259ccfe0de584507ba8cf58b0d4e2ea3b4 Mon Sep 17 00:00:00 2001 From: lopar Date: Fri, 21 Jun 2019 01:05:32 +0300 Subject: [PATCH] remove deprecated --- klan.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/klan.php b/klan.php index 89ea05e..b25c078 100644 --- a/klan.php +++ b/klan.php @@ -48,7 +48,11 @@ if (isset($_POST['kr']) && ($_POST['kolv'] > 0)) { query('SELECT * FROM `users` WHERE `klan` = "?s" AND `login` = "?s"', $klan['id'], $user['id'])->fetch_assoc(); + } + if ($klan['glava'] == $user['id'] OR $polno[$user['id']][0] == 1 OR $polno[$user['id']][1] == 1) { echo "
"; if ($polno[$user['id']][0] == 1) echo ' (это вам обойдется в 100 кр.)
@@ -83,7 +87,7 @@ if (!empty($_POST['login'])) echo 'Это успех, $login!'; } if ($_POST['login']) { - $sok = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `klan` = \'' . $klan['id'] . '\' AND `login` = \'' . $_POST['login'] . '\' LIMIT 1;')); + $sok = db::c()->query('SELECT `id`, `status` FROM `users` WHERE `klan` = "?s" AND `login` = "?s"', $klan['id'], $user['id'])->fetch_assoc(); $st = strip_tags(str_replace("<", "<", str_replace(">", ">", $_POST['status'])), ""); if ($klan['glava'] == $sok['id']) { $st = "Глава клана"; @@ -100,15 +104,15 @@ if (!empty($_POST['login'])) echo 'Это успех, $login!'; } else { $polno[$sok['id']][1] = 0; } - $id_checked = mysql_real_escape_string($sok['id']); - if (!mysql_query("UPDATE `users` SET `status` = '{$st}' WHERE `id` = '{$id_checked}';")) echo(mysql_error()); + db::c()->query('UPDATE `users` SET `status` = "?s" WHERE `id` = ?i', $st, $sok['id']); + if ($klan['glava'] == $user['id']) { - mysql_query('UPDATE `clans` SET `vozm` = \'' . serialize($polno) . '\' WHERE `id` = \'' . $klan['id'] . '\';'); + db::c()->query('UPDATE `clans` SET `vozm` = "?s" WHERE `id` = ?i', serialize($polno), $klan['id']); } $sok['status'] = $st; } - echo '
Редактирование статуса "', $sok['login'], '" + echo '
Редактирование статуса "',$user['id'], '" Звание в клане
'; if ($klan['glava'] == $user['id']) { echo '