dolibarr 24.0.0-beta
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
6 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
7 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
29if (!defined('NOLOGIN')) {
30 define('NOLOGIN', '1');
31}
32if (!defined('NOBROWSERNOTIF')) {
33 define('NOBROWSERNOTIF', 1);
34}
35if (!defined('NOIPCHECK')) {
36 define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
37}
38
39// Load Dolibarr environment
40require '../../main.inc.php';
41require_once '../../core/lib/functions2.lib.php';
48$langs->loadLangs(array("main", "install", "other"));
49
50$conf->dol_hide_topmenu = GETPOSTINT('dol_hide_topmenu');
51$conf->dol_hide_leftmenu = GETPOSTINT('dol_hide_leftmenu');
52$conf->dol_optimize_smallscreen = GETPOSTINT('dol_optimize_smallscreen');
53$conf->dol_no_mouse_hover = GETPOSTINT('dol_no_mouse_hover');
54$conf->dol_use_jmobile = GETPOSTINT('dol_use_jmobile');
55
56// Security check
57global $dolibarr_main_demo;
58if (empty($dolibarr_main_demo)) {
59 httponly_accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page');
60}
61
62// Initialize a technical object to manage hooks of the page.
63// Note that conf->hooks_modules contains an array of hook contexats
64$res = $hookmanager->initHooks(array('demo'));
65
66$demoprofiles = array();
67$alwayscheckedmodules = array();
68$alwaysuncheckedmodules = array();
69$alwayshiddencheckedmodules = array();
70$alwayshiddenuncheckedmodules = array();
71
72$url = '';
73$url .= ($url ? '&' : '').($conf->dol_hide_topmenu ? 'dol_hide_topmenu='.$conf->dol_hide_topmenu : '');
74$url .= ($url ? '&' : '').($conf->dol_hide_leftmenu ? 'dol_hide_leftmenu='.$conf->dol_hide_leftmenu : '');
75$url .= ($url ? '&' : '').($conf->dol_optimize_smallscreen ? 'dol_optimize_smallscreen='.$conf->dol_optimize_smallscreen : '');
76$url .= ($url ? '&' : '').($conf->dol_no_mouse_hover ? 'dol_no_mouse_hover='.$conf->dol_no_mouse_hover : '');
77$url .= ($url ? '&' : '').($conf->dol_use_jmobile ? 'dol_use_jmobile='.$conf->dol_use_jmobile : '');
78$url = DOL_URL_ROOT.'/index.php'.($url ? '?'.$url : '');
79
80$tmpaction = 'view';
81$parameters = array();
82$object = new stdClass();
83$reshook = $hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks
84$error = $hookmanager->error;
85$errors = $hookmanager->errors;
86if (empty($reshook)) {
87 $demoprofiles = array(
88 array(
89 'default' => '1', 'key' => 'profdemoservonly', 'label' => 'DemoCompanyServiceOnly',
90 'disablemodules' => 'adherent,barcode,bom,cashdesk,don,expedition,externalsite,ftp,incoterm,mailmanspip,margin,mrp,prelevement,product,productbatch,stock,takepos',
91 //'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot8.png',
92 'icon' => DOL_URL_ROOT.'/public/demo/demo-profile-service.jpg',
93 'url' => $url,
94 'lang' => '',
95 ),
96 array(
97 'default' => '0', 'key' => 'profmanufacture', 'label' => 'DemoCompanyManufacturing',
98 'disablemodules' => 'adherent,contrat,don,externalsite,ficheinter,ftp,mailmanspip,prelevement,service',
99 'icon' => DOL_URL_ROOT.'/public/demo/demo-profile-manufacturing.jpg',
100 'url' => $url,
101 'lang' => '',
102 ),
103 array(
104 'default' => '0', 'key' => 'profdemoprodstock', 'label' => 'DemoCompanyProductAndStocks',
105 'disablemodules' => 'adherent,bom,contrat,don,externalsite,ficheinter,ftp,mailmanspip,mrp,prelevement,service',
106 //'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png',
107 'icon' => DOL_URL_ROOT.'/public/demo/demo-profile-product.jpg',
108 'url' => $url,
109 'lang' => '',
110 ),
111 array(
112 'default' => '0', 'key' => 'profdemofun2', 'label' => 'DemoFundation2',
113 'disablemodules' => 'barcode,cashdesk,bom,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,ficheinter,ftp,incoterm,mailmanspip,margin,mrp,prelevement,product,productbatch,projet,propal,propale,service,societe,stock,tax,takepos',
114 //'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png',
115 'icon' => DOL_URL_ROOT.'/public/demo/demo-profile-foundation.jpg',
116 'url' => $url,
117 'lang' => '',
118 ),
119 // All demo profiles
120 array(
121 'default' => '0', 'key' => 'profdemoall', 'label' => 'ChooseYourDemoProfilMore',
122 'disablemodules' => 'adherent,cashdesk,don,externalsite,mailmanspip',
123 //'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot9.png'
124 'icon' => DOL_URL_ROOT.'/public/demo/demo-profile-all.jpg',
125 'lang' => '',
126 )
127 );
128
129
130 // Visible
131 $alwayscheckedmodules = array('barcode', 'bookmark', 'categorie', 'externalrss', 'fckeditor', 'geoipmaxmind', 'gravatar', 'memcached', 'syslog', 'user', 'webservices'); // Technical module we always want
132 $alwaysuncheckedmodules = array('ai', 'dav', 'dynamicprices', 'incoterm', 'loan', 'multicurrency', 'paybox', 'paypal', 'stripe', 'google', 'printing', 'scanner', 'socialnetworks', 'webhook', 'webportal', 'website', 'zapier'); // Module we don't want by default
133 // Not visible
134 $alwayshiddencheckedmodules = array('accounting', 'api', 'barcode', 'blockedlog', 'bookmark', 'clicktodial', 'comptabilite', 'cron', 'document', 'domain', 'externalrss', 'externalsite', 'fckeditor', 'geoipmaxmind', 'gravatar', 'label', 'ldap',
135 'mailmanspip', 'notification', 'oauth', 'syslog', 'user', 'webservices', 'workflow',
136 // Extended modules
137 'memcached', 'numberwords', 'zipautofillfr');
138 $alwayshiddenuncheckedmodules = array('cashdesk', 'collab', 'dav', 'debugbar', 'emailcollector', 'ftp', 'hrm', 'modulebuilder', 'printing', 'webservicesclient', 'zappier',
139 // Extended modules
140 'awstats', 'bittorrent', 'bootstrap', 'cabinetmed', 'cmcic', 'concatpdf', 'customfield', 'datapolicy', 'deplacement', 'dolicloud', 'filemanager', 'lightbox', 'mantis', 'monitoring', 'moretemplates', 'multicompany', 'nltechno', 'numberingpack', 'openstreetmap',
141 'ovh', 'phenix', 'phpsysinfo', 'pibarcode', 'postnuke', 'dynamicprices', 'receiptprinter', 'selectbank', 'skincoloreditor', 'submiteverywhere', 'survey', 'thomsonphonebook', 'topten', 'tvacerfa', 'voyage', 'webcalendar', 'webmail');
142}
143
144// Search modules
145$dirlist = $conf->file->dol_document_root;
146
147
148// Search modules dirs
149$modulesdir = dolGetModulesDirs();
150
151$filename = array();
152$modules = array();
153$orders = array();
154$categ = array();
155$i = 0; // is a sequencer of modules found
156$j = 0; // j is module number. Automatically assigned if module number is not defined.
157$const_name = '';
158
159foreach ($modulesdir as $dir) {
160 // Load tables modules, name, number, orders from directory 'dir'
161 $handle = @opendir($dir);
162 if (is_resource($handle)) {
163 while (($file = readdir($handle)) !== false) {
164 //print "$i ".$file."\n<br>";
165 if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
166 $modName = substr($file, 0, dol_strlen($file) - 10);
167
168 if ($modName) {
169 try {
170 include_once $dir.$file;
171 $objMod = new $modName($db);
172
173 if ($objMod->numero > 0) {
174 $j = $objMod->numero;
175 } else {
176 $j = 1000 + $i;
177 }
178
179 $modulequalified = 1;
180
181 // We discard modules according to features level (PS: if module is activated we always show it)
182 $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
183 if ($objMod->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && !getDolGlobalString($const_name)) {
184 $modulequalified = 0;
185 }
186 if ($objMod->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && !getDolGlobalString($const_name)) {
187 $modulequalified = 0;
188 }
189
190 if ($modulequalified) {
191 $modules[$i] = $objMod;
192 $filename[$i] = $modName;
193 $orders[$i] = $objMod->family."_".$j; // Tri par famille puis numero module
194 //print "x".$modName." ".$orders[$i]."\n<br>";
195 $j++;
196 $i++;
197 }
198 } catch (Exception $e) {
199 dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
200 }
201 }
202 }
203 }
204 }
205}
206
207'@phan-var-force DolibarrModules[] $modules';
208asort($orders);
209
210
211/*
212 * Actions
213 */
214
215if (GETPOST('action', 'aZ09') == 'gotodemo') { // Action run when we click on "Start" after selection modules
216 //print 'ee'.GETPOST("demochoice");
217 $disablestring = '';
218 // If we disable modules using a profile choice
219 if (GETPOST("demochoice")) {
220 foreach ($demoprofiles as $profilearray) {
221 if ($profilearray['key'] == GETPOST("demochoice")) {
222 $disablestring = $profilearray['disablemodules'];
223 break;
224 }
225 }
226 }
227 // If we disable modules using personalized list
228 foreach ($modules as $val) {
229 $modulekeyname = strtolower($val->name);
230 if (!GETPOST($modulekeyname) && empty($val->always_enabled) && !in_array($modulekeyname, $alwayscheckedmodules)) {
231 $disablestring .= $modulekeyname.',';
232 if ($modulekeyname == 'propale') {
233 $disablestring .= 'propal,';
234 }
235 }
236 }
237
238 // Do redirect to login page
239 if ($disablestring) {
240 if (GETPOST('urlfrom')) {
241 $url .= (preg_match('/\?/', $url) ? '&amp;' : '?').'urlfrom='.urlencode(GETPOST('urlfrom', 'alpha'));
242 }
243 $url .= (preg_match('/\?/', $url) ? '&amp;' : '?').'disablemodules='.$disablestring;
244
245 header("Location: ".$url);
246 exit;
247 }
248}
249
250
251/*
252 * View
253 */
254
255$head = '';
256$head .= '<meta name="keywords" content="demo,online,demonstration,example,test,erp,crm,demos,web">'."\n";
257$head .= '<meta name="description" content="Dolibarr ERP and CRM demo. You can test here several profiles for Dolibarr ERP and CRM demonstration.">'."\n";
258
259$head .= '
260<script type="text/javascript">
261var openedId="";
262jQuery(document).ready(function () {
263 jQuery("tr.moduleline").hide();
264 // Enable this to allow personalized setup
265 jQuery(".modulelineshow").attr("href","#a1profdemoall");
266 jQuery(".cursorpointer").css("cursor","pointer");
267 jQuery(".modulelineshow").click(function() {
268 console.log("We select the custom demo");
269 var idstring=$(this).attr("id");
270 if (typeof idstring != "undefined")
271 {
272 var currentId = idstring.substring(2);
273 jQuery("tr.moduleline").hide();
274 if (currentId != openedId)
275 {
276 openedId=currentId;
277 jQuery("#tr1"+currentId).show();
278 jQuery("#tr2"+currentId).show();
279 }
280 else openedId = "";
281 }
282 });
283});
284</script>';
285
286llxHeaderVierge($langs->trans("DolibarrDemo"), $head);
287
288
289print "\n";
290
291print '<div class="demoban demobackground">';
292print '<div class="right" style="padding-right: 30px; padding-top: 30px;">';
293print '<a alt="Official portal of your ERP CRM application" targe="_blank" href="https://www.dolibarr.org?utm_medium=website&utm_source=demo"><img class="demologo" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" alt="Dolibarr logo"></a>';
294print '</div>';
295print '</div>';
296
297print '<div class="demobantext" style="max-width: 1024px;">';
298print '<div style="font-size: 0.8em; padding: 40px;">';
299print '<div class="hideonsmartphone" style="text-align: justify;">'.$langs->trans("DemoDesc").'<br>';
300print $langs->trans("DemoDesc2", 'https://www.dolibarr.org/onlinedemo');
301print '</div><br>';
302print '<div class="titre"><span style="font-size: 20px">'.$langs->trans("ChooseYourDemoProfil").'</span></div>';
303print '</div>';
304print '</div>';
305
306
307print '<div class="clearboth"></div>';
308print '<div class="demobanbox">';
309
310$i = 0;
311foreach ($demoprofiles as $profilearray) {
312 if ($profilearray['default'] >= 0) {
313 //print $profilearray['lang'];
314 if (!empty($profilearray['lang'])) {
315 $langs->load($profilearray['lang']);
316 }
317
318 $url = $_SERVER["PHP_SELF"].'?action=gotodemo';
319 $urlwithmod = $url.'&amp;demochoice='.$profilearray['key'];
320 // Should work with DOL_URL_ROOT='' or DOL_URL_ROOT='/dolibarr'
321 //print "xx".$_SERVER["PHP_SELF"].' '.DOL_URL_ROOT.'<br>';
322
323 $urlfrom = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/i', '', $_SERVER["PHP_SELF"]);
324 //print $urlfrom;
325
326 if (!empty($profilearray['url'])) {
327 $urlwithmod = $profilearray['url'];
328 $urlwithmod = $urlwithmod.(preg_match('/\?/', $urlwithmod) ? '&amp;' : '?').'urlfrom='.urlencode($urlfrom);
329 if (!empty($profilearray['disablemodules'])) {
330 $urlwithmod = $urlwithmod.(preg_match('/\?/', $urlwithmod) ? '&amp;' : '?').'disablemodules='.$profilearray['disablemodules'];
331 }
332 }
333
334 if (empty($profilearray['url'])) {
335 print '<div class="clearboth"></div>';
336 }
337
338 print '<form method="POST" class="valigntop inline-block" name="form'.$profilearray['key'].'" id="form'.$profilearray['key'].'" action="'.$_SERVER["PHP_SELF"].'#a1'.$profilearray['key'].'">'."\n";
339 print '<input type="hidden" name="action" value="gotodemo">'."\n";
340 print '<input type="hidden" name="urlfrom" value="'.dol_escape_htmltag($urlfrom).'">'."\n";
341 print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
342 print '<input type="hidden" name="username" value="demo">'."\n";
343 print '<input type="hidden" name="dol_hide_topmenu" value="'.$conf->dol_hide_topmenu.'">'."\n";
344 print '<input type="hidden" name="dol_hide_leftmenu" value="'.$conf->dol_hide_leftmenu.'">'."\n";
345 print '<input type="hidden" name="dol_optimize_smallscreen" value="'.$conf->dol_optimize_smallscreen.'">'."\n";
346 print '<input type="hidden" name="dol_no_mouse_hover" value="'.$conf->dol_no_mouse_hover.'">'."\n";
347 print '<input type="hidden" name="dol_use_jmobile" value="'.$conf->dol_use_jmobile.'">'."\n";
348
349 print '<div id="div'.$profilearray['key'].'" summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" class="center inline-block CTable CTableRow'.($i % 2 == 0 ? '1' : '0').'">'."\n";
350
351
352 print '<div id="a1'.$profilearray['key'].'" class="demobox '.(empty($profilearray['url']) ? 'modulelineshow cursorpointer maxwidth1000' : 'nomodulelines').'">';
353
354 print '<a href="'.$urlwithmod.'" class="'.(empty($profilearray['url']) ? 'modulelineshow' : 'nomodulelines').'">';
355 print '<div style="padding: 10px;">';
356
357 print '<img class="demothumb" src="'.$profilearray['icon'].'" alt="Demo '.$profilearray['label'].'">';
358
359 print '<div class="clearboth"></div>';
360
361 print '<div class="demothumbtext">';
362 print $langs->trans($profilearray['label']);
363 print '</div>';
364
365 print '</div>';
366 print '</a>';
367
368
369 // Modules (a profile to customize by selecting modules)
370 if (empty($profilearray['url'])) {
371 print '<div id="tr1'.$profilearray['key'].'" class="moduleline hidden" style="text-align: justify; font-size:0.75em; padding-bottom: 8px">';
372
373 print '<span class="opacitymedium small">'.$langs->trans("ThisIsListOfModules").'</span><br><br>';
374
375 print '<div class="csscolumns">';
376
377 $listofdisabledmodules = explode(',', $profilearray['disablemodules']);
378 $j = 0;
379 //$nbcolsmod = empty($conf->dol_optimize_smallscreen) ? 4 : 3;
380 //var_dump($modules);
381 foreach ($orders as $index => $key) { // Loop on qualified (enabled) modules
382 //print $index.' '.$key;
383 $val = $modules[$index];
384 $modulekeyname = strtolower($val->name);
385
386 $modulequalified = 1;
387 if (!empty($val->always_enabled) || in_array($modulekeyname, $alwayshiddenuncheckedmodules)) {
388 $modulequalified = 0;
389 }
390 if ($val->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && !getDolGlobalString($const_name)) {
391 $modulequalified = 0;
392 }
393 if ($val->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && !getDolGlobalString($const_name)) {
394 $modulequalified = 0;
395 }
396 if (!$modulequalified) {
397 continue;
398 }
399
400 if (in_array($modulekeyname, $alwayshiddencheckedmodules)) {
401 print "\n".'<!-- Module '.$modulekeyname.' hidden and always checked -->';
402 print '<input type="hidden" name="'.$modulekeyname.'" value="1">';
403 } else {
404 //$modulo = ($j % $nbcolsmod);
405 //if ($modulo == 0) print '<tr>';
406 print '<!-- id='.$val->numero.' -->';
407 print '<div class="nowrap">';
408 print '<input type="checkbox" class="checkbox valignmiddle paddingright" id="id'.$modulekeyname.'" name="'.$modulekeyname.'" value="1" title="'.dol_escape_htmltag($val->getName()).'"';
409 $disabled = '';
410 if (in_array($modulekeyname, $alwaysuncheckedmodules)) {
411 $disabled = 'disabled';
412 print ' '.$disabled;
413 }
414 if (!in_array($modulekeyname, $alwaysuncheckedmodules) && (!in_array($modulekeyname, $listofdisabledmodules) || in_array($modulekeyname, $alwayscheckedmodules))) {
415 print ' checked';
416 }
417 print '>';
418 /*
419 $s = img_picto('', $modulekeyname, 'class="pictofixedwidth paddingleft"');
420 if ($s) {
421 print $s;
422 } else {
423 print img_picto('', 'generic', 'class="pictofixedwidth paddingleft"');
424 }*/
425 print '<label for="id'.$modulekeyname.'" class="inline-block demomaxoveflow valignmiddle paddingleft'.($disabled ? ' opacitymedium' : '').'" title="'.dol_escape_htmltag($val->getName()).'">'.$val->getName().'</label><br>';
426 print '</div>';
427 //if ($modulo == ($nbcolsmod - 1)) print '</tr>';
428 $j++;
429 }
430 }
431
432 print '</div>';
433
434 print '<br><div class="center">';
435 print '<input type="submit" value=" &nbsp; &nbsp; '.$langs->trans("Start").' &nbsp; &nbsp; " class="button">';
436 print '<br><br>';
437 print '</div>';
438
439 print '</div>';
440 }
441
442 print '</div></div>';
443 print '</form>'."\n";
444
445 $i++;
446 }
447}
448
449print '</div>';
450
451print '<br>';
452
453
454// TODO Replace this with a hook
455// Google Adsense (need Google module)
456if (isModEnabled('google') && getDolGlobalString('MAIN_GOOGLE_AD_CLIENT') && getDolGlobalString('MAIN_GOOGLE_AD_SLOT')) {
457 if (empty($conf->dol_use_jmobile)) {
458 print '<div align="center">'."\n";
459 print '<script><!--'."\n";
460 print 'google_ad_client = "' . getDolGlobalString('MAIN_GOOGLE_AD_CLIENT').'";'."\n";
461 print 'google_ad_slot = "' . getDolGlobalString('MAIN_GOOGLE_AD_SLOT').'";'."\n";
462 print 'google_ad_width = ' . getDolGlobalString('MAIN_GOOGLE_AD_WIDTH').';'."\n";
463 print 'google_ad_height = ' . getDolGlobalString('MAIN_GOOGLE_AD_HEIGHT').';'."\n";
464 print '//-->'."\n";
465 print '</script>'."\n";
466 print '<script src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>'."\n";
467 print '</div>'."\n";
468 } else {
469 print '<!-- google js advert tag disabled with jmobile -->'."\n";
470 }
471}
472
474
475$db->close();
476
477
492function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [], $ws = '') // @phan-suppress-current-line PhanRedefineFunction
493{
494 top_httphead();
495
496 top_htmlhead($head, $title, 0, 0, array(), array('public/demo/demo.css'), 0, 1);
497
498 print '<body class="demobody"><div class="demobackgrounddiv">'."\n";
499}
500
508function llxFooterVierge() // @phan-suppress-current-line PhanRedefineFunction
509{
510 printCommonFooter('public');
511
512 print "\n";
513 print "</div></body>\n";
514 print "</html>\n";
515}
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
dolGetModulesDirs($subdir='')
Return list of directories that contain modules.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
printCommonFooter($zone='private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs=[], $arrayofcss=[], $ws='')
Show header for booking.
Definition index.php:143
llxFooterVierge()
Show footer for demo.
Definition index.php:508
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.