dolibarr 20.0.2
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 Frédéric France <frederic.france@free.fr>
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 3 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, see <https://www.gnu.org/licenses/>.
20 */
21
28if (!defined('NOLOGIN')) {
29 define('NOLOGIN', '1');
30}
31if (!defined('NOBROWSERNOTIF')) {
32 define('NOBROWSERNOTIF', 1);
33}
34if (!defined('NOIPCHECK')) {
35 define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
36}
37
38// Load Dolibarr environment
39require '../../main.inc.php';
40require_once '../../core/lib/functions2.lib.php';
41
42$langs->loadLangs(array("main", "install", "other"));
43
44$conf->dol_hide_topmenu = GETPOSTINT('dol_hide_topmenu');
45$conf->dol_hide_leftmenu = GETPOSTINT('dol_hide_leftmenu');
46$conf->dol_optimize_smallscreen = GETPOSTINT('dol_optimize_smallscreen');
47$conf->dol_no_mouse_hover = GETPOSTINT('dol_no_mouse_hover');
48$conf->dol_use_jmobile = GETPOSTINT('dol_use_jmobile');
49
50// Security check
51global $dolibarr_main_demo;
52if (empty($dolibarr_main_demo)) {
53 httponly_accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page');
54}
55
56// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
57$res = $hookmanager->initHooks(array('demo'));
58
59$demoprofiles = array();
60$alwayscheckedmodules = array();
61$alwaysuncheckedmodules = array();
62$alwayshiddencheckedmodules = array();
63$alwayshiddenuncheckedmodules = array();
64
65$url = '';
66$url .= ($url ? '&' : '').($conf->dol_hide_topmenu ? 'dol_hide_topmenu='.$conf->dol_hide_topmenu : '');
67$url .= ($url ? '&' : '').($conf->dol_hide_leftmenu ? 'dol_hide_leftmenu='.$conf->dol_hide_leftmenu : '');
68$url .= ($url ? '&' : '').($conf->dol_optimize_smallscreen ? 'dol_optimize_smallscreen='.$conf->dol_optimize_smallscreen : '');
69$url .= ($url ? '&' : '').($conf->dol_no_mouse_hover ? 'dol_no_mouse_hover='.$conf->dol_no_mouse_hover : '');
70$url .= ($url ? '&' : '').($conf->dol_use_jmobile ? 'dol_use_jmobile='.$conf->dol_use_jmobile : '');
71$url = DOL_URL_ROOT.'/index.php'.($url ? '?'.$url : '');
72
73$tmpaction = 'view';
74$parameters = array();
75$object = new stdClass();
76$reshook = $hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks
77$error = $hookmanager->error; $errors = $hookmanager->errors;
78if (empty($reshook)) {
79 $demoprofiles = array(
80 array(
81 'default'=>'1', 'key'=>'profdemoservonly', 'label'=>'DemoCompanyServiceOnly',
82 'disablemodules'=>'adherent,barcode,bom,cashdesk,don,expedition,externalsite,ftp,incoterm,mailmanspip,margin,mrp,prelevement,product,productbatch,stock,takepos',
83 //'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot8.png',
84 'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-service.jpg',
85 'url'=>$url,
86 'lang' => '',
87 ),
88 array(
89 'default'=>'0', 'key'=>'profmanufacture', 'label'=>'DemoCompanyManufacturing',
90 'disablemodules'=>'adherent,contrat,don,externalsite,ficheinter,ftp,mailmanspip,prelevement,service',
91 'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-manufacturing.jpg',
92 'url'=>$url,
93 'lang' => '',
94 ),
95 array(
96 'default'=>'0', 'key'=>'profdemoprodstock', 'label'=>'DemoCompanyProductAndStocks',
97 'disablemodules'=>'adherent,bom,contrat,don,externalsite,ficheinter,ftp,mailmanspip,mrp,prelevement,service',
98 //'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png',
99 'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-product.jpg',
100 'url'=>$url,
101 'lang' => '',
102 ),
103 array(
104 'default'=>'0', 'key'=>'profdemofun2', 'label'=>'DemoFundation2',
105 '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',
106 //'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png',
107 'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-foundation.jpg',
108 'url'=>$url,
109 'lang' => '',
110 ),
111 // All demo profile
112 array(
113 'default'=>'0', 'key'=>'profdemoall', 'label'=>'ChooseYourDemoProfilMore',
114 'disablemodules'=>'adherent,cashdesk,don,externalsite,mailmanspip',
115 //'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot9.png'
116 'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-all.jpg',
117 'lang' => '',
118 )
119 );
120
121
122 // Visible
123 $alwayscheckedmodules = array('barcode', 'bookmark', 'categorie', 'externalrss', 'fckeditor', 'geoipmaxmind', 'gravatar', 'memcached', 'syslog', 'user', 'webservices'); // Technical module we always want
124 $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
125 // Not visible
126 $alwayshiddencheckedmodules = array('accounting', 'api', 'barcode', 'blockedlog', 'bookmark', 'clicktodial', 'comptabilite', 'cron', 'document', 'domain', 'externalrss', 'externalsite', 'fckeditor', 'geoipmaxmind', 'gravatar', 'label', 'ldap',
127 'mailmanspip', 'notification', 'oauth', 'syslog', 'user', 'webservices', 'workflow',
128 // Extended modules
129 'memcached', 'numberwords', 'zipautofillfr');
130 $alwayshiddenuncheckedmodules = array('cashdesk', 'collab', 'dav', 'debugbar', 'emailcollector', 'ftp', 'hrm', 'modulebuilder', 'printing', 'webservicesclient', 'zappier',
131 // Extended modules
132 'awstats', 'bittorrent', 'bootstrap', 'cabinetmed', 'cmcic', 'concatpdf', 'customfield', 'datapolicy', 'deplacement', 'dolicloud', 'filemanager', 'lightbox', 'mantis', 'monitoring', 'moretemplates', 'multicompany', 'nltechno', 'numberingpack', 'openstreetmap',
133 'ovh', 'phenix', 'phpsysinfo', 'pibarcode', 'postnuke', 'dynamicprices', 'receiptprinter', 'selectbank', 'skincoloreditor', 'submiteverywhere', 'survey', 'thomsonphonebook', 'topten', 'tvacerfa', 'voyage', 'webcalendar', 'webmail');
134}
135
136// Search modules
137$dirlist = $conf->file->dol_document_root;
138
139
140// Search modules dirs
141$modulesdir = dolGetModulesDirs();
142
143
144$filename = array();
145$modules = array();
146$orders = array();
147$categ = array();
148$i = 0; // is a sequencer of modules found
149$j = 0; // j is module number. Automatically affected if module number not defined.
150
151foreach ($modulesdir as $dir) {
152 // Charge tableaux modules, nom, numero, orders depuis repertoire dir
153 $handle = @opendir($dir);
154 if (is_resource($handle)) {
155 while (($file = readdir($handle)) !== false) {
156 //print "$i ".$file."\n<br>";
157 if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
158 $modName = substr($file, 0, dol_strlen($file) - 10);
159
160 if ($modName) {
161 try {
162 include_once $dir.$file;
163 $objMod = new $modName($db);
164
165 if ($objMod->numero > 0) {
166 $j = $objMod->numero;
167 } else {
168 $j = 1000 + $i;
169 }
170
171 $modulequalified = 1;
172
173 // We discard modules according to features level (PS: if module is activated we always show it)
174 $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
175 if ($objMod->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && !getDolGlobalString($const_name)) {
176 $modulequalified = 0;
177 }
178 if ($objMod->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && !getDolGlobalString($const_name)) {
179 $modulequalified = 0;
180 }
181
182 if ($modulequalified) {
183 $modules[$i] = $objMod;
184 $filename[$i] = $modName;
185 $orders[$i] = $objMod->family."_".$j; // Tri par famille puis numero module
186 //print "x".$modName." ".$orders[$i]."\n<br>";
187 $j++;
188 $i++;
189 }
190 } catch (Exception $e) {
191 dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
192 }
193 }
194 }
195 }
196 }
197}
198
199asort($orders);
200
201
202/*
203 * Actions
204 */
205
206if (GETPOST('action', 'aZ09') == 'gotodemo') { // Action run when we click on "Start" after selection modules
207 //print 'ee'.GETPOST("demochoice");
208 $disablestring = '';
209 // If we disable modules using a profile choice
210 if (GETPOST("demochoice")) {
211 foreach ($demoprofiles as $profilearray) {
212 if ($profilearray['key'] == GETPOST("demochoice")) {
213 $disablestring = $profilearray['disablemodules'];
214 break;
215 }
216 }
217 }
218 // If we disable modules using personalized list
219 foreach ($modules as $val) {
220 $modulekeyname = strtolower($val->name);
221 if (!GETPOST($modulekeyname) && empty($val->always_enabled) && !in_array($modulekeyname, $alwayscheckedmodules)) {
222 $disablestring .= $modulekeyname.',';
223 if ($modulekeyname == 'propale') {
224 $disablestring .= 'propal,';
225 }
226 }
227 }
228
229 // Do redirect to login page
230 if ($disablestring) {
231 if (GETPOST('urlfrom')) {
232 $url .= (preg_match('/\?/', $url) ? '&amp;' : '?').'urlfrom='.urlencode(GETPOST('urlfrom', 'alpha'));
233 }
234 $url .= (preg_match('/\?/', $url) ? '&amp;' : '?').'disablemodules='.$disablestring;
235
236 header("Location: ".$url);
237 exit;
238 }
239}
240
241
242/*
243 * View
244 */
245
246$head = '';
247$head .= '<meta name="keywords" content="demo,online,demonstration,example,test,erp,crm,demos,web">'."\n";
248$head .= '<meta name="description" content="Dolibarr ERP and CRM demo. You can test here several profiles for Dolibarr ERP and CRM demonstration.">'."\n";
249
250$head .= '
251<script type="text/javascript">
252var openedId="";
253jQuery(document).ready(function () {
254 jQuery("tr.moduleline").hide();
255 // Enable this to allow personalized setup
256 jQuery(".modulelineshow").attr("href","#a1profdemoall");
257 jQuery(".cursorpointer").css("cursor","pointer");
258 jQuery(".modulelineshow").click(function() {
259 console.log("We select the custom demo");
260 var idstring=$(this).attr("id");
261 if (typeof idstring != "undefined")
262 {
263 var currentId = idstring.substring(2);
264 jQuery("tr.moduleline").hide();
265 if (currentId != openedId)
266 {
267 openedId=currentId;
268 jQuery("#tr1"+currentId).show();
269 jQuery("#tr2"+currentId).show();
270 }
271 else openedId = "";
272 }
273 });
274});
275</script>';
276
277llxHeaderVierge($langs->trans("DolibarrDemo"), $head);
278
279
280print "\n";
281
282print '<div class="demoban demobackground">';
283print '<div class="right" style="padding-right: 30px; padding-top: 30px;">';
284print '<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>';
285print '</div>';
286print '</div>';
287
288print '<div class="demobantext" style="max-width: 1024px;">';
289print '<div style="font-size: 20px; padding: 40px;">';
290print '<div class="hideonsmartphone" style="text-align: justify;">'.$langs->trans("DemoDesc").'</div><br>';
291print '<div class="titre"><span style="font-size: 20px">'.$langs->trans("ChooseYourDemoProfil").'</span></div>';
292print '</div>';
293print '</div>';
294
295
296print '<div class="clearboth"></div>';
297print '<div class="demobanbox">';
298
299$i = 0;
300foreach ($demoprofiles as $profilearray) {
301 if ($profilearray['default'] >= 0) {
302 //print $profilearray['lang'];
303 if (!empty($profilearray['lang'])) {
304 $langs->load($profilearray['lang']);
305 }
306
307 $url = $_SERVER["PHP_SELF"].'?action=gotodemo';
308 $urlwithmod = $url.'&amp;demochoice='.$profilearray['key'];
309 // Should work with DOL_URL_ROOT='' or DOL_URL_ROOT='/dolibarr'
310 //print "xx".$_SERVER["PHP_SELF"].' '.DOL_URL_ROOT.'<br>';
311
312 $urlfrom = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/i', '', $_SERVER["PHP_SELF"]);
313 //print $urlfrom;
314
315 if (!empty($profilearray['url'])) {
316 $urlwithmod = $profilearray['url'];
317 $urlwithmod = $urlwithmod.(preg_match('/\?/', $urlwithmod) ? '&amp;' : '?').'urlfrom='.urlencode($urlfrom);
318 if (!empty($profilearray['disablemodules'])) {
319 $urlwithmod = $urlwithmod.(preg_match('/\?/', $urlwithmod) ? '&amp;' : '?').'disablemodules='.$profilearray['disablemodules'];
320 }
321 }
322
323 if (empty($profilearray['url'])) {
324 print '<div class="clearboth"></div>';
325 }
326
327 print '<form method="POST" class="valigntop inline-block" name="form'.$profilearray['key'].'" id="form'.$profilearray['key'].'" action="'.$_SERVER["PHP_SELF"].'#a1'.$profilearray['key'].'">'."\n";
328 print '<input type="hidden" name="action" value="gotodemo">'."\n";
329 print '<input type="hidden" name="urlfrom" value="'.dol_escape_htmltag($urlfrom).'">'."\n";
330 print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
331 print '<input type="hidden" name="username" value="demo">'."\n";
332 print '<input type="hidden" name="dol_hide_topmenu" value="'.$conf->dol_hide_topmenu.'">'."\n";
333 print '<input type="hidden" name="dol_hide_leftmenu" value="'.$conf->dol_hide_leftmenu.'">'."\n";
334 print '<input type="hidden" name="dol_optimize_smallscreen" value="'.$conf->dol_optimize_smallscreen.'">'."\n";
335 print '<input type="hidden" name="dol_no_mouse_hover" value="'.$conf->dol_no_mouse_hover.'">'."\n";
336 print '<input type="hidden" name="dol_use_jmobile" value="'.$conf->dol_use_jmobile.'">'."\n";
337
338 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";
339
340
341 print '<div id="a1'.$profilearray['key'].'" class="demobox '.(empty($profilearray['url']) ? 'modulelineshow cursorpointer maxwidth1000' : 'nomodulelines').'">';
342
343 print '<a href="'.$urlwithmod.'" class="'.(empty($profilearray['url']) ? 'modulelineshow' : 'nomodulelines').'">';
344 print '<div style="padding: 10px;">';
345
346 print '<img class="demothumb" src="'.$profilearray['icon'].'" alt="Demo '.$profilearray['label'].'">';
347
348 print '<div class="clearboth"></div>';
349
350 print '<div class="demothumbtext">';
351 print $langs->trans($profilearray['label']);
352 print '</div>';
353
354 print '</div>';
355 print '</a>';
356
357
358 // Modules (a profile you must choose modules)
359 if (empty($profilearray['url'])) {
360 print '<div id="tr1'.$profilearray['key'].'" class="moduleline hidden" style="margin-left: 8px; margin-right: 8px; text-align: justify; font-size:0.75em; padding-bottom: 8px">';
361
362 print '<span class="opacitymedium small">'.$langs->trans("ThisIsListOfModules").'</span><br><br>';
363
364 print '<div class="csscolumns">';
365
366 $listofdisabledmodules = explode(',', $profilearray['disablemodules']);
367 $j = 0;
368 //$nbcolsmod = empty($conf->dol_optimize_smallscreen) ? 4 : 3;
369 //var_dump($modules);
370 foreach ($orders as $index => $key) { // Loop on qualified (enabled) modules
371 //print $index.' '.$key;
372 $val = $modules[$index];
373 $modulekeyname = strtolower($val->name);
374
375 $modulequalified = 1;
376 if (!empty($val->always_enabled) || in_array($modulekeyname, $alwayshiddenuncheckedmodules)) {
377 $modulequalified = 0;
378 }
379 if ($val->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && !getDolGlobalString($const_name)) {
380 $modulequalified = 0;
381 }
382 if ($val->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && !getDolGlobalString($const_name)) {
383 $modulequalified = 0;
384 }
385 if (!$modulequalified) {
386 continue;
387 }
388
389 if (in_array($modulekeyname, $alwayshiddencheckedmodules)) {
390 print "\n".'<!-- Module '.$modulekeyname.' hidden and always checked -->';
391 print '<input type="hidden" name="'.$modulekeyname.'" value="1">';
392 } else {
393 //$modulo = ($j % $nbcolsmod);
394 //if ($modulo == 0) print '<tr>';
395 print '<!-- id='.$val->numero.' -->';
396 print '<div class="nowrap">';
397 print '<input type="checkbox" class="checkbox valignmiddle paddingright" id="id'.$modulekeyname.'" name="'.$modulekeyname.'" value="1" title="'.dol_escape_htmltag($val->getName()).'"';
398 $disabled = '';
399 if (in_array($modulekeyname, $alwaysuncheckedmodules)) {
400 $disabled = 'disabled';
401 print ' '.$disabled;
402 }
403 if (!in_array($modulekeyname, $alwaysuncheckedmodules) && (!in_array($modulekeyname, $listofdisabledmodules) || in_array($modulekeyname, $alwayscheckedmodules))) {
404 print ' checked';
405 }
406 print '>';
407 /*
408 $s = img_picto('', $modulekeyname, 'class="pictofixedwidth paddingleft"');
409 if ($s) {
410 print $s;
411 } else {
412 print img_picto('', 'generic', 'class="pictofixedwidth paddingleft"');
413 }*/
414 print '<label for="id'.$modulekeyname.'" class="inline-block demomaxoveflow valignmiddle paddingleft'.($disabled ? ' opacitymedium' : '').'" title="'.dol_escape_htmltag($val->getName()).'">'.$val->getName().'</label><br>';
415 print '</div>';
416 //if ($modulo == ($nbcolsmod - 1)) print '</tr>';
417 $j++;
418 }
419 }
420
421 print '</div>';
422
423 print '<br><div class="center">';
424 print '<input type="submit" value=" &nbsp; &nbsp; '.$langs->trans("Start").' &nbsp; &nbsp; " class="button">';
425 print '<br><br>';
426 print '</div>';
427
428 print '</div>';
429 }
430
431 print '</div></div>';
432 print '</form>'."\n";
433
434 $i++;
435 }
436}
437
438print '</div>';
439
440print '<br>';
441
442
443// TODO Replace this with a hook
444// Google Adsense (need Google module)
445if (isModEnabled('google') && getDolGlobalString('MAIN_GOOGLE_AD_CLIENT') && getDolGlobalString('MAIN_GOOGLE_AD_SLOT')) {
446 if (empty($conf->dol_use_jmobile)) {
447 print '<div align="center">'."\n";
448 print '<script><!--'."\n";
449 print 'google_ad_client = "' . getDolGlobalString('MAIN_GOOGLE_AD_CLIENT').'";'."\n";
450 print 'google_ad_slot = "' . getDolGlobalString('MAIN_GOOGLE_AD_SLOT').'";'."\n";
451 print 'google_ad_width = ' . getDolGlobalString('MAIN_GOOGLE_AD_WIDTH').';'."\n";
452 print 'google_ad_height = ' . getDolGlobalString('MAIN_GOOGLE_AD_HEIGHT').';'."\n";
453 print '//-->'."\n";
454 print '</script>'."\n";
455 print '<script src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>'."\n";
456 print '</div>'."\n";
457 } else {
458 print '<!-- google js advert tag disabled with jmobile -->'."\n";
459 }
460}
461
463
464$db->close();
465
466
474function llxHeaderVierge($title, $head = "")
475{
476 top_httphead();
477
478 top_htmlhead($head, $title, 0, 0, array(), array('public/demo/demo.css'), 0, 1);
479
480 print '<body class="demobody"><div class="demobackgrounddiv">'."\n";
481}
482
489{
490 printCommonFooter('public');
491
492 print "\n";
493 print "</div></body>\n";
494 print "</html>\n";
495}
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
if(!defined( 'NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined( 'NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) if(!defined( 'NOLOGIN')) if(!defined('NOCSRFCHECK')) if(!defined( 'NOIPCHECK')) llxHeaderVierge()
Header function.
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 dolibarr global constant string value.
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.
llxFooterVierge()
Show footer for demo.
Definition index.php:488
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.