9086c9ad77db90633e0629e9e86a88366265ded0
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15) */
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

16) 
17) require_once('inc/base.php');
18) require_once('inc/icons.php');
19) require_once('inc/security.php');
20) require_role(ROLE_VMAIL_ACCOUNT);
21) 
22) require_once('include/vmail.php');
23) 
24) $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
25) $acc = get_account_details($id, false);
26) $actions = array();
27) DEBUG($acc);
28) 
29) $content = '<h3>Aktueller Speicherplatzverbrauch</h3>';
30) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

31) $percent = round(($acc["quota_used"] / $acc["quota"]) * 100);
32) $color = ($percent > 95 ? 'red' : ($percent > 75 ? "yellow" : "green"));
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

33) $width = 2 * min($percent, 100);
34) $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>";
35) 
36) $content .= '<h3>Einstellungen</h3>
37) <p>Eingehende E-Mails für Ihre Adresse werden wie folgt verarbeitet:</p>';
38) 
Bernd Wurst Alle Optionen bzgl. Spamfil...

Bernd Wurst authored 7 years ago

39) $content .= '<p>'.other_icon('go.png')." Ablegen in Ihrer Mailbox</p>";
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

40) 
41) 
42) if ($acc['autoresponder']) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

43)     $now = date('Y-m-d H:i:s');
44)     $valid_from = $acc['autoresponder']['valid_from'];
45)     $valid_from_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_from']));
46)     $valid_until = $acc['autoresponder']['valid_until'];
47)     $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
48)     if ($valid_from == null) {
49)         // Autoresponder abgeschaltet
50)     //$content .= '<p>'.other_icon('go.png')." Es wird keine automatische Antwort versendet</p>";
51)     } elseif ($valid_from > $now) {
52)         $content .= '<p>'.other_icon('go.png')." Es wird ab dem {$valid_from_string} eine automatische Antwort versendet</p>";
53)     } elseif ($valid_until == null) {
54)         $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet</p>";
55)     } elseif ($valid_until > $now) {
56)         $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet, jedoch nicht mehr ab dem {$valid_until_string}</p>";
57)     } elseif ($valid_until < $now) {
58)         $content .= '<p>'.other_icon('go.png')." Es wird seit dem {$valid_until_string} keine automatische Antwort mehr versendet</p>";
59)     }
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

60) }
61) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

62) foreach ($acc['forwards'] as $fwd) {
63)     $fwd['destination'] = filter_input_general($fwd['destination']);
64)     $content .= '<p>'.other_icon('go.png')." Weiterleitung an <strong>{$fwd['destination']}</strong></p>";
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

65) }
66)