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

Source for file eventdesc.php

Documentation is available at eventdesc.php

  1. <?php
  2. /**
  3. * <b>Event Description : Calendar</b><br />
  4. * The event description page lists all of the details associated with a calendar event.
  5. * This section is searchable.
  6. * @author Kristen O'Brien <kristen_paristemi-com>
  7. * @copyright Copyright 2004, Kristen O'Brien
  8. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  9. * @link http://www.paristemi.com Paristemi Main Site
  10. * @package paristemi
  11. * @subpackage paristemi_business_logic
  12. * @since Build 0.1
  13. * @version Build 0.7
  14. * @filesource
  15. */
  16. /**
  17. * Include the constants file and all of the files in the include list
  18. */
  19. if(ltrim(dirname($_SERVER['SCRIPT_FILENAME'])) == "" || !file_exists($_SERVER['DOCUMENT_ROOT']."/constants.php")) {
  20. if(!file_exists("../constants.php")) { require_once("../public_html/constants.php"); }
  21. else { require_once("../constants.php"); }
  22. }
  23. else { require_once($_SERVER['DOCUMENT_ROOT']."/constants.php"); }
  24. foreach($INCLUDE_LIST as $includefile) { require_once $includefile; }
  25. require_once ($SERVER_DIRECTORY.$INCLUDE_PATH.$CALENDAR_INCLUDE);
  26.  
  27. $smarty = UtilSmarty::createSmarty();
  28. $cal = new Calendar;
  29. $db = new Database();
  30. $db_cal = $db->GetClass('cal');
  31.  
  32. $pagesubtitle="";$id="";$form="";
  33. if(getenv("QUERY_STRING")) {
  34. if(isset($HTTP_GET_VARS['id'])) {$id = $HTTP_GET_VARS['id'];}
  35. if(isset($HTTP_GET_VARS['form'])) {$form = $HTTP_GET_VARS['form'];}
  36. $item =& $db_cal->GetCalItemData($id);
  37. $printdate = "";
  38. if($item->Recursive) {
  39. $recstamp = $cal->nextEventFromRecursive($item);
  40. if($recstamp != 0) {
  41. $recdate = getdate($recstamp);
  42. $printdate = $recdate['month']." ".$recdate['mday'].", ".$recdate['year'];
  43. }
  44. }
  45. else if($item->Start['year'] == $item->Stop['year'] &&
  46. $item->Start['mon'] == $item->Stop['mon'] &&
  47. $item->Start['mday'] == $item->Stop['mday']) {
  48. $printdate .= $item->Start['month']." ".$item->Start['mday'].
  49. ", ".$item->Start['year'];
  50. }
  51. else {
  52. $printdate .= $item->Start['month']." ".$item->Start['mday'].
  53. ", ".$item->Start['year']." - ";
  54. $printdate .= $item->Stop['month']." ".$item->Stop['mday'].
  55. ", ".$item->Stop['year'];
  56. }
  57. $pagetitle = stripslashes($item->Title);
  58. $pagesubtitle = "";
  59. if($item->SShow){ if($item->Title != $item->STitle) { $pagesubtitle .= $item->STitle; } }
  60. else if($item->Type == $S_BIBLE_COLLEGE) { $pagesubtitle .= $S_BIBLE_COLLEGE; }
  61. $pagesubtitle .= " - ".$printdate;
  62. }
  63.  
  64. if(getenv("QUERY_STRING") || count($HTTP_POST_VARS) > 0) {
  65. if(!isset($HTTP_GET_VARS['include'])) {
  66. require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
  67. "?pagetitle=".str_replace(" ","%20",htmlentities(stripslashes($pagetitle))).
  68. "&pagesubtitle=".str_replace(" ","%20",htmlentities(stripslashes($pagesubtitle))).
  69. "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_CAL));
  70. $sidecal = $cal->calHeader();
  71. $smarty->assign('sidesections',array($sidecal['callinks']));
  72. $smarty->assign('icondescriptions',$sidecal['calicons']);
  73. $smarty = $cal->calSearchForm($smarty);
  74. }
  75. }
  76. if(getenv("QUERY_STRING")) {
  77. if($form == "yes") {
  78. $smarty->assign('heading',$S_FORM_LOC_CONT_INFO);
  79. $smarty->assign('formname','contactform');
  80. $smarty->assign('formaction',$SEND_INFO_CAL_FILE);
  81. $smarty->assign('hiddeninputs',array(array('name'=>'ID','value'=>$id)));
  82. $smarty->assign('textinputs',array(array('heading'=>$S_FORM_FIRST_NAME,'name'=>'FirstName','size'=>'35'),
  83. array('heading'=>$S_FORM_LAST_NAME,'name'=>'LastName','size'=>'35'),
  84. array('heading'=>$S_FORM_EMAIL,'name'=>'FromEmail','size'=>'35'),
  85. array('heading'=>$S_FORM_PHONE,'name'=>'PhoneNumber','size'=>'35')));
  86. $smarty->assign('formnote',$S_FORM_WAIT_NOTE);
  87. $smarty->assign('resetname',$S_FORM_RESET);
  88. $smarty->assign('submitname',$S_FORM_SUBMIT);
  89. }
  90. else { $smarty->assign('printtable',$cal->eventTable($item)); }
  91. }
  92. else { $smarty->assign('notice',$N_EVENT_NONE); }
  93. UtilSmarty::displaySectionPage($smarty);
  94.  
  95. if(getenv("QUERY_STRING") || count($HTTP_POST_VARS) > 0) {
  96. if(!isset($HTTP_GET_VARS['include'])) {
  97. require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER;
  98. }
  99. } ?>

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