summaryrefslogtreecommitdiff
path: root/pages/account/12.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/account/12.php')
-rw-r--r--pages/account/12.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/pages/account/12.php b/pages/account/12.php
index a59a5a1..f4428aa 100644
--- a/pages/account/12.php
+++ b/pages/account/12.php
@@ -36,16 +36,18 @@
UNIX_TIMESTAMP(`domaincerts`.`expire`) as `expired`,
`domaincerts`.`expire`,
`domaincerts`.`revoked` as `revoke`,
- UNIX_TIMESTAMP(`revoked`) as `revoked`, `CN`, `domaincerts`.`serial`, `domaincerts`.`id` as `id`,
+ UNIX_TIMESTAMP(`revoked`) as `revoked`,
+ if (`domaincerts`.`expire`=0,CURRENT_TIMESTAMP(),`domaincerts`.`modified`) as `modified`,
+ `CN`, `domaincerts`.`serial`, `domaincerts`.`id` as `id`,
`domaincerts`.`description`
from `domaincerts`,`domains`
where `memid`='".intval($_SESSION['profile']['id'])."' and `domaincerts`.`domid`=`domains`.`id` ";
if($viewall != 1)
{
$query .= "AND `revoked`=0 AND `renewed`=0 ";
- $query .= "HAVING `timeleft` > 0 ";
+ $query .= "HAVING `timeleft` > 0 or `expire` = 0 ";
}
- $query .= "ORDER BY `domaincerts`.`modified` desc";
+ $query .= "ORDER BY `modified` desc";
//echo $query."<br>\n";
$res = mysql_query($query);
if(mysql_num_rows($res) <= 0)