From fc827a5de88bfce81948f19a7d02d9b6b7fd46b2 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 27 Jul 2004 08:35:14 +0000 Subject: [PATCH] Modif register_global --- htdocs/product/stock/fiche.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 36563565aec..dbc7c29784a 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -41,16 +41,16 @@ if ($_POST["action"] == 'add') $action = ''; } -if ($_POST["action"] == 'update' && $cancel <> 'Annuler') +if ($_POST["action"] == 'update' && $_POST["cancel"] <> 'Annuler') { $entrepot = new Entrepot($db); - if ($entrepot->fetch($id)) + if ($entrepot->fetch($_GET["id"])) { $entrepot->libelle = $_POST["libelle"]; $entrepot->description = $_POST["desc"]; $entrepot->statut = $_POST["statut"]; - if ( $entrepot->update($id, $user)) + if ( $entrepot->update($_GET["id"], $user)) { $action = ''; $mesg = 'Fiche mise à jour'; @@ -77,6 +77,11 @@ if ($cancel == 'Annuler') * Affichage * */ +/* + * Création + * + */ + if ($_GET["action"] == 'create') { print "
\n"; @@ -99,12 +104,12 @@ if ($_GET["action"] == 'create') } else { - if ($id) + if ($_GET["id"]) { - if ($action <> 're-edit') + if ($_GET["action"] <> 're-edit') { $entrepot = new Entrepot($db); - $result = $entrepot->fetch($id); + $result = $entrepot->fetch($_GET["id"]); } if ( $result ) @@ -125,11 +130,11 @@ else } - if (($action == 'edit' || $action == 're-edit') && 1) + if (($_GET["action"] == 'edit' || $action == 're-edit') && 1) { print_fiche_titre('Edition de la fiche entrepot', $mesg); - print "\n"; + print "id\" method=\"post\">\n"; print ''; print ''; @@ -177,7 +182,7 @@ if ($action == '' && ($user->rights->produit->modifier || $user->rights->produit if ($action == '') { - print "Editer"; + print "id\">Editer"; } print "";