From 8c3a596a79da67a2c0230805cc3f2d545093bf4f Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 29 Mar 2007 19:51:31 +0000 Subject: [PATCH] Suhosin fix --- html/fiche.php | 2 +- html/fiche_new.php | 2 +- html/fiche_search.php | 2 +- html/form.php | 6 +++--- html/form_pdf.php | 2 +- html/line_update.php | 2 +- html/poste_pdf.php | 2 +- html/poste_search.php | 2 +- html/print_balance.php | 2 +- html/priv_user.php | 4 ++-- html/send_jrn_pdf.php | 2 +- html/send_poste_pdf.php | 2 +- html/user_sec.php | 2 +- include/class_document.php | 6 +++--- include/constant.php | 2 +- include/facture.inc.php | 6 +++--- include/fiche.inc.php | 2 +- include/modele.inc.php | 2 +- include/periode.inc.php | 6 +++--- include/user_action_ach.php | 16 ++++++++-------- include/user_action_fin.php | 14 +++++++------- include/user_action_ods.php | 16 ++++++++-------- include/user_action_ven.php | 20 ++++++++++---------- 23 files changed, 61 insertions(+), 61 deletions(-) diff --git a/html/fiche.php b/html/fiche.php index e20be7958..5e2aae3a5 100644 --- a/html/fiche.php +++ b/html/fiche.php @@ -92,7 +92,7 @@ function ShowFicheDefInput($p_fiche_def) if ( isset($_POST['add_modele']) and $write != 0) { // insert the model of card in database $fiche_def=new fiche_def($cn); - $fiche_def->Add($HTTP_POST_VARS); + $fiche_def->Add($_POST); } $r=""; // Add a line in the card model diff --git a/html/fiche_new.php b/html/fiche_new.php index 2f90ee00c..24d3977be 100644 --- a/html/fiche_new.php +++ b/html/fiche_new.php @@ -53,7 +53,7 @@ if ( $User->CheckAction($cn,FICHE_WRITE)== 0) { include_once("fiche_inc.php"); -foreach ($HTTP_GET_VARS as $key=>$element) { +foreach ($_GET as $key=>$element) { // The value are e_name e_type e_PHPSESSID ${"e_$key"}=$element; echo_debug('fiche_new.php',__LINE__,"e_$key =$element
"); diff --git a/html/fiche_search.php b/html/fiche_search.php index 0594fe438..b69569db1 100644 --- a/html/fiche_search.php +++ b/html/fiche_search.php @@ -88,7 +88,7 @@ function SetData (name_ctl,value,value_2,value_3,value_4,value_5,value_6) { $cn=DbConnect($_SESSION['g_dossier']); $r=""; -foreach ($HTTP_GET_VARS as $key=>$element) { +foreach ($_GET as $key=>$element) { // The value are e_name e_type e_PHPSESSID ${"e_$key"}=$element; echo_debug('fiche_search.php',__LINE__,"e_$key =$element
"); diff --git a/html/form.php b/html/form.php index e690bf214..47aaea5d9 100644 --- a/html/form.php +++ b/html/form.php @@ -54,7 +54,7 @@ if ( $User->CheckAction($cn,FORM)==0){ echo ShowMenuAdvanced("form.php"); if ( isset ($_POST["record"] )) { // echo '
'; - AddForm($cn,$HTTP_POST_VARS); + AddForm($cn,$_POST); //echo "
"; } if ( isset ($_POST["del_form"]) ) { @@ -97,12 +97,12 @@ if ( isset ($_GET["action"]) ) { if ( isset ($_POST["add_line"]) ) { echo '
'; $line=$_POST["line"]; - EncodeForm($line+1,$sessid,$HTTP_POST_VARS); + EncodeForm($line+1,$sessid,$_POST); echo "
"; } if ( isset ($_POST["update"]) ) { echo '
'; - UpdateForm($cn,$HTTP_POST_VARS); + UpdateForm($cn,$_POST); ViewForm($cn,$sessid,$_POST["fr_id"]); echo "
"; diff --git a/html/form_pdf.php b/html/form_pdf.php index f3417c942..7b0c46aeb 100644 --- a/html/form_pdf.php +++ b/html/form_pdf.php @@ -32,7 +32,7 @@ include_once("impress_inc.php"); require_once('class_user.php'); $cn=DbConnect($_SESSION['g_dossier']); -foreach ($HTTP_POST_VARS as $key=>$element) { +foreach ($_POST as $key=>$element) { ${"$key"}=$element; } diff --git a/html/line_update.php b/html/line_update.php index 1a3cbc61f..b4d7d3339 100644 --- a/html/line_update.php +++ b/html/line_update.php @@ -47,7 +47,7 @@ include ("user_menu.php"); /* Modif d'une ligne */ if ( isset ($_POST["update"] ) ) { - foreach ($HTTP_POST_VARS as $name => $element) { + foreach ($_POST as $name => $element) { echo_debug('line_update.php',__LINE__,"name $name $element"); } echo JS_UPDATE_PCMN; diff --git a/html/poste_pdf.php b/html/poste_pdf.php index dd9a389de..c1f486c23 100644 --- a/html/poste_pdf.php +++ b/html/poste_pdf.php @@ -31,7 +31,7 @@ include_once("impress_inc.php"); include("poste.php"); $cn=DbConnect($_SESSION['g_dossier']); -foreach ($HTTP_POST_VARS as $key=>$element) { +foreach ($_POST as $key=>$element) { ${"$key"}=$element; } if ( isset ( $poste_fille) ){ //choisit de voir tous les postes diff --git a/html/poste_search.php b/html/poste_search.php index c4de26700..81af6f98e 100644 --- a/html/poste_search.php +++ b/html/poste_search.php @@ -45,7 +45,7 @@ $condition=""; $cn=DbConnect($_SESSION['g_dossier']); if ( isset($_POST['search']) ) { $c1=0; - foreach( $HTTP_POST_VARS as $key=>$element){ + foreach( $_POST as $key=>$element){ ${"$key"}=$element; } if ( strlen(trim($p_comment)) != 0 ) { diff --git a/html/print_balance.php b/html/print_balance.php index d0a4245e0..f321b2efd 100644 --- a/html/print_balance.php +++ b/html/print_balance.php @@ -52,7 +52,7 @@ if ( $User->CheckAction($cn,BALANCE) == 0) exit; } echo_debug('print_balance.php',__LINE__,"imp pdf journaux"); -foreach ($HTTP_POST_VARS as $key=>$element) { +foreach ($_POST as $key=>$element) { ${"$key"}=$element; echo_debug('print_balance.php',__LINE__,"key => $key element $element"); } diff --git a/html/priv_user.php b/html/priv_user.php index 2a227355f..97d3233e0 100644 --- a/html/priv_user.php +++ b/html/priv_user.php @@ -88,9 +88,9 @@ if ( isset ($_POST['SAVE']) ){ use_id=".$uid; $Res=ExecSql($cn,$Sql); // Update Priv on Folder - foreach ($HTTP_POST_VARS as $name=>$elem) + foreach ($_POST as $name=>$elem) { - echo_debug('priv_user.php',__LINE__,"HTTP_POST_VARS $name $elem"); + echo_debug('priv_user.php',__LINE__,"_POST $name $elem"); if ( substr_count($name,'PRIV')!=0 ) { echo_debug('priv_user.php',__LINE__,"Found a priv"); diff --git a/html/send_jrn_pdf.php b/html/send_jrn_pdf.php index e862006d6..0664509b0 100644 --- a/html/send_jrn_pdf.php +++ b/html/send_jrn_pdf.php @@ -60,7 +60,7 @@ $offset=0;$limit=25;$step=25; $rap_deb=0;$rap_cred=0; while (1) { $a=0; - list ($a_jrn,$tot_deb,$tot_cred)=GetDataJrnPdf($cn,$HTTP_GET_VARS,$limit,$offset); + list ($a_jrn,$tot_deb,$tot_cred)=GetDataJrnPdf($cn,$_GET,$limit,$offset); echo_debug('send_jrn_pdf.php',__LINE__,"Total debit $tot_deb,credit $tot_cred"); if ( $a_jrn==null) break; diff --git a/html/send_poste_pdf.php b/html/send_poste_pdf.php index 833fb0397..8ff6831b9 100644 --- a/html/send_poste_pdf.php +++ b/html/send_poste_pdf.php @@ -32,7 +32,7 @@ include("poste.php"); echo_debug('send_poste_pdf.php',__LINE__,"imp pdf journaux"); $cn=DbConnect($g_dossier); -foreach ($HTTP_POST_VARS as $key=>$element) { +foreach ($_POST as $key=>$element) { ${"$key"}=$element; } if ( isset ( $all_poste) ){ //choisit de voir tous les postes diff --git a/html/user_sec.php b/html/user_sec.php index f93a17799..6320dffe9 100644 --- a/html/user_sec.php +++ b/html/user_sec.php @@ -86,7 +86,7 @@ if ( isset ($_GET["action"] )) { } // session_register set to off, so variable are undefined -foreach ($HTTP_GET_VARS as $name=>$value) +foreach ($_GET as $name=>$value) ${"$name"}=$value; if ( $action == "change_jrn" ) { diff --git a/include/class_document.php b/include/class_document.php index 7b1f01fa1..f97155aa7 100644 --- a/include/class_document.php +++ b/include/class_document.php @@ -111,11 +111,11 @@ class Document echo ''; echo 'Un moment de patience, le document se prépare...'; echo ''; - ob_start(); +// ob_start(); system("unzip ".$filename); // Remove the file we do not need anymore unlink($filename); - ob_end_clean(); +// ob_end_clean(); $file_to_parse="content.xml"; $type="OOo"; } @@ -765,4 +765,4 @@ class Document } -} \ No newline at end of file +} diff --git a/include/constant.php b/include/constant.php index 330447fbe..511fe4961 100644 --- a/include/constant.php +++ b/include/constant.php @@ -28,7 +28,7 @@ define ("phpcompta_psql_port","5432"); define ("domaine",""); -define ("DEBUG","false"); +define ("DEBUG","true"); // securite correspond a la table // action diff --git a/include/facture.inc.php b/include/facture.inc.php index c929eac2b..c1392d148 100644 --- a/include/facture.inc.php +++ b/include/facture.inc.php @@ -253,14 +253,14 @@ if ( isset ($_POST['view_invoice']) ) exit -1; } $nb_number=$_POST["nb_item"]; - if ( form_verify_input($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,$nb_number) == true) + if ( form_verify_input($cn,$p_jrn,$User->GetPeriode(),$_POST,$nb_number) == true) { - $form=FormVenteView($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,$nb_number); + $form=FormVenteView($cn,$p_jrn,$User->GetPeriode(),$_POST,$nb_number); } else { // Check failed : invalid date or quantity echo_error("Cannot validate "); - $form=FormVenInput($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,false,$nb_number); + $form=FormVenInput($cn,$p_jrn,$User->GetPeriode(),$_POST,false,$nb_number); } echo '
'; diff --git a/include/fiche.inc.php b/include/fiche.inc.php index 8df0dbddb..3ac55f866 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -98,7 +98,7 @@ $recherche=true; if ( isset($_POST['add_modele']) and $write != 0) { // insert the model of card in database $fiche_def=new fiche_def($cn); - $fiche_def->Add($HTTP_POST_VARS); + $fiche_def->Add($_POST); } $r=""; // Add a line in the card model diff --git a/include/modele.inc.php b/include/modele.inc.php index 8613f0f04..b98376cdd 100644 --- a/include/modele.inc.php +++ b/include/modele.inc.php @@ -44,7 +44,7 @@ echo JS_CONFIRM; $Sql=sprintf("CREATE DATABASE %sMOD%d encoding='ISO8859-1' TEMPLATE %sDOSSIER%s",domaine,$l_id,domaine,$_POST["FMOD_DBID"]); ob_start(); if ( pg_query($cn,$Sql)==false) { - ob_clean() + ob_clean(); echo "

Base de donnée ".domaine."dossier".$_POST['FMOD_ID']." est accèdée, déconnectez-vous en d'abord

"; exit; } diff --git a/include/periode.inc.php b/include/periode.inc.php index 427c92286..06aafa170 100644 --- a/include/periode.inc.php +++ b/include/periode.inc.php @@ -33,7 +33,7 @@ if ( isset($_REQUEST['action'])) $action=$_REQUEST['action']; if ( $action=="change_per") { - foreach($HTTP_GET_VARS as $key=>$element) + foreach($_GET as $key=>$element) ${"$key"}=$element; echo ""; echo ''; @@ -47,7 +47,7 @@ if ( $action=="change_per") { } if ( isset ($_POST["conf_chg_per"] ) ) { - foreach($HTTP_POST_VARS as $key=>$element) + foreach($_POST as $key=>$element) ${"$key"}=$element; if (isDate($p_date_start) == null || isDate($p_date_end) == null || @@ -68,7 +68,7 @@ if ( isset ($_POST["conf_chg_per"] ) ) { } if ( isset ($_POST["add_per"] )) { - foreach($HTTP_POST_VARS as $key=>$element) + foreach($_POST as $key=>$element) ${"$key"}=$element; if (isDate($p_date_start) == null || isDate($p_date_end) == null || diff --git a/include/user_action_ach.php b/include/user_action_ach.php index 8661ec158..5041119b2 100644 --- a/include/user_action_ach.php +++ b/include/user_action_ach.php @@ -51,7 +51,7 @@ if ( $action == 'new' ) { $submit=''; $jrn=new jrn($cn, $_GET['p_jrn']); - $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false,$jrn->getDefLine()); + $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$submit,false,$jrn->getDefLine()); echo '
'; echo $r; echo $msg_tva; @@ -71,7 +71,7 @@ if ( $action == 'new' ) { $submit=' '; - $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false, + $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$submit,false, $nb_number); echo '
'; echo $r; @@ -89,7 +89,7 @@ if ( $action == 'new' ) { $submit=' '; - $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,false, $nb_number); + $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$submit,false, $nb_number); echo '
'; echo $r; echo $msg_tva; @@ -106,15 +106,15 @@ if ( $action == 'new' ) { $nb_number=$_POST["nb_item"]; $submit=''; $submit.=''; - if ( form_verify_input ($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number) == true ) { + if ( form_verify_input ($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$nb_number) == true ) { // Should use a read only view instead of FormAch // where we can check - $r=FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit,$nb_number); + $r=FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$submit,$nb_number); } else { // if something goes wrong, correct it $submit=' '; - $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$submit, false, $nb_number); + $r=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$submit, false, $nb_number); } echo '
'; echo $r; @@ -127,11 +127,11 @@ if ( $action == 'new' ) { if ( isset($_POST['save'] )) { // Get number of lines $nb_number=$_POST["nb_item"]; - list($internal,$comment)=RecordSell($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']); + list($internal,$comment)=RecordSell($cn,$_POST,$User,$_GET['p_jrn']); // submit button in the form $submit='

