HEX
Server: Apache/2
System: Linux deejung.jaideehosting.com 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64
User: mbp (1631)
PHP: 7.4.15
Disabled: NONE
Upload Files
File: /home/mbp/domains/mbp.ac.th/public_html/old/main/admin/uploadpicture_form.php
<?php // $Id$

if (!defined('MOODLE_INTERNAL')) {
    die('Direct access to this script is forbidden.');    ///  It must be included from a Moodle page
}

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

class admin_uploadpicture_form extends moodleform {
    function definition (){
        global $CFG, $USER;

        $mform =& $this->_form;

        $this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false));

        $mform->addElement('header', 'settingsheader', get_string('upload'));

        $mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"');
        $mform->addRule('userpicturesfile', null, 'required');

        $choices =& $this->_customdata;
        $mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices);
        $mform->setType('userfield', PARAM_INT);

        $choices = array( 0 => get_string('no'), 1 => get_string('yes') );
        $mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
        $mform->setType('overwritepicture', PARAM_INT);

        $this->add_action_buttons(false, get_string('uploadpictures', 'admin'));
    }
}
?>