c12c27e9e8e26e877e005c8aa2e01901e7bb39ab
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

1) <?php
2) 
3) require_once('inc/base.php');
4) require_once('inc/icons.php');
5) require_once('inc/security.php');
6) require_role(ROLE_VMAIL_ACCOUNT);
7) 
8) require_once('include/vmail.php');
9) 
10) $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
11) $acc = get_account_details($id, false);
12) $actions = array();
13) DEBUG($acc);
14) 
15) $content = '<h3>Aktueller Speicherplatzverbrauch</h3>';
16) 
17) $percent = round(( $acc["quota_used"] / $acc["quota"] ) * 100 );
18) $color = ( $percent > 95 ? 'red' : ($percent > 75 ? "yellow" : "green" ));
19) $width = 2 * min($percent, 100);
20) $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;\">&#160;</div></div> {$acc['quota_used']} MB von {$acc['quota']} MB belegt</div>";
21) 
22) $content .= '<h3>Einstellungen</h3>
23) <p>Eingehende E-Mails für Ihre Adresse werden wie folgt verarbeitet:</p>';
24) 
25) $spam = 'ohne Spamfilter';
26) switch ($acc['spamfilter'])
27) {
28)   case 'folder':  $spam = 'Spam in Unterordner';
29)     break;
30) 	case 'tag':	$spam = 'Spam markieren';
31) 		break;
32) 	case 'delete':	$spam = 'Spam nicht zustellen';
33)   	break;
34) }
35) $content .= '<p>'.other_icon('go.png')." Ablegen in Ihrer Mailbox ({$spam})</p>";
36) 
37) 
38) if ($acc['autoresponder']) {
39)   $now = date( 'Y-m-d H:i:s' );
40)   $valid_from = $acc['autoresponder']['valid_from'];
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

41)   $valid_from_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_from']));
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

42)   $valid_until = $acc['autoresponder']['valid_until'];
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

43)   $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

44)   if ($valid_from == NULL) {
45)     // Autoresponder abgeschaltet
46)     //$content .= '<p>'.other_icon('go.png')." Es wird keine automatische Antwort versendet</p>"; 
47)   } elseif ($valid_from > $now) {
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

48)     $content .= '<p>'.other_icon('go.png')." Es wird ab dem {$valid_from_string} eine automatische Antwort versendet</p>"; 
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

49)   } elseif ($valid_until == NULL) {
50)     $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet</p>"; 
51)   } elseif ($valid_until > $now) {
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

52)     $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet, jedoch nicht mehr ab dem {$valid_until_string}</p>"; 
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

53)   } elseif ($valid_until < $now) {
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

54)     $content .= '<p>'.other_icon('go.png')." Es wird seit dem {$valid_until_string} keine automatische Antwort mehr versendet</p>";