* Copyright (C) 2011-2024 Laurent Destailleur * Copyright (C) 2024 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ // Page to ask email for password forgotten if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', 1); } /** * @var Conf $conf * @var DoliDB $db * @var HookManager $hookmanager * @var Translate $langs * * @var string $action * @var string $captcha * @var string $disabled * @var string $dol_url_root * @var string $focus_element * @var string $mode Contains (list of) authentication methods - example "http","dolibarr","openid,dolibarr" * @var string $message * @var string $title * @var string $urllogo * @var User $user * @var string $username */ ' @phan-var-force string $captcha @phan-var-force string $disabled @phan-var-force string $dol_url_root @phan-var-force string $focus_element @phan-var-force string $mode @phan-var-force string $message @phan-var-force string $title @phan-var-force string $urllogo @phan-var-force User $user @phan-var-force string $username '; // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit(1); } // DDOS protection $size = (int) ($_SERVER['CONTENT_LENGTH'] ?? 0); if ($size > 10000) { $langs->loadLangs(array("errors", "install")); httponly_accessforbidden('
'.$langs->trans("ErrorRequestTooLarge").'
'.$langs->trans("ClickHereToGoToApp").'
', 413, 1); } require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; /* * View */ header('Cache-Control: Public, must-revalidate'); if (GETPOST('dol_hide_topmenu')) { $conf->dol_hide_topmenu = 1; } if (GETPOST('dol_hide_leftmenu')) { $conf->dol_hide_leftmenu = 1; } if (GETPOST('dol_optimize_smallscreen')) { $conf->dol_optimize_smallscreen = 1; } if (GETPOST('dol_no_mouse_hover')) { $conf->dol_no_mouse_hover = 1; } if (GETPOST('dol_use_jmobile')) { $conf->dol_use_jmobile = 1; } // If we force to use jmobile, then we reenable javascript if (!empty($conf->dol_use_jmobile)) { $conf->use_javascript_ajax = 1; } $php_self = $_SERVER['PHP_SELF']; $php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : ''; $php_self = str_replace('action=validatenewpassword', '', $php_self); $titleofpage = $langs->trans('SendNewPassword'); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second $arrayofjs = array(); $disablenofollow = 1; if (!preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) { $disablenofollow = 0; } if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $disablenofollow = 0; } top_htmlhead('', $titleofpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow); $colorbackhmenu1 = '60,70,100'; // topmenu if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) { $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1; } $colorbackhmenu1 = getDolUserString('THEME_ELDY_ENABLE_PERSONALIZED') ? getDolUserString('THEME_ELDY_TOPMENU_BACK1', $colorbackhmenu1) : getDolGlobalString('THEME_ELDY_TOPMENU_BACK1', $colorbackhmenu1); $colorbackhmenu1 = implode(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' ?> > dol_use_jmobile)) { ?>