0d0cc0d8829805029bf7034b9f25bdfda20410e8
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 DNs-record-Interface ist je...

bernd authored 14 years ago

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

bernd authored 15 years ago

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

bernd authored 14 years ago

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

bernd authored 15 years ago

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

bernd authored 14 years ago

30)   {
31)     $dyndns = get_dyndns_account($rec['dyndns']);
32)     $data = internal_link('dyndns_edit', '<em>DynDNS #'.$rec['dyndns'].' ('.$dyndns['handle'].')</em>', 'id='.$rec['dyndns']);
33)   }
34)   if ($rec['type'] == 'mx')
35)   {
36)     $data .= ' ('.$rec['spec'].')';
37)   }
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

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

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

bernd authored 14 years ago

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

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

bernd authored 14 years ago

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

bernd authored 15 years ago

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

bernd authored 14 years ago

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

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

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

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

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 15 years ago

80) 
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

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