芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/public_html/cepali/admin/timezone.php
set_url('/admin/timezone.php'); $PAGE->set_context(context_system::instance()); require_login(); require_capability('moodle/site:config', context_system::instance()); $strtimezone = get_string("timezone"); $strsavechanges = get_string("savechanges"); $strusers = get_string("users"); $strall = get_string("all"); $PAGE->set_title($strtimezone); $PAGE->set_heading($strtimezone); $PAGE->navbar->add($strtimezone); echo $OUTPUT->header(); echo $OUTPUT->heading(""); if (data_submitted() and !empty($zone) and confirm_sesskey()) { echo "
"; $DB->execute("UPDATE {user} SET timezone = ?", array($zone)); echo "
"; $USER->timezone = $zone; $current = $zone; echo $OUTPUT->notification('Timezone of all users changed', 'notifysuccess'); } else { $current = 99; } require_once($CFG->dirroot.'/calendar/lib.php'); $timezones = core_date::get_list_of_timezones(null, true); echo '
'; echo html_writer::label($strusers . ' (' . $strall . '): ', 'menuzone'); echo html_writer::select($timezones, "zone", $current); echo "
"; echo '
'; echo "
"; echo $OUTPUT->footer();