2 include_once $gfplugins.'webcalendar/www/includes/init.php';
4 if (($user != $login) && $is_nonuser_admin)
5 load_user_layers ($user);
9 load_user_categories ();
11 $wday = strftime ( "%w", mktime ( 3, 0, 0, $thismonth, $thisday, $thisyear ) );
13 $now = mktime ( 3, 0, 0, $thismonth, $thisday, $thisyear );
14 $nowYmd = date ( "Ymd", $now );
16 $next = mktime ( 3, 0, 0, $thismonth, $thisday + 1, $thisyear );
17 $nextYmd = date ( "Ymd", $next );
18 $nextyear = date ( "Y", $next );
19 $nextmonth = date ( "m", $next );
20 $nextday = date ( "d", $next );
22 $prev = mktime ( 3, 0, 0, $thismonth, $thisday - 1, $thisyear );
23 $prevYmd = date ( "Ymd", $prev );
24 $prevyear = date ( "Y", $prev );
25 $prevmonth = date ( "m", $prev );
26 $prevday = date ( "d", $prev );
28 if ( ! empty ( $bold_days_in_year ) && $bold_days_in_year == 'Y' ) {
34 $startdate = sprintf ( "%04d%02d01", $thisyear, $thismonth );
35 $enddate = sprintf ( "%04d%02d31", $thisyear, $thismonth );
38 if ( $auto_refresh == "Y" && ! empty ( $auto_refresh_time ) ) {
39 $refresh = $auto_refresh_time * 60; // convert to seconds
40 $HeadX = "<meta http-equiv=\"refresh\" content=\"$refresh; url=day.php?$u_url" .
41 "date=$nowYmd$caturl" . ( ! empty ( $friendly ) ? "&friendly=1" : "") . "\" />\n";
43 $INC = array('js/popups.php');
44 print_header($INC,$HeadX);
48 /* Pre-Load the repeated events for quckier access */
49 $repeated_events = read_repeated_events ( empty ( $user ) ? $login : $user,
50 $cat_id, $startdate );
52 /* Pre-load the non-repeating events for quicker access */
53 $events = read_events ( empty ( $user ) ? $login : $user, $startdate, $enddate,
58 <tr><td style="vertical-align:top; width:82%;">
59 <div style="border-width:0px;">
60 <a title="<?php etranslate("Next"); ?>" class="next" href="day.php?<?php echo $u_url;?>date=<?php echo $nextYmd . $caturl;?>"><img src="rightarrow.gif" alt="<?php etranslate("Next"); ?>" /></a>
61 <a title="<?php etranslate("Previous"); ?>" class="prev" href="day.php?<?php echo $u_url;?>date=<?php echo $prevYmd . $caturl;?>"><img src="leftarrow.gif" alt="<?php etranslate("Previous"); ?>" /></a>
63 <span class="date"><?php
64 echo date_to_str ( $nowYmd );
66 <span class="user"><?php
67 // display current calendar's user (if not in single user)
68 if ( $single_user == "N" ) {
72 if ( $is_nonuser_admin )
73 echo "<br />-- " . translate("Admin mode") . " --";
75 echo "<br />-- " . translate("Assistant mode") . " --";
78 if ( $categories_enabled == "Y" && (!$user || ($user == $login || $is_assistant ))) {
79 echo "<br />\n<br />\n";
80 print_category_menu( 'day', sprintf ( "%04d%02d%02d",$thisyear, $thismonth, $thisday ), $cat_id );
86 <td style="vertical-align:top;" rowspan="2">
87 <!-- START MINICAL -->
88 <div class="minicalcontainer">
89 <?php display_small_month ( $thismonth, $thisyear, true ); ?>
92 <table class="glance" cellspacing="0" cellpadding="0">
94 if ( empty ( $TIME_SLOTS ) )
97 print_day_at_a_glance ( date ( "Ymd", $now ),
98 empty ( $user ) ? $login : $user, $can_add );
105 if ( ! empty ( $eventinfo ) ) echo $eventinfo;
107 display_unapproved_events ( ( $is_assistant || $is_nonuser_admin ? $user : $login ) );
110 <a title="<?php etranslate("Generate printer-friendly version")?>" class="printer" href="day.php?<?php
113 echo "year=$thisyear&month=$thismonth&day=$thisday&";
115 if ( ! empty ( $cat_id ) ) echo "cat_id=$cat_id&";
116 ?>friendly=1" target="cal_printer_friendly" onmouseover="window.status = '<?php etranslate("Generate printer-friendly version")?>'">[<?php etranslate("Printer Friendly")?>]</a>
118 <?php print_trailer (); ?>