Browse code

codingstyle, spaces between operators

Hanno Böck authored on 02/09/2023 07:49:40
Showing 1 changed files
... ...
@@ -32,7 +32,7 @@ if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
32 32
             }
33 33
             if ($c['valid_until'] <= date('Y-m-d')) {
34 34
                 $num_expired++;
35
-            } elseif ($c['valid_until'] <= date('Y-m-d', time()+(30*24*3600))) {
35
+            } elseif ($c['valid_until'] <= date('Y-m-d', time() + (30 * 24 * 3600))) {
36 36
                 $num_warn++;
37 37
             }
38 38
         }
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
... ...
@@ -15,12 +15,12 @@ Nevertheless, in case you use a significant part of this code, we ask (but not r
15 15
 */
16 16
 
17 17
 if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
18
-    $shortcuts[] = array( 'section' => 'Webserver',
18
+    $shortcuts[] = [ 'section' => 'Webserver',
19 19
                         'weight'  => 30,
20 20
                         'file'    => 'vhosts',
21 21
                         'icon'    => 'webserver.png',
22 22
                         'title'   => 'Websites verwalten',
23
-                        'alert'   => null );
23
+                        'alert'   => null, ];
24 24
 }
25 25
 if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
26 26
     $alert = '';
... ...
@@ -47,11 +47,11 @@ if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
47 47
     }
48 48
 
49 49
     if ($alert) {
50
-        $shortcuts[] = array( 'section' => 'Webserver',
50
+        $shortcuts[] = [ 'section' => 'Webserver',
51 51
                           'weight'  => 80,
52 52
                           'file'    => 'certs',
53 53
                           'icon'    => 'key.png',
54 54
                           'title'   => 'HTTPS-Zertifikate',
55
-                          'alert'   => $alert );
55
+                          'alert'   => $alert, ];
56 56
     }
57 57
 }
Browse code

remove whitespace in empty lines

Hanno authored on 26/06/2018 23:36:40
Showing 1 changed files
... ...
@@ -45,7 +45,7 @@ if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
45 45
             $alert .= 'Zertifikate bald abgelaufen';
46 46
         }
47 47
     }
48
- 
48
+
49 49
     if ($alert) {
50 50
         $shortcuts[] = array( 'section' => 'Webserver',
51 51
                           'weight'  => 80,
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,52 +8,50 @@ 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.
15 15
 */
16 16
 
17 17
 if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
18
-  $shortcuts[] = array( 'section' => 'Webserver', 
19
-                        'weight'  => 30, 
20
-                        'file'    => 'vhosts', 
21
-                        'icon'    => 'webserver.png', 
18
+    $shortcuts[] = array( 'section' => 'Webserver',
19
+                        'weight'  => 30,
20
+                        'file'    => 'vhosts',
21
+                        'icon'    => 'webserver.png',
22 22
                         'title'   => 'Websites verwalten',
23
-                        'alert'   => NULL );
23
+                        'alert'   => null );
24 24
 }
25 25
 if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
26
-  $alert = '';
27
-  include_once('modules/vhosts/include/certs.php');
28
-  $certs = user_certs();
29
-  if (count($certs) > 0)
30
-  {
31
-    $num_expired = 0;
32
-    $num_warn = 0;
33
-    foreach ($certs as $c)
34
-    {
35
-      if (cert_is_letsencrypt($c['id'])) {
36
-        continue;
37
-      }
38
-      if ($c['valid_until'] <= date('Y-m-d')) {
39
-        $num_expired++;
40
-      } elseif ($c['valid_until'] <= date('Y-m-d', time()+(30*24*3600))) {
41
-        $num_warn++;
42
-      }
26
+    $alert = '';
27
+    include_once('modules/vhosts/include/certs.php');
28
+    $certs = user_certs();
29
+    if (count($certs) > 0) {
30
+        $num_expired = 0;
31
+        $num_warn = 0;
32
+        foreach ($certs as $c) {
33
+            if (cert_is_letsencrypt($c['id'])) {
34
+                continue;
35
+            }
36
+            if ($c['valid_until'] <= date('Y-m-d')) {
37
+                $num_expired++;
38
+            } elseif ($c['valid_until'] <= date('Y-m-d', time()+(30*24*3600))) {
39
+                $num_warn++;
40
+            }
41
+        }
42
+        if ($num_expired > 0) {
43
+            $alert .= 'Zertifikate abgelaufen';
44
+        } elseif ($num_warn > 0) {
45
+            $alert .= 'Zertifikate bald abgelaufen';
46
+        }
43 47
     }
44
-    if ($num_expired > 0) {
45
-      $alert .= 'Zertifikate abgelaufen';
46
-    } elseif ($num_warn > 0) {
47
-      $alert .= 'Zertifikate bald abgelaufen';
48
-    }
49
-  }
50 48
  
51
-  if ($alert) {
52
-    $shortcuts[] = array( 'section' => 'Webserver', 
53
-                          'weight'  => 80, 
54
-                          'file'    => 'certs', 
55
-                          'icon'    => 'key.png', 
49
+    if ($alert) {
50
+        $shortcuts[] = array( 'section' => 'Webserver',
51
+                          'weight'  => 80,
52
+                          'file'    => 'certs',
53
+                          'icon'    => 'key.png',
56 54
                           'title'   => 'HTTPS-Zertifikate',
57 55
                           'alert'   => $alert );
58
-  }
56
+    }
59 57
 }
Browse code

Ermögliche das Setzen des PGP-Keys beim Editieren der Adresse

Bernd Wurst authored on 02/03/2018 18:26:24
Showing 1 changed files
... ...
@@ -52,7 +52,7 @@ if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
52 52
     $shortcuts[] = array( 'section' => 'Webserver', 
53 53
                           'weight'  => 80, 
54 54
                           'file'    => 'certs', 
55
-                          'icon'    => 'secure.png', 
55
+                          'icon'    => 'key.png', 
56 56
                           'title'   => 'HTTPS-Zertifikate',
57 57
                           'alert'   => $alert );
58 58
   }
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

Interface für Zertifikate ist zunächst versteckt. Vermeidung von SSL als Begriff.

Bernd Wurst authored on 13/11/2016 08:21:31
Showing 1 changed files
... ...
@@ -53,7 +53,7 @@ if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
53 53
                           'weight'  => 80, 
54 54
                           'file'    => 'certs', 
55 55
                           'icon'    => 'secure.png', 
56
-                          'title'   => 'SSL-Zertifikate',
56
+                          'title'   => 'HTTPS-Zertifikate',
57 57
                           'alert'   => $alert );
