global $HTTP_POST_VARS, $HTTP_GET_VARS, $PUBLIC_IMAGE_PATH, $INCLUDE_PATH, $PUBLIC_WEB_ROOT; global $objCurrUser; require_once("$INCLUDE_PATH/views/public/OccurrenceView.php"); $color1 = "E7E7E7"; $color2 = "6DB478"; $color3 = "B4B4B4"; $color4 = "FFFFFF"; $color5 = "C3C3C3"; $color6 = "6A6A6A"; $color6 = "000000"; $color7 = "CECECE"; // set project filters $arProjectFilters['ixaffiliatemarketingcategory'] = $HTTP_POST_VARS['filter_attributes']; $arProjectFilters['iximpactarea'] = $HTTP_POST_VARS['filter_impactArea']; $arProjectFilters['sregion'] = $HTTP_POST_VARS['filter_region']; $sTypeName = (checkFlag('course') ? 'course' : 'project'); $sFlipFlags = (checkFlag('course') ? '_clearFlag=course' : '_setFlag=course'); // do we need one or two months of calendar data? $year = $HTTP_POST_VARS['year']; $month = $HTTP_POST_VARS['month']; $parseDate = getdate(); $year = ($year == '' || $year == '0')?$parseDate['year']:$year; $month = ($month == '' || $month == '0')?$parseDate['mon']:$month; if($year == $parseDate['year'] && $month == $parseDate['mon'] && ((getDaysInMonth($month,$year) - $parseDate['mday']) <= 7)) { // display two months $next_month = ($month == 12)?1:$month+1; $next_year = ($next_month == 1)?$year+1:$year; $end_month = ($next_month == 12)?1:$next_month+1; $end_year = ($end_month == 1)?$next_year+1:$next_year; } else { $end_month = ($month == 12)?1:$month+1; $end_year = ($end_month == 1)?$year+1:$year; } // Get the customization/look and feel for the calendar display $arLookAndFeel = cGetCustomizationInfo(); ////////////////// // Generate image paths for the full and not-full icons // depending on whether the affiliate has an override image/icon // in their flatcontent floder. $sIsFullImagePath = false; $sIsNotFullImagePath = false; // Use the generated href's to switch later, based on the // affiliate's choice of using the icons or not. if ($arLookAndFeel['busestyleiconfull'] == 'Y') { global $PUBLIC_WEB_ROOT, $CONFIG_FLATCONTENT_BASE_PATH, $BASE_PATH; DEBUG($CONFIG_FLATCONTENT_BASE_PATH, "CONFIG_FLATCONTENT_BASE_PATH"); DEBUG($BASE_PATH, "BASE_PATH"); $FLAT_PATH = $BASE_PATH . "static/citycares_flatcontent/" . AFFILIATE() . "/"; $FULL_ICON_FILENAME = "fullicon.PNG"; $sFullPath = $FLAT_PATH . $FULL_ICON_FILENAME; $NOTFULL_ICON_FILENAME = "notfullicon.PNG"; $sNotFullPath = $FLAT_PATH . $NOTFULL_ICON_FILENAME; DEBUG($FLAT_PATH, "FLAT_PATH"); DEBUG($sFullPath, "sFullPath"); DEBUG($sNotFullPath, "sNotFullPath"); // checks out okay! $sIsFullImageHref = (file_exists($sFullPath)) ? $PUBLIC_WEB_ROOT . "AboutUs/download.php/" : $PUBLIC_IMAGE_PATH; $sIsFullImageHref .= $FULL_ICON_FILENAME; $sIsNotFullImageHref = (file_exists($sNotFullPath)) ? $PUBLIC_WEB_ROOT . "AboutUs/download.php/" : $PUBLIC_IMAGE_PATH; $sIsNotFullImageHref .= $NOTFULL_ICON_FILENAME; DEBUG($sIsFullImageHref, "sIsFullImageHref"); DEBUG($sIsNotFullImageHref, "sIsNotFullImageHref"); // checks out okay ERROR_DEBUG($sIsFullImageHref, 'KALIN in attop: $sIsFullImageHref'); ERROR_DEBUG($sIsNotFullImageHref, 'KALIN in atttop: $sIsNotFullImageHref'); } $arFilters = array('filter_corporateProjects','filter_impactArea','filter_attributes','filter_region','_setFlag','_clearFlag'); $arExtraParameters = array(); // Put the full/notfull image href's into extra params so they get to the monthly-view function $arExtraParameters["sIsNotFullImageHref"] = $sIsNotFullImageHref; $arExtraParameters["sIsFullImageHref"] = $sIsFullImageHref; foreach($arFilters as $sFilter) { if($HTTP_POST_VARS[$sFilter]) $arExtraParameters[] = $sFilter . '=' . $HTTP_POST_VARS[$sFilter]; } $weekLink = getenv('SCRIPT_NAME').'?_mode=calendar&_type=week&_action=calendar&year='.$year.'&month='.$month.'&day='.$day.'&'.implode('&',$arExtraParameters); $dayLink = getenv('SCRIPT_NAME').'?_mode=calendar&_type=day&_action=calendar&year='.$year.'&month='.$month.'&day='.$day.'&'.implode('&',$arExtraParameters); $objOccurrenceFactory = new OccurrenceFactory(); $arDateRange = array($year.'-'.$month.'-01',$end_year.'-'.$end_month.'-01'); list($arOccurrence, $iNumOngoingReferrals) = $objOccurrenceFactory->searchByProjectFilters( $arProjectFilters, $arDateRange, false, true ); $objOccurrence = new Occurrence( array() ); $objOccurrenceView = new OccurrenceView( $objOccurrence ); $objSlug = SlugManagerFactory::get('Ongoing Referrals Button Area'); if(is_object($objSlug)) { $sReferralButtonText = $objSlug->printSlug(); } ?>