ECE » Calendar"; include('header.php'); ?>
 
Prev

Next
 \n"; } /* * --------------------------------------------------------------------------- * For each of the days in the month. * --------------------------------------------------------------------------- */ for ($i = 1; $i <= $days; $i++) { /* * ------------------------------------------------------------------------- * Check to see if the day is a Sunday. * ------------------------------------------------------------------------- */ if (($dow % 7 == 0) && ($dow != 0)) { printf(" \n \n"); } echo " \n"; $dow++; } /* * --------------------------------------------------------------------------- * Fill the remaining squares with nothing. * --------------------------------------------------------------------------- */ for (; $dow % 7 != 0; $dow++) { echo " \n"; } mysql_close($db); ?>
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
"; /* * ------------------------------------------------------------------------- * Add any holiday information * ------------------------------------------------------------------------- */ $sdinfo = ""; if (($month == 1) && ($i == 1)) { $sdinfo = "New Years Day"; } if (($month == $GFmonth) && ($i == $GFday)) { $sdinfo = "Good Friday"; } if (($month == $EDmonth) && ($i == $EDday)) { $sdinfo = "Easter"; } if (($month == $EMmonth) && ($i == $EMday)) { $sdinfo = "Easter Monday"; } if (($month == 5) && ($i > 17) && ($i < 25) && ($dow % 7 == 1)) { $sdinfo = "Victoria Day"; } if (($month == 7) && ($i == 1)) { $sdinfo = "Canada Day"; } if (($month == 8) && ($i > 0) && ($i < 8) && ($dow % 7 == 1)) { $sdinfo = "British Columbia Day"; } if (($month == 9) && ($i > 0) && ($i < 8) && ($dow % 7 == 1)) { $sdinfo = "Labour Day"; } if (($month == 10) && ($i > 7) && ($i < 15) && ($dow % 7 == 1)) { $sdinfo = "Thanksgiving Day"; } if (($month == 11) && ($i == 11)) { $sdinfo = "Remembrance Day"; } if (($month == 12) && ($i == 25)) { $sdinfo = "Christmas Day"; } if (($month == 12) && ($i == 26)) { $sdinfo = "Boxing Day"; } if (!empty($sdinfo)) { echo ""; } /* * ------------------------------------------------------------------------- * Add any events that we find in the events table. * ------------------------------------------------------------------------- */ $result = mysql_query("SELECT * FROM events WHERE edate = '$year-$month-$i';", $db); if ($myrow = mysql_fetch_array($result)) { do { echo ""; } while ($myrow = mysql_fetch_array($result)); } mysql_free_result($result); /* * ------------------------------------------------------------------------- * If there is a seminar on the day, add a note that there is. * ------------------------------------------------------------------------- */ $result = mysql_query("SELECT t1.id, t2.type, t2.class FROM seminars AS t1, semtypes AS t2 WHERE t1.typeid = t2.tid AND t1.sdate = '$year-$month-$i' ORDER BY t1.stime;", $db); if ($myrow = mysql_fetch_array($result)) { do { echo ""; } while ($myrow = mysql_fetch_array($result)); } mysql_free_result($result); /* * ------------------------------------------------------------------------- * End off the table entry. * ------------------------------------------------------------------------- */ echo "
$i
\"^\"$sdinfo
\"*\""; if (!empty($myrow['link'])) { echo ""; } echo $myrow['label']; if (!empty($myrow['link'])) { echo ""; } echo "
\"!\""; if ($myrow['class'] == 'Student') echo "$myrow[type]"; else echo "$myrow[type]"; echo "
"; echo "