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

Source for file index.php

Documentation is available at index.php

  1. <?php
  2. /**
  3. * <b>Contact Section</b><br />
  4. * The contact section lists the main contacts and details of each contact.
  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.$CONTACT_INCLUDE);
  25.  
  26. $smarty = UtilSmarty::createSmarty();
  27. $con_inc = new Contact();
  28. $db = new Database();
  29. $db_contact = $db->GetClass('contact');
  30. $id="";
  31.  
  32. if(getenv("QUERY_STRING")) {
  33. if(isset($HTTP_GET_VARS['id'])) {$id = $HTTP_GET_VARS['id'];}
  34. $item = $db_contact->GetContactData($id);
  35. $pagesubtitle = $con_inc->conFormatName($item);
  36. }
  37. else { $pagesubtitle = $S_OFFICE; }
  38. require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
  39. "?pagetitle=".str_replace(" ","%20",htmlentities($S_CONTACT)).
  40. "&pagesubtitle=".str_replace(" ","%20",htmlentities(stripslashes($pagesubtitle))).
  41. "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_CONTACT));
  42.  
  43. $smarty->assign('sidesections',array($con_inc->conHeader("con")));
  44. $smarty->assign('textsections',array(array('Title'=>$S_CONTACT,
  45. 'Text'=>$CONTACT_INFO)));
  46. if($id != "") { $smarty->assign('printtable',$con_inc->ContactData($id)); }
  47. else {
  48. $smarty->assign('introstatements',array(array('Title'=>$S_CONTACT." ".$CHURCH_NAME,
  49. 'Text'=>$CONTACT_INTRO.$CONTACT_INFO)));
  50. }
  51. UtilSmarty::displaySectionPage($smarty);
  52. ?>
  53. <?php require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER; ?>

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