[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/fourn/ -> pre.inc.php (source)

   1  <?php
   2  /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2005      Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: pre.inc.php,v 1.21 2005/07/23 14:48:59 hregis Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/fourn/pre.inc.php,v $
  21   *
  22   */
  23  
  24  /**
  25          \file       htdocs/fourn/pre.inc.php
  26          \ingroup    fournisseur,facture
  27          \brief      Fichier gestionnaire du menu fournisseurs
  28  */
  29  
  30  require ("../main.inc.php");
  31  require_once  DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php";
  32  require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php";
  33  
  34  $user->getrights('fournisseur');
  35  
  36  function llxHeader($head = "", $title="", $addons='') {
  37    global $user, $conf, $langs;
  38  
  39    $langs->load("suppliers");
  40    $langs->load("propal");
  41  
  42    top_menu($head, $title);
  43  
  44    $menu = new Menu();
  45  
  46  
  47    if (is_array($addons))
  48      {
  49        //$menu->add($url, $libelle);
  50        $menu->add($addons[0][0], $addons[0][1]);
  51      }
  52  
  53    if ($conf->fournisseur->enabled && $user->rights->societe->lire) 
  54      {
  55        $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
  56        
  57        // Sécurité accés client
  58        if ($user->societe_id == 0 && $user->rights->societe->creer) 
  59          {
  60            $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));
  61          }
  62      }
  63    
  64    if ($conf->societe->enabled && $user->rights->societe->lire)
  65      {
  66        $menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
  67      }
  68    
  69  
  70    $langs->load("bills");
  71    if ($user->societe_id == 0 && $user->rights->fournisseur->facture->lire)
  72      {
  73        $menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
  74      }
  75    if ($user->societe_id == 0 && $user->rights->fournisseur->facture->creer) 
  76      {
  77        $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
  78      }
  79    if ($user->rights->fournisseur->facture->lire)
  80      {
  81        $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
  82      } 
  83    $langs->load("orders");
  84    if ($user->rights->fournisseur->commande->lire)
  85      {
  86        $menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
  87      }
  88    if ($conf->produit->enabled || $conf->service->enabled)
  89    {
  90        if ($user->rights->produit->lire)
  91        {
  92          $menu->add(DOL_URL_ROOT."/fourn/product/", $langs->trans("Products"));
  93      }
  94    }
  95    
  96    left_menu($menu->liste);
  97  }
  98  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics