summaryrefslogtreecommitdiff
path: root/pages/account
diff options
context:
space:
mode:
Diffstat (limited to 'pages/account')
-rw-r--r--pages/account/12.php10
-rw-r--r--pages/account/5.php2
2 files changed, 7 insertions, 5 deletions
diff --git a/pages/account/12.php b/pages/account/12.php
index 9058a07..e65675d 100644
--- a/pages/account/12.php
+++ b/pages/account/12.php
@@ -35,17 +35,19 @@
UNIX_TIMESTAMP(`domaincerts`.`expire`) - UNIX_TIMESTAMP() as `timeleft`,
UNIX_TIMESTAMP(`domaincerts`.`expire`) as `expired`,
`domaincerts`.`expire` as `expires`, `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 `expires` = 0 ";
}
- $query .= "ORDER BY `domaincerts`.`modified` desc";
-//echo $query."<br>\n";
+ $query .= "ORDER BY `modified` desc";
+echo $query."<br>\n";
$res = mysql_query($query);
if(mysql_num_rows($res) <= 0)
{
diff --git a/pages/account/5.php b/pages/account/5.php
index d70916a..2815261 100644
--- a/pages/account/5.php
+++ b/pages/account/5.php
@@ -50,7 +50,7 @@
$query .= " AND `revoked`=0 AND `renewed`=0 ";
$query .= " GROUP BY `emailcerts`.`id` ";
if($viewall != 1)
- $query .= " HAVING `timeleft` > 0 or `expires` = 0";
+ $query .= " HAVING `timeleft` > 0 or `expires` = 0 ";
$query .= " ORDER BY `modified` desc";
// echo $query."<br>\n";
$res = mysql_query($query);