... | ... |
@@ -2,14 +2,11 @@ |
2 | 2 |
/* |
3 | 3 |
This file belongs to the Webinterface of schokokeks.org Hosting |
4 | 4 |
|
5 |
-Written 2008-2018 by schokokeks.org Hosting, namely |
|
5 |
+Written by schokokeks.org Hosting, namely |
|
6 | 6 |
Bernd Wurst <bernd@schokokeks.org> |
7 | 7 |
Hanno Böck <hanno@schokokeks.org> |
8 | 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/ |
|
9 |
+This code is published under a 0BSD license. |
|
13 | 10 |
|
14 | 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. |
15 | 12 |
*/ |
... | ... |
@@ -74,13 +74,3 @@ Gültigkeit. |
74 | 74 |
send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg); |
75 | 75 |
} |
76 | 76 |
|
77 |
- |
|
78 |
- |
|
79 |
-function send_mail($address, $subject, $body) |
|
80 |
-{ |
|
81 |
- if (strstr($subject, "\n") !== false) { |
|
82 |
- die("Zeilenumbruch im subject!"); |
|
83 |
- } |
|
84 |
- $header = "From: ".config('company_name')." Web Administration <noreply@".config('masterdomain').">\r\nReply-To: ".config('adminmail')."\r\nCc: ".config('adminmail')."\r\nContent-Type: text/plain; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 8bit"; |
|
85 |
- mail($address, $subject, $body, $header); |
|
86 |
-} |
... | ... |
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely |
8 | 8 |
|
9 | 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 | 10 |
|
11 |
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
11 |
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 | 12 |
http://creativecommons.org/publicdomain/zero/1.0/ |
13 | 13 |
|
14 | 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. |
... | ... |
@@ -17,38 +17,40 @@ Nevertheless, in case you use a significant part of this code, we ask (but not r |
17 | 17 |
require_once('newpass.php'); |
18 | 18 |
require_once('session/checkuser.php'); |
19 | 19 |
|
20 |
-function send_user_token($username) |
|
20 |
+function send_user_token($username) |
|
21 | 21 |
{ |
22 |
- $token = get_user_token($username); |
|
23 |
- $email = emailaddress_for_user($username); |
|
22 |
+ $token = get_user_token($username); |
|
23 |
+ $email = emailaddress_for_user($username); |
|
24 | 24 |
|
25 |
- $tokenurl = config('webinterface_url').'/init'.$token.'?agb=1'; |
|
25 |
+ $tokenurl = config('webinterface_url').'/init'.$token.'?agb=1'; |
|
26 | 26 |
|
27 |
- $msg = 'Sie haben für Ihren Zugang bei '.config('company_name').' ein neues Passwort angefordert. |
|
27 |
+ $msg = 'Sie haben für Ihren Zugang bei '.config('company_name').' ein neues Passwort angefordert. |
|
28 | 28 |
Bitte besuchen Sie folgende Adresse um Ihr Passwort neu zu setzen: |
29 | 29 |
'.$tokenurl.' |
30 | 30 |
|
31 | 31 |
Mit freundlichen Grüßen, |
32 | 32 |
Ihre Admins von '.config('company_name'); |
33 | 33 |
|
34 |
- $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."; |
|
34 |
+ $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."; |
|
35 | 35 |
|
36 |
- send_mail($email, "Passwortanforderung fuer schokokeks.org", $msg); |
|
36 |
+ send_mail($email, "Passwortanforderung fuer schokokeks.org", $msg); |
|
37 | 37 |
} |
38 | 38 |
|
39 | 39 |
function send_customer_token($customerno) |
40 | 40 |
{ |
41 |
- $customerno = (int) $customerno; |
|
42 |
- $token = get_customer_token($customerno); |
|
43 |
- $customer = get_customer_info($customerno); |
|
44 |
- if ($customer['email'] == '') |
|
45 |
- system_failure('Für Ihr Kundenkonto ist keine E-Mail-Adresse eingetragen. Diese Funktion steht Ihnen daher nicht zur Verfügung.'); |
|
46 |
- $anrede = "Sehr geehrte Damen und Herren"; |
|
47 |
- if ($customer['title'] == 'Herr') |
|
48 |
- $anrede = "Sehr geehrter Herr {$customer['name']}"; |
|
49 |
- elseif ($customer['title'] == 'Frau') |
|
50 |
- $anrede = "Sehr geehrte Frau {$customer['name']}"; |
|
51 |
- $msg = "{$anrede}, |
|
41 |
+ $customerno = (int) $customerno; |
|
42 |
+ $token = get_customer_token($customerno); |
|
43 |
+ $customer = get_customer_info($customerno); |
|
44 |
+ if ($customer['email'] == '') { |
|
45 |
+ system_failure('Für Ihr Kundenkonto ist keine E-Mail-Adresse eingetragen. Diese Funktion steht Ihnen daher nicht zur Verfügung.'); |
|
46 |
+ } |
|
47 |
+ $anrede = "Sehr geehrte Damen und Herren"; |
|
48 |
+ if ($customer['title'] == 'Herr') { |
|
49 |
+ $anrede = "Sehr geehrter Herr {$customer['name']}"; |
|
50 |
+ } elseif ($customer['title'] == 'Frau') { |
|
51 |
+ $anrede = "Sehr geehrte Frau {$customer['name']}"; |
|
52 |
+ } |
|
53 |
+ $msg = "{$anrede}, |
|
52 | 54 |
|
53 | 55 |
Sie haben auf unserem Web-Administrations-Interface ein neues |
54 | 56 |
Passwort für Ihren Kunden-Zugang angefordert. |
... | ... |
@@ -69,19 +71,16 @@ Diese Prozedur müssen Sie bis spätestens 24 Stunden nach Erhalt |
69 | 71 |
dieser Nachricht durchführen, sonst verliert das Token seine |
70 | 72 |
Gültigkeit. |
71 | 73 |
"; |
72 |
- send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg); |
|
74 |
+ send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg); |
|
73 | 75 |
} |
74 | 76 |
|
75 | 77 |
|
76 | 78 |
|
77 | 79 |
function send_mail($address, $subject, $body) |
78 | 80 |
{ |
79 |
- if (strstr($subject, "\n") !== false) |
|
80 |
- die("Zeilenumbruch im subject!"); |
|
81 |
- $header = "From: ".config('company_name')." Web Administration <noreply@".config('masterdomain').">\r\nReply-To: ".config('adminmail')."\r\nCc: ".config('adminmail')."\r\nContent-Type: text/plain; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 8bit"; |
|
82 |
- mail($address, $subject, $body, $header); |
|
81 |
+ if (strstr($subject, "\n") !== false) { |
|
82 |
+ die("Zeilenumbruch im subject!"); |
|
83 |
+ } |
|
84 |
+ $header = "From: ".config('company_name')." Web Administration <noreply@".config('masterdomain').">\r\nReply-To: ".config('adminmail')."\r\nCc: ".config('adminmail')."\r\nContent-Type: text/plain; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 8bit"; |
|
85 |
+ mail($address, $subject, $body, $header); |
|
83 | 86 |
} |
84 |
- |
|
85 |
- |
|
86 |
- |
|
87 |
-?> |
... | ... |
@@ -30,6 +30,9 @@ Bitte besuchen Sie folgende Adresse um Ihr Passwort neu zu setzen: |
30 | 30 |
|
31 | 31 |
Mit freundlichen Grüßen, |
32 | 32 |
Ihre Admins von '.config('company_name'); |
33 |
+ |
|
34 |
+ $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."; |
|
35 |
+ |
|
33 | 36 |
send_mail($email, "Passwortanforderung fuer schokokeks.org", $msg); |
34 | 37 |
} |
35 | 38 |
|
... | ... |
@@ -75,7 +78,7 @@ function send_mail($address, $subject, $body) |
75 | 78 |
{ |
76 | 79 |
if (strstr($subject, "\n") !== false) |
77 | 80 |
die("Zeilenumbruch im subject!"); |
78 |
- $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"; |
|
81 |
+ $header = "From: ".config('company_name')." Web Administration <noreply@".config('masterdomain').">\r\nReply-To: ".config('adminmail')."\r\nCc: ".config('adminmail')."\r\nContent-Type: text/plain; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 8bit"; |
|
79 | 82 |
mail($address, $subject, $body, $header); |
80 | 83 |
} |
81 | 84 |
|
... | ... |
@@ -17,6 +17,21 @@ Nevertheless, in case you use a significant part of this code, we ask (but not r |
17 | 17 |
require_once('newpass.php'); |
18 | 18 |
require_once('session/checkuser.php'); |
19 | 19 |
|
20 |
+function send_user_token($username) |
|
21 |
+{ |
|
22 |
+ $token = get_user_token($username); |
|
23 |
+ $email = emailaddress_for_user($username); |
|
24 |
+ |
|
25 |
+ $tokenurl = config('webinterface_url').'/init'.$token.'?agb=1'; |
|
26 |
+ |
|
27 |
+ $msg = 'Sie haben für Ihren Zugang bei '.config('company_name').' ein neues Passwort angefordert. |
|
28 |
+Bitte besuchen Sie folgende Adresse um Ihr Passwort neu zu setzen: |
|
29 |
+ '.$tokenurl.' |
|
30 |
+ |
|
31 |
+Mit freundlichen Grüßen, |
|
32 |
+Ihre Admins von '.config('company_name'); |
|
33 |
+ send_mail($email, "Passwortanforderung fuer schokokeks.org", $msg); |
|
34 |
+} |
|
20 | 35 |
|
21 | 36 |
function send_customer_token($customerno) |
22 | 37 |
{ |
... | ... |
@@ -24,7 +39,7 @@ function send_customer_token($customerno) |
24 | 39 |
$token = get_customer_token($customerno); |
25 | 40 |
$customer = get_customer_info($customerno); |
26 | 41 |
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.') |
|
42 |
+ system_failure('Für Ihr Kundenkonto ist keine E-Mail-Adresse eingetragen. Diese Funktion steht Ihnen daher nicht zur Verfügung.'); |
|
28 | 43 |
$anrede = "Sehr geehrte Damen und Herren"; |
29 | 44 |
if ($customer['title'] == 'Herr') |
30 | 45 |
$anrede = "Sehr geehrter Herr {$customer['name']}"; |
... | ... |
@@ -1,4 +1,19 @@ |
1 | 1 |
<?php |
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 |
+ |
|
2 | 17 |
require_once('newpass.php'); |
3 | 18 |
require_once('session/checkuser.php'); |
4 | 19 |
|
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1680 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -8,7 +8,8 @@ function send_customer_token($customerno) |
8 | 8 |
$customerno = (int) $customerno; |
9 | 9 |
$token = get_customer_token($customerno); |
10 | 10 |
$customer = get_customer_info($customerno); |
11 |
- $email = get_customer_email($customerno); |
|
11 |
+ if ($customer['email'] == '') |
|
12 |
+ system_failure('Für Ihr Kundenkonto ist keine E-Mail-Adresse eingetragen. Diese Funktion steht Ihnen daher nicht zur Verfügung.') |
|
12 | 13 |
$anrede = "Sehr geehrte Damen und Herren"; |
13 | 14 |
if ($customer['title'] == 'Herr') |
14 | 15 |
$anrede = "Sehr geehrter Herr {$customer['name']}"; |
... | ... |
@@ -35,7 +36,7 @@ Diese Prozedur müssen Sie bis spätestens 24 Stunden nach Erhalt |
35 | 36 |
dieser Nachricht durchführen, sonst verliert das Token seine |
36 | 37 |
Gültigkeit. |
37 | 38 |
"; |
38 |
- send_mail($email, "Passwortanforderung fuer Webinterface", $msg); |
|
39 |
+ send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg); |
|
39 | 40 |
} |
40 | 41 |
|
41 | 42 |
|
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1376 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -22,11 +22,11 @@ Diese automatische Nachricht dient der Überprüfung Ihrer Identität. |
22 | 22 |
|
23 | 23 |
Um sich ein neues Passwort setzen zu können, rufen Sie bitte den |
24 | 24 |
folgenden Link auf: |
25 |
- https://config.schokokeks.org/go/index/validate_token.php?customerno={$customer['customerno']}&token={$token} |
|
25 |
+ ".config('webinterface_url')."/go/index/validate_token.php?customerno={$customer['customerno']}&token={$token} |
|
26 | 26 |
|
27 | 27 |
Sollte Ihr E-Mail-Programm diesen Link nicht korrekt an den Browser |
28 | 28 |
übertragen, rufen Sie bitte die Seite |
29 |
- https://config.schokokeks.org/go/index/validate_token.php |
|
29 |
+ ".config('webinterface_url')."/go/index/validate_token.php |
|
30 | 30 |
auf und geben Sie die folgenden Daten ein: |
31 | 31 |
Kundennummer: {$customer['customerno']} |
32 | 32 |
Token: {$token} |
... | ... |
@@ -44,7 +44,7 @@ function send_mail($address, $subject, $body) |
44 | 44 |
{ |
45 | 45 |
if (strstr($subject, "\n") !== false) |
46 | 46 |
die("Zeilenumbruch im subject!"); |
47 |
- $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"; |
|
47 |
+ $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"; |
|
48 | 48 |
mail($address, $subject, $body, $header); |
49 | 49 |
} |
50 | 50 |
|
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@362 87cf0b9e-d624-0410-a070-f6ee81989793
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,53 @@ |
1 |
+<?php |
|
2 |
+require_once('newpass.php'); |
|
3 |
+require_once('session/checkuser.php'); |
|
4 |
+ |
|
5 |
+ |
|
6 |
+function send_customer_token($customerno) |
|
7 |
+{ |
|
8 |
+ $customerno = (int) $customerno; |
|
9 |
+ $token = get_customer_token($customerno); |
|
10 |
+ $customer = get_customer_info($customerno); |
|
11 |
+ $email = get_customer_email($customerno); |
|
12 |
+ $anrede = "Sehr geehrte Damen und Herren"; |
|
13 |
+ if ($customer['title'] == 'Herr') |
|
14 |
+ $anrede = "Sehr geehrter Herr {$customer['name']}"; |
|
15 |
+ elseif ($customer['title'] == 'Frau') |
|
16 |
+ $anrede = "Sehr geehrte Frau {$customer['name']}"; |
|
17 |
+ $msg = "{$anrede}, |
|
18 |
+ |
|
19 |
+Sie haben auf unserem Web-Administrations-Interface ein neues |
|
20 |
+Passwort für Ihren Kunden-Zugang angefordert. |
|
21 |
+Diese automatische Nachricht dient der Überprüfung Ihrer Identität. |
|
22 |
+ |
|
23 |
+Um sich ein neues Passwort setzen zu können, rufen Sie bitte den |
|
24 |
+folgenden Link auf: |
|
25 |
+ https://config.schokokeks.org/go/index/validate_token.php?customerno={$customer['customerno']}&token={$token} |
|
26 |
+ |
|
27 |
+Sollte Ihr E-Mail-Programm diesen Link nicht korrekt an den Browser |
|
28 |
+übertragen, rufen Sie bitte die Seite |
|
29 |
+ https://config.schokokeks.org/go/index/validate_token.php |
|
30 |
+auf und geben Sie die folgenden Daten ein: |
|
31 |
+ Kundennummer: {$customer['customerno']} |
|
32 |
+ Token: {$token} |
|
33 |
+ |
|
34 |
+Diese Prozedur müssen Sie bis spätestens 24 Stunden nach Erhalt |
|
35 |
+dieser Nachricht durchführen, sonst verliert das Token seine |
|
36 |
+Gültigkeit. |
|
37 |
+"; |
|
38 |
+ send_mail($email, "Passwortanforderung fuer Webinterface", $msg); |
|
39 |
+} |
|
40 |
+ |
|
41 |
+ |
|
42 |
+ |
|
43 |
+function send_mail($address, $subject, $body) |
|
44 |
+{ |
|
45 |
+ if (strstr($subject, "\n") !== false) |
|
46 |
+ die("Zeilenumbruch im subject!"); |
|
47 |
+ $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"; |
|
48 |
+ mail($address, $subject, $body, $header); |
|
49 |
+} |
|
50 |
+ |
|
51 |
+ |
|
52 |
+ |
|
53 |
+?> |