From 65dc06eab2305800ad862b4621807fd7d4f7fe8d Mon Sep 17 00:00:00 2001 From: Horus3 Date: Sun, 9 Feb 2014 17:21:59 +0100 Subject: Init --- account.php | 54 ++++++++ auth.php | 8 ++ check.php | 108 ++++++++++++++++ config/401.css | 6 + config/404.css | 3 + config/dead_link.png | Bin 0 -> 51119 bytes config/error-handler-404.html | 13 ++ config/favicon.ico | Bin 0 -> 5242 bytes config/fonts/2Q-AW1e_taO6pHwMXcXW5w.ttf | Bin 0 -> 72404 bytes config/fonts/BfQP1MR3mJNaumtWa4Tizg.ttf | Bin 0 -> 56260 bytes config/fonts/Muli.css | 6 + config/fonts/Ubuntu.css | 6 + config/fonts/muli.tff | Bin 0 -> 56260 bytes config/fonts/ubuntu.ttf | Bin 0 -> 72404 bytes config/index.html | 23 ++++ config/status-401.html | 22 ++++ config/test_401.css | 29 +++++ favicon.ico | Bin 0 -> 5242 bytes files.php | 3 + header.php | 55 ++++++++ help.php | 7 ++ hyperstyle.css | 214 ++++++++++++++++++++++++++++++++ index.php | 47 +++++++ inreg.php | 40 ++++++ insert.php | 64 ++++++++++ liste.php | 141 +++++++++++++++++++++ login.php | 65 ++++++++++ logout.php | 5 + lolrndm.php | 39 ++++++ member_login.php | 104 ++++++++++++++++ piwik.php | 17 +++ quote.php | 74 +++++++++++ redirect.php | 5 + register.php | 49 ++++++++ reset.php | 117 +++++++++++++++++ robots.txt | 2 + share.php | 21 ++++ to-do-list.php | 51 ++++++++ update.php | 48 +++++++ 39 files changed, 1446 insertions(+) create mode 100644 account.php create mode 100644 auth.php create mode 100644 check.php create mode 100644 config/401.css create mode 100644 config/404.css create mode 100755 config/dead_link.png create mode 100644 config/error-handler-404.html create mode 100755 config/favicon.ico create mode 100644 config/fonts/2Q-AW1e_taO6pHwMXcXW5w.ttf create mode 100644 config/fonts/BfQP1MR3mJNaumtWa4Tizg.ttf create mode 100644 config/fonts/Muli.css create mode 100644 config/fonts/Ubuntu.css create mode 100644 config/fonts/muli.tff create mode 100644 config/fonts/ubuntu.ttf create mode 100644 config/index.html create mode 100644 config/status-401.html create mode 100644 config/test_401.css create mode 100755 favicon.ico create mode 100644 files.php create mode 100644 header.php create mode 100644 help.php create mode 100644 hyperstyle.css create mode 100644 index.php create mode 100644 inreg.php create mode 100644 insert.php create mode 100644 liste.php create mode 100644 login.php create mode 100644 logout.php create mode 100644 lolrndm.php create mode 100644 member_login.php create mode 100644 piwik.php create mode 100644 quote.php create mode 100644 redirect.php create mode 100644 register.php create mode 100644 reset.php create mode 100755 robots.txt create mode 100644 share.php create mode 100644 to-do-list.php create mode 100644 update.php diff --git a/account.php b/account.php new file mode 100644 index 0000000..0717182 --- /dev/null +++ b/account.php @@ -0,0 +1,54 @@ +query("SELECT email FROM user where name='$safe_username';"); + while($email_array = $email_db->fetchArray(SQLITE3_NUM)){ + foreach($email_array as $thirdelement){ + $email=$thirdelement; + } + } + + /*Anzahl der hochgeladenen Dateien.*/ + $count_db = $db_check->query("SELECT count(*) as count FROM file where fk=(SELECT id from user where name='$safe_username');"); + $count_array = $count_db->fetchArray(); + $count = $count_array["count"]; + + +//echo "$username Test $email"; +echo " +
+
+
+

JUNGE GEMEINDE ADLERSHOF

+
+
+ +
+
+ Verwalte deine Account Informationen hier. +
+
+ + + + + + +

