'; echo ''; echo '<  '; echo date('l F d, Y', $timestamp); echo '  >'; echo ''; // output cells for ($i = DAY_HR_START; $i <= DAY_HR_END; $i++) { for ($j = 0; $j < 60; $j += 15) { echo ''; if ($i < 12) { printf('%d:%02d %s', $i, $j, 'AM'); } else if ($i > 12) { printf('%d:%02d %s', $i - 12, $j, 'PM'); } else { printf('%d:%02d %s', $i, $j, 'PM'); } echo ''; $query = sprintf('SELECT EVENT_NAME FROM %sCALENDAR WHERE ' . 'EVENT_TSTAMP = "%04d-%02d-%02d %02d:%02d:00"', DB_TBL_PREFIX, $year, $month, $day, $i, $j); $result = mysql_query($query, $GLOBALS['DB']); if (mysql_num_rows($result)) { while ($row = mysql_fetch_assoc($result)) { echo '
' . htmlspecialchars($row['EVENT_NAME']) . '
'; } } else { echo ' '; } mysql_free_result($result); echo ''; echo ''; } } echo ''; // display month calendar echo ''; echo ''; echo '' . ''; $current = 1; while ($current <= $total_days) { echo ''; for ($i = 0; $i < 7; $i++) { if (($current == 1 && $i < $first_day_of_month) || ($current > $total_days)) { echo ''; continue; } echo ''; $current++; } echo ''; } echo '
'; echo '<  '; echo date('F', $timestamp) . ' ' . $year; echo '  >'; echo '
SunMonTueWedThuFriSat
 ' . $current . '
'; // Form to add event ?>

Add Event

:
Notify

Also Scheduled

'; if (mysql_num_rows($result)) { while ($row = mysql_fetch_assoc($result)) { echo '
  • ' . date('h:i A - ', $row['EVENT_TSTAMP']) . htmlspecialchars($row['EVENT_NAME']) . '
  • '; } } else { echo '

    No other events scheduled

    '; } mysql_free_result($result); echo ''; // link to download iCal file echo '

    Export as iCalendar file

    '; $GLOBALS['TEMPLATE']['content'] = ob_get_clean(); $GLOBALS['TEMPLATE']['extra_head'] = ''; include '../templates/template-page.php'; ?>