dolibarr 18.0.6
login.tpl.php
1<?php
2/* Copyright (C) 2009-2015 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2011-2022 Laurent Destailleur <eldy@users.sourceforge.net>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19// Need global variable $urllogo, $title and $titletruedolibarrversion to be defined by caller (like dol_loginfunction in security2.lib.php)
20// Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...);
21// $titletruedolibarrversion must be defined
22
23if (!defined('NOBROWSERNOTIF')) {
24 define('NOBROWSERNOTIF', 1);
25}
26
27// Protection to avoid direct call of template
28if (empty($conf) || !is_object($conf)) {
29 print "Error, template page can't be called as URL";
30 exit;
31}
32
33// DDOS protection
34$size = (empty($_SERVER['CONTENT_LENGTH']) ? 0 : (int) $_SERVER['CONTENT_LENGTH']);
35if ($size > 10000) {
36 $langs->loadLangs(array("errors", "install"));
37 httponly_accessforbidden('<center>'.$langs->trans("ErrorRequestTooLarge").'.<br><a href="'.DOL_URL_ROOT.'">'.$langs->trans("ClickHereToGoToApp").'</a></center>', 413, 1);
38}
39
40require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
41
42
43header('Cache-Control: Public, must-revalidate');
44
45if (GETPOST('dol_hide_topmenu')) {
46 $conf->dol_hide_topmenu = 1;
47}
48if (GETPOST('dol_hide_leftmenu')) {
49 $conf->dol_hide_leftmenu = 1;
50}
51if (GETPOST('dol_optimize_smallscreen')) {
52 $conf->dol_optimize_smallscreen = 1;
53}
54if (GETPOST('dol_no_mouse_hover')) {
55 $conf->dol_no_mouse_hover = 1;
56}
57if (GETPOST('dol_use_jmobile')) {
58 $conf->dol_use_jmobile = 1;
59}
60
61// If we force to use jmobile, then we reenable javascript
62if (!empty($conf->dol_use_jmobile)) {
63 $conf->use_javascript_ajax = 1;
64}
65
66$php_self = empty($php_self) ? dol_escape_htmltag($_SERVER['PHP_SELF']) : $php_self;
67$php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '';
68if (!preg_match('/mainmenu=/', $php_self)) {
69 $php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home';
70}
71if (preg_match('/'.preg_quote('core/modules/oauth', '/').'/', $php_self)) {
72 $php_self = DOL_URL_ROOT.'/index.php?mainmenu=home';
73}
74$php_self = preg_replace('/(\?|&amp;|&)action=[^&]+/', '\1', $php_self);
75$php_self = preg_replace('/(\?|&amp;|&)username=[^&]*/', '\1', $php_self);
76$php_self = preg_replace('/(\?|&amp;|&)entity=\d+/', '\1', $php_self);
77$php_self = preg_replace('/(\?|&amp;|&)massaction=[^&]+/', '\1', $php_self);
78$php_self = preg_replace('/(\?|&amp;|&)token=[^&]+/', '\1', $php_self);
79
80// Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
81$arrayofjs = array(
82 '/includes/jstz/jstz.min.js'.(empty($conf->dol_use_jmobile) ? '' : '?version='.urlencode(DOL_VERSION)),
83 '/core/js/dst.js'.(empty($conf->dol_use_jmobile) ? '' : '?version='.urlencode(DOL_VERSION))
84);
85
86// We display application title instead Login term
87if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
88 $titleofloginpage = $conf->global->MAIN_APPLICATION_TITLE;
89} else {
90 $titleofloginpage = $langs->trans('Login');
91}
92$titleofloginpage .= ' @ '.$titletruedolibarrversion; // $titletruedolibarrversion is defined by dol_loginfunction in security2.lib.php. We must keep the @, some tools use it to know it is login page and find true dolibarr version.
93
94$disablenofollow = 1;
95if (!preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) {
96 $disablenofollow = 0;
97}
98if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
99 $disablenofollow = 0;
100}
101
102top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow);
103
104
105$colorbackhmenu1 = '60,70,100'; // topmenu
106if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) {
107 $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1;
108}
109$colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TOPMENU_BACK1) ? $colorbackhmenu1 : $conf->global->THEME_ELDY_TOPMENU_BACK1) : (empty($user->conf->THEME_ELDY_TOPMENU_BACK1) ? $colorbackhmenu1 : $user->conf->THEME_ELDY_TOPMENU_BACK1);
110$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
111
112print "<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->\n";
113
114if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
115 // For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
116 ?>
117 <body class="body bodylogin" style="background-image: url('<?php echo dol_escape_htmltag($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND); ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
118 <?php
119} else {
120 ?>
121 <body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file=logos/'.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
122 <?php
123}
124?>
125
126<?php if (empty($conf->dol_use_jmobile)) { ?>
127<script>
128$(document).ready(function () {
129 /* Set focus on correct field */
130 <?php if ($focus_element) {
131 ?>$('#<?php echo $focus_element; ?>').focus(); <?php
132 } ?> // Warning to use this only on visible element
133});
134</script>
135<?php } ?>
136
137<div class="login_center center"<?php
138if (empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
139 $backstyle = 'background: linear-gradient('.($conf->browser->layout == 'phone' ? '0deg' : '4deg').', rgb(240,240,240) 52%, rgb('.$colorbackhmenu1.') 52.1%);';
140 // old style: $backstyle = 'background-image: linear-gradient(rgb('.$colorbackhmenu1.',0.3), rgb(240,240,240));';
141 $backstyle = getDolGlobalString('MAIN_LOGIN_BACKGROUND_STYLE', $backstyle);
142 print empty($conf->global->MAIN_LOGIN_BACKGROUND) ? ' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; '.$backstyle.'"' : '';
143}
144?>>
145<div class="login_vertical_align">
146
147
148<form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
149
150<input type="hidden" name="token" value="<?php echo newToken(); ?>" />
151<input type="hidden" name="actionlogin" value="login">
152<input type="hidden" name="loginfunction" value="loginfunction" />
153<input type="hidden" name="backtopage" value="<?php echo GETPOST('backtopage'); ?>" />
154<!-- Add fields to store and send local user information. This fields are filled by the core/js/dst.js -->
155<input type="hidden" name="tz" id="tz" value="" />
156<input type="hidden" name="tz_string" id="tz_string" value="" />
157<input type="hidden" name="dst_observed" id="dst_observed" value="" />
158<input type="hidden" name="dst_first" id="dst_first" value="" />
159<input type="hidden" name="dst_second" id="dst_second" value="" />
160<input type="hidden" name="screenwidth" id="screenwidth" value="" />
161<input type="hidden" name="screenheight" id="screenheight" value="" />
162<input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="<?php echo $dol_hide_topmenu; ?>" />
163<input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="<?php echo $dol_hide_leftmenu; ?>" />
164<input type="hidden" name="dol_optimize_smallscreen" id="dol_optimize_smallscreen" value="<?php echo $dol_optimize_smallscreen; ?>" />
165<input type="hidden" name="dol_no_mouse_hover" id="dol_no_mouse_hover" value="<?php echo $dol_no_mouse_hover; ?>" />
166<input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
167
168
169
170<!-- Title with version -->
171<div class="login_table_title center" title="<?php echo dol_escape_htmltag($title); ?>">
172<?php
173if ($disablenofollow) {
174 echo '<a class="login_table_title" href="https://www.dolibarr.org" target="_blank" rel="noopener noreferrer external">';
175}
176echo dol_escape_htmltag($title);
177if ($disablenofollow) {
178 echo '</a>';
179}
180?>
181</div>
182
183
184
185<div class="login_table">
186
187<div id="login_line1">
188
189<div id="login_left">
190<img alt="" src="<?php echo $urllogo; ?>" id="img_logo" />
191</div>
192
193<br>
194
195<div id="login_right">
196
197<div class="tagtable left centpercent" title="<?php echo $langs->trans("EnterLoginDetail"); ?>">
198
199<!-- Login -->
200<div class="trinputlogin">
201<div class="tagtd nowraponall center valignmiddle tdinputlogin">
202<?php if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
203 ?><label for="username" class="hidden"><?php echo $langs->trans("Login"); ?></label><?php
204} ?>
205<!-- <span class="span-icon-user">-->
206<span class="fa fa-user"></span>
207<input type="text" id="username" maxlength="255" placeholder="<?php echo $langs->trans("Login"); ?>" name="username" class="flat input-icon-user minwidth150" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" autofocus="autofocus" autocapitalize="off" autocomplete="on" spellcheck="false" autocorrect="off" />
208</div>
209</div>
210
211<!-- Password -->
212<?php if (!isset($conf->file->main_authentication) || $conf->file->main_authentication != 'googleoauth') { ?>
213<div class="trinputlogin">
214<div class="tagtd nowraponall center valignmiddle tdinputlogin">
215 <?php if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
216 ?><label for="password" class="hidden"><?php echo $langs->trans("Password"); ?></label><?php
217 } ?>
218<!--<span class="span-icon-password">-->
219<span class="fa fa-key"></span>
220<input type="password" id="password" maxlength="128" placeholder="<?php echo $langs->trans("Password"); ?>" name="password" class="flat input-icon-password minwidth150" value="<?php echo dol_escape_htmltag($password); ?>" tabindex="2" autocomplete="<?php echo empty($conf->global->MAIN_LOGIN_ENABLE_PASSWORD_AUTOCOMPLETE) ? 'off' : 'on'; ?>" />
221</div></div>
222<?php } ?>
223
224
225<?php
226if (!empty($captcha)) {
227 // Add a variable param to force not using cache (jmobile)
228 $php_self = preg_replace('/[&\?]time=(\d+)/', '', $php_self); // Remove param time
229 if (preg_match('/\?/', $php_self)) {
230 $php_self .= '&time='.dol_print_date(dol_now(), 'dayhourlog');
231 } else {
232 $php_self .= '?time='.dol_print_date(dol_now(), 'dayhourlog');
233 }
234 // TODO: provide accessible captcha variants
235 ?>
236 <!-- Captcha -->
237 <div class="trinputlogin">
238 <div class="tagtd none valignmiddle tdinputlogin nowrap">
239
240 <span class="fa fa-unlock"></span>
241 <span class="span-icon-security inline-block">
242 <input id="securitycode" placeholder="<?php echo $langs->trans("SecurityCode"); ?>" class="flat input-icon-security width125" type="text" maxlength="5" name="code" tabindex="3" autocomplete="off" />
243 </span>
244 <span class="nowrap inline-block">
245 <img class="inline-block valignmiddle" src="<?php echo DOL_URL_ROOT ?>/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" />
246 <a class="inline-block valignmiddle" href="<?php echo $php_self; ?>" tabindex="4" data-role="button"><?php echo $captcha_refresh; ?></a>
247 </span>
248
249 </div></div>
250 <?php
251}
252
253if (!empty($morelogincontent)) {
254 if (is_array($morelogincontent)) {
255 foreach ($morelogincontent as $format => $option) {
256 if ($format == 'table') {
257 echo '<!-- Option by hook -->';
258 echo $option;
259 }
260 }
261 } else {
262 echo '<!-- Option by hook -->';
263 echo $morelogincontent;
264 }
265}
266
267?>
268
269</div>
270
271</div> <!-- end div login_right -->
272
273</div> <!-- end div login_line1 -->
274
275
276<div id="login_line2" style="clear: both">
277
278
279<!-- Button Connection -->
280<?php if (!isset($conf->file->main_authentication) || $conf->file->main_authentication != 'googleoauth') { ?>
281<br>
282<div id="login-submit-wrapper">
283<input type="submit" class="button" value="&nbsp; <?php echo $langs->trans('Connection'); ?> &nbsp;" tabindex="5" />
284</div>
285<?php } ?>
286
287
288<?php
289if (isset($conf->file->main_authentication) && $conf->file->main_authentication == 'googleoauth') {
290 $forgetpasslink = '';
291}
292
293if ($forgetpasslink || $helpcenterlink) {
294 $moreparam = '';
295 if ($dol_hide_topmenu) {
296 $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_hide_topmenu='.$dol_hide_topmenu;
297 }
298 if ($dol_hide_leftmenu) {
299 $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_hide_leftmenu='.$dol_hide_leftmenu;
300 }
301 if ($dol_no_mouse_hover) {
302 $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_no_mouse_hover='.$dol_no_mouse_hover;
303 }
304 if ($dol_use_jmobile) {
305 $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_use_jmobile='.$dol_use_jmobile;
306 }
307
308 echo '<br>';
309 echo '<div class="center" style="margin-top: 5px;">';
310 if ($forgetpasslink) {
311 $url = DOL_URL_ROOT.'/user/passwordforgotten.php'.$moreparam;
312 if (!empty($conf->global->MAIN_PASSWORD_FORGOTLINK)) {
313 $url = $conf->global->MAIN_PASSWORD_FORGOTLINK;
314 }
315 echo '<a class="alogin" href="'.dol_escape_htmltag($url).'">';
316 echo $langs->trans('PasswordForgotten');
317 echo '</a>';
318 }
319
320 if ($forgetpasslink && $helpcenterlink) {
321 echo '&nbsp;-&nbsp;';
322 }
323
324 if ($helpcenterlink) {
325 $url = DOL_URL_ROOT.'/support/index.php'.$moreparam;
326 if (!empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) {
327 $url = $conf->global->MAIN_HELPCENTER_LINKTOUSE;
328 }
329 echo '<a class="alogin" href="'.dol_escape_htmltag($url).'" target="_blank" rel="noopener noreferrer">';
330 echo $langs->trans('NeedHelpCenter');
331 echo '</a>';
332 }
333 echo '</div>';
334}
335
336if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication)) {
337 $langs->load("users");
338
339 //if (!empty($conf->global->MAIN_OPENIDURL_PERUSER)) $url=
340 print '<div class="center" style="margin-top: 20px; margin-bottom: 10px">';
341 print '<div class="loginbuttonexternal">';
342
343 $url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL;
344 if (!empty($url)) {
345 print '<a class="alogin" href="'.$url.'">'.$langs->trans("LoginUsingOpenID").'</a>';
346 } else {
347 $langs->load("errors");
348 print '<span class="warning">'.$langs->trans("ErrorOpenIDSetupNotComplete", 'MAIN_AUTHENTICATION_OPENID_URL').'</span>';
349 }
350
351 print '</div>';
352 print '</div>';
353}
354
355if (isset($conf->file->main_authentication) && preg_match('/google/', $conf->file->main_authentication) && strpos($conf->browser->ua, 'DoliDroid') === false) {
356 $langs->load("users");
357
358 echo '<div class="center" style="margin-top: 20px; margin-bottom: 10px">';
359
360 /*global $dolibarr_main_url_root;
361
362 // Define $urlwithroot
363 $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
364 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
365 //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
366
367 //$shortscope = 'userinfo_email,userinfo_profile';
368 $shortscope = 'openid,email,profile'; // For openid connect
369
370 $oauthstateanticsrf = bin2hex(random_bytes(128/8));
371 $_SESSION['oauthstateanticsrf'] = $shortscope.'-'.$oauthstateanticsrf;
372 $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state=forlogin-'.$shortscope.'-'.$oauthstateanticsrf;
373
374 //$url = $urltorenew;
375 */
376
377 print '<input type="hidden" name="beforeoauthloginredirect" id="beforeoauthloginredirect" value="">';
378 print '<a class="alogin" href="#" onclick="jQuery(\'#beforeoauthloginredirect\').val(1); $(this).closest(\'form\').submit();">';
379 print '<div class="loginbuttonexternal">';
380 print img_picto('', 'google', 'class="pictofixedwidth"');
381 print $langs->trans("LoginWith", "Google");
382 print '</div>';
383 print '</a>';
384 print '</div>';
385}
386
387?>
388
389</div> <!-- end login line 2 -->
390
391</div> <!-- end login table -->
392
393
394</form>
395
396
397<?php
398// Show error message if defined
399if (!empty($_SESSION['dol_loginmesg'])) {
400 ?>
401 <div class="center login_main_message">
402 <?php
403 $message = $_SESSION['dol_loginmesg']; // By default this is an error message
404 if (preg_match('/<!-- warning -->/', $message)) { // if it contains this comment, this is a warning message
405 $message = str_replace('<!-- warning -->', '', $message);
406 print '<div class="warning">';
407 } else {
408 print '<div class="error">';
409 }
410 print dol_escape_htmltag($message);
411 print '</div>';
412 ?>
413 </div>
414 <?php
415}
416
417// Add commit strip
418if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
419 include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
420 if (substr($langs->defaultlang, 0, 2) == 'fr') {
421 $resgetcommitstrip = getURLContent("https://www.commitstrip.com/fr/feed/");
422 } else {
423 $resgetcommitstrip = getURLContent("https://www.commitstrip.com/en/feed/");
424 }
425 if ($resgetcommitstrip && $resgetcommitstrip['http_code'] == '200') {
426 $xml = simplexml_load_string($resgetcommitstrip['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
427 $little = $xml->channel->item[0]->children('content', true);
428 print preg_replace('/width="650" height="658"/', '', $little->encoded);
429 }
430}
431
432?>
433
434<?php if ($main_home) {
435 ?>
436 <div class="center login_main_home paddingtopbottom <?php echo empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' backgroundsemitransparent boxshadow'; ?>" style="max-width: 70%">
437 <?php echo $main_home; ?>
438 </div><br>
439 <?php
440}
441?>
442
443<!-- authentication mode = <?php echo $main_authentication ?> -->
444<!-- cookie name used for this session = <?php echo $session_name ?> -->
445<!-- urlfrom in this session = <?php echo isset($_SESSION["urlfrom"]) ? $_SESSION["urlfrom"] : ''; ?> -->
446
447<!-- Common footer is not used for login page, this is same than footer but inside login tpl -->
448
449<?php
450if (!empty($conf->global->MAIN_HTML_FOOTER)) {
451 print $conf->global->MAIN_HTML_FOOTER;
452}
453
454if (!empty($morelogincontent) && is_array($morelogincontent)) {
455 foreach ($morelogincontent as $format => $option) {
456 if ($format == 'js') {
457 echo "\n".'<!-- Javascript by hook -->';
458 echo $option."\n";
459 }
460 }
461} elseif (!empty($moreloginextracontent)) {
462 echo '<!-- Javascript by hook -->';
463 echo $moreloginextracontent;
464}
465
466// Google Analytics
467// TODO Remove this, and add content into hook getLoginPageExtraOptions() instead
468if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
469 $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
470 foreach ($tmptagarray as $tmptag) {
471 print "\n";
472 print "<!-- JS CODE TO ENABLE for google analtics tag -->\n";
473 print "
474 <!-- Global site tag (gtag.js) - Google Analytics -->
475 <script async src=\"https://www.googletagmanager.com/gtag/js?id=".trim($tmptag)."\"></script>
476 <script>
477 window.dataLayer = window.dataLayer || [];
478 function gtag(){dataLayer.push(arguments);}
479 gtag('js', new Date());
480
481 gtag('config', '".trim($tmptag)."');
482 </script>";
483 print "\n";
484 }
485}
486
487// TODO Replace this with a hook
488// Google Adsense (need Google module)
489if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
490 if (empty($conf->dol_use_jmobile)) {
491 ?>
492 <div class="center"><br>
493 <script><!--
494 google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
495 google_ad_slot = "<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
496 google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
497 google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
498 //-->
499 </script>
500 <script src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
501 </div>
502 <?php
503 }
504}
505?>
506
507
508</div>
509</div><!-- end of center -->
510
511
512</body>
513</html>
514<!-- END PHP TEMPLATE -->
API that allows to log in with an user account.
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,...
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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...
rtl background position
getURLContent($url, $postorget='GET', $param='', $followlocation=1, $addheaders=array(), $allowedschemes=array('http', 'https'), $localurl=0, $ssl_verifypeer=-1)
Function to get a content from an URL (use proxy if proxy defined).
conf($dolibarr_main_document_root)
Load conf file (file must exists)
Definition inc.php:400
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Ouput html header of a page.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:120
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:123
httponly_accessforbidden($message=1, $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.