Compare commits
2 commits
72c2690f5d
...
6c69e64d2d
Author | SHA1 | Date | |
---|---|---|---|
bernd | 6c69e64d2d | ||
bernd | 1b5432539b |
17
index.php
17
index.php
|
@ -1,17 +1,14 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', true);
|
||||
|
||||
require("static/web.php");
|
||||
require("lib/request.php");
|
||||
|
||||
|
||||
$outputLogin = "";
|
||||
$outputEmail = "";
|
||||
$class="";
|
||||
$title = "";
|
||||
$message = "";
|
||||
$outputLogin = null;
|
||||
$outputEmail = null;
|
||||
$class=null;
|
||||
$title = null;
|
||||
$message = null;
|
||||
$saved = false;
|
||||
|
||||
|
||||
|
@ -24,7 +21,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
$saved = $request->checkRequest($message);
|
||||
if ($saved) {
|
||||
$class = "success";
|
||||
$title = "Gespeichet";
|
||||
$title = "Success";
|
||||
} else {
|
||||
$class = "error";
|
||||
$title = "Sorry";
|
||||
|
@ -34,7 +31,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
|
||||
} else {
|
||||
$class = "error";
|
||||
$title = "Sorry";
|
||||
$title = "Error";
|
||||
$message = "Something goes wrong";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,9 @@ class Request extends BaseClass {
|
|||
if ($this->generateToken(16) === true) {
|
||||
if ($this->saveRequest() === true) {
|
||||
if ($this->sendVerificationMail() === true) {
|
||||
$login = htmlspecialchars($_POST['login']);
|
||||
$message = "Your request for '{$login}' is saved and a
|
||||
verification mail is send";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue