checkAuth("admin"); $LANG = Core::$L; // update the administrator's account $success = true; $message = ""; if (isset($_POST) && !empty($_POST)) { list($success, $message) = Administrator::updateAdminAccount($_POST, Core::$user->getAccountId()); // if the user just changed their language file, reset the value in sessions and refresh the page if ($success && ($_POST["old_ui_language"] != $_POST["ui_language"])) { Sessions::set("ui_language", $_POST["ui_language"]); General::redirect("index.php?updated"); } } // here, the user has just changed their ui language if (isset($_GET["updated"])) { $success = true; $message = $LANG["notify_account_updated"]; } $admin_info = Administrator::getAdminInfo(); $replacement_info = array("datefunctionlink" => 'date()'); $LANG = Core::$L; // compile the theme variables $page_vars = array( "page" => "your_account", "g_success" => $success, "g_message" => $message, "page_url" => Pages::getPageUrl("your_account"), "head_title" => $LANG["phrase_your_account"], "admin_info" => $admin_info, "text_date_formatting_link" => General::evalSmartyString($LANG["text_date_formatting_link"], $replacement_info) ); $page_vars["head_js"] =<< 0 && $(swatch_id).val() == "") { return [[$(swatch_id)[0], "{$LANG["validation_no_theme_swatch"]}"]]; } return true; } function validate_username() { var username = $("input[name=username]").val(); if (username.match(/[^\.@a-zA-Z0-9_]/)) { return [[$("input[name=username]")[0], "{$LANG['validation_invalid_admin_username']}"]]; } return true; } $(function() { document.login_info.first_name.focus(); }); END; Themes::displayPage("admin/account/index.tpl", $page_vars);