\n";
}
$INC = array('js/popups.php');
print_header($INC,$HeadX);
/* Pre-Load the repeated events for quckier access */
$repeated_events = read_repeated_events ( strlen ( $user ) ? $user : $login,
$cat_id, $startdate );
/* Pre-load the non-repeating events for quicker access */
$events = read_events ( strlen ( $user ) ? $user : $login,
$startdate, $enddate, $cat_id );
for ( $i = 0; $i < 7; $i++ ) {
$days[$i] = $wkstart + ( 24 * 3600 ) * $i;
$weekdays[$i] = weekday_short_name ( ( $i + $WEEK_START ) % 7 );
$header[$i] = $weekdays[$i] . "
\n" .
date_to_str ( date ( "Ymd", $days[$i] ), $DATE_FORMAT_MD, false );
}
?>
" />
" class="next"
href="week.php?date=">
" />
$user_fullname";
}
if ( $is_nonuser_admin ) {
echo "| "; if ( $can_add ) { echo html_for_add_icon ( date ( "Ymd", $days[$d] ), "", "", $user ); } echo "" . $header[$d] . "\n"; } ?> | ||||
|---|---|---|---|---|
| \n"; for ( $d = $start_ind; $d < $end_ind; $d++ ) { $thiswday = date ( "w", $days[$d] ); $is_weekend = ( $thiswday == 0 || $thiswday == 6 ); $class = ( $is_weekend ? "weekend" : "" ); if ( date ( 'Ymd', $days[$d] ) == date ( 'Ymd', $today ) ) { if ($class != "") { $class .= " "; } $class .= "today"; } echo " | "; if ( ! empty ( $untimed[$d] ) && strlen ( $untimed[$d] ) ) { echo $untimed[$d]; } else { echo " "; } echo " | \n"; } echo "|||
| " . $time . " | \n"; for ( $d = $start_ind; $d < $end_ind; $d++ ) { $thiswday = date ( "w", $days[$d] ); $is_weekend = ( $thiswday == 0 || $thiswday == 6 ); $class = ( $is_weekend ? "weekend" : "" ); if ( date ( 'Ymd', $days[$d] ) == date ( 'Ymd', $today ) ) { if ( $class != "" ) { $class .= " "; } $class .= "today"; } // Use the class 'hasevents' for any hour block that has events // in it. if ( ! empty ( $save_hour_arr[$d][$i] ) && strlen ( $save_hour_arr[$d][$i] ) ) { $class = 'hasevents'; } if ( $rowspan_day[$d] > 1 ) { // this might mean there's an overlap, or it could mean one event // ends at 11:15 and another starts at 11:30. if ( ! empty ( $save_hour_arr[$d][$i] ) ) { echo "" . $save_hour_arr[$d][$i] . " | \n"; } $rowspan_day[$d]--; } else if ( empty ( $save_hour_arr[$d][$i] ) ) { echo ""; if ( $can_add ) { //if user can add events... echo html_for_add_icon ( date ( "Ymd", $days[$d] ), $time_h, $time_m, $user ); //..then echo the add event icon } echo " | \n"; } else { $rowspan_day[$d] = $save_rowspan_arr[$d][$i]; if ( $rowspan_day[$d] > 1 ) { echo ""; if ( $can_add ) { echo html_for_add_icon ( date ( "Ymd", $days[$d] ), $time_h, $time_m, $user ); } echo $save_hour_arr[$d][$i] . " | \n"; } else { echo ""; if ( $can_add ) { echo html_for_add_icon ( date ( "Ymd", $days[$d] ), $time_h, $time_m, $user ); } echo $save_hour_arr[$d][$i] . " | \n"; } } } echo "