36a5da18b13828efe86a5870ad9ba933c4b854d8
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) 
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 verbleibende syntaxfehler u...

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 Entities repariert

bernd authored 16 years ago

17) require_once('newpass.php');
18) require_once('session/checkuser.php');
19) 
20) 
21) function send_customer_token($customerno)
22) {
Hanno verbleibende syntaxfehler u...

Hanno authored 5 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

Hanno authored 5 years ago

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

bernd authored 16 years ago

57) }
58) 
59) 
60) 
61) function send_mail($address, $subject, $body)
62) {
Hanno verbleibende syntaxfehler u...

Hanno authored 5 years ago

63)     if (strstr($subject, "\n") !== false) {
64)         die("Zeilenumbruch im subject!");
65)     }
66)     $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";
67)     mail($address, $subject, $body, $header);