reformat login

This commit is contained in:
Christopher 2020-10-23 23:12:36 +02:00
parent 2691a5a881
commit 93e1662f65
3 changed files with 127 additions and 81 deletions

47
pages/login.php Normal file
View File

@ -0,0 +1,47 @@
<?php
$HTML = new HTML();
$HTML->setHTMLTitle("Login");
$HTML->importHTML("style/default/login.html");
if(isset($_POST['login']))
{
if(!isset($_POST['username']) || !isset($_POST['password']))
{
$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", "Bitte gebe Benutzername und Passwort an.");
}else{
$statement = $RUNTIME['PDO']->prepare("SELECT * FROM users WHERE username = ? LIMIT 1");
$statement->execute(array(trim($_POST['username'])));
while($row = $statement->fetch())
{
if(md5($_POST['password']) == $row['password'])
{
$_SESSION['USERNAME'] = $row['username'];
$_SESSION['DISPLAYNAME'] = strtoupper($row['username']);
$_SESSION['PREAUTH'] = 'true';
//$_SESSION['LOGIN'] = 'true';
include "pages/2faktor-login.php";
die();
}
}
$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", "Benutzername oder Passwort falsch.");
}
}
if(isset($_REQUEST['2fakey']))
{
include "pages/2faktor-login.php";
die();
}
if(file_exists("./pages/".@$_REQUEST['page'].".php"))
$HTML->ReplaceLayoutInhalt("%%PAGENAME%%", @$_REQUEST['page']);
$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", "");
$HTML->build();
echo $HTML->ausgabe();
?>

View File

@ -1,81 +0,0 @@
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>SICOMAN - %%EchoTitle%%</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="./style/default/img/favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,700,900" rel="stylesheet">
<link rel="stylesheet" href="./style/default/css/bootstrap.min.css">
<link rel="stylesheet" href="./style/default/css/font-awesome.min.css">
<link rel="stylesheet" href="./style/default/css/owl.carousel.css">
<link rel="stylesheet" href="./style/default/css/owl.theme.css">
<link rel="stylesheet" href="./style/default/css/owl.transitions.css">
<link rel="stylesheet" href="./style/default/css/animate.css">
<link rel="stylesheet" href="./style/default/css/normalize.css">
<link rel="stylesheet" href="./style/default/css/scrollbar/jquery.mCustomScrollbar.min.css">
<link rel="stylesheet" href="./style/default/css/wave/waves.min.css">
<link rel="stylesheet" href="./style/default/css/notika-custom-icon.css">
<link rel="stylesheet" href="./style/default/css/main.css">
<link rel="stylesheet" href="./style/default/style.css">
<link rel="stylesheet" href="./style/default/css/responsive.css">
<script src="./style/default/js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<div class="login-content">
<div class="nk-block toggled" id="l-login">
<div class="nk-form">
<div class="input-group">
<span class="input-group-addon nk-ic-st-pro"><i class="notika-icon notika-support"></i></span>
<div class="nk-int-st">
<input type="text" class="form-control" placeholder="Username">
</div>
</div>
<div class="input-group mg-t-15">
<span class="input-group-addon nk-ic-st-pro"><i class="notika-icon notika-edit"></i></span>
<div class="nk-int-st">
<input type="password" class="form-control" placeholder="Password">
</div>
</div>
<div class="fm-checkbox">
<label><input type="checkbox" class="i-checks"> <i></i> Keep me signed in</label>
</div>
<a href="#l-register" data-ma-action="nk-login-switch" data-ma-block="#l-register" class="btn btn-login btn-success btn-float"><i class="notika-icon notika-right-arrow right-arrow-ant"></i></a>
</div>
</div>
</div>
<script src="./style/default/js/vendor/jquery-1.12.4.min.js"></script>
<script src="./style/default/js/bootstrap.min.js"></script>
<script src="./style/default/js/wow.min.js"></script>
<script src="./style/default/js/jquery-price-slider.js"></script>
<script src="./style/default/js/owl.carousel.min.js"></script>
<script src="./style/default/js/jquery.scrollUp.min.js"></script>
<script src="./style/default/js/meanmenu/jquery.meanmenu.js"></script>
<script src="./style/default/js/counterup/jquery.counterup.min.js"></script>
<script src="./style/default/js/counterup/waypoints.min.js"></script>
<script src="./style/default/js/counterup/counterup-active.js"></script>
<script src="./style/default/js/scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="./style/default/js/sparkline/jquery.sparkline.min.js"></script>
<script src="./style/default/js/sparkline/sparkline-active.js"></script>
<script src="./style/default/js/flot/jquery.flot.js"></script>
<script src="./style/default/js/flot/jquery.flot.resize.js"></script>
<script src="./style/default/js/flot/flot-active.js"></script>
<script src="./style/default/js/knob/jquery.knob.js"></script>
<script src="./style/default/js/knob/jquery.appear.js"></script>
<script src="./style/default/js/knob/knob-active.js"></script>
<script src="./style/default/js/chat/jquery.chat.js"></script>
<script src="./style/default/js/wave/waves.min.js"></script>
<script src="./style/default/js/wave/wave-active.js"></script>
<script src="./style/default/js/icheck/icheck.min.js"></script>
<script src="./style/default/js/icheck/icheck-active.js"></script>
<script src="./style/default/js/todo/jquery.todo.js"></script>
<script src="./style/default/js/login/login-action.js"></script>
<script src="./style/default/js/plugins.js"></script>
<script src="./style/default/js/main.js"></script>
</body>
</html>

