예제 #1
0
function undel_soc($sname, $comment = null)
{
    if (!($s = get_society($sname, true))) {
        apologize("No such society.");
    }
    if ($s["status"] != "DELETED") {
        apologize("Society not currently deleted.");
    }
    if (!am_admin()) {
        apologize("Access Denied.");
    }
    return change_soc_status($s["soc_id"], $_SESSION["user"]["user_id"], "NORMAL", "UNDELETE", $comment);
}
예제 #2
0
<?php

// configuration
require_once "../includes/config.php";
if (!am_admin()) {
    apologize("Access Denied.");
}
$title = "Admin Panel";
static $admap = ["trends" => "admin_dash_trends.php", "main" => "admin_dash.php", "bans" => "user_bans.php", "locks" => "soc_locks.php", "admins" => "admins.php", "log" => "admin_log.php", "ureps" => "user_reps.php", "sreps" => "soc_reps.php"];
if (!(isset($_GET["view"]) && array_key_exists($_GET["view"], $admap))) {
    $_GET["view"] = "main";
}
require $admap[$_GET["view"]];