[763] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare - Calendar * |
---|
| 4 | * http://www.egroupware.org * |
---|
| 5 | * Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> * |
---|
| 6 | * http://www.radix.net/~cknudsen * |
---|
| 7 | * Written by Mark Peters <skeeter@phpgroupware.org> * |
---|
| 8 | * -------------------------------------------- * |
---|
| 9 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 10 | * under the terms of the GNU General Public License as published by the * |
---|
| 11 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 12 | * option) any later version. * |
---|
| 13 | \**************************************************************************/ |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | $d1 = strtolower(substr(PHPGW_APP_INC,0,3)); |
---|
| 17 | if($d1 == 'htt' || $d1 == 'ftp' ) |
---|
| 18 | { |
---|
| 19 | echo 'Failed attempt to break in via an old Security Hole!<br>'."\n"; |
---|
| 20 | $GLOBALS['phpgw']->common->phpgw_exit(); |
---|
| 21 | } |
---|
| 22 | unset($d1); |
---|
| 23 | |
---|
| 24 | $today = $GLOBALS['phpgw']->datetime->users_localtime; |
---|
| 25 | $dates = array($today); |
---|
| 26 | $wday = date('w',$today); |
---|
| 27 | if($wday=='5') // if it's Friday, show the weekend, plus Monday |
---|
| 28 | { |
---|
| 29 | $dates[] = $today + 86400; // Saturday |
---|
| 30 | $dates[] = $today + (2*86400); // Sunday |
---|
| 31 | } |
---|
| 32 | if($wday=='6') // if it's Saturday, show Sunday, plus Monday |
---|
| 33 | { |
---|
| 34 | $dates[] = $today + 86400; // Sunday |
---|
| 35 | } |
---|
| 36 | $dates[] = $dates[count($dates)-1] + 86400; // the next business day |
---|
| 37 | |
---|
| 38 | $extra_data = $GLOBALS['css']."\n" |
---|
| 39 | . '<table border="0" width="100%" cellspacing="0" cellpadding="1">' |
---|
| 40 | . '<tr><td valign="top" width="100%">'; |
---|
| 41 | foreach($dates as $id=>$day) |
---|
| 42 | { |
---|
| 43 | $dayprint = ExecMethod('calendar.uicalendar.print_day', |
---|
| 44 | Array( |
---|
| 45 | 'year' => date('Y',$day), |
---|
| 46 | 'month' => date('m',$day), |
---|
| 47 | 'day' => date('d',$day) |
---|
| 48 | )); |
---|
| 49 | $extra_data .= '<font class="event-off" style="font-weight: bold">   '.lang(date('l',$day)) .'</font><br />' . $dayprint; |
---|
| 50 | } |
---|
| 51 | $extra_data .= '</td></tr></table>'."\n"; |
---|
| 52 | |
---|
| 53 | $GLOBALS['extra_data'] = $extra_data; |
---|
| 54 | |
---|
| 55 | unset($dates); |
---|
| 56 | unset($today); |
---|
| 57 | unset($extra_data); |
---|
| 58 | ?> |
---|