diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index b1525b7be1c..d2af1b55f3c 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -40,14 +40,14 @@ if ($user->societe_id > 0) /* * */ -if ($HTTP_POST_VARS["action"] == 'add') +if ($_POST["action"] == 'add') { $expedition = new Expedition($db); $expedition->date_expedition = time(); - $expedition->note = $HTTP_POST_VARS["note"]; - $expedition->commande_id = $HTTP_POST_VARS["commande_id"]; - $expedition->entrepot_id = $HTTP_POST_VARS["entrepot_id"]; + $expedition->note = $_POST["note"]; + $expedition->commande_id = $_POST["commande_id"]; + $expedition->entrepot_id = $_POST["entrepot_id"]; $commande = new Commande($db); $commande->fetch($expedition->commande_id); @@ -57,9 +57,9 @@ if ($HTTP_POST_VARS["action"] == 'add') { $qty = "qtyl".$i; $idl = "idl".$i; - if ($HTTP_POST_VARS[$qty] > 0) + if ($_POST[$qty] > 0) { - $expedition->addline($HTTP_POST_VARS[$idl],$HTTP_POST_VARS[$qty]); + $expedition->addline($_POST[$idl],$_POST[$qty]); } } @@ -67,7 +67,7 @@ if ($HTTP_POST_VARS["action"] == 'add') $id = $expedition->id; - $action = ''; + Header("Location:fiche.php?id=$id"); } /* @@ -75,14 +75,14 @@ if ($HTTP_POST_VARS["action"] == 'add') */ -if ($HTTP_POST_VARS["action"] == 'confirm_valid' && $HTTP_POST_VARS["confirm"] == yes && $user->rights->expedition->valider) +if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == yes && $user->rights->expedition->valider) { $expedition = new Expedition($db); $expedition->fetch($_GET["id"]); $result = $expedition->valid($user); } -if ($HTTP_POST_VARS["action"] == 'confirm_delete' && $HTTP_POST_VARS["confirm"] == yes) +if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == yes) { if ($user->rights->expedition->supprimer ) { @@ -106,7 +106,7 @@ $html = new Form($db); * * ************************************************************************/ -if ($HTTP_POST_VARS["action"] == 'create') +if ($_POST["action"] == 'create') { llxHeader('','Fiche expedition','ch-expedition.html',$form_search); @@ -115,7 +115,7 @@ if ($HTTP_POST_VARS["action"] == 'create') $commande = new Commande($db); $commande->livraison_array(); - if ( $commande->fetch($HTTP_POST_VARS["commande_id"])) + if ( $commande->fetch($_POST["commande_id"])) { $soc = new Societe($db); $soc->fetch($commande->soc_id); @@ -130,7 +130,7 @@ if ($HTTP_POST_VARS["action"] == 'create') print '