28667e96bdcc072a7485ff50021f54f555c59ea3
bernd Autodns ein- und ausschaltb...

bernd authored 14 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 1 year 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 1 year 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 Autodns ein- und ausschaltb...

bernd authored 14 years ago

13) 
14) require_once('inc/base.php');
15) require_once('inc/debug.php');
16) global $debugmode;
17) require_once('inc/security.php');
18) 
19) require_once('class/domain.php');
20) 
bernd Erlaube *useraccounts* das...

bernd authored 14 years ago

21) require_role(ROLE_SYSTEMUSER);
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

22) 
23) require_once('dnsinclude.php');
24) 
25) $section = 'dns_dns';
26) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

27) if ($_GET['type'] == 'autodns') {
28)     if ($_GET['action'] == 'enable') {
29)         $dom = new Domain((int) $_GET['dom']);
30)         $dom->ensure_userdomain();
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

31) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

32)         $sure = user_is_sure();
33)         if ($sure === null) {
34)             are_you_sure("type=autodns&action=enable&dom={$dom->id}", "Möchten Sie die automatischen DNS-records für {$dom->fqdn} einschalten?");
35)         } elseif ($sure === true) {
36)             enable_autorecords($dom->id);
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

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

Hanno authored 5 years ago

38)                 header("Location: dns_domain?dom={$dom->id}");
39)             }
40)         } elseif ($sure === false) {
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

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

Hanno authored 5 years ago

42)                 header("Location: dns_domain?dom={$dom->id}");
43)             }
44)         }
45)     } elseif ($_GET['action'] == 'disable') {
46)         $dom = new Domain((int) $_GET['dom']);
47)         $dom->ensure_userdomain();
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

48) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

49)         $sure = user_is_sure();
50)         if ($sure === null) {
51)             are_you_sure("type=autodns&action=disable&dom={$dom->id}", "Möchten Sie die automatischen DNS-records für {$dom->fqdn} in manuelle Einträge umwandeln?");
52)         } elseif ($sure === true) {
53)             convert_from_autorecords($dom->id);
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

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

Hanno authored 5 years ago

55)                 header("Location: dns_domain?dom={$dom->id}");
56)             }
57)         } elseif ($sure === false) {
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

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

Hanno authored 5 years ago

59)                 header("Location: dns_domain?dom={$dom->id}");
60)             }
61)         }