MDL-12796 iplookup rewrite
[moodle.git] / admin / settings / location.php
CommitLineData
1ea1bcb3 1<?php // $Id$
2
a559f630 3if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
4
220a90c5 5 // "locations" settingpage
6 $temp = new admin_settingpage('locationsettings', get_string('locationsettings', 'admin'));
7 $options = get_list_of_timezones();
8 $options[99] = get_string('serverlocaltime');
9 $temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
10 $options[99] = get_string('timezonenotforced', 'admin');
11 $temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
12 $options = get_list_of_countries();
13 $options[0] = get_string('choose') .'...';
14 $temp->add(new admin_setting_configselect('country', get_string('country', 'admin'), get_string('configcountry', 'admin'), 0, $options));
15
7c09710c 16 $temp->add(new admin_setting_heading('iplookup', get_string('iplookup', 'admin'), get_string('iplookupinfo', 'admin')));
17 $temp->add(new admin_setting_configfile('geoipfile', get_string('geoipfile', 'admin'), get_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLiteCity.dat'));
18 $temp->add(new admin_setting_configtext('googlemapkey', get_string('googlemapkey', 'admin'), get_string('configgooglemapkey', 'admin', $CFG->wwwroot), ''));
33b17c67 19
220a90c5 20 $ADMIN->add('location', $temp);
1ea1bcb3 21
22
220a90c5 23 $ADMIN->add('location', new admin_externalpage('timezoneimport', get_string('updatetimezones', 'admin'), "$CFG->wwwroot/$CFG->admin/timezoneimport.php"));
1ea1bcb3 24
a559f630 25} // end of speedup
26
1ea1bcb3 27?>