<?php
require_once('inc/base.php');
require_once('inc/security.php');
require_role(ROLE_CUSTOMER);
require_once('dnsinclude.php');
$section = 'dns_dyndns';
$new = true;
$dyndns = array();
if ($_REQUEST['id'])
{
$dyndns = get_dyndns_account($_REQUEST['id']);
$new = false;
}
$username_http = $_SESSION['userinfo']['username'];
if ($dyndns['handle'])
$username_http .= "_{$dyndns['handle']}";
$http_update_info = '';
if ($dyndns['password'])
$http_update_info = ' Lassen Sie das Passworteingabefeld unberührt um das bestehende Passwort zu erhalten. Entfernen Sie das bestehende Passwort um das HTTP-Update zu deaktivieren.';
$output .= '<script type="text/javascript">
var username = "'.$_SESSION['userinfo']['username'].'";
var handle;
var http_username;
function updateUsernameHTTP() {
handle = document.getElementById("handle").value;
http_username = username;
if (handle != "")
http_username = username + "_" + handle;
document.getElementById("username_http").firstChild.data = http_username;
}
</script>
';
$output .= '<h3>DynDNS-Account</h3>';