\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 ); /* 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] . "
" . date_to_str ( date ( "Ymd", $days[$i] ), $DATE_FORMAT_MD, false ); } ?>
"> \n(" . translate("Week") . " " . week_number ( $wkstart ) . ")"; } ?> $user_fullname\n"; } if ( $is_nonuser_admin ) echo "
-- " . translate("Admin mode") . " --
"; if ( $is_assistant ) echo "
-- " . translate("Assistant mode") . " --
"; if ( $categories_enabled == "Y" ) { echo "
\n
\n"; print_category_menu('week', sprintf ( "%04d%02d%02d",$thisyear, $thismonth, $thisday ), $cat_id, $friendly ); } ?>
">
"; if ( empty ( $friendly ) && $can_add ) { echo html_for_add_icon ( date ( "Ymd", $days[$d] ), "", "", $user ); } echo "" . $header[$d] . "\n"; } ?> 1 ) { if ( ! empty ( $hour_arr[$i] ) ) { if ( $rowspan_arr[$i] > 1 ) { $rowspan_arr[$last_row] += ( $rowspan_arr[$i] - 1 ); $rowspan += ( $rowspan_arr[$i] - 1 ); } else $rowspan_arr[$last_row] += $rowspan_arr[$i]; // this will move entries apart that appear in one field, // yet start on different hours $start_time = $i; $diff_start_time = $start_time - $last_row; for ( $u = $diff_start_time ; $u > 0 ; $u-- ) $hour_arr[$last_row] .= "
"; $hour_arr[$last_row] .= $hour_arr[$i]; $hour_arr[$i] = ""; $rowspan_arr[$i] = 0; } $rowspan--; } else if ( ! empty ( $rowspan_arr[$i] ) && $rowspan_arr[$i] > 1 ) { $rowspan = $rowspan_arr[$i]; $last_row = $i; } } // now save the output... if ( ! empty ( $hour_arr[9999] ) && strlen ( $hour_arr[9999] ) ) { $untimed[$d] = "\n"; $untimed_found = true; } $save_hour_arr[$d] = $hour_arr; $save_rowspan_arr[$d] = $rowspan_arr; } // untimed events first if ( $untimed_found ) { echo ""; for ( $d = $start_ind; $d < $end_ind; $d++ ) { $thiswday = date ( "w", $days[$d] ); $is_weekend = ( $thiswday == 0 || $thiswday == 6 ); if ( empty ( $WEEKENDBG ) ) $is_weekend = false; $color = $is_weekend ? $WEEKENDBG : $CELLBG; if ( ! empty ( $untimed[$d] ) && strlen ( $untimed[$d] ) ) echo $untimed[$d]; else echo ""; } echo "\n"; } for ( $d = $start_ind; $d < $end_ind; $d++ ) $rowspan_day[$d] = 0; for ( $i = $first_slot; $i <= $last_slot; $i++ ) { $time_h = (int) ( ( $i * $interval ) / 60 ); $time_m = ( $i * $interval ) % 60; $time = display_time ( ( $time_h * 100 + $time_m ) * 100 ); echo "\n"; for ( $d = $start_ind; $d < $end_ind; $d++ ) { $thiswday = date ( "w", $days[$d] ); $is_weekend = ( $thiswday == 0 || $thiswday == 6 ); if ( empty ( $WEEKENDBG ) ) $is_weekend = false; $color = $is_weekend ? $WEEKENDBG : $CELLBG; if ( $all_day[$d] > 0 ) $color = $TODAYCELLBG; 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 ""; $rowspan_day[$d]--; } else { if ( empty ( $save_hour_arr[$d][$i] ) ) { echo "\n"; } else { $rowspan_day[$d] = $save_rowspan_arr[$d][$i]; if ( $rowspan_day[$d] > 1 ) { echo "\n"; } else { echo "\n"; } } } } echo "\n"; } ?>
 
$hour_arr[9999]
  
" . "" . $time . "" . $save_hour_arr[$d][$i] . ""; if ( empty ( $friendly ) && $can_add ) echo html_for_add_icon ( date ( "Ymd", $days[$d] ), $time_h, $time_m, $user ); echo " "; if ( empty ( $friendly ) && $can_add ) echo html_for_add_icon ( date ( "Ymd", $days[$d] ), $time_h, $time_m, $user ); echo "" . $save_hour_arr[$d][$i] . ""; if ( empty ( $friendly ) && $can_add ) echo html_for_add_icon ( date ( "Ymd", $days[$d] ), $time_h, $time_m, $user ); echo $save_hour_arr[$d][$i] . "

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