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/debug.php');
16) global $debugmode;
17) require_once('inc/security.php');
18) 
19) require_role(ROLE_SYSTEMUSER);
20) 
21) require_once('dnsinclude.php');
22) 
23) $section = 'dns_dyndns';
24) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

25) if (!isset($_REQUEST['id'])) {
26)     system_failure("Keine ID");
27) }
Bernd Wurst Erzeuge nicht einen DynDNS-...

Bernd Wurst authored 8 years ago

28) 
29) $id = (int) $_REQUEST['id'];
30) $dyndns = get_dyndns_account($id);
31) 
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 2 years ago

32) $type = 'a';
33) if ($_REQUEST['type'] == 'aaaa') {
34)     $type = 'aaaa';
35) }
36) $record = blank_dns_record($type);
37) // Sicherheitsprüfungen passieren im Backend
38) 
39) $record['hostname'] = $_REQUEST['hostname'];
40) $record['domain'] = (int) $_REQUEST['domain'];
41) $record['dyndns'] = $id;
42) $record['ttl'] = 120;
43) 
44) save_dns_record(null, $record);
45) 
46) if (!$debugmode) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

47)     header('Location: dyndns_hostnames?id=' . $dyndns['id']);