egroupware/calendar/delete.php

38 lines
1.7 KiB
PHP
Raw Normal View History

2000-08-18 05:24:22 +02:00
<?php
/**************************************************************************\
* phpGroupWare - Calendar *
* http://www.phpgroupware.org *
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
* http://www.radix.net/~cknudsen *
2001-01-17 13:35:43 +01:00
* Modified by Mark Peters <skeeter@phpgroupware.org> *
2000-08-18 05:24:22 +02:00
* -------------------------------------------- *
* 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$ */
$phpgw_flags = Array(
'currentapp' => 'calendar',
'noheader' => True,
'nonavbar' => True
);
$phpgw_info['flags'] = $phpgw_flags;
include('../header.inc.php');
2000-08-18 05:24:22 +02:00
2001-05-24 13:23:29 +02:00
$phpgw->calendar->open('INBOX',$owner,'');
$event = $phpgw->calendar->fetch_event(intval($id));
2001-03-04 19:37:08 +01:00
if(($id > 0) && ($event->owner == $owner) && ($phpgw->calendar->check_perms(PHPGW_ACL_DELETE) == True))
{
2001-03-04 19:37:08 +01:00
$thisyear = $event->start->year;
$thismonth = $event->start->month;
$thisday = $event->start->mday;
2000-08-18 05:24:22 +02:00
2001-05-24 13:23:29 +02:00
$phpgw->calendar->delete_event(intval($id));
$phpgw->calendar->expunge();
}
2000-08-18 05:24:22 +02:00
Header('Location: '.$phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/index.php','year='.$thisyear.'&month='.$thismonth.'&day='.$thisday.'&owner='.$owner));
2000-12-01 05:25:39 +01:00
?>