Exemplo n.º 1
0
    redirect("index.php?page=recover&act=recover_ok&id={$id}&random={$random}");
    die;
} elseif ($act == "recover_ok") {
    $id = intval(0 + $_GET["id"]);
    $random = intval($_GET["random"]);
    if (!$id || !$random || empty($random) || $random == 0) {
        stderr($language["ERROR"], $language["ERR_UPDATE_USER"]);
    }
    $res = do_sqlquery("SELECT username, email, random" . ($GLOBALS["FORUMLINK"] == "smf" ? ", smf_fid" : "") . " FROM {$TABLE_PREFIX}users WHERE id = {$id}", true);
    $arr = mysql_fetch_array($res);
    if ($random != $arr["random"]) {
        stderr($language["ERROR"], $language["ERR_UPDATE_USER"]);
    }
    $email = $arr["email"];
    success_msg($language["SUCCESS"], $language["SUC_SEND_EMAIL"] . " <b>{$email}</b>.\n" . $language["SUC_SEND_EMAIL_2"]);
    $tpl->set("main_footer", bottom_menu() . "<br />\n");
    $tpl->set("btit_version", print_version());
    echo $tpl->fetch(load_template("main.tpl"));
    die;
} elseif ($act == "recover") {
}
$recovertpl = new bTemplate();
global $language, $recovertpl;
$recovertpl->set("language", $language);
$recover = array();
$recover["action"] = "index.php?page=recover&amp;act=takerecover";
$recovertpl->set("recover", $recover);
if ($USE_IMAGECODE) {
    if (extension_loaded('gd')) {
        $arr = gd_info();
        if ($arr['FreeType Support'] == 1) {
Exemplo n.º 2
0
function stdfoot($normalpage = true, $update = true, $adminpage = false, $torrentspage = false, $forumpage = false)
{
    global $STYLEPATH, $tpl, $no_columns, $PRINT_DEBUG, $STYLETYPE;
    $tpl->set('to_top', print_top());
    $tpl->set('tracker_url', print_trackerurl());
    $tpl->set('site_name', print_sitename());
    $tpl->set('user_name', print_username());
    $tpl->set('main_footer', bottom_menu() . "<br />\n");
    $tpl->set('xbtit_version', print_version());
    $tpl->set('style_copyright', print_designer());
    $tpl->set('xbtit_debug', $PRINT_DEBUG ? print_debug() : "");
    $tpl->set('news_text', print_disclaimer());
    if ($STYLETYPE == 2) {
        // It's a style modified for atmoner's original system
        // Improvement of template by atmoner
        if ($normalpage && !$no_columns) {
            $tpl->set("RIGHT_COL", true, true);
            $tpl->set("LEFT_COL", true, true);
            $tpl->set("NO_HEADER", true, true);
            $tpl->set("NO_FOOTER", true, true);
        } elseif ($adminpage) {
            $tpl->set("RIGHT_COL", false, true);
            $tpl->set("LEFT_COL", true, true);
            $tpl->set("NO_HEADER", true, true);
            $tpl->set("NO_FOOTER", true, true);
        } elseif ($torrentspage || $forumpage || $no_columns == 1) {
            $tpl->set("RIGHT_COL", false, true);
            $tpl->set("LEFT_COL", false, true);
            $tpl->set("NO_HEADER", true, true);
            $tpl->set("NO_FOOTER", true, true);
        } else {
            $tpl->set("RIGHT_COL", false, true);
            $tpl->set("LEFT_COL", false, true);
            $tpl->set("NO_HEADER", false, true);
            $tpl->set("NO_FOOTER", false, true);
        }
        echo $tpl->fetch(load_template('main.tpl'));
    } elseif ($STYLETYPE == 3) {
        // It's a style modified for Petr1fied's enhanced version of atmoner's system.
        $tpl->set("TYPE1_EXCLUSIVE_1", false, true);
        $tpl->set("TYPE1_EXCLUSIVE_2", false, true);
        $tpl->set("TYPE1_EXCLUSIVE_3", false, true);
        $tpl->set("TYPE1_EXCLUSIVE_4", false, true);
        $tpl->set("TYPE1_EXCLUSIVE_5", false, true);
        $tpl->set("TYPE2_EXCLUSIVE_1", false, true);
        $tpl->set("TYPE2_EXCLUSIVE_2", false, true);
        $tpl->set("TYPE2_EXCLUSIVE_3", false, true);
        $tpl->set("TYPE2_EXCLUSIVE_4", false, true);
        $tpl->set("TYPE2_EXCLUSIVE_5", false, true);
        $tpl->set("TYPE3_EXCLUSIVE_1", false, true);
        $tpl->set("TYPE3_EXCLUSIVE_2", false, true);
        $tpl->set("TYPE3_EXCLUSIVE_3", false, true);
        $tpl->set("TYPE3_EXCLUSIVE_4", false, true);
        $tpl->set("TYPE3_EXCLUSIVE_5", false, true);
        $tpl->set("TYPE4_EXCLUSIVE_1", false, true);
        $tpl->set("TYPE4_EXCLUSIVE_2", false, true);
        $tpl->set("TYPE4_EXCLUSIVE_3", false, true);
        $tpl->set("TYPE4_EXCLUSIVE_4", false, true);
        $tpl->set("TYPE4_EXCLUSIVE_5", false, true);
        if ($normalpage && !$no_columns) {
            $tpl->set("HAS_LEFT_COL", true, true);
            $tpl->set("HAS_RIGHT_COL", true, true);
            $tpl->set("IS_DISPLAYED_1", true, true);
            $tpl->set("IS_DISPLAYED_2", true, true);
            $tpl->set("IS_DISPLAYED_3", true, true);
            $tpl->set("IS_DISPLAYED_4", true, true);
            $tpl->set("IS_DISPLAYED_5", true, true);
            $tpl->set("TYPE1_EXCLUSIVE_1", true, true);
            $tpl->set("TYPE1_EXCLUSIVE_2", true, true);
            $tpl->set("TYPE1_EXCLUSIVE_3", true, true);
            $tpl->set("TYPE1_EXCLUSIVE_4", true, true);
            $tpl->set("TYPE1_EXCLUSIVE_5", true, true);
        } elseif ($adminpage) {
            $tpl->set("HAS_LEFT_COL", true, true);
            $tpl->set("HAS_RIGHT_COL", false, true);
            $tpl->set("IS_DISPLAYED_1", true, true);
            $tpl->set("IS_DISPLAYED_2", true, true);
            $tpl->set("IS_DISPLAYED_3", true, true);
            $tpl->set("IS_DISPLAYED_4", true, true);
            $tpl->set("IS_DISPLAYED_5", true, true);
            $tpl->set("TYPE2_EXCLUSIVE_1", true, true);
            $tpl->set("TYPE2_EXCLUSIVE_2", true, true);
            $tpl->set("TYPE2_EXCLUSIVE_3", true, true);
            $tpl->set("TYPE2_EXCLUSIVE_4", true, true);
            $tpl->set("TYPE2_EXCLUSIVE_5", true, true);
        } elseif ($torrentspage || $forumpage || $no_columns == 1) {
            $tpl->set("HAS_LEFT_COL", false, true);
            $tpl->set("HAS_RIGHT_COL", false, true);
            $tpl->set("IS_DISPLAYED_1", true, true);
            $tpl->set("IS_DISPLAYED_2", true, true);
            $tpl->set("IS_DISPLAYED_3", true, true);
            $tpl->set("IS_DISPLAYED_4", true, true);
            $tpl->set("IS_DISPLAYED_5", true, true);
            $tpl->set("IS_DISPLAYED_5", true, true);
            $tpl->set("TYPE3_EXCLUSIVE_1", true, true);
            $tpl->set("TYPE3_EXCLUSIVE_2", true, true);
            $tpl->set("TYPE3_EXCLUSIVE_3", true, true);
            $tpl->set("TYPE3_EXCLUSIVE_4", true, true);
            $tpl->set("TYPE3_EXCLUSIVE_5", true, true);
        } else {
            $tpl->set("HAS_LEFT_COL", false, true);
            $tpl->set("HAS_RIGHT_COL", false, true);
            $tpl->set("IS_DISPLAYED_1", false, true);
            $tpl->set("IS_DISPLAYED_2", false, true);
            $tpl->set("IS_DISPLAYED_3", false, true);
            $tpl->set("IS_DISPLAYED_4", false, true);
            $tpl->set("IS_DISPLAYED_5", false, true);
            $tpl->set("IS_DISPLAYED_5", false, true);
            $tpl->set("TYPE4_EXCLUSIVE_1", true, true);
            $tpl->set("TYPE4_EXCLUSIVE_2", true, true);
            $tpl->set("TYPE4_EXCLUSIVE_3", true, true);
            $tpl->set("TYPE4_EXCLUSIVE_4", true, true);
            $tpl->set("TYPE4_EXCLUSIVE_5", true, true);
        }
        echo $tpl->fetch(load_template('main.tpl'));
    } else {
        // It's an original style type. Also default to this if there's an unknown value for the $STYLETYPE variable.
        if ($normalpage && !$no_columns) {
            echo $tpl->fetch(load_template('main.tpl'));
        } elseif ($adminpage) {
            if (file_exists(load_template('main.left_column.tpl'))) {
                echo $tpl->fetch(load_template('main.left_column.tpl'));
            } else {
                echo $tpl->fetch(load_template('main.tpl'));
            }
        } elseif ($torrentspage || $forumpage || $no_columns == 1) {
            if (file_exists(load_template('main.no_columns.tpl'))) {
                echo $tpl->fetch(load_template('main.no_columns.tpl'));
            } else {
                echo $tpl->fetch(load_template('main.tpl'));
            }
        } else {
            if (file_exists(load_template('main.no_header_1_column.tpl'))) {
                echo $tpl->fetch(load_template('main.no_header_1_column.tpl'));
            } else {
                echo $tpl->fetch(load_template('main.tpl'));
            }
        }
    }
    ob_end_flush();
    if ($update) {
        register_shutdown_function('updatedata');
    }
}
Exemplo n.º 3
0
function stdfoot($normalpage = true, $update = true, $adminpage = false, $torrentspage = false, $forumpage = false)
{
    global $STYLEPATH, $tpl, $no_columns;
    $tpl->set('to_top', print_top());
    $tpl->set('tracker_url', print_trackerurl());
    $tpl->set('site_name', print_sitename());
    $tpl->set('user_name', print_username());
    $tpl->set('main_footer', bottom_menu() . "<br />\n");
    $tpl->set('xbtit_version', print_version());
    $tpl->set('style_copyright', print_designer());
    $tpl->set('xbtit_debug', print_debug());
    if ($normalpage && !$no_columns) {
        echo $tpl->fetch(load_template('main.tpl'));
    } elseif ($adminpage) {
        echo $tpl->fetch(load_template('main.left_column.tpl'));
    } elseif ($torrentspage || $forumpage || $no_columns == 1) {
        echo $tpl->fetch(load_template('main.no_columns.tpl'));
    } else {
        echo $tpl->fetch(load_template('main.no_header_1_column.tpl'));
    }
    ob_end_flush();
    if ($update) {
        register_shutdown_function('updatedata');
    }
}