summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorroot2014-02-17 20:37:28 +0100
committerroot2014-02-17 20:37:28 +0100
commitc9a809f723581e655d4224b15255badf1f7f3ec8 (patch)
tree1dfaa4974e01e4882d6efbe8bde0cadc36d102f3 /www
parent5b9069e5d3f77f0148e1c867a14f9e1d44c229d4 (diff)
downloadfiles.iamfabulous.de-c9a809f723581e655d4224b15255badf1f7f3ec8.tar.gz
added session to index
Diffstat (limited to 'www')
-rw-r--r--www/files.php20
-rw-r--r--www/index.php6
2 files changed, 6 insertions, 20 deletions
diff --git a/www/files.php b/www/files.php
deleted file mode 100644
index 76c6b72..0000000
--- a/www/files.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?
-
-#print_r($_GET);
-#$ar =array($_GET);
-#echo "<br> ";
-#echo $ar[0];
-#echo "<br> ";
-
-if(!isset($_GET)){
- header("Refresh: 0; /login");
-}
-
-foreach ($_GET as $name => $value) { //value leer?
- echo 'Name: ' . $name . ' Value: ' . $value . '<br />';
-}
-
-echo "Ende";
-
-#header("Refresh: 0; /login");
-
diff --git a/www/index.php b/www/index.php
index 99c1c85..b05b565 100644
--- a/www/index.php
+++ b/www/index.php
@@ -5,6 +5,12 @@ session_start();
echo $_GET[name];
echo $_GET[folder];
+if($_SESSION["login"] && $_GET["name"] != $_SESSION["username"]){
+ header("Refresh: 0; /$_SESSION[username]");
+ exit;
+}
+
+
echo "<br><br>Currently loged in as: ";
echo $_SESSION["username"];