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"
|
|
||||||
);
|
|
||||||
?>
|
|
@@ -42,21 +42,21 @@
|
|||||||
.status {
|
.status {
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 457px) {
|
@media only screen and (max-width: 457px) {
|
||||||
.status {
|
.status {
|
||||||
max-width: 75%;
|
max-width: 75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-text {
|
.status-text {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
.status-time {
|
.status-time {
|
||||||
margin-top: 2.5px;
|
margin-top: 2.5px;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,11 +130,11 @@
|
|||||||
margin-left: -60px;
|
margin-left: -60px;
|
||||||
margin-top: -130px;
|
margin-top: -130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline {
|
.timeline {
|
||||||
margin-top: 150px;
|
margin-top: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-info {
|
.timeline-info {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-left: -33px;
|
margin-left: -33px;
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
margin-left: -69px;
|
margin-left: -69px;
|
||||||
margin-top: -76px;
|
margin-top: -76px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vertical {
|
.vertical {
|
||||||
grid-gap: 3px;
|
grid-gap: 3px;
|
||||||
grid-template-columns: 33% 33% 33% 33% 33% 33% 33%;
|
grid-template-columns: 33% 33% 33% 33% 33% 33% 33%;
|
||||||
@@ -193,3 +193,29 @@
|
|||||||
margin: 2% auto;
|
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 {
|
.cookies h1 {
|
||||||
left: 0px;
|
left: 0px;
|
||||||
font-size: 1vw;
|
font-size: 20px;
|
||||||
color: white;
|
color: white;
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
}
|
}
|
||||||
@@ -684,7 +684,8 @@ label::after {
|
|||||||
|
|
||||||
.cookies .text {
|
.cookies .text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 5%;
|
left: 90px;
|
||||||
|
width: 65%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cookies button {
|
.cookies button {
|
||||||
|
@@ -66,7 +66,7 @@
|
|||||||
echo '
|
echo '
|
||||||
<div class="global-status">
|
<div class="global-status">
|
||||||
<div id="status" class="status status-maintenance">
|
<div id="status" class="status status-maintenance">
|
||||||
<div class="loading fa fa-times">
|
<div class="loading fa fa-cogs">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
echo '
|
echo '
|
||||||
<div class="global-status">
|
<div class="global-status">
|
||||||
<div id="status" class="status status-okay">
|
<div id="status" class="status status-okay">
|
||||||
<div class="loading fa fa-times">
|
<div class="loading fa fa-check">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
Reference in New Issue
Block a user