- <?php
- /**
- * <b>Location Section</b><br />
- * The location section lists the main locations and descriptions.
- * @author Kristen O'Brien <kristen_paristemi-com>
- * @copyright Copyright 2004, Kristen O'Brien
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- * @link http://www.paristemi.com Paristemi Main Site
- * @package paristemi
- * @subpackage paristemi_business_logic
- * @since Build 0.1
- * @version Build 0.7
- * @filesource
- */
- /**
- * Include the constants file and all of the files in the include list
- */
- if(ltrim(dirname($_SERVER['SCRIPT_FILENAME'])) == "" || !file_exists($_SERVER['DOCUMENT_ROOT']."/constants.php")) {
- if(!file_exists("../constants.php")) { require_once("../public_html/constants.php"); }
- else { require_once("../constants.php"); }
- }
- else { require_once($_SERVER['DOCUMENT_ROOT']."/constants.php"); }
- foreach($INCLUDE_LIST as $includefile) { require_once $includefile; }
- require_once ($SERVER_DIRECTORY.$INCLUDE_PATH.$LOCATION_INCLUDE);
-
- $loc_inc = new Location();
- $db = new Database();
- $db_location = $db->GetClass('location');
- $smarty = UtilSmarty::createSmarty();
- $id="";
-
- if(getenv("QUERY_STRING")) {
- if(isset($HTTP_GET_VARS['id'])) {$id = $HTTP_GET_VARS['id'];}
- $item = $db_location->GetLocationData($id);
- $pagesubtitle = $item->Name;
- }
- else { $pagesubtitle = $S_OFFICE; }
-
- require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
- "?pagetitle=".str_replace(" ","%20",htmlentities($S_LOCATION)).
- "&pagesubtitle=".str_replace(" ","%20",htmlentities(stripslashes($pagesubtitle))).
- "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_LOCATION));
-
- $smarty->assign('sidesections',array($loc_inc->locHeader()));
-
- if(getenv("QUERY_STRING")) {
- if(isset($HTTP_GET_VARS['id'])) {$id = $HTTP_GET_VARS['id'];}
- $smarty->assign('printtable',$loc_inc->LocationData($id));
- }
- else {
- $smarty = $loc_inc->AllLocationData($smarty);
- }
-
- UtilSmarty::displaySectionPage($smarty);
- ?>
- <?php require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER; ?>