1aaaa700cdfda9c1e0bd92741205d07d8e0132de
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

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

bernd authored 13 years ago

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

bernd authored 15 years ago

9) 
10) require_once('dnsinclude.php');
11) 
12) $section = 'dns_dns';
13) 
14) $domain = new Domain((int) $_REQUEST['dom']);
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

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

bernd authored 15 years ago

16) 
17) DEBUG($domain);
18) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

bernd authored 15 years ago

21) 
22) $records = get_domain_records($domain->id);
23) $auto_records = get_domain_auto_records($domain->fqdn);
24) 
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

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

bernd authored 15 years ago

27) foreach ($records AS $rec)
28) {
29)   $data = ( $rec['ip'] ? $rec['ip'] : $rec['data'] );
30)   if ($rec['dyndns'])
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

31)   {
32)     $dyndns = get_dyndns_account($rec['dyndns']);
33)     $data = internal_link('dyndns_edit', '<em>DynDNS #'.$rec['dyndns'].' ('.$dyndns['handle'].')</em>', 'id='.$rec['dyndns']);
34)   }
35)   if ($rec['type'] == 'mx')
36)   {
37)     $data .= ' ('.$rec['spec'].')';
38)   }
bernd SSHFP-Records (Thanks to Ma...

bernd authored 12 years ago

39)   if ($rec['type'] == 'sshfp')
40)   {
41)     $data = $rec['spec'] . ' 1 ' . $data;
42)   }
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

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

bernd authored 14 years ago

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

bernd authored 12 years ago

45)   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

46)       $link = internal_link('dns_record_edit', $rec['fqdn'], "id={$rec['id']}");
47)   }
48)   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

49) }  
50) foreach ($auto_records AS $rec)
51) {
52)   $data = ( $rec['ip'] ? $rec['ip'] : $rec['data'] );
53)   $ttl = ($rec['ttl'] ? $rec['ttl'] : 3600);
bernd Einige Dummheiten repariert...

bernd authored 14 years ago

54)   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

55)   
56) }
57) 
58) 
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

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

bernd authored 15 years ago

60) 
61) if ($domain->autodns)
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

62)   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

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

bernd authored 14 years ago

64)   output('<p style="font-size: 80%;"><em>Für diese Domain wurde die Erzeugung automatischer Records deaktiviert.</em></p>');
65) 
66) 
67) output('<h4>Neuen DNS-Record anlegen</h4>
68) <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>
69) 
70) <ul>
bernd Typo

bernd authored 14 years ago

71) <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

72) <li>'.internal_link('dns_record_edit', 'A (normaler Hostname/normale Subdomain)', 'id=new&type=a&domain='.$domain->id).'</li>
73) <li>'.internal_link('dns_record_edit', 'MX (Posteingangsserver)', 'id=new&type=mx&domain='.$domain->id).'</li>
74) </ul>
75) <ul>
76) <li>'.internal_link('dns_record_edit', 'AAAA (IPv6-Adresse)', 'id=new&type=aaaa&domain='.$domain->id).'</li>
77) <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

78) <li>'.internal_link('dns_record_edit', 'NS (Nameserver)', 'id=new&type=ns&domain='.$domain->id).'</li>
79) <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

80) <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

81) <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

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 15 years ago

86) 
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

87) if ($domain->autodns)
88) {
89)   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>
90) <p>".internal_link('dns_save', 'Automatisch erzeugte Einträge umwandeln', "type=autodns&action=disable&dom={$domain->id}")."</p>");
91) }
92) else
93) {
94)   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>
95) <p>".internal_link('dns_save', 'Automatisch erzeugte Einträge aktivieren', "type=autodns&action=enable&dom={$domain->id}")."</p>");
96) }
97)