From 09d24a3f321476ecdbbf10156fe724343a7d4084 Mon Sep 17 00:00:00 2001 From: oweissbarth Date: Fri, 14 Mar 2014 20:31:13 +0100 Subject: Removed more warnings. Added and reorganized inline docs. Every file should have a small header explaining what the file does and what the paramerters are. --- www/createfolder.php | 4 ++-- www/httperror.php | 26 ++++++++++++++------------ www/index.php | 2 +- www/invite.php | 18 +++++++++++++++++- www/login.php | 24 +++++++++++++++--------- www/register.php | 34 ++++++++++++++++++++++++++-------- 6 files changed, 75 insertions(+), 33 deletions(-) (limited to 'www') diff --git a/www/createfolder.php b/www/createfolder.php index 64d99a4..bdba626 100755 --- a/www/createfolder.php +++ b/www/createfolder.php @@ -2,7 +2,7 @@ session_start(); -if(!$_SESSION["login"]){ +if(!isset($_SESSION["login"])){ header("Refresh: 0; /login"); exit; } @@ -59,7 +59,7 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ database_error(); } } else { - $primary_key_db = $db->query("SELECT id FROM files WHERE name='" . $pwd . "';"); + $primary_key_db = $db->query("SELECT id FROM files WHERE name='".$pwd."';"); //TODO That doesn't make any sense to me at all! $primary_key_ar = $primary_key_db->fetchArray(SQLITE3_NUM); $primary_key = $primary_key_ar[0]; if($db->exec(" diff --git a/www/httperror.php b/www/httperror.php index a51e98d..d96f5c2 100755 --- a/www/httperror.php +++ b/www/httperror.php @@ -1,17 +1,19 @@ diff --git a/www/index.php b/www/index.php index f07a8d7..25a63e4 100755 --- a/www/index.php +++ b/www/index.php @@ -8,7 +8,7 @@ $db = new SQLite3("../database/sqlite.db"); if(empty($_GET)){ - if(!$_SESSION["login"]){ + if(!isset($_SESSION["login"])){ header("Refresh: 0; /login"); exit; } else { diff --git a/www/invite.php b/www/invite.php index 8eb721d..02f1617 100755 --- a/www/invite.php +++ b/www/invite.php @@ -1,4 +1,20 @@ - + diff --git a/www/login.php b/www/login.php index c2847b3..3207703 100755 --- a/www/login.php +++ b/www/login.php @@ -1,13 +1,19 @@ diff --git a/www/register.php b/www/register.php index 07f1535..71bd87b 100755 --- a/www/register.php +++ b/www/register.php @@ -1,14 +1,32 @@ -- cgit v1.2.3