Name: 

$username

E-Mail:

$email

Stored files:

$count

+ + +"; + + +} else { +header("Location: member_login.php"); +exit; +} + +?> diff --git a/auth.php b/auth.php new file mode 100644 index 0000000..a63e5ea --- /dev/null +++ b/auth.php @@ -0,0 +1,8 @@ + diff --git a/check.php b/check.php new file mode 100644 index 0000000..b3911de --- /dev/null +++ b/check.php @@ -0,0 +1,108 @@ +query("SELECT salt FROM user WHERE name='$username';"); + while($salt_array = $salt_db->fetchArray(SQLITE3_NUM)){ + foreach($salt_array as $firstelement){ + $salt=$firstelement; + } + } + + $password = "$salt"."$passwort"; + $hash_password = md5($password); + for($i=0;$i<15000;$i++) + $hash_password = md5($hash_password); + + $real_password_db = $db_check->query("SELECT password FROM user WHERE name='$username';"); + while($real_password_array = $real_password_db->fetchArray(SQLITE3_NUM)){ + foreach($real_password_array as $secondelement){ + $real_password=$secondelement; + } + } + +/*___Einloggen___*/ +if ($real_password == $hash_password) { + + $_SESSION["login"] = true; + $_SESSION["username"] = "$username"; + +/*___Datenbankabfrage: Spruch___*/ + $zufall = mt_rand(1,52); + + $db = new SQLite3("/var/www/jungegemeinde/database/jg.db"); + + + $zufall = SQLite3::escapeString("$zufall"); + $ergebnis = $db->query("SELECT * FROM sprueche where id=$zufall;"); + + while($row=$ergebnis->fetchArray()){ + $spruch = $row["spruch"]; + } + + +echo" + + + + + + Login: Random Quote. + + + + + + + + +
+
+Zitat Nummer #$zufall

+$spruch +
+ +

+
Fortschritt:

+
+   + +
+ +

+ + +
+ + + +"; +header("Refresh: 7; /"); +} else { +header("Location: login.php?failure=1"); +} +?> diff --git a/config/401.css b/config/401.css new file mode 100644 index 0000000..b017224 --- /dev/null +++ b/config/401.css @@ -0,0 +1,6 @@ +h1 { +font-family: Calibri; +font-size: 200%; +color: black; +text-align: center; +} diff --git a/config/404.css b/config/404.css new file mode 100644 index 0000000..08276dd --- /dev/null +++ b/config/404.css @@ -0,0 +1,3 @@ +body { +background: white url("dead_link.png") no-repeat fixed top; +} diff --git a/config/dead_link.png b/config/dead_link.png new file mode 100755 index 0000000..37eb36b Binary files /dev/null and b/config/dead_link.png differ diff --git a/config/error-handler-404.html b/config/error-handler-404.html new file mode 100644 index 0000000..6264849 --- /dev/null +++ b/config/error-handler-404.html @@ -0,0 +1,13 @@ + + + + +404 - Dead Link. + + + + + + + + diff --git a/config/favicon.ico b/config/favicon.ico new file mode 100755 index 0000000..eff0501 Binary files /dev/null and b/config/favicon.ico differ diff --git a/config/fonts/2Q-AW1e_taO6pHwMXcXW5w.ttf b/config/fonts/2Q-AW1e_taO6pHwMXcXW5w.ttf new file mode 100644 index 0000000..0e35cfb Binary files /dev/null and b/config/fonts/2Q-AW1e_taO6pHwMXcXW5w.ttf differ diff --git a/config/fonts/BfQP1MR3mJNaumtWa4Tizg.ttf b/config/fonts/BfQP1MR3mJNaumtWa4Tizg.ttf new file mode 100644 index 0000000..cf324e4 Binary files /dev/null and b/config/fonts/BfQP1MR3mJNaumtWa4Tizg.ttf differ diff --git a/config/fonts/Muli.css b/config/fonts/Muli.css new file mode 100644 index 0000000..4fa7a93 --- /dev/null +++ b/config/fonts/Muli.css @@ -0,0 +1,6 @@ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 400; + src: local('Muli'), "/config/fonts/muli.ttf" format('truetype'); +} diff --git a/config/fonts/Ubuntu.css b/config/fonts/Ubuntu.css new file mode 100644 index 0000000..6ab025f --- /dev/null +++ b/config/fonts/Ubuntu.css @@ -0,0 +1,6 @@ +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 400; + src: local('Ubuntu'), "/config/fonts/ubuntu.ttf" format('truetype'); +} diff --git a/config/fonts/muli.tff b/config/fonts/muli.tff new file mode 100644 index 0000000..cf324e4 Binary files /dev/null and b/config/fonts/muli.tff differ diff --git a/config/fonts/ubuntu.ttf b/config/fonts/ubuntu.ttf new file mode 100644 index 0000000..0e35cfb Binary files /dev/null and b/config/fonts/ubuntu.ttf differ diff --git a/config/index.html b/config/index.html new file mode 100644 index 0000000..267f175 --- /dev/null +++ b/config/index.html @@ -0,0 +1,23 @@ + + + + +401 - Acces forbidden. + + + + + + +
+ + + + + + + +
Goddess

