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