/[phpcompta]/phpcompta/html/user_pref.php
ViewVC logotype

Diff of /phpcompta/html/user_pref.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by sparkyx, Sun Oct 23 18:58:08 2005 UTC revision 1.18 by sparkyx, Tue Oct 25 12:10:26 2005 UTC
# Line 27  include_once ("class_user.php"); Line 27  include_once ("class_user.php");
27  $cn=DbConnect($_SESSION['g_dossier']);  $cn=DbConnect($_SESSION['g_dossier']);
28  $User=new cl_user($cn);  $User=new cl_user($cn);
29  $User->Check();  $User->Check();
   
30  // Met a jour le theme utilisateur (style)  // Met a jour le theme utilisateur (style)
31  if ( isset ( $_POST['style_user']) ) {  if ( isset ( $_POST['style_user']) ) {
32         $Res=ExecSql($Rep,        $Res=ExecSql($Rep,
33                     "update ac_users set use_theme='".$_POST['style_user'].                     "update user_global_pref set parameter_value='".$_POST['style_user'].
34                     "'  where use_login='".$_SESSION['g_user']."'");                     "'  where user_id='".$_SESSION['g_user']."' and parameter_type='THEME'");
35   //     echo '<H2 class="info"> Theme utilisateur changé </H1>';   //     echo '<H2 class="info"> Theme utilisateur changé </H1>';
36        $_SESSION['use_theme']=$_POST['style_user'];        $_SESSION['g_theme']=$_POST['style_user'];
37    
38  }  }
39    
40  html_page_start($_SESSION['use_theme']);  html_page_start($_SESSION['g_theme']);
41    
42  // show the top menu depending of the use_style  // show the top menu depending of the use_style
43  // comta style  // comta style
# Line 67  if ( isset ($_POST['spass']) ) { Line 66  if ( isset ($_POST['spass']) ) {
66        $g_pass=$pass_1;        $g_pass=$pass_1;
67      }      }
68    }    }
 // Met a jour le theme utilisateur (style)  
 if ( isset ( $_POST['style_user']) ) {  
       $Res=ExecSql($Rep,  
                    "update ac_users set use_theme='".$_POST['style_user'].  
                    "'  where use_login='".$_SESSION['g_user']."'");  
  //     echo '<H2 class="info"> Theme utilisateur changé </H1>';  
       $_SESSION['use_theme']=$_POST['style_user'];  
   
 }  
69    
70  ?>  ?>
71  <H2 CLASS="info"> Password</H2>  <H2 CLASS="info"> Password</H2>
# Line 97  for ($i=0;$i < pg_NumRows($res);$i++){ Line 87  for ($i=0;$i < pg_NumRows($res);$i++){
87  // Formatte le display  // Formatte le display
88  $disp_style="<SELECT NAME=\"style_user\" >";  $disp_style="<SELECT NAME=\"style_user\" >";
89  foreach ($style as $st){  foreach ($style as $st){
90    if ( $st == $_SESSION['use_theme'] ) {    if ( $st == $_SESSION['g_theme'] ) {
91      $disp_style.='<OPTION VALUE="'.$st.'" SELECTED>'.$st;      $disp_style.='<OPTION VALUE="'.$st.'" SELECTED>'.$st;
92    } else {    } else {
93      $disp_style.='<OPTION VALUE="'.$st.'">'.$st;      $disp_style.='<OPTION VALUE="'.$st.'">'.$st;

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26