本文整理汇总了PHP中calendar::subscribe_event方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::subscribe_event方法的具体用法?PHP calendar::subscribe_event怎么用?PHP calendar::subscribe_event使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calendar
的用法示例。
在下文中一共展示了calendar::subscribe_event方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: calendar
//date('Ymd', time())
require "../../Group-Office.php";
if ($calendar_module = $GO_MODULES->get_module('calendar')) {
require $calendar_module['path'] . "classes/calendar.class.inc";
}
$cal = new calendar();
require $GO_LANGUAGE->get_language_file('calendar');
//echo '1=='.$_REQUEST['event_id'];
$getevent = $cal->get_event($_REQUEST['event_id']);
//echo '2=='.$getevent['end_time'].'-->'.time();
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (isset($_POST['calendars'])) {
$cal->set_event_status($_REQUEST['event_id'], '1', $_POST['email']);
while ($calendar_id = array_shift($_POST['calendars'])) {
if (!$cal->event_is_subscribed($_POST['event_id'], $calendar_id)) {
if ($cal->subscribe_event($_POST['event_id'], $calendar_id)) {
if (!$cal->set_event_status($_POST['event_id'], '1', $_POST['email'])) {
$error = true;
}
} else {
$error = true;
}
}
}
require $GO_THEME->theme_path . 'header.inc';
require_once $GO_CONFIG->root_path . 'lib/tkdlib.php';
if ($getevent['end_time'] <= time()) {
alert($sc_no_ok_in_past);
}
echo '<table border="0" cellpadding="10" cellspacing="0"><tr><td><h1>' . $sc_accept_title . '</h1>';
echo $sc_accept_confirm;
示例2: calendar
break;
case 'everybody_write':
$GO_SECURITY->add_group_to_acl($GO_CONFIG->group_everyone, $acl_write);
break;
}
}
}
if (!isset($feedback)) {
//enter the event in all selected calendars
$cal2 = new calendar();
$cal->get_authorised_calendars($GO_SECURITY->user_id);
while ($cal->next_record()) {
if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $cal->f('acl_write'))) {
if (in_array($cal->f('id'), $_POST['calendars'])) {
if (!$cal2->event_is_subscribed($event_id, $cal->f('id'))) {
$cal2->subscribe_event($event_id, $cal->f('id'));
}
} else {
if ($cal2->event_is_subscribed($event_id, $cal->f('id'))) {
$cal2->unsubscribe_event($event_id, $cal->f('id'));
}
}
}
}
//set the reminder
if ($_POST['reminder'] > 0) {
$next_recurrence_time = $cal->get_next_recurrence_time($event_id);
$remind_time = $next_recurrence_time - $_POST['reminder'];
$cal->insert_reminder($GO_SECURITY->user_id, $event_id, $remind_time);
}
if (trim($_POST['to']) != '' && $send_invitation) {