354c05a4ddd678c49bcbba458bffa7d13482139a
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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

13) 
14) require_once('inc/base.php');
15) require_once('inc/icons.php');
16) require_once('inc/security.php');
17) require_role(ROLE_VMAIL_ACCOUNT);
18) 
19) require_once('include/vmail.php');
20) 
21) $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
22) $acc = get_account_details($id, false);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

23) $actions = [];
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

24) DEBUG($acc);
25) 
26) $content = '<h3>Aktueller Speicherplatzverbrauch</h3>';
27) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

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

bernd authored 12 years ago

30) $width = 2 * min($percent, 100);
31) $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>";
32) 
33) $content .= '<h3>Einstellungen</h3>
34) <p>Eingehende E-Mails für Ihre Adresse werden wie folgt verarbeitet:</p>';
35) 
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

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

bernd authored 12 years ago

37) 
38) 
39) if ($acc['autoresponder']) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

40)     $now = date('Y-m-d H:i:s');
41)     $valid_from = $acc['autoresponder']['valid_from'];
42)     $valid_from_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_from']));
43)     $valid_until = $acc['autoresponder']['valid_until'];
44)     $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
45)     if ($valid_from == null) {
46)         // Autoresponder abgeschaltet
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 2 years ago

47)         //$content .= '<p>'.other_icon('go.png')." Es wird keine automatische Antwort versendet</p>";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

48)     } elseif ($valid_from > $now) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

49)         $content .= '<p>' . other_icon('go.png') . " Es wird ab dem {$valid_from_string} eine automatische Antwort versendet</p>";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

50)     } elseif ($valid_until == null) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

51)         $content .= '<p>' . other_icon('go.png') . " Es wird eine automatische Antwort versendet</p>";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

52)     } elseif ($valid_until > $now) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

53)         $content .= '<p>' . other_icon('go.png') . " Es wird eine automatische Antwort versendet, jedoch nicht mehr ab dem {$valid_until_string}</p>";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

54)     } elseif ($valid_until < $now) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

55)         $content .= '<p>' . other_icon('go.png') . " Es wird seit dem {$valid_until_string} keine automatische Antwort mehr versendet</p>";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

56)     }
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

57) }
58) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

59) foreach ($acc['forwards'] as $fwd) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

60)     $content .= '<p>' . other_icon('go.png') . " Weiterleitung an <strong>" . filter_output_html($fwd['destination']) . "</strong></p>";
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

61) }
62) 
Bernd Wurst Link auf die Abrufdaten auf...

Bernd Wurst authored 11 years ago

63) 
64) $content .= '<h3>Nachrichten-Abruf</h3>