include("conf/db.php"); include("utils/dbutils.php"); include("utils/imageutils.php"); include("utils/html.php"); include("utils/fce.php"); include("layout.php"); session_start(); $db= new dbutils; $html= new htmlutils; $img= new imageutils("image/gallery/"); $fce= new fce; $layout= new layout; class page { var $povolene_tridy,$trida; var $title,$description,$nadpis,$hlavicka_img; function show() { global $layout,$db; $this->povolene_tridy[]="clanky"; $this->povolene_tridy[]="galerie"; $this->povolene_tridy[]="novinky"; $this->povolene_tridy[]="knihy"; $this->povolene_tridy[]="guestbook"; $this->spust_tridu($_GET["class"]); if(is_object($this->trida)) { $text=$this->trida->show(); }else{ $text="
Chyba: Stránka neexistuje
"; } $titulek=$db->get_conf_value("titulek_stranek"); if($_GET["class"]!="novinky") { include("novinky.php"); $novinky=new novinky; $novinky_text=$novinky->hlavni_strana(); } else { $novinky_text=$this->trida->hlavni_strana(); } $layout->hlavicka($titulek." - ".$this->title,$this->description,$this->nadpis,$this->hlavicka_img,$novinky_text); echo $text; $layout->paticka(""); } function spust_tridu($classname) { if($classname=="") { $classname="clanky"; } if(in_array($classname,$this->povolene_tridy)){ $pozice=array_search($classname,$this->povolene_tridy); include($classname.".php"); $this->trida=new $classname; } } } $page=new page; $page->show(); ?>