| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
1 <?php // $Id: timezone.php,v 1.8.2.1 2008/05/02 04:07:28 dongsheng Exp $ 2 3 require_once ('../config.php'); 4 5 $zone = optional_param('zone', '', PARAM_PATH); //not a path, but it looks like it anyway 6 7 require_login(); 8 9 require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); 10 11 $strtimezone = get_string("timezone"); 12 $strsavechanges = get_string("savechanges"); 13 $strusers = get_string("users"); 14 $strall = get_string("all"); 15 16 print_header($strtimezone, $strtimezone, build_navigation(array(array('name' => $strtimezone, 'link' => null, 'type' => 'misc')))); 17 18 print_heading(""); 19 20 if (!empty($zone) and confirm_sesskey()) { 21 $db->debug = true; 22 echo "<center>"; 23 execute_sql("UPDATE {$CFG->prefix}user SET timezone = '$zone'"); 24 $db->debug = false; 25 echo "</center>"; 26 27 $USER->timezone = $zone; 28 } 29 30 require_once($CFG->dirroot.'/calendar/lib.php'); 31 $timezones = get_list_of_timezones(); 32 33 echo '<center><form action="timezone.php" method="get">'; 34 echo "$strusers ($strall): "; 35 choose_from_menu ($timezones, "zone", 99, get_string("serverlocaltime"), "", "99"); 36 echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />"; 37 echo "<input type=\"submit\" value=\"$strsavechanges\" />"; 38 echo "</form></center>"; 39 40 print_footer(); 41 42 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |