From 11ee95dadc408e16e9832af9fd0b41495e78b0a6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 19 Oct 2000 13:31:23 +0000 Subject: A big, fat commit with a shitload of internal changes. Not that much visual changes: - removed redundant files user.class.php, calendar.class.php and backend.class.php. - converted *all* mysql queries to queries supported by the database abstraction layer. - expanded the watchdog to record more information on what actually happened. - bugfix: anonymous readers where not able to view comments. - bugfix: anonymous readers could gain read-only access to the submission queue. - bugfix: invalid includes in backend.php - bugfix: invalid use of '$user->block' and last but not least: - redid 50% of the user account system --- includes/calendar.class.php | 76 --------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 includes/calendar.class.php (limited to 'includes/calendar.class.php') diff --git a/includes/calendar.class.php b/includes/calendar.class.php deleted file mode 100644 index 561363c33..000000000 --- a/includes/calendar.class.php +++ /dev/null @@ -1,76 +0,0 @@ -date = $date; - } - - function display() { - global $PHP_SELF; - - ### Extract information from the given date: - $month = date("n", $this->date); - $year = date("Y", $this->date); - $day = date("d", $this->date); - - ### Extract first day of the month: - $first = date("w", mktime(0, 0, 0, $month, 1, $year)); - - ### Extract last day of the month: - $last = date("t", mktime(0, 0, 0, $month, 1, $year)); - - ### Calculate previous and next months dates: - $prev = mktime(0, 0, 0, $month - 1, $day, $year); - $next = mktime(0, 0, 0, $month + 1, $day, $year); - - ### Generate calendar header: - $output .= "\n\n"; - $output .= "\n"; - $output .= " \n"; - $output .= " \n"; - - ### Initialize temporary variables: - $nday = 1; - $sday = $first; - - ### Loop through all the days of the month: - while ($nday <= $last) { - ### Set up blank days for first week of the month: - if ($first) { - $output .= " \n"; - $first = 0; - } - - ### Start every week on a new line: - if ($sday == 0) $output .= " \n"; - - ### Print one cell: - $date = mktime(24, 0, 0, $month, $nday, $year); - if ($nday == $day) $output .= " \n"; - else if ($date > time()) $output .= " \n"; - else $output .= " \n"; - - ### Start every week on a new line: - if ($sday == 6) $output .= " \n"; - - ### Update temporary variables: - $sday++; - $sday = $sday % 7; - $nday++; - } - - ### Complete the calendar: - if ($sday) { - $end = 7 - $sday; - $output .= " \n \n"; - } - $output .= "
<   ". date("F Y", $this->date) ."   >
SMTWTFS
 
$nday$nday$nday
 
\n\n"; - - ### Return calendar: - return $output; - } -} - -?> -- cgit v1.2.3