show whether ssl-certs are given for a domain by red or green icon in customer-domains, thx to nico for the icon-work

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-09-27 11:03:21 +02:00
parent 5b419cb7df
commit 0727a6bf7b
5 changed files with 14 additions and 11 deletions

View File

@@ -73,17 +73,20 @@ elseif($page == 'domains')
$parentdomains_count++;
}
$domains_count++;
/*
$domainparts = explode('.', $row['domain']);
$domainparts = array_reverse($domainparts);
$sortkey = '';
foreach($domainparts as $key => $part)
{
$sortkey.= $part . '.';
}
$domain_array[$sortkey] = $row;
/**
* check for set ssl-certs to show either
* a red or a green ssl-icon
*/
$row['domain_hascert'] = false;
$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;
}
$domains_count++;
$domain_array[$row['domain']] = $row;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

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.png" alt="{$lng['panel']['ssleditor']}" />
<img src="templates/{$theme}/assets/img/icons/ssl_<if $row['domain_hascert'] == 1>green<else>red</if>.png" alt="{$lng['panel']['ssleditor']}" />
</a>&nbsp;
</if>
<if $row['parentdomainid'] == '0' && !(isset($row['domainaliasid']) && $row['domainaliasid'] != 0)>