From e3bb9b915716c7fbd5bc6d72fb66286ca5004ab0 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 10 Aug 2008 00:31:04 +0000 Subject: [PATCH] Fixed http://bugs.cacert.org/view.php?id=557 --- pages/account/5.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pages/account/5.php b/pages/account/5.php index 47f5eb0..1ef6aad 100644 --- a/pages/account/5.php +++ b/pages/account/5.php @@ -32,19 +32,21 @@ $query = "select UNIX_TIMESTAMP(`emailcerts`.`created`) as `created`, UNIX_TIMESTAMP(`emailcerts`.`expire`) - UNIX_TIMESTAMP() as `timeleft`, UNIX_TIMESTAMP(`emailcerts`.`expire`) as `expired`, - `emailcerts`.`expire` as `expires`, `emailcerts`.`revoked` as `revoke`, - UNIX_TIMESTAMP(`emailcerts`.`revoked`) as `revoked`, `emailcerts`.`id`, - `email`.`email` as `email`, emailcerts.disablelogin as `disablelogin` - from `emailcerts`, `emaillink`, `email` + `emailcerts`.`expire` as `expires`, + `emailcerts`.`revoked` as `revoke`, + UNIX_TIMESTAMP(`emailcerts`.`revoked`) as `revoked`, + `emailcerts`.`id`, + `emailcerts`.`CN`, + emailcerts.disablelogin as `disablelogin` + from `emailcerts` where `emailcerts`.`memid`='".$_SESSION['profile']['id']."' - and `emailcerts`.`id`=`emaillink`.`emailcertsid` - and `emaillink`.`emailid` = `email`.`id` "; + "; if($_GET['viewall'] != 1) - $query .= "AND `revoked`=0 AND `renewed`=0 "; - $query .= "GROUP BY `emailcerts`.`id` "; + $query .= " AND `revoked`=0 AND `renewed`=0 "; + $query .= " GROUP BY `emailcerts`.`id` "; if($_GET['viewall'] != 1) - $query .= "HAVING `timeleft` > 0 "; - $query .= "ORDER BY `emailcerts`.`modified` desc"; + $query .= " HAVING `timeleft` > 0 "; + $query .= " ORDER BY `emailcerts`.`modified` desc"; // echo $query."
\n"; $res = mysql_query($query); if(mysql_num_rows($res) <= 0) @@ -71,7 +73,7 @@ - +