\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 ); } ?>
">
"; print "\n"; } ?>
"; if ( empty ( $friendly ) && $can_add ) { echo "" . "\""" . ""; } echo "" . $header[$d] . "
"; else echo "bgcolor=\"$color\">"; print_det_date_entries ( $date, $user, $hide_icons, true ); echo " "; echo "

friendly=1" TARGET="cal_printer_friendly" onMouseOver="window.status = ''">[] "; if ( $login != $event_owner && strlen ( $event_owner ) ) { $class = "layerentry"; } else { $class = "entry"; if ( $status == "W" ) $class = "unapprovedentry"; } if ( $pri == 3 ) echo ""; if ( ! $hide_icons ) { $divname = "eventinfo-$id-$key"; $key++; echo " 0 ) echo "&user=" . $user; echo "\" onMouseOver=\"window.status='" . translate("View this entry") . "'; return true;\" onMouseOut=\"window.status=''; return true;\">"; echo "\"view "; } if ( $login != $event_owner && strlen ( $event_owner ) ) { for($index = 0; $index < sizeof($layers); $index++) { if($layers[$index]['cal_layeruser'] == $event_owner) { echo(""); } } } $timestr = ""; $my_time = $time + ( $TZ_OFFSET * 10000 ); if ( $time >= 0 ) { if ( $GLOBALS["TIME_FORMAT"] == "24" ) { printf ( "%02d:%02d", $my_time / 10000, ( $my_time / 100 ) % 100 ); } else { $h = ( (int) ( $my_time / 10000 ) ) % 12; if ( $h == 0 ) $h = 12; echo $h; $m = ( $my_time / 100 ) % 100; if ( $m > 0 ) printf ( ":%02d", $m ); else print (":00"); echo ( (int) ( $my_time / 10000 ) ) < 12 ? translate("am") : translate("pm"); } //echo ">"; $timestr = display_time ( $time ); if ( $duration > 0 ) { // calc end time $h = (int) ( $time / 10000 ); $m = ( $time / 100 ) % 100; $m += $duration; $d = $duration; while ( $m >= 60 ) { $h++; $m -= 60; } $end_time = sprintf ( "%02d%02d00", $h, $m ); $timestr .= " - " . display_time ( $end_time ); echo " - " .display_time ( $end_time ). " "; } } if ( $login != $user && $access == 'R' && strlen ( $user ) ) { $PN = "(" . translate("Private") . ")"; $PD = "(" . translate("Private") . ")"; } elseif ( $login != $event_owner && $access == 'R' && strlen ( $event_owner ) ) { $PN = "(" . translate("Private") . ")";$PD ="(" . translate("Private") . ")"; } elseif ( $login != $event_owner && strlen ( $event_owner ) ) { $PN = htmlspecialchars ( $name ) .""; $PD = activate_urls ( htmlspecialchars ( $description ) ); } else { $PN = htmlspecialchars ( $name ); $PD = activate_urls ( htmlspecialchars ( $description ) ); } echo $PN; echo ""; if ( $pri == 3 ) echo ""; # Only display description if it is different than the event name. if ( $PN != $PD ) echo " - " . $PD; echo "

"; } // // Print all the calendar entries for the specified user for the // specified date. If we are displaying data from someone other than // the logged in user, then check the access permission of the entry. // params: // $date - date in YYYYMMDD format // $user - username // $hide_icons - hide icons to make printer-friendly // $is_ssi - is this being called from week_ssi.php? function print_det_date_entries ( $date, $user, $hide_icons, $ssi ) { global $events, $readonly, $is_admin; $year = substr ( $date, 0, 4 ); $month = substr ( $date, 4, 2 ); $day = substr ( $date, 6, 2 ); $dateu = mktime ( 2, 0, 0, $month, $day, $year ); // get all the repeating events for this date and store in array $rep $rep = get_repeating_entries ( $user, $date ); $cur_rep = 0; // get all the non-repeating events for this date and store in $ev $ev = get_entries ( $user, $date ); for ( $i = 0; $i < count ( $ev ); $i++ ) { // print out any repeating events that are before this one... while ( $cur_rep < count ( $rep ) && $rep[$cur_rep]['cal_time'] < $ev[$i]['cal_time'] ) { if ( $GLOBALS["DISPLAY_UNAPPROVED"] != "N" || $rep[$cur_rep]['cal_status'] == 'A' ) print_detailed_entry ( $rep[$cur_rep]['cal_id'], $date, $rep[$cur_rep]['cal_time'], $rep[$cur_rep]['cal_duration'], $rep[$cur_rep]['cal_name'], $rep[$cur_rep]['cal_description'], $rep[$cur_rep]['cal_status'], $rep[$cur_rep]['cal_priority'], $rep[$cur_rep]['cal_access'], $rep[$cur_rep]['cal_login'], $hide_icons ); $cur_rep++; } if ( $GLOBALS["DISPLAY_UNAPPROVED"] != "N" || $ev[$i]['cal_status'] == 'A' ) print_detailed_entry ( $ev[$i]['cal_id'], $date, $ev[$i]['cal_time'], $ev[$i]['cal_duration'], $ev[$i]['cal_name'], $ev[$i]['cal_description'], $ev[$i]['cal_status'], $ev[$i]['cal_priority'], $ev[$i]['cal_access'], $ev[$i]['cal_login'], $hide_icons ); } // print out any remaining repeating events while ( $cur_rep < count ( $rep ) ) { if ( $GLOBALS["DISPLAY_UNAPPROVED"] != "N" || $rep[$cur_rep]['cal_status'] == 'A' ) print_detailed_entry ( $rep[$cur_rep]['cal_id'], $date, $rep[$cur_rep]['cal_time'], $rep[$cur_rep]['cal_duration'], $rep[$cur_rep]['cal_name'], $rep[$cur_rep]['cal_description'], $rep[$cur_rep]['cal_status'], $rep[$cur_rep]['cal_priority'], $rep[$cur_rep]['cal_access'], $rep[$cur_rep]['cal_login'], $hide_icons ); $cur_rep++; } } ?>