dcc202fb249a446ac15c7cf413b9f1b4a3f31b58
bernd Entities repariert

bernd authored 16 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 Entities repariert

bernd authored 16 years ago

14) require_once('newpass.php');
15) require_once('session/checkuser.php');
16) 
17) 
18) function send_customer_token($customerno)
19) {
Hanno verbleibende syntaxfehler u...

Hanno authored 5 years ago

20)     $customerno = (int) $customerno;
21)     $token = get_customer_token($customerno);
22)     $customer = get_customer_info($customerno);
23)     if ($customer['email'] == '') {
24)         system_failure('Für Ihr Kundenkonto ist keine E-Mail-Adresse eingetragen. Diese Funktion steht Ihnen daher nicht zur Verfügung.');
25)     }
26)     $anrede = "Sehr geehrte Damen und Herren";
27)     if ($customer['title'] == 'Herr') {
28)         $anrede = "Sehr geehrter Herr {$customer['name']}";
29)     } elseif ($customer['title'] == 'Frau') {
30)         $anrede = "Sehr geehrte Frau {$customer['name']}";
31)     }
32)     $msg = "{$anrede},
bernd Entities repariert

bernd authored 16 years ago

33) 
34) Sie haben auf unserem Web-Administrations-Interface ein neues
35) Passwort für Ihren Kunden-Zugang angefordert.
36) Diese automatische Nachricht dient der Überprüfung Ihrer Identität.
37) 
38) Um sich ein neues Passwort setzen zu können, rufen Sie bitte den
39) folgenden Link auf:
bernd Tabelle 'kundenkontakt' kom...

bernd authored 14 years ago

40)  https://config.schokokeks.org/go/index/validate_token?customerno={$customer['customerno']}&token={$token}
bernd Entities repariert

bernd authored 16 years ago

41) 
42) Sollte Ihr E-Mail-Programm diesen Link nicht korrekt an den Browser
43) übertragen, rufen Sie bitte die Seite
bernd Tabelle 'kundenkontakt' kom...

bernd authored 14 years ago

44)  https://config.schokokeks.org/go/index/validate_token
bernd Entities repariert

bernd authored 16 years ago

45) auf und geben Sie die folgenden Daten ein:
46)  Kundennummer: {$customer['customerno']}
47)  Token:        {$token}
48) 
49) Diese Prozedur müssen Sie bis spätestens 24 Stunden nach Erhalt
50) dieser Nachricht durchführen, sonst verliert das Token seine
51) Gültigkeit.
52) ";
Hanno verbleibende syntaxfehler u...

Hanno authored 5 years ago

53)     send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg);
bernd Entities repariert

bernd authored 16 years ago

54) }
55) 
56) 
57) 
58) function send_mail($address, $subject, $body)
59) {
Hanno verbleibende syntaxfehler u...

Hanno authored 5 years ago

60)     if (strstr($subject, "\n") !== false) {
61)         die("Zeilenumbruch im subject!");
62)     }
63)     $header = "From: schokokeks.org Web Administration <noreply@schokokeks.org>\r\nReply-To: root@schokokeks.org\r\nContent-Type: text/plain; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 8bit";
64)     mail($address, $subject, $body, $header);