- <?php
- /**
- * <b>Month Calendar : Calendar</b><br />
- * The lists all of the icons associated with events for the specified month.
- * This section is searchable.
- * @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.$CALENDAR_INCLUDE);
-
- if(getenv("QUERY_STRING")) {
- if(isset($HTTP_GET_VARS['mon'])) {$month = $HTTP_GET_VARS['mon'];}
- if(isset($HTTP_GET_VARS['year'])) {$year = $HTTP_GET_VARS['year'];}
- $monthasc = getdate(mktime(0, 0, 0, $month, 1, $year));
- $month_name = $monthasc['month'];
- }
- else {
- $today = getdate(time());
- $month = $today['mon'];
- $month_name = $today['month'];
- $year = $today['year'];
- }
- $pagesubtitle = $month_name." ".$year;
- require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
- "?pagetitle=".str_replace(" ","%20",htmlentities($S_MONTH)." ".htmlentities($S_CALENDAR)).
- "&pagesubtitle=".str_replace(" ","%20",htmlentities($pagesubtitle)).
- "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_CAL));
-
- $smarty = UtilSmarty::createSmarty();
- $cal = new Calendar;
- $sidecal = $cal->calHeader();
- $smarty->assign('sidesections',array($sidecal['callinks']));
- $smarty->assign('icondescriptions',$sidecal['calicons']);
- $smarty = $cal->calSearchForm($smarty);
-
- $monfile = $HTTP_DOCUMENT_ROOT.$CALENDAR_PATH.$MONTH_CAL_FILE;
- $dayfile = $HTTP_DOCUMENT_ROOT.$CALENDAR_PATH.$DAY_CAL_FILE;
- $itemfile = $HTTP_DOCUMENT_ROOT.$CALENDAR_PATH.$ITEM_CAL_FILE;
- $smarty->assign('printtable',
- $cal->printcal($year, $month, $monfile, $itemfile, $dayfile, true));
- UtilSmarty::displaySectionPage($smarty);
- ?>
- <?php require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER; ?>