本文整理汇总了PHP中calendar::unsubscribe_event方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::unsubscribe_event方法的具体用法?PHP calendar::unsubscribe_event怎么用?PHP calendar::unsubscribe_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calendar
的用法示例。
在下文中一共展示了calendar::unsubscribe_event方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: calendar
}
}
}
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) {
//remove participants and add them if invitation is sent succesfully
$cal->remove_participants($event_id);
$send_invitation = false;
//send an invitation mail to all participants
示例2: header
{
$return_to = $query_str['return_to'];
}
}*/
header('Location: ' . $return_to);
exit;
break;
case 'unsubscribe':
if ($calendar['write_permission']) {
if ($cal->get_event_subscribtions($event_id) < 2) {
if ($cal->delete_event($event_id)) {
$GO_SECURITY->delete_acl($event['acl_read']);
$GO_SECURITY->delete_acl($event['acl_write']);
}
} else {
$cal->unsubscribe_event($event_id, $calendar_id);
}
}
/*$return_to_url = $GO_MODULES->url;
if ($return_to_url = parse_url($return_to))
{
if (isset($return_to_url['query']))
{
parse_str($return_to_url['query'], $query_str);
if (isset($query_str['return_to']))
{
$return_to = $query_str['return_to'];
}
}
}*/
header('Location: ' . $return_to);