[ Index ] |
|
Code source de WebCalendar 1.0.5 |
1 <?php 2 include_once 'includes/init.php'; 3 4 if (($user != $login) && $is_nonuser_admin) 5 load_user_layers ($user); 6 else 7 load_user_layers (); 8 9 load_user_categories (); 10 11 $wday = strftime ( "%w", mktime ( 3, 0, 0, $thismonth, $thisday, $thisyear ) ); 12 13 $now = mktime ( 3, 0, 0, $thismonth, $thisday, $thisyear ); 14 $nowYmd = date ( "Ymd", $now ); 15 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 ); 21 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 ); 27 28 if ( ! empty ( $bold_days_in_year ) && $bold_days_in_year == 'Y' ) { 29 $boldDays = true; 30 } else { 31 $boldDays = false; 32 } 33 34 $startdate = sprintf ( "%04d%02d01", $thisyear, $thismonth ); 35 $enddate = sprintf ( "%04d%02d31", $thisyear, $thismonth ); 36 37 $HeadX = ''; 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"; 42 } 43 $INC = array('js/popups.php'); 44 print_header($INC,$HeadX); 45 ?> 46 47 <?php 48 /* Pre-Load the repeated events for quckier access */ 49 $repeated_events = read_repeated_events ( empty ( $user ) ? $login : $user, 50 $cat_id, $startdate ); 51 52 /* Pre-load the non-repeating events for quicker access */ 53 $events = read_events ( empty ( $user ) ? $login : $user, $startdate, $enddate, 54 $cat_id ); 55 ?> 56 57 <table> 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> 62 <div class="title"> 63 <span class="date"><?php 64 echo date_to_str ( $nowYmd ); 65 ?></span> 66 <span class="user"><?php 67 // display current calendar's user (if not in single user) 68 if ( $single_user == "N" ) { 69 echo "<br />"; 70 echo $user_fullname; 71 } 72 if ( $is_nonuser_admin ) 73 echo "<br />-- " . translate("Admin mode") . " --"; 74 if ( $is_assistant ) 75 echo "<br />-- " . translate("Assistant mode") . " --"; 76 ?></span> 77 <?php 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 ); 81 } 82 ?> 83 </div> 84 </div> 85 </td> 86 <td style="vertical-align:top;" rowspan="2"> 87 <!-- START MINICAL --> 88 <div class="minicalcontainer"> 89 <?php display_small_month ( $thismonth, $thisyear, true ); ?> 90 </div> 91 </td></tr><tr><td> 92 <table class="glance" cellspacing="0" cellpadding="0"> 93 <?php 94 if ( empty ( $TIME_SLOTS ) ) 95 $TIME_SLOTS = 24; 96 97 print_day_at_a_glance ( date ( "Ymd", $now ), 98 empty ( $user ) ? $login : $user, $can_add ); 99 ?> 100 </table> 101 </td> 102 </tr></table> 103 <br /> 104 <?php 105 if ( ! empty ( $eventinfo ) ) echo $eventinfo; 106 107 display_unapproved_events ( ( $is_assistant || $is_nonuser_admin ? $user : $login ) ); 108 ?> 109 <br /> 110 <a title="<?php etranslate("Generate printer-friendly version")?>" class="printer" href="day.php?<?php 111 echo $u_url; 112 if ( $thisyear ) { 113 echo "year=$thisyear&month=$thismonth&day=$thisday&"; 114 } 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> 117 118 <?php print_trailer (); ?> 119 </body> 120 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Nov 30 19:09:19 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |