summaryrefslogtreecommitdiff
path: root/www/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/functions.php')
-rw-r--r--www/functions.php26
1 files changed, 23 insertions, 3 deletions
diff --git a/www/functions.php b/www/functions.php
index 56f11ad..188c3b1 100644
--- a/www/functions.php
+++ b/www/functions.php
@@ -58,7 +58,14 @@ function login(){
if($_SESSION["login"]){
header("Refresh: 0; /");
} else {
- echo $logout;
+ foreach ($_GET as $argument => $value) {
+ if(preg_match("/success/",$argument))
+ $logout="Successfull loged out!";
+ }
+
+ if($logout){
+ echo $logout;
+ }
echo "<form method='post' action='/login.php'>
<p>Name: <input type='text' name='username'></p>
@@ -67,6 +74,7 @@ function login(){
</form>";
}
}
+ exit;
}
/* --LOGOUT-- */
@@ -148,6 +156,7 @@ function invite(){
echo "END";
}
+ exit;
}
/* --REGISTER-- */
@@ -232,11 +241,22 @@ function register(){
</form>
";
}
+ exit;
}
/* --PAGE NOT FOUND - 404 -- */
-function 404(){
- echo "Sorry, page not found.";
+function get_404(){
+ echo "Sorry, page not found. <br>";
+ select();
+ exit;
}
+function select(){
+ $i = 0;
+ foreach ($_GET as $name => $value) { //value leer?
+ $args[$i] = $name;
+ echo 'Name: ' . $name . ' Value: ' . $value . '<br />';
+ $i++;
+ }
+}