" . translate ( "Error" ) . "\n" . $error; print_trailer (); exit; } $e_save = array (); $re_save = array (); for ( $i = 0; $i < count ( $viewusers ); $i++ ) { /* Pre-Load the repeated events for quckier access */ $repeated_events = read_repeated_events ( $viewusers[$i] ); $re_save = array_merge($re_save, $repeated_events); /* Pre-load the non-repeating events for quicker access */ $events = read_events ( $viewusers[$i], $startdate, $enddate ); $e_save = array_merge($e_save, $events); } $events = array (); $repeated_events = array (); for ( $i = 0; $i < count ( $e_save ); $i++ ) { $should_add = 1; for ( $j = 0; $j < count ( $events ) && $should_add; $j++ ) { if ( $e_save[$i]['cal_id'] == $events[$j]['cal_id'] ) { $should_add = 0; } } if ( $should_add ) { array_push ( $events, $e_save[$i] ); } } for ( $i = 0; $i < count ( $re_save ); $i++ ) { $should_add = 1; for ( $j = 0; $j < count ( $repeated_events ) && $should_add; $j++ ) { if ( $re_save[$i]['cal_id'] == $repeated_events[$j]['cal_id'] ) { $should_add = 0; } } if ( $should_add ) { array_push ( $repeated_events, $re_save[$i] ); } } ?>
'; if ( $WEEK_START == "1" ) $wkstart = get_monday_before ( $prevyear, $prevmonth, 1 ); else $wkstart = get_sunday_before ( $prevyear, $prevmonth, 1 ); $monthstart = mktime ( 3, 0, 0, $prevmonth, 1, $prevyear ); $monthend = mktime ( 3, 0, 0, $prevmonth + 1, 0, $prevyear ); echo "\n"; echo ""; if ( $WEEK_START == 0 ) echo ""; for ( $i = 1; $i < 7; $i++ ) { echo ""; } if ( $WEEK_START == 1 ) echo ""; echo "\n"; for ( $i = $wkstart; date ( "Ymd", $i ) <= date ( "Ymd", $monthend ); $i += ( 24 * 3600 * 7 ) ) { print "\n"; for ( $j = 0; $j < 7; $j++ ) { $date = $i + ( $j * 24 * 3600 ); if ( date ( "Ymd", $date ) >= date ( "Ymd", $monthstart ) && date ( "Ymd", $date ) <= date ( "Ymd", $monthend ) ) { print "\n"; } else { print "\n"; } } print "\n"; } echo "
" . "" . date_to_str ( sprintf ( "%04d%02d01", $prevyear, $prevmonth ), $DATE_FORMAT_MY, false, false ) . "
" . weekday_short_name ( 0 ) . "" . weekday_short_name ( $i ) . "" . weekday_short_name ( 0 ) . "
" . date ( "d", $date ) . "
\n"; } ?> \n"; echo $view_name; ?> '; if ( $WEEK_START == "1" ) $wkstart = get_monday_before ( $nextyear, $nextmonth, 1 ); else $wkstart = get_sunday_before ( $nextyear, $nextmonth, 1 ); $monthstart = mktime ( 3, 0, 0, $nextmonth, 1, $nextyear ); $monthend = mktime ( 3, 0, 0, $nextmonth + 1, 0, $nextyear ); echo "\n"; echo ""; if ( $WEEK_START == 0 ) echo ""; for ( $i = 1; $i < 7; $i++ ) { echo ""; } if ( $WEEK_START == 1 ) echo ""; echo "\n"; for ( $i = $wkstart; date ( "Ymd", $i ) <= date ( "Ymd", $monthend ); $i += ( 24 * 3600 * 7 ) ) { print "\n"; for ( $j = 0; $j < 7; $j++ ) { $date = $i + ( $j * 24 * 3600 ); if ( date ( "Ymd", $date ) >= date ( "Ymd", $monthstart ) && date ( "Ymd", $date ) <= date ( "Ymd", $monthend ) ) { print "\n"; } else { print "\n"; } } print "\n"; } echo "
" . "" . date_to_str ( sprintf ( "%04d%02d01", $nextyear, $nextmonth ), $DATE_FORMAT_MY, false, false ) . "
" . weekday_short_name ( 0 ) . "" . weekday_short_name ( $i ) . "" . weekday_short_name ( 0 ) . "
" . date ( "d", $date ) . "
\n"; } ?>
sun = " . date ( "D, m-d-Y", $sun ) . "
"; //echo "

monthstart = " . date ( "D, m-d-Y", $monthstart ) . "
"; //echo "

monthend = " . date ( "D, m-d-Y", $monthend ) . "
"; // NOTE: if you make HTML changes to this table, make the same changes // to the example table in pref.php. for ( $i = $wkstart; date ( "Ymd", $i ) <= date ( "Ymd", $monthend ); $i += ( 24 * 3600 * 7 ) ) { print "

\n"; for ( $j = 0; $j < 7; $j++ ) { $date = $i + ( $j * 24 * 3600 ); if ( date ( "Ymd", $date ) >= date ( "Ymd", $monthstart ) && date ( "Ymd", $date ) <= date ( "Ymd", $monthend ) ) { $thiswday = date ( "w", $date ); $is_weekend = ( $thiswday == 0 || $thiswday == 6 ); if ( empty ( $WEEKENDBG ) ) $is_weekend = false; $class = $is_weekend ? "tablecellweekend" : "tablecell"; $color = $is_weekend ? $WEEKENDBG : $CELLBG; if ( empty ( $color ) ) $color = "#C0C0C0"; print "\n"; } else { print "\n"; } } print "\n"; } ?>
"; else echo "BGCOLOR=\"$color\">"; //echo date ( "D, m-d-Y H:i:s", $date ) . "
"; print_date_entries ( date ( "Ymd", $date ), ( ! empty ( $user ) ) ? $user : $login, $friendly, false ); print "
 

friendly=1" TARGET="cal_printer_friendly" onMouseOver="window.status = ''">[]