dcc202fb249a446ac15c7cf413b9f1b4a3f31b58
bernd webinterface => /webinterface

bernd authored 17 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
12) */
13) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

14) title("Passwort setzen");
bernd webinterface => /webinterface

bernd authored 17 years ago

15) 
16) $show = 'token';
17) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

18) if (isset($_REQUEST['customerno']) and isset($_REQUEST['token'])) {
19)     $customerno = (int) $_REQUEST['customerno'];
20)     $token = $_REQUEST['token'];
Hanno remove whitespace in empty...

Hanno authored 5 years ago

21) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

22)     require_once('newpass.php');
23)     require_once('inc/security.php');
24)     if (validate_token($customerno, $token)) {
25)         $show = 'password';
26)         if (isset($_POST['password'])) {
27)             if ($_POST['password'] != $_POST['password2']) {
28)                 input_error("Die beiden Passwort-Eingaben stimmen nicht überein.");
29)             } elseif ($_POST['password'] == '') {
30)                 input_error("Es kann kein leeres Passwort gesetzt werden");
31)             } elseif (($result = strong_password($_POST['password'])) !== true) {
32)                 input_error("Das Passwort ist zu einfach ({$result})!");
33)             } else {
34)                 require_once('session/checkuser.php');
35)                 require_once('inc/base.php');
36)                 logger(LOG_INFO, "modules/index/validate_token", "pwrecovery", "customer »{$customerno}« set a new password");
37)                 set_customer_password($customerno, $_POST['password']);
38)                 success_msg('Das Passwort wurde gesetzt!');
39)                 set_customer_verified($customerno);
40)                 set_customer_lastlogin($customerno);
41)                 invalidate_customer_token($customerno);
42)                 $_SESSION['role'] = ROLE_CUSTOMER;
43)                 $_SESSION['customerinfo'] = get_customer_info($customerno);
44)                 title("Passwort gesetzt");
45)                 output('<p>Ihr neues Passwort wurde gesetzt, Sie können jetzt '.internal_link("index", "die Web-Oberfläche sofort benutzen").'.</p>');
46)                 $show = null;
47)             }
48)         }
49)     } else {
50)         input_error("Der eingegebene Code war nicht korrekt. Bitte benutzen Sie die Kopieren &amp; Einfügen-Operation!");
bernd webinterface => /webinterface

bernd authored 17 years ago

51)     }
52) }
53) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

54) if ($show == 'password') {
55)     output('<p>Bitte legen Sie jetzt Ihr neues Kunden-Passwort fest.</p>
Hanno Böck Fehler von W3C validator fixen

Hanno Böck authored 4 years ago

56)   <form method="post">
bernd Noch ein XHTML-Fehler

bernd authored 16 years ago

57)   <p style="display: none"><input type="hidden" name="customerno" value="'.$customerno.'" />
58)   <input type="hidden" name="token" value="'.$token.'" /></p>
bernd webinterface => /webinterface

bernd authored 17 years ago

59)   <p><span class="login_label">Neues Passwort:</span> <input type="password" name="password" size="30" /></p>
60)   <p><span class="login_label">Bestätigung:</span> <input type="password" name="password2" size="30" /></p>
bernd Entities repariert

bernd authored 16 years ago

61)   <p><span class="login_label">&#160;</span> <input type="submit" value="Passwort setzen" /></p>
bernd webinterface => /webinterface

bernd authored 17 years ago

62)   </form>');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

63) } elseif ($show == 'token') {
64)     output('<p>Bitte geben Sie Ihre Kundennummer und den per E-Mail zugeschickten Code ein. Alternativ können sie den Link aus der E-Mail direkt aufrufen.</p>
Hanno Böck Fehler von W3C validator fixen

Hanno Böck authored 4 years ago

65)   <form method="post">
bernd webinterface => /webinterface

bernd authored 17 years ago

66)   <p><span class="login_label">Kundennummer:</span> <input type="text" name="customerno" size="30" /></p>
bernd Token -> Code

bernd authored 16 years ago

67)   <p><span class="login_label">Code:</span> <input type="text" name="token" size="30" /></p>
bernd Entities repariert

bernd authored 16 years ago

68)   <p><span class="login_label">&#160;</span> <input type="submit" value="Überprüfen" /></p>