private function makeMenu()
 {
     $tmp = new PageCat();
     $cats = $tmp->findAll('active', 1);
     $this->smarty->assign('uriHead', $this->getURIHead());
     $this->smarty->assign('pageCats', $cats);
     if (!isset($this->isStart) && isset($this->cat) && $this->cat->uri() == "beispiele") {
         $werke = $tmp->find('uri', "werke");
         $this->smarty->assign('activeId', $werke->tblid);
     } else {
         $this->smarty->assign('activeId', $this->cat->tblid);
     }
     $this->passLogin();
     return $this->smarty->fetch('menu.tpl');
 }
Пример #2
0
<?php

require_once dirname(__FILE__) . '/lib/autoloader.php';
autoloader::init();
ini_set('date.timezone', 'Europe/Zurich');
session_start();
$GLOBALS['domain_sub'] = "domain";
$requestURI = explode('/', $_SERVER['REQUEST_URI']);
unset($requestURI[0]);
if ($requestURI[1] == $GLOBALS['domain_sub']) {
    unset($requestURI[1]);
}
$req = array_values($requestURI);
$tmp = new PageCat();
$cats = $tmp->findAll(1, 1, false, true);
// parse routing
for ($i = 0; $i < count($cats); $i++) {
    if ($req[0] == $cats[$i]->uri()) {
        $conString = $cats[$i]->controller();
        $controller = new $conString();
        $tmp = new PageCat();
        $controller->cat = $tmp->find('uri', $req[0]);
        $controller->pageTitle = $controller->cat->title_de();
        break;
    }
}
// standard start page?
if ($req[0] == "") {
    $controller = new NormPage();
    $controller->isStart = true;
}