aboutsummaryrefslogtreecommitdiff
path: root/reset.php
diff options
context:
space:
mode:
authorroot2014-03-02 00:25:34 +0100
committerroot2014-03-02 00:25:34 +0100
commit7b9d516cd3bcdb8eaa5f1eb533d71010061c681b (patch)
treea8bb3bd5ed56525461b44bd71aa9c8e843081dc9 /reset.php
parent82185753906709f9944a07c35a809736cf979afe (diff)
downloadjungegemeinde-7b9d516cd3bcdb8eaa5f1eb533d71010061c681b.tar.gz
rm stuff
Diffstat (limited to 'reset.php')
-rw-r--r--reset.php122
1 files changed, 0 insertions, 122 deletions
diff --git a/reset.php b/reset.php
deleted file mode 100644
index 3f480b7..0000000
--- a/reset.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-
-/* Copyright Maximilian Möhring, 2013
-Licensed under the GPL. Read LICENSE for more Information.*/
-
-session_start() ?>
-<!doctype html>
-
-<html>
- <head>
- <title>Junge Gemeinde Adlershof.</title>
- <meta http-equiv='Content-type' content='text/html; charset=utf-8' />
- <link rel='stylesheet' type='text/css' href='hyperstyle.css' />
- <link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'>
- </head>
-
- <body link="#000000" vlink="#000000" alink="#FF0000">
-
-<?php
-
-if($_SESSION["login"]){
-
-include("header.php");
-
-} else {
- echo "
- <div id='header' class='kleineschrift'>
- <br><br>
- <hr>
- </div>
- ";
-
-$startseite="<div class='kleineschrift'><a style='text-decoration:underline;' href='login.php'>Zurück zur Startseite.</a></div>";
-}
-?>
- <div id='content_container' align="center"><br>
-
- <div align='center'>
- <p5>JUNGE GEMEINDE ADLERSHOF</p5>
-<br><br><div id='behaelter' align='center'>
-
-<?php
-
-$email_post = $_POST["email"];
-$try = $_POST["try"];
-
-if (empty($email_post)){
-echo "
-<a5>Gib deine E-Mail Adresse ein, um dir ein neues Passwort zuzuschicken.</a5><br><br>
-<form action='reset.php' method='post'>
-<input type='text' name='email' size='30'/>
-</form>
-";
-} else {
-
- /*___Datenbank___*/
- $db_check = new SQLite3("../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 "<a4><b>YOU ARE BANNED! ;_;</b></a4><br> ";
- header("Refresh: 3; /401");
-
- } else {
- echo "<a5>Die E-Mail ist nicht in der Datenbank gespeichert. Achte auf Tippfehler und probiere noch einmal.<br>
- Du hast noch $maxtry Versuche, bevor du gesperrt wirst.</a5>
- <br><br>
- <form action='reset.php' method='post'>
- <input type='text' name='email' size='30'/>
- <input type='hidden' name='try' value='$try'/>
- </form>
- ";
- }
- } 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.<br>";
-
-// 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');
-
-
- }
-
-
-}
-
-?>
-<br>
-<?php echo $startseite; ?>
-</div>
-</div>
-</div>
-</body>
-</html>
-<?php
-?>