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 /
admin /
roles /
Delete
Unzip
Name
Size
Permission
Date
Action
classes
[ DIR ]
drwxr-sr-x
2017-06-22 14:51
tests
[ DIR ]
drwxr-sr-x
2017-06-22 14:51
admins.php
5.63
KB
-rw-r--r--
2017-06-22 14:51
ajax.php
2.66
KB
-rw-r--r--
2017-06-22 14:51
allow.php
2.86
KB
-rw-r--r--
2017-06-22 14:51
assign.php
12.04
KB
-rw-r--r--
2017-06-22 14:51
check.php
6.99
KB
-rw-r--r--
2017-06-22 14:51
define.php
10.56
KB
-rw-r--r--
2017-06-22 14:51
lib.php
2.16
KB
-rw-r--r--
2017-06-22 14:51
manage.php
7.78
KB
-rw-r--r--
2017-06-22 14:51
managetabs.php
1.57
KB
-rw-r--r--
2017-06-22 14:51
module.js
6.69
KB
-rw-r--r--
2017-06-22 14:51
override.php
7.49
KB
-rw-r--r--
2017-06-22 14:51
permissions.php
9.91
KB
-rw-r--r--
2017-06-22 14:51
role_schema.xml
2.67
KB
-rw-r--r--
2017-06-22 14:51
usersroles.php
8.28
KB
-rw-r--r--
2017-06-22 14:51
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/>. /** * Select site administrators. * * @package core_role * @copyright 2010 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(__DIR__ . '/../../config.php'); require_once($CFG->libdir.'/adminlib.php'); $confirmadd = optional_param('confirmadd', 0, PARAM_INT); $confirmdel = optional_param('confirmdel', 0, PARAM_INT); $PAGE->set_url('/admin/roles/admins.php'); admin_externalpage_setup('admins'); if (!is_siteadmin()) { die; } $admisselector = new core_role_admins_existing_selector(); $admisselector->set_extra_fields(array('username', 'email')); $potentialadmisselector = new core_role_admins_potential_selector(); $potentialadmisselector->set_extra_fields(array('username', 'email')); if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) { if ($userstoadd = $potentialadmisselector->get_selected_users()) { $user = reset($userstoadd); $username = fullname($user) . " ($user->username, $user->email)"; echo $OUTPUT->header(); $yesurl = new moodle_url('/admin/roles/admins.php', array('confirmadd'=>$user->id, 'sesskey'=>sesskey())); echo $OUTPUT->confirm(get_string('confirmaddadmin', 'core_role', $username), $yesurl, $PAGE->url); echo $OUTPUT->footer(); die; } } else if (optional_param('remove', false, PARAM_BOOL) and confirm_sesskey()) { if ($userstoremove = $admisselector->get_selected_users()) { $user = reset($userstoremove); if ($USER->id == $user->id) { // Can not remove self. } else { $username = fullname($user) . " ($user->username, $user->email)"; echo $OUTPUT->header(); $yesurl = new moodle_url('/admin/roles/admins.php', array('confirmdel'=>$user->id, 'sesskey'=>sesskey())); echo $OUTPUT->confirm(get_string('confirmdeladmin', 'core_role', $username), $yesurl, $PAGE->url); echo $OUTPUT->footer(); die; } } } else if (optional_param('main', false, PARAM_BOOL) and confirm_sesskey()) { if ($newmain = $admisselector->get_selected_users()) { $newmain = reset($newmain); $newmain = $newmain->id; $admins = array(); foreach (explode(',', $CFG->siteadmins) as $admin) { $admin = (int)$admin; if ($admin) { $admins[$admin] = $admin; } } if (isset($admins[$newmain])) { unset($admins[$newmain]); array_unshift($admins, $newmain); set_config('siteadmins', implode(',', $admins)); redirect($PAGE->url); } } } else if ($confirmadd and confirm_sesskey()) { $admins = array(); foreach (explode(',', $CFG->siteadmins) as $admin) { $admin = (int)$admin; if ($admin) { $admins[$admin] = $admin; } } $admins[$confirmadd] = $confirmadd; set_config('siteadmins', implode(',', $admins)); redirect($PAGE->url); } else if ($confirmdel and confirm_sesskey() and $confirmdel != $USER->id) { $admins = array(); foreach (explode(',', $CFG->siteadmins) as $admin) { $admin = (int)$admin; if ($admin) { $admins[$admin] = $admin; } } unset($admins[$confirmdel]); set_config('siteadmins', implode(',', $admins)); redirect($PAGE->url); } // Print header. echo $OUTPUT->header(); ?> <div id="addadmisform"> <h3 class="main"><?php print_string('manageadmins', 'core_role'); ?></h3> <form id="assignform" method="post" action="<?php echo $PAGE->url ?>"> <div> <input type="hidden" name="sesskey" value="<?php p(sesskey()); ?>" /> <table class="generaltable generalbox groupmanagementtable boxaligncenter" summary=""> <tr> <td id='existingcell'> <p> <label for="removeselect"><?php print_string('existingadmins', 'core_role'); ?></label> </p> <?php $admisselector->display(); ?> </td> <td id="buttonscell"> <p class="arrow_button"> <input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" class="btn btn-secondary"/><br /> <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').' '.$OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" class="btn btn-secondary"/><br /> <input name="main" id="main" type="submit" value="<?php echo get_string('mainadminset', 'core_role'); ?>" title="<?php print_string('mainadminset', 'core_role'); ?>" class="btn btn-secondary"/> </p> </td> <td id="potentialcell"> <p> <label for="addselect"><?php print_string('users'); ?></label> </p> <?php $potentialadmisselector->display(); ?> </td> </tr> </table> </div> </form> </div> <?php echo $OUTPUT->footer();