4c630eb1d90ef9c268aeff3700814575bdf24ed6
bernd Index-Blöcke werden jetzt v...

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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
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) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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) */
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

16) 
17) if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

18)     $shortcuts[] = array( 'section' => 'Webserver',
19)                         'weight'  => 30,
20)                         'file'    => 'vhosts',
21)                         'icon'    => 'webserver.png',
Bernd Wurst Auch shortcut-Link "Website...

Bernd Wurst authored 11 years ago

22)                         'title'   => 'Websites verwalten',
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

23)                         'alert'   => null );
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

24) }
25) if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

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)         }
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

47)     }
Hanno remove whitespace in empty...

Hanno authored 5 years ago

48) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

49)     if ($alert) {
50)         $shortcuts[] = array( 'section' => 'Webserver',
51)                           'weight'  => 80,
52)                           'file'    => 'certs',
53)                           'icon'    => 'key.png',
Bernd Wurst Interface für Zertifikate i...

Bernd Wurst authored 7 years ago

54)                           'title'   => 'HTTPS-Zertifikate',
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

55)                           'alert'   => $alert );
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

56)     }