fc1a9b3efc1c6c15fcdb61d611a0f62c446ed8b1
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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) 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.
15) */
16) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

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

bernd authored 17 years ago

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

Hanno authored 6 years ago

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

Hanno authored 6 years ago

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

Hanno authored 6 years ago

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

54)     }
55) }
56) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

57) if ($show == 'password') {
58)     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

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

bernd authored 17 years ago

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

bernd authored 17 years ago

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

bernd authored 17 years ago

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

bernd authored 17 years ago

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

Hanno authored 6 years ago

66) } elseif ($show == 'token') {
67)     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

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

bernd authored 17 years ago

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

bernd authored 17 years ago

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

bernd authored 17 years ago

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