Browse code

more strict codingstyle with php-cs-fixer 3.10.0

Hanno Böck authored on 20/08/2022 09:51:47
Showing 1 changed files
... ...
@@ -44,7 +44,7 @@ if ($acc['autoresponder']) {
44 44
     $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
45 45
     if ($valid_from == null) {
46 46
         // Autoresponder abgeschaltet
47
-    //$content .= '<p>'.other_icon('go.png')." Es wird keine automatische Antwort versendet</p>";
47
+        //$content .= '<p>'.other_icon('go.png')." Es wird keine automatische Antwort versendet</p>";
48 48
     } elseif ($valid_from > $now) {
49 49
         $content .= '<p>'.other_icon('go.png')." Es wird ab dem {$valid_from_string} eine automatische Antwort versendet</p>";
50 50
     } elseif ($valid_until == null) {
Browse code

Change license from CC0 to 0BSD, all contributors agreed

Hanno Böck authored on 20/08/2022 09:22:23
Showing 1 changed files
... ...
@@ -2,14 +2,11 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2018 by schokokeks.org Hosting, namely
5
+Written by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 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
-
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12
-http://creativecommons.org/publicdomain/zero/1.0/
9
+This code is published under a 0BSD license.
13 10
 
14 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.
15 12
 */
Browse code

Codingstyle PSR12 + array syntax

Hanno Böck authored on 30/10/2021 21:18:17
Showing 1 changed files
... ...
@@ -23,7 +23,7 @@ require_once('include/vmail.php');
23 23
 
24 24
 $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
25 25
 $acc = get_account_details($id, false);
26
-$actions = array();
26
+$actions = [];
27 27
 DEBUG($acc);
28 28
 
29 29
 $content = '<h3>Aktueller Speicherplatzverbrauch</h3>';
Browse code

Umstellung von filter_input_general() auf filter_output_html()

Bernd Wurst authored on 21/09/2019 17:07:48
Showing 1 changed files
... ...
@@ -60,8 +60,7 @@ if ($acc['autoresponder']) {
60 60
 }
61 61
 
62 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>";
63
+    $content .= '<p>'.other_icon('go.png')." Weiterleitung an <strong>".filter_output_html($fwd['destination'])."</strong></p>";
65 64
 }
66 65
 
67 66
 
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on 26/06/2018 13:58:19
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely
8 8
 
9 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 10
 
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12 12
 http://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 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.
... ...
@@ -28,8 +28,8 @@ DEBUG($acc);
28 28
 
29 29
 $content = '<h3>Aktueller Speicherplatzverbrauch</h3>';
30 30
 
31
-$percent = round(( $acc["quota_used"] / $acc["quota"] ) * 100 );
32
-$color = ( $percent > 95 ? 'red' : ($percent > 75 ? "yellow" : "green" ));
31
+$percent = round(($acc["quota_used"] / $acc["quota"]) * 100);
32
+$color = ($percent > 95 ? 'red' : ($percent > 75 ? "yellow" : "green"));
33 33
 $width = 2 * min($percent, 100);
34 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 35
 
... ...
@@ -40,33 +40,30 @@ $content .= '<p>'.other_icon('go.png')." Ablegen in Ihrer Mailbox</p>";
40 40
 
41 41
 
42 42
 if ($acc['autoresponder']) {
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
-  }
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
+    }
60 60
 }
61 61
 
62
-foreach ($acc['forwards'] AS $fwd)
63
-{
64
-	$fwd['destination'] = filter_input_general($fwd['destination']);
65
-  $content .= '<p>'.other_icon('go.png')." Weiterleitung an <strong>{$fwd['destination']}</strong></p>"; 
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>";
66 65
 }
67 66
 
68 67
 
69 68
 $content .= '<h3>Nachrichten-Abruf</h3>
70 69
 <p>'.internal_link('/go/email/logindata', 'Zugangsdaten für E-Mail-Abruf anzeigen', 'server='.get_server_by_id($acc['server']).'&type=vmail').'</p>';
71
-
72
-?>
Browse code

Copyright year update

Bernd Wurst authored on 13/01/2018 06:07:05
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Alle Optionen bzgl. Spamfilter entfernt, der ist jetzt obligatorisch und lehnt auf SMTP-Ebene ab

Bernd Wurst authored on 02/03/2017 15:52:13
Showing 1 changed files
... ...
@@ -36,17 +36,7 @@ $content .= "<div><div style=\"margin: 2px 0; padding: 0; width: 200px; border:
36 36
 $content .= '<h3>Einstellungen</h3>
37 37
 <p>Eingehende E-Mails für Ihre Adresse werden wie folgt verarbeitet:</p>';
38 38
 
39
-$spam = 'ohne Spamfilter';
40
-switch ($acc['spamfilter'])
41
-{
42
-  case 'folder':  $spam = 'Spam in Unterordner';
43
-    break;
44
-	case 'tag':	$spam = 'Spam markieren';
45
-		break;
46
-	case 'delete':	$spam = 'Spam nicht zustellen';
47
-  	break;
48
-}
49
-$content .= '<p>'.other_icon('go.png')." Ablegen in Ihrer Mailbox ({$spam})</p>";
39
+$content .= '<p>'.other_icon('go.png')." Ablegen in Ihrer Mailbox</p>";
50 40
 
51 41
 
