8eb67e000e8075d99163e3354d159ce1b556efdc
bernd Stub für dns-Admin-Interface

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 Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

5) Written 2008-2014 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) 
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 Stub für dns-Admin-Interface

bernd authored 15 years ago

16) 
17) require_once('inc/base.php');
Bernd Wurst Warne, wenn bei den DNS-Ser...

Bernd Wurst authored 10 years ago

18) require_once('inc/icons.php');
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

19) require_once('inc/security.php');
20) 
bernd erfordere Kunden- UND Benut...

bernd authored 14 years ago

21) require_role(ROLE_SYSTEMUSER);
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

22) 
23) require_once('dnsinclude.php');
24) 
25) 
bernd DNS nur für Domains, die de...

bernd authored 14 years ago

26) $domains = get_domain_list($_SESSION['customerinfo']['customerno'], $_SESSION['userinfo']['uid']);
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

27) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

28) title('DNS-Records');
29) output('<p>Hier sehen Sie eine Übersicht über die angelegten DNS-records zu Ihren Domains.</p>');
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

30) 
31) //$output .= '<table><tr><th>Hostname</th><th>Typ</th><th>IP-Adresse/Inhalt</th><th>TTL</th><th>&#160;</th></tr>
32) //';
33) 
Bernd Wurst Warne, wenn bei den DNS-Ser...

Bernd Wurst authored 10 years ago

34) $output .=  '<table><tr><th>Domainname</th><th>Manuelle records</th><th>Automatische records</th><th>Status</th></tr>';
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

35) 
36) DEBUG($domains);
37) 
Bernd Wurst Warne, wenn bei den DNS-Ser...

Bernd Wurst authored 10 years ago

38) $external_domains = False;
39) $unused_dns = False;
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

40) foreach($domains AS $dom)
41) {
Bernd Wurst Warne, wenn bei den DNS-Ser...

Bernd Wurst authored 10 years ago

42)   if ($dom->provider != 'terions') {
43)     $external_domains = True;
44)   }
45)   $style="";
46)   if ($dom->dns == 0) {
47)     if (strstr($dom->domainname, '.')) {
48)       $output .= '<tr style="color: #999;"><td>'.$dom->fqdn.'</td><td>---</td><td>---</td><td>'.icon_disabled('DNS-Server ausgeschaltet').'&nbsp;DNS-Server für Subdomains bitte mit dem Support besprechen</td></tr>';
49)     } else {
50)       $output .= '<tr style="color: #999;"><td>'.$dom->fqdn.'</td><td>---</td><td>---</td><td>'.icon_disabled('DNS-Server ausgeschaltet').'&nbsp;'.internal_link('save', icon_add().' Einschalten', "dom={$dom->id}&dns=1").'</td></tr>';
51)     }
bernd some updates

bernd authored 15 years ago

52)     continue;
Bernd Wurst Warne, wenn bei den DNS-Ser...

Bernd Wurst authored 10 years ago

53)   }
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

54)   $records = get_domain_records($dom->id);
55) 
56)   $autorec = ($dom->autodns == 1 ? 'Ja' : 'Nein');
Bernd Wurst Warne, wenn bei den DNS-Ser...

Bernd Wurst authored 10 years ago

