summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwww/include.php2
-rwxr-xr-xwww/index.php8
-rwxr-xr-xwww/login.php5
3 files changed, 9 insertions, 6 deletions
diff --git a/www/include.php b/www/include.php
index fdaf738..3a79919 100755
--- a/www/include.php
+++ b/www/include.php
@@ -14,3 +14,5 @@ require_once($func_dir . "func_select.php"); // get the primary key from the la
require_once($func_dir . "func_user.php"); // gets the userid and account specific stuff
require_once($func_dir . "func_content.php"); // get the vfs content
+require_once("login.php");
+
diff --git a/www/index.php b/www/index.php
index 79c7949..75a32f3 100755
--- a/www/index.php
+++ b/www/index.php
@@ -33,7 +33,7 @@ if(empty($_GET)){
print_login($var);
}
} else {
- print_login(EMPTY);
+ print_login(constant("EMPTY"));
}
break;
@@ -48,7 +48,7 @@ if(empty($_GET)){
case("invite"):
if(!$_SESSION["login"]){
- print_login(EMPTY);
+ print_login(constant("EMPTY"));
}
if($_SERVER['REQUEST_METHOD'] == 'POST'){
@@ -59,7 +59,7 @@ if(empty($_GET)){
print_invite($var);
}
} else {
- print_login(EMPTY);
+ print_login(constant("EMPTY"));
}
break;
@@ -72,7 +72,7 @@ if(empty($_GET)){
print_register($var);
}
} else {
- print_register(EMPTY);
+ print_register(constant("EMPTY"));
}
break;
diff --git a/www/login.php b/www/login.php
index a9f6f70..4d7ed6b 100755
--- a/www/login.php
+++ b/www/login.php
@@ -22,7 +22,8 @@ function print_login($case){
include("static/header.html");
$username = isset($_POST['username']) ? $_POST['username'] : "";
-
+ $message = "";
+
switch($case){
case(LOGIN_PASSWORD):
$message = '<h1 id="login-error"> Invalid username or password </h1>
@@ -42,7 +43,7 @@ function print_login($case){
<div class="login-area">
<h1 class="login-area"> Log in </h1>
<div class="login-area" id="login-info-bar">'
- .isset($message)? $message : "".
+ .$message.
'</div>
<form id="login-form" method="post" action="/login">
<input type="text" placeholder="username" name="username" id="username-input" class="login-input" value="'. $username .'" required>