| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,65 @@ |
| 1 |
+<?php |
|
| 2 |
+//Main Login Page |
|
| 3 |
+ |
|
| 4 |
+//Destroy any previous session data |
|
| 5 |
+//This way it requires a login |
|
| 6 |
+session_start(); |
|
| 7 |
+session_destroy(); |
|
| 8 |
+ |
|
| 9 |
+//get status |
|
| 10 |
+$status = $_GET['status']; |
|
| 11 |
+ |
|
| 12 |
+?> |
|
| 13 |
+ |
|
| 14 |
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
|
| 15 |
+<html> |
|
| 16 |
+<head> |
|
| 17 |
+ <title>Login</title> |
|
| 18 |
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
|
| 19 |
+ <link rel="stylesheet" href="./css/style.css" type="text/css" /> |
|
| 20 |
+</head> |
|
| 21 |
+<body> |
|
| 22 |
+<center> |
|
| 23 |
+<h1>Login</h1> |
|
| 24 |
+<img src="images/lock.png" border="0" alt="Please Login" title="Please Login" /> |
|
| 25 |
+<h3>Please login with your username and password.</h3> |
|
| 26 |
+<form action="login.php" method="POST"> |
|
| 27 |
+<table border="0"> |
|
| 28 |
+<tr><td class="right"> |
|
| 29 |
+Username:</td> |
|
| 30 |
+<td class="left"> |
|
| 31 |
+<input type="text" size="20" name="f_user"> |
|
| 32 |
+</td></tr> |
|
| 33 |
+<tr><td class="right"> |
|
| 34 |
+Password:</td> |
|
| 35 |
+<td class="left"> |
|
| 36 |
+<input type="password" size="20" name="f_pass"> |
|
| 37 |
+</td></tr> |
|
| 38 |
+<tr><td></td><td class="left"> |
|
| 39 |
+<input type="submit" name="LogIn" value="Log In"> |
|
| 40 |
+</td></tr> |
|
| 41 |
+</table> |
|
| 42 |
+<?php |
|
| 43 |
+//Display legal stuff if file exists |
|
| 44 |
+if (file_exists("legalterms.txt"))
|
|
| 45 |
+ echo "<br><input type=\"checkbox\" name=\"legalterms\"> I agree to the <a href=\"legalterms.txt\">use policy and terms of service.</a>"; |
|
| 46 |
+else //display hidden value, needed so that login.php can check the value |
|
| 47 |
+ echo "<input type=\"hidden\" name=\"legalterms\" value=\"on\">"; |
|
| 48 |
+ |
|
| 49 |
+if ($status == "error") |
|
| 50 |
+echo "<p class=\"error\">Error, username or password is incorrect.<br>Entries are cAsESEnsITiVE, do you have your capslock key on?...</p>"; |
|
| 51 |
+if ($status == "session") |
|
| 52 |
+echo "<p class=\"error\">Your session has timed out, please re-login.</p>"; |
|
| 53 |
+if ($status == "logout") |
|
| 54 |
+echo "<p class=\"success\">You have successfully logged out.</p>"; |
|
| 55 |
+if ($status == "indexlogin") |
|
| 56 |
+echo "<p class=\"error\">Error, this tracker requires a username and password in order to view the main page.</p>"; |
|
| 57 |
+if ($status == "legalterms") |
|
| 58 |
+echo "<p class=\"error\">You need to agree to the use policy and terms of service in order to log in.</p>"; |
|
| 59 |
+?> |
|
| 60 |
+</form> |
|
| 61 |
+<br> |
|
| 62 |
+<a href="index.php"><img src="images/stats.png" border="0" class="icon" alt="Tracker Statistics" title="Tracker Statistics" /></a><a href="index.php">Tracker Statistics</a><br> |
|
| 63 |
+</center> |
|
| 64 |
+</body> |
|
| 65 |
+</html> |