f349fb8dc2ca7b382fb21ffe2ce036a2c0f9ea6f
bernd Großer VMail-move

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 2 years 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 2 years 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) */
bernd Großer VMail-move

bernd authored 16 years ago

13) 
14) require_once('session/start.php');
15) require_once('vmail.php');
16) 
17) require_once("inc/debug.php");
18) global $debugmode;
19) 
20) require_role(ROLE_SYSTEMUSER);
21) 
22) check_form_token('vmail_domainchange');
23) 
Bernd Wurst Bugfix für nomail-Option un...

Bernd Wurst authored 1 year ago

24) $newsetting = [];
25) $newdkimsetting = [];
Bernd Wurst Redesign der Domain-Mail-Ve...

Bernd Wurst authored 10 years ago

26) foreach ($_POST as $key => $value) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

27)     if (strpos($key, "option-") === 0) {
28)         $id = substr($key, 7);
Bernd Wurst Bugfix für nomail-Option un...

Bernd Wurst authored 1 year ago

29)         $newsetting[$id] = 'virtual';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

30)         if ($value == 'manual') {
Bernd Wurst Bugfix für nomail-Option un...

Bernd Wurst authored 1 year ago

31)             $newsetting[$id] = 'auto';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

32)         } elseif ($value == 'off') {
Bernd Wurst Bugfix für nomail-Option un...

Bernd Wurst authored 1 year ago

33)             $newsetting[$id] = 'none';
34)         }
35)     }
36)     if (strpos($key, "nomail-") === 0) {
37)         $id = substr($key, 7);
38)         if ($value == 'nomail' && (!isset($newsetting[$id]) || $newsetting[$id] == 'none')) {
39)             $newsetting[$id] = 'nomail';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

40)         }
Bernd Wurst Redesign der Domain-Mail-Ve...

Bernd Wurst authored 10 years ago

41)     }
Bernd Wurst DKIM-Auswahl eingebaut

Bernd Wurst authored 1 year ago

42)     if (strpos($key, "dkim-") === 0) {
43)         $id = substr($key, 5);
Bernd Wurst Bugfix für nomail-Option un...

Bernd Wurst authored 1 year ago

44)         $newdkimsetting[$id] = 'none';
Bernd Wurst DKIM-Auswahl eingebaut

Bernd Wurst authored 1 year ago

45)         if ($value == 'dkim') {
Bernd Wurst Bugfix für nomail-Option un...

Bernd Wurst authored 1 year ago

46)             $newdkimsetting[$id] = 'dkim';
Bernd Wurst DKIM-Auswahl eingebaut

Bernd Wurst authored 1 year ago

47)         } elseif ($value == 'dmarc') {
Bernd Wurst Bugfix für nomail-Option un...

Bernd Wurst authored 1 year ago

48)             $newdkimsetting[$id] = 'dmarc';
Bernd Wurst DKIM-Auswahl eingebaut

Bernd Wurst authored 1 year ago

49)         }
50)     }
Bernd Wurst Redesign der Domain-Mail-Ve...

Bernd Wurst authored 10 years ago

51) }
Bernd Wurst Bugfix für nomail-Option un...

Bernd Wurst authored 1 year ago

52) foreach ($newsetting as $id => $type) {
53)         DEBUG('MAILCONFIG change request for id #' . $id . ' to ' . $type);
54)         change_domain($id, $type);
55)         if ($type == "nomail" || $type == "none") {
56)             // DKIM muss abgeschaltet sein, wenn das DKIM-UI nicht mehr angezeigt wird
57)             $newdkimsetting[$id] = 'none';
58)         }
59) }
60) foreach ($newdkimsetting as $id => $type) {
61)         DEBUG('DKIM change request for id #' . $id . ' to ' . $type);
62)         change_domain_dkim($id, $type);
63) }
bernd Großer VMail-move

bernd authored 16 years ago

64) 
65) if (!$debugmode) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

66)     header('Location: domains');
67)     die();