58 58
   }
59 59
 }
Browse code

Warnung über bald ablaufende Zertifikate bei Lets-Encrypt ausgeblendet

Bernd Wurst authored on 30/05/2016 08:10:00
Showing 1 changed files
... ...
@@ -32,6 +32,9 @@ if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
32 32
     $num_warn = 0;
33 33
     foreach ($certs as $c)
34 34
     {
35
+      if (cert_is_letsencrypt($c['id'])) {
36
+        continue;
37
+      }
35 38
       if ($c['valid_until'] <= date('Y-m-d')) {
36 39
         $num_expired++;
37 40
       } elseif ($c['valid_until'] <= date('Y-m-d', time()+(30*24*3600))) {
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

Auch shortcut-Link "Website" nennen

Bernd Wurst authored on 19/03/2013 06:20:42
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@ if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
19 19
                         'weight'  => 30, 
20 20
                         'file'    => 'vhosts', 
21 21
                         'icon'    => 'webserver.png', 
22
-                        'title'   => 'Webserver-Einstellungen',
22
+                        'title'   => 'Websites verwalten',
23 23
                         'alert'   => NULL );
24 24
 }
25 25
 if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
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
 if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
4 18
   $shortcuts[] = array( 'section' => 'Webserver', 
Browse code

Index-Blöcke werden jetzt vond en Modulen selbst bereitgestellt

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

bernd authored on 08/03/2012 14:33:17
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,42 @@
1
+<?php
2
+
3
+if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
4
+  $shortcuts[] = array( 'section' => 'Webserver', 
5
+                        'weight'  => 30, 
6
+                        'file'    => 'vhosts', 
7
+                        'icon'    => 'webserver.png', 
8
+                        'title'   => 'Webserver-Einstellungen',
9
+                        'alert'   => NULL );
10
+}
11
+if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
12
+  $alert = '';
13
+  include_once('modules/vhosts/include/certs.php');
14
+  $certs = user_certs();
15
+  if (count($certs) > 0)
16
+  {
17
+    $num_expired = 0;
18
+    $num_warn = 0;
19
+    foreach ($certs as $c)
20
+    {
21
+      if ($c['valid_until'] <= date('Y-m-d')) {
22
+        $num_expired++;
23
+      } elseif ($c['valid_until'] <= date('Y-m-d', time()+(30*24*3600))) {
24
+        $num_warn++;
25
+      }
26
+    }
27
+    if ($num_expired > 0) {
28
+      $alert .= 'Zertifikate abgelaufen';
29
+    } elseif ($num_warn > 0) {
30
+      $alert .= 'Zertifikate bald abgelaufen';
31
+    }
32
+  }
33
+ 
34
+  if ($alert) {
35
+    $shortcuts[] = array( 'section' => 'Webserver', 
36
+                          'weight'  => 80, 
37
+                          'file'    => 'certs', 
38
+                          'icon'    => 'secure.png', 
39
+                          'title'   => 'SSL-Zertifikate',
40
+                          'alert'   => $alert );
41
+  }
42
+}