git.schokokeks.org
Repositories
Help
Report an Issue
webinterface.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
c12c27e
Branches
Tags
master
ticket
webinterface.git
modules
vhosts
shortcuts.php
Index-Blöcke werden jetzt vond en Modulen selbst bereitgestellt
bernd
commited
c12c27e
at 2012-03-08 14:33:17
shortcuts.php
Blame
History
Raw
<?php if ($_SESSION['role'] & ROLE_SYSTEMUSER) { $shortcuts[] = array( 'section' => 'Webserver', 'weight' => 30, 'file' => 'vhosts', 'icon' => 'webserver.png', 'title' => 'Webserver-Einstellungen', 'alert' => NULL ); } if ($_SESSION['role'] & ROLE_SYSTEMUSER) { $alert = ''; include_once('modules/vhosts/include/certs.php'); $certs = user_certs(); if (count($certs) > 0) { $num_expired = 0; $num_warn = 0; foreach ($certs as $c) { if ($c['valid_until'] <= date('Y-m-d')) { $num_expired++; } elseif ($c['valid_until'] <= date('Y-m-d', time()+(30*24*3600))) { $num_warn++; } } if ($num_expired > 0) { $alert .= 'Zertifikate abgelaufen'; } elseif ($num_warn > 0) { $alert .= 'Zertifikate bald abgelaufen'; } } if ($alert) { $shortcuts[] = array( 'section' => 'Webserver', 'weight' => 80, 'file' => 'certs', 'icon' => 'secure.png', 'title' => 'SSL-Zertifikate', 'alert' => $alert ); } }