This commit is contained in:
root 2008-08-10 00:31:04 +00:00
parent 8f0d9d5626
commit e3bb9b9157

View file

@ -32,19 +32,21 @@
$query = "select UNIX_TIMESTAMP(`emailcerts`.`created`) as `created`, $query = "select UNIX_TIMESTAMP(`emailcerts`.`created`) as `created`,
UNIX_TIMESTAMP(`emailcerts`.`expire`) - UNIX_TIMESTAMP() as `timeleft`, UNIX_TIMESTAMP(`emailcerts`.`expire`) - UNIX_TIMESTAMP() as `timeleft`,
UNIX_TIMESTAMP(`emailcerts`.`expire`) as `expired`, UNIX_TIMESTAMP(`emailcerts`.`expire`) as `expired`,
`emailcerts`.`expire` as `expires`, `emailcerts`.`revoked` as `revoke`, `emailcerts`.`expire` as `expires`,
UNIX_TIMESTAMP(`emailcerts`.`revoked`) as `revoked`, `emailcerts`.`id`, `emailcerts`.`revoked` as `revoke`,
`email`.`email` as `email`, emailcerts.disablelogin as `disablelogin` UNIX_TIMESTAMP(`emailcerts`.`revoked`) as `revoked`,
from `emailcerts`, `emaillink`, `email` `emailcerts`.`id`,
`emailcerts`.`CN`,
emailcerts.disablelogin as `disablelogin`
from `emailcerts`
where `emailcerts`.`memid`='".$_SESSION['profile']['id']."' where `emailcerts`.`memid`='".$_SESSION['profile']['id']."'
and `emailcerts`.`id`=`emaillink`.`emailcertsid` ";
and `emaillink`.`emailid` = `email`.`id` ";
if($_GET['viewall'] != 1) if($_GET['viewall'] != 1)
$query .= "AND `revoked`=0 AND `renewed`=0 "; $query .= " AND `revoked`=0 AND `renewed`=0 ";
$query .= "GROUP BY `emailcerts`.`id` "; $query .= " GROUP BY `emailcerts`.`id` ";
if($_GET['viewall'] != 1) if($_GET['viewall'] != 1)
$query .= "HAVING `timeleft` > 0 "; $query .= " HAVING `timeleft` > 0 ";
$query .= "ORDER BY `emailcerts`.`modified` desc"; $query .= " ORDER BY `emailcerts`.`modified` desc";
// echo $query."<br>\n"; // echo $query."<br>\n";
$res = mysql_query($query); $res = mysql_query($query);
if(mysql_num_rows($res) <= 0) if(mysql_num_rows($res) <= 0)
@ -71,7 +73,7 @@
<? if($verified != _("Pending") && $verified != _("Revoked")) { ?> <? if($verified != _("Pending") && $verified != _("Revoked")) { ?>
<td class="DataTD"><input type="checkbox" name="revokeid[]" value="<?=$row['id']?>"></td> <td class="DataTD"><input type="checkbox" name="revokeid[]" value="<?=$row['id']?>"></td>
<td class="DataTD"><?=$verified?></td> <td class="DataTD"><?=$verified?></td>
<td class="DataTD"><a href="account.php?id=6&cert=<?=$row['id']?>"><?=(trim($row['email'])=="" ? _("empty") : $row['email'])?></a></td> <td class="DataTD"><a href="account.php?id=6&cert=<?=$row['id']?>"><?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?></a></td>
<? } else if($verified != _("Revoked")) { ?> <? } else if($verified != _("Revoked")) { ?>
<td class="DataTD"><input type="checkbox" name="delid[]" value="<?=$row['id']?>"></td> <td class="DataTD"><input type="checkbox" name="delid[]" value="<?=$row['id']?>"></td>
<td class="DataTD"><?=$verified?></td> <td class="DataTD"><?=$verified?></td>