3 require_once('../config.php');
5 $zone = optional_param('zone', '', PARAM_PATH
); //not a path, but it looks like it anyway
10 error("You must be an admin");
13 $strtimezone = get_string("timezone");
14 $strsavechanges = get_string("savechanges");
15 $strusers = get_string("users");
16 $strall = get_string("all");
18 print_header($strtimezone, $strtimezone, $strtimezone);
22 if (!empty($zone) and confirm_sesskey()) {
25 execute_sql("UPDATE {$CFG->prefix}user SET timezone = '$zone'");
29 $USER->timezone
= $zone;
32 require_once($CFG->dirroot
.'/calendar/lib.php');
33 $timezones = get_list_of_timezones();
35 echo '<center><form action="timezone.php" method="get">';
36 echo "$strusers ($strall): ";
37 choose_from_menu ($timezones, "zone", 99, get_string("serverlocaltime"), "", "99");
38 echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\">";
39 echo "<input type=\"submit\" value=\"$strsavechanges\">";
40 echo "</form></center>";