Access forbidden. Now get the fuck out.

+
+ + diff --git a/config/status-401.html b/config/status-401.html new file mode 100644 index 0000000..e980ac9 --- /dev/null +++ b/config/status-401.html @@ -0,0 +1,22 @@ + + + + +401 - Acces forbidden. + + + + + + +
+ + + + + + + + + diff --git a/config/test_401.css b/config/test_401.css new file mode 100644 index 0000000..80ad4d0 --- /dev/null +++ b/config/test_401.css @@ -0,0 +1,29 @@ +body { +/*background: white url("haruhi.png") no-repeat fixed top;*/ +} + + + +/*
+

Access forbidden. Now get the fuck out. +

+
*/ + +h1 { +/*position: relative;*/ +top: 590px; +font-family: Courier; +font-size: 300%; +color: black; +text-align: center; +} diff --git a/favicon.ico b/favicon.ico new file mode 100755 index 0000000..41f6475 Binary files /dev/null and b/favicon.ico differ diff --git a/files.php b/files.php new file mode 100644 index 0000000..ab6cebf --- /dev/null +++ b/files.php @@ -0,0 +1,3 @@ +Login + + + +" ; +} else { + $account =" + +"; +} + +?> + + + + + Junge Gemeinde Adlershof. + + + + + + + + + +
+ +
Goddess

Access forbidden. Now get the fuck out.

|Register|Account|
+ + + + + + + + + + + + + + + + +
Home|Adressliste|Kalender|Share|Zitat|to-do|Hilfe|Logout
+ +
+
+
+ diff --git a/help.php b/help.php new file mode 100644 index 0000000..3fba16b --- /dev/null +++ b/help.php @@ -0,0 +1,7 @@ +

Noch nicht implementiert.