Opération '.$internal.'

'; - $r=FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,"",$nb_number,false); + $r=FormAchView($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,"",$nb_number,false); echo '
'; echo $submit; echo $r; diff --git a/include/user_action_fin.php b/include/user_action_fin.php index 5a565b721..d74b4319d 100644 --- a/include/user_action_fin.php +++ b/include/user_action_fin.php @@ -76,7 +76,7 @@ if ( $action == 'new' ) { $submit=' '; - $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false, $nb_number); + $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,false, $nb_number); echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; @@ -92,7 +92,7 @@ if ( $action == 'new' ) { $submit=' '; - $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false, $nb_number); + $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,false, $nb_number); echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; @@ -104,7 +104,7 @@ if ( $action == 'new' ) { // View the charge and show a submit button to save it if ( isset ($_POST['view_invoice']) ) { $nb_number=$_POST["nb_item"]; - $r=form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number); + $r=form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$nb_number); // if something goes wrong correct it if ( $r == null ) { @@ -112,14 +112,14 @@ if ( $action == 'new' ) { $submit=' '; - $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false, $nb_number); + $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,false, $nb_number); } else { $submit=''; $submit.=''; - $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,$nb_number); + $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,true,$nb_number); } echo '
'; @@ -129,14 +129,14 @@ if ( $action == 'new' ) { } // Save the charge into database if ( isset($_POST['save'] )) { - $r=RecordFin($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']); + $r=RecordFin($cn,$_POST,$User,$_GET['p_jrn']); // Get number of lines $nb_number=$_POST["nb_item"]; // submit button in the form $submit='

