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 | global $calendar_id; |
---|
17 | |
---|
18 | $d1 = strtolower(substr($GLOBALS['phpgw_info']['server']['app_inc'],0,3)); |
---|
19 | if($d1 == 'htt' || $d1 == 'ftp') |
---|
20 | { |
---|
21 | echo 'Failed attempt to break in via an old Security Hole!<br>'."\n"; |
---|
22 | $phpgw->common->phpgw_exit(); |
---|
23 | } |
---|
24 | unset($d1); |
---|
25 | |
---|
26 | if ($calendar_id) |
---|
27 | { |
---|
28 | $GLOBALS['phpgw']->translation->add_app('calendar'); |
---|
29 | |
---|
30 | $cal = CreateObject('calendar.uicalendar'); |
---|
31 | //echo "Event ID: $calendar_id<br>\n"; |
---|
32 | |
---|
33 | if ($event = $cal->bo->read_entry($calendar_id)) |
---|
34 | { |
---|
35 | echo $cal->timematrix( |
---|
36 | Array( |
---|
37 | 'date' => $GLOBALS['phpgw']->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year']) - $phpgw->calendar->tz_offset), |
---|
38 | 'starttime' => $cal->bo->splittime('000000',False), |
---|
39 | 'endtime' => 0, |
---|
40 | 'participants' => $event['participants']) |
---|
41 | ) . |
---|
42 | |
---|
43 | '</td></tr><tr><td>' . |
---|
44 | |
---|
45 | $cal->view_event($event) . |
---|
46 | |
---|
47 | '</td></tr><tr><td align="center">' . |
---|
48 | |
---|
49 | $cal->get_response($calendar_id); |
---|
50 | } |
---|
51 | unset($cal); unset($event); |
---|
52 | } |
---|
53 | ?> |
---|