getDaysInMonth($month,$year))?(($month == 12)?1:$month+1):$month; $prev_month = (($day - $day_offset - 7) < 0)?(($month == 1)?12:$month-1):$month; $next_year = ($month != $next_month && $next_month == 1)?$year+1:$year; $prev_year = ($month != $prev_month && $prev_month == 12)?$year-1:$year; $next_week_day = ($day + (7 - $day_offset) > getDaysInMonth($month,$year))? $next_year.'-'.$next_month.'-'.($day + (7 - $day_offset)-getDaysInMonth($month,$year)): $year.'-'.$next_month.'-'.($day+(7 - $day_offset)); // Same exact thing as the line above except just getting the day part. $next_day = ($day + (7 - $day_offset) > getDaysInMonth($month,$year))? ($day + (7 - $day_offset)-getDaysInMonth($month,$year)): ($day+(7 - $day_offset)); $prev_day = (($day - $day_offset - 7) < 0)? (getDaysInMonth($prev_month, $prev_year) + ($day - $day_offset - 7)): ($day - $day_offset - 7); $arDays = array(); $arDays[$day_offset] = $year.'-'.$month.'-'.$day; // Calculate all the days after the selected date's position in the week for ($i = $day_offset+1; $i < 7; $i++) { $arDays[$i] = ($day + ($i - $day_offset) > getDaysInMonth($month,$year))? $next_year.'-'.$next_month.'-'.(getDaysInMonth($month,$year)-($day + ($i - $day_offset))): $year.'-'.$month.'-'.($day + ($i - $day_offset)); } // Calculate all the days previous to the selected date's position in the week // (This part only applies if they come from a daily calendar to a weekly calendar. for ($i = 0; $i < $day_offset; $i++) { $arDays[$i] = (($day - ($day_offset - $i)) < 1)? $prev_year.'-'.$prev_month.'-'.(getDaysInMonth($prev_month, $prev_year)-($day_offset - $i)+1): $year.'-'.$month.'-'.($day-($day_offset-$i)); } // Occurrences within calendar month code: $arProjectFilters['ixaffiliatemarketingcategory'] = $HTTP_POST_VARS['filter_attributes']; $arProjectFilters['iximpactarea'] = $HTTP_POST_VARS['filter_impactArea']; $arProjectFilters['sregion'] = $HTTP_POST_VARS['filter_region']; $objOccurrence = new Occurrence( array() ); $objOccurrenceFactory = new OccurrenceFactory(); // We need to retrieve all occurrences this week. So we specify the max // range to be the first second of the first day of the next week. $arDateRange = array($arDays[0],$next_week_day); list ($arOccurrence, $iNumOngoingReferrals) = $objOccurrenceFactory->searchByProjectFilters( $arProjectFilters, $arDateRange, false, true ); $objOccurrenceView = new OccurrenceView( $objOccurrence ); $sTypeName = (checkFlag('course') ? 'course' : 'project'); $sFlipFlags = (checkFlag('course') ? '_clearFlag=course' : '_setFlag=course'); $sErrorMsg = ''; if ($arProjectFilters) { while (list($key,$val) = each($arProjectFilters)) { if ($val != '') { $sErrorMsg = 'There are no '.$sTypeName.' sessions scheduled for this week given the selected filters. Please choose another '.$sTypeName.' attribute or impact area.'; } } } $objSlug = SlugManagerFactory::get('Ongoing Referrals Button Area'); if(is_object($objSlug)) { $sReferralButtonText = $objSlug->printSlug(); } ?>
Daily Calendar           Weekly Calendar           Monthly Calendar
Our calendar displays s by month, week, and day. Select a viewing method and then click the name to learn more about it.
Previous Week Next Week
showWeeklyOccurrence( $arOccurrence, $arDays, $sErrorMsg ); ?>
Week of

Previous Week Next Week
showCorporateEventsCalendarKey(); ?>
View <?= (strtolower($sTypeName) == 'course' ? 'Project' : 'Course') ?> Calendar

Show Me printSlug(); ?>

12) return 0; $days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); $d = $days_in_month[$month - 1]; if ($month == 2) if ($year%4 == 0) if ($year%100 == 0) { if ($year%400 == 0) $d = 29; } else { $d = 29; } return $d; } ?>