dolibarr  16.0.5
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 
23 if (!defined('NOBROWSERNOTIF')) {
24  define('NOBROWSERNOTIF', 1);
25 }
26 
27 // Protection to avoid direct call of template
28 if (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']);
35 if ($size > 10000) {
36  http_response_code(413);
37  $langs->loadLangs(array("errors", "install"));
38  accessforbidden('<center>'.$langs->trans("ErrorRequestTooLarge").'.<br><a href="'.DOL_URL_ROOT.'">'.$langs->trans("ClickHereToGoToApp").'</a></center>', 0, 0, 1);
39  exit;
40 }
41 
42 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
43 
44 
45 header('Cache-Control: Public, must-revalidate');
46 header("Content-type: text/html; charset=".$conf->file->character_set_client);
47 
48 if (GETPOST('dol_hide_topmenu')) {
49  $conf->dol_hide_topmenu = 1;
50 }
51 if (GETPOST('dol_hide_leftmenu')) {
52  $conf->dol_hide_leftmenu = 1;
53 }
54 if (GETPOST('dol_optimize_smallscreen')) {
55  $conf->dol_optimize_smallscreen = 1;
56 }
57 if (GETPOST('dol_no_mouse_hover')) {
58  $conf->dol_no_mouse_hover = 1;
59 }
60 if (GETPOST('dol_use_jmobile')) {
61  $conf->dol_use_jmobile = 1;
62 }
63 
64 // If we force to use jmobile, then we reenable javascript
65 if (!empty($conf->dol_use_jmobile)) {
66  $conf->use_javascript_ajax = 1;
67 }
68 
69 $php_self = empty($php_self) ? dol_escape_htmltag($_SERVER['PHP_SELF']) : $php_self;
70 $php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '';
71 if (!preg_match('/mainmenu=/', $php_self)) {
72  $php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home';
73 }
74 if (preg_match('/'.preg_quote('core/modules/oauth', '/').'/', $php_self)) {
75  $php_self = DOL_URL_ROOT.'/index.php?mainmenu=home';
76 }
77 $php_self = preg_replace('/(\?|&amp;|&)action=[^&]+/', '\1', $php_self);
78 $php_self = preg_replace('/(\?|&amp;|&)massaction=[^&]+/', '\1', $php_self);
79 $php_self = preg_replace('/(\?|&amp;|&)token=[^&]+/', '\1', $php_self);
80 
81 // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
82 $arrayofjs = array(
83  '/includes/jstz/jstz.min.js'.(empty($conf->dol_use_jmobile) ? '' : '?version='.urlencode(DOL_VERSION)),
84  '/core/js/dst.js'.(empty($conf->dol_use_jmobile) ? '' : '?version='.urlencode(DOL_VERSION))
85 );
86 
87 // We display application title instead Login term
88 if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
89  $titleofloginpage = $conf->global->MAIN_APPLICATION_TITLE;
90 } else {
91  $titleofloginpage = $langs->trans('Login');
92 }
93 $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.
94 
95 $disablenofollow = 1;
96 if (!preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) {
97  $disablenofollow = 0;
98 }
99 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
100  $disablenofollow = 0;
101 }
102 
103 print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow);
104 
105 
106 $colorbackhmenu1 = '60,70,100'; // topmenu
107 if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) {
108  $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1;
109 }
110 $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);
111 $colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
112 
113 print "<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->\n";
114 
115 if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
116  // For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
117  ?>
118  <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;">
119  <?php
120 } else {
121  ?>
122  <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).'\')"'; ?>>
123  <?php
124 }
125 ?>
126 
127 <?php if (empty($conf->dol_use_jmobile)) { ?>
128 <script>
129 $(document).ready(function () {
130  /* Set focus on correct field */
131  <?php if ($focus_element) {
132  ?>$('#<?php echo $focus_element; ?>').focus(); <?php
133  } ?> // Warning to use this only on visible element
134 });
135 </script>
136 <?php } ?>
137 
138 <div class="login_center center"<?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: linear-gradient(rgb('.$colorbackhmenu1.',0.3), rgb(240,240,240));"' : '' ?>>
139 <div class="login_vertical_align">
140 
141 <form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
142 <input type="hidden" name="token" value="<?php echo newToken(); ?>" />
143 <input type="hidden" name="actionlogin" value="login">
144 <input type="hidden" name="loginfunction" value="loginfunction" />
145 <!-- Add fields to store and send local user information. This fields are filled by the core/js/dst.js -->
146 <input type="hidden" name="tz" id="tz" value="" />
147 <input type="hidden" name="tz_string" id="tz_string" value="" />
148 <input type="hidden" name="dst_observed" id="dst_observed" value="" />
149 <input type="hidden" name="dst_first" id="dst_first" value="" />
150 <input type="hidden" name="dst_second" id="dst_second" value="" />
151 <input type="hidden" name="screenwidth" id="screenwidth" value="" />
152 <input type="hidden" name="screenheight" id="screenheight" value="" />
153 <input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="<?php echo $dol_hide_topmenu; ?>" />
154 <input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="<?php echo $dol_hide_leftmenu; ?>" />
155 <input type="hidden" name="dol_optimize_smallscreen" id="dol_optimize_smallscreen" value="<?php echo $dol_optimize_smallscreen; ?>" />
156 <input type="hidden" name="dol_no_mouse_hover" id="dol_no_mouse_hover" value="<?php echo $dol_no_mouse_hover; ?>" />
157 <input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
158 
159 
160 
161 <!-- Title with version -->
162 <div class="login_table_title center" title="<?php echo dol_escape_htmltag($title); ?>">
163 <?php
164 if ($disablenofollow) {
165  echo '<a class="login_table_title" href="https://www.dolibarr.org" target="_blank" rel="noopener noreferrer external">';
166 }
167 echo dol_escape_htmltag($title);
168 if ($disablenofollow) {
169  echo '</a>';
170 }
171 ?>
172 </div>
173 
174 
175 
176 <div class="login_table">
177 
178 <div id="login_line1">
179 
180 <div id="login_left">
181 <img alt="" src="<?php echo $urllogo; ?>" id="img_logo" />
182 </div>
183 
184 <br>
185 
186 <div id="login_right">
187 
188 <div class="tagtable left centpercent" title="<?php echo $langs->trans("EnterLoginDetail"); ?>">
189 
190 <!-- Login -->
191 <div class="trinputlogin">
192 <div class="tagtd nowraponall center valignmiddle tdinputlogin">
193 <?php if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
194  ?><label for="username" class="hidden"><?php echo $langs->trans("Login"); ?></label><?php
195 } ?>
196 <!-- <span class="span-icon-user">-->
197 <span class="fa fa-user"></span>
198 <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" />
199 </div>
200 </div>
201 
202 <!-- Password -->
203 <div class="trinputlogin">
204 <div class="tagtd nowraponall center valignmiddle tdinputlogin">
205 <?php if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
206  ?><label for="password" class="hidden"><?php echo $langs->trans("Password"); ?></label><?php
207 } ?>
208 <!--<span class="span-icon-password">-->
209 <span class="fa fa-key"></span>
210 <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'; ?>" />
211 </div></div>
212 
213 <?php
214 if (!empty($captcha)) {
215  // Add a variable param to force not using cache (jmobile)
216  $php_self = preg_replace('/[&\?]time=(\d+)/', '', $php_self); // Remove param time
217  if (preg_match('/\?/', $php_self)) {
218  $php_self .= '&time='.dol_print_date(dol_now(), 'dayhourlog');
219  } else {
220  $php_self .= '?time='.dol_print_date(dol_now(), 'dayhourlog');
221  }
222  // TODO: provide accessible captcha variants
223  ?>
224  <!-- Captcha -->
225  <div class="trinputlogin">
226  <div class="tagtd none valignmiddle tdinputlogin nowrap">
227 
228  <span class="fa fa-unlock"></span>
229  <span class="span-icon-security inline-block">
230  <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" />
231  </span>
232  <span class="nowrap inline-block">
233  <img class="inline-block valignmiddle" src="<?php echo DOL_URL_ROOT ?>/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" />
234  <a class="inline-block valignmiddle" href="<?php echo $php_self; ?>" tabindex="4" data-role="button"><?php echo $captcha_refresh; ?></a>
235  </span>
236 
237  </div></div>
238  <?php
239 }
240 
241 if (!empty($morelogincontent)) {
242  if (is_array($morelogincontent)) {
243  foreach ($morelogincontent as $format => $option) {
244  if ($format == 'table') {
245  echo '<!-- Option by hook -->';
246  echo $option;
247  }
248  }
249  } else {
250  echo '<!-- Option by hook -->';
251  echo $morelogincontent;
252  }
253 }
254 
255 ?>
256 
257 </div>
258 
259 </div> <!-- end div login_right -->
260 
261 </div> <!-- end div login_line1 -->
262 
263 
264 <div id="login_line2" style="clear: both">
265 
266 <!-- Button Connection -->
267 <br>
268 <div id="login-submit-wrapper">
269 <input type="submit" class="button" value="&nbsp; <?php echo $langs->trans('Connection'); ?> &nbsp;" tabindex="5" />
270 </div>
271 
272 <?php
273 if ($forgetpasslink || $helpcenterlink) {
274  $moreparam = '';
275  if ($dol_hide_topmenu) {
276  $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_hide_topmenu='.$dol_hide_topmenu;
277  }
278  if ($dol_hide_leftmenu) {
279  $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_hide_leftmenu='.$dol_hide_leftmenu;
280  }
281  if ($dol_no_mouse_hover) {
282  $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_no_mouse_hover='.$dol_no_mouse_hover;
283  }
284  if ($dol_use_jmobile) {
285  $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_use_jmobile='.$dol_use_jmobile;
286  }
287 
288  echo '<br>';
289  echo '<div class="center" style="margin-top: 5px;">';
290  if ($forgetpasslink) {
291  $url = DOL_URL_ROOT.'/user/passwordforgotten.php'.$moreparam;
292  if (!empty($conf->global->MAIN_PASSWORD_FORGOTLINK)) {
293  $url = $conf->global->MAIN_PASSWORD_FORGOTLINK;
294  }
295  echo '<a class="alogin" href="'.dol_escape_htmltag($url).'">';
296  echo $langs->trans('PasswordForgotten');
297  echo '</a>';
298  }
299 
300  if ($forgetpasslink && $helpcenterlink) {
301  echo '&nbsp;-&nbsp;';
302  }
303 
304  if ($helpcenterlink) {
305  $url = DOL_URL_ROOT.'/support/index.php'.$moreparam;
306  if (!empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) {
307  $url = $conf->global->MAIN_HELPCENTER_LINKTOUSE;
308  }
309  echo '<a class="alogin" href="'.dol_escape_htmltag($url).'" target="_blank" rel="noopener noreferrer">';
310  echo $langs->trans('NeedHelpCenter');
311  echo '</a>';
312  }
313  echo '</div>';
314 }
315 
316 if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication)) {
317  $langs->load("users");
318 
319  //if (! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $url=
320  echo '<br>';
321  echo '<div class="center" style="margin-top: 4px;">';
322 
323  $url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL;
324  if (!empty($url)) {
325  print '<a class="alogin" href="'.$url.'">'.$langs->trans("LoginUsingOpenID").'</a>';
326  } else {
327  $langs->load("errors");
328  print '<span class="warning">'.$langs->trans("ErrorOpenIDSetupNotComplete", 'MAIN_AUTHENTICATION_OPENID_URL').'</span>';
329  }
330 
331  echo '</div>';
332 }
333 
334 if (isset($conf->file->main_authentication) && preg_match('/google/', $conf->file->main_authentication)) {
335  $langs->load("users");
336 
337  global $dolibarr_main_url_root;
338 
339  // Define $urlwithroot
340  $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
341  $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
342  //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
343 
344  echo '<br>';
345  echo '<div class="center" style="margin-top: 4px;">';
346 
347  //$shortscope = 'userinfo_email,userinfo_profile';
348  $shortscope = 'openid,email,profile'; // For openid connect
349 
350  $oauthstateanticsrf = bin2hex(random_bytes(128/8));
351  $_SESSION['oauthstateanticsrf'] = $shortscope.'-'.$oauthstateanticsrf;
352  $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state=forlogin-'.$shortscope.'-'.$oauthstateanticsrf;
353 
354  $url = $urltorenew;
355 
356  print img_picto('', 'google', 'class="pictofixedwidth"').'<a class="alogin" href="'.$url.'">'.$langs->trans("LoginWith", "Google").'</a>';
357 
358  echo '</div>';
359 }
360 
361 ?>
362 
363 </div> <!-- end login line 2 -->
364 
365 </div> <!-- end login table -->
366 
367 
368 </form>
369 
370 
371 <?php
372 // Show error message if defined
373 if (!empty($_SESSION['dol_loginmesg'])) {
374  ?>
375  <div class="center login_main_message"><div class="error">
376  <?php echo dol_escape_htmltag($_SESSION['dol_loginmesg']); ?>
377  </div></div>
378  <?php
379 }
380 
381 // Add commit strip
382 if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
383  include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
384  if (substr($langs->defaultlang, 0, 2) == 'fr') {
385  $resgetcommitstrip = getURLContent("https://www.commitstrip.com/fr/feed/");
386  } else {
387  $resgetcommitstrip = getURLContent("https://www.commitstrip.com/en/feed/");
388  }
389  if ($resgetcommitstrip && $resgetcommitstrip['http_code'] == '200') {
390  $xml = simplexml_load_string($resgetcommitstrip['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
391  $little = $xml->channel->item[0]->children('content', true);
392  print preg_replace('/width="650" height="658"/', '', $little->encoded);
393  }
394 }
395 
396 ?>
397 
398 <?php if ($main_home) {
399  ?>
400  <div class="center login_main_home paddingtopbottom <?php echo empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' backgroundsemitransparent boxshadow'; ?>" style="max-width: 70%">
401  <?php echo $main_home; ?>
402  </div><br>
403  <?php
404 }
405 ?>
406 
407 <!-- authentication mode = <?php echo $main_authentication ?> -->
408 <!-- cookie name used for this session = <?php echo $session_name ?> -->
409 <!-- urlfrom in this session = <?php echo isset($_SESSION["urlfrom"]) ? $_SESSION["urlfrom"] : ''; ?> -->
410 
411 <!-- Common footer is not used for login page, this is same than footer but inside login tpl -->
412 
413 <?php
414 if (!empty($conf->global->MAIN_HTML_FOOTER)) {
415  print $conf->global->MAIN_HTML_FOOTER;
416 }
417 
418 if (!empty($morelogincontent) && is_array($morelogincontent)) {
419  foreach ($morelogincontent as $format => $option) {
420  if ($format == 'js') {
421  echo "\n".'<!-- Javascript by hook -->';
422  echo $option."\n";
423  }
424  }
425 } elseif (!empty($moreloginextracontent)) {
426  echo '<!-- Javascript by hook -->';
427  echo $moreloginextracontent;
428 }
429 
430 // Google Analytics
431 // TODO Add a hook here
432 if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
433  $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
434  foreach ($tmptagarray as $tmptag) {
435  print "\n";
436  print "<!-- JS CODE TO ENABLE for google analtics tag -->\n";
437  print "
438  <!-- Global site tag (gtag.js) - Google Analytics -->
439  <script async src=\"https://www.googletagmanager.com/gtag/js?id=".trim($tmptag)."\"></script>
440  <script>
441  window.dataLayer = window.dataLayer || [];
442  function gtag(){dataLayer.push(arguments);}
443  gtag('js', new Date());
444 
445  gtag('config', '".trim($tmptag)."');
446  </script>";
447  print "\n";
448  }
449 }
450 
451 // TODO Replace this with a hook
452 // Google Adsense (need Google module)
453 if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) {
454  if (empty($conf->dol_use_jmobile)) {
455  ?>
456  <div class="center"><br>
457  <script><!--
458  google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
459  google_ad_slot = "<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
460  google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
461  google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
462  //-->
463  </script>
464  <script src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
465  </div>
466  <?php
467  }
468 }
469 ?>
470 
471 
472 </div>
473 </div><!-- end of center -->
474 
475 
476 </body>
477 </html>
478 <!-- END PHP TEMPLATE -->
dol_escape_htmltag
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
Definition: functions.lib.php:1468
colorStringToArray
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,...
Definition: functions2.lib.php:2402
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
top_htmlhead
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Ouput html header of a page.
Definition: main.inc.php:1482
name
$conf db name
Definition: repair.php:122
getURLContent
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).
Definition: geturl.lib.php:41
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
Login
API that allows to log in with an user account.
Definition: api_login.class.php:26
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10878
dol_now
dol_now($mode='auto')
Return date for now.
Definition: functions.lib.php:2845
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
type
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition: repair.php:119