"#FFFFFF", 'ACCENT_COLOR' => "#F0FFF0", 'HEADING_COLOR' => "#009000", 'TEXT_COLOR' => "#000000", 'REGULAR_LINK_COLOR' => "#009000", 'VISITED_LINK_COLOR' => "#009000", 'ACTIVE_LINK_COLOR' => "#00FF00", 'HOVER_LINK_COLOR' => "#00FF00" ); var $menu = array(); var $content; /* * Class initialization */ function Page() { global $_SERVER; global $_SESSION; global $_SERVER; global $_POST; global $_GET; if ( is_file("menu.ini") ) { include_once("menu.ini"); $this->menu = $menu; } $this->relpath = constant("RELPATH"); $this->reluri = constant("RELURI"); if ( defined("RELFILE") ) { $this->relfile = constant("RELFILE"); } } /* * Generates the side menu based on login status and the contents of the * 'menu.ini' file. */ function generate_menu() { $output = "

Menu

\n"; $output .= " \n"; if ( $_SESSION['login'] ) { $output .= " \n"; } elseif ( $this->relpath == "" && $this->relfile == "account.php" ) { // display nothing } else { $output .= " \n"; } return($output); } /* * Replaces the tokens in the template with the stored content and then * displays the page to the browser. */ function display($html2str=0) { if ( $this->template == 'blank' ) { $this_page = $this->content; } else { $this_page = file_get_contents($this->template,true); $this_page = ereg_replace("\[RELPATH\]","$this->relpath",$this_page); $this_page = ereg_replace("\[TITLE\]","$this->title",$this_page); $this_page = ereg_replace("\[FAVICON\]","$this->favicon",$this_page); while ( list($key,$val) = each ($this->colors) ) { $this_page = ereg_replace("\[$key\]","$val",$this_page); } $this_page = ereg_replace("\[DESCRIPTION\]","$this->description",$this_page); $this_page = ereg_replace("\[KEYWORDS\]","$this->keywords",$this_page); $this_page = ereg_replace("\[HEADER\]","$this->header",$this_page); $this_page = ereg_replace("\[MENU\]",$this->generate_menu(),$this_page); $this_page = ereg_replace("\[CONTENT\]","$this->content",$this_page); $this_page = ereg_replace("\[YEAR\]",date("Y"),$this_page); $this_page = ereg_replace("\[LAST_MODIFIED\]",date("H:i Y/m/d",filemtime(basename($_SERVER['SCRIPT_FILENAME']))),$this_page); } $this_page = stripslashes($this_page); if ( $html2str == 0 ) { $this_page = htmlentity2str($this_page); } echo $this_page; exit; } } ?>