Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

user_pref.php

Go to the documentation of this file.
00001 <?
00002 /*
00003  *   This file is part of PhpCompta.
00004  *
00005  *   PhpCompta is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   PhpCompta is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with PhpCompta; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 
00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
00021 /* $Revision: 1.22 $ */
00026 include_once ("ac_common.php");
00027 include_once ("postgres.php");
00028 /* Admin. Dossier */
00029 $Rep=DbConnect();
00030 include_once ("class_user.php");
00031 $cn=DbConnect($_SESSION['g_dossier']);
00032 $User=new cl_user($cn);
00033 $User->Check();
00034 // Met a jour le theme utilisateur (style)
00035 if ( isset ( $_POST['style_user']) ) {
00036         $User->update_global_pref('THEME',$_POST['style_user']);
00037       $_SESSION['g_theme']=$_POST['style_user'];
00038 
00039 }
00040 
00041 html_page_start($_SESSION['g_theme']);
00042 
00043 // Met a jour le pagesize
00044 if ( isset ( $_POST['p_size']) ) {
00045         $User->update_global_pref('PAGESIZE',$_POST['p_size']);
00046       $_SESSION['g_pagesize']=$_POST['p_size'];
00047 
00048 }
00049 
00050 // show the top menu depending of the use_style
00051 // comta style
00052 
00053 include_once ("user_menu.php");
00054 if ( isset ($_SESSION['g_dossier']) ) {
00055   if ( $_SESSION['g_dossier'] != 0 )  
00056 echo '<div class="u_tmenu">';
00057 
00058 echo    ShowMenuCompta($_SESSION['g_dossier']);
00059  echo "</div>";
00060   }
00061 require_once("pref.inc.php");
00062 html_page_stop();
00063 ?>