/* ################################################## # # Filename..........: $RCSfile: Page.class,v $ # Original Author...: Anthony L. Awtrey # Version...........: $Revision: 0.1 $ # Last Modified By..: $Author: aawtrey $ # Last Modified.....: $Date: 2006/09/21 18:15:56 $ # # Copyright 2006 Anthony Awtrey # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # */ /* * Simple templating system for this web application. */ class Page { var $template = "default.tpl"; var $relpath; var $reluri; var $relfile; var $title = "Worship Organizer"; var $header; var $description; var $favicon = "/favicon.ico"; var $keywords = "jesus,christ,worship,hymn,anthem,lectionary,revised common lectionary,prebyterian,pcusa"; var $colors = array( 'BACKGROUND_COLOR' => "#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 = "