config = &$config; $this->type = $config->get_type(); $this->img_url = $config->get_img_url(); $this->design = $config->get_design(); if($this->design == 'Vaar'){ $this->set_spring(); } else{ $this->set_winter(); } if($this->type == 'print'){ $this->set_print(); } $this->menu = new Menu($this->config); } /** * Make a winter design * */ function set_winter(){ $this->border_color = "999999"; $this->a_color = "003366"; $this->a_visited_color = "003366"; $this->a_hover_color = "003366"; $this->content_bg_color = "ffffff"; $this->content_color = "333333"; $this->content_box_color = "333333"; $this->meny_bg_color = "ffffff"; $this->menu_color = "333333"; $this->menu_a_color = "333333"; $this->menu_a_visited_color = "333333"; $this->menu_a_hover_color = "000000"; $this->h1_bg_color = "cccccc"; $this->h2_bg_color = "cccccc"; $this->h2_border_color = "999999"; $this->h2_color = "333333"; $this->content_box_bg_color = ""; } /** * Make a spring design * */ function set_spring(){ $this->bg_color = "999966"; $this->border_color = "666666"; $this->content_border_color = "999966"; $this->a_color = "003366"; $this->a_visited_color = "003366"; $this->a_hover_color = "003366"; $this->content_bg_color = "FFFFCC"; $this->content_color = "333333"; $this->content_box_color = "333333"; $this->content_box_bg_color = "CCCC99"; $this->meny_bg_color = "FFFFCC"; $this->menu_color = "333333"; $this->menu_a_color = "333333"; $this->menu_a_visited_color = "333333"; $this->menu_a_hover_color = "000000"; $this->h1_bg_color = "999966"; $this->h2_bg_color = "CCCC99"; $this->h2_border_color = "999966"; $this->h2_color = "333333"; } /** * Make the page printer friendly * */ function set_print(){ $this->set_winter(); $this->h1_bg_color = "eeeeee"; $this->bg_color = "ffffff"; } /** * Set the page type * * @param String $type */ function set_type($type){ $this->type = $type; } /** * Don't display the content div * */ function no_content(){ $this->display_content = false; } /** * Set selected menu * * @param String $menu */ function set_menu($menu){ $this->menu->set_selected($menu); } /** * Get the design object * * @return Design */ function get_design(){ return $this->design; } /** * Get the first part of the page * * @return String */ function get_header(){ $html = " Granevang.net "; if($this->type != "print"){ $html .= "
 
"; } $html .= "

".$this->menu->get_heading()."

"; if($this->type != "print"){ $html .= " "; } if($this->display_content){ $html .= "
"; } return $html; } /** * Get the last part of the page * * @return String */ function get_footer(){ $html = ""; if($this->display_content){ $html .= "
"; } $html ."
"; return $html; } /** * Remember variables through links * * @param unknown_type $text */ function replace_links($text){ return $this->menu->replace_links($text); } } ?>