57)   if ($dom->provider != 'terions' || $dom->billing != 'regular') {
58)     $state = check_dns($dom->domainname, $dom->tld);
59)     if ($state !== True) {
60)       $current = 'Momentaner DNS-Server (u.A.): '.$state;
61)       if ($state == 'NXDOMAIN') {
62)         $current = 'Diese Domain ist aktuell nicht registriert.';
63)       }
64)       if (substr_compare($state, config('masterdomain'), -strlen(config('masterdomain')), strlen(config('masterdomain'))) === 0) {
65)         $output .= '<tr><td>'.internal_link('dns_domain', $dom->fqdn, "dom={$dom->id}").'</td><td>'.count($records).'</td><td>'.$autorec.'</td><td>'.icon_enabled('DNS-Server aktiv').icon_warning('Es werden veraltete DNS-Server benutzt').'&nbsp;'.$current.'</td></tr>';
66)         continue;
67)       } else {
68)         $output .= '<tr><td>'.internal_link('dns_domain', $dom->fqdn, "dom={$dom->id}").'</td><td>'.count($records).'</td><td>'.$autorec.'</td><td>'.icon_enabled('DNS-Server aktiv').icon_warning('DNS-Server eingeschaltet aber nicht genutzt').'&nbsp;'.$current.'<br />'.internal_link('save', icon_delete().' Abschalten', "dom={$dom->id}&dns=0").'</td></tr>';
69)         $unused_dns = True;
70)         continue;
71)       }
72)     }
73)   }
74)   $output .= '<tr><td>'.internal_link('dns_domain', $dom->fqdn, "dom={$dom->id}").'</td><td>'.count($records).'</td><td>'.$autorec.'</td><td>'.icon_enabled('DNS-Server aktiv').'</td></tr>';
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

75) 
76) /*  if ($records) 
77)   {
78)     #$output .= '<h4>'.$dom->fqdn.'</h4>';
79)     #$output .= '<table><tr><th>Hostname</th><th>Typ</th><th>IP-Adresse/Inhalt</th><th>TTL</th><th>&#160;</th></tr>
80)     #';
81)     foreach ($records AS $rec)
82)     {
83)       $data = ( $rec['ip'] ? $rec['ip'] : $rec['data'] );
84)       if ($rec['dyndns'])
85)         $data = '<em>DynDNS #'.$rec['dyndns'].'</em>';
bernd eliminate .php extensions f...

bernd authored 15 years ago

86)       $output .= "<tr><td>".internal_link('dns_edit', $rec['fqdn'], "id={$rec['id']}")."</td><td>".strtoupper($rec['type'])."</td><td>$data</td><td>{$rec['ttl']} Sek.</td><td>".internal_link('save', '<img src="'.$prefix.'images/delete.png" width="16" height="16" alt="löschen" title="Account löschen" />', "id={$rec['id']}&type=dns&action=delete")."</td></tr>\n";
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

87)     }
88)     #$output .= '</table><br />';
89) 
90)   }*/
91) }
92) 
93) $output .= '</table><br />';
94) 
Bernd Wurst Warne, wenn bei den DNS-Ser...

Bernd Wurst authored 10 years ago

95) if ($external_domains) {
96)   $own_ns = own_ns();
97)   asort($own_ns);
98)   $output.='<h4>Hinweis zu extern registrierten Domains</h4>
99) <p>Wenn Sie Ihre Domains bei einem anderen Provider registrieren und dennoch unsere DNS-Server nutzen möchten, dann stellen Sie bitte sicher, dass der DNS-Server oben eingeschaltet ist und stellen Sie dann folgende DNS-Server ein:<p>
100) <ul>';
101)   foreach ($own_ns as $ns) {
102)     $output.='<li>'.$ns.'</li>';
103)   }
104)   $output.='</ul>';
105) }
106) if ($unused_dns) {
107)   $output.='<h4>Wichtiger Hinweis</h4>
108) <p>In der obigen Liste befinden sich Domains, bei denen unser DNS-Server aktiviert ist aber die Domain momentan auf einen anderen DNS-Server eingerichtet ist. Dies ist normal bei bevorstehenden Domain-Transfers zu uns, sollte aber nicht dauerhaft so bleiben.<p>
109) <p>Wenn Sie weiterhin einen externen DNS-Server benutzen möchten, dann schalten Sie bitte unseren DNS-Server für diese Domain aus, damit es nicht zu Fehlfunktionen kommt.</p>
110) <p>Im Zweifel sprechen Sie bitte unseren Support an.</p>';
111) }
112) 
113)