paristemi
[ class tree: paristemi ] [ index: paristemi ] [ all elements ]

Source for file index.php

Documentation is available at index.php

  1. <?php
  2. /**
  3. * <b>Location Section</b><br />
  4. * The location section lists the main locations and descriptions.
  5. * @author Kristen O'Brien <kristen_paristemi-com>
  6. * @copyright Copyright 2004, Kristen O'Brien
  7. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  8. * @link http://www.paristemi.com Paristemi Main Site
  9. * @package paristemi
  10. * @subpackage paristemi_business_logic
  11. * @since Build 0.1
  12. * @version Build 0.7
  13. * @filesource
  14. */
  15. /**
  16. * Include the constants file and all of the files in the include list
  17. */
  18. if(ltrim(dirname($_SERVER['SCRIPT_FILENAME'])) == "" || !file_exists($_SERVER['DOCUMENT_ROOT']."/constants.php")) {
  19. if(!file_exists("../constants.php")) { require_once("../public_html/constants.php"); }
  20. else { require_once("../constants.php"); }
  21. }
  22. else { require_once($_SERVER['DOCUMENT_ROOT']."/constants.php"); }
  23. foreach($INCLUDE_LIST as $includefile) { require_once $includefile; }
  24. require_once ($SERVER_DIRECTORY.$INCLUDE_PATH.$LOCATION_INCLUDE);
  25.  
  26. $loc_inc = new Location();
  27. $db = new Database();
  28. $db_location = $db->GetClass('location');
  29. $smarty = UtilSmarty::createSmarty();
  30. $id="";
  31.  
  32. if(getenv("QUERY_STRING")) {
  33. if(isset($HTTP_GET_VARS['id'])) {$id = $HTTP_GET_VARS['id'];}
  34. $item = $db_location->GetLocationData($id);
  35. $pagesubtitle = $item->Name;
  36. }
  37. else { $pagesubtitle = $S_OFFICE; }
  38. require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
  39. "?pagetitle=".str_replace(" ","%20",htmlentities($S_LOCATION)).
  40. "&pagesubtitle=".str_replace(" ","%20",htmlentities(stripslashes($pagesubtitle))).
  41. "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_LOCATION));
  42. $smarty->assign('sidesections',array($loc_inc->locHeader()));
  43. if(getenv("QUERY_STRING")) {
  44. if(isset($HTTP_GET_VARS['id'])) {$id = $HTTP_GET_VARS['id'];}
  45. $smarty->assign('printtable',$loc_inc->LocationData($id));
  46. }
  47. else {
  48. $smarty = $loc_inc->AllLocationData($smarty);
  49. }
  50. UtilSmarty::displaySectionPage($smarty);
  51. ?>
  52. <?php require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER; ?>

Documentation generated on Mon, 10 May 2004 12:10:31 -0700 by phpDocumentor 1.3.0RC3