forked from Fchaubard/WolfPack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
68 lines (51 loc) · 1.4 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
<?php
if(file_exists("./formatting/header.php")){
include "./formatting/header.php";
}
?>
<body>
<div data-role="page">
<div data-role="header">
<h1>Log in</h1>
<a href="#" data-icon="check" id="logout" class="ui-btn-right">Logout</a>
</div><!-- /header -->
<div data-role="content">
<center><img width=100% src="images/fbicon.png"></center>
<form action="iAmHungryPage.php" method="post">
<label for="foo">Username:</label>
<input type="text" name="username" id="foo">
<label for="bar">Password:</label>
<input type="password" name="password" id="bar">
<input type="submit" value="Login">
</form>
<form action="signup.php" method="get">
<input type="submit" value="Sign Up for a WolfPack Account">
</form>
<div data-role="fieldcontain">
</div>
<div id="info">
<p>Thank you for logging. You should be able to see all sorts of user information here.</p>
</div>
</div><!-- /content -->
<!-- No Footer
<?php include("footer_menu.php") ?>
-->
<script type="text/javascript">
$("#logout").hide();
$("#info").hide();
var retrievedObject = localStorage.getItem('username');
if (retrievedObject == "test") {
$("#form").hide();
$("#logout").show();
$("#info").show();
}
$("#logout").click(function() {
localStorage.removeItem('username');
$("#form").show();
$("#logout").hide();
$("#info").hide();
});
</script>
</div><!-- /page -->
</body>
</html>