[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2003 Éric Seigne <erics@rycks.com> 4 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 5 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 6 * Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 * 22 * $Id: pre.inc.php,v 1.44 2005/09/19 18:03:49 eldy Exp $ 23 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/pre.inc.php,v $ 24 */ 25 26 /** 27 \file htdocs/pre.inc.php 28 \brief Fichier gestionnaire du menu de gauche de l'accueil 29 \version $Revision: 1.44 $ 30 */ 31 32 require ("./main.inc.php"); 33 $user->getrights(); 34 35 function llxHeader($head = "") { 36 global $user, $conf, $langs; 37 38 top_menu($head); 39 40 $menu = new Menu(); 41 42 if ($conf->societe->enabled && $user->rights->societe->lire) 43 { 44 $langs->load("companies"); 45 $menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies")); 46 47 if ($user->rights->societe->creer) 48 { 49 $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewCompany")); 50 } 51 52 if(is_dir("societe/groupe")) 53 { 54 $menu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup")); 55 } 56 $menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts")); 57 } 58 59 if ($conf->commercial->enabled && $user->rights->commercial->lire) 60 { 61 $langs->load("commercial"); 62 $menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial")); 63 64 $menu->add_submenu(DOL_URL_ROOT."/comm/clients.php",$langs->trans("Customers")); 65 $menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php",$langs->trans("Prospects")); 66 67 if ($user->rights->propale->lire) 68 { 69 $langs->load("propal"); 70 $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop")); 71 } 72 } 73 74 if ($conf->compta->enabled && $user->rights->general->lire) 75 { 76 $langs->load("compta"); 77 $menu->add(DOL_URL_ROOT."/compta/index.php", $langs->trans("Accountancy")); 78 79 if ($user->rights->facture->lire) { 80 $langs->load("bills"); 81 $menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills")); 82 } 83 } 84 85 if ($conf->fichinter->enabled && $user->rights->ficheinter->lire) 86 { 87 $langs->trans("interventions"); 88 $menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions")); 89 } 90 91 if (($conf->produit->enabled || $conf->service->enabled) && $user->rights->produit->lire) 92 { 93 $langs->load("products"); 94 $chaine=""; 95 if ($conf->produit->enabled) { $chaine.= $langs->trans("Products"); } 96 if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; } 97 if ($conf->service->enabled) { $chaine.= $langs->trans("Services"); } 98 $menu->add(DOL_URL_ROOT."/product/index.php", "$chaine"); 99 100 if ($conf->boutique->enabled) 101 { 102 if ($conf->boutique->livre->enabled) 103 { 104 $menu->add_submenu(DOL_URL_ROOT."/boutique/livre/index.php", "Livres"); 105 } 106 107 if ($conf->boutique->album->enabled) 108 { 109 $menu->add_submenu(DOL_URL_ROOT."/product/album/index.php", "Albums"); 110 } 111 } 112 } 113 114 if ($conf->adherent->enabled && $user->rights->adherent->lire) 115 { 116 $langs->load("members"); 117 $menu->add(DOL_URL_ROOT."/adherents/index.php", $langs->trans("Members")); 118 } 119 120 if ($conf->commande->enabled && $user->rights->commande->lire) 121 { 122 $langs->load("orders"); 123 $menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders")); 124 } 125 126 if ($conf->expedition->enabled && $user->rights->expedition->lire) 127 { 128 $langs->load("sendings"); 129 $menu->add(DOL_URL_ROOT."/expedition/index.php", $langs->trans("Sendings")); 130 } 131 132 if ($conf->mailing->enabled && $user->rights->mailing->lire) 133 { 134 $langs->load("mails"); 135 $menu->add(DOL_URL_ROOT."/comm/mailing/index.php",$langs->trans("EMailings")); 136 } 137 138 if ($conf->telephonie->enabled) 139 { 140 $menu->add(DOL_URL_ROOT."/telephonie/index.php", "Téléphonie"); 141 } 142 143 if ($conf->don->enabled) 144 { 145 $menu->add(DOL_URL_ROOT."/compta/dons/index.php", $langs->trans("Donations")); 146 } 147 148 if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) 149 { 150 $langs->load("suppliers"); 151 $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers")); 152 } 153 154 if ($conf->voyage->enabled && $user->societe_id == 0) 155 { 156 $menu->add(DOL_URL_ROOT."/compta/voyage/index.php","Voyages"); 157 $menu->add_submenu(DOL_URL_ROOT."/compta/voyage/index.php","Voyages"); 158 $menu->add_submenu(DOL_URL_ROOT."/compta/voyage/reduc.php","Reduc"); 159 } 160 161 if ($conf->domaine->enabled) 162 { 163 $menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines"); 164 } 165 166 if ($conf->postnuke->enabled) 167 { 168 $menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial"); 169 } 170 171 if ($conf->bookmark->enabled && $user->rights->bookmark->lire) 172 { 173 $menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks")); 174 } 175 176 if ($user->rights->user->user->lire || $user->admin) 177 { 178 $langs->load("users"); 179 $menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("MenuUsersAndGroups")); 180 } 181 182 if ($user->admin) 183 { 184 $menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("Setup")); 185 } 186 187 188 left_menu($menu->liste); 189 } 190 ?>
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 |
![]() |