/[dolibarr]/dolibarr/htdocs/soc.php
ViewVC logotype

Diff of /dolibarr/htdocs/soc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.108 by eldy, Fri Jul 15 23:30:51 2005 UTC revision 1.109 by rodolphe, Thu Jul 21 13:09:27 2005 UTC
# Line 1  Line 1 
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>
# Line 24  Line 24 
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");
# Line 194  if ($_GET["action"] == 'create' || $_POS Line 194  if ($_GET["action"] == 'create' || $_POS
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);
# Line 636  else Line 636  else
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.'&amp;action=edit">'.$langs->trans("Edit").'</a>';  
   
         print '<a class="butAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$soc->id.'&amp;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.'&amp;action=delete">'.$langs->trans("Delete").'</a>';            print '<a class="butAction" href="'.DOL_URL_ROOT.'/soc.php?socid='.$soc->id.'&amp;action=edit">'.$langs->trans("Edit").'</a>';
644              
645              print '<a class="butAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$soc->id.'&amp;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.'&amp;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    

Legend:
Removed from v.1.108  
changed lines
  Added in v.1.109

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26