[3594] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare - infolog * |
---|
| 4 | * http://www.eGroupWare.org * |
---|
| 5 | * Maintained and further developed by RalfBecker@outdoor-training.de * |
---|
| 6 | * Based on Webinfolog by Craig Knudsen <cknudsen@radix.net> * |
---|
| 7 | * http://www.radix.net/~cknudsen * |
---|
| 8 | * Originaly modified by Mark Peters <skeeter@phpgroupware.org> * |
---|
| 9 | * -------------------------------------------- * |
---|
| 10 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 11 | * under the terms of the GNU General Public License as published by the * |
---|
| 12 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 13 | * option) any later version. * |
---|
| 14 | \**************************************************************************/ |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | if (@$GLOBALS['phpgw_info']['flags']['included_classes']['soinfolog_']) |
---|
| 18 | { |
---|
| 19 | return; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | $GLOBALS['phpgw_info']['flags']['included_classes']['soinfolog_'] = True; |
---|
| 23 | |
---|
| 24 | class soinfolog_ extends soinfolog__ |
---|
| 25 | { |
---|
| 26 | var $deleted_events = Array(); |
---|
| 27 | |
---|
| 28 | var $cal_event; |
---|
| 29 | var $today = Array('raw','day','month','year','full','dow','dm','bd'); |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | function soinfolog_() |
---|
| 33 | { |
---|
| 34 | $this->soinfolog__(); |
---|
| 35 | |
---|
| 36 | if (!is_object($GLOBALS['phpgw']->asyncservice)) |
---|
| 37 | { |
---|
| 38 | $GLOBALS['phpgw']->asyncservice = CreateObject('phpgwapi.asyncservice'); |
---|
| 39 | } |
---|
| 40 | $this->async = &$GLOBALS['phpgw']->asyncservice; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | function get_event_ids() |
---|
| 44 | { |
---|
| 45 | $from = $where = ' '; |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | $sql = 'SELECT DISTINCT info_id, info_type, |
---|
| 49 | info_from,info_subject,info_owner,info_datemodified,info_startdate, info_enddate,info_uid, |
---|
| 50 | info_priority ' |
---|
| 51 | . 'FROM phpgw_infolog'; |
---|
| 52 | //. $from; |
---|
| 53 | //. 'WHERE (phpgw_cal_user.info_id = phpgw_cal.info_id) ' |
---|
| 54 | //. $where . $extra; |
---|
| 55 | |
---|
| 56 | //echo "SQL : ".$sql ."<br>\n"; |
---|
| 57 | |
---|
| 58 | if($this->debug) |
---|
| 59 | { |
---|
| 60 | echo "FULL SQL : ".$sql."<br>\n"; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | $this->stream->query($sql,__LINE__,__FILE__); |
---|
| 64 | |
---|
| 65 | $retval = Array(); |
---|
| 66 | if($this->stream->num_rows() == 0) |
---|
| 67 | { |
---|
| 68 | if($this->debug) |
---|
| 69 | { |
---|
| 70 | echo "No records found!<br>\n"; |
---|
| 71 | } |
---|
| 72 | return $retval; |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | while($this->stream->next_record()) |
---|
| 76 | { |
---|
| 77 | $retval[] = (int)$this->stream->f('info_id'); |
---|
| 78 | } |
---|
| 79 | if($this->debug) |
---|
| 80 | { |
---|
| 81 | echo "Records found!<br>\n"; |
---|
| 82 | } |
---|
| 83 | return $retval; |
---|
| 84 | } |
---|
| 85 | |
---|
| 86 | } |
---|