32if (!defined(
'NOCSRFCHECK')) {
33 define(
'NOCSRFCHECK', 1);
35if (!defined(
'NOTOKENRENEWAL')) {
36 define(
'NOTOKENRENEWAL', 1);
38if (!defined(
'NOREQUIREMENU')) {
39 define(
'NOREQUIREMENU', 1);
41if (!defined(
'NOREQUIREHTML')) {
42 define(
'NOREQUIREHTML', 1);
44if (!defined(
'NOBROWSERNOTIF')) {
45 define(
'NOBROWSERNOTIF', 1);
48if (!defined(
'DISABLE_JQUERY_TABLEDND')) {
49 define(
'DISABLE_JQUERY_TABLEDND', 1);
51if (!defined(
'DISABLE_JQUERY_JNOTIFY')) {
52 define(
'DISABLE_JQUERY_JNOTIFY', 1);
54if (!defined(
'DISABLE_JQUERY_FLOT')) {
55 define(
'DISABLE_JQUERY_FLOT', 1);
57if (!defined(
'DISABLE_JQUERY_JEDITABLE')) {
58 define(
'DISABLE_JQUERY_JEDITABLE', 1);
60if (!defined(
'DISABLE_CKEDITOR')) {
61 define(
'DISABLE_CKEDITOR', 1);
63if (!defined(
'DISABLE_DATE_PICKER')) {
64 define(
'DISABLE_DATE_PICKER', 1);
66if (!defined(
'DISABLE_SELECT2')) {
67 define(
'DISABLE_SELECT2', 1);
70require_once
'../main.inc.php';
80 $langs->setDefaultLang(
GETPOST(
'lang',
'aZ09'));
84$right = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'left' :
'right');
85$left = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'right' :
'left');
94 header(
'Cache-Control: max-age='.
GETPOSTINT(
'cache').
', public, must-revalidate');
96 header(
'Expires: '.gmdate(
'D, d M Y H:i:s',
dol_now(
'gmt') +
GETPOSTINT(
'cache')).
' GMT');
98 header(
'Pragma: token=public');
101 header(
'Cache-Control: no-cache');
104$title = $langs->trans(
"Menu");
107$head =
'<!-- Menu -->'.
"\n";
109$arrayofcss = array();
110top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
112print
'<body class="getmenudiv">'.
"\n";
117 /* Hide the non active LIs by default*/
123 padding-'.$left.
': 0;
132 .getmenudiv a:hover {
133 text-decoration: none;
136 .ulmenu li.lilevel0 {
137 border-bottom: 1px solid #ccc;
142 padding-'.$right.
': 8px !important;
145 li.lilevel1 > a, li.lilevel1 > i {
146 padding-'.$left.
': 30px !important;
149 padding-'.$left.
': 60px !important;
152 padding-'.$left.
': 40px !important;
155 padding-'.$left.
': 0px !important;
158 padding-'.$left.
': 0px !important;
161 a.alilevel0, span.spanlilevel0 {
162 background-image: url(\''.DOL_URL_ROOT.
'/theme/'.urlencode(
$conf->theme).
'/img/next.png\') !important;
163 background-repeat: no-repeat !important;
164 background-position-y: 18px;';
165if ($langs->trans(
"DIRECTION") ==
'rtl') {
166 print
'background-position: right;';
167 print
'padding: 1em 40px 1em 15px;';
169 print
'background-position-x: 10px;';
170 print
'padding: 1em 15px 1em 40px;';
175 li.lilevel0 font.vsmenudisabled {
176 background-repeat: no-repeat !important;
177 background-position-x: 10px;
178 background-position-y: 16px;
179 padding: 1em 15px 1em 40px;
182 font-size: 16px !important;
185 padding: 1em 15px 0.5em 40px;
186 border-top: 1px solid #aaa;
189 border-right: 0px ! important;
191 li.lilevel1:first-child {
198 li.lilevel1 > a, li.lilevel1 > i {
199 background-repeat: no-repeat !important;';
200if ($langs->trans(
"DIRECTION") ==
'rtl') {
201 print
'background-position: right;';
203 print
'background-position-x: 10px;';
205print
' background-position-y: 1px;
206 padding-'.$left.
': 20px;
208 li.lilevel1 a, li.lilevel1 {
213 .fa.fa-does-not-exists {
214 padding: 0px !important;
219 padding: 0.7em 15px 0.7em 40px;
225 padding: 0.6em 15px 0.6em 60px;
231 padding: 0.2em 15px 8px 60px;
237 padding: 0.2em 15px 0.2em 60px;
242 li.lilevel3:last-child {
243 padding-bottom: 10px;
245 a.alilevel0, li.lilevel1 a {
246 text-overflow: ellipsis;
251 .vsmenudisabled .fa, .vsmenudisabled .fas, .vsmenudisabled .far {
252 color: #aaa !important;
256<script nonce="'.
getNonce().
'" type="text/javascript">
257$(document).ready(function(){
258 $("body li").click(function(){
259 console.log("We click on a li");
261 $(this).siblings().find("ul").slideUp(0);
263 $(this).find("ul").slideToggle(200);
265 var target = $(this);
266 $(\'html, body\').animate({
267 scrollTop: target.offset().top
276if (empty($user->socid)) {
283$file_menu =
$conf->standard_menu;
285 $file_menu =
GETPOST(
'menu',
'aZ09');
287if (!class_exists(
'MenuManager')) {
289 $dirmenus = array_merge(array(
"/core/menus/"), (array)
$conf->modules_parts[
'menus']);
290 foreach ($dirmenus as $dirmenu) {
297 dol_syslog(
"You define a menu manager '".$file_menu.
"' that can not be loaded.", LOG_WARNING);
298 $file_menu =
'eldy_menu.php';
303$menumanager =
new MenuManager($db, empty($user->socid) ? 0 : 1);
305$menumanager->loadMenu(
'all',
'all');
308$menumanager->showmenu(
'jmobile');
dol_now($mode='gmt')
Return date for now.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getNonce()
Return a random string to be used as a nonce value for js.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.