39adb18522edb2b8d761cb2d4741077f1f3ac6ec
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

1) <?php
2) 
3) require_once('inc/base.php');
4) require_once('inc/debug.php');
5) global $debugmode;
6) require_once('inc/security.php');
7) 
8) require_once('class/domain.php');
9) 
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

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

bernd authored 14 years ago

11) 
12) require_once('dnsinclude.php');
13) 
14) $section = 'dns_dns';
15) 
16) if ($_GET['type'] == 'autodns')
17) {
18)   if ($_GET['action'] == 'enable')
19)   {
20)     $dom = new Domain( (int) $_GET['dom'] );
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

21)     $dom->ensure_userdomain();
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

22) 
23)     $sure = user_is_sure();
24)     if ($sure === NULL)
25)     {
26)       are_you_sure("type=autodns&action=enable&dom={$dom->id}", "Möchten Sie die automatischen DNS-records für {$dom->fqdn} einschalten?");
27)     }
28)     elseif ($sure === true)
29)     {
30)       enable_autorecords($dom->id);
31)       if (! $debugmode)
32)         header("Location: dns_domain?dom={$dom->id}");
33)     }
34)     elseif ($sure === false)
35)     {
36)       if (! $debugmode)
37)         header("Location: dns_domain?dom={$dom->id}");
38)     }
39)   }
40)   elseif ($_GET['action'] == 'disable')
41)   {
42)     $dom = new Domain( (int) $_GET['dom'] );
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

43)     $dom->ensure_userdomain();