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(); ?>