/[phpcompta]/phpcompta/include/user_action_ods.php
ViewVC logotype

Diff of /phpcompta/include/user_action_ods.php

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

revision 1.19 by sparkyx, Sat Aug 27 20:42:49 2005 UTC revision 1.20 by sparkyx, Sun Oct 23 18:56:01 2005 UTC
# Line 49  if ( $action == 'new' ) { Line 49  if ( $action == 'new' ) {
49            // add a one-line calculator            // add a one-line calculator
50    
51    
52            $r=FormODS($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,null,false);            $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,null,false);
53            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
54            echo $r;            echo $r;
55            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
# Line 68  if ( $action == 'new' ) { Line 68  if ( $action == 'new' ) {
68            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
69                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
70    
71            $r=FormODS($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);            $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
72            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
73            echo $r;            echo $r;
74            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
# Line 83  if ( $action == 'new' ) { Line 83  if ( $action == 'new' ) {
83            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">            $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
84                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
85    
86            $r=FormODS($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);            $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
87            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
88            echo $r;            echo $r;
89            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";            echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
# Line 99  if ( $action == 'new' ) { Line 99  if ( $action == 'new' ) {
99            $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';            $submit='<INPUT TYPE="SUBMIT" name="save" value="Confirmer">';
100            $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';            $submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
101    
102            $r=FormODS($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,true,$nb_number);            $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,$nb_number);
103    
104          // if something goes wrong, correct it          // if something goes wrong, correct it
105            if ( $r == null ) {            if ( $r == null ) {
# Line 107  if ( $action == 'new' ) { Line 107  if ( $action == 'new' ) {
107              $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">              $submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout Poste">
108                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';                      <INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Sauver">';
109                            
110              $r=FormODS($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,false,  $nb_number);              $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false,  $nb_number);
111            }            }
112            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
113            echo $r;            echo $r;
# Line 116  if ( $action == 'new' ) { Line 116  if ( $action == 'new' ) {
116          }          }
117          // Save the change into database          // Save the change into database
118          if ( isset($_POST['save'] )) {          if ( isset($_POST['save'] )) {
119            $r=RecordODS($cn,$HTTP_POST_VARS,$_SESSION['g_user'],$_GET['p_jrn']);            $r=RecordODS($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']);
120            // Get number of  lines            // Get number of  lines
121            $nb_number=$_POST["nb_item"];            $nb_number=$_POST["nb_item"];
122    
123            // submit button in the form            // submit button in the form
124            $submit='<h2 class="info">Recorded</h2>';            $submit='<h2 class="info">Recorded</h2>';
125    
126            $r.=FormODS($cn,$_GET['p_jrn'],$_SESSION['g_user'],$submit,$HTTP_POST_VARS,true,  $nb_number,true);            $r.=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,  $nb_number,true);
127            echo '<div class="u_redcontent">';            echo '<div class="u_redcontent">';
128            echo $r;            echo $r;
129            echo "</div>";            echo "</div>";

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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