dolibarr/htdocs/product/pre.inc.php

104 lines
3.3 KiB
PHP
Raw Normal View History

2004-10-20 22:06:49 +02:00
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
2002-04-30 12:57: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.
*
2002-06-29 00:46:44 +02:00
* $Id$
* $Source$
*
2002-04-30 12:57:25 +02:00
*/
/*!
2004-11-16 22:55:30 +01:00
\file htdocs/product/pre.inc.php
\ingroup product,service
\brief Fichier gestionnaire du menu gauche des produits et services
\version $Revision$
*/
2003-09-11 22:18:51 +02:00
require("../main.inc.php");
2002-04-30 12:57:25 +02:00
2003-08-03 13:43:59 +02:00
function llxHeader($head = "", $urlp = "", $title="")
{
global $user, $conf, $langs;
$langs->load("products");
$user->getrights("produit");
top_menu($head, $title);
2002-04-30 12:57:25 +02:00
2002-05-09 16:57:48 +02:00
$menu = new Menu();
2002-04-30 12:57:25 +02:00
if ($conf->produit->enabled)
{
$menu->add(DOL_URL_ROOT."/product/index.php?type=0", $langs->trans("Products"));
$menu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("List"));
if ($user->societe_id == 0 && $user->rights->produit->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&amp;type=0", $langs->trans("NewProduct"));
}
2004-07-29 16:13:09 +02:00
}
if ($conf->service->enabled)
2003-11-17 17:37:14 +01:00
{
$menu->add(DOL_URL_ROOT."/product/index.php?type=1", $langs->trans("Services"));
$menu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=1", $langs->trans("List"));
if ($user->societe_id == 0 && $user->rights->produit->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&amp;type=1", $langs->trans("NewService"));
}
2003-11-17 17:37:14 +01:00
}
2003-08-03 13:43:59 +02:00
if ($conf->boutique->enabled)
{
$menu->add(DOL_URL_ROOT."/product/osc-liste.php", "Osc");
$menu->add_submenu(DOL_URL_ROOT."/product/osc-liste.php?reqstock=epuise", "Produits Epuis<69>s");
2004-07-29 16:13:09 +02:00
$menu->add(DOL_URL_ROOT."/product/osc-reviews.php", "Critiques");
2004-07-29 16:13:09 +02:00
$menu->add_submenu(DOL_URL_ROOT."/product/osc-productsbyreviews.php", "Meilleurs produits");
2004-07-29 16:13:09 +02:00
$menu->add(DOL_URL_ROOT."/product/album/", "Albums");
$menu->add(DOL_URL_ROOT."/product/groupart/", "Groupes/Artistes");
$menu->add(DOL_URL_ROOT."/product/categorie/", $langs->trans("Categories"));
}
if ($conf->fournisseur->enabled) {
$langs->load("suppliers");
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
$menu->add(DOL_URL_ROOT."/product/stats/", $langs->trans("Statistics"));
2004-07-29 16:13:09 +02:00
if ($conf->propal->enabled)
{
$menu->add_submenu(DOL_URL_ROOT."/product/popuprop.php", $langs->trans("Popularity"));
2004-07-29 16:13:09 +02:00
}
if ($conf->stock->enabled)
{
$menu->add(DOL_URL_ROOT."/product/stock/", $langs->trans("Stock"));
2004-07-29 16:13:09 +02:00
}
2002-05-09 16:57:48 +02:00
left_menu($menu->liste);
2002-06-29 00:46:44 +02:00
/*
*
*
*/
2002-04-30 12:57:25 +02:00
}
?>