This repository has been archived by the owner on May 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
login.php
140 lines (118 loc) · 5.3 KB
/
login.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
include_once "include/MessageCookie.php";
$login_msg = MessageCookie::getMsg("login");
$register_msg = MessageCookie::getMsg("register");
include_once "include/SessionManager.php";
$user = SessionManager::get();
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Home - Much Assembly Required</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--[if lte IE 8]>
<script src="assets/js/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" href="assets/css/main.min.css"/>
<!--[if lte IE 8]>
<link rel="stylesheet" href="assets/css/ie8.min.css"/><![endif]-->
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div id="page-wrapper">
<!-- Nav -->
<nav id="nav">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="servers.php">Play</a></li>
<li><a href="leaderboard.php">Leaderboard</a></li>
<li class="current">
<a href="#">Account</a>
<ul>
<?php if ($user) { ?>
<li><a href="account.php"><?php echo $user["username"] ?></a></li>
<li><a href="logout.re.php">Logout</a></li>
<?php } else { ?>
<li><a href="login.php">login</a></li>
<?php } ?>
</ul>
</li>
</ul>
</nav>
<div id="main" class="container">
<div class="row 200%">
<div class="12u">
<!-- Login -->
<section id="login">
<div class="container">
<h3>Login</h3>
<?php
if ($login_msg) {
echo "<span style='color:#ff4943'>" . $login_msg . "</span></div>";
}
?>
<form method="post" action="auth.re.php">
<div class="row uniform">
<div class="6u 12u(xsmall)"><input type="text" name="username" id="username"
placeholder="Username"/></div>
<div class="6u 12u(xsmall)"><input type="password" name="password" id="password"
placeholder="Password"/></div>
</div>
<div class="row uniform">
<div class="12u">
<ul class="actions">
<li><input type="submit" class="special" value="Login"/></li>
</ul>
</div>
</div>
</form>
</div>
</section>
<hr>
<!-- Register -->
<section id="register">
<div class="container">
<h3>Register</h3>
<?php
if ($register_msg) {
echo "<span style='color:#ff4943'>" . $register_msg . "</span></div>";
}
?>
<form method="post" action="register.re.php">
<div class="row uniform">
<div class="9u 12u(xsmall)"><input type="email" name="email" id="email"
placeholder="Email (Optional)"/></div>
</div>
<div class="row uniform">
<div class="6u 12u(xsmall)"><input type="text" name="username" id="username"
placeholder="Username"/></div>
<div class="6u 12u(xsmall)"><input type="password" name="password" id="password"
placeholder="Password"/></div>
</div>
<div class="row uniform">
<div class="12u">
<ul class="actions">
<li><input type="submit" class="special" value="Register"/></li>
<li><input type="reset" value="Reset Form"/></li>
</ul>
</div>
</div>
</form>
</div>
</section>
</div>
</div>
<?php include "footer.inc.html" ?>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.dropotron.min.js"></script>
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/util.min.js"></script>
<!--[if lte IE 8]>
<script src="assets/js/ie/respond.min.js"></script><![endif]-->
<script src="assets/js/main.min.js"></script>
</body>
</html>