show either if domain has a global certificate (via ip/port), a shared certificate (via parentdomain) or it's own certificate (customer-entered), thx to Nico for the artwork
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -74,16 +74,29 @@ elseif($page == 'domains')
|
||||
}
|
||||
|
||||
/**
|
||||
* check for set ssl-certs to show either
|
||||
* a red or a green ssl-icon
|
||||
* check for set ssl-certs to show different state-icons
|
||||
*/
|
||||
$row['domain_hascert'] = false;
|
||||
// nothing (ssl_global)
|
||||
$row['domain_hascert'] = 0;
|
||||
$ssl_result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` WHERE `domainid`='".(int)$row['id']."';");
|
||||
if (is_array($ssl_result)
|
||||
&& isset($ssl_result['ssl_cert_file'])
|
||||
&& $ssl_result['ssl_cert_file'] != ''
|
||||
) {
|
||||
$row['domain_hascert'] = true;
|
||||
// own certificate (ssl_customer_green)
|
||||
$row['domain_hascert'] = 1;
|
||||
} else {
|
||||
// check if it's parent has one set (shared)
|
||||
if ($row['parentdomainid'] != 0) {
|
||||
$ssl_result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` WHERE `domainid`='".(int)$row['parentdomainid']."';");
|
||||
if (is_array($ssl_result)
|
||||
&& isset($ssl_result['ssl_cert_file'])
|
||||
&& $ssl_result['ssl_cert_file'] != ''
|
||||
) {
|
||||
// parent has a certificate (ssl_shared)
|
||||
$row['domain_hascert'] = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$domains_count++;
|
||||
|
||||
BIN
templates/Froxlor/assets/img/icons/ssl_customer_green.png
Normal file
BIN
templates/Froxlor/assets/img/icons/ssl_customer_green.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 699 B |
BIN
templates/Froxlor/assets/img/icons/ssl_global.png
Normal file
BIN
templates/Froxlor/assets/img/icons/ssl_global.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 778 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
BIN
templates/Froxlor/assets/img/icons/ssl_shared.png
Normal file
BIN
templates/Froxlor/assets/img/icons/ssl_shared.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 695 B |
@@ -17,7 +17,7 @@
|
||||
</if>
|
||||
<if $show_ssledit == 1>
|
||||
<a href="{$linker->getLink(array('section' => 'domains', 'page' => 'domainssleditor', 'action' => 'view', 'id' => $row['id']))}" style="text-decoration:none;">
|
||||
<img src="templates/{$theme}/assets/img/icons/ssl_<if $row['domain_hascert'] == 1>green<else>red</if>.png" alt="{$lng['panel']['ssleditor']}" />
|
||||
<img src="templates/{$theme}/assets/img/icons/ssl_<if $row['domain_hascert'] == 1>customer_green</if><if $row['domain_hascert'] == 2>shared</if><if $row['domain_hascert'] == 3>global</if>.png" alt="{$lng['panel']['ssleditor']}" />
|
||||
</a>
|
||||
</if>
|
||||
<if $row['parentdomainid'] == '0' && !(isset($row['domainaliasid']) && $row['domainaliasid'] != 0)>
|
||||
|
||||
Reference in New Issue
Block a user