354c05a4ddd678c49bcbba458bffa7d13482139a
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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

9) This code is published under a 0BSD license.
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

10) 
11) 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.
12) */
13) 
14) require_once('inc/base.php');
15) require_once('inc/security.php');
16) require_once('inc/icons.php');
17) 
18) require_role(ROLE_SYSTEMUSER);
19) 
20) require_once('dnsinclude.php');
21) 
22) $section = 'dns_dyndns';
23) $dyndns = get_dyndns_account($_REQUEST['id']);
24) 
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

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

Bernd Wurst authored 8 years ago

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

Hanno Böck authored 3 years ago

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

Bernd Wurst authored 8 years ago

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

Hanno authored 6 years ago

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

Bernd Wurst authored 8 years ago

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

Hanno authored 6 years ago

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

41) <ul>
42) ';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

43)     foreach ($records as $record) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

44)         $type = strtoupper($record['type']) . ' / ' . ($record['type'] == 'a' ? 'IPv4' : 'IPv6');
45)         $output .= '  <li>' . $record['fqdn'] . ' (' . $type . ') ' . internal_link('dyndns_hostname_delete', icon_delete(), 'id=' . $record['id']) . '</li>';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

46)     }
47)     $output .= '</ul>';
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

48) }
49) 
50) 
51) output('<h4>Neuen Hostname festlegen</h4>');
52) 
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

53) $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

54) <p>Typ: <select name="type"><option value="a" selected="selected">A / IPv4</option><option value="aaaa">AAAA / IPv6</option></select></p>
55) <p><input type="submit" value="Speichern"/></p>';
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

56) 
57) 
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

58) output(html_form('dyndns_hostname_add', 'dyndns_hostname_add', 'id=' . $dyndns['id'], $form));
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

59)