Browse code

remove whitespace in empty lines

Hanno authored on26/06/2018 23:36:40
Showing1 changed files
... ...
@@ -45,7 +45,7 @@ foreach ($usedquota as $q) {
45 45
     }
46 46
     $color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
47 47
     $width = 2 * min($percent, 100) - $mailwidth;
48
-     
48
+
49 49
     $used_space = $q['systemquota_used'] + $q['mailquota'];
50 50
     $msg = "";
51 51
     if ($multiserver) {
... ...
@@ -67,5 +67,5 @@ output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</d
67 67
 if (have_module('invoice') && $need_more_storage) {
68 68
     addnew('../invoice/more_storage?section='.$section, 'Mehr Speicherplatz bestellen');
69 69
 }
70
-    
70
+
71 71
 output("<p>Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier verzögert angezeigt!</p>");
Browse code

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

Hanno authored on26/06/2018 13:58:19
Showing1 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
 https://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,33 +28,31 @@ $usedquota = get_used_quota($acc['uid']);
28 28
 $quota = array();
29 29
 $multiserver = count($usedquota) > 1;
30 30
 $need_more_storage = false;
31
-foreach ($usedquota as $q)
32
-{
33
-      $mailbar = '';
34
-      $mailstring = '';
35
-      $mailpercent = round(( $q['mailquota'] / $q["systemquota"]) * 100);
36
-      $mailwidth = 2 * min($mailpercent, 100);
31
+foreach ($usedquota as $q) {
32
+    $mailbar = '';
33
+    $mailstring = '';
34
+    $mailpercent = round(($q['mailquota'] / $q["systemquota"]) * 100);
35
+    $mailwidth = 2 * min($mailpercent, 100);
37 36
 
38
-      if ($q["mailquota"] > 0) {
39
-	$mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
37
+    if ($q["mailquota"] > 0) {
38
+        $mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
40 39
         $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
41
-      }  
40
+    }
42 41
 
43
-      $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
44
-      if ($percent > 90) {
42
+    $percent = round((($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"]) * 100);
43
+    if ($percent > 90) {
45 44
         $need_more_storage = true;
46
-      }
47
-      $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" ));
48
-      $width = 2 * min($percent, 100) - $mailwidth;
45
+    }
46
+    $color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
47
+    $width = 2 * min($percent, 100) - $mailwidth;
49 48
      
50
-      $used_space = $q['systemquota_used'] + $q['mailquota'];
51
-      $msg = "";
52
-      if ($multiserver) {
49
+    $used_space = $q['systemquota_used'] + $q['mailquota'];
50
+    $msg = "";
51
+    if ($multiserver) {
53 52
         $msg = "<p>Server <strong>{$q['server']}</strong><br />";
54
-      }
55
-      $quota[] = $msg."{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
53
+    }
54
+    $quota[] = $msg."{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
56 55
         <div style=\"margin: 0; padding: 0; width: 200px; border: 1px solid black;\">{$mailbar}<div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; margin-left: {$mailwidth}px; padding: 0;\">&#160;</div></div>";
57
-
58 56
 }
59 57
 $customer = get_customer_info($_SESSION['userinfo']['customerno']);
60 58
 $quotastring = implode('', $quota);
... ...
@@ -67,10 +65,7 @@ output("<h5>Stammdaten</h5>
67 65
 output("</div>\n");
68 66
 output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</div>");
69 67
 if (have_module('invoice') && $need_more_storage) {
70
-   addnew('../invoice/more_storage?section='.$section, 'Mehr Speicherplatz bestellen');
68
+    addnew('../invoice/more_storage?section='.$section, 'Mehr Speicherplatz bestellen');
71 69
 }
72 70
     
73 71
 output("<p>Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier verzögert angezeigt!</p>");
74
-
75
-
76
-?>
Browse code

Copyright year update

Bernd Wurst authored on13/01/2018 06:07:05
Showing1 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

Zwischenversion

Bernd Wurst authored on10/02/2017 12:20:59
Showing1 changed files
... ...
@@ -27,6 +27,7 @@ $acc = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['
27 27
 $usedquota = get_used_quota($acc['uid']);
28 28
 $quota = array();
29 29
 $multiserver = count($usedquota) > 1;
30
+$need_more_storage = false;
30 31
 foreach ($usedquota as $q)
31 32
 {
32 33
       $mailbar = '';
... ...
@@ -40,6 +41,9 @@ foreach ($usedquota as $q)
40 41
       }  
41 42
 
42 43
       $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
44
+      if ($percent > 90) {
45
+        $need_more_storage = true;
46
+      }
43 47
       $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" ));
44 48
       $width = 2 * min($percent, 100) - $mailwidth;
45 49
      
... ...
@@ -62,6 +66,9 @@ output("<h5>Stammdaten</h5>
62 66
 ");
63 67
 output("</div>\n");
64 68
 output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</div>");
69
+if (have_module('invoice') && $need_more_storage) {
70
+   addnew('../invoice/more_storage?section='.$section, 'Mehr Speicherplatz bestellen');
71
+}
65 72
     
66 73
 output("<p>Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier verzögert angezeigt!</p>");
67 74
 
Browse code

URLs von http nach https

Hanno Böck authored on20/09/2016 15:12:53
Showing1 changed files
... ...
@@ -9,7 +9,7 @@ Written 2008-2014 by schokokeks.org Hosting, namely
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 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/
12
+https://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.
15 15
 */
... ...
@@ -58,7 +58,7 @@ output("<h5>Stammdaten</h5>
58 58
 <div style=\"margin-left: 2em;\">
59 59
 <p>Benutzername: <strong>{$acc['username']}</strong></p>
60 60
 <p>Servername".($multiserver ? " (primär)" : '').": <strong>".get_server_by_id($acc['server'])."</strong></p>
61
-<p>Tipp: <a href=\"http://wiki.schokokeks.org/Dateizugriff\">Wiki-Anleitung zum Dateizugriff bzw. zum Ändern der Dateien Ihrer Website.</a></p>
61
+<p>Tipp: <a href=\"https://wiki.schokokeks.org/Dateizugriff\">Wiki-Anleitung zum Dateizugriff bzw. zum Ändern der Dateien Ihrer Website.</a></p>
62 62
 ");
63 63
 output("</div>\n");
64 64
 output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</div>");
Browse code

Zeige Benutzeraccount-Stammdaten auf der Startseite

Bernd Wurst authored on08/02/2014 14:24:06
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,69 @@
1
+<?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2014 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
+*/
16
+
17
+require_once('inc/base.php');
18
+require_once('inc/icons.php');
19
+
20
+require_once('useraccounts.php');
21
+
22
+require_role(ROLE_SYSTEMUSER);
23
+
24
+/* diese Datei wird auf der startseite eingebunden */
25
+
26
+$acc = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
27
+$usedquota = get_used_quota($acc['uid']);
28
+$quota = array();
29
+$multiserver = count($usedquota) > 1;
30
+foreach ($usedquota as $q)
31
+{
32
+      $mailbar = '';
33
+      $mailstring = '';
34
+      $mailpercent = round(( $q['mailquota'] / $q["systemquota"]) * 100);
35
+      $mailwidth = 2 * min($mailpercent, 100);
36
+
37
+      if ($q["mailquota"] > 0) {
38
+	$mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
39
+        $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
40
+      }  
41
+
42
+      $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
43
+      $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" ));
44
+      $width = 2 * min($percent, 100) - $mailwidth;
45
+     
46
+      $used_space = $q['systemquota_used'] + $q['mailquota'];
47
+      $msg = "";
48
+      if ($multiserver) {
49
+        $msg = "<p>Server <strong>{$q['server']}</strong><br />";
50
+      }
51
+      $quota[] = $msg."{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
52
+        <div style=\"margin: 0; padding: 0; width: 200px; border: 1px solid black;\">{$mailbar}<div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; margin-left: {$mailwidth}px; padding: 0;\">&#160;</div></div>";
53
+
54
+}
55
+$customer = get_customer_info($_SESSION['userinfo']['customerno']);
56
+$quotastring = implode('', $quota);
57
+output("<h5>Stammdaten</h5>
58
+<div style=\"margin-left: 2em;\">
59
+<p>Benutzername: <strong>{$acc['username']}</strong></p>
60
+<p>Servername".($multiserver ? " (primär)" : '').": <strong>".get_server_by_id($acc['server'])."</strong></p>
61
+<p>Tipp: <a href=\"http://wiki.schokokeks.org/Dateizugriff\">Wiki-Anleitung zum Dateizugriff bzw. zum Ändern der Dateien Ihrer Website.</a></p>
62
+");
63
+output("</div>\n");
64
+output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</div>");
65
+    
66
+output("<p>Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier verzögert angezeigt!</p>");
67
+
68
+
69
+?>