Example #1
0
$min_lvl = 800;
require "../../../php_includes/cmaster.inc";
std_init();
$cTheme = get_theme_info();
std_theme_styles(1);
std_theme_body("../");
if ($admin < 1 && !acl(XWEBSESS)) {
    echo "Oi! What are you doing here eh?";
    exit;
}
?>
<!-- $Id: index.php,v 1.24 2005/11/26 12:52:30 nighty Exp $ //-->
<h1>Admin Reports</h1>
<br>
Site Status : <?php 
if (site_off()) {
    echo "<font color=#" . $cTheme->main_no . "><b>CS STAFF ONLY</b></font>";
} else {
    echo "<font color=#" . $cTheme->main_yes . "><b>OPEN</b></font>";
}
?>
 - New Users : <?php 
if (newusers_off()) {
    echo "<font color=#" . $cTheme->main_no . "><b>LOCKED</b></font>";
} else {
    echo "<font color=#" . $cTheme->main_yes . "><b>OPEN</b></font>";
}
?>
 - New Registrations : <?php 
if (newregs_off()) {
    echo "<font color=#" . $cTheme->main_no . "><b>CS STAFF ONLY</b></font>";
<?php

$min_lvl = 800;
require "../../../php_includes/cmaster.inc";
std_connect();
$user_id = std_security_chk($auth);
$admin = std_admin();
if (!acl(XWEBCTL)) {
    echo "<b>Go away</b>!!!";
    die;
}
if ($switch == "ON" && site_off()) {
    echo "Already LOCKED";
    die;
}
if ($switch == "OFF" && !site_off()) {
    echo "Already UNLOCKED";
    die;
}
if ($switch == "ON") {
    pg_safe_exec("INSERT INTO locks VALUES (1,now()::abstime::int4," . $user_id . ")");
}
if ($switch == "OFF") {
    pg_safe_exec("DELETE FROM locks WHERE section='1'");
}
header("Location: index.php");
die;