From bde71668e1b64f57e4cd3d45703e8a488b1de957 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Sep 2014 00:12:01 +0200 Subject: improvements --- .gitignore | 12 ++++++++++++ action.php | 3 ++- class/.user.php.swp | Bin 12288 -> 0 bytes class/user.php | 4 ++-- functions.php | 12 +++++++++--- index.php | 4 ++-- setup.php | 13 ------------- static/footer.php | 3 +-- 8 files changed, 28 insertions(+), 23 deletions(-) create mode 100644 .gitignore delete mode 100644 class/.user.php.swp delete mode 100755 setup.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..af2efef --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*~ +*.save +*-journal +*.db +*.sqlite +*.swp + +_setup.php +piwik.html +favicon.ico + +tmp/ diff --git a/action.php b/action.php index a52d471..6af6fe6 100644 --- a/action.php +++ b/action.php @@ -115,7 +115,8 @@ switch($_GET["task"]){ if ( $result = $db->doQuery($sql) ){ header($_SERVER["SERVER_PROTOCOL"] . " 302 Moved"); header("Location: /?page=" . $_GET["goto"]); - $c->flush($_GET["_flush"]); + //$c->flush($_GET["_flush"]); + $c->flush(); } break; case("account"): diff --git a/class/.user.php.swp b/class/.user.php.swp deleted file mode 100644 index 3864e3f..0000000 Binary files a/class/.user.php.swp and /dev/null differ diff --git a/class/user.php b/class/user.php index 969d734..1e3bfb3 100644 --- a/class/user.php +++ b/class/user.php @@ -110,8 +110,8 @@ class jg { public function logout(){ # no session active, so return false - if ( session_status() != PHP_SESSION_ACTIVE ) - return false; + //if ( session_status() != PHP_SESSION_ACTIVE ) + // return false; # set login to false $this->login = false; diff --git a/functions.php b/functions.php index 3e937d2..659241a 100644 --- a/functions.php +++ b/functions.php @@ -111,6 +111,10 @@ else function print_logout(){ global $user; $user->logout(); + /* + global $c; + $c->flush(); + */ print_login("logout"); } @@ -128,12 +132,14 @@ function print_index(){

Wir treffen uns immer Donnerstags um 19:30 Uhr in der Remise Arndtstraße 12a.

Am besten sind wir über unsere Aktiviere JavaScript um die E-Mail Adresse zu sehen! erreichbar.

+ doQuery("SELECT * FROM " . DBPREFIX . "member;"); ?> @@ -186,7 +192,7 @@ function print_list($option = false){ -
+ token; ?>>
@@ -257,7 +263,7 @@ function print_add_entry_to_list(){

Füge die Daten hinzu

-
+
@@ -397,7 +403,7 @@ function print_register($option = false){
- + Du solltest den Schlüssel in einer Mail bekommen haben.
diff --git a/index.php b/index.php index 21cbda7..3a5a4df 100644 --- a/index.php +++ b/index.php @@ -17,7 +17,7 @@ if ( isset($_SESSION["loggedin"]) && $_SESSION["loggedin"]){ $a = "0_"; } -if ( $_SERVER["REQUEST_METHOD"] == "GET" && $_SERVER["REDIRECT_STATUS"] == 200 && strpos($_SERVER["QUERY_STRING"], "account") === false ) { +if ( $_SERVER["REQUEST_METHOD"] == "GET" && $_SERVER["REDIRECT_STATUS"] == 200 && strpos($_SERVER["QUERY_STRING"], "account") === false && strpos($_SERVER["QUERY_STRING"], "logout") === false) { $token = $c->getToken($_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]. $_SERVER["QUERY_STRING"], $a); if ( $c->exists($token)){ header("X-Cache: Hit"); @@ -47,10 +47,10 @@ $user = new jg($u); echo " + Junge Gemeinde Adlershof - createTables(); -$db->close(); - -echo "

Successfully created the database.

"; - -# rename this file to avoid setting up the tables twice -rename(ABSPATH . 'setup.php', ABSPATH . '_setup.php'); -exit; diff --git a/static/footer.php b/static/footer.php index 2c6a6cf..d786d68 100755 --- a/static/footer.php +++ b/static/footer.php @@ -3,11 +3,10 @@

Copyright 2014 Maximilian Möhring

- ?> - + -- cgit v1.2.3