2001-07-16 13:38:40 +02:00
|
|
|
<?php
|
2004-08-04 00:52:13 +02:00
|
|
|
/**************************************************************************\
|
|
|
|
* eGroupWare - Calendar *
|
|
|
|
* http://www.eGroupWare.org *
|
|
|
|
* Maintained and further developed by RalfBecker@outdoor-training.de *
|
|
|
|
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
|
|
|
* http://www.radix.net/~cknudsen *
|
|
|
|
* Originaly modified by Mark Peters <skeeter@phpgroupware.org> *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* This program is free software; you can redistribute it and/or modify it *
|
|
|
|
* under the terms of the GNU General Public License as published by the *
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
|
|
* option) any later version. *
|
|
|
|
\**************************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
2001-07-16 13:38:40 +02:00
|
|
|
|
|
|
|
class socalendar
|
|
|
|
{
|
2001-11-03 02:52:26 +01:00
|
|
|
// var $debug = True;
|
2001-07-18 19:32:10 +02:00
|
|
|
var $debug = False;
|
2001-07-16 13:38:40 +02:00
|
|
|
var $cal;
|
|
|
|
var $db;
|
|
|
|
var $owner;
|
2001-10-23 12:58:53 +02:00
|
|
|
var $g_owner;
|
|
|
|
var $is_group = False;
|
2003-08-28 16:31:11 +02:00
|
|
|
var $datetime;
|
2001-07-18 19:32:10 +02:00
|
|
|
var $filter;
|
|
|
|
var $cat_id;
|
2001-07-16 13:38:40 +02:00
|
|
|
|
2004-08-01 17:36:04 +02:00
|
|
|
function socalendar($param=False)
|
2001-07-16 13:38:40 +02:00
|
|
|
{
|
2001-08-17 02:24:20 +02:00
|
|
|
$this->db = $GLOBALS['phpgw']->db;
|
2002-06-25 01:24:24 +02:00
|
|
|
if(!is_object($GLOBALS['phpgw']->datetime))
|
|
|
|
{
|
|
|
|
$GLOBALS['phpgw']->datetime = createobject('phpgwapi.datetime');
|
|
|
|
}
|
2001-08-12 16:47:23 +02:00
|
|
|
|
2001-08-17 02:24:20 +02:00
|
|
|
$this->owner = (!isset($param['owner']) || $param['owner'] == 0?$GLOBALS['phpgw_info']['user']['account_id']:$param['owner']);
|
|
|
|
$this->filter = (isset($param['filter']) && $param['filter'] != ''?$param['filter']:$this->filter);
|
|
|
|
$this->cat_id = (isset($param['category']) && $param['category'] != ''?$param['category']:$this->cat_id);
|
2001-10-23 12:58:53 +02:00
|
|
|
if(isset($param['g_owner']) && is_array($param['g_owner']))
|
|
|
|
{
|
|
|
|
$this->is_group = True;
|
|
|
|
$this->g_owner = $param['g_owner'];
|
|
|
|
}
|
2001-07-18 19:32:10 +02:00
|
|
|
if($this->debug)
|
|
|
|
{
|
2001-11-03 02:52:26 +01:00
|
|
|
echo '<!-- SO Filter : '.$this->filter.' -->'."\n";
|
|
|
|
echo '<!-- SO cat_id : '.$this->cat_id.' -->'."\n";
|
2001-07-18 19:32:10 +02:00
|
|
|
}
|
2001-08-30 21:06:24 +02:00
|
|
|
$this->cal = CreateObject('calendar.socalendar_');
|
2004-08-04 00:52:13 +02:00
|
|
|
|
|
|
|
foreach($this->cal->all_tables as $name => $table)
|
|
|
|
{
|
|
|
|
$this->$name = $table;
|
|
|
|
}
|
2002-06-25 01:24:24 +02:00
|
|
|
$this->open_box($this->owner);
|
|
|
|
}
|
|
|
|
|
|
|
|
function open_box($owner)
|
|
|
|
{
|
2004-01-04 01:47:37 +01:00
|
|
|
$this->cal->open('INBOX',(int)$owner);
|
2001-07-16 13:38:40 +02:00
|
|
|
}
|
|
|
|
|
2001-09-07 18:37:11 +02:00
|
|
|
function maketime($time)
|
|
|
|
{
|
|
|
|
return mktime($time['hour'],$time['min'],$time['sec'],$time['month'],$time['mday'],$time['year']);
|
|
|
|
}
|
|
|
|
|
2001-07-16 13:38:40 +02:00
|
|
|
function read_entry($id)
|
|
|
|
{
|
2001-07-18 19:32:10 +02:00
|
|
|
return $this->cal->fetch_event($id);
|
2001-07-16 13:38:40 +02:00
|
|
|
}
|
|
|
|
|
2004-08-04 00:52:13 +02:00
|
|
|
function cat_filter($cat_id)
|
2001-07-16 13:38:40 +02:00
|
|
|
{
|
2001-07-18 19:32:10 +02:00
|
|
|
$extra = '';
|
2004-08-04 00:52:13 +02:00
|
|
|
if ($cat_id)
|
2004-04-05 00:23:47 +02:00
|
|
|
{
|
2004-08-04 00:52:13 +02:00
|
|
|
if (!is_array($cat_ids) && !@$GLOBALS['phpgw_info']['user']['preferences']['common']['cats_no_subs'])
|
2004-04-05 00:23:47 +02:00
|
|
|
{
|
2004-08-01 17:36:04 +02:00
|
|
|
if (!is_object($GLOBALS['phpgw']->categories))
|
|
|
|
{
|
|
|
|
$GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
|
|
|
|
}
|
2004-08-04 00:52:13 +02:00
|
|
|
$cats = $GLOBALS['phpgw']->categories->return_all_children($cat_id);
|
2004-04-05 00:23:47 +02:00
|
|
|
}
|
2004-08-01 17:36:04 +02:00
|
|
|
else
|
|
|
|
{
|
2004-08-04 00:52:13 +02:00
|
|
|
$cats = is_array($cat_id) ? $cat_id : array($cat_id);
|
2004-08-01 17:36:04 +02:00
|
|
|
}
|
|
|
|
array_walk($cats,create_function('&$val,$key','$val = (int) $val;'));
|
|
|
|
|
2004-12-05 15:42:17 +01:00
|
|
|
$extra .= "($this->table.cal_category".(count($cats) > 1 ? ' IN ('.implode(',',$cats).')' : '='.$this->db->quote((int)$cat_id));
|
2004-04-05 00:23:47 +02:00
|
|
|
foreach($cats as $cat)
|
|
|
|
{
|
2004-08-04 00:52:13 +02:00
|
|
|
$extra .= " OR $this->table.cal_category LIKE '$cat,%' OR $this->table.cal_category LIKE '%,$cat,%' OR $this->table.cal_category LIKE '%,$cat'";
|
2004-04-05 00:23:47 +02:00
|
|
|
}
|
|
|
|
$extra .= ') ';
|
|
|
|
}
|
2004-08-04 00:52:13 +02:00
|
|
|
return $extra;
|
|
|
|
}
|
|
|
|
|
2005-01-29 11:19:10 +01:00
|
|
|
function list_events($startYear,$startMonth,$startDay,$endYear=0,$endMonth=0,$endDay=0,$owner_id=0,$modified=0)
|
2004-08-04 00:52:13 +02:00
|
|
|
{
|
|
|
|
$extra = '';
|
|
|
|
$extra .= strpos($this->filter,'private') ? "AND $this->table.cal_public=0 " : '';
|
|
|
|
|
|
|
|
if ($this->cat_id)
|
|
|
|
{
|
|
|
|
$extra .= ' AND '.$this->cat_filter($this->cat_id);
|
|
|
|
}
|
2005-01-29 11:19:10 +01:00
|
|
|
if ((int) $modified > 0)
|
|
|
|
{
|
|
|
|
$modified -= $GLOBALS['phpgw']->datetime->tz_offset;
|
|
|
|
$extra .= " AND $this->table.cal_modified >= ".(int) $modified;
|
|
|
|
}
|
2001-10-23 12:58:53 +02:00
|
|
|
if($owner_id)
|
|
|
|
{
|
2002-06-25 01:24:24 +02:00
|
|
|
return $this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$GLOBALS['phpgw']->datetime->tz_offset,$owner_id);
|
2001-10-23 12:58:53 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-06-25 01:24:24 +02:00
|
|
|
return $this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$GLOBALS['phpgw']->datetime->tz_offset);
|
2001-10-23 12:58:53 +02:00
|
|
|
}
|
2001-07-16 13:38:40 +02:00
|
|
|
}
|
|
|
|
|
2004-08-01 17:36:04 +02:00
|
|
|
/**
|
|
|
|
* Returns the id's of all repeating events started after s{year,month,day} AND still running at e{year,month,day}
|
|
|
|
*
|
|
|
|
* The startdate of an repeating events is the regular event-startdate.
|
|
|
|
* Events are "still running" if no recur-enddate is set or its after e{year,month,day}
|
|
|
|
*/
|
2005-01-29 11:19:10 +01:00
|
|
|
function list_repeated_events($syear,$smonth,$sday,$eyear,$emonth,$eday,$owner_id=0,$modified=0)
|
2001-07-16 13:38:40 +02:00
|
|
|
{
|
2003-11-23 14:06:47 +01:00
|
|
|
if(!$owner_id)
|
|
|
|
{
|
|
|
|
$owner_id = $this->is_group ? $this->g_owner : $this->owner;
|
|
|
|
}
|
|
|
|
if($GLOBALS['phpgw_info']['server']['calendar_type'] != 'sql' ||
|
2004-01-04 01:47:37 +01:00
|
|
|
!count($owner_id)) // happens with empty groups
|
2001-07-16 13:38:40 +02:00
|
|
|
{
|
|
|
|
return Array();
|
|
|
|
}
|
2002-06-25 01:24:24 +02:00
|
|
|
$starttime = mktime(0,0,0,$smonth,$sday,$syear) - $GLOBALS['phpgw']->datetime->tz_offset;
|
|
|
|
$endtime = mktime(23,59,59,$emonth,$eday,$eyear) - $GLOBALS['phpgw']->datetime->tz_offset;
|
2001-10-26 01:51:35 +02:00
|
|
|
|
2004-08-04 00:52:13 +02:00
|
|
|
$sql = "AND $this->table.cal_type='M' AND $this->user_table.cal_user_id IN (".
|
|
|
|
(is_array($owner_id) ? implode(',',$owner_id) : $owner_id).')';
|
2005-01-29 11:19:10 +01:00
|
|
|
|
|
|
|
if ((int) $modified > 0)
|
|
|
|
{
|
|
|
|
$modified -= $GLOBALS['phpgw']->datetime->tz_offset;
|
|
|
|
$sql .= " AND $this->table.cal_modified >= ".(int) $modified;
|
|
|
|
}
|
2004-08-04 00:52:13 +02:00
|
|
|
/* why ???
|
|
|
|
$member_groups = $GLOBALS['phpgw']->accounts->membership($this->user);
|
|
|
|
@reset($member_groups);
|
|
|
|
while(list($key,$group_info) = each($member_groups))
|
|
|
|
{
|
|
|
|
$member[] = $group_info['account_id'];
|
|
|
|
}
|
|
|
|
@reset($member);
|
|
|
|
$sql .= ','.implode(',',$member).') ';
|
|
|
|
$sql .= "AND ($this->table.cal_starttime <= '.$starttime.') ';
|
|
|
|
$sql .= "AND ((($this->recur_table.recur_enddate >= $starttime) AND ($this->recur_table.recur_enddate <= $endtime)) OR ($this->recur_table.recur_enddate=0))) "
|
|
|
|
*/
|
|
|
|
$sql .= " AND ($this->recur_table.recur_enddate >= $starttime OR $this->recur_table.recur_enddate=0) "
|
|
|
|
. (strpos($this->filter,'private')? "AND $this->table.cal_public=0 " : '')
|
|
|
|
. ($this->cat_id ? 'AND '.$this->cat_filter($this->cat_id) : '')
|
|
|
|
. "ORDER BY $this->table.cal_starttime ASC, $this->table.cal_endtime ASC, $this->table.cal_priority ASC";
|
2001-07-18 19:32:10 +02:00
|
|
|
|
|
|
|
if($this->debug)
|
|
|
|
{
|
2001-11-03 02:52:26 +01:00
|
|
|
echo '<!-- SO list_repeated_events : SQL : '.$sql.' -->'."\n";
|
2001-07-18 19:32:10 +02:00
|
|
|
}
|
2001-07-16 13:38:40 +02:00
|
|
|
|
2001-07-28 15:17:30 +02:00
|
|
|
return $this->get_event_ids(True,$sql);
|
|
|
|
}
|
|
|
|
|
2003-08-28 16:31:11 +02:00
|
|
|
function list_events_keyword($keywords,$members='')
|
2001-07-28 15:17:30 +02:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
if (!$members)
|
2002-09-17 04:25:40 +02:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
$members[] = $this->owner;
|
2002-09-17 04:25:40 +02:00
|
|
|
}
|
2004-08-04 00:52:13 +02:00
|
|
|
array_walk($members,create_function('&$val,$key','$val = (int) $val;'));
|
|
|
|
|
|
|
|
$sql = "AND ($this->user_table.cal_user_id IN (".implode(',',$members).')) AND '.
|
|
|
|
"($this->user_table.cal_user_id=" . (int) $this->owner . " OR $this->table.cal_public=1) AND (";
|
2001-07-16 13:38:40 +02:00
|
|
|
|
2001-07-28 15:17:30 +02:00
|
|
|
$words = split(' ',$keywords);
|
2003-08-28 16:31:11 +02:00
|
|
|
foreach($words as $i => $word)
|
2001-07-28 15:17:30 +02:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
$sql .= $i > 0 ? ' OR ' : '';
|
2004-08-04 00:52:13 +02:00
|
|
|
$word = $GLOBALS['phpgw']->db->quote('%'.$word.'%');
|
|
|
|
$sql .= "(UPPER($this->table.cal_title) LIKE UPPER($word) OR ".
|
|
|
|
"UPPER($this->table.cal_description) LIKE UPPER($word) OR ".
|
|
|
|
"UPPER($this->table.cal_location) LIKE UPPER($word) OR ".
|
|
|
|
"UPPER($this->extra_table.cal_extra_value) LIKE UPPER($word))";
|
2001-07-28 15:17:30 +02:00
|
|
|
}
|
2003-08-28 16:31:11 +02:00
|
|
|
$sql .= ') ';
|
2001-07-28 15:17:30 +02:00
|
|
|
|
2004-08-04 00:52:13 +02:00
|
|
|
$sql .= strpos($this->filter,'private') ? "AND $this->table.cal_public=0 " : '';
|
|
|
|
$sql .= $this->cat_id ? 'AND '.$this->cat_filter($this->cat_id) : '';
|
|
|
|
$sql .= " ORDER BY $this->table.cal_starttime DESC, $this->table.cal_endtime DESC, $this->table.cal_priority ASC";
|
2003-08-28 16:31:11 +02:00
|
|
|
|
|
|
|
return $this->get_event_ids(False,$sql,True);
|
2001-07-16 13:38:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function read_from_store($startYear,$startMonth,$startDay,$endYear='',$endMonth='',$endDay='')
|
|
|
|
{
|
|
|
|
$events = $this->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay);
|
|
|
|
$events_cached = Array();
|
|
|
|
for($i=0;$i<count($events);$i++)
|
|
|
|
{
|
|
|
|
$events_cached[] = $this->read_entry($events[$i]);
|
|
|
|
}
|
|
|
|
return $events_cached;
|
|
|
|
}
|
|
|
|
|
2003-08-28 16:31:11 +02:00
|
|
|
function get_event_ids($search_repeats=False, $sql='',$search_extra=False)
|
2001-07-16 13:38:40 +02:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
return $this->cal->get_event_ids($search_repeats,$sql,$search_extra);
|
2001-07-16 13:38:40 +02:00
|
|
|
}
|
|
|
|
|
2001-09-07 18:37:11 +02:00
|
|
|
function find_uid($uid)
|
|
|
|
{
|
2004-12-02 16:31:39 +01:00
|
|
|
$sql = " AND ($this->table.cal_uid=".$this->db->quote($uid).')';
|
2001-09-07 18:37:11 +02:00
|
|
|
|
|
|
|
$found = $this->cal->get_event_ids(False,$sql);
|
|
|
|
if(!$found)
|
|
|
|
{
|
|
|
|
$found = $this->cal->get_event_ids(True,$sql);
|
|
|
|
}
|
2001-09-17 04:33:19 +02:00
|
|
|
if(is_array($found))
|
|
|
|
{
|
|
|
|
return $found[0];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return False;
|
|
|
|
}
|
2001-09-07 18:37:11 +02:00
|
|
|
}
|
|
|
|
|
2001-07-22 01:35:22 +02:00
|
|
|
function add_entry(&$event)
|
2001-07-16 13:38:40 +02:00
|
|
|
{
|
2003-11-15 22:16:01 +01:00
|
|
|
return $this->cal->save_event($event);
|
2001-07-18 19:32:10 +02:00
|
|
|
}
|
|
|
|
|
2003-08-28 16:31:11 +02:00
|
|
|
function save_alarm($cal_id,$alarm,$id=0)
|
|
|
|
{
|
2003-09-14 14:51:31 +02:00
|
|
|
return $this->cal->save_alarm($cal_id,$alarm,$id);
|
2003-08-28 16:31:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function delete_alarm($id)
|
|
|
|
{
|
2003-09-14 14:51:31 +02:00
|
|
|
return $this->cal->delete_alarm($id);
|
2003-08-28 16:31:11 +02:00
|
|
|
}
|
|
|
|
|
2003-11-03 19:49:24 +01:00
|
|
|
function delete_alarms($cal_id)
|
|
|
|
{
|
|
|
|
return $this->cal->delete_alarms($cal_id);
|
|
|
|
}
|
|
|
|
|
2001-07-18 19:32:10 +02:00
|
|
|
function delete_entry($id)
|
|
|
|
{
|
2003-09-14 14:51:31 +02:00
|
|
|
return $this->cal->delete_event($id);
|
2001-07-18 19:32:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function expunge()
|
|
|
|
{
|
|
|
|
$this->cal->expunge();
|
2001-07-16 13:38:40 +02:00
|
|
|
}
|
|
|
|
|
2001-08-01 13:06:17 +02:00
|
|
|
function delete_calendar($owner)
|
|
|
|
{
|
|
|
|
$this->cal->delete_calendar($owner);
|
|
|
|
}
|
|
|
|
|
|
|
|
function change_owner($account_id,$new_owner)
|
|
|
|
{
|
2001-08-17 02:24:20 +02:00
|
|
|
if($GLOBALS['phpgw_info']['server']['calendar_type'] == 'sql')
|
2001-08-01 13:06:17 +02:00
|
|
|
{
|
2004-08-04 00:52:13 +02:00
|
|
|
$db2 = $this->db;
|
2004-09-01 15:26:25 +02:00
|
|
|
$this->db->select($this->user_table,'cal_id',array('cal_user_id'=>$account_id),__LINE__,__FILE__);
|
2004-08-04 00:52:13 +02:00
|
|
|
while($this->db->next_record())
|
2002-09-17 04:25:40 +02:00
|
|
|
{
|
2004-08-04 00:52:13 +02:00
|
|
|
$id = $this->db->f('cal_id');
|
|
|
|
$db2->select($this->user_table,'count(*)',$where = array(
|
|
|
|
'cal_id' => $id,
|
|
|
|
'cal_user_id' => $new_owner,
|
|
|
|
),__LINE__,__FILE__);
|
2003-08-28 16:31:11 +02:00
|
|
|
$db2->next_record();
|
2002-09-17 04:25:40 +02:00
|
|
|
if($db2->f(0) == 0)
|
|
|
|
{
|
2004-08-04 00:52:13 +02:00
|
|
|
$db2->update($this->user_table,array('cal_user_id' => $new_owner),$where,__LINE__,__FILE__);
|
2002-09-17 04:25:40 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-08-04 00:52:13 +02:00
|
|
|
$db2->delete($this->user_table,$where,__LINE__,__FILE__);
|
2002-09-17 04:25:40 +02:00
|
|
|
}
|
|
|
|
}
|
2004-08-04 00:52:13 +02:00
|
|
|
$this->db->update($this->table,array('cal_owner'=>$new_owner),array('cal_owner'=>$account_id),__LINE__,__FILE__);
|
2001-08-01 13:06:17 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-07-22 01:35:22 +02:00
|
|
|
function set_status($id,$status)
|
|
|
|
{
|
|
|
|
$this->cal->set_status($id,$this->owner,$status);
|
|
|
|
}
|
2001-07-18 19:32:10 +02:00
|
|
|
|
2003-08-28 16:31:11 +02:00
|
|
|
function get_alarm($cal_id)
|
2001-09-04 05:17:49 +02:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
if (!method_exists($this->cal,'get_alarm'))
|
2001-09-04 05:17:49 +02:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
return False;
|
2001-09-04 05:17:49 +02:00
|
|
|
}
|
2003-08-28 16:31:11 +02:00
|
|
|
return $this->cal->get_alarm($cal_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
function read_alarm($id)
|
|
|
|
{
|
|
|
|
if (!method_exists($this->cal,'read_alarm'))
|
2001-09-04 05:17:49 +02:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
return False;
|
|
|
|
}
|
|
|
|
return $this->cal->read_alarm($id);
|
|
|
|
}
|
|
|
|
|
|
|
|
function read_alarms($cal_id)
|
|
|
|
{
|
|
|
|
if (!method_exists($this->cal,'read_alarms'))
|
|
|
|
{
|
|
|
|
return False;
|
2001-09-04 05:17:49 +02:00
|
|
|
}
|
2003-08-28 16:31:11 +02:00
|
|
|
return $this->cal->read_alarms($cal_id);
|
2001-09-04 05:17:49 +02:00
|
|
|
}
|
|
|
|
|
2001-12-02 23:19:48 +01:00
|
|
|
function find_recur_exceptions($event_id)
|
|
|
|
{
|
|
|
|
if($GLOBALS['phpgw_info']['server']['calendar_type'] == 'sql')
|
|
|
|
{
|
|
|
|
$arr = Array();
|
2004-08-04 00:52:13 +02:00
|
|
|
$this->db->select($this->table,'cal_starttime',array('cal_reference'=>$event_id),__LINE__,__FILE__);
|
2001-12-02 23:19:48 +01:00
|
|
|
if($this->cal->num_rows())
|
|
|
|
{
|
|
|
|
while($this->cal->next_record())
|
|
|
|
{
|
2004-08-04 00:52:13 +02:00
|
|
|
$arr[] = (int)$this->cal->f('cal_starttime');
|
2001-12-02 23:19:48 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if(count($arr) == 0)
|
|
|
|
{
|
|
|
|
return False;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return $arr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return False;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-07-16 13:38:40 +02:00
|
|
|
/* Begin mcal equiv functions */
|
|
|
|
function get_cached_event()
|
|
|
|
{
|
|
|
|
return $this->cal->event;
|
|
|
|
}
|
|
|
|
|
2001-11-06 03:05:47 +01:00
|
|
|
function add_attribute($var,$value,$element='**(**')
|
2001-07-16 13:38:40 +02:00
|
|
|
{
|
2001-08-06 04:41:36 +02:00
|
|
|
$this->cal->add_attribute($var,$value,$element);
|
2001-07-16 13:38:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function event_init()
|
|
|
|
{
|
|
|
|
$this->cal->event_init();
|
|
|
|
}
|
|
|
|
|
2001-09-07 18:37:11 +02:00
|
|
|
function set_date($element,$year,$month,$day=0,$hour=0,$min=0,$sec=0)
|
|
|
|
{
|
|
|
|
$this->cal->set_date($element,$year,$month,$day,$hour,$min,$sec);
|
|
|
|
}
|
|
|
|
|
2001-07-16 13:38:40 +02:00
|
|
|
function set_start($year,$month,$day=0,$hour=0,$min=0,$sec=0)
|
|
|
|
{
|
|
|
|
$this->cal->set_start($year,$month,$day,$hour,$min,$sec);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_end($year,$month,$day=0,$hour=0,$min=0,$sec=0)
|
|
|
|
{
|
|
|
|
$this->cal->set_end($year,$month,$day,$hour,$min,$sec);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_title($title='')
|
|
|
|
{
|
|
|
|
$this->cal->set_title($title);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_description($description='')
|
|
|
|
{
|
|
|
|
$this->cal->set_description($description);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_class($class)
|
|
|
|
{
|
|
|
|
$this->cal->set_class($class);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_category($category='')
|
|
|
|
{
|
|
|
|
$this->cal->set_category($category);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_alarm($alarm)
|
|
|
|
{
|
|
|
|
$this->cal->set_alarm($alarm);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_recur_none()
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_none();
|
|
|
|
}
|
|
|
|
|
2004-10-15 19:40:22 +02:00
|
|
|
function set_recur_secondly($year,$month,$day,$interval)
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_secondly($year,$month,$day,$interval);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_recur_minutely($year,$month,$day,$interval)
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_minutely($year,$month,$day,$interval);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_recur_hourly($year,$month,$day,$interval)
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_hourly($year,$month,$day,$interval);
|
|
|
|
}
|
|
|
|
|
2001-07-16 13:38:40 +02:00
|
|
|
function set_recur_daily($year,$month,$day,$interval)
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_daily($year,$month,$day,$interval);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_recur_weekly($year,$month,$day,$interval,$weekdays)
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_weekly($year,$month,$day,$interval,$weekdays);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_recur_monthly_mday($year,$month,$day,$interval)
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_monthly_mday($year,$month,$day,$interval);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_recur_monthly_wday($year,$month,$day,$interval)
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_monthly_wday($year,$month,$day,$interval);
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_recur_yearly($year,$month,$day,$interval)
|
|
|
|
{
|
|
|
|
$this->cal->set_recur_yearly($year,$month,$day,$interval);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* End mcal equiv functions */
|
|
|
|
}
|
2002-09-17 05:03:16 +02:00
|
|
|
?>
|