config = new Config(); $this->gui = new Gui($this->config); $this->design = new Design($this->config); } /** * Do not display the content div * */ function no_content(){ $this->gui->no_content(); } /** * If language is set to 'no', display this content * */ function content_no($text, $design = false){ if($this->config->get_lang() == "no"){ $this->content($text, $design); } } /** * If language is set to 'en', display this content * */ function content_en($text, $design = false){ if($this->config->get_lang() == "en"){ $this->content($text, $design); } } /** * Show the page header * */ function header(){ $this->show($this->gui->get_header(), true); } /** * Display this content for a specific design or always * * @param String $text * @param String $design (optional) */ function content($text, $design = false){ if(($this->gui->get_design() == $design) || !$design){ $this->show($text); } } /** * Set the selected menu * * @param String $menu */ function set_menu($menu){ $this->gui->set_menu($menu); } /** * Display a simple gallery * * @param array $images */ function gallery($images){ include_once("php/image.php"); $image = new Image($this->config); $this->show($image->gallery($images)); } /** * Show the end of the plage * */ function footer(){ $this->show($this->gui->get_footer()); } /** * Display content * * @param String $text * @param bool $no_links is false if we should not manipulate the links */ function show($text, $no_links = false){ if(!$no_links){ $text = $this->gui->replace_links($text); } $text = str_replace('|dot', $this->design->get_dot(), $text); print $text; } } ?>