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


PHP Agenda::deleteAttachmentFile方法代码示例

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


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

示例1: header

             $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);
         }
         Display::return_message(get_lang('Updated'), 'confirmation');
         header("Location: {$agendaUrl}");
         exit;
     } else {
         $content = $form->returnForm();
     }
     break;
 case 'importical':
     $actionName = get_lang('Import');
     $form = $agenda->getImportCalendarForm();
     $content = $form->return_form();
     if ($form->validate()) {
         $ical_name = $_FILES['ical_import']['name'];
         $ical_type = $_FILES['ical_import']['type'];
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:agenda.php

示例2: header

             Display::return_message(get_lang('Updated'), 'confirmation');
             header("Location: {$agendaUrl}");
             exit;
         }
         $usersToSend = isset($values['users_to_send']) ? $values['users_to_send'] : '';
         // Editing normal event.
         $agenda->editEvent($eventId, $startDate, $endDate, $allDay, $values['title'], $values['content'], $usersToSend, $attachmentList, $attachmentCommentList, $comment, '', $sendEmail);
         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']);
         }
         $deleteAttachmentList = isset($values['delete_attachment']) ? $values['delete_attachment'] : array();
         if (!empty($deleteAttachmentList)) {
             foreach ($deleteAttachmentList as $deleteAttachmentId => $value) {
                 $agenda->deleteAttachmentFile($deleteAttachmentId, $agenda->course);
             }
         }
         Display::return_message(get_lang('Updated'), 'confirmation');
         header("Location: {$agendaUrl}");
         exit;
     } else {
         $content = $form->returnForm();
     }
     break;
 case 'importical':
     $actionName = get_lang('Import');
     $form = $agenda->getImportCalendarForm();
     $content = $form->returnForm();
     if ($form->validate()) {
         $ical_name = $_FILES['ical_import']['name'];
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:agenda.php


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