2626dd47daad110c63a82c0560b134e2364eeac3
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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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) 
Bernd Wurst Mache manuelle NS-Records n...

Bernd Wurst authored 6 years ago

17) require_once('inc/icons.php');
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

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) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

36) if ($domain->provider != 'terions' || $domain->billing != 'regular' || $domain->registrierungsdatum == null || $domain->kuendigungsdatum != null) {
Bernd Wurst Zeige Warnung für falsche/e...

Bernd Wurst authored 6 years ago

37)     $state = check_dns($domain->domainname, $domain->tld);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

38)     if ($state !== true) {
Bernd Wurst Zeige Warnung für falsche/e...

Bernd Wurst authored 6 years ago

39)         $current = 'Momentaner DNS-Server (u.A.): '.$state;
40)         if ($state == 'NXDOMAIN') {
41)             $current = 'Diese Domain ist aktuell nicht registriert.';
42)         }
43)         if (substr_compare($state, config('masterdomain'), -strlen(config('masterdomain')), strlen(config('masterdomain'))) === 0) {
44)             warning('Es werden veraltete DNS-Server benutzt: '.$current);
45)             warning('Bitte aktualisieren Sie diese Domain bei Ihrem Registrar auf unsere aktuellen DNS-Server-Namen, die Sie auf der Übersichtsseite finden.');
46)         } else {
47)             warning('Lokaler DNS-Server eingeschaltet aber nicht genutzt. '.$current);
48)         }
49)     }
50) }
51) 
52) 
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

53) $records = get_domain_records($domain->id);
54) $auto_records = get_domain_auto_records($domain->fqdn);
Bernd Wurst Mache manuelle NS-Records n...

Bernd Wurst authored 6 years ago

55) $cname_on_domain = false;
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

56) 
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

57) output('<table><tr><th>Hostname</th><th>Typ</th><th>IP-Adresse/Inhalt</th><th>TTL</th><th>&#160;</th></tr>
58) ');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

59) foreach ($records as $rec) {
60)     $editable = true;
61)     $data = filter_input_general($rec['ip'] ? $rec['ip'] : $rec['data']);
62)     if ($rec['dyndns']) {
63)         if ($domain->fqdn == config('masterdomain')) {
64)             $data = '<em>DynDNS #'.(int) $rec['dyndns'].'</em>';
65)             $editable = false;
66)         } else {
67)             $dyndns = get_dyndns_account($rec['dyndns']);
68)             if ($dyndns === null) {
69)                 $data = '<em>DynDNS #'.(int) $rec['dyndns'].' (nicht Ihr Account)</em>';
70)             } else {
71)                 $data = internal_link('dyndns_edit', '<em>DynDNS #'.(int) $rec['dyndns'].' ('.filter_input_general($dyndns['handle']).')</em>', 'id='.(int) $rec['dyndns']);
72)             }
73)         }
74)     }
75)     if ($rec['type'] == 'mx') {
76)         $data .= ' ('.(int) $rec['spec'].')';
77)     }
78)     if ($rec['type'] == 'sshfp') {
79)         $data = (int) $rec['spec'] . ' 1 ' . $data;
80)     }
81)     if ($rec['type'] == 'caa') {
82)         $data = $caa_properties[(int) $rec['spec']] . ' 0 "' . $data.'"';
83)     }
84)     $ttl = ($rec['ttl'] ? $rec['ttl'] : 3600);
85)     $link = $rec['fqdn'];
86)     if (!in_array($rec['type'], array('a', 'aaaa', 'mx', 'cname', 'ns', 'txt', 'spf', 'ptr', 'sshfp', 'caa'))) {
87)         $editable = false;
Bernd Wurst Erzeuge DNS-Records der For...

Bernd Wurst authored 9 years ago

88)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

