| Server IP : 104.21.80.248 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/myschool/triamudom/tuprblearn/userpix/ |
Upload File : |
<?php
// This simple script displays all the users with pictures on one page.
// By default it is not linked anywhere on the site. If you want to
// make it available you should link it in yourself from somewhere.
// Remember also to comment or delete the lines restricting access
// to administrators only (see below)
require('../config.php');
$PAGE->set_url('/userpix/index.php');
require_login();
/// Remove the following three lines if you want everyone to access it
$syscontext = context_system::instance();
require_capability('moodle/site:config', $syscontext);
$title = get_string("users");
$PAGE->set_context($syscontext);
$PAGE->navbar->add($title);
$PAGE->set_title($title);
$PAGE->set_heading($title);
echo $OUTPUT->header();
$rs = $DB->get_recordset_select("user", "deleted = 0 AND picture > 0", array(), "lastaccess DESC", user_picture::fields());
foreach ($rs as $user) {
$fullname = s(fullname($user));
echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=1\" ".
"title=\"$fullname\">";
echo $OUTPUT->user_picture($user);
echo "</a> \n";
}
$rs->close();
echo $OUTPUT->footer();