Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
.
/**
* Displays IP address on map.
*
* This script is not compatible with IPv6.
*
* @package core_iplookup
* @copyright 2008 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require('../config.php');
require_once('lib.php');
require_login(0, false);
if (isguestuser()) {
// Guest users cannot perform lookups.
throw new require_login_exception('Guests are not allowed here.');
}
$ip = optional_param('ip', getremoteaddr(), PARAM_RAW);
$user = optional_param('user', 0, PARAM_INT);
if (isset($CFG->iplookup)) {
// Clean up of old settings.
set_config('iplookup', NULL);
}
$PAGE->set_url('/iplookup/index.php', array('id'=>$ip, 'user'=>$user));
$PAGE->set_pagelayout('popup');
$PAGE->set_context(context_system::instance());
$info = array($ip);
$note = array();
if (cleanremoteaddr($ip) === false) {
throw new \moodle_exception('invalidipformat', 'error');
}
if (!ip_is_public($ip)) {
throw new \moodle_exception('iplookupprivate', 'error');
}
$info = iplookup_find_location($ip);
if ($info['error']) {
// Can not display.
notice($info['error']);
}
if ($user) {
if ($user = $DB->get_record('user', array('id'=>$user, 'deleted'=>0))) {
// note: better not show full names to everybody
if (has_capability('moodle/user:viewdetails', context_user::instance($user->id))) {
array_unshift($info['title'], fullname($user));
}
}
}
array_unshift($info['title'], $ip);
$title = implode(' - ', $info['title']);
$PAGE->set_title(get_string('iplookup', 'admin').': '.$title);
$PAGE->set_heading($title);
echo $OUTPUT->header();
if (empty($CFG->googlemapkey3)) {
$imgwidth = 620;
$imgheight = 310;
$dotwidth = 18;
$dotheight = 30;
$dx = round((($info['longitude'] + 180) * ($imgwidth / 360)) - $imgwidth - $dotwidth/2);
$dy = round((($info['latitude'] + 90) * ($imgheight / 180)));
echo '';
echo '

';
echo '

';
echo '
';
echo ''.$info['note'].'
';
} else {
if (is_https()) {
$PAGE->requires->js(new moodle_url('https://maps.googleapis.com/maps/api/js', array('key'=>$CFG->googlemapkey3, 'sensor'=>'false')));
} else {
$PAGE->requires->js(new moodle_url('http://maps.googleapis.com/maps/api/js', array('key'=>$CFG->googlemapkey3, 'sensor'=>'false')));
}
$module = array('name'=>'core_iplookup', 'fullpath'=>'/iplookup/module.js');
$PAGE->requires->js_init_call('M.core_iplookup.init3', array($info['latitude'], $info['longitude'], $ip), true, $module);
echo '';
echo ''.$info['note'].'
';
}
echo $OUTPUT->footer();