From 0e05c869a26f6ee6d6621e8196e350add8aebe2c Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 21 Jul 2005 13:09:27 +0000 Subject: [PATCH] =?UTF-8?q?Correction=20probl=E8me=20de=20permission?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/soc.php | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/htdocs/soc.php b/htdocs/soc.php index 568e50fe0a0..82deb84c622 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2003 Brian Fraval * Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2005 Eric Seigne @@ -24,10 +24,10 @@ */ /** - \file htdocs/soc.php - \ingroup societe - \brief Onglet societe d'une societe - \version $Revision$ + \file htdocs/soc.php + \ingroup societe + \brief Onglet societe d'une societe + \version $Revision$ */ require("pre.inc.php"); @@ -194,10 +194,10 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') $soc->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:(defined(MAIN_INFO_SOCIETE_PAYS)?MAIN_INFO_SOCIETE_PAYS:''); if ($soc->pays_id) { $sql = "SELECT code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".$soc->pays_id; - $result=$db->query($sql); - if ($result) + $resql=$db->query($sql); + if ($resql) { - $obj = $db->fetch_object($result); + $obj = $db->fetch_object($resql); } else { dolibarr_print_error($db); @@ -636,27 +636,29 @@ else */ if ($_GET["action"] == '') { + print '
'; - print '
'; - - print ''.$langs->trans("Edit").''; - - print ''.$langs->trans("AddContact").''; - - if ($user->rights->societe->supprimer) + if ($user->rights->societe->creer) { - print ''.$langs->trans("Delete").''; - + print ''.$langs->trans("Edit").''; + + print ''.$langs->trans("AddContact").''; + + } + + if ($user->rights->societe->supprimer) + { + print ''.$langs->trans("Delete").''; + } - print '
'; + print '
'; } - + } $db->close(); llxFooter('$Date$ - $Revision$'); - ?>