<?php
require_once('inc/base.php');
require_once('inc/icons.php');
require_once('inc/security.php');
require_role(ROLE_VMAIL_ACCOUNT);
require_once('include/vmail.php');
$id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
$acc = get_account_details($id, false);
$actions = array();
DEBUG($acc);
$content = '<h3>Aktueller Speicherplatzverbrauch</h3>';
$percent = round(( $acc["quota_used"] / $acc["quota"] ) * 100 );
$color = ( $percent > 95 ? 'red' : ($percent > 75 ? "yellow" : "green" ));
$width = 2 * min($percent, 100);
$content .= "<div><div style=\"margin: 2px 0; padding: 0; width: 200px; border: 1px solid black;\"><div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; padding: 0;\"> </div></div> {$acc['quota_used']} MB von {$acc['quota']} MB belegt</div>";
$content .= '<h3>Einstellungen</h3>
<p>Eingehende E-Mails für Ihre Adresse werden wie folgt verarbeitet:</p>';
$content .= '<p>'.other_icon('go.png')." Ablegen in Ihrer Mailbox</p>";
if ($acc['autoresponder']) {
$now = date( 'Y-m-d H:i:s' );
$valid_from = $acc['autoresponder']['valid_from'];
$valid_from_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_from']));
$valid_until = $acc['autoresponder']['valid_until'];
$valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
if ($valid_from == NULL) {
} elseif ($valid_from > $now) {