"; require $_SERVER['DOCUMENT_ROOT'].'/format/header.html'; print " RGS: School Calandar "; require $_SERVER['DOCUMENT_ROOT'].'/format/userBar.html'; require $_SERVER['DOCUMENT_ROOT'].'/format/layout.html'; /*---End Page Formatting---------------------*/ /*---Begin Required PHP Scripts--------------*/ require $_SERVER['DOCUMENT_ROOT'].'/phpScripts/connect.php'; require $_SERVER['DOCUMENT_ROOT'].'/phpScripts/dateParser.php'; /*---End Required PHP Scripts----------------*/ /*---Begin Page Content----------------------*/ print "

Academic Calendar

"; $termQuery = "SELECT * FROM `term` WHERE `active` =1"; $termResult = mysql_query($termQuery) or die("HELLO!!"); $i=0; while(($term = mysql_fetch_row($termResult)) != NULL) { print ""; $eventQuery = "SELECT * FROM `calendar` WHERE `term` =$term[0] AND `active` =1"; $eventResult = mysql_query($eventQuery) or die("ERROR001: Could not Qeury DB but !!$term[0]!!"); while(($event = mysql_fetch_row($eventResult)) != NULL) { $i=$i+1; if($i ==2) $i=0; $time = explode('-', $event[1]); $abstime = date("F j, Y (l)", mktime(0, 0, 0, $time[1], $time[2], $time[0], 0)); print ""; } } print "
$term[1] $term[2]
$event[2]$abstime
"; /*---End Page Content------------------------*/ /*---Begin Closing Format--------------------*/ include $_SERVER['DOCUMENT_ROOT'].'/format/close.html'; /*---End Closing Format----------------------*/ ?>