3ef995c2108fe77d22c0b556fb9717cb848bc48f
bernd VMail-User können ihre Eins...

bernd authored 13 years ago

1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 1 week ago

2) 
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 13 years ago

3) /*
4) This file belongs to the Webinterface of schokokeks.org Hosting
5) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

6) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 13 years ago

7)   Bernd Wurst <bernd@schokokeks.org>
8)   Hanno Böck <hanno@schokokeks.org>
9) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 13 years ago

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

bernd authored 13 years ago

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

Hanno Böck authored 3 years ago

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

bernd authored 13 years ago

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

Hanno authored 6 years ago

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

bernd authored 13 years ago

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

Hanno Böck authored 1 year ago

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

bernd authored 13 years ago

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

Hanno authored 6 years ago

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

Bernd Wurst authored 1 year ago

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

Hanno authored 6 years ago

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

Bernd Wurst authored 1 year ago

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

Hanno authored 6 years ago

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

Hanno Böck authored 2 years ago

54)         //$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

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

Hanno Böck authored 1 year ago

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

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

Hanno Böck authored 1 year ago

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

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

Hanno Böck authored 1 year ago

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

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

Hanno Böck authored 1 year ago

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

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

bernd authored 13 years ago

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

Hanno authored 6 years ago

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

Hanno Böck authored 1 year ago

67)     $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 13 years ago

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

Bernd Wurst authored 11 years ago

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