= '$start_date' "; if (isset($selected_month)) { if ($selected_month == 'all') { $current_month = getLanguageText('TEXT-ALL-EVENTS'); $date_where = "and end_date >= '$start_date' "; } else { $current_month = date("F Y",strtotime($selected_month)); $start_date = date("Y-m-01",strtotime($selected_month)); $start_time = strtotime($start_date); $end_date = date("Y-m-",$start_time) . date("t",$start_time); $date_where = "and start_date <= '$end_date' and end_date >= '$start_date' "; } } $next_month = date("Y-m-01",strtotime(date("Y-m-15",$start_time)) + 60 * 60 * 24 * 20); $prev_month = date("Y-m-01",strtotime(date("Y-m-01",$start_time)) - 100); $next_month_name = date("F Y",strtotime($next_month)); $prev_month_name = date("F Y",strtotime($prev_month)); $templatePageTitle = $school_record['school_name'] . " " . getLanguageText('TEXT-EVENT-TITLE') . "
" . "<<<  " . $current_month . "  >>>"; // Get events for this school and month $query = "select * from event_calendar " . "where school_num = $school_num " . "and status = 'Approved' " . "and display = 'Active' " . $date_where . "order by start_date,end_date,title"; $events = db_query($query); $count = 0; if (db_num_rows($events) > 0) { while ($row = db_fetch_array($events)) { extract($row); $bgclass = "data-odd"; if (($count % 2) == 0) $bgclass = "data-even"; $count++; if ($posted_by == $_SESSION['UserInfo']['record_num']) $userid = "$userid"; $text = ""; if (strlen($date_and_time) > 0) $text .= "Date :: $date_and_time
\n"; if (strlen($location) > 0) $text .= "Location :: $location
\n"; if (strlen($description) > 0) $text .= "
\n" . nl2br($description); $hclass = 'heading'; ?>

There are no events in the calendar for the selected month
 
<<   View All Events   >>   Post an Event