0d0cc0d8829805029bf7034b9f25bdfda20410e8
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)       sync_autorecords();
32)       if (! $debugmode)
33)         header("Location: dns_domain?dom={$dom->id}");
34)     }
35)     elseif ($sure === false)
36)     {
37)       if (! $debugmode)
38)         header("Location: dns_domain?dom={$dom->id}");
39)     }
40)   }
41)   elseif ($_GET['action'] == 'disable')
42)   {
43)     $dom = new Domain( (int) $_GET['dom'] );
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

44)     $dom->ensure_userdomain();