20 if (!defined(
'NOBROWSERNOTIF')) define(
'NOBROWSERNOTIF', 1);
23 if (empty($conf) || !is_object($conf))
25 print "Error, template page can't be called as URL";
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
32 header(
'Cache-Control: Public, must-revalidate');
33 header(
"Content-type: text/html; charset=".$conf->file->character_set_client);
35 if (
GETPOST(
'dol_hide_topmenu')) $conf->dol_hide_topmenu = 1;
36 if (
GETPOST(
'dol_hide_leftmenu')) $conf->dol_hide_leftmenu = 1;
37 if (
GETPOST(
'dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen = 1;
38 if (
GETPOST(
'dol_no_mouse_hover')) $conf->dol_no_mouse_hover = 1;
39 if (
GETPOST(
'dol_use_jmobile')) $conf->dol_use_jmobile = 1;
42 if (!empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax = 1;
46 $php_self = str_replace(
'action=validatenewpassword',
'', $php_self);
48 $titleofpage = $langs->trans(
'SendNewPassword');
53 $colorbackhmenu1 =
'60,70,100';
54 if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1;
55 $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);
59 <!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->
61 <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='.urlencode(
'logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).
'\')
"'; ?>>
63 <?php if (empty($conf->dol_use_jmobile)) { ?>
65 $(document).ready(function () {
66 // Set focus on correct field
67 <?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
73 <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));
"' : '' ?>>
74 <div class="login_vertical_align
">
76 <form id="login
" name="login
" method="POST
" action="<?php echo $php_self; ?>
">
77 <input type="hidden
" name="token
" value="<?php echo $_SESSION[
'newtoken']; ?>
">
78 <input type="hidden
" name="action
" value="buildnewpassword
">
81 <!-- Title with version -->
82 <div class="login_table_title center
" title="<?php echo
dol_escape_htmltag($title); ?>
">
84 if ($disablenofollow) echo '<a class="login_table_title
" href="https:
86 if ($disablenofollow) echo
'</a>';
92 <div
class=
"login_table">
94 <div
id=
"login_line1">
97 <img alt=
"" title=
"" src=
"<?php echo $urllogo; ?>" id=
"img_logo" />
102 <div
id=
"login_right">
104 <div
class=
"tagtable centpercent" title=
"Login pass" >
107 <div
class=
"trinputlogin">
108 <div
class=
"tagtd nowraponall center valignmiddle tdinputlogin">
109 <!-- <span
class=
"span-icon-user">-->
110 <span
class=
"fa fa-user"></span>
111 <input
type=
"text" placeholder=
"<?php echo $langs->trans("Login"); ?>" <?php echo $disabled; ?>
id=
"username" name=
"username" class=
"flat input-icon-user minwidth150" value=
"<?php echo dol_escape_htmltag($username); ?>" tabindex=
"1" />
118 $php_self = preg_replace(
'/[&\?]time=(\d+)/',
'', $php_self);
119 if (preg_match(
'/\?/', $php_self)) $php_self .=
'&time='.dol_print_date(
dol_now(),
'dayhourlog');
120 else $php_self .=
'?time='.dol_print_date(
dol_now(),
'dayhourlog');
124 <div
class=
"trinputlogin">
125 <div
class=
"tagtd tdinputlogin nowraponall none valignmiddle">
127 <span
class=
"fa fa-unlock"></span>
128 <span
class=
"nofa inline-block">
129 <input
id=
"securitycode" placeholder=
"<?php echo $langs->trans("SecurityCode
"); ?>" class=
"flat input-icon-security width150" type=
"text" maxlength=
"5" name=
"code" tabindex=
"3" />
131 <span
class=
"nowrap inline-block">
132 <img
class=
"inline-block valignmiddle" src=
"<?php echo DOL_URL_ROOT ?>/core/antispamimage.php" border=
"0" width=
"80" height=
"32" id=
"img_securitycode" />
133 <a
class=
"inline-block valignmiddle" href=
"<?php echo $php_self; ?>" tabindex=
"4"><?php echo $captcha_refresh; ?></a>
140 if (!empty($morelogincontent)) {
141 if (is_array($morelogincontent)) {
142 foreach ($morelogincontent as $format => $option)
144 if ($format ==
'table') {
145 echo
'<!-- Option by hook -->';
150 echo
'<!-- Option by hook -->';
151 echo $morelogincontent;
158 </div> <!-- end div login_right -->
160 </div> <!-- end div login_line1 -->
163 <div
id=
"login_line2" style=
"clear: both">
165 <!-- Button
"Regenerate and Send password" -->
166 <br><input type=
"submit" <?php echo $disabled; ?>
class=
"button" name=
"button_password" value=
"<?php echo $langs->trans('SendNewPassword'); ?>" tabindex=
"4" />
169 <div
class=
"center" style=
"margin-top: 15px;">
172 if (!empty($conf->dol_hide_topmenu)) $moreparam .= (strpos($moreparam,
'?') ===
false ?
'?' :
'&').
'dol_hide_topmenu='.$conf->dol_hide_topmenu;
173 if (!empty($conf->dol_hide_leftmenu)) $moreparam .= (strpos($moreparam,
'?') ===
false ?
'?' :
'&').
'dol_hide_leftmenu='.$conf->dol_hide_leftmenu;
174 if (!empty($conf->dol_no_mouse_hover)) $moreparam .= (strpos($moreparam,
'?') ===
false ?
'?' :
'&').
'dol_no_mouse_hover='.$conf->dol_no_mouse_hover;
175 if (!empty($conf->dol_use_jmobile)) $moreparam .= (strpos($moreparam,
'?') ===
false ?
'?' :
'&').
'dol_use_jmobile='.$conf->dol_use_jmobile;
177 print '<a class="alogin" href="'.$dol_url_root.
'/index.php'.$moreparam.
'">'.$langs->trans(
'BackToLoginPage').
'</a>';
188 <div
class=
"center login_main_home divpasswordmessagedesc paddingtopbottom<?php echo empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' backgroundsemitransparent'; ?>" style=
"max-width: 70%">
189 <?php
if ($mode ==
'dolibarr' || !$disabled) { ?>
190 <span
class=
"passwordmessagedesc">
191 <?php echo $langs->trans(
'SendNewPasswordDesc'); ?>
194 <div
class=
"warning center">
195 <?php echo $langs->trans(
'AuthenticationDoesNotAllowSendNewPassword', $mode); ?>
203 <?php
if ($message) { ?>
204 <div
class=
"center login_main_message">
210 <!-- Common footer is not used
for passwordforgotten page,
this is same than footer but inside passwordforgotten tpl -->
213 if (!empty($conf->global->MAIN_HTML_FOOTER))
print $conf->global->MAIN_HTML_FOOTER;
215 if (!empty($morelogincontent) && is_array($morelogincontent)) {
216 foreach ($morelogincontent as $format => $option)
218 if ($format ==
'js') {
219 echo
"\n".
'<!-- Javascript by hook -->';
223 } elseif (!empty($moreloginextracontent)) {
224 echo
'<!-- Javascript by hook -->';
225 echo $moreloginextracontent;
230 if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
232 $tmptagarray = explode(
',', $conf->global->MAIN_GOOGLE_AN_ID);
233 foreach ($tmptagarray as $tmptag) {
235 print "<!-- JS CODE TO ENABLE for google analtics tag -->\n";
237 <!-- Global site tag (gtag.js) - Google Analytics -->
238 <script async src=\"https://www.googletagmanager.com/gtag/js?id=".trim($tmptag).
"\"></script>
240 window.dataLayer = window.dataLayer || [];
241 function gtag(){dataLayer.push(arguments);}
242 gtag('js', new Date());
244 gtag('config', '".trim($tmptag).
"');
252 if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT))
254 if (empty($conf->dol_use_jmobile))
257 <div
class=
"center"><br>
259 google_ad_client =
"<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
260 google_ad_slot =
"<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
261 google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
262 google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
265 <script src=
"//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
274 </div> <!-- end of center -->
279 <!-- END PHP TEMPLATE -->
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_now($mode= 'auto')
Return date for now.
API that allows to log in with an user account.
top_htmlhead($head, $title= '', $disablejs=0, $disablehead=0, $arrayofjs= '', $arrayofcss= '', $disablejmobile=0, $disablenofollow=0)
Ouput html header of a page.
$conf db name
Only used if Module[ID]Name translation string is not found.
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,255).
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_htmloutput_mesg($mesgstring= '', $mesgarray=array(), $style= 'ok', $keepembedded=0)
Print formated messages to output (Used to show messages on html output).
print
Draft customers invoices.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $keepmoretags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...