Recorded '.$r.'

'; - $r.=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true, $nb_number,true); + $r.=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,true, $nb_number,true); echo '
'; echo $r; echo "
"; diff --git a/include/user_action_ods.php b/include/user_action_ods.php index da35bf482..0902db2b9 100644 --- a/include/user_action_ods.php +++ b/include/user_action_ods.php @@ -74,7 +74,7 @@ if ( $action == 'new' ) { $submit=' '; - $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false, $nb_number); + $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,false, $nb_number); echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; @@ -89,7 +89,7 @@ if ( $action == 'new' ) { $submit=' '; - $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false, $nb_number); + $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,false, $nb_number); echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; @@ -105,7 +105,7 @@ if ( $action == 'new' ) { $submit=''; $submit.=''; - $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true,$nb_number); + $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,true,$nb_number); // if something goes wrong, correct it if ( $r == null ) { @@ -113,7 +113,7 @@ if ( $action == 'new' ) { $submit=' '; - $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,false, $nb_number); + $r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,false, $nb_number); } echo '
'; echo $r; @@ -122,14 +122,14 @@ if ( $action == 'new' ) { } // Save the change into database if ( isset($_POST['save'] )) { - $r=RecordODS($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']); + $r=RecordODS($cn,$_POST,$User,$_GET['p_jrn']); // Get number of lines $nb_number=$_POST["nb_item"]; // submit button in the form $submit='

