$v) { if(empty($v)) { unset($parts[$k]); } else { // gross/kleinschreibung $parts[$k] = strtolower($v); } } } if($parts[1] == 'neu') { $lang = strtolower($parts[2]); $pagekey = strtoupper($parts[3]); } else { $lang = strtolower($parts[1]); $pagekey = strtoupper($parts[2]); } // Allfällige GET-Variablen entfernen if(!strpos($pagekey,'?') === false){ $pagekey = substr($pagekey,0,strpos($pagekey,'?')); } // Sprache // ************************************************************************************* if($lang <> 'de' and $lang <> 'en') $lang = 'de'; // die Seite // ************************************************************************************* // Falls Vorschau aus Adminbereich: if($_SESSION['chrigrue']['adminuser']->id > 0) { switch($lang) { case 'en': $page = $DbMgr->getRow("select * from webseiten where seo_url_e = '$pagekey'"); break; default: $page = $DbMgr->getRow("select * from webseiten where seo_url_d = '$pagekey'"); break; } if($page->id > 0 and $page->status == 'gesperrt') $show_adminpreview_hinweis = true; } else { switch($lang) { case 'en': $page = $DbMgr->getRow("select * from webseiten where seo_url_e = '$pagekey' and status <> 'gesperrt'"); break; default: $page = $DbMgr->getRow("select * from webseiten where seo_url_d = '$pagekey' and status <> 'gesperrt'"); break; } } // das Template // ************************************************************************************* if($page->id > 0) { $template = 'std'; } else { $template = '404'; header("HTTP/1.0 404 Not Found"); } include("./_includes/header.inc.php"); if($template == '404') { include("./_includes/404.inc.php"); } else { if($page->status == 'gesperrt') { include("./_includes/adminpreviewonly.inc.php"); } include("./_includes/content.inc.php"); if($page->id == 16) { include("./_includes/kursanmeldung.inc.php"); } } include("./_includes/footer.inc.php"); ?>