Esempio n. 1
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');
    }
}
Esempio n. 2
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');
    }
}