838077f18b71321a685c84329342e6a711d22d09
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) 
5) Written 2008-2012 by schokokeks.org Hosting, namely
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) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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');
19) 
20) 
21) function send_customer_token($customerno)
22) {
23)   $customerno = (int) $customerno;
24)   $token = get_customer_token($customerno);
25)   $customer = get_customer_info($customerno);
bernd Tabelle 'kundenkontakt' kom...

bernd authored 14 years ago

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.')
bernd webinterface => /webinterface

bernd authored 17 years ago

28)   $anrede = "Sehr geehrte Damen und Herren";
29)   if ($customer['title'] == 'Herr')
30)     $anrede = "Sehr geehrter Herr {$customer['name']}";
31)   elseif ($customer['title'] == 'Frau')
32)     $anrede = "Sehr geehrte Frau {$customer['name']}";
33)   $msg = "{$anrede},
34) 
35) Sie haben auf unserem Web-Administrations-Interface ein neues
36) Passwort für Ihren Kunden-Zugang angefordert.
37) Diese automatische Nachricht dient der Überprüfung Ihrer Identität.
38) 
39) Um sich ein neues Passwort setzen zu können, rufen Sie bitte den
40) folgenden Link auf:
bernd Mehr config-optionen und co...

bernd authored 14 years ago

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

bernd authored 17 years ago

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

bernd authored 14 years ago

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

bernd authored 17 years ago

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

bernd authored 14 years ago

54)   send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg);
bernd webinterface => /webinterface

bernd authored 17 years ago

55) }
56) 
57) 
58) 
59) function send_mail($address, $subject, $body)
60) {
61)   if (strstr($subject, "\n") !== false)
62)     die("Zeilenumbruch im subject!");
bernd Mehr config-optionen und co...

bernd authored 14 years ago

63)   $header = "From: ".config('company_name')." Web Administration <noreply@".config('masterdomain').">\r\nReply-To: ".config('adminmail')."\r\nContent-Type: text/plain; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 8bit";