PHP User::save_global_preference Examples

PHP User::save_global_preference - 2 examples found. These are the top rated real world PHP examples of User::save_global_preference extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
            echo '</p>';
            echo '<p style="text-align:center"> <a class="button" onclick="document.body.removeChild(document.getElementById(\'version_div\'))">' . _('Fermer') . "</a></p>";
            echo '</div>';
        }
    }
}
include_once "user_menu.php";
$priv = $User->admin == 1 ? _("Administrateur") : _("Utilisateur");
load_all_script();
if (isset($_POST['set_preference'])) {
    //// Save value
    extract($_POST);
    if (strlen(trim($pass_1)) != 0 && strlen(trim($pass_2)) != 0) {
        $User->save_password($pass_1, $pass_2);
    }
    $User->save_global_preference('THEME', $style_user);
    $User->save_global_preference('LANG', $lang);
    $_SESSION['g_theme'] = $style_user;
    $_SESSION['g_lang'] = $lang;
    $User->load();
    $User->save_email($p_email);
}
echo '<div class="welcome"> ';
/**
 *
 * If the user is NOT admin and can access only ONE folder,
 * so it will be directly redirected to this folder or to the plugins of this
 * folder if he's an "plugin user"
 */
if ($User->admin == 0) {
    // how many folder ?
    $folder = $User->get_available_folder();
Example #2
0
    $periode = $cn->get_value('select p_id from parm_periode order by p_start asc limit 1');
    $g_user->set_periode($periode);
}
$module_selected = -1;
/*
 * Set the user preference
 */
if (isset($_POST['set_preference'])) {
    //// Save value
    extract($_POST);
    if (strlen(trim($pass_1)) != 0 && strlen(trim($pass_2)) != 0) {
        $g_user->save_password($pass_1, $pass_2);
    }
    $g_user->set_periode($period);
    $g_user->save_global_preference('THEME', $style_user);
    $g_user->save_global_preference('LANG', $lang);
    $g_user->save_global_preference('PAGESIZE', $p_size);
    $g_user->set_mini_report($minirap);
    $_SESSION['g_theme'] = $style_user;
    $_SESSION['g_pagesize'] = $p_size;
    $_SESSION['g_lang'] = $lang;
    $g_user->save_email($p_email);
}
/*
 * if an action is requested
 */
if (isset($_REQUEST['ac'])) {
    // When debugging save all the input in a file
    if (LOGINPUT) {
        $file_loginput = fopen($_ENV['TMP'] . '/scenario-' . $_SERVER['REQUEST_TIME'] . '.php', 'a+');
        $tmp_ac = explode('/', trim(strtoupper($_REQUEST['ac'])));