Neues Modul: Kann greylisti...
bernd authored 17 years ago
|
1) <?php
|
Added license tags for CC0,...
Bernd Wurst authored 13 years ago
|
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4)
|
Copyright year update
Bernd Wurst authored 7 years ago
|
5) Written 2008-2018 by schokokeks.org Hosting, namely
|
Added license tags for CC0,...
Bernd Wurst authored 13 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)
|
Fix coding style with php-c...
Hanno authored 6 years ago
|
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
|
Added license tags for CC0,...
Bernd Wurst authored 13 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)
|
Neues Modul: Kann greylisti...
bernd authored 17 years ago
|
17) require_once('inc/debug.php');
18) require_once('inc/security.php');
19)
20) require_once('greylisting.php');
21)
22)
|
Fix coding style with php-c...
Hanno authored 6 years ago
|
23) if ($_GET['action'] == 'delete') {
24) $entry = get_whitelist_details($_GET['id']);
25) $sure = user_is_sure();
26) if ($sure === null) {
27) are_you_sure("action=delete&id={$entry['id']}", "Möchten Sie die E-Mail-Adresse »{$entry['local']}@{$entry['domain']}« von der Ausnahmeliste entfernen?");
28) } elseif ($sure === true) {
29) delete_from_whitelist($entry['id']);
30) if (! $debugmode) {
31) header("Location: whitelist");
32) }
33) } elseif ($sure === false) {
34) if (! $debugmode) {
35) header("Location: whitelist");
36) }
37) }
38) } elseif ($_GET['action'] == 'add') {
39) check_form_token('greylisting_add');
40) if (!filter_var($_POST['address'], FILTER_VALIDATE_EMAIL)
41) && !filter_var("x@".$_POST['address'], FILTER_VALIDATE_EMAIL)) {
42) system_failure("Sie haben eine ungültige Mailadresse eingegeben.");
43) }
44) $local = false;
45) $domain = '';
46) $at = strrpos($_POST['address'], '@');
47) if ($at === false) {
48) $domain = $_POST['address'];
49) } else {
50) $local = substr($_POST['address'], 0, $at);
51) $domain = substr($_POST['address'], $at+1);
52) }
53) DEBUG("Whitelisting {$local}@{$domain} for {$_POST['expire']} minutes");
54) new_whitelist_entry($local, $domain, $_POST['expire']);
55) if (! $debugmode) {
56) header("Location: whitelist");
57) }
|