Esempio n. 1
0
    if (!is_dir($GLOBALS['sitemgr_info']['site_dir'] . SEP . 'templates') || !is_readable($GLOBALS['sitemgr_info']['site_dir'] . SEP . 'templates')) {
        echo lang("The filesystem path to your sitemgr-site directory '%1' is probably wrong. Go to SiteMgr --> Define Websites and edit/fix the concerned Site.", $GLOBALS['sitemgr_info']['site_dir']);
    } elseif (!is_dir($templateroot) || !is_readable($templateroot)) {
        echo lang("You may have deinstalled the used template '%1'. Reinstall it or go to SiteMgr --> Configure Website and select an other one.", $GLOBALS['sitemgr_info']['themesel']);
    }
    $GLOBALS['phpgw']->common->phpgw_exit();
}
$objui = new ui();
$page = CreateObject('sitemgr.Page_SO');
$page_id = $_GET['page_id'];
$page_name = $_GET['page_name'];
$category_id = $_GET['category_id'];
$toc = $_GET['toc'];
$index = $_GET['index'];
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();