dolibarr/htdocs/fourn/pre.inc.php

93 lines
2.5 KiB
PHP
Raw Normal View History

<?php
2003-01-28 18:43:59 +01:00
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
2002-05-06 21:10:48 +02:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
2002-05-29 17:18:01 +02:00
* $Id$
* $Source$
*
2002-05-06 21:10:48 +02:00
*/
2004-11-18 23:14:56 +01:00
/*!
\file htdocs/fourn/pre.inc.php
\ingroup fournisseur,facture
\brief Fichier gestionnaire du menu fournisseurs
*/
2003-09-11 22:18:51 +02:00
require("../main.inc.php");
2002-05-06 21:10:48 +02:00
2004-11-29 16:45:41 +01:00
function llxHeader($head = "", $title="", $addons='') {
global $user, $conf, $langs;
2004-11-29 16:45:41 +01:00
2004-11-30 22:16:09 +01:00
$langs->load("suppliers");
2002-05-06 21:10:48 +02:00
2004-09-04 14:38:11 +02:00
top_menu($head, $title);
2002-05-06 21:10:48 +02:00
2002-05-09 16:57:48 +02:00
$menu = new Menu();
2002-05-06 21:10:48 +02:00
2004-11-29 16:45:41 +01:00
if (is_array($addons))
{
//$menu->add($url, $libelle);
$menu->add($addons[0][0], $addons[0][1]);
}
if ($conf->fournisseur->enabled)
2003-03-23 19:21:06 +01:00
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
2003-05-13 16:27:40 +02:00
// S<>curit<69> acc<63>s client
if ($user->societe_id == 0)
{
2004-11-30 22:16:09 +01:00
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));
}
}
2004-11-29 16:45:41 +01:00
if ($conf->societe->enabled)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
}
2004-11-18 23:14:56 +01:00
2004-11-29 16:45:41 +01:00
if ($conf->facture->enabled)
2003-05-13 16:27:40 +02:00
{
2004-11-29 16:45:41 +01:00
$langs->load("bills");
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
if ($user->societe_id == 0)
{
2004-11-30 22:16:09 +01:00
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
2004-11-29 16:45:41 +01:00
}
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
2003-03-23 19:21:06 +01:00
}
2004-11-29 16:45:41 +01:00
if ($conf->commande->enabled)
{
2004-11-30 22:16:09 +01:00
$langs->load("orders");
$menu->add_submenu(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
}
if ($conf->produit->enabled || $conf->service->enabled)
{
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products"));
}
2004-11-29 16:45:41 +01:00
2002-05-09 16:57:48 +02:00
left_menu($menu->liste);
2002-05-06 21:10:48 +02:00
}
?>