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

Source for file moncal.php

Documentation is available at moncal.php

  1. <?php
  2. /**
  3. * <b>Month Calendar : Calendar</b><br />
  4. * The lists all of the icons associated with events for the specified month.
  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. if(getenv("QUERY_STRING")) {
  27. if(isset($HTTP_GET_VARS['mon'])) {$month = $HTTP_GET_VARS['mon'];}
  28. if(isset($HTTP_GET_VARS['year'])) {$year = $HTTP_GET_VARS['year'];}
  29. $monthasc = getdate(mktime(0, 0, 0, $month, 1, $year));
  30. $month_name = $monthasc['month'];
  31. }
  32. else {
  33. $today = getdate(time());
  34. $month = $today['mon'];
  35. $month_name = $today['month'];
  36. $year = $today['year'];
  37. }
  38. $pagesubtitle = $month_name." ".$year;
  39. require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
  40. "?pagetitle=".str_replace(" ","%20",htmlentities($S_MONTH)." ".htmlentities($S_CALENDAR)).
  41. "&pagesubtitle=".str_replace(" ","%20",htmlentities($pagesubtitle)).
  42. "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_CAL));
  43. $smarty = UtilSmarty::createSmarty();
  44. $cal = new Calendar;
  45. $sidecal = $cal->calHeader();
  46. $smarty->assign('sidesections',array($sidecal['callinks']));
  47. $smarty->assign('icondescriptions',$sidecal['calicons']);
  48. $smarty = $cal->calSearchForm($smarty);
  49. $monfile = $HTTP_DOCUMENT_ROOT.$CALENDAR_PATH.$MONTH_CAL_FILE;
  50. $dayfile = $HTTP_DOCUMENT_ROOT.$CALENDAR_PATH.$DAY_CAL_FILE;
  51. $itemfile = $HTTP_DOCUMENT_ROOT.$CALENDAR_PATH.$ITEM_CAL_FILE;
  52. $smarty->assign('printtable',
  53. $cal->printcal($year, $month, $monfile, $itemfile, $dayfile, true));
  54. UtilSmarty::displaySectionPage($smarty);
  55. ?>
  56. <?php require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER; ?>

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