/[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.16 by sparkyx, Mon Oct 10 08:10:30 2005 UTC revision 1.17 by sparkyx, Sun Oct 23 18:58:08 2005 UTC
# Line 22  Line 22 
22  include_once ("ac_common.php");  include_once ("ac_common.php");
23  include_once ("postgres.php");  include_once ("postgres.php");
24  /* Admin. Dossier */  /* Admin. Dossier */
25  $rep=DbConnect();  $Rep=DbConnect();
26  include_once ("class_user.php");  include_once ("class_user.php");
27  $User=new cl_user($rep);  $cn=DbConnect($_SESSION['g_dossier']);
28    $User=new cl_user($cn);
29  $User->Check();  $User->Check();
30    
31  // Met a jour le theme utilisateur (style)  // Met a jour le theme utilisateur (style)
32  if ( isset ( $_POST['style_user']) ) {  if ( isset ( $_POST['style_user']) ) {
33    $CnRepo=DbConnect();         $Res=ExecSql($Rep,
       $Res=ExecSql($CnRepo,  
34                     "update ac_users set use_theme='".$_POST['style_user'].                     "update ac_users set use_theme='".$_POST['style_user'].
35                     "'  where use_login='".$_SESSION['g_user']."'");                     "'  where use_login='".$_SESSION['g_user']."'");
36   //     echo '<H2 class="info"> Theme utilisateur changé </H1>';   //     echo '<H2 class="info"> Theme utilisateur changé </H1>';
# Line 60  if ( isset ($_POST['spass']) ) { Line 60  if ( isset ($_POST['spass']) ) {
60  <?  <?
61      }      }
62      else {      else {
       $Cn=DbConnect();  
63        $l_pass=md5($_POST['pass_1']);        $l_pass=md5($_POST['pass_1']);
64        $Res=ExecSql($Cn,"update ac_users set use_pass='$l_pass' where use_login='".$_SESSION['g_user']."'");        $Res=ExecSql($Rep,"update ac_users set use_pass='$l_pass' where use_login='".$_SESSION['g_user']."'");
65        $pass=$pass_1;        $pass=$pass_1;
66        $_SESSION['g_pass']=$_POST['pass_1'];        $_SESSION['g_pass']=$_POST['pass_1'];
67        $g_pass=$pass_1;        $g_pass=$pass_1;
# Line 70  if ( isset ($_POST['spass']) ) { Line 69  if ( isset ($_POST['spass']) ) {
69    }    }
70  // Met a jour le theme utilisateur (style)  // Met a jour le theme utilisateur (style)
71  if ( isset ( $_POST['style_user']) ) {  if ( isset ( $_POST['style_user']) ) {
72    $CnRepo=DbConnect();        $Res=ExecSql($Rep,
       $Res=ExecSql($CnRepo,  
73                     "update ac_users set use_theme='".$_POST['style_user'].                     "update ac_users set use_theme='".$_POST['style_user'].
74                     "'  where use_login='".$_SESSION['g_user']."'");                     "'  where use_login='".$_SESSION['g_user']."'");
75   //     echo '<H2 class="info"> Theme utilisateur changé </H1>';   //     echo '<H2 class="info"> Theme utilisateur changé </H1>';
# Line 90  if ( isset ( $_POST['style_user']) ) { Line 88  if ( isset ( $_POST['style_user']) ) {
88  </FORM>  </FORM>
89  <?  <?
90  // charge tous les styles  // charge tous les styles
91  $cnRepo=DbConnect();  $res=ExecSql($Rep,"select the_name from theme
 $res=ExecSql($cnRepo,"select the_name from theme  
92                        order by the_name");                        order by the_name");
93  for ($i=0;$i < pg_NumRows($res);$i++){  for ($i=0;$i < pg_NumRows($res);$i++){
94    $st=pg_fetch_array($res,$i);    $st=pg_fetch_array($res,$i);
# Line 128  $disp_style.="</SELECT>"; Line 125  $disp_style.="</SELECT>";
125  if ( isset ($_SESSION['g_dossier']) ) {  if ( isset ($_SESSION['g_dossier']) ) {
126    
127    include_once("preference.php");    include_once("preference.php");
128    $cn=DbConnect($_SESSION['g_dossier']);  
129    
130    if ( isset ($_POST["sub_periode"] ) ) {    if ( isset ($_POST["sub_periode"] ) ) {
131      $periode=$_POST["periode"];      $periode=$_POST["periode"];
132      SetUserPeriode($cn,$periode,$_SESSION['g_user']);      $User->SetPeriode($periode);
133        //    SetUserPeriode($cn,$periode,$_SESSION['g_user']);
134    }    }
135    
136    $l_user_per=GetUserPeriode($cn,$_SESSION['g_user']);    $l_user_per=$User->GetPeriode();
137    $l_form_per=FormPeriode($cn,$l_user_per);    $l_form_per=FormPeriode($cn,$l_user_per);
138    
139  ?>  ?>

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

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