52 42
 if ($acc['autoresponder']) {
... ...
@@ -71,16 +61,8 @@ if ($acc['autoresponder']) {
71 61
 
72 62
 foreach ($acc['forwards'] AS $fwd)
73 63
 {
74
- 	$spam = 'ohne Spamfilter';
75
-  switch ($fwd['spamfilter'])
76
-	{
77
-	  case 'tag':	$spam = 'Spam markieren';
78
-			break;
79
-		case 'delete':	$spam = 'Spam nicht zustellen';
80
-			break;
81
-	}
82 64
 	$fwd['destination'] = filter_input_general($fwd['destination']);
83
-  $content .= '<p>'.other_icon('go.png')." Weiterleitung an <strong>{$fwd['destination']}</strong> ({$spam})</p>"; 
65
+  $content .= '<p>'.other_icon('go.png')." Weiterleitung an <strong>{$fwd['destination']}</strong></p>"; 
84 66
 }
85 67
 
86 68
 
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on 08/02/2014 05:45:07
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Link auf die Abrufdaten auf der VMail-Account-Übersicht anzeigen

Bernd Wurst authored on 19/03/2013 06:33:29
Showing 1 changed files
... ...
@@ -83,4 +83,8 @@ foreach ($acc['forwards'] AS $fwd)
83 83
   $content .= '<p>'.other_icon('go.png')." Weiterleitung an <strong>{$fwd['destination']}</strong> ({$spam})</p>"; 
84 84
 }
85 85
 
86
+
87
+$content .= '<h3>Nachrichten-Abruf</h3>
88
+<p>'.internal_link('/go/email/logindata', 'Zugangsdaten für E-Mail-Abruf anzeigen', 'server='.get_server_by_id($acc['server']).'&type=vmail').'</p>';
89
+
86 90
 ?>
Browse code

Updated copyright notice (2012 => 2013)

Bernd Wurst authored on 19/01/2013 10:49:50
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2012 by schokokeks.org Hosting, namely
5
+Written 2008-2013 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Added license tags for CC0, README and COPYING

Bernd Wurst authored on 11/03/2012 15:40:04
Showing 1 changed files
... ...
@@ -1,4 +1,18 @@
1 1
 <?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2012 by schokokeks.org Hosting, namely
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
+
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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
+*/
2 16
 
3 17
 require_once('inc/base.php');
4 18
 require_once('inc/icons.php');
Browse code

Datums-Check und Daten in umgangssprachlicher Form ausgeben

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2215 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 02/03/2012 09:59:53
Showing 1 changed files
... ...
@@ -38,18 +38,20 @@ $content .= '<p>'.other_icon('go.png')." Ablegen in Ihrer Mailbox ({$spam})</p>"
38 38
 if ($acc['autoresponder']) {
39 39
   $now = date( 'Y-m-d H:i:s' );
40 40
   $valid_from = $acc['autoresponder']['valid_from'];
41
+  $valid_from_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_from']));
41 42
   $valid_until = $acc['autoresponder']['valid_until'];
43
+  $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
42 44
   if ($valid_from == NULL) {
43 45
     // Autoresponder abgeschaltet
44 46
     //$content .= '<p>'.other_icon('go.png')." Es wird keine automatische Antwort versendet</p>"; 
45 47
   } elseif ($valid_from > $now) {
46
-    $content .= '<p>'.other_icon('go.png')." Es wird ab dem {$valid_from} eine automatische Antwort versendet</p>"; 
48
+    $content .= '<p>'.other_icon('go.png')." Es wird ab dem {$valid_from_string} eine automatische Antwort versendet</p>"; 
47 49
   } elseif ($valid_until == NULL) {
48 50
     $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet</p>"; 
49 51
   } elseif ($valid_until > $now) {
50
-    $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet, jedoch nicht mehr ab dem {$valid_until}</p>"; 
52
+    $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet, jedoch nicht mehr ab dem {$valid_until_string}</p>"; 
51 53
   } elseif ($valid_until < $now) {
52
-    $content .= '<p>'.other_icon('go.png')." Es wird seit dem {$valid_until} keine automatische Antwort mehr versendet</p>"; 
54
+    $content .= '<p>'.other_icon('go.png')." Es wird seit dem {$valid_until_string} keine automatische Antwort mehr versendet</p>"; 
53 55
   }
54 56
 }
55 57
 
Browse code

VMail-User können ihre Einstellungen selbst vornehmen und bekommen eine individuelle Startseite mit den Einstellungen.

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2214 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on 29/02/2012 13:26:13
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,70 @@
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'];
41
+  $valid_until = $acc['autoresponder']['valid_until'];
42
+  if ($valid_from == NULL) {
43
+    // Autoresponder abgeschaltet
44
+    //$content .= '<p>'.other_icon('go.png')." Es wird keine automatische Antwort versendet</p>"; 
45
+  } elseif ($valid_from > $now) {
46
+    $content .= '<p>'.other_icon('go.png')." Es wird ab dem {$valid_from} eine automatische Antwort versendet</p>"; 
47
+  } elseif ($valid_until == NULL) {
48
+    $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet</p>"; 
49
+  } elseif ($valid_until > $now) {
50
+    $content .= '<p>'.other_icon('go.png')." Es wird eine automatische Antwort versendet, jedoch nicht mehr ab dem {$valid_until}</p>"; 
51
+  } elseif ($valid_until < $now) {
52
+    $content .= '<p>'.other_icon('go.png')." Es wird seit dem {$valid_until} keine automatische Antwort mehr versendet</p>"; 
53
+  }
54
+}
55
+
56
+foreach ($acc['forwards'] AS $fwd)
57
+{
58
+ 	$spam = 'ohne Spamfilter';
59
+  switch ($fwd['spamfilter'])
60
+	{
61
+	  case 'tag':	$spam = 'Spam markieren';
62
+			break;
63
+		case 'delete':	$spam = 'Spam nicht zustellen';
64
+			break;
65
+	}
66
+	$fwd['destination'] = filter_input_general($fwd['destination']);
67
+  $content .= '<p>'.other_icon('go.png')." Weiterleitung an <strong>{$fwd['destination']}</strong> ({$spam})</p>"; 
68
+}
69
+
70
+?>