Ejemplo n.º 1
0
            $type = "Name";
        } else {
            BootstrapSkin::displayAlertBox("Unknown ban type.", "alert-error");
            BootstrapSkin::displayInternalFooter();
            die;
        }
        if (count(Ban::getActiveBans($target))) {
            BootstrapSkin::displayAlertBox("This target is already banned!", "alert-error");
            BootstrapSkin::displayInternalFooter();
            die;
        }
        $smarty->assign("bantype", $type);
        $smarty->assign("bantarget", trim($target));
        $smarty->display("bans/banform.tpl");
    } else {
        $bans = Ban::getActiveBans();
        $smarty->assign("activebans", $bans);
        $smarty->display("bans/banlist.tpl");
    }
    BootstrapSkin::displayInternalFooter();
    die;
} elseif ($action == "defer" && $_GET['id'] != "" && $_GET['sum'] != "") {
    global $availableRequestStates;
    if (array_key_exists($_GET['target'], $availableRequestStates)) {
        $request = Request::getById($_GET['id'], gGetDb());
        if ($request == false) {
            BootstrapSkin::displayAlertBox("Could not find the specified request!", "alert-error", "Error!", true, false);
            BootstrapSkin::displayInternalFooter();
            die;
        }
        if ($request->getChecksum() != $_GET['sum']) {