Add e-mail-based password reset feature
parent
406cdcce31
commit
82157cad76
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
use PHPMailer\PHPMailer\Exception;
|
||||||
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
|
|
||||||
function fillString($string, $targetlength)
|
function fillString($string, $targetlength)
|
||||||
{
|
{
|
||||||
while(strlen($string) < $targetlength)
|
while(strlen($string) < $targetlength)
|
||||||
|
@ -19,6 +22,61 @@ function right($str, $length)
|
||||||
return substr($str, -$length);
|
return substr($str, -$length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function generateToken($length): string {
|
||||||
|
$chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
$res = "";
|
||||||
|
for($i = 0; $i < $length; $i++) {
|
||||||
|
$index = random_int(0, strlen($chars) - 1);
|
||||||
|
$res = $res.substr($chars, $index, 1);
|
||||||
|
}
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
|
||||||
|
function htmlToPlain($message): string {
|
||||||
|
$messageNew = str_replace('<br/>', "\n", $message);
|
||||||
|
$messageNew = preg_replace('/<a href="(.*)">(.*)<\\/a>/', "$2: $1", $messageNew);
|
||||||
|
return $messageNew;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendMail($message, $subject, $title, $preheader): bool {
|
||||||
|
include_once('../lib/phpmailer/Exception.php');
|
||||||
|
include_once('../lib/phpmailer/PHPMailer.php');
|
||||||
|
include_once('../lib/phpmailer/SMTP.php');
|
||||||
|
include_once('app/HTML.php');
|
||||||
|
global $RUNTIME;
|
||||||
|
|
||||||
|
$mailer = new PHPMailer(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mailer->isSMTP();
|
||||||
|
$mailer->Host = $RUNTIME['SMTP']['SERVER'];
|
||||||
|
$mailer->Port = $RUNTIME['SMTP']['PORT'];
|
||||||
|
$mailer->Username = $RUNTIME['SMTP']['ADDRESS'];
|
||||||
|
$mailer->Password = $RUNTIME['SMTP']['PASS'];
|
||||||
|
$mailer->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
|
||||||
|
|
||||||
|
$mailer->setFrom($RUNTIME['SMTP']['ADDRESS'], $RUNTIME['SMTP']['NAME']);
|
||||||
|
$mailer->addAddress($email);
|
||||||
|
|
||||||
|
$mailer->isHTML(true);
|
||||||
|
$mailer->Subject = $subject;
|
||||||
|
$mailHtml = new HTML();
|
||||||
|
$mailHtml->importHTML("email.html");
|
||||||
|
$mailHtml->setHTMLTitle($title);
|
||||||
|
$mailHtml->ReplaceLayoutInhalt('%%MESSAGE%%', $message);
|
||||||
|
$mailHtml->ReplaceLayoutInhalt('%%PREHEADER%%', $preheader);
|
||||||
|
$mailHtml->build();
|
||||||
|
$mailer->Body = $mailHtml->ausgabe();
|
||||||
|
$mailer->AltBody = htmlToPlain($message);
|
||||||
|
|
||||||
|
$mailer->send();
|
||||||
|
return true;
|
||||||
|
} catch(Exception $e) {
|
||||||
|
error_log('Could not send email: '.$mailer->ErrorInfo);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getDataFromHTTP($URL, $contend = "", $requestTyp = "application/text")
|
function getDataFromHTTP($URL, $contend = "", $requestTyp = "application/text")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -7,8 +7,8 @@ $RUNTIME['GRID']['HOMEURL'] = "http://...:8002";
|
||||||
|
|
||||||
$RUNTIME['SMTP']['SERVER'] = "localhost";
|
$RUNTIME['SMTP']['SERVER'] = "localhost";
|
||||||
$RUNTIME['SMTP']['PORT'] = 25;
|
$RUNTIME['SMTP']['PORT'] = 25;
|
||||||
$RUNTIME['SMTP']['ADRESS'] = "noreplay@localhost";
|
$RUNTIME['SMTP']['ADDRESS'] = "noreply@localhost";
|
||||||
$RUNTIME['SMTP']['USER'] = "noreplay@localhost";
|
$RUNTIME['SMTP']['NAME'] = "4Creative";
|
||||||
$RUNTIME['SMTP']['PASS'] = "...";
|
$RUNTIME['SMTP']['PASS'] = "...";
|
||||||
|
|
||||||
$RUNTIME['TOOLS']['IMAGESERVICE'] = "https://image-service.4creative.net/";
|
$RUNTIME['TOOLS']['IMAGESERVICE'] = "https://image-service.4creative.net/";
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?php
|
||||||
|
const MESSAGE = 'Hallo %%NAME%%,<br/><br/>wir haben soeben eine Anfrage zur Zurücksetzung des Passworts für deinen 4Creative-Account erhalten.<br/><br/>Klicke <a href="%%RESET_LINK%%">hier</a>, um ein neues Passwort festzulegen. Dieser Link läuft in 24 Stunden ab.<br/><br/>Falls du diese Anfrage nicht gesendet hast, ignoriere sie einfach. Bei weiteren Fragen kannst du uns unter info@4creative.net oder per Discord über @ikeytan erreichen.';
|
||||||
|
|
||||||
|
$HTML = new HTML();
|
||||||
|
$HTML->setHTMLTitle("Passwort vergessen");
|
||||||
|
$HTML->importHTML("forgot.html");
|
||||||
|
|
||||||
|
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
include_once 'app/FormValidator.php';
|
||||||
|
$validator = new FormValidator(array(
|
||||||
|
'username' => array('required' => true, 'regex' => '/^[^\\/<>\s]{1,64} [^\\/<>\s]{1,64}$/'),
|
||||||
|
'email' => array('required' => true, 'regex' => '/^\S{1,64}@\S{1,250}.\S{2,64}$/')
|
||||||
|
));
|
||||||
|
|
||||||
|
if(!$validator->isValid($_POST)) {
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%MESSAGE%%', 'Bitte gebe deinen Benutzernamen (Vor- und Nachname) und die dazugehörige E-Mail-Adresse ein');
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%MESSAGECOLOR%%', 'red');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$nameParts = explode(" ", $_POST['username']);
|
||||||
|
$email = strtolower(trim($_POST['email']));
|
||||||
|
|
||||||
|
$getAccount = $RUNTIME['pdo']->prepare('SELECT Email,FirstName,LastName,PrincipalID FROM UserAccounts WHERE FirstName = ? AND LastName = ? AND Email = ?');
|
||||||
|
$getAccount->execute([trim($nameParts[0]), trim($nameParts[1]), $email]);
|
||||||
|
$validRequest = $getAccount->rowCount() == 1;
|
||||||
|
if($res = $getAccount->fetch()) {
|
||||||
|
$email = $res['Email'];
|
||||||
|
$uuid = $res['PrincipalID'];
|
||||||
|
$name = $res['FirstName'].' '.$res['LastName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($blockedDomains as $domain) {
|
||||||
|
if(str_ends_with($email, $domain)) {
|
||||||
|
$validRequest = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%MESSAGE%%', 'Falls Name und E-Mail-Adresse bei uns registriert sind, erhältst du in Kürze eine E-Mail mit weiteren Informationen.');
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%MESSAGECOLOR%%', 'green');
|
||||||
|
$HTML->build();
|
||||||
|
echo $HTML->ausgabe();
|
||||||
|
fastcgi_finish_request();
|
||||||
|
|
||||||
|
if($validRequest) {
|
||||||
|
$getReqTime = $RUNTIME['pdo']->prepare('SELECT RequestTime FROM PasswordResetTokens WHERE PrincipalID=?');
|
||||||
|
$getReqTime->execute([$uuid]);
|
||||||
|
if(($res = $getReqTime->fetch()) && time() - $res['RequestTime'] < 900) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once 'app/utils.php';
|
||||||
|
$token = generateToken(32);
|
||||||
|
$setToken = $RUNTIME['pdo']->prepare('REPLACE INTO PasswordResetTokens(PrincipalID,Token,RequestTime) VALUES(?,?,?)');
|
||||||
|
$setToken->execute([$uuid, $token, time()]);
|
||||||
|
|
||||||
|
sendMail(str_replace('%%NAME%%', $name, str_replace('%%RESET_LINK%%', 'https://'.$RUNTIME['DOMAIN'].'/index.php?page=reset-password&token='.$token, MESSAGE)), "Zurücksetzung des Passworts für ".$name, 'Dein Passwort zurücksetzen', 'Folge diesen Anweisungen, um ein neues Passwort für deinen 4Creative-Account festzulegen');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%MESSAGE%%', '');
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%MESSAGECOLOR%%', 'red');
|
||||||
|
$HTML->build();
|
||||||
|
echo $HTML->ausgabe();
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -38,7 +38,7 @@
|
||||||
$_SESSION['SALT'] = $rowAuth['passwordSalt'];
|
$_SESSION['SALT'] = $rowAuth['passwordSalt'];
|
||||||
$_SESSION['UUID'] = $rowUser['PrincipalID'];
|
$_SESSION['UUID'] = $rowUser['PrincipalID'];
|
||||||
$_SESSION['LEVEL'] = $rowUser['UserLevel'];
|
$_SESSION['LEVEL'] = $rowUser['UserLevel'];
|
||||||
$_SESSION['DISPLAYNAME'] = strtoupper(trim($_POST['username']));
|
$_SESSION['DISPLAYNAME'] = strtoupper($rowUser['FirstName'].' '.$rowUser['LastName']);
|
||||||
$_SESSION['LOGIN'] = 'true';
|
$_SESSION['LOGIN'] = 'true';
|
||||||
|
|
||||||
header("Location: index.php?page=".urlencode($_REQUEST['page']));
|
header("Location: index.php?page=".urlencode($_REQUEST['page']));
|
||||||
|
@ -51,11 +51,17 @@
|
||||||
$HTML->ReplaceLayoutInhalt("%%LASTUSERNAME%%", htmlspecialchars($_POST['username']));
|
$HTML->ReplaceLayoutInhalt("%%LASTUSERNAME%%", htmlspecialchars($_POST['username']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(isset($_SESSION) && isset($_SESSION['resetMessage'])) {
|
||||||
|
unset($_SESSION['resetMessage']);
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%LOGINMESSAGE%%', 'Du kannst dich jetzt mit deinem neuen Passwort einloggen!');
|
||||||
|
$HTML->ReplaceLayoutInhalt("%%MESSAGECOLOR%%", "darkgreen");
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($_REQUEST['page']) && preg_match('/^[0-9a-zA-Z]{1-100}$/', $_REQUEST['page']) && file_exists("./pages/".$_REQUEST['page'].".php"))
|
if(isset($_REQUEST['page']) && preg_match('/^[0-9a-zA-Z]{1-100}$/', $_REQUEST['page']) && file_exists("./pages/".$_REQUEST['page'].".php"))
|
||||||
$HTML->ReplaceLayoutInhalt("%%PAGENAME%%", urlencode($_REQUEST['page']));
|
$HTML->ReplaceLayoutInhalt("%%PAGENAME%%", urlencode($_REQUEST['page']));
|
||||||
|
|
||||||
$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", "");
|
$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", "");
|
||||||
|
$HTML->ReplaceLayoutInhalt("%%MESSAGECOLOR%%", "red");
|
||||||
$HTML->ReplaceLayoutInhalt("%%LASTUSERNAME%%", "");
|
$HTML->ReplaceLayoutInhalt("%%LASTUSERNAME%%", "");
|
||||||
$HTML->ReplaceLayoutInhalt("%%PAGENAME%%", "dashboard");
|
$HTML->ReplaceLayoutInhalt("%%PAGENAME%%", "dashboard");
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
<?php
|
||||||
|
const MESSAGE = 'Hallo %%NAME%%,<br/><br/>das Passwort für deinen 4Creative-Account wurde soeben über die Funktion "Passwort vergessen" geändert.<br/><br/>Solltest du diese Änderung nicht selbst durchgeführt haben, wende dich bitte umgehend per E-Mail (info@4creative.net) oder Discord (@ikeytan) an uns.';
|
||||||
|
|
||||||
|
function displayTokenError() {
|
||||||
|
$HTML = new HTML();
|
||||||
|
$HTML->importHTML("error.html");
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%MESSAGE%%', 'Dieser Link zur Passwortzurücksetzung ist nicht gültig. Bitte klicke oder kopiere den Link aus der E-Mail, die du erhalten hast.');
|
||||||
|
$HTML->build();
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayPage($err) {
|
||||||
|
$HTML = new HTML();
|
||||||
|
$HTML->setHTMLTitle("");
|
||||||
|
$HTML->importHTML("reset-password.html");
|
||||||
|
$HTML->ReplaceLayoutInhalt('%%MESSAGE%%', $err);
|
||||||
|
$HTML->build();
|
||||||
|
echo $HTML->ausgabe();
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
include_once 'app/FormValidator.php';
|
||||||
|
$validator = new FormValidator(array(
|
||||||
|
'password' => array('required' => true, 'regex' => '/^.{1,1000}$/'),
|
||||||
|
'passwordRepeat' => array('required' => true, 'regex' => '/^.{1,1000}$/'),
|
||||||
|
'resetToken' => array('required' => true, 'regex' => '/^[a-zA-Z0-9]{32}$/')
|
||||||
|
));
|
||||||
|
|
||||||
|
if($validator->isValid($_POST)) {
|
||||||
|
if($_POST['password'] !== $_POST['passwordRepeat']) {
|
||||||
|
displayPage('Du musst in beiden Feldern das gleiche Passwort eingeben');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strlen($_POST['password']) < $RUNTIME['PASSWORD_MIN_LENGTH']) {
|
||||||
|
displayPage('Dein Passwort muss mindestens '.$RUNTIME['PASSWORD_MIN_LENGTH'].' Zeichen lang sein.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$getUuid = $RUNTIME['PDO']->prepare('SELECT PrincipalID,FirstName,LastName FROM PasswordResetTokens JOIN UserAccounts ON PasswordResetTokens.PrincipalID = PasswordResetTokens.PrincipalID WHERE Token = ?');
|
||||||
|
if($getUuid->rowCount() == 0) {
|
||||||
|
displayTokenError();
|
||||||
|
}
|
||||||
|
|
||||||
|
$res = $getUuid->fetch();
|
||||||
|
$uuid = $res['PrincipalID'];
|
||||||
|
$name = $res['FirstName'].' '.$res['LastName'];
|
||||||
|
$getToken = $RUNTIME['PDO']->prepare('DELETE FROM PasswordResetTokens WHERE Token = ?');
|
||||||
|
$getToken->execute([$_POST['resetToken']]);
|
||||||
|
|
||||||
|
$salt = bin2hex(random_bytes(16));
|
||||||
|
$hash = md5(md5(trim($_POST['password'])).':'.$salt);
|
||||||
|
$statement = $RUNTIME['PDO']->prepare('UPDATE auth SET passwordHash = :PasswordHash, passwordSalt = :PasswordSalt WHERE UUID = :PrincipalID');
|
||||||
|
$statement->execute(['PasswordHash' => $hash, 'PasswordSalt' => $salt, 'PrincipalID' => $uuid]);
|
||||||
|
|
||||||
|
session_unset();
|
||||||
|
$_SESSION['resetPassword'] = true;
|
||||||
|
|
||||||
|
require_once 'app/utils.php';
|
||||||
|
sendMail(str_replace('%%NAME%%', $name, MESSAGE), 'Passwort für '.$name.' zurückgesetzt', 'Passwort geändert', 'Das Passwort für deinen 4Creative-Account wurde soeben zurückgesetzt');
|
||||||
|
|
||||||
|
header('Location: index.php?page=login');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
displayPage('');
|
||||||
|
|
||||||
|
if(!isset($_GET['token']) || !preg_match('/^[a-z0-9A-Z]{32}$/', $_GET['token'])) {
|
||||||
|
displayTokenError();
|
||||||
|
}
|
||||||
|
?>
|
|
@ -0,0 +1,54 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<title>Fehler - MCP</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/bootstrap/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/animate/animate.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/css-hamburgers/hamburgers.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/animsition/css/animsition.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/select2/select2.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/daterangepicker/daterangepicker.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/css/util.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/css/main.css">
|
||||||
|
<link href="./style/4Creative.ico" rel="icon">
|
||||||
|
<link href="./style/4Creative.ico" rel="apple-touch-icon">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="limiter">
|
||||||
|
<div class="container-login100">
|
||||||
|
<div class="wrap-login100 p-t-50 p-b-90">
|
||||||
|
<div class="login100-form flex-sb flex-w">
|
||||||
|
<span class="login100-form-title p-b-51">
|
||||||
|
Fehler
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="flex-sb-m w-full p-t-3 p-b-24" style="color: red;">
|
||||||
|
%%MESSAGE%%
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-login100-form-btn m-t-17">
|
||||||
|
<a class="login100-form-btn" href="index.php?page=login">Zurück zum Login</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="dropDownSelect1"></div>
|
||||||
|
|
||||||
|
<script src="./style/login/vendor/jquery/jquery-3.2.1.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/animsition/js/animsition.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/bootstrap/js/popper.js"></script>
|
||||||
|
<script src="./style/login/vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/select2/select2.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/daterangepicker/moment.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/daterangepicker/daterangepicker.js"></script>
|
||||||
|
<script src="./style/login/vendor/countdowntime/countdowntime.js"></script>
|
||||||
|
<script src="./style/login/js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,65 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<title>Passwort vergessen</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/bootstrap/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/animate/animate.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/css-hamburgers/hamburgers.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/animsition/css/animsition.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/select2/select2.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/daterangepicker/daterangepicker.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/css/util.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/css/main.css">
|
||||||
|
<link href="./style/4Creative.ico" rel="icon">
|
||||||
|
<link href="./style/4Creative.ico" rel="apple-touch-icon">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="limiter">
|
||||||
|
<div class="container-login100">
|
||||||
|
<div class="wrap-login100 p-t-50 p-b-90">
|
||||||
|
<form class="login100-form validate-form flex-sb flex-w" action="index.php?page=forgot-request" method="post">
|
||||||
|
<span class="login100-form-title p-b-51">
|
||||||
|
Passwort vergessen
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="flex-sb-m w-full p-t-3 p-b-24" style="color: %%MESSAGECOLOR%%;">
|
||||||
|
%%MESSAGE%%
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wrap-input100 validate-input m-b-16" data-validate="Bitte gebe deinen Benutzernamen an.">
|
||||||
|
<input class="input100" type="text" name="username" value="%%LASTUSERNAME%%" placeholder="Benutzername">
|
||||||
|
<span class="focus-input100"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wrap-input100 validate-input m-b-16" data-validate="Bitte gebe deine E-Mail-Adresse ein.">
|
||||||
|
<input class="input100" type="email" name="email" placeholder="E-Mail">
|
||||||
|
<span class="focus-input100"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-login100-form-btn m-t-17">
|
||||||
|
%%CSRF%%
|
||||||
|
<button class="login100-form-btn" name="forgot-request">
|
||||||
|
Absenden
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="./style/login/vendor/jquery/jquery-3.2.1.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/animsition/js/animsition.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/bootstrap/js/popper.js"></script>
|
||||||
|
<script src="./style/login/vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/select2/select2.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/daterangepicker/moment.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/daterangepicker/daterangepicker.js"></script>
|
||||||
|
<script src="./style/login/vendor/countdowntime/countdowntime.js"></script>
|
||||||
|
<script src="./style/login/js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -27,7 +27,7 @@
|
||||||
Login
|
Login
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="flex-sb-m w-full p-t-3 p-b-24" style="color: red;">
|
<div class="flex-sb-m w-full p-t-3 p-b-24" style="color: %%MESSAGECOLOR%%;">
|
||||||
%%LOGINMESSAGE%%
|
%%LOGINMESSAGE%%
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="#" class="txt1">Passwort Vergessen?</a>
|
<a href="index.php?page=forgot.php" class="txt1">Passwort vergessen?</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<title>Simple Transactional Email</title>
|
<title></title>
|
||||||
<style>
|
<style>
|
||||||
img {
|
img {
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -22,328 +22,18 @@
|
||||||
-ms-text-size-adjust: 100%;
|
-ms-text-size-adjust: 100%;
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
|
||||||
border-collapse: separate;
|
|
||||||
mso-table-lspace: 0pt;
|
|
||||||
mso-table-rspace: 0pt;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
table td {
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body {
|
|
||||||
background-color: #f6f6f6;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
display: block;
|
|
||||||
margin: 0 auto !important;
|
|
||||||
/* makes it centered */
|
|
||||||
max-width: 580px;
|
|
||||||
padding: 10px;
|
|
||||||
width: 580px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 580px;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main {
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 3px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper {
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-block {
|
|
||||||
padding-bottom: 10px;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
clear: both;
|
|
||||||
margin-top: 10px;
|
|
||||||
text-align: center;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer td,
|
|
||||||
.footer p,
|
|
||||||
.footer span,
|
|
||||||
.footer a {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 12px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4 {
|
|
||||||
color: #000000;
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 1.4;
|
|
||||||
margin: 0;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 35px;
|
|
||||||
font-weight: 300;
|
|
||||||
text-align: center;
|
|
||||||
text-transform: capitalize;
|
|
||||||
}
|
|
||||||
|
|
||||||
p,
|
|
||||||
ul,
|
|
||||||
ol {
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p li,
|
|
||||||
ul li,
|
|
||||||
ol li {
|
|
||||||
list-style-position: inside;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #3498db;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn>tbody>tr>td {
|
|
||||||
padding-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn table {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn table td {
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 5px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn a {
|
|
||||||
background-color: #ffffff;
|
|
||||||
border: solid 1px #3498db;
|
|
||||||
border-radius: 5px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: #3498db;
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 0;
|
|
||||||
padding: 12px 25px;
|
|
||||||
text-decoration: none;
|
|
||||||
text-transform: capitalize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary table td {
|
|
||||||
background-color: #3498db;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary a {
|
|
||||||
background-color: #3498db;
|
|
||||||
border-color: #3498db;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.last {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.first {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.align-center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.align-right {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.align-left {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clear {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mt0 {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mb0 {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preheader {
|
|
||||||
color: transparent;
|
|
||||||
display: none;
|
|
||||||
height: 0;
|
|
||||||
max-height: 0;
|
|
||||||
max-width: 0;
|
|
||||||
opacity: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
mso-hide: all;
|
|
||||||
visibility: hidden;
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.powered-by a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
border: 0;
|
|
||||||
border-bottom: 1px solid #f6f6f6;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 620px) {
|
|
||||||
table[class=body] h1 {
|
|
||||||
font-size: 28px !important;
|
|
||||||
margin-bottom: 10px !important;
|
|
||||||
}
|
|
||||||
table[class=body] p,
|
|
||||||
table[class=body] ul,
|
|
||||||
table[class=body] ol,
|
|
||||||
table[class=body] td,
|
|
||||||
table[class=body] span,
|
|
||||||
table[class=body] a {
|
|
||||||
font-size: 16px !important;
|
|
||||||
}
|
|
||||||
table[class=body] .wrapper,
|
|
||||||
table[class=body] .article {
|
|
||||||
padding: 10px !important;
|
|
||||||
}
|
|
||||||
table[class=body] .content {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
table[class=body] .container {
|
|
||||||
padding: 0 !important;
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .main {
|
|
||||||
border-left-width: 0 !important;
|
|
||||||
border-radius: 0 !important;
|
|
||||||
border-right-width: 0 !important;
|
|
||||||
}
|
|
||||||
table[class=body] .btn table {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .btn a {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .img-responsive {
|
|
||||||
height: auto !important;
|
|
||||||
max-width: 100% !important;
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all {
|
|
||||||
.ExternalClass {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.ExternalClass,
|
|
||||||
.ExternalClass p,
|
|
||||||
.ExternalClass span,
|
|
||||||
.ExternalClass font,
|
|
||||||
.ExternalClass td,
|
|
||||||
.ExternalClass div {
|
|
||||||
line-height: 100%;
|
|
||||||
}
|
|
||||||
.apple-link a {
|
|
||||||
color: inherit !important;
|
|
||||||
font-family: inherit !important;
|
|
||||||
font-size: inherit !important;
|
|
||||||
font-weight: inherit !important;
|
|
||||||
line-height: inherit !important;
|
|
||||||
text-decoration: none !important;
|
|
||||||
}
|
|
||||||
#MessageViewBody a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: inherit;
|
|
||||||
font-family: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
.btn-primary table td:hover {
|
|
||||||
background-color: #34495e !important;
|
|
||||||
}
|
|
||||||
.btn-primary a:hover {
|
|
||||||
background-color: #34495e !important;
|
|
||||||
border-color: #34495e !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="">
|
<body>
|
||||||
<span class="preheader">This is preheader text. Some clients will show this text as a preview.</span>
|
<span class="preheader" style="display: none">%%PREHEADER%%</span>
|
||||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body">
|
<div class="container" style="background-color: #afafaf">
|
||||||
<tr>
|
<div class="header" style="background-color: #434343; height: 128px">
|
||||||
<td> </td>
|
<img style="float: left; height: 100%" src="https://4creative.net/images/4Creative-Logo-neu.png" alt="Logo">
|
||||||
<td class="container">
|
<h2 style="vertical-align: middle">%%EchoTitle%%</h2>
|
||||||
<div class="content">
|
</div>
|
||||||
<table role="presentation" class="main">
|
<div class="content" style="background-color: #fff">
|
||||||
<tr>
|
%%MESSAGE%%
|
||||||
<td class="wrapper">
|
|
||||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
%%EchoInhalt%%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div class="footer">
|
|
||||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td class="content-block powered-by">
|
|
||||||
Powered by <a href="http://htmlemail.io">HTMLemail</a>.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -0,0 +1,66 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<title>Neues Password festlegen</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/bootstrap/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/animate/animate.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/css-hamburgers/hamburgers.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/animsition/css/animsition.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/select2/select2.min.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/vendor/daterangepicker/daterangepicker.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/css/util.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="./style/login/css/main.css">
|
||||||
|
<link href="./style/4Creative.ico" rel="icon">
|
||||||
|
<link href="./style/4Creative.ico" rel="apple-touch-icon">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="limiter">
|
||||||
|
<div class="container-login100">
|
||||||
|
<div class="wrap-login100 p-t-50 p-b-90">
|
||||||
|
<form class="login100-form validate-form flex-sb flex-w" action="index.php?page=forgot-request" method="post">
|
||||||
|
<span class="login100-form-title p-b-51">
|
||||||
|
Neues Passwort festlegen
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="flex-sb-m w-full p-t-3 p-b-24" style="color: red;">
|
||||||
|
%%MESSAGE%%
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wrap-input100 validate-input m-b-16" data-validate="Bitte gib dein neues Passwort ein">
|
||||||
|
<input class="input100" type="password" name="password" placeholder="Passwort">
|
||||||
|
<span class="focus-input100"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wrap-input100 validate-input m-b-16" data-validate="Bitte gib das Passwort erneut ein">
|
||||||
|
<input class="input100" type="password" name="passwordRepeat" placeholder="Passwort wiederholen">
|
||||||
|
<span class="focus-input100"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-login100-form-btn m-t-17">
|
||||||
|
%%CSRF%%
|
||||||
|
<input type="hidden" name="resetToken" value="%%RESET_TOKEN%%">
|
||||||
|
<button class="login100-form-btn" name="reset-password">
|
||||||
|
Passwort ändern
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="./style/login/vendor/jquery/jquery-3.2.1.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/animsition/js/animsition.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/bootstrap/js/popper.js"></script>
|
||||||
|
<script src="./style/login/vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/select2/select2.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/daterangepicker/moment.min.js"></script>
|
||||||
|
<script src="./style/login/vendor/daterangepicker/daterangepicker.js"></script>
|
||||||
|
<script src="./style/login/vendor/countdowntime/countdowntime.js"></script>
|
||||||
|
<script src="./style/login/js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue