From 42745331f5691994bace56a31dbe77f9ecaabe30 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 10 Feb 2005 11:42:14 +0000 Subject: [PATCH] =?UTF-8?q?Impl=E9mentation=20de=20la=20modification=20et?= =?UTF-8?q?=20du=20num=E9ro=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/telephonie/fournisseur/fiche.php | 41 +++++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/htdocs/telephonie/fournisseur/fiche.php b/htdocs/telephonie/fournisseur/fiche.php index 50e7ff013ce..2e5a09593ac 100644 --- a/htdocs/telephonie/fournisseur/fiche.php +++ b/htdocs/telephonie/fournisseur/fiche.php @@ -37,6 +37,24 @@ if ($_POST["action"] == 'add') } } +if ($_POST["action"] == 'update' && $_GET["id"]) +{ + $fourn = new FournisseurTelephonie($db); + + if ($fourn->fetch($_GET["id"]) == 0) + { + + $fourn->num_client = $_POST["num_client"]; + $fourn->email_commande = $_POST["email_commande"]; + $fourn->methode_commande = $_POST["methode"]; + + if ( $fourn->update($user) == 0) + { + Header("Location: fiche.php?id=".$fourn->id); + } + } +} + if ($_GET["action"] == 'active') { $fourn = new FournisseurTelephonie($db); @@ -107,27 +125,33 @@ if ($_GET["id"] > 0) */ print_titre("Modification fournisseur"); + print '
'; + print ''; + print ''; print ''; + + print ''; + print ''; + print ''; + print ''; - print ''; + print ''; print ''; $html = new Form($db); $arr = $fourn->array_methode(); - - print ''; print ''; print ''; - - print '
Nom'.$fourn->nom.'
Numéro ClientNotre numéro de client
Email de commandeadresse email à laquelle sont envoyées les commandes de lignes
Méthode de commande'; - print $html->select_array("methode",$arr); + print $html->select_array("methode",$arr,$fourn->class_commande); print 'méthode utilisée pour les commandes de lignes

'; + print ''; + print '

'; } else { @@ -150,6 +174,11 @@ if ($_GET["id"] > 0) print ''; print ''; + + print ''; + print ''; + print ''; + print ''; print ''; print '';
Nom'.$fourn->nom.'
Numéro Client'.$fourn->num_client.'Notre numéro de client
Email de commande'.$fourn->email_commande.'adresse email à laquelle sont envoyées les commandes de lignes