diff --git a/modules_data/_mod.php b/modules_data/_mod.php index bfba842d..5ac79f06 100644 --- a/modules_data/_mod.php +++ b/modules_data/_mod.php @@ -15,16 +15,6 @@ if (!$m->isModerator) { return; } -$rang = 'Модератор'; - -if (isset($_GET['remod'])) { - if ($_GET['remod'] == 1) { - $_SESSION['remod'] = 3; - } else { - $_SESSION['remod'] = 1; - } -} - $merror = ''; $uer = ''; @@ -50,23 +40,23 @@ if (!empty($_POST['logingo'])) { $moderation->depersonalize($_POST['time']); } elseif (!empty($_POST['undepersonalize'])) { $moderation->undepersonalize(); - } elseif (!empty($_POST['ban'])) { + } elseif (!empty($_POST['ban']) && $m->canBlockUsers) { $moderation->ban(); - } elseif (!empty($_POST['unban'])) { + } elseif (!empty($_POST['unban']) && $m->canBlockUsers) { $moderation->unban(); - } elseif (!empty($_POST['addmoderator'])) { + } elseif (!empty($_POST['addmoderator']) && $m->isAdmin) { $administration->addmoderator(); - } elseif (!empty($_POST['deletemoderator'])) { + } elseif (!empty($_POST['deletemoderator']) && $m->isAdmin) { $administration->removemoderator(); - } elseif (!empty($_POST['changegender'])) { + } elseif (!empty($_POST['changegender']) && $m->isAdmin) { $administration->changegender(); - } elseif (!empty($_POST['changelogin']) && !empty($_POST['newLogin'])) { + } elseif (!empty($_POST['changelogin']) && !empty($_POST['newLogin']) && $m->isAdmin) { $administration->changelogin($_POST['newLogin']); - } elseif (!empty($_POST['giveitem']) && !empty($_POST['itemId'])) { + } elseif (!empty($_POST['giveitem']) && !empty($_POST['itemId']) && $m->isAdmin) { $administration->additem((int)$_POST['itemId']); - } elseif (!empty($_POST['kickfrombattle'])) { + } elseif (!empty($_POST['kickfrombattle']) && $m->isAdmin) { $administration->kickfrombattle(); - } elseif (!empty($_POST['toggleinvisibility'])) { + } elseif (!empty($_POST['toggleinvisibility']) && $m->isAdmin) { $administration->toggleinvisibility(); } @@ -93,7 +83,7 @@ if (isset($_GET['go'])) { $go = round($_GET['go']); } -if ($go == 3 && $u->info['admin'] > 0) { +if ($go == 3 && $m->isAdmin) { ?>
Редактор заданий |
- + | Редактор заданий |
+ |
-
-
|