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:
Michael Kaufmann (d00p)
2013-09-29 18:40:25 +02:00
parent b3280e2264
commit 0b0a515124
7 changed files with 18 additions and 5 deletions

View File

@@ -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++;

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

View File

@@ -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>&nbsp;
</if>
<if $row['parentdomainid'] == '0' && !(isset($row['domainaliasid']) && $row['domainaliasid'] != 0)>