Correction problème de permission
This commit is contained in:
parent
eb285b8a81
commit
0e05c869a2
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Brian Fraval <brian@fraval.org>
|
* Copyright (C) 2003 Brian Fraval <brian@fraval.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
@ -24,10 +24,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/soc.php
|
\file htdocs/soc.php
|
||||||
\ingroup societe
|
\ingroup societe
|
||||||
\brief Onglet societe d'une societe
|
\brief Onglet societe d'une societe
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("pre.inc.php");
|
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:'');
|
$soc->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:(defined(MAIN_INFO_SOCIETE_PAYS)?MAIN_INFO_SOCIETE_PAYS:'');
|
||||||
if ($soc->pays_id) {
|
if ($soc->pays_id) {
|
||||||
$sql = "SELECT code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".$soc->pays_id;
|
$sql = "SELECT code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".$soc->pays_id;
|
||||||
$result=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($result)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($resql);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
@ -636,19 +636,22 @@ else
|
|||||||
*/
|
*/
|
||||||
if ($_GET["action"] == '')
|
if ($_GET["action"] == '')
|
||||||
{
|
{
|
||||||
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
if ($user->rights->societe->creer)
|
||||||
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/soc.php?socid='.$soc->id.'&action=edit">'.$langs->trans("Edit").'</a>';
|
|
||||||
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddContact").'</a>';
|
|
||||||
|
|
||||||
if ($user->rights->societe->supprimer)
|
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="'.DOL_URL_ROOT.'/soc.php?socid='.$soc->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/soc.php?socid='.$soc->id.'&action=edit">'.$langs->trans("Edit").'</a>';
|
||||||
|
|
||||||
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddContact").'</a>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user->rights->societe->supprimer)
|
||||||
|
{
|
||||||
|
print '<a class="butActionDelete" href="'.DOL_URL_ROOT.'/soc.php?socid='.$soc->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||||
|
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -657,6 +660,5 @@ $db->close();
|
|||||||
|
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user