0d0cc0d8829805029bf7034b9f25bdfda20410e8
bernd DNs-record-Interface ist je...

bernd authored 15 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) 
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

8) require_role(ROLE_SYSTEMUSER);
bernd DNs-record-Interface ist je...

bernd authored 15 years ago

9) 
10) require_once('dnsinclude.php');
11) 
12) $section = 'dns_dns';
13) 
14) 
15) $record = NULL;
16) 
17) $id = NULL;
18) if ($_REQUEST['id'] == 'new')
19) {
20)   $record = blank_dns_record($_REQUEST['type']);
21) }
22) else
23) {
24)   $id = (int) $_REQUEST['id'];
25)   $record = get_dns_record($id);
26) }
27) 
28) 
bernd SPF und TXT records

bernd authored 14 years ago

29) if (isset($_GET['action']) && ($_GET['action'] == 'delete')) {
bernd DNs-record-Interface ist je...

bernd authored 15 years ago

30)   $sure = user_is_sure();
31)   if ($sure === NULL)
32)   {
33)     $domain = new Domain((int) $record['domain']);
34)     $fqdn = $domain->fqdn;
35)     if ($record['hostname'])
36)     {
37)       $fqdn = $record['hostname'].'.'.$fqdn;
38)     }
39)     are_you_sure("action=delete&id={$id}", "Möchten Sie den ".strtoupper($record['type'])."-Record für ".$fqdn." wirklich löschen?");
40)   }
41)   elseif ($sure === true)
42)   {
43)     delete_dns_record($id);
44)     if (! $debugmode)
45)       header("Location: dns_domain?dom=".$record['domain']);
46)   }
47)   elseif ($sure === false)
48)   {
49)     if (! $debugmode)
50)       header("Location: dns_domain?dom=".$record['domain']);
51)   }
52) }
53) else
54) {
55)   // Sicherheitsprüfungen passieren im Backend
56)   
57)   $record['hostname'] = $_REQUEST['hostname'];
58)   $record['domain'] = (int) $_REQUEST['domain'];
bernd SPF und TXT records

bernd authored 14 years ago

59)   $record['ip'] = (isset($_REQUEST['ip']) ? $_REQUEST['ip'] : '');
bernd DNs-record-Interface ist je...

bernd authored 15 years ago

60)   $record['data'] = $_REQUEST['data'];
bernd SPF und TXT records

bernd authored 14 years ago

61)   $record['dyndns'] = (isset($_REQUEST['dyndns']) ? (int) $_REQUEST['dyndns'] : '');
62)   $record['spec'] = (isset($_REQUEST['spec']) ? (int) $_REQUEST['spec'] : '');