5effc2bd7685822df276c1372dab480cff321941
bernd DNs-record-Interface ist je...

bernd authored 15 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) 
Bernd Wurst Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

5) Written 2008-2014 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) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) 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.
15) */
bernd DNs-record-Interface ist je...

bernd authored 15 years ago

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

bernd authored 13 years ago

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

bernd authored 15 years ago

23) 
24) require_once('dnsinclude.php');
25) 
26) $section = 'dns_dns';
27) 
28) 
29) $record = NULL;
30) 
31) $id = NULL;
32) if ($_REQUEST['id'] == 'new')
33) {
34)   $record = blank_dns_record($_REQUEST['type']);
35) }
36) else
37) {
38)   $id = (int) $_REQUEST['id'];
39)   $record = get_dns_record($id);
40) }
41) 
42) 
bernd SPF und TXT records

bernd authored 14 years ago

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

bernd authored 15 years ago

44)   $sure = user_is_sure();
45)   if ($sure === NULL)
46)   {
47)     $domain = new Domain((int) $record['domain']);
48)     $fqdn = $domain->fqdn;
49)     if ($record['hostname'])
50)     {
51)       $fqdn = $record['hostname'].'.'.$fqdn;
52)     }
53)     are_you_sure("action=delete&id={$id}", "Möchten Sie den ".strtoupper($record['type'])."-Record für ".$fqdn." wirklich löschen?");
54)   }
55)   elseif ($sure === true)
56)   {
57)     delete_dns_record($id);
58)     if (! $debugmode)
59)       header("Location: dns_domain?dom=".$record['domain']);
60)   }
61)   elseif ($sure === false)
62)   {
63)     if (! $debugmode)
64)       header("Location: dns_domain?dom=".$record['domain']);
65)   }
66) }
67) else
68) {
69)   // Sicherheitsprüfungen passieren im Backend
70)   
71)   $record['hostname'] = $_REQUEST['hostname'];
72)   $record['domain'] = (int) $_REQUEST['domain'];
Bernd Wurst * Weitere Module auf prepar...

Bernd Wurst authored 10 years ago

73)   $record['ip'] = (isset($_REQUEST['ip']) ? $_REQUEST['ip'] : NULL);
74)   $record['data'] = (isset($_REQUEST['data']) ? $_REQUEST['data'] : NULL);
75)   $record['dyndns'] = (isset($_REQUEST['dyndns']) ? (int) $_REQUEST['dyndns'] : NULL);
76)   $record['spec'] = (isset($_REQUEST['spec']) ? (int) $_REQUEST['spec'] : NULL);