"; $lm = $month - 1; $ly = $year - 1; if ($month == '01') { echo "\"previous\""; } elseif ($month > 1 AND $month < 11) { echo "\"previous\""; } else { echo "\"previous\""; } echo "   "; $tDate = mktime(0,0,0,$month,1,$year); echo "\n"; echo date('F', $tDate) . " - $year\n"; echo "\n"; echo "   "; $nm = $month + 1; $ny = $year + 1; if ($month == '12') { echo "\"next\""; } elseif ($month >= 1 AND $month <= 8) { echo "\"next\""; } else { echo "\"next\""; } echo "

\n"; echo "\n\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n\n"; /* Start the table data and make sure the number of days does not exceed the total for the month - $date will always be one more than the total number of days in the momth */ echo ""; while ($day<$date): /* Figure what day of the week the first falls on and set the number of preceding and trailing cells accordingly */ if ($day == '01') { $off = date('w',mktime(0,0,0,$month,$day,$year)); for ($i=0; $i<$off; $i++) echo "\n"; $off++; } if ($ver >= 4 ) { echo "\n"; } else { echo "\n"; } /* Increment the day and the cells to go before the end of the row and end the row when appropriate */ $day++; $off++; if ($off>7) { echo "\n\n"; $off='01'; } else { echo ""; } endwhile; echo "\n
SundayMondayTuesdayWednesdayThursdayFridaySaturday
$day
\n"; $sql = "SELECT Event,Event_ID from SkihouseContents WHERE Month='$month' AND Day='$day' and Year='$year' ORDER BY Start_Period,Start_Time"; $database->setQuery($sql); $row = $database->loadObjectList(); for($i = 0;$iEvent; $EID = $row[$i]->Event_ID; echo "
  • \n$Ev
    \n"; $Ev=""; $EID=""; } echo "
  • \n$day
    \n"; $sql = "SELECT Event,Event_ID from SkihouseContents WHERE Month='$month' AND Day='$day' and Year='$year' ORDER BY Start_Period,Start_Time"; $database->setQuery($sql); $row = $database->loadObjectList(); for($i = 0;$iEvent; $EID = $row[$i]->Event_ID; echo "
  • \n$Ev\n
    \n"; $Ev=""; $EID=""; } echo "
  • \n
    "; echo "
    "; $lm = $month - 1; $ly = $year - 1; if ($month == '01') { echo "\"previous\"   Previous Month        "; } elseif ($month > 1 AND $month < 11) { echo "\"previous\"   Previous Month        "; } else { echo "\"previous\"   Previous Month        "; } echo "   "; $nm = $month + 1; $ny = $year + 1; if ($month == '12') { echo "Next Month   \"next\""; } elseif ($month >= 1 AND $month <= 8) { echo "Next Month   \"next\""; } else { echo "Next Month   \"next\""; } echo "   "; $NumMonth =date("m"); $NameMonth=date("F"); $NumYear =date("Y"); echo "
    \n"; echo "\n"; echo "   \n"; echo "\n"; echo "   "; echo "\n"; echo "
    \n"; commonFooter(); $database->close(); ?>