Cleaned up code
This commit is contained in:
20
login.php
20
login.php
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
include("includes/login-post.php");
|
||||
|
||||
|
||||
// check to see if user is logging out
|
||||
if(isset($_GET['out'])) {
|
||||
// destroy session
|
||||
@ -9,7 +9,7 @@ if(isset($_GET['out'])) {
|
||||
unset($_SESSION['uname'],$_SESSION['access']);
|
||||
session_destroy();
|
||||
}
|
||||
|
||||
|
||||
// check to see if login form has been submitted
|
||||
if(isset($_POST['userLogin'])){
|
||||
// run information through authenticator
|
||||
@ -23,10 +23,10 @@ if(isset($_POST['userLogin'])){
|
||||
$error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// output error to user
|
||||
if (isset($error)) echo "Login failed: Incorrect user name, password, or rights<br /-->";
|
||||
|
||||
|
||||
// output logout success
|
||||
if (isset($_GET['out'])) echo "Logout successful";
|
||||
?>
|
||||
@ -36,13 +36,13 @@ if (isset($_GET['out'])) echo "Logout successful";
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<title>BMS Event Login</title>
|
||||
</head>
|
||||
<body>
|
||||
<body>
|
||||
<div class=header>
|
||||
<h1>Liquidweb BMS Events</h1>
|
||||
<h1>BMS Events</h1>
|
||||
<?php include("includes/menu.php"); ?>
|
||||
</div>
|
||||
<div class=content>
|
||||
<h2>Please Login with LDAP</h2>
|
||||
<h2>Please Login with LDAP</h2>
|
||||
<form action="login.php" method="post">
|
||||
<table align='center'>
|
||||
<tr>
|
||||
@ -52,7 +52,7 @@ if (isset($_GET['out'])) echo "Logout successful";
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Username:
|
||||
Username:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="userLogin" />
|
||||
@ -60,7 +60,7 @@ if (isset($_GET['out'])) echo "Logout successful";
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Password:
|
||||
Password:
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="userPassword" />
|
||||
@ -74,6 +74,6 @@ if (isset($_GET['out'])) echo "Logout successful";
|
||||
</table>
|
||||
</form>
|
||||
You will be returned to the main BMS status page after login.
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user