<?php
require_once('inc/debug.php');
require_once('inc/security.php');
require_once('vmail.php');
$section = 'email_vmail';
require_role(ROLE_SYSTEMUSER);
$account = empty_account();
$id = (isset($_GET['id']) ? (int) $_GET['id'] : 0);
if ($id != 0)
$account = get_account_details($id);
DEBUG($account);
if ($id == 0) {
title("E-Mail-Adresse anlegen");
}
else {
title("E-Mail-Adresse bearbeiten");
}
$is_forward = (count($account['forwards']) > 0);
$is_mailbox = ($account['password'] != NULL || $id == 0);
$numforwards = max(count($account['forwards']), 1);
output("<script type=\"text/javascript\">
var numForwards = {$numforwards};
function moreForward()
{
numForwards += 1;
P1 = document.createElement('p');
TXT1 = document.createTextNode('Weiterleiten an ');
INPUT = document.createElement('input');
INPUT.type = 'text';
INPUT.name = 'forward_to_' + numForwards;
INPUT.value = '';
P1.appendChild(TXT1);
P1.appendChild(INPUT);
P2 = document.createElement('p');