1 | <?php |
---|
2 | /**************************************************************************\ |
---|
3 | * eGroupWare - infolog * |
---|
4 | * http://www.egroupware.org * |
---|
5 | * Based on Webinfolog by Craig Knudsen <cknudsen@radix.net> * |
---|
6 | * http://www.radix.net/~cknudsen * |
---|
7 | * Modified 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 | if(@$GLOBALS['phpgw_info']['server']['infolog_type'] == 'mcal' && |
---|
17 | extension_loaded('mcal') == False) |
---|
18 | { |
---|
19 | $GLOBALS['phpgw_info']['server']['infolog_type'] = 'sql'; |
---|
20 | } |
---|
21 | /* This will be elminated when ical is fully implemented */ |
---|
22 | else |
---|
23 | { |
---|
24 | $GLOBALS['phpgw_info']['server']['infolog_type'] = 'sql'; |
---|
25 | } |
---|
26 | |
---|
27 | |
---|
28 | function get_event_ids() |
---|
29 | { |
---|
30 | $from = $where = ' '; |
---|
31 | |
---|
32 | |
---|
33 | $sql = 'SELECT DISTINCT info_id, info_type, |
---|
34 | info_from,info_subject,info_owner,info_datemodified,info_startdate, info_enddate,info_uid, |
---|
35 | info_priority ' |
---|
36 | . 'FROM phpgw_infolog'; |
---|
37 | //. $from; |
---|
38 | //. 'WHERE (phpgw_cal_user.info_id = phpgw_cal.info_id) ' |
---|
39 | //. $where . $extra; |
---|
40 | |
---|
41 | //echo "SQL : ".$sql ."<br>\n"; |
---|
42 | |
---|
43 | if($this->debug) |
---|
44 | { |
---|
45 | echo "FULL SQL : ".$sql."<br>\n"; |
---|
46 | } |
---|
47 | |
---|
48 | $this->stream->query($sql,__LINE__,__FILE__); |
---|
49 | |
---|
50 | $retval = Array(); |
---|
51 | if($this->stream->num_rows() == 0) |
---|
52 | { |
---|
53 | if($this->debug) |
---|
54 | { |
---|
55 | echo "No records found!<br>\n"; |
---|
56 | } |
---|
57 | return $retval; |
---|
58 | } |
---|
59 | |
---|
60 | while($this->stream->next_record()) |
---|
61 | { |
---|
62 | $retval[] = (int)$this->stream->f('info_id'); |
---|
63 | } |
---|
64 | if($this->debug) |
---|
65 | { |
---|
66 | echo "Records found!<br>\n"; |
---|
67 | } |
---|
68 | return $retval; |
---|
69 | } |
---|
70 | include(PHPGW_INCLUDE_ROOT.'/infolog/inc/class.soinfolog__.inc.php'); |
---|
71 | include(PHPGW_INCLUDE_ROOT.'/infolog/inc/class.soinfolog_'.$GLOBALS['phpgw_info']['server']['infolog_type'].'.inc.php'); |
---|
72 | ?> |
---|