Exemplo n.º 1
0
if (file_exists("upgrade_install.php") && DDDEBUG != 1) {
    die("This script cannot be run with the upgrade utility still sitting here!  Please delete the upgrade script!");
}
require_once "common.php";
$db = new ThornDBI();
//Drop them out right now if they are banned! - tyam
if ($db->checkban()) {
    THdie("PObanned");
} else {
    //whole file
    if (isset($_GET['b']) == true) {
        $boardid = $db->getboardnumber($_GET['b']);
        //Does the board even exist?
        if ($boardid == null || $boardid < 0) {
            THdie("Board not found.");
        }
        $template = $db->getboardtemplate($boardid);
        //what is our template
        if ($boardid == THmodboard) {
            if (!$_SESSION['moderator'] && !$_SESSION['admin']) {
                THdie("You are not authorized to access this board.");
            }
        }
        if ($db->isboardreg($boardid) == true) {
            if (!$_SESSION['username']) {
                THdie("You must register to view this board.");
            }
        }
        if (isset($_GET['i']) == true) {
            $threadtpl = "thread.tpl";
            //oh boy let's split it up more