c208bd906b3991555db11b9229846c4601ca408c
bernd git-svn-id: https://svn.sch...

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) 
5) Written 2008-2012 by schokokeks.org Hosting, namely
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 git-svn-id: https://svn.sch...

bernd authored 15 years ago

16) 
17) require_once('inc/base.php');
18) require_once('inc/security.php');
19) 
20) require_once('class/domain.php');
21) 
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

22) require_role(ROLE_SYSTEMUSER);
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

23) 
24) require_once('dnsinclude.php');
25) 
26) $section = 'dns_dns';
27) 
28) $domain = new Domain((int) $_REQUEST['dom']);
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

29) $domain->ensure_userdomain();
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

30) 
31) DEBUG($domain);
32) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

33) title('DNS-Records für '.filter_input_general($domain->fqdn));
34) headline('DNS-Records für <em>'.filter_input_general($domain->fqdn).'</em>');
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

35) 
36) $records = get_domain_records($domain->id);
37) $auto_records = get_domain_auto_records($domain->fqdn);
38) 
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

39) output('<table><tr><th>Hostname</th><th>Typ</th><th>IP-Adresse/Inhalt</th><th>TTL</th><th>&#160;</th></tr>
40) ');
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

41) foreach ($records AS $rec)
42) {
43)   $data = ( $rec['ip'] ? $rec['ip'] : $rec['data'] );
44)   if ($rec['dyndns'])
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

45)   {
46)     $dyndns = get_dyndns_account($rec['dyndns']);
47)     $data = internal_link('dyndns_edit', '<em>DynDNS #'.$rec['dyndns'].' ('.$dyndns['handle'].')</em>', 'id='.$rec['dyndns']);
48)   }
49)   if ($rec['type'] == 'mx')
50)   {
51)     $data .= ' ('.$rec['spec'].')';
52)   }
bernd SSHFP-Records (Thanks to Ma...

bernd authored 12 years ago

53)   if ($rec['type'] == 'sshfp')
54)   {
55)     $data = $rec['spec'] . ' 1 ' . $data;
56)   }
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

57)   $ttl = ($rec['ttl'] ? $rec['ttl'] : 3600);
bernd Nur edit-links für bekannte...

bernd authored 14 years ago

58)   $link = $rec['fqdn'];
bernd SSHFP-Records (Thanks to Ma...

bernd authored 12 years ago

59)   if (in_array($rec['type'], array('a', 'aaaa', 'mx', 'cname', 'ns', 'txt', 'spf', 'ptr', 'sshfp'))) {
bernd Nur edit-links für bekannte...

bernd authored 14 years ago

60)       $link = internal_link('dns_record_edit', $rec['fqdn'], "id={$rec['id']}");
61)   }
62)   output("<tr><td>{$link}</td><td>".strtoupper($rec['type'])."</td><td>$data</td><td>{$ttl} Sek.</td><td>".internal_link('dns_record_save', '<img src="'.$prefix.'images/delete.png" width="16" height="16" alt="löschen" title="Record löschen" />', "id={$rec['id']}&action=delete")."</td></tr>\n");
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

63) }  
64) foreach ($auto_records AS $rec)
65) {
66)   $data = ( $rec['ip'] ? $rec['ip'] : $rec['data'] );
67)   $ttl = ($rec['ttl'] ? $rec['ttl'] : 3600);
bernd Einige Dummheiten repariert...

bernd authored 14 years ago

68)   output("<tr><td><em>{$rec['fqdn']}</em></td><td>".strtoupper($rec['type'])."</td><td>$data</td><td>{$ttl} Sek.</td><td>&#160;</td></tr>\n");
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

69)   
70) }
71) 
72) 
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

73) output('</table>');
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

74) 
75) if ($domain->autodns)
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

76)   output('<p style="font-size: 80%;"><em>Kursive Hostnames bezeichnen automatisch erzeugte Records. Diese können nicht geändert werden.</em></p>');
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

77) else
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

78)   output('<p style="font-size: 80%;"><em>Für diese Domain wurde die Erzeugung automatischer Records deaktiviert.</em></p>');
79) 
80) 
81) output('<h4>Neuen DNS-Record anlegen</h4>
82) <p>Je nach dem, welchen Eintrags-Typ Sie anlegen möchten, werden im nächsten Schritt unterschiedliche Daten abgefragt. Bitte klicken Sie auf den Eintrags-Typ, den Sie anlegen möchten. Momentan werden noch nicht alle Eintrags-Typen über dieses System bereitgestellt. Hier nicht aufgeführte Eintragsarten können Sie beim Support beantragen.</p>
83) 
84) <ul>
bernd Typo

bernd authored 14 years ago

85) <li>'.internal_link('dns_record_edit', 'DynDNS (Hostname für einen DynDNS-Account setzen)', 'id=new&type=dyndns&domain='.$domain->id).'</li>
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

86) <li>'.internal_link('dns_record_edit', 'A (normaler Hostname/normale Subdomain)', 'id=new&type=a&domain='.$domain->id).'</li>
87) <li>'.internal_link('dns_record_edit', 'MX (Posteingangsserver)', 'id=new&type=mx&domain='.$domain->id).'</li>
88) </ul>
89) <ul>
90) <li>'.internal_link('dns_record_edit', 'AAAA (IPv6-Adresse)', 'id=new&type=aaaa&domain='.$domain->id).'</li>
91) <li>'.internal_link('dns_record_edit', 'CNAME (Aliasnamen)', 'id=new&type=cname&domain='.$domain->id).'</li>
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

92) <li>'.internal_link('dns_record_edit', 'NS (Nameserver)', 'id=new&type=ns&domain='.$domain->id).'</li>
93) <li>'.internal_link('dns_record_edit', 'SPF (sender policy framework)', 'id=new&type=spf&domain='.$domain->id).'</li>
bernd SPF und TXT records

bernd authored 14 years ago

94) <li>'.internal_link('dns_record_edit', 'TXT', 'id=new&type=txt&domain='.$domain->id).'</li>
bernd SSHFP-Records (Thanks to Ma...

bernd authored 12 years ago

95) <li>'.internal_link('dns_record_edit', 'SSHFP', 'id=new&type=sshfp&domain='.$domain->id).'</li>
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

96) </ul>
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

97) 
98) <h4>Automatische DNS-Records</h4>
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

99) ');
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

100) 
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

101) if ($domain->autodns)
102) {
103)   output("<p>Automatische Einträge können nicht geändert werden. Möchten Sie davon abweichende Records setzen, so können Sie hiermit alle automatischen Einträge in normale Einträge konvertieren und die Erzeugung neuer automatischer Einträge abschalten. Diese Einstellung betrifft nur diese Domain und kann jederzeit geändert werden.</p>
104) <p>".internal_link('dns_save', 'Automatisch erzeugte Einträge umwandeln', "type=autodns&action=disable&dom={$domain->id}")."</p>");
105) }
106) else
107) {
108)   output("<p>Sie verwealten Ihre DNS-Einträge selbst. Wenn Sie möchten, können Sie die DNS-Einträge auch automatisch anhand der angelegten Webserver-VHosts und anderer Einstellungen festlegen lassen. Diese Eintäge können Sie dann nicht direkt ändern. Ihre bestehenden Einträge bleiben unberührt und zusätzlich erhalten. Bitte löschen Sie dadurch entstehende Duplikate!</p>
109) <p>".internal_link('dns_save', 'Automatisch erzeugte Einträge aktivieren', "type=autodns&action=enable&dom={$domain->id}")."</p>");
110) }
111)