<?php
require_once('inc/base.php');
require_once('inc/debug.php');
global $debugmode;
require_once('inc/security.php');
require_role(ROLE_SYSTEMUSER);
require_once('dnsinclude.php');
$section = 'dns_dyndns';
$id = null;
if (isset($_REQUEST['id'])) {
$id = (int) $_REQUEST['id'];
}
if (isset($_GET['type']) && $_GET['type'] == 'dyndns') {
if ($_GET['action'] == 'delete') {
$sure = user_is_sure();
if ($sure === null) {
are_you_sure("type=dyndns&action=delete&id={$id}", "Möchten Sie den DynDNS-Account wirklich löschen?");
} elseif ($sure === true) {
delete_dyndns_account($id);
if (!$debugmode) {
header("Location: dyndns");
}
} elseif ($sure === false) {
if (!$debugmode) {
header("Location: dyndns");
}
}
}
if ($_GET['action'] == 'edit') {
check_form_token('dyndns_edit');
$newid = null;
if ($id) {