Recorded

'; - $r.=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$HTTP_POST_VARS,true, $nb_number,true); + $r.=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,true, $nb_number,true); echo '
'; echo $r; echo "
"; @@ -214,12 +214,12 @@ if ( $action == 'search' ) { $sessid=(isset ($_POST['PHPSESSID']))?$_POST['PHPSESSID']:$_GET['PHPSESSID']; // display a search box - $search_box=u_ShowMenuRecherche($cn,$_GET['p_jrn'],$sessid,$HTTP_POST_VARS); + $search_box=u_ShowMenuRecherche($cn,$_GET['p_jrn'],$sessid,$_POST); echo '
'; echo $search_box; // if nofirst is set then show result if ( isset ($_GET['nofirst'] ) ) { - list ($max_line,$a)=ListJrn($cn,$_GET['p_jrn'],"",$HTTP_POST_VARS); + list ($max_line,$a)=ListJrn($cn,$_GET['p_jrn'],"",$_POST); echo $a; } echo '
'; diff --git a/include/user_action_ven.php b/include/user_action_ven.php index 0e355e9b9..881f00108 100644 --- a/include/user_action_ven.php +++ b/include/user_action_ven.php @@ -42,7 +42,7 @@ if ( $action == 'insert_vente' ) { $nb_number=$_POST["nb_item"]; $nb_number++; - $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb_number); + $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,false,$nb_number); echo '
'; echo $form; echo '
'; @@ -52,13 +52,13 @@ if ( $action == 'insert_vente' ) { // We want to see the encoded invoice if ( isset ($_POST["view_invoice"])) { $nb_number=$_POST["nb_item"]; - if ( form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number) == true) + if ( form_verify_input($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$nb_number) == true) { - $form=FormVenteView($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,$nb_number); + $form=FormVenteView($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,$nb_number); // Check failed : invalid date or quantity } else { echo_error("Cannot validate "); - $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb_number); + $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,false,$nb_number); } echo '
'; echo $form; @@ -90,7 +90,7 @@ if ( isset($_POST["record_invoice"])) { } // echo "RECORD INVOICE"; - RecordInvoice($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']); + RecordInvoice($cn,$_POST,$User,$_GET['p_jrn']); } if (isset ($_POST['correct_new_invoice'])) { // Check privilege @@ -100,7 +100,7 @@ if (isset ($_POST['correct_new_invoice'])) { } $nb=$_POST['nb_item']; - $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$HTTP_POST_VARS,false,$nb); + $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$_POST,false,$nb); echo '
'; echo $form; echo '
'; @@ -115,14 +115,14 @@ if ( isset($_POST["record_and_print_invoice"])) { // echo "RECORD AND PRINT INVOICE"; - $comment=RecordInvoice($cn,$HTTP_POST_VARS,$User,$_GET['p_jrn']); + $comment=RecordInvoice($cn,$_POST,$User,$_GET['p_jrn']); $nb_number=$_POST["nb_item"]; - if ( form_verify_input($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,$nb_number)== true) { - $form=FormVenteView($cn,$p_jrn,$User->GetPeriode(),$HTTP_POST_VARS,$nb_number,'noform',$comment); + if ( form_verify_input($cn,$p_jrn,$User->GetPeriode(),$_POST,$nb_number)== true) { + $form=FormVenteView($cn,$p_jrn,$User->GetPeriode(),$_POST,$nb_number,'noform',$comment); } else { echo_error("Cannot validate "); - $form=FormVenInput($cn,$_GET['p_jrn'],$User,$HTTP_POST_VARS,false,$nb_number); + $form=FormVenInput($cn,$_GET['p_jrn'],$User,$_POST,false,$nb_number); } echo '
';