f12aba6daa6e2848a8ed60ea57b26874d6675f52
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 Updated copyright notice (2...

Bernd Wurst authored 11 years ago

5) Written 2008-2013 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');
18) require_once('inc/debug.php');
19) global $debugmode;
20) require_once('inc/security.php');
21) 
bernd Erlaube *useraccounts* das...

bernd authored 13 years ago

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

bernd authored 15 years ago

23) 
24) require_once('dnsinclude.php');
25) 
26) $section = 'dns_dyndns';
27) 
28) $id = NULL;
bernd Warnings eliminiert und Plu...

bernd authored 14 years ago

29) if (isset($_REQUEST['id']))
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

30)   $id = (int) $_REQUEST['id'];
31) 
32) 
33) if ($_GET['type'] == 'dyndns') {
34)   if ($_GET['action'] == 'delete') {
35)     $sure = user_is_sure();
36)     if ($sure === NULL)
37)     {
bernd * alle internen Links sinnv...

bernd authored 15 years ago

38)       are_you_sure("type=dyndns&action=delete&id={$id}", "Möchten Sie den DynDNS-Account wirklich löschen?");
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

39)     }
40)     elseif ($sure === true)
41)     {
42)       delete_dyndns_account($id);
43)       if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

44)         header("Location: dyndns");
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

45)     }
46)     elseif ($sure === false)
47)     {
48)       if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

49)         header("Location: dyndns");
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

50)     }
51)   }
52)   if ($_GET['action'] == 'edit') {
53)     check_form_token('dyndns_edit');
54)     
55)     if ($id) {
56)       edit_dyndns_account($id, $_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
57)     } else {
58)       create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
59)     }
60)   
61)     if (! ($debugmode || we_have_an_error()))
bernd eliminate .php extensions f...

bernd authored 15 years ago

62)       header('Location: dyndns');