EVENTS CALENDAR
0) { echo "Events for ".(stripslashes($monthName))." ".(stripslashes($day)).", ".(stripslashes($year))."
"; echo "There is more than one event for the date you selected. Click on an event title for more detailed information!
"; echo "- ";
while (list($eventID,$eventDay,$eventDate,$eventTime,$title) = mysql_fetch_row($eventResult)) {
echo "
- ".(stripslashes($monthName))." ".(stripslashes($eventDay)).", ".(stripslashes($eventTime))." ".(stripslashes($title))."
";
}
echo "
There are no events scheduled for the date you provided.
"; echo "The current calendar is $currentMonthName $currentYear."; include("error_footer.inc"); return false; } } //If either the first or the last elseif statement is true and a month/year combo or nothing //was passed in the URL then the following is executed. This will print out all the //events for a particular month. Each of the titles will be hotlinks to the eventsdetail.php //script. If nothing was passed in the URL then the current month calendar will be used. else { echo "
Check out what's going on at the University of Colorado Museum of Natural History!
"; echo "All events are free and open to the public unless otherwise noted. If you would like to receive monthly updates about events at the Museum, please subscribe to the CU Museum Update.
"; echo "Indian Peaks Chapter of the Colorado Archaeology Society (IPCAS) meets at 7:00 p.m. in the Paleontology Hall on the second Thursday of every month. Its meetings and membership are open to the public.
"; echo "Events for $monthName $year
"; //Querying the DB for all the events that occur in the particular month. They must //also occur on or after the current date $eventQuery = "SELECT eventID, dayofmonth(eventDate) as eventDay, eventDate, eventTime, title FROM events WHERE month(eventDate) = '$month' and year(eventDate) = '$year' and eventDate>=CURDATE() order by eventDate, eventID asc"; $eventResult = mysql_query($eventQuery); //If there are events for a particular month, then we print out the titles. if (mysql_num_rows($eventResult) > 0) { echo "- ";
while (list($eventID,$eventDay,$eventDate,$eventTime,$title) =
mysql_fetch_row($eventResult)) {
echo "
- ".(stripslashes($monthName))." ".(stripslashes($eventDay)).", ".(stripslashes($eventTime))." ".(stripslashes($title))."
";
}
echo "
There are no events scheduled for this month.
"; } } ?>