示例#1
0
if ($page_name && $page_name != 'index.php') {
    $objui->displayPageByName($page_name);
} elseif ($category_id) {
    $cat = $Common_BO->cats->getCategory($category_id);
    if ($cat->index_page_id > 0) {
        $page = $Common_BO->pages->getPage($cat->index_page_id);
        if ($page->id) {
            $objui->displayPage($page->id);
        }
    }
    if (!$cat->index_page_id || !is_object($page) || !$page->id) {
        $objui->displayTOC($category_id);
    }
} elseif ($page_id) {
    $objui->displayPage($page_id);
} elseif (isset($index)) {
    $objui->displayIndex();
} elseif (isset($toc)) {
    $objui->displayTOC();
} else {
    if ($sitemgr_info['home_page_id']) {
        $objui->displayPage($sitemgr_info['home_page_id']);
    } else {
        $index = 1;
        $objui->displayIndex();
    }
}
if (DEBUG_TIMER) {
    $GLOBALS['debug_timer_stop'] = perfgetmicrotime();
    echo 'Page loaded in ' . ($GLOBALS['debug_timer_stop'] - $GLOBALS['debug_timer_start']) . ' seconds.';
}