1 |
<?php |
<?php |
2 |
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> |
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> |
3 |
* Copyright (C) 2003 Brian Fraval <brian@fraval.org> |
* Copyright (C) 2003 Brian Fraval <brian@fraval.org> |
4 |
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> |
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> |
5 |
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> |
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> |
24 |
*/ |
*/ |
25 |
|
|
26 |
/** |
/** |
27 |
\file htdocs/soc.php |
\file htdocs/soc.php |
28 |
\ingroup societe |
\ingroup societe |
29 |
\brief Onglet societe d'une societe |
\brief Onglet societe d'une societe |
30 |
\version $Revision$ |
\version $Revision$ |
31 |
*/ |
*/ |
32 |
|
|
33 |
require("pre.inc.php"); |
require("pre.inc.php"); |
194 |
$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:''); |
195 |
if ($soc->pays_id) { |
if ($soc->pays_id) { |
196 |
$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; |
197 |
$result=$db->query($sql); |
$resql=$db->query($sql); |
198 |
if ($result) |
if ($resql) |
199 |
{ |
{ |
200 |
$obj = $db->fetch_object($result); |
$obj = $db->fetch_object($resql); |
201 |
} |
} |
202 |
else { |
else { |
203 |
dolibarr_print_error($db); |
dolibarr_print_error($db); |
636 |
*/ |
*/ |
637 |
if ($_GET["action"] == '') |
if ($_GET["action"] == '') |
638 |
{ |
{ |
639 |
|
print '<div class="tabsAction">'; |
640 |
|
|
641 |
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) |
|
642 |
{ |
{ |
643 |
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>'; |
644 |
|
|
645 |
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddContact").'</a>'; |
646 |
|
|
647 |
|
} |
648 |
|
|
649 |
|
if ($user->rights->societe->supprimer) |
650 |
|
{ |
651 |
|
print '<a class="butActionDelete" href="'.DOL_URL_ROOT.'/soc.php?socid='.$soc->id.'&action=delete">'.$langs->trans("Delete").'</a>'; |
652 |
|
|
653 |
} |
} |
654 |
print '</div>'; |
print '</div>'; |
655 |
} |
} |
656 |
|
|
657 |
} |
} |
658 |
|
|
659 |
$db->close(); |
$db->close(); |
660 |
|
|
661 |
|
|
662 |
llxFooter('$Date$ - $Revision$'); |
llxFooter('$Date$ - $Revision$'); |
|
|
|
663 |
?> |
?> |
664 |
|
|