63a0529b21bfd97a4ef395e8d3d3f513526357c6
bernd Stub für dns-Admin-Interface

bernd authored 15 years ago

1) <?php
2) 
3) require_once('inc/base.php');
4) require_once('inc/debug.php');
5) global $debugmode;
6) require_once('inc/security.php');
7) 
8) require_role(ROLE_CUSTOMER);
9) 
10) require_once('dnsinclude.php');
11) 
12) $section = 'dns_dyndns';
13) 
14) $id = NULL;
15) if ($_REQUEST['id'])
16)   $id = (int) $_REQUEST['id'];
17) 
18) 
19) if ($_GET['type'] == 'dyndns') {
20)   if ($_GET['action'] == 'delete') {
21)     $sure = user_is_sure();
22)     if ($sure === NULL)
23)     {
24)       are_you_sure("type=dyndns&action=delete&amp;id={$id}", "Möchten Sie den DynDNS-Account wirklich löschen?");
25)     }
26)     elseif ($sure === true)
27)     {
28)       delete_dyndns_account($id);
29)       if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

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

bernd authored 15 years ago

31)     }
32)     elseif ($sure === false)
33)     {
34)       if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

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

bernd authored 15 years ago

36)     }
37)   }
38)   if ($_GET['action'] == 'edit') {
39)     check_form_token('dyndns_edit');
40)     
41)     if ($id) {
42)       edit_dyndns_account($id, $_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
43)     } else {
44)       create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
45)     }
46)   
47)     if (! ($debugmode || we_have_an_error()))
bernd eliminate .php extensions f...

bernd authored 15 years ago

48)       header('Location: dyndns');