f2550e90ad37215b9d890155806986336bf0170c
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 14 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 14 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 15 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 15 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 git-svn-id: https://svn.sch...

bernd authored 15 years ago

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

bernd authored 14 years ago

40)   $link = $rec['fqdn'];
bernd PTR editierbar

bernd authored 14 years ago

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

bernd authored 14 years ago

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

45) }  
46) foreach ($auto_records AS $rec)
47) {
48)   $data = ( $rec['ip'] ? $rec['ip'] : $rec['data'] );
49)   $ttl = ($rec['ttl'] ? $rec['ttl'] : 3600);
bernd Einige Dummheiten repariert...

bernd authored 14 years ago

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

51)   
52) }
53) 
54) 
bernd DNs-record-Interface ist je...

bernd authored 15 years ago

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

bernd authored 15 years ago

56) 
57) if ($domain->autodns)
bernd DNs-record-Interface ist je...

bernd authored 15 years ago

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

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

bernd authored 15 years ago

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

bernd authored 15 years ago

67) <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 15 years ago

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

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

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

bernd authored 15 years ago

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

bernd authored 14 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

81) 
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

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