89)     $delete = internal_link('dns_record_save', icon_delete('Record löschen'), "id={$rec['id']}&action=delete");
90)     if ($rec['type'] == 'ns' && ! $rec['hostname']) {
91)         $editable = false;
92)         $delete = '';
93)     }
94)     if ($editable) {
95)         $link = internal_link('dns_record_edit', $rec['fqdn'], "id={$rec['id']}");
96)     }
97)     output("<tr><td>{$link}</td><td>".strtoupper($rec['type'])."</td><td>".$data."</td><td>{$ttl} Sek.</td><td>".$delete."</td></tr>\n");
98) }
99) foreach ($auto_records as $rec) {
100)     $data = filter_input_general($rec['ip'] ? $rec['ip'] : $rec['data']);
101)     $ttl = ($rec['ttl'] ? $rec['ttl'] : 3600);
102)     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

103) }
104) 
105) 
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

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

bernd authored 15 years ago

107) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

108) if ($domain->autodns) {
109)     output('<p style="font-size: 80%;"><em>Kursive Hostnames bezeichnen automatisch erzeugte Records. Diese können nicht geändert werden.</em></p>');
110) } else {
111)     output('<p style="font-size: 80%;"><em>Für diese Domain wurde die Erzeugung automatischer Records deaktiviert.</em></p>');
112) }
bernd DNs-record-Interface ist je...

bernd authored 14 years ago

113) 
114) 
115) output('<h4>Neuen DNS-Record anlegen</h4>
116) <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>
117) 
118) <ul>
bernd Typo

bernd authored 14 years ago

119) <li>'.internal_link('dns_record_edit', 'DynDNS (Hostname für einen DynDNS-Account setzen)', 'id=new&type=dyndns&domain='.$domain->id).'</li>
Bernd Wurst IPv6-support für DynDNS

Bernd Wurst authored 5 years ago

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

bernd authored 14 years ago

121) <li>'.internal_link('dns_record_edit', 'A (normaler Hostname/normale Subdomain)', 'id=new&type=a&domain='.$domain->id).'</li>
122) <li>'.internal_link('dns_record_edit', 'MX (Posteingangsserver)', 'id=new&type=mx&domain='.$domain->id).'</li>
123) </ul>
124) <ul>
125) <li>'.internal_link('dns_record_edit', 'AAAA (IPv6-Adresse)', 'id=new&type=aaaa&domain='.$domain->id).'</li>
126) <li>'.internal_link('dns_record_edit', 'CNAME (Aliasnamen)', 'id=new&type=cname&domain='.$domain->id).'</li>
Bernd Wurst Text für Autorecords geände...

Bernd Wurst authored 6 years ago

127) <li>'.internal_link('dns_record_edit', 'NS (Nameserver, NUR FÜR SUBDOMAINS!)', 'id=new&type=ns&domain='.$domain->id).'</li>
bernd SPF und TXT records

bernd authored 14 years ago

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

129) <li>'.internal_link('dns_record_edit', 'SSHFP', 'id=new&type=sshfp&domain='.$domain->id).'</li>
Hanno Böck add caa support

Hanno Böck authored 7 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 15 years ago

135) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

136) if ($domain->autodns) {
137)     output("<p>Für extrem ungewöhnliche Konfigurationen können Sie die Erzeugung von automatischen DNS-Records unter dieser Domain komplett abschalten. Dies ist i.d.R. falsch und wird zu Fehlfunktion führen. Nutzen Sie diese Einstellung auf eigene Gefahr.</p>
Bernd Wurst Text für Autorecords geände...

Bernd Wurst authored 6 years ago

138)   <p>Möchten Sie einzelne DNS-Einträge abweichend setzen, so legen Sie einfach oben den jeweils gewünschten Record an. Falls es gleichlautende automatische Einträge gibt, werden diese anschließend unterdrückt.</p>
139)   <p>Warten Sie nach Änderung dieser Einstellung eine Minute und laden Sie danach die Seite neu.</p>
bernd Autodns ein- und ausschaltb...

bernd authored 14 years ago

140) <p>".internal_link('dns_save', 'Automatisch erzeugte Einträge umwandeln', "type=autodns&action=disable&dom={$domain->id}")."</p>");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

141) } else {
142)     output("<p>Sie verwalten 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>
Bernd Wurst Text für Autorecords geände...

Bernd Wurst authored 6 years ago

143)   <p>Warten Sie nach Änderung dieser Einstellung eine Minute und laden Sie danach die Seite neu.</p>