Example #1
0
     break;
 case 'adel':
     if (!valid('janitor')) {
         error(S_NOPERM);
     }
     $no = $mysql->escape_string($_GET['no']);
     $imonly = $_GET['imgonly'] == '1' ? 0 : 1;
     delete_post($no, 0, $imonly, 0, 1, 1);
     echo '<meta http-equiv="refresh" content="0; url=' . PHP_ASELF_ABS . '?mode=' . $_GET['refer'] . '" />';
     break;
 case 'ban':
     if (!valid('moderator')) {
         error(S_NOPERM);
     }
     require_once CORE_DIR . "/admin/bans.php";
     $banish = new Banish();
     if (isset($no)) {
     }
     $banish->postOptions($no, $ip, $banlength, $banType, $perma, $pubreason, $staffnote, $custmess, $showbanmess, $afterban);
     $banish->form($_GET['no']);
     break;
 case 'more':
     echo $table->moreInfo($_GET['no']);
     break;
 case "modify":
     require_once CORE_DIR . "/admin/modify.php";
     $modify = new Modify();
     echo $modify->mod($_GET['no'], $_GET['action']);
     break;
 case 'logout':
     setcookie('saguaro_apass', '0', 1);
Example #2
0
<?php

include "config.php";
require_once CORE_DIR . "/mysql/mysql.php";
$mysql = new SaguaroMySQL();
$mysql->init();
$host = $_SERVER['REMOTE_ADDR'];
require_once CORE_DIR . "/admin/banish.php";
$dis = new Banish();
$deny = $dis->checkBan($host) ? 0 : 1;
//no ban : is banned
$status = "are not banned";
if ($deny) {
    $row = $mysql->fetch_assoc("SELECT * FROM " . SQLBANLOG . " WHERE ip='" . $host . "' AND active <> 0 LIMIT 1");
    $length = ($row['expires'] - $row['placedon']) / 60 / 60 / 24;
    //MATH SON
    switch ($row['type']) {
        case '1':
            $status = 'have been warned on: <b>/' . $row['board'] . '/ - ' . TITLE . '</b>';
            $mysql->query("UPDATE " . SQLBANLOG . " SET active='0' WHERE ip='{$host}' AND active='1' LIMIT 1");
            break;
        case '2':
            $status = 'have been banned from: <b>/' . $row['board'] . '/ - ' . TITLE . '</b>';
            if (time() > $row['expires']) {
                $mysql->query("UPDATE " . SQLBANLOG . " SET active='0' WHERE ip='{$host}' AND active='1' LIMIT 1");
            }
            $row['expires'] = date('F d, Y H:i', $row['expires']) . " days";
            break;
        case '3':
            $status = 'have been banned from <b>all boards</b>';
            if (time() > $row['expires']) {
Example #3
0
    if ($_FILES["upfile"]["error"] == UPLOAD_ERR_PARTIAL || $_FILES["upfile"]["error"] == UPLOAD_ERR_CANT_WRITE) {
        error(S_UPFAIL, $upfile);
    }
}
if ($upfile_name && $_FILES["upfile"]["size"] == 0) {
    error(S_TOOBIGORNONE, $upfile);
}
//Basic proxy check.
if (PROXY_CHECK && preg_match("/^(mail|ns|dns|ftp|prox|pc|[^\\.]\\.[^\\.]\$)/", $host) > 0 || preg_match("/(ne|ad|bbtec|aol|uu|(asahi-net|rim)\\.or)\\.(com|net|jp)\$/", $host) > 0) {
    if (@fsockopen($_SERVER["REMOTE_ADDR"], 80, $a, $b, 2) == 1) {
        error(S_PROXY80, $dest);
    } elseif (@fsockopen($_SERVER["REMOTE_ADDR"], 8080, $a, $b, 2) == 1) {
        error(S_PROXY8080, $dest);
    }
}
//Check if user is banned
require_once CORE_DIR . "/admin/banish.php";
$checkban = new Banish();
if (!$checkban->checkBan($_SERVER["REMOTE_ADDR"])) {
    error(S_BADHOST, $upfile);
}
//Check if replying to locked thread
$resto = (int) $resto;
if ($resto) {
    global $mysql;
    $resto = (int) $resto;
    $result = $mysql->fetch_array("SELECT * FROM " . SQLLOG . " WHERE no={$resto}");
    if ($result["locked"] == '1' && !valid('moderator')) {
        error(S_THREADLOCKED, $upfile);
    }
}
Example #4
0
 case 'admin':
     echo "<META HTTP-EQUIV=\"refresh\" content=\"0;URL=" . PHP_ASELF_ABS . "\">";
     break;
 case 'more':
     require_once CORE_DIR . "/admin/postInfo.php";
     $list = new DelTable();
     echo $list->moreInfo($_GET['no']);
     break;
 case 'logout':
     setcookie('saguaro_apass', '0', 1);
     setcookie('saguaro_auser', '0', 1);
     echo "<META HTTP-EQUIV=\"refresh\" content=\"0;URL=" . PHP_SELF2_ABS . "\">";
     break;
 case 'ban':
     require_once CORE_DIR . "/admin/banish.php";
     $banish = new Banish();
     if (isset($no) && isset($_SERVER['REMOTE_ADDR']) && isset($_POST['banlength']) && isset($_POST['banType']) && isset($_POST['perma']) && isset($_POST['pubreason']) && isset($_POST['staffnote']) && isset($_POST['custmess']) && isset($_POST['showbanmess']) && isset($_POST['afterban'])) {
     }
     $banish->postOptions($no, $_SERVER['REMOTE_ADDR'], $_POST['banlength'], $_POST['banType'], $_POST['perma'], $_POST['pubreason'], $_POST['staffnote'], $_POST['custmess'], $_POST['showbanmess'], $_POST['afterban']);
     $banish->form($_GET['ip'], $_GET['no']);
     break;
 case 'reports':
     head();
     require_once CORE_DIR . "/admin/report.php";
     $getReport = new Report();
     if (isset($_GET['no'])) {
         $getReport->reportClear($_GET['no']);
     }
     $active = $getReport->reportGetAllBoard();
     echo $getReport->reportList();
     break;