From fd46b75578dbf08f55161e408be0a223c1eee0d8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 2 Dec 2005 13:02:50 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20permissions=20sur=20cr=E9ation=20et=20s?= =?UTF-8?q?uppression=20des=20contacts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/fourn/fiche.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 1a9f6faab84..1b67157381e 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -347,7 +347,13 @@ if ( $societe->fetch($socid) ) print ''.$langs->trans("Contact").''; print 'Poste'.$langs->trans("Tel").''; print "".$langs->trans("Fax")."".$langs->trans("EMail").""; - print "".$langs->trans("AddContact").""; + + if ($user->rights->societe->contact->creer) + { + print "".$langs->trans("AddContact").""; + } + + print ""; $sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p"; @@ -373,15 +379,20 @@ if ( $societe->fetch($socid) ) print ' '.$obj->firstname.' '. $obj->name.' '; if ($obj->note) - { - print "
".nl2br($obj->note); - } + { + print "
".nl2br($obj->note); + } print ""; print "$obj->poste "; print ''.$obj->phone.' '; print ''.$obj->fax.' '; print ''.$obj->email.' '; - print "idp\">".img_edit().""; + + if ($user->rights->societe->contact->creer) + { + print "idp\">".img_edit().""; + } + print "\n"; $i++; }