3ef995c2108fe77d22c0b556fb9717cb848bc48f
bernd webinterface => /webinterface

bernd authored 17 years ago

1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 1 week ago

2) 
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 13 years ago

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

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 13 years ago

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

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 13 years ago

11) 
12) 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.
13) */
14) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

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

bernd authored 17 years ago

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

Hanno authored 6 years ago

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

Hanno authored 6 years ago

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

Hanno authored 6 years ago

23)     require_once('newpass.php');
24)     require_once('inc/security.php');
25)     if (validate_token($customerno, $token)) {
26)         $show = 'password';
27)         if (isset($_POST['password'])) {
28)             if ($_POST['password'] != $_POST['password2']) {
29)                 input_error("Die beiden Passwort-Eingaben stimmen nicht überein.");
30)             } elseif ($_POST['password'] == '') {
31)                 input_error("Es kann kein leeres Passwort gesetzt werden");
32)             } elseif (($result = strong_password($_POST['password'])) !== true) {
33)                 input_error("Das Passwort ist zu einfach ({$result})!");
34)             } else {
35)                 require_once('session/checkuser.php');
36)                 require_once('inc/base.php');
37)                 logger(LOG_INFO, "modules/index/validate_token", "pwrecovery", "customer »{$customerno}« set a new password");
38)                 set_customer_password($customerno, $_POST['password']);
39)                 success_msg('Das Passwort wurde gesetzt!');
40)                 set_customer_verified($customerno);
41)                 set_customer_lastlogin($customerno);
42)                 invalidate_customer_token($customerno);
43)                 $_SESSION['role'] = ROLE_CUSTOMER;
44)                 $_SESSION['customerinfo'] = get_customer_info($customerno);
45)                 title("Passwort gesetzt");
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

46)                 output('<p>Ihr neues Passwort wurde gesetzt, Sie können jetzt ' . internal_link("index", "die Web-Oberfläche sofort benutzen") . '.</p>');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

47)                 $show = null;
48)             }
49)         }
50)     } else {
51)         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

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

Hanno authored 6 years ago

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

Hanno Böck authored 5 years ago

57)   <form method="post">
Hanno Böck remaining autocomplete for...

Hanno Böck authored 1 year ago

58)   <p style="display: none"><input type="hidden" name="customerno" value="' . $customerno . '">
59)   <input type="hidden" name="token" value="' . $token . '"></p>
60)   <p><span class="login_label">Neues Passwort:</span> <input type="password" name="password" size="30" autocomplete="new-password"></p>
61)   <p><span class="login_label">Bestätigung:</span> <input type="password" name="password2" size="30" autocomplete="new-password"></p>
62)   <p><span class="login_label">&#160;</span> <input type="submit" value="Passwort setzen"></p>
bernd webinterface => /webinterface

bernd authored 17 years ago

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

Hanno authored 6 years ago

64) } elseif ($show == 'token') {
65)     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 5 years ago

66)   <form method="post">
Hanno Böck remaining autocomplete for...

Hanno Böck authored 1 year ago

67)   <p><span class="login_label">Kundennummer:</span> <input type="text" name="customerno" size="30"></p>
68)   <p><span class="login_label">Code:</span> <input type="text" name="token" size="30"></p>
69)   <p><span class="login_label">&#160;</span> <input type="submit" value="Überprüfen"></p>