diff options
Diffstat (limited to 'pages/account')
-rw-r--r-- | pages/account/12.php | 2 | ||||
-rw-r--r-- | pages/account/18.php | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/pages/account/12.php b/pages/account/12.php index e65675d..13bef91 100644 --- a/pages/account/12.php +++ b/pages/account/12.php @@ -47,7 +47,7 @@ $query .= "HAVING `timeleft` > 0 or `expires` = 0 "; } $query .= "ORDER BY `modified` desc"; -echo $query."<br>\n"; +//echo $query."<br>\n"; $res = mysql_query($query); if(mysql_num_rows($res) <= 0) { diff --git a/pages/account/18.php b/pages/account/18.php index 9ab13b2..d295894 100644 --- a/pages/account/18.php +++ b/pages/account/18.php @@ -79,6 +79,7 @@ $status = array_key_exists('status',$_SESSION['_config']) ? intval($_SESSION['_c UNIX_TIMESTAMP(`oemail`.`expire`) as `expired`, `oemail`.`expire` as `expires`, `oemail`.`revoked` as `revoke`, UNIX_TIMESTAMP(`oemail`.`revoked`) as `revoked`, + if (`oemail`.`expire`=0,CURRENT_TIMESTAMP(),`oemail`.`modified`) as `modified`, `oemail`.`CN`, `oemail`.`serial`, `oemail`.`id`, `oemail`.`description`, `oemail`.`ou`, `orginfo`.`O` from `orgemailcerts` as `oemail`, `org`, `orginfo` @@ -92,17 +93,17 @@ $status = array_key_exists('status',$_SESSION['_config']) ? intval($_SESSION['_c if(0==$status) { $query .= "AND `oemail`.`revoked`=0 AND `oemail`.`renewed`=0 "; - $query .= "HAVING `timeleft` > 0 AND `revoked`=0 "; + $query .= "HAVING `timeleft` > 0 AND `revoked`=0 or `expires` = 0 "; } switch ($sorting){ case 0: - $query .= "ORDER BY `orginfo`.`O`, `oemail`.`expire` desc"; + $query .= "ORDER BY `orginfo`.`O`, `modified` desc"; break; case 1: - $query .= "ORDER BY `orginfo`.`O`, `oemail`.`ou`, `oemail`.`expire` desc"; + $query .= "ORDER BY `orginfo`.`O`, `oemail`.`ou`, `modified` desc"; break; case 2: - $query .= "ORDER BY `orginfo`.`O`, `oemail`.`CN`, `oemail`.`expire` desc"; + $query .= "ORDER BY `orginfo`.`O`, `oemail`.`CN`, `modified` desc"; break; } $res = mysql_query($query); |