0ef93e76f9e0beb6c3a5db589354464c9a4609f3
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 5 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 webinterface => /webinterface

bernd authored 17 years ago

17) require_once('newpass.php');
18) require_once('session/checkuser.php');
Bernd Wurst Funktion send_mail() global...

Bernd Wurst authored 4 years ago

19) require_once('inc/base.php');
bernd webinterface => /webinterface

bernd authored 17 years ago

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

Hanno authored 5 years ago

21) function send_user_token($username)
Bernd Wurst Ermögliche Kunden sich eine...

Bernd Wurst authored 10 years ago

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

Hanno authored 5 years ago

23)     $token = get_user_token($username);
24)     $email = emailaddress_for_user($username);
Bernd Wurst Ermögliche Kunden sich eine...

Bernd Wurst authored 10 years ago

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

Hanno authored 5 years ago

26)     $tokenurl = config('webinterface_url').'/init'.$token.'?agb=1';
Bernd Wurst Ermögliche Kunden sich eine...

Bernd Wurst authored 10 years ago

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

Hanno authored 5 years ago

28)     $msg = 'Sie haben für Ihren Zugang bei '.config('company_name').' ein neues Passwort angefordert.
Bernd Wurst Ermögliche Kunden sich eine...

Bernd Wurst authored 10 years ago

29) Bitte besuchen Sie folgende Adresse um Ihr Passwort neu zu setzen:
30)   '.$tokenurl.'
31) 
32) Mit freundlichen Grüßen,
33) Ihre Admins von '.config('company_name');
Bernd Wurst Passwort-Reset-Funktion akt...

Bernd Wurst authored 7 years ago

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

Hanno authored 5 years ago

35)     $msg .= "\n\nDiese Anforderung haben wir am ".date("r")." von der IP-Adresse\n{$_SERVER['REMOTE_ADDR']} erhalten.\nSofern Sie dies nicht ausgelöst haben, benachrichtigen Sie bitte den Support\ndurch eine Antwort auf diese E-Mail.";
Bernd Wurst Passwort-Reset-Funktion akt...

Bernd Wurst authored 7 years ago

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

Hanno authored 5 years ago

37)     send_mail($email, "Passwortanforderung fuer schokokeks.org", $msg);
Bernd Wurst Ermögliche Kunden sich eine...

Bernd Wurst authored 10 years ago

38) }
bernd webinterface => /webinterface

bernd authored 17 years ago

39) 
40) function send_customer_token($customerno)
41) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

42)     $customerno = (int) $customerno;
43)     $token = get_customer_token($customerno);
44)     $customer = get_customer_info($customerno);
45)     if ($customer['email'] == '') {
46)         system_failure('Für Ihr Kundenkonto ist keine E-Mail-Adresse eingetragen. Diese Funktion steht Ihnen daher nicht zur Verfügung.');
47)     }
48)     $anrede = "Sehr geehrte Damen und Herren";
49)     if ($customer['title'] == 'Herr') {
50)         $anrede = "Sehr geehrter Herr {$customer['name']}";
51)     } elseif ($customer['title'] == 'Frau') {
52)         $anrede = "Sehr geehrte Frau {$customer['name']}";
53)     }
54)     $msg = "{$anrede},
bernd webinterface => /webinterface

bernd authored 17 years ago

55) 
56) Sie haben auf unserem Web-Administrations-Interface ein neues
57) Passwort für Ihren Kunden-Zugang angefordert.
58) Diese automatische Nachricht dient der Überprüfung Ihrer Identität.
59) 
60) Um sich ein neues Passwort setzen zu können, rufen Sie bitte den
61) folgenden Link auf:
bernd Mehr config-optionen und co...

bernd authored 14 years ago

62)  ".config('webinterface_url')."/go/index/validate_token.php?customerno={$customer['customerno']}&token={$token}
bernd webinterface => /webinterface

bernd authored 17 years ago

63) 
64) Sollte Ihr E-Mail-Programm diesen Link nicht korrekt an den Browser
65) übertragen, rufen Sie bitte die Seite
bernd Mehr config-optionen und co...

bernd authored 14 years ago

66)  ".config('webinterface_url')."/go/index/validate_token.php
bernd webinterface => /webinterface

bernd authored 17 years ago

67) auf und geben Sie die folgenden Daten ein:
68)  Kundennummer: {$customer['customerno']}
69)  Token:        {$token}
70) 
71) Diese Prozedur müssen Sie bis spätestens 24 Stunden nach Erhalt
72) dieser Nachricht durchführen, sonst verliert das Token seine
73) Gültigkeit.
74) ";
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

75)     send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg);