From 697562ff10845961b32e321c407448b8df8ac051 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 26 Jan 2005 11:29:11 +0000 Subject: [PATCH] Ajout edition et visu l'edition n'est pas finit --- htdocs/telephonie/fournisseur/fiche.php | 90 ++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git a/htdocs/telephonie/fournisseur/fiche.php b/htdocs/telephonie/fournisseur/fiche.php index 55be8f8a267..30a37611957 100644 --- a/htdocs/telephonie/fournisseur/fiche.php +++ b/htdocs/telephonie/fournisseur/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2005 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -88,12 +88,96 @@ if ($_GET["action"] == 'create') print ''; print ''; } -else + +/* + * Visualisation & Edition + * + */ +if ($_GET["id"] > 0) { - print "Error"; + $fourn = new FournisseurTelephonie($db); + if ($fourn->fetch($_GET["id"]) == 0) + { + + if ($_GET["action"] == "edit" && $user->rights->telephonie->fournisseur->config) + { + /* + * Edition + * + */ + print_titre("Modification fournisseur"); + + print ''; + + print ''; + print ''; + print ''; + print ''; + + $html = new Form($db); + + $arr = $fourn->array_methode(); + + + + print ''; + print ''; + print ''; + + + print '
Nom'.$fourn->nom.'
Email de commandeadresse email à laquelle sont envoyées les commandes de lignes
Méthode de commande'; + print $html->select_array("methode",$arr); + print 'méthode utilisée pour les commandes de lignes

'; + } + else + { + /* + * Visualisation + * + */ + $h = 0; + $head[$h][0] = DOL_URL_ROOT."/telephonie/fournisseur/fiche.php?id=".$fourn->id; + $head[$h][1] = $langs->trans("Contrat"); + $hselected = $h; + $h++; + + dolibarr_fiche_head($head, $hselected, 'Fournisseur : '.$fourn->nom); + + print ''; + + print ''; + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + + + print '
Nom'.$fourn->nom.'
Email de commande'.$fourn->email_commande.'adresse email à laquelle sont envoyées les commandes de lignes
Méthode de commande'.$fourn->class_commande.'méthode utilisée pour les commandes de lignes

'; + } + } } +/* ************************************************************************** */ +/* */ +/* Barre d'action */ +/* */ +/* ************************************************************************** */ +print "\n
\n"; + +if ($_GET["action"] == '') +{ + if($user->rights->telephonie->fournisseur->config) + + { + print ''.$langs->trans("Edit").''; + } +} + +print "
"; $db->close();