summaryrefslogtreecommitdiff
path: root/www/login.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/login.php')
-rw-r--r--www/login.php25
1 files changed, 17 insertions, 8 deletions
diff --git a/www/login.php b/www/login.php
index 8534887..df50166 100644
--- a/www/login.php
+++ b/www/login.php
@@ -17,17 +17,26 @@
<link rel="stylesheet" type="text/css" href="static/login.css">
<div class="login-area">
- <h1 class="login-area"> Log in </h1>
- <?php if(isset($_GET['reason']) && $_GET['reason'] == 'failure' && isset($_GET['username'])){
- echo '<h1 id="login-error"> Invalid username or password </h1>';
- }elseif(isset($_GET['reason']) && $_GET['reason'] == 'logout'){
- echo '<h1 id="logout-message"> Sucessfully logged out.</h1>';
- }?>
+ <div class="login-area" id="login-top-bar">
+ <h1 class="login-area"> Log in </h1>
+ <?php if(isset($_GET['reason']) && $_GET['reason'] == 'failure' && isset($_GET['username'])){
+ echo '<h1 id="login-error"> Invalid username or password </h1>
+ ';
+ }elseif(isset($_GET['reason']) && $_GET['reason'] == 'logout'){
+ echo '<h1 id="logout-message"> Sucessfully logged out.</h1>
+ ';
+ }elseif(isset($_GET['reason']) && $_GET['reason'] == 'database'){
+ echo '<h1 id="login-error"> Internal Error. Please contact admin</h1>
+ ';
+ }?>
+ </div>
<form id="login-form" method='post' action='/login'>
<?php if(isset($_GET['reason']) && $_GET['reason'] == 'failure' && isset($_GET['username'])){
- echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" value="'.$_GET['username'].'"required>';
+ echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" value="'.$_GET['username'].'"required>
+ ';
}else{
- echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" required>';
+ echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" required>
+ ';
}?>
<input type="password" placeholder="password" name="password" id="password-input" class="login-input" required>