本文整理匯總了PHP中calendar::update_event方法的典型用法代碼示例。如果您正苦於以下問題:PHP calendar::update_event方法的具體用法?PHP calendar::update_event怎麽用?PHP calendar::update_event使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類calendar
的用法示例。
在下文中一共展示了calendar::update_event方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$fri = isset($_POST['repeat_days_4']) ? '1' : '0';
$sat = isset($_POST['repeat_days_5']) ? '1' : '0';
$sun = isset($_POST['repeat_days_6']) ? '1' : '0';
break;
case -1:
$mon = isset($_POST['repeat_days_2']) ? '1' : '0';
$tue = isset($_POST['repeat_days_3']) ? '1' : '0';
$wed = isset($_POST['repeat_days_4']) ? '1' : '0';
$thu = isset($_POST['repeat_days_5']) ? '1' : '0';
$fri = isset($_POST['repeat_days_6']) ? '1' : '0';
$sat = isset($_POST['repeat_days_0']) ? '1' : '0';
$sun = isset($_POST['repeat_days_1']) ? '1' : '0';
break;
}
if ($event_id > 0) {
if (!$cal->update_event($event_id, $start_time, $end_time, $all_day_event, $name, smart_addslashes($_POST['description']), $_POST['contact_id'], $_POST['reminder'], smart_addslashes($_POST['location']), $_POST['background'], $_POST['repeat_type'], $repeat_end_time, $month_time, $repeat_forever, $repeat_every, $mon, $tue, $wed, $thu, $fri, $sat, $sun)) {
$feedback .= '<p class="Error">' . $strSaveError . '</p>';
} else {
if ($event = $cal->get_event($event_id)) {
switch ($_POST['permissions']) {
case 'everybody_read':
$GO_SECURITY->delete_group_from_acl($GO_CONFIG->group_everyone, $event['acl_write']);
if (!$GO_SECURITY->group_in_acl($GO_CONFIG->group_everyone, $event['acl_read'])) {
$GO_SECURITY->add_group_to_acl($GO_CONFIG->group_everyone, $event['acl_read']);
}
break;
case 'everybody_write':
$GO_SECURITY->delete_group_from_acl($GO_CONFIG->group_everyone, $event['acl_read']);
if (!$GO_SECURITY->group_in_acl($GO_CONFIG->group_everyone, $event['acl_write'])) {
$GO_SECURITY->add_group_to_acl($GO_CONFIG->group_everyone, $event['acl_write']);
}