dolibarr/htdocs/pre.inc.php

156 lines
4.0 KiB
PHP
Raw Normal View History

2002-04-30 12:56:25 +02:00
<?PHP
2004-01-31 12:54:02 +01:00
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 <EFBFBD>ric Seigne <erics@rycks.com>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
2002-04-30 12:56:25 +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.
*
2003-03-23 16:50:59 +01:00
* $Id$
* $Source$
*
2002-04-30 12:56:25 +02:00
*/
2003-09-11 22:18:51 +02:00
require ("./main.inc.php");
2002-04-30 12:56:25 +02:00
function llxHeader($head = "") {
2002-05-04 01:01:45 +02:00
global $user, $conf;
2002-04-30 12:56:25 +02:00
2002-05-04 01:01:45 +02:00
/*
*
*
*/
top_menu($head);
2002-04-30 12:56:25 +02:00
2002-05-09 16:57:48 +02:00
$menu = new Menu();
2002-04-30 17:36:13 +02:00
if ($conf->societe->enabled)
2002-12-20 00:17:19 +01:00
{
2003-06-18 16:12:24 +02:00
$menu->add(DOL_URL_ROOT."/societe.php", "Soci<EFBFBD>t<EFBFBD>s","company");
2002-12-30 21:41:28 +01:00
if ($user->admin)
{
2003-10-14 16:57:49 +02:00
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", "Nouvelle soci<63>t<EFBFBD>");
2002-12-30 21:41:28 +01:00
}
2004-01-31 12:54:02 +01:00
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php", "Contacts");
2002-12-20 00:17:19 +01:00
}
2002-12-13 17:31:44 +01:00
2003-03-13 19:27:26 +01:00
if ($conf->commercial->enabled )
2002-12-20 00:13:48 +01:00
{
2003-08-25 12:09:27 +02:00
$menu->add(DOL_URL_ROOT."/comm/index.php", "Commercial");
2002-05-06 21:10:48 +02:00
2003-09-11 22:18:51 +02:00
$menu->add_submenu(DOL_URL_ROOT."/comm/clients.php", "Clients");
2002-04-30 12:56:25 +02:00
2003-08-06 11:25:40 +02:00
if ($user->rights->propale->lire)
$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", "Prop. commerciales");
2002-12-20 00:17:19 +01:00
}
2002-04-30 12:56:25 +02:00
2003-03-13 19:27:26 +01:00
if ($conf->compta->enabled )
2002-12-12 17:29:47 +01:00
{
$menu->add(DOL_URL_ROOT."/compta/index.php", "Comptabilit<EFBFBD>");
2002-05-04 01:01:45 +02:00
2003-08-06 11:25:40 +02:00
if ($user->rights->facture->lire)
2003-09-11 22:18:51 +02:00
$menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", "Factures");
2002-12-12 17:29:47 +01:00
}
2002-05-04 01:01:45 +02:00
2002-12-12 17:29:47 +01:00
if ($conf->fichinter->enabled )
{
$menu->add(DOL_URL_ROOT."/fichinter/index.php", "Fiches d'intervention");
2002-12-12 17:29:47 +01:00
}
2002-04-30 12:56:25 +02:00
if ($conf->produit->enabled || $conf->service->enabled)
2002-12-20 00:04:02 +01:00
{
$chaine="";
if ($conf->produit->enabled) { $chaine.="Produits"; }
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
if ($conf->service->enabled) { $chaine.="Services"; }
$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
2003-03-13 19:27:26 +01:00
if ($conf->boutique->enabled)
{
if ($conf->boutique->livre->enabled)
{
$menu->add_submenu(DOL_URL_ROOT."/boutique/livre/index.php", "Livres");
2003-03-13 19:27:26 +01:00
}
if ($conf->boutique->album->enabled)
{
$menu->add_submenu(DOL_URL_ROOT."/product/album/index.php", "Albums");
2003-03-13 19:27:26 +01:00
}
}
2002-12-20 00:04:02 +01:00
}
2002-04-30 12:56:25 +02:00
2002-12-20 00:04:02 +01:00
if ($conf->adherent->enabled )
{
2003-10-14 11:50:37 +02:00
$menu->add(DOL_URL_ROOT."/adherents/index.php", "Adherents");
2002-12-20 00:04:02 +01:00
}
2002-12-12 17:29:47 +01:00
2003-03-11 17:24:49 +01:00
if ($conf->commande->enabled)
{
2003-10-14 11:50:37 +02:00
$menu->add(DOL_URL_ROOT."/commande/index.php", "Commandes");
if ($conf->expedition->enabled) {
$menu->add_submenu(DOL_URL_ROOT."/expedition/index.php", "Exp<EFBFBD>ditions");
}
2003-03-11 17:24:49 +01:00
}
if ($conf->don->enabled)
{
2003-10-14 11:50:37 +02:00
$menu->add(DOL_URL_ROOT."/compta/dons/index.php", "Dons");
}
2002-12-19 19:55:38 +01:00
if ($conf->fournisseur->enabled)
{
2003-08-25 12:09:27 +02:00
$menu->add(DOL_URL_ROOT."/fourn/index.php", "Fournisseurs");
}
2002-04-30 12:56:25 +02:00
2003-03-23 16:50:59 +01:00
if ($conf->voyage && $user->societe_id == 0)
2002-12-19 19:55:38 +01:00
{
2002-05-27 21:21:36 +02:00
2003-08-25 12:09:27 +02:00
$menu->add(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
2002-05-27 21:21:36 +02:00
2003-08-25 12:09:27 +02:00
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
2003-09-11 22:18:51 +02:00
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/reduc.php","Reduc");
2002-12-19 19:55:38 +01:00
}
2002-05-27 21:21:36 +02:00
2002-12-20 00:04:02 +01:00
if ($conf->domaine->enabled )
{
$menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines");
2002-12-20 00:04:02 +01:00
}
2002-05-27 21:21:36 +02:00
if ($conf->postnuke->enabled)
2003-06-05 17:02:06 +02:00
{
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
2003-06-18 16:12:24 +02:00
}
if ($conf->rapport->enabled)
{
$menu->add(DOL_URL_ROOT."/rapport/", "Rapports");
}
2003-10-13 15:40:32 +02:00
$menu->add(DOL_URL_ROOT."/user/index.php", "Utilisateurs");
2003-06-18 16:12:24 +02:00
if ($user->admin)
{
2003-10-13 15:40:32 +02:00
$menu->add(DOL_URL_ROOT."/admin/index.php", "Configuration");
2003-06-05 17:02:06 +02:00
}
2002-05-27 21:21:36 +02:00
/*
*
*/
2002-05-09 16:57:48 +02:00
left_menu($menu->liste);
2002-04-30 12:56:25 +02:00
}
?>