} } if (isset($_POST["_my_items"]) && !empty($_POST["_my_items"])) { $splitter = explode("_", $_POST["_my_items"]); if (count($splitter) == 2) { $_POST["itemtype"] = $splitter[0]; $_POST["items_id"] = $splitter[1]; } } if (!isset($_POST["itemtype"]) || empty($_POST["items_id"]) && $_POST["itemtype"] != 0) { $_POST["itemtype"] = ''; $_POST["items_id"] = 0; } if ($newID = $track->add($_POST)) { if (isset($_POST["type"]) && $_POST["type"] == "Helpdesk") { echo "<div class='center'>" . $LANG['help'][18] . "<br><br>"; displayBackLink(); echo "</div>"; } else { echo "<div class='center b spaced'>"; echo "<img src='" . $CFG_GLPI["root_doc"] . "/pics/ok.png' alt='OK'></div>"; addMessageAfterRedirect($LANG['help'][19]); displayMessageAfterRedirect(); } } else { echo "<div class='center'>"; echo "<img src='" . $CFG_GLPI["root_doc"] . "/pics/warning.png' alt='warning'><br></div>"; displayMessageAfterRedirect(); displayBackLink(); } nullFooter();
/** * Print a nice HTML head for popup window (nothing to display) * * @param $title title of the page * @param $url not used anymore. **/ function popHeader($title, $url = '') { global $CFG_GLPI, $LANG, $PLUGIN_HOOKS, $HEADER_LOADED; // Print a nice HTML-head for every page if ($HEADER_LOADED) { return; } $HEADER_LOADED = true; includeCommonHtmlHeader($title); // Body echo "<body>"; displayMessageAfterRedirect(); }
function updateForgottenPassword($input) { global $LANG, $CFG_GLPI; echo "<div class='center'>"; if ($this->getFromDBbyEmail($input['email'])) { if ($this->fields["authtype"] == Auth::DB_GLPI || !Auth::useAuthExt()) { if ($input['token'] == $this->fields['token'] && abs(strtotime($_SESSION["glpi_currenttime"]) - strtotime($this->fields['tokendate'])) < DAY_TIMESTAMP) { $input['id'] = $this->fields['id']; if ($this->update($input)) { echo $LANG['users'][13]; // $input2['token'] = ''; $input2['tokendate'] = NULL; $input2['id'] = $this->fields['id']; $this->update($input2); } else { // Force display on error displayMessageAfterRedirect(); } } else { echo $LANG['users'][12]; } } else { echo $LANG['users'][9]; } } else { echo $LANG['users'][8]; } echo "<br>"; echo "<a href=\"" . $CFG_GLPI['root_doc'] . "/index.php\">" . $LANG['buttons'][13] . "</a>"; echo "</div>"; }