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$'); - ?>