fe8d7c2025e33349ab1e51c0e906ec3ee69dcff2
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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 12 years ago

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

bernd authored 12 years ago

13) 
14) if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

15)     $shortcuts[] = [ 'section' => 'Webserver',
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

16)         'weight'  => 30,
17)         'file'    => 'vhosts',
18)         'icon'    => 'webserver.png',
19)         'title'   => 'Websites verwalten',
20)         'alert'   => null, ];
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

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

Hanno authored 6 years ago

23)     $alert = '';
24)     include_once('modules/vhosts/include/certs.php');
25)     $certs = user_certs();
26)     if (count($certs) > 0) {
27)         $num_expired = 0;
28)         $num_warn = 0;
29)         foreach ($certs as $c) {
30)             if (cert_is_letsencrypt($c['id'])) {
31)                 continue;
32)             }
33)             if ($c['valid_until'] <= date('Y-m-d')) {
34)                 $num_expired++;
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

35)             } elseif ($c['valid_until'] <= date('Y-m-d', time() + (30 * 24 * 3600))) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

36)                 $num_warn++;
37)             }
38)         }
39)         if ($num_expired > 0) {
40)             $alert .= 'Zertifikate abgelaufen';
41)         } elseif ($num_warn > 0) {
42)             $alert .= 'Zertifikate bald abgelaufen';
43)         }
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

44)     }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

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

Hanno authored 6 years ago

46)     if ($alert) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

47)         $shortcuts[] = [ 'section' => 'Webserver',
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

48)             'weight'  => 80,
49)             'file'    => 'certs',
50)             'icon'    => 'key.png',
51)             'title'   => 'HTTPS-Zertifikate',
52)             'alert'   => $alert, ];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

53)     }