Exemple #1
0
if (empty($profiles['count'])) {
    $template->assign_var('S_NO_PROFILE', true);
    $page = $page == 'main' || $page == '' ? 'settings' : $page;
}
$template->assign_var('CONFIG_TEXT', false);
// If there is a language selected in the dropdown menu in settings it's sent as GET, then igonre the hidden POST field.
if (isset($_GET['lang'])) {
    $language = request_var('lang', '');
} else {
    if (!empty($_POST['sel_lang'])) {
        $language = request_var('sel_lang', '');
    } else {
        $language = '';
    }
}
$settings->apply_language($language);
// Updated settings?
if (legacy_request_var('update_all', false)) {
    $settings->update_profiles();
} else {
    if (!empty($settings->update_text)) {
        $update_title = sprintf($user->lang['PROFILE_UPDATED'], $settings->profile);
        $update_explain = sprintf($user->lang['UPDATED_EXPLAIN'], QI_VERSION);
        $update_msg = '<ul>';
        foreach ($settings->update_text as $update) {
            $update_msg .= '<li>' . $user->lang[$update] . '</li>';
        }
        $update_msg .= '</ul>';
        gen_error_msg($update_msg, $update_title, $update_explain, true);
    }
}