⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delete_event.php

📁 groupoffice
💻 PHP
字号:
<?php/*Copyright Intermesh 2003Author: Merijn Schering <mschering@intermesh.nl>Version: 1.0 Release date: 08 July 2003This program is free software; you can redistribute it and/or modify itunder the terms of the GNU General Public License as published by theFree Software Foundation; either version 2 of the License, or (at youroption) any later version.*/require_once("../../Group-Office.php");$GO_SECURITY->authenticate();$GO_MODULES->authenticate('calendar');require_once($GO_LANGUAGE->get_language_file('calendar'));require_once($GO_MODULES->path.'classes/calendar.class.inc');$cal = new calendar();$task = isset($_POST['task']) ? $_POST['task'] : '';$return_to = isset($_REQUEST['return_to']) ? $_REQUEST['return_to'] : $_SERVER['HTTP_REFERER'];$event_id = isset($_REQUEST['event_id']) ? $_REQUEST['event_id'] : 0;$event = $cal->get_event($_REQUEST['event_id']);if ($event){	$event['write_permission'] = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $event['acl_write']);}else{	exit($strDataError);}switch($task){	case 'delete':	if ($event['write_permission'])	{		if(isset($_POST['exception_time']))		{			$exception['event_id'] = $event_id;			$exception['time'] = $_POST['exception_time'];			$cal->add_exception($exception);		}else		{			$cal->delete_event($event_id);		}	}	header('Location: '.$GO_MODULES->modules['calendar']['url']);	exit();	break;	case 'unsubscribe':		if ($calendar['write_permission'])		{			if ($cal->get_event_subscribtions($event_id) < 2)			{				$cal->delete_event($event_id);			}else			{				$cal->unsubscribe_event($event_id, $calendar_id);			}		}		header('Location: '.$GO_MODULES->modules['calendar']['url']);		exit();	break;}require_once($GO_THEME->theme_path.'header.inc');?><form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"><input type="hidden" name="event_id" value="<?php echo $event_id; ?>" /><input type="hidden" name="return_to" value="<?php echo $return_to; ?>" /><input type="hidden" name="task" value="<?php echo $task; ?>" /><?phpif(isset($_REQUEST['exception_time'])){	$input = new input('hidden', 'exception_time', $_REQUEST['exception_time']);	echo $input->get_html();}?><table border="0" cellpadding="2"><tr>	<td>	<table border="0" cellpadding="4">	<tr>		<td><img src="<?php echo $GO_THEME->images['questionmark']; ?>" border="0" /></td><td align="center"><h2><?php echo $sc_delete_event; ?></h2></td>	</tr>	</table>	</td></tr><tr>	<td>	<?php 	echo $strDeletePrefix." '".$event['name']."' ".$strDeleteSuffix; 	?></td></tr><tr>	<td>	<br />	<?php	if ($event['write_permission'])	{		$button = new button($cmdOk,"javascript:document.forms[0].task.value='delete';document.forms[0].submit();");		echo $button->get_html();	}else	{		$button = new button($cmdOk,"javascript:document.forms[0].task.value='unsubscribe';document.forms[0].submit();");		echo $button->get_html();	}	$button = new button($cmdCancel,"javascript:document.location='".$return_to."';");	echo $button->get_html();	?>	</td></tr></table></form><?phprequire_once($GO_THEME->theme_path.'footer.inc');?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -