96649f21ba18d07757afa9d98998f7a22c0d86a3
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

1) <?php
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 Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 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 6 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 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) */
16) 
17) require_once('inc/base.php');
18) require_once('inc/security.php');
19) require_once('inc/icons.php');
20) 
21) require_role(ROLE_SYSTEMUSER);
22) 
23) require_once('dnsinclude.php');
24) 
25) $section = 'dns_dyndns';
26) $dyndns = get_dyndns_account($_REQUEST['id']);
27) 
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 5 years ago

28) title("Hostnames für DynDNS-Account ".filter_output_html($dyndns['handle']));
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

29) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

30) $available_domains = [];
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

31) 
32) $domains = get_domain_list($_SESSION['customerinfo']['customerno'], $_SESSION['userinfo']['uid']);
33) foreach ($domains as $d) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

34)     if ($d->dns) {
35)         $available_domains[$d->id] = $d->fqdn;
36)     }
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

37) }
38) 
39) 
40) $records = get_dyndns_records($dyndns['id']);
41) 
42) if ($records) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

43)     $output .= '<h4>Folgende DNS-records sind mit diesem DynDNS-Account verknüpft:</h4>
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

44) <ul>
45) ';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

46)     foreach ($records as $record) {
47)         $type = strtoupper($record['type']).' / '.($record['type'] == 'a' ? 'IPv4' : 'IPv6');
48)         $output .= '  <li>'.$record['fqdn'].' ('.$type.') '.internal_link('dyndns_hostname_delete', icon_delete(), 'id='.$record['id']).'</li>';
49)     }
50)     $output .= '</ul>';
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

51) }
52) 
53) 
54) output('<h4>Neuen Hostname festlegen</h4>');
55) 
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 5 years ago

56) $form = '<p><label for="hostname">Neuer Hostname: </label> <input type="text" name="hostname" id="hostname" value="'.filter_output_html($dyndns['handle']).'" />&#160;.&#160;'.html_select('domain', $available_domains).' </p>
Bernd Wurst IPv6-support für DynDNS

Bernd Wurst authored 6 years ago

57) <p>Typ: <select name="type"><option value="a" selected="selected">A / IPv4</option><option value="aaaa">AAAA / IPv6</option></select></p>
58) <p><input type="submit" value="Speichern"/></p>';