createElement("FormInfo"); /** * Forgot Password form has been submitted and no errors * were found with the form (the username is in the database) */ if(isset($_SESSION['forgotpass'])){ /** * New password was generated for user and sent to user's * email address. */ if($_SESSION['forgotpass']){ $element = $xml->createElement("mode", "success"); $rootElement->appendChild($element); } /** * Email could not be sent, therefore password was not * edited in the database. */ else{ $element = $xml->createElement("mode", "fail"); $rootElement->appendChild($element); } unset($_SESSION['forgotpass']); } else if ($form->num_errors > 0) { /** * Forgot password form is displayed, if error found * it is displayed. */ $common->addXMLChildren($xml, $rootElement, array( "user" => $form->value("user"), "userError" => $form->error("user") )); } $common->addXMLChildren($xml, $rootElement, array( "root"=>$common->rootPath() )); $xml->appendChild($rootElement); $pageContents = $common->transformXML($common->root()."/style/forgotpass.xsl", $xml); $page->replace_files(array( "memberLinks" => "layout/memberLinks.php", "pageLinks" => "layout/pageLinks.php", "loginWidget" => "layout/loginWidget.php" )); $page->replace_tags(array( "sidebar" => "", "pageContents" => $pageContents, "version" => VERSION )); getHeader($pageTitle, true); echo $page->output(); getFooter(); $database->closeConnection(); ?>