Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
0886047c
Commit
0886047c
authored
18 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
Ajout Menu documents
parent
444840c8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/pre.inc.php
+106
-102
106 additions, 102 deletions
htdocs/pre.inc.php
with
106 additions
and
102 deletions
htdocs/pre.inc.php
+
106
−
102
View file @
0886047c
<?php
/* Copyright (C) 2001-200
5
Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2001-200
7
Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 ric Seigne <erics@rycks.com>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
...
...
@@ -24,9 +24,9 @@
*/
/**
\file htdocs/pre.inc.php
\brief Fichier gestionnaire du menu de gauche de l'accueil
\version $Revision$
\file htdocs/pre.inc.php
\brief Fichier gestionnaire du menu de gauche de l'accueil
\version $Revision$
*/
require
(
"./main.inc.php"
);
...
...
@@ -34,70 +34,70 @@ $user->getrights();
function
llxHeader
(
$head
=
""
)
{
global
$user
,
$conf
,
$langs
;
global
$user
,
$conf
,
$langs
;
top_menu
(
$head
);
$menu
=
new
Menu
();
if
(
$conf
->
societe
->
enabled
&&
$user
->
rights
->
societe
->
lire
)
top_menu
(
$head
);
$menu
=
new
Menu
();
if
(
$conf
->
societe
->
enabled
&&
$user
->
rights
->
societe
->
lire
)
{
$langs
->
load
(
"companies"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/societe.php"
,
$langs
->
trans
(
"Companies"
));
if
(
$user
->
rights
->
societe
->
creer
)
$langs
->
load
(
"companies"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/societe.php"
,
$langs
->
trans
(
"Companies"
));
if
(
$user
->
rights
->
societe
->
creer
)
{
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/soc.php?action=create"
,
$langs
->
trans
(
"MenuNewCompany"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/soc.php?action=create"
,
$langs
->
trans
(
"MenuNewCompany"
));
}
if
(
is_dir
(
"societe/groupe"
))
if
(
is_dir
(
"societe/groupe"
))
{
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/societe/groupe/index.php"
,
$langs
->
trans
(
"MenuSocGroup"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/societe/groupe/index.php"
,
$langs
->
trans
(
"MenuSocGroup"
));
}
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/contact/index.php"
,
$langs
->
trans
(
"Contacts"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/contact/index.php"
,
$langs
->
trans
(
"Contacts"
));
}
if
(
$conf
->
commercial
->
enabled
&&
$user
->
rights
->
commercial
->
lire
)
{
$langs
->
load
(
"commercial"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/comm/index.php"
,
$langs
->
trans
(
"Commercial"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/clients.php"
,
$langs
->
trans
(
"Customers"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/prospect/prospects.php"
,
$langs
->
trans
(
"Prospects"
));
if
(
$user
->
rights
->
propale
->
lire
)
if
(
$conf
->
commercial
->
enabled
&&
$user
->
rights
->
commercial
->
lire
)
{
$langs
->
load
(
"commercial"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/comm/index.php"
,
$langs
->
trans
(
"Commercial"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/clients.php"
,
$langs
->
trans
(
"Customers"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/prospect/prospects.php"
,
$langs
->
trans
(
"Prospects"
));
if
(
$user
->
rights
->
propale
->
lire
)
{
$langs
->
load
(
"propal"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/propal.php"
,
$langs
->
trans
(
"Prop"
));
$langs
->
load
(
"propal"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/propal.php"
,
$langs
->
trans
(
"Prop"
));
}
}
if
(
$conf
->
compta
->
enabled
||
$conf
->
comptaexpert
->
enabled
)
if
(
$conf
->
compta
->
enabled
||
$conf
->
comptaexpert
->
enabled
)
{
$langs
->
load
(
"compta"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/compta/index.php"
,
$langs
->
trans
(
"MenuFinancial"
));
if
(
$user
->
rights
->
facture
->
lire
)
{
$langs
->
load
(
"bills"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/compta/facture.php"
,
$langs
->
trans
(
"Bills"
));
}
$langs
->
load
(
"compta"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/compta/index.php"
,
$langs
->
trans
(
"MenuFinancial"
));
if
(
$user
->
rights
->
facture
->
lire
)
{
$langs
->
load
(
"bills"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/compta/facture.php"
,
$langs
->
trans
(
"Bills"
));
}
}
if
(
$conf
->
fichinter
->
enabled
&&
$user
->
rights
->
ficheinter
->
lire
)
if
(
$conf
->
fichinter
->
enabled
&&
$user
->
rights
->
ficheinter
->
lire
)
{
$langs
->
trans
(
"interventions"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/fichinter/index.php"
,
$langs
->
trans
(
"Interventions"
));
$langs
->
trans
(
"interventions"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/fichinter/index.php"
,
$langs
->
trans
(
"Interventions"
));
}
if
((
$conf
->
produit
->
enabled
||
$conf
->
service
->
enabled
)
&&
$user
->
rights
->
produit
->
lire
)
{
$langs
->
load
(
"products"
);
$chaine
=
""
;
if
(
$conf
->
produit
->
enabled
)
{
$chaine
.
=
$langs
->
trans
(
"Products"
);
}
if
(
$conf
->
produit
->
enabled
&&
$conf
->
service
->
enabled
)
{
$chaine
.
=
"/"
;
}
if
(
$conf
->
service
->
enabled
)
{
$chaine
.
=
$langs
->
trans
(
"Services"
);
}
$menu
->
add
(
DOL_URL_ROOT
.
"/product/index.php"
,
"
$chaine
"
);
if
((
$conf
->
produit
->
enabled
||
$conf
->
service
->
enabled
)
&&
$user
->
rights
->
produit
->
lire
)
{
$langs
->
load
(
"products"
);
$chaine
=
""
;
if
(
$conf
->
produit
->
enabled
)
{
$chaine
.
=
$langs
->
trans
(
"Products"
);
}
if
(
$conf
->
produit
->
enabled
&&
$conf
->
service
->
enabled
)
{
$chaine
.
=
"/"
;
}
if
(
$conf
->
service
->
enabled
)
{
$chaine
.
=
$langs
->
trans
(
"Services"
);
}
$menu
->
add
(
DOL_URL_ROOT
.
"/product/index.php"
,
"
$chaine
"
);
/*
if ($conf->boutique->enabled)
{
...
...
@@ -115,80 +115,84 @@ function llxHeader($head = "")
}
if
(
$conf
->
commande
->
enabled
&&
$user
->
rights
->
commande
->
lire
)
if
(
$conf
->
commande
->
enabled
&&
$user
->
rights
->
commande
->
lire
)
{
$langs
->
load
(
"orders"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/commande/index.php"
,
$langs
->
trans
(
"Orders"
));
$langs
->
load
(
"orders"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/commande/index.php"
,
$langs
->
trans
(
"Orders"
));
}
if
(
$conf
->
expedition
->
enabled
&&
$user
->
rights
->
expedition
->
lire
)
if
(
$conf
->
document
->
enabled
)
{
$langs
->
load
(
"sendings"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/expedition/index.php"
,
$langs
->
trans
(
"Sendings"
));
$menu
->
add
(
DOL_URL_ROOT
.
"/docs/index.php"
,
$langs
->
trans
(
"Documents"
));
}
if
(
$conf
->
mailing
->
enabled
&&
$user
->
rights
->
mailing
->
lire
)
if
(
$conf
->
expedition
->
enabled
&&
$user
->
rights
->
expedition
->
lire
)
{
$langs
->
load
(
"
mail
s"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/
comm/mailing
/index.php"
,
$langs
->
trans
(
"
EMail
ings"
));
$langs
->
load
(
"
sending
s"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/
expedition
/index.php"
,
$langs
->
trans
(
"
Send
ings"
));
}
if
(
$conf
->
telephonie
->
enabled
)
if
(
$conf
->
mailing
->
enabled
&&
$user
->
rights
->
mailing
->
lire
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/index.php"
,
"Tlphonie"
);
$langs
->
load
(
"mails"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/comm/mailing/index.php"
,
$langs
->
trans
(
"EMailings"
));
}
if
(
$conf
->
don
->
enabled
)
if
(
$conf
->
telephonie
->
enabled
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/
compta/dons
/index.php"
,
$langs
->
trans
(
"Donations"
)
);
$menu
->
add
(
DOL_URL_ROOT
.
"/
telephonie
/index.php"
,
"Tlphonie"
);
}
if
(
$conf
->
fournisseur
->
enabled
&&
$user
->
rights
->
fournisseur
->
commande
->
lire
)
if
(
$conf
->
don
->
enabled
)
{
$langs
->
load
(
"suppliers"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/fourn/index.php"
,
$langs
->
trans
(
"Suppliers"
));
$menu
->
add
(
DOL_URL_ROOT
.
"/compta/dons/index.php"
,
$langs
->
trans
(
"Donations"
));
}
if
(
$conf
->
voyage
->
enabled
&&
$user
->
societe_id
==
0
)
if
(
$conf
->
fournisseur
->
enabled
&&
$user
->
rights
->
fournisseur
->
commande
->
lire
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/compta/voyage/index.php"
,
"Voyages"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/compta/voyage/index.php"
,
"Voyages"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/compta/voyage/reduc.php"
,
"Reduc"
);
$langs
->
load
(
"suppliers"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/fourn/index.php"
,
$langs
->
trans
(
"Suppliers"
));
}
if
(
$conf
->
domain
e
->
enabled
)
if
(
$conf
->
voyag
e
->
enabled
&&
$user
->
societe_id
==
0
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/domain/index.php"
,
"Domaines"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/compta/voyage/index.php"
,
"Voyages"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/compta/voyage/index.php"
,
"Voyages"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/compta/voyage/reduc.php"
,
"Reduc"
);
}
if
(
$conf
->
postnuk
e
->
enabled
)
if
(
$conf
->
domain
e
->
enabled
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/
postnuke/articles
/index.php"
,
"
Editorial
"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/
domain
/index.php"
,
"
Domaines
"
);
}
if
(
$conf
->
bookmark
->
enabled
&&
$user
->
rights
->
bookmark
->
lire
)
if
(
$conf
->
postnuke
->
enabled
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/
bookmarks/liste.php"
,
$langs
->
trans
(
"Bookmarks"
)
);
$menu
->
add
(
DOL_URL_ROOT
.
"/
postnuke/articles/index.php"
,
"Editorial"
);
}
if
(
$conf
->
export
->
enabled
)
if
(
$conf
->
bookmark
->
enabled
&&
$user
->
rights
->
bookmark
->
lire
)
{
$langs
->
load
(
"exports"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/exports/index.php"
,
$langs
->
trans
(
"Exports"
));
$menu
->
add
(
DOL_URL_ROOT
.
"/bookmarks/liste.php"
,
$langs
->
trans
(
"Bookmarks"
));
}
if
(
$
user
->
rights
->
user
->
user
->
lire
||
$user
->
admin
)
if
(
$
conf
->
export
->
enabled
)
{
$langs
->
load
(
"
user
s"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/
user/home
.php"
,
$langs
->
trans
(
"
MenuUsersAndGroup
s"
));
$langs
->
load
(
"
export
s"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/
exports/index
.php"
,
$langs
->
trans
(
"
Export
s"
));
}
if
(
$user
->
admin
)
if
(
$user
->
rights
->
user
->
user
->
lire
||
$user
->
admin
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/admin/index.php"
,
$langs
->
trans
(
"Setup"
));
$langs
->
load
(
"users"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/user/home.php"
,
$langs
->
trans
(
"MenuUsersAndGroups"
));
}
left_menu
(
$menu
->
liste
);
if
(
$user
->
admin
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/admin/index.php"
,
$langs
->
trans
(
"Setup"
));
}
left_menu
(
$menu
->
liste
);
}
?>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment