Compare commits
7 Commits
990f5c93aa
...
master
Author | SHA1 | Date | |
---|---|---|---|
18321d86cd | |||
2b204b18f9 | |||
86deb3e49b | |||
320b0a4cfb | |||
b612188f45 | |||
9150eda7d6 | |||
d7c8f0932d |
50
auth.php
50
auth.php
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
$DATABASE_HOST = 'nerdcity.at';
|
||||
$DATABASE_USER = 'webstatus';
|
||||
$DATABASE_PASS = 'wPsCi548z6fKJB2u';
|
||||
$DATABASE_NAME = 'webstatus';
|
||||
|
||||
$con = mysqli_connect($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME);
|
||||
if ( mysqli_connect_errno() ) {
|
||||
exit('MySQl Connection failed with error: ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
if ( !isset($_POST['username'], $_POST['password']) ) {
|
||||
exit('Please fill both the username and password fields!');
|
||||
}
|
||||
|
||||
if ($stmt = $con->prepare('SELECT id, password FROM accounts WHERE username = ?')) {
|
||||
$stmt->bind_param('s', $_POST['username']);
|
||||
$stmt->execute();
|
||||
|
||||
$stmt->store_result();
|
||||
|
||||
if ($stmt->num_rows > 0) {
|
||||
$stmt->bind_result($id, $password);
|
||||
$stmt->fetch();
|
||||
|
||||
if (password_verify($_POST['password'], $password)) {
|
||||
session_regenerate_id();
|
||||
|
||||
$_SESSION['loggedin'] = TRUE;
|
||||
$_SESSION['name'] = $_POST['username'];
|
||||
$_SESSION['id'] = $id;
|
||||
|
||||
header("Location: admin.php");
|
||||
} else {
|
||||
//Incorrect Data
|
||||
echo 'Incorrect username and/or password!';
|
||||
}
|
||||
|
||||
} else {
|
||||
//Incorrect Data
|
||||
echo 'Incorrect username and/or password!';
|
||||
}
|
||||
|
||||
$stmt->close();
|
||||
}
|
||||
|
||||
|
||||
?>
|
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
$config=array(
|
||||
"DBHOST"=>"data2.thiemoo.at",
|
||||
"DBNAME"=>"webstatus",
|
||||
"DBPWD"=>"X5G3njgZ4s@E4S9J",
|
||||
"DBUSER"=>"webstatus"
|
||||
);
|
||||
?>
|
@@ -193,3 +193,29 @@
|
||||
margin: 2% auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* COOKIE BANNER */
|
||||
|
||||
@media screen and (max-width: 600px){
|
||||
.cookies {
|
||||
height: 160px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.cookies .text {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.cookies .cogs {
|
||||
position: absolute;
|
||||
top: 27%;
|
||||
left: 15px;
|
||||
font-size: 2em;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.cookies button {
|
||||
right: 39%;
|
||||
bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
@@ -672,7 +672,7 @@ label::after {
|
||||
|
||||
.cookies h1 {
|
||||
left: 0px;
|
||||
font-size: 1vw;
|
||||
font-size: 20px;
|
||||
color: white;
|
||||
margin-top: 25px;
|
||||
}
|
||||
@@ -684,7 +684,8 @@ label::after {
|
||||
|
||||
.cookies .text {
|
||||
position: absolute;
|
||||
left: 5%;
|
||||
left: 90px;
|
||||
width: 65%;
|
||||
}
|
||||
|
||||
.cookies button {
|
||||
|
@@ -66,7 +66,7 @@
|
||||
echo '
|
||||
<div class="global-status">
|
||||
<div id="status" class="status status-maintenance">
|
||||
<div class="loading fa fa-times">
|
||||
<div class="loading fa fa-cogs">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -78,7 +78,7 @@
|
||||
echo '
|
||||
<div class="global-status">
|
||||
<div id="status" class="status status-okay">
|
||||
<div class="loading fa fa-times">
|
||||
<div class="loading fa fa-check">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
Reference in New Issue
Block a user