-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
42 lines (36 loc) · 1.05 KB
/
Copy pathindex.php
File metadata and controls
42 lines (36 loc) · 1.05 KB
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
<?php
// Initialize.
require_once __DIR__ . '/lib/config.php';
// Login.
if (isset($_POST['user']) && isset($_POST['pass'])) {
login();
}
// Get error message.
if (isset($_GET['error'])) {
$error = $_GET['error'];
}
// Try autologin.
if (autologin()) {
header("Location: games.php?time=session");
exit();
}
// Login form.
?>
<body>
<div class="container">
<img class="logo" width=200 height=200 src="/styles/wc1020logo.jpg">
</div>
<?php if (!empty($error)) echo '<p class="error">' . $error . '</p>'; ?>
<form method="post">
<div class="container loginform">
<label>User <input type="text" name="user"></label><br>
<label>Pass <input type="password" name="pass"></label><br>
<div class="footer">
<button class="button xl" type="submit">Login</button>
<a class="button" href="./games.php?time=session">Nur schaun</a>
</div>
</div>
</form>
</body>
</html>
<?php