| [ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-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.7.2.1 2005/12/25 00:32:12 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/fourn/product/pre.inc.php,v $ 21 */ 22 23 /** 24 \file htdocs/fourn/product/pre.inc.php 25 \ingroup product,service 26 \brief Fichier gestionnaire du menu gauche des produits et services fournisseurs 27 \version $Revision: 1.7.2.1 $ 28 */ 29 30 require ("../../main.inc.php"); 31 require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php"); 32 require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php"); 33 34 $langs->load("suppliers"); 35 $langs->load("products"); 36 37 $user->getrights("produit"); 38 39 40 function llxHeader($head = "", $title="", $help_url='',$addons='') 41 { 42 global $db, $user, $conf, $langs; 43 44 45 top_menu($head, $title); 46 47 $menu = new Menu(); 48 49 if (is_array($addons)) 50 { 51 //$menu->add($url, $libelle); 52 $menu->add($addons[0][0], $addons[0][1]); 53 } 54 55 if ($conf->produit->enabled) 56 { 57 $menu->add(DOL_URL_ROOT."/fourn/product/", $langs->trans("Products")); 58 $menu->add_submenu(DOL_URL_ROOT."/fourn/product/liste.php?type=0", $langs->trans("List")); 59 60 if ($user->societe_id == 0 && $user->rights->produit->creer) 61 { 62 $menu->add_submenu(DOL_URL_ROOT."/fourn/product/fiche.php?action=create&type=0", $langs->trans("NewProduct")); 63 } 64 } 65 66 if ($conf->categorie->enabled) 67 { 68 $menu->add(DOL_URL_ROOT."/categories/", $langs->trans("Categories")); 69 } 70 71 $menu->add('liste.php','Top'); 72 73 if (isset($_REQUEST['catid']) && $_REQUEST['catid']) 74 { 75 $catid = $_REQUEST['catid']; 76 77 $c = new Categorie ($db, $catid); 78 79 $menu->add('liste.php?catid='.$c->id, $c->label); 80 81 $cats = $c->get_filles(); 82 83 if (sizeof ($cats) > 0) 84 { 85 foreach ($cats as $cat) 86 { 87 $menu->add_submenu('liste.php?catid='.$cat->id, $cat->label); 88 } 89 } 90 } 91 else 92 { 93 $c = new Categorie ($db); 94 $cats = $c->get_main_categories(); 95 96 if (sizeof ($cats) > 0) 97 { 98 foreach ($cats as $cat) 99 { 100 $menu->add_submenu('liste.php?catid='.$cat->id, $cat->label); 101 } 102 } 103 } 104 105 left_menu($menu->liste, $help_url); 106 } 107 108 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
|