9754787a2d69b9f02b797cfdef9974fe5e67a561
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 1 year 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 1 year 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 2 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 5 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 6 months 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 5 years ago

40)     $now = date('Y-m-d H:i:s');
41)     $valid_from = $acc['autoresponder']['valid_from'];
Bernd Wurst Deprecation-Fehler bei TOTP...

Bernd Wurst authored 5 months ago

42)     $valid_from_string = '';
43)     if ($valid_from) {
44)         $valid_from_string = date('d.m.Y', strtotime($valid_from));
45)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

46)     $valid_until = $acc['autoresponder']['valid_until'];
Bernd Wurst Deprecation-Fehler bei TOTP...

Bernd Wurst authored 5 months ago

47)     $valid_until_string = '';
48)     if ($valid_until) {
49)         $valid_until_string = date('d.m.Y', strtotime($valid_until));
50)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

51)     if ($valid_from == null) {
52)         // Autoresponder abgeschaltet
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 1 year ago

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

Hanno authored 5 years ago

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

Hanno Böck authored 6 months ago

55)         $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 5 years ago

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

Hanno Böck authored 6 months ago

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

Hanno authored 5 years ago

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

Hanno Böck authored 6 months ago

59)         $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 5 years ago

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

Hanno Böck authored 6 months ago

61)         $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 5 years ago

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

bernd authored 12 years ago

63) }
64) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

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

Hanno Böck authored 6 months ago

66)     $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

67) }
68) 
Bernd Wurst Link auf die Abrufdaten auf...

Bernd Wurst authored 11 years ago

69) 
70) $content .= '<h3>Nachrichten-Abruf</h3>