当前位置: 首页>>代码示例>>PHP>>正文


PHP Agenda::delete_event方法代码示例

本文整理汇总了PHP中Agenda::delete_event方法的典型用法代码示例。如果您正苦于以下问题:PHP Agenda::delete_event方法的具体用法?PHP Agenda::delete_event怎么用?PHP Agenda::delete_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Agenda的用法示例。


在下文中一共展示了Agenda::delete_event方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: explode

     break;
 case 'edit_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $id_list = explode('_', $_REQUEST['id']);
     $id = $id_list[1];
     $agenda->edit_event($id, $_REQUEST['start'], $_REQUEST['end'], $_REQUEST['all_day'], $_REQUEST['view'], $_REQUEST['title'], $_REQUEST['content']);
     break;
 case 'delete_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $id_list = explode('_', $_REQUEST['id']);
     $id = $id_list[1];
     $agenda->delete_event($id);
     break;
 case 'resize_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $day_delta = $_REQUEST['day_delta'];
     $minute_delta = $_REQUEST['minute_delta'];
     $id = explode('_', $_REQUEST['id']);
     $id = $id[1];
     $agenda->resize_event($id, $day_delta, $minute_delta);
     break;
 case 'move_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:agenda.ajax.php

示例2: isset

 }
 $event['action'] = 'edit';
 $event['id'] = $eventId;
 $form = $agenda->getForm($event);
 if ($form->validate()) {
     $values = $form->getSubmitValues();
     $allDay = isset($values['all_day']) ? 'true' : 'false';
     $startDate = $values['date_range_start'];
     $endDate = $values['date_range_end'];
     $sendAttachment = isset($_FILES['user_upload']) ? true : false;
     $attachment = $sendAttachment ? $_FILES['user_upload'] : null;
     $attachmentComment = isset($values['file_comment']) ? $values['file_comment'] : null;
     $comment = isset($values['comment']) ? $values['comment'] : null;
     // This is a sub event. Delete the current and create another BT#7803
     if (!empty($event['parent_event_id'])) {
         $agenda->delete_event($eventId);
         $eventId = $agenda->addEvent($startDate, $endDate, $allDay, $values['title'], $values['content'], $values['users_to_send'], false, null, $attachment, $attachmentComment, $comment);
         Display::return_message(get_lang('Updated'), 'confirmation');
         header("Location: {$agendaUrl}");
         exit;
     }
     // Editing normal event.
     $agenda->editEvent($eventId, $startDate, $endDate, $allDay, $values['title'], $values['content'], $values['users_to_send'], $attachment, $attachmentComment, $comment);
     if (!empty($values['repeat']) && !empty($eventId)) {
         // End date is always set as 23:59:59
         $endDate = substr($values['repeat_end_day'], 0, 10) . ' 23:59:59';
         $agenda->addRepeatedItem($eventId, $values['repeat_type'], $endDate, $values['users_to_send']);
     }
     $deleteAttachment = isset($values['delete_attachment']) ? true : false;
     if ($deleteAttachment && isset($event['attachment']) && !empty($event['attachment'])) {
         $agenda->deleteAttachmentFile($event['attachment']['id'], $agenda->course);
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:agenda.php

示例3: explode

 case 'edit_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $id_list = explode('_', $_REQUEST['id']);
     $id = $id_list[1];
     $agenda->editEvent($id, $_REQUEST['start'], $_REQUEST['end'], $_REQUEST['all_day'], $_REQUEST['title'], $_REQUEST['content']);
     break;
 case 'delete_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $id_list = explode('_', $_REQUEST['id']);
     $id = $id_list[1];
     $deleteAllEventsFromSerie = isset($_REQUEST['delete_all_events']) ? true : false;
     $agenda->delete_event($id, $deleteAllEventsFromSerie);
     break;
 case 'resize_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $day_delta = $_REQUEST['day_delta'];
     $minute_delta = $_REQUEST['minute_delta'];
     $id = explode('_', $_REQUEST['id']);
     $id = $id[1];
     $agenda->resize_event($id, $day_delta, $minute_delta);
     break;
 case 'move_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:agenda.ajax.php


注:本文中的Agenda::delete_event方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。