"; + +header("Refresh: 3; index.php"); +?> diff --git a/hyperstyle.css b/hyperstyle.css new file mode 100644 index 0000000..74176fc --- /dev/null +++ b/hyperstyle.css @@ -0,0 +1,214 @@ +/* +This is a random mess. I'm studying Computer Science, not Art & Design. +*/ + +@import "/config/fonts/Muli.css"; +@import "/config/fonts/Ubuntu.css"; + + +* { +margin:0; +padding:0; +} + +.noscript{ +display: none; +} + +.katze { +font-family: 'Muli'; +font-size: 120%; +color: black; +} + +.hundertfuenfzig { +font-family: 'Muli'; +font-size: 150%; +color: black; +} + +.ueberschrift { +font-family: 'Muli'; +font-size: 350%; +color: black; +text-align: center; +} + +.kleineschrift { +font-family: 'Ubuntu'; +font-size:75%; +color: black; +} + +.mittlereschrift { +font-family: 'Ubuntu'; +font-size: 100%; +color: black; +} + + +/* +#footer { + position:fixed; + bottom:0px; +} +*/ +#content_container{ +/* padding-top:3.00em;*/ + padding-bottom:3em; + padding-left:0; +} +/* +#content_container { + height:95%; + overflow:auto; + } +*/ +#header { + position:; + top:0px; left:0px; right:0px; + background:; + text-align:center; + padding:10px; +/* color: #f0ecde;*/ + width: 700px; + height: 20px; + margin: 0px auto; +} + +html, body { +height: 100%; +width: 100%; +background: #ecece1; +} + +#distance { +width: 10px; +height: 45%; +margin-bottom: -250px; +float: left; +/*background-color: #f00; nur zu Demozwecken*/ +} + +#container { +margin: 0 auto; +position: relative; +height: 500px; +width: 700px; +clear: left; +/*background-color: #ADFF2F;*/ +} + +#behaelter { +margin: 0 auto; +position: relative; +/*height: 500px; +width: 700px;*/ +clear: left; +/*background-color: #ADFF2F;*/ +} + +#balken { +position: relative; +height: 10 px; +width: 450px; +background-color: grey; +} + +#bgcolor { +background-color: #f0ecde; +} + +/*body { +}*/ + +a:link, a:visited { + /*font-family:Arial,Helvetica,sans-serif; + font-size: 12px;*/ + text-decoration: none; +/* color: #009F00;*/ + } + +h1 { +font-family: 'Muli:400'; +/*font-family: Calibri;*/ +font-size: 260%; +color: black; +text-align: center; +} + +h2 { +font-family: 'Muli:400'; +/*font-family: Calibri;*/ +font-size: 130%; +color: black; +text-align: center; +} + + +p2 { +font-family: 'Ubuntu'; +/*font-family: Calibri;*/ +font-size: 100%; +color: grey; +text-align: center; +} + +p3 { +font-family: 'Ubuntu'; +/*font-family: Calibri;*/ +/*font-size: 250%;*/ +color: black; +text-align: center; +} + +p4 { +font-family: 'Ubuntu'; +/*font-family: Calibri;*/ +font-size: 350%; +color: black; +text-align: center; +} + +p5 { +font-family: 'Muli'; +/*font-family: Calibri;*/ +font-size: 270%; +color: black; +text-align: center; +} + + +a2 { +font-family: 'Ubuntu'; +/*font-family: 'Nobile';*/ +/*font-family: Calibri;*/ +font-size: 125%; +color: black; +text-align: grey; +} + +a3 { +font-family: 'Ubuntu'; +/*font-family: Calibri;*/ +font-size: 130%; +color: black; +text-align: grey; +} + +a4 { +font-family: 'Ubuntu'; +/*font-family: Calibri;*/ +font-size: 100%; +color: black; +} + +a5 { +font-family: 'Ubuntu'; +font-size:75%; +/*font-family: Calibri;*/ +color: black; +} + + +.unterstrich {text-decoration: underline;} diff --git a/index.php b/index.php new file mode 100644 index 0000000..25aabb6 --- /dev/null +++ b/index.php @@ -0,0 +1,47 @@ + + +
+
+
+

JUNGE GEMEINDE ADLERSHOF

+
+
+ +
+
+ Hallo $name.
Willkommen auf der Webpage für die Junge Gemeinde in Adlershof. Für einen persönlichen Zugang, und um alle Features zu nutzen, registriere dich doch hier. Wenn du Probleme bei der Navigation hast, dann schau unter Hilfe nach.
+ Für Anregungen und Kritik bin ich immer zu haben. Schick mir einfach ne Mail oder sags mir nächsten Donnerstag. ;) +

+ PS: Du kannst dich nach einer Registrierung auch mit deinem Username einloggen. +
+
+"; +?> + +

