Deleted login.php, login.tpl, login.css
This commit is contained in:
parent
8a39c734fb
commit
5abb9d8713
3 changed files with 0 additions and 84 deletions
|
|
@ -1,37 +0,0 @@
|
|||
body {
|
||||
padding-top: 40px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.form-signin {
|
||||
max-width: 330px;
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.form-signin .form-signin-heading,
|
||||
|
||||
.form-signin .checkbox {
|
||||
font-weight: normal;
|
||||
}
|
||||
.form-signin .form-control {
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.form-signin .form-control:focus {
|
||||
z-index: 2;
|
||||
}
|
||||
.form-signin input[type="text"] {
|
||||
margin-bottom: -1px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.form-signin input[type="password"] {
|
||||
margin-bottom: 10px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
if (!defined('ONYX')) exit;
|
||||
|
||||
if (isset($_POST['username']) && isset($_POST['password']))
|
||||
{
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
|
||||
$bdd = new BDD();
|
||||
|
||||
// TODO: use function
|
||||
$bdd->escape($username);
|
||||
$bdd->escape($password);
|
||||
$hash = mdp($username, $password);
|
||||
$result = $bdd->unique_query("SELECT id, username, auth_level FROM users
|
||||
WHERE username='$username'
|
||||
AND password=unhex('$hash')");
|
||||
|
||||
if (!empty($result) && $result['auth_level'] != 0)
|
||||
{
|
||||
$SESS->level = $result["auth_level"];
|
||||
$SESS->values = $result;
|
||||
$SESS->put($result["id"]);
|
||||
header("Location: /home");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$page = "public/login";
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{extends file="layout-nav.tpl"}
|
||||
|
||||
{block name=head}
|
||||
<link href="css/login.css" rel="stylesheet">
|
||||
{/block}
|
||||
|
||||
{block name=content}
|
||||
|
||||
<div class="container">
|
||||
<form class="form-signin" method="post" action="login">
|
||||
<h3 class="form-signin-heading">{text file="login" path=title}</h3>
|
||||
<input name="username" type="text" class="form-control" placeholder="{text file="login" path=login}" autofocus>
|
||||
<input name="password" type="password" class="form-control" placeholder="{text file="login" path=password}">
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{text file="login" path=connect}</button>
|
||||
</form>
|
||||
</div> <!-- /container -->
|
||||
|
||||
{/block}
|
||||
Reference in a new issue