get($options); if($result->count() > 0) { $event_cat = $result->fetch(); $qs_filter .= (($qs_filter != "") ? "&" : "") . "c=" . $event_cat->event_cat_id; } // end if } // end if if((isset($_GET["p"])) && (preg_match("/^[01]$/", $_GET["p"]))) { $event_occ_past = $_GET["p"]; } else { $event_occ_past = 0; } // end if $qs_filter .= (($qs_filter != "") ? "&" : "") . "p=" . $event_occ_past; $cur_month = mktime(0, 0, 0, $month, 1, $year); $options = array(); $options["table"] = "event"; $options["fields"] = array("event_cat.event_cat_id", "event_occ_date"); $options["subtables"] = array("event_occ|event.event_id=event_occ.event_id", "event_cat|event_cat.event_cat_id=event.event_cat_id"); $options["filter"] = array("MONTH(event_occ_date)=" . (int) $month, "YEAR(event_occ_date)=" . $year, "event_active=1"); if(isset($event_cat)) { $options["filter"][] = "event_cat.event_cat_id='$event_cat->event_cat_id'"; } // end if $result = $db->get($options); $events = array(); while($row = $result->fetch()) { $events[strtotime($row->event_occ_date)][] = $row; } // end while $options = array(); $options["table"] = "event_cat"; $options["fields"] = array("event_cat_id", "event_cat_name"); $options["sort"] = "event_cat_name"; $result = $db->get($options); $event_cat_names = array(); while($row = $result->fetch()) { $event_cat_names[$row->event_cat_id] = $row->event_cat_name; } // end while $month_prev = mktime(0, 0, 0, date("m", $cur_month) - 1, 1, date("Y", $cur_month)); $month_next = mktime(0, 0, 0, date("m", $cur_month) + 1, 1, date("Y", $cur_month)); ?>
Event Calendar
?m=&y=">« ?m=&y="> ?m=&y=">»
Su M Tu W Th F Sa
 
?m=&y=&d=">  
">
Filter Events by Category
"> =DAY(NOW())"; } // end if } // end if if(isset($event_cat)) { $options["filter"][] = "event_cat.event_cat_id='$event_cat->event_cat_id'"; } // end if $options["sort"] = array("event_occ_date", "event_occ_start", "event_occ_end"); $result = $db->get($options); if($result->count() > 0) { $bgcolors = array("#FFF", "#ECECEC"); $event_occ_count = 0; while($row = $result->fetch()) { $event_desc = isset($row->event_occ_desc_short) ? $row->event_occ_desc_short : $row->event_desc_short; $event_occ_count++; if($event_occ_count == 1 || $temp_date != $row->event_occ_date) { ?> event_occ_date; ?>
Events for
event_occ_date)) ?>
event_occ_start != "") { ?> event_occ_start)) ?> event_occ_end != "") { ?> - event_occ_end)) ?> N/A event_cat_id] ?>
">event_title ?> -
No Matching Events