-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
53 lines (48 loc) · 996 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
include 'misc/opendb.php';
$error = "";
session_start();
if(isset($_SESSION['name'])){
include "main.php";
die();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Torn City</title>
<style type="text/css">
.wrapper {
height: -webkit-fill-available;
display: flex;
justify-content: center;
align-items: center;
}
form#Login {
width: 260px;
display: grid;
grid-auto-rows: 1fr;
grid-gap: 6px;
}
form#Login > * {
line-height: 24px;
text-align: center;
}
span#Error {
font-size: 16px;
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<div class="wrapper">
<form id="Login" action="login.php" method="POST">
<span id="Error"><?php if(isset($_SESSION['error'])) echo $_SESSION['error']; ?></span>
<input type="text" name="username" placeholder="Username/Email">
<input type="password" name="password" placeholder="Password">
<input type="submit" name="submit" value="Login">
</form>
</div>
</body>
</html>