+
+            ,/|         _.--''^``-...___.._.,; 
+          /, \'.     _-'          ,--,,,--'''  
+         { \    `_-''       '    /}            
+            `;;'             ;   ; ;           
+      ._.--''     ._,,, _..'  .;.'             
+      (,_....----'''     (,..--''              
+
+ + +
+
+ + + diff --git a/inreg.php b/inreg.php new file mode 100644 index 0000000..54bbf28 --- /dev/null +++ b/inreg.php @@ -0,0 +1,40 @@ +query("SELECT id FROM user where email='$safe_email';"); + $name_db = $db->query("SELECT id FROM user where name='$safe_name';"); + $name_arr = $name_db->fetchArray(SQLITE3_NUM); + $email_arr = $email_db->fetchArray(SQLITE3_NUM); + $name_int = $name_arr[0]; + $email_int = $email_arr[0]; + + + +if ($_POST["pswd"] == "" || ($email_int > 0 && !$email == "")|| $name_int > 0){ +//echo "1$cleartext_password 2$email_int 3$name_int"; + +header("Location: register.php?false=1"); +} else { + + $salt = uniqid(mt_rand(), true); + $password = "$salt"."$cleartext_password"; + $hash_password = md5($password); + for($i=0;$i<15000;$i++) + $hash_password = md5($hash_password); + + + $result = $db->exec("INSERT INTO user (id, name, salt, password, email) VALUES (NULL, '$safe_name', '$salt', '$hash_password', '$safe_email');"); + + $_SESSION["username"] = $name; + header("Location: account.php?reg=1"); +} +?> diff --git a/insert.php b/insert.php new file mode 100644 index 0000000..cca6118 --- /dev/null +++ b/insert.php @@ -0,0 +1,64 @@ +exec("$query"); +} + +echo " + +
+
+
+

JUNGE GEMEINDE ADLERSHOF

+
+
+"; + if ($_SERVER['REQUEST_METHOD'] == 'POST') { +echo " +
+
+Vielen Dank, der Eintrag zu $_POST[name] wurde erfolgreich hinzugefügt.
+
+ + + Teh wizzard + +
+
+Einen Moment, sie werden gleich weitergeleitet. + +"; +header("Refresh: 4; /liste.php"); + + } else { + echo " +
Trage einfach die Daten von unserem neuen Mitglied ein:
+
+ + + + + + + +
Name: Adresse: Telefon:
Handy: E-Mail: Geburtstag:
  
+ "; + +} +/* +"; +*/ + +//echo '
Zurück
'; + +?> diff --git a/liste.php b/liste.php new file mode 100644 index 0000000..c6fd146 --- /dev/null +++ b/liste.php @@ -0,0 +1,141 @@ + + + + +
+
+
+

JUNGE GEMEINDE ADLERSHOF

+
+
+ +
+ + + + + + + + + + + + + + + +"; + $ergebnis = $db->query("SELECT * FROM member"); + while($row=$ergebnis->fetchArray(SQLITE3_NUM)){ + $id=$row[0]; + echo ""; + foreach($row as $element){ + echo ""; + } + + echo " + "; + } + +echo " + +
 NameAdresseTelefonHandynummerE-MailGeburtstag
$element
+ +

+
+Da es in letzter Zeit doch öfters vorgekommen ist, dass jemand seine Adresse geändert hat, ist es jetzt möglich, einen Eintrag in der Adressliste zu ändern oder zu ergänzen. +Wenn du deine Adresse ändern möchtest, dann drücke einfach auf deinen Namen in der richtigen Zeile. Möchtest du jemanden hinzufügen, dann drücke bitte hier. +
+ +

+"; +} else { + + + $id = $_GET["id"]; + $safe_id = SQLite3::escapeString("$id"); + $ergebnis = $db->query("SELECT * FROM member where id=$safe_id;"); + while($row=$ergebnis->fetchArray()){ + echo "
Trage einfach die neuen Daten von $row[name] ein:
+
"; + echo " + + + + + + +
Name: Adresse: Telefon:
Handy: E-Mail: Geburtstag:
  
+ "; + } +} +?> + + +
+ + diff --git a/login.php b/login.php new file mode 100644 index 0000000..10e14f3 --- /dev/null +++ b/login.php @@ -0,0 +1,65 @@ +
Ausloggen erfolgreich
"; +} +if ($_GET["failure"] == 1) { + $logout = "
Name oder Passwort falsch!
"; +} + + +?> + + + + + Junge Gemeinde Adlershof. + + + + + + + +
+ + +
+
+

JUNGE GEMEINDE ADLERSHOF

+
+ + +
+
+

Login:

+

+

+ + +

+ +

+ Info: You have five attempts. You will be banned for 6 hours after your login attempts run out.
+ Passwort vergessen? Klick hier. + + +

+
+
+    _                ___       _.--.    
+    \`.|\..----...-'`   `-._.-'_.-'`    
+    /  ' `         ,       __.--'       
+    )/' _/     \   `-_,   /             
+    `-''' `''\_,_.-;_.-\_ ',            
+        _.-'_./   {_.'   ; /            
+       {_.-``-'         {_/             
+
+
+
+
+
+ + + diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..7c527b2 --- /dev/null +++ b/logout.php @@ -0,0 +1,5 @@ + diff --git a/lolrndm.php b/lolrndm.php new file mode 100644 index 0000000..9e73779 --- /dev/null +++ b/lolrndm.php @@ -0,0 +1,39 @@ + + +
+
+
+


+
+

Upps. Das scheint nicht die Seite zu sein, die du gesucht hast.

+
+
+ +
+
+
+ +

+ + + + + + + + + +

+
+

Zurück zur Startseite.

+
+
+
+
+ + diff --git a/member_login.php b/member_login.php new file mode 100644 index 0000000..1d3b6d9 --- /dev/null +++ b/member_login.php @@ -0,0 +1,104 @@ +Login + | + Register + | +" ; + $name = "Gast"; + +} else { + header("Location: account.php"); + exit; + $account ="Account + | +"; +} + +if ($_SERVER['REQUEST_METHOD'] == 'POST') { + $username = $_POST["username"]; + $passwort = $_POST["password"]; + + $safe_username = SQLite3::escapeString("$username"); + $safe_passwort = SQLite3::escapeString("$passwort"); + + $db_check = new SQLite3("/var/www/jungegemeinde/database/share.db"); + $salt_db = $db_check->query("SELECT salt FROM user WHERE name='$safe_username';"); + while($salt_array = $salt_db->fetchArray(SQLITE3_NUM)){ + foreach($salt_array as $firstelement){ + $salt=$firstelement; + } + } + + $password = "$salt"."$passwort"; + $hash_password = md5($password); + for($i=0;$i<15000;$i++) + $hash_password = md5($hash_password); + + $real_password_db = $db_check->query("SELECT password FROM user WHERE name='$safe_username';"); + while($real_password_array = $real_password_db->fetchArray(SQLITE3_NUM)){ + foreach($real_password_array as $secondelement){ + $real_password=$secondelement; + } + } + + if ($real_password == $hash_password) { + + $_SESSION["username"] = $_POST["username"]; + header("Location: member_login.php?stat=1"); + + } else { + header("Location: member_login.php?stat=2"); + } + +} else { + +if ($_GET["stat"] == 2) { + $failure="
Name und/oder Passwort sind falsch!
"; +} else { + if ($_GET["stat"] == 1) { + header("Location: account.php"); + exit; + } +} + + +echo " + +
+
+
+
+

JUNGE GEMEINDE ADLERSHOF

+
+ +
+ +
+
+ Hallo $name,
+ hier kannst du dich für den Mitgliederbereich einloggen. +

+ + Noch kein eigenes Passwort? Dann registrier dich einfach.

+ $failure +
+

+

+ + +

+ +
+
+
+
+ + +"; +} +?> diff --git a/piwik.php b/piwik.php new file mode 100644 index 0000000..86bfb94 --- /dev/null +++ b/piwik.php @@ -0,0 +1,17 @@ + + + + + diff --git a/quote.php b/quote.php new file mode 100644 index 0000000..022d2ff --- /dev/null +++ b/quote.php @@ -0,0 +1,74 @@ +query("SELECT count(*) as count FROM sprueche;"); +$row = $rows->fetchArray(); +$numRows = $row["count"]; + +if ($zufall == ""){ + $zufall = mt_rand(1,$numRows); +} + + +$safe_zufall = SQLite3::escapeString("$zufall"); +$ergebnis = $db->query("SELECT * FROM sprueche where id=$safe_zufall;"); + +echo" + +
+
+
+

JUNGE GEMEINDE ADLERSHOF

+
+
+ +


+ +Zitat Nummer #$zufall

"; + + +if (preg_match('/[0-9]/',$zufall)){ // I really need this hack to get the 404 when /[0-9][a-zA-Z]/ is happening. Bad PHP! + if (preg_match('/[^0-9]/',$zufall)){ + $zufall = 0; + } +} + + + +if ($zufall > 0 && $zufall <= ($numRows)){ + while($row=$ergebnis->fetchArray()){ + echo $row["spruch"]; + } +} else { +echo "\"Sorry, can't find the quote, but a cat is fine too, right?\"

+
+      ,/|         _.--''^``-...___.._.,;
+     /, \'.     _-'          ,--,,,--'''
+    { \    `_-''       '    /}          
+     `;;'            ;   ; ;            
+ ._.--''     ._,,, _..'  .;.'           
+  (,_....----'''     (,..--''           
+


+404 - Eintrag nicht vorhanden."; +} + +echo "
+ +


+ ----------------------------------------------------------------- +

Es sind momentan $numRows Zitate in der Datenbank enthalten.

+Du suchst ein bestimmtes Zitat? Gib hier dessen Nummer ein:
+ + + +
+
+ +
+"; + +?> diff --git a/redirect.php b/redirect.php new file mode 100644 index 0000000..e45e078 --- /dev/null +++ b/redirect.php @@ -0,0 +1,5 @@ + diff --git a/register.php b/register.php new file mode 100644 index 0000000..bdc8178 --- /dev/null +++ b/register.php @@ -0,0 +1,49 @@ +Fehler! Entweder ist der Nutzer schon registriert oder dein Passwort war leer!
"; +} + +echo " + +
+
+
+
+

JUNGE GEMEINDE ADLERSHOF

+
+ + + +
+Registriere dich, um einen persönlichen Zugang zu erhalten. Such dir einen beliebigen Spitznamen und ein geeignetes Passwort aus. Keine Angst, dein Passwort wird sicher verwahrt und nicht im Klartext abgelegt. +

Die E-Mail Adresse ist keine Pflicht, aber notwendig, wenn du dein Passwort vergessen hast. +

+ +$failure + +
+
+ + + + + + + + + +

Name:

Passwort:

E-Mail:

+
+
+
+ +
+ + +"; + + + +?> diff --git a/reset.php b/reset.php new file mode 100644 index 0000000..9a84e79 --- /dev/null +++ b/reset.php @@ -0,0 +1,117 @@ + + + + + + Junge Gemeinde Adlershof. + + + + + + + + +

+
+
+ "; + +$startseite="
Zurück zur Startseite.
"; +} +?> +

+ +
+ JUNGE GEMEINDE ADLERSHOF +

+ +Gib deine E-Mail Adresse ein, um dir ein neues Passwort zuzuschicken.

+
+ +
+"; +} else { + + /*___Datenbank___*/ + $db_check = new SQLite3("/var/www/jungegemeinde/database/share.db"); + $safe_email = SQLite3::escapeString("$email_post"); + + $email_db = $db_check->query("SELECT email FROM user WHERE email='$safe_email';"); + while($email_array = $email_db->fetchArray(SQLITE3_NUM)){ + foreach($email_array as $thirdelement){ + $email=$thirdelement; + } + } + + if (empty($email)){ + $try = $try +1; + + if ($try > 0){ + header("HTTP/1.0 401 Unauthorized"); + } + $maxtry = 3 - $try; + + if ($maxtry == 0) { + echo "YOU ARE BANNED! ;_;
"; + header("Refresh: 3; /401"); + + } else { + echo "Die E-Mail ist nicht in der Datenbank gespeichert. Achte auf Tippfehler und probiere noch einmal.
+ Du hast noch $maxtry Versuche, bevor du gesperrt wirst.
+

+
+ + +
+ "; + } + } else { + + $secret = explode(" ", "a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9"); + shuffle($secret); + $secret = substr(implode($secret), 0, 10); + + $salt = uniqid(mt_rand(), true); + $password = "$salt"."$secret"; + $hash_password = md5($password); + for($i=0;$i<15000;$i++) + $hash_password = md5($hash_password); + + $result = $db_check->exec("UPDATE user SET password='$hash_password', salt='$salt' where email='$email';"); + + echo "Wir haben deine E-Mail in der Datenbank. Eine E-Mail mit deinem neuen Passwort wurde soeben verschickt.
"; + +// exec('curl -vv --user max:sommer13 -F sender="mailer-daemon@jg-adlershof.de" -F recipient="'.$email.'" -F subject="Angefordertes neues Passwort - BITTE NICHT ANTWORTEN" -F message="Dein neues Passwort lautet: '.$secret.'." http://playground.oweissbarth.de/mail/send.php'); + + + } + + +} + +?> +
+ +
+
+
+ + + diff --git a/robots.txt b/robots.txt new file mode 100755 index 0000000..1f53798 --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/share.php b/share.php new file mode 100644 index 0000000..7aeaf9c --- /dev/null +++ b/share.php @@ -0,0 +1,21 @@ + + +
+
+
+

JUNGE GEMEINDE ADLERSHOF

+
+
+ +query("SELECT filename FROM file WHERE private=0;"); + +while($show_public_array = $show_public_db->fetchArray() ){ + echo " $show_public_array[filename]"; +} + +?> diff --git a/to-do-list.php b/to-do-list.php new file mode 100644 index 0000000..b4e2905 --- /dev/null +++ b/to-do-list.php @@ -0,0 +1,51 @@ + + + +to-do-list + + +Auf Python umsteigen!
+SQL: UPDATE --fix (09.10.13) ENDLICH!!
+SQL: .DUMP
+SQL: DROP?
+email Benachrichtigung bei UPDATE
+Javascript for fancy programming
+PHP kann in zu PDFs?
+verfickte Umlaute reparieren --fix (05.10.13)
+Wie siehts aus mit SQL Injections? --wer schaffts?
+URL Rewriting? Warum eigentlich nicht.
+.csv output fixen ("")
+CSS erweitern, zB alternative Schriftarten festlegen, bzw importieren --unwichtig
+Mit der Tabelle umziehen, für die führende Null. (Felix hat mich daran erinnert, danke.) --fix (09.10.13) War nicht schwierig, konnte aber so die Seite testen. Trotzdem können wir nun nicht mehr sortiert nach der Quersumme der Handynummern die Liste anzeigen. :/
+mailto: Links einfügen -- Ist das wichtig?
+Bevor jemand meckert. Die Methoden wieder zur Startseite zu kommen sind bei "aktualisieren" und "neuen Eintrag" unterschiedlich, ist mir bewusst. Stört das den "Flow"? Dann muss ich das kurz umschreiben. Ansonsten gehts bei mir auch so.
+Update umschreiben, sodass man nicht mehr den Primärschlüssel manuell eingeben muss, sondern nur noch eine Checkbox drückt und er wird automatisch übergeben.
+Design: Formular von UPDATE und INSERT sieht auch nicht gleich aus.
+Ich mag Katzen und hab noch ein paar mehr davon:
+    _                ___       _.--.
+    \`.|\..----...-'`   `-._.-'_.-'`
+    /  ' `         ,       __.--'
+    )/' _/     \   `-_,   /
+    `-'" `"\_  ,_.-;_.-\_ ',     fsc/as
+        _.-'_./   {_.'   ; /
+       {_.-``-'         {_/
+

+Andere folgen eventuell später. + + + + + + diff --git a/update.php b/update.php new file mode 100644 index 0000000..f3f6b4d --- /dev/null +++ b/update.php @@ -0,0 +1,48 @@ + $adresse
$telefonnummer
$handynummer
$email
$bday
$ip
$cryptedip"; + + + +$db = new SQLite3('/var/www/jungegemeinde/database/jg.db'); + +$result = $db->exec("UPDATE member SET name='$name' where id=$id;"); +$result = $db->exec("UPDATE member SET adresse='$adresse' where id=$id;"); +$result = $db->exec("UPDATE member SET telefonnummer='$telefonnummer' where id=$id;"); +$result = $db->exec("UPDATE member SET handynummer='$handynummer' where id=$id;"); +$result = $db->exec("UPDATE member SET email='$email' where id=$id;"); +$result = $db->exec("UPDATE member SET geburtstag='$bday' where id=$id;"); + +/*echo " + + + + + Junge Gemeinde Adlershof - Update erfolgreich! + + + + + + +
+Update erfolgreich!

+Weiterleitung in 3.. 2.. 1.. +
";*/ + +header("Refresh: 0; liste.php"); + + + +?> -- cgit v1.2.3