80
style/default/login.html Normal file
View File

@ -0,0 +1,80 @@
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>SICOMAN - %%EchoTitle%%</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="./style/default/img/favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,700,900" rel="stylesheet">
<link rel="stylesheet" href="./style/default/css/bootstrap.min.css">
<link rel="stylesheet" href="./style/default/css/font-awesome.min.css">
<link rel="stylesheet" href="./style/default/css/owl.carousel.css">
<link rel="stylesheet" href="./style/default/css/owl.theme.css">
<link rel="stylesheet" href="./style/default/css/owl.transitions.css">
<link rel="stylesheet" href="./style/default/css/animate.css">
<link rel="stylesheet" href="./style/default/css/normalize.css">
<link rel="stylesheet" href="./style/default/css/scrollbar/jquery.mCustomScrollbar.min.css">
<link rel="stylesheet" href="./style/default/css/wave/waves.min.css">
<link rel="stylesheet" href="./style/default/css/notika-custom-icon.css">
<link rel="stylesheet" href="./style/default/css/main.css">
<link rel="stylesheet" href="./style/default/style.css">
<link rel="stylesheet" href="./style/default/css/responsive.css">
<script src="./style/default/js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<form method="post" action="index.php?page=login" enctype="multipart/form-data">
<div class="login-content">
<div class="nk-block toggled" id="l-login">
<div class="nk-form">
<div class="input-group">
<span class="input-group-addon nk-ic-st-pro"><i class="notika-icon notika-support"></i></span>
<div class="nk-int-st">
<input type="text" class="form-control" name="containername" placeholder="Container Name">
</div>
</div>
<div class="input-group mg-t-15">
<span class="input-group-addon nk-ic-st-pro"><i class="notika-icon notika-edit"></i></span>
<div class="nk-int-st">
<input type="password" class="form-control" name="accesskey" placeholder="Access Key">
</div>
</div>
<div class="fm-checkbox">
<label><input type="checkbox" class="i-checks"> <i></i> Keep me signed in</label>
</div>
<a href="#l-register" data-ma-action="nk-login-switch" data-ma-block="#l-register" class="btn btn-login btn-success btn-float"><i class="notika-icon notika-right-arrow right-arrow-ant"></i></a>
</div>
</div>
</div>
</form>
<script src="./style/default/js/vendor/jquery-1.12.4.min.js"></script>
<script src="./style/default/js/bootstrap.min.js"></script>
<script src="./style/default/js/wow.min.js"></script>
<script src="./style/default/js/jquery-price-slider.js"></script>
<script src="./style/default/js/owl.carousel.min.js"></script>
<script src="./style/default/js/jquery.scrollUp.min.js"></script>
<script src="./style/default/js/meanmenu/jquery.meanmenu.js"></script>
<script src="./style/default/js/counterup/jquery.counterup.min.js"></script>
<script src="./style/default/js/counterup/waypoints.min.js"></script>
<script src="./style/default/js/counterup/counterup-active.js"></script>
<script src="./style/default/js/scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="./style/default/js/sparkline/jquery.sparkline.min.js"></script>
<script src="./style/default/js/sparkline/sparkline-active.js"></script>
<script src="./style/default/js/flot/jquery.flot.js"></script>
<script src="./style/default/js/flot/jquery.flot.resize.js"></script>
<script src="./style/default/js/flot/flot-active.js"></script>
<script src="./style/default/js/knob/jquery.knob.js"></script>
<script src="./style/default/js/knob/jquery.appear.js"></script>
<script src="./style/default/js/knob/knob-active.js"></script>
<script src="./style/default/js/chat/jquery.chat.js"></script>
<script src="./style/default/js/wave/waves.min.js"></script>
<script src="./style/default/js/wave/wave-active.js"></script>
<script src="./style/default/js/icheck/icheck.min.js"></script>
<script src="./style/default/js/icheck/icheck-active.js"></script>
<script src="./style/default/js/todo/jquery.todo.js"></script>
<script src="./style/default/js/login/login-action.js"></script>
<script src="./style/default/js/plugins.js"></script>
<script src="./style/default/js/main.js"></script>
</body>
</html>