Improved register_globals handling

pull/1/head
root 16 years ago
parent 71fffa941c
commit f3ee832bc3

@ -15,10 +15,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ ?>
<? $viewall=0; if(array_key_exists('viewall',$_REQUEST)) $viewall=intval($_REQUEST['viewall']); ?>
<form method="post" action="account.php">
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
<td colspan="6" class="title"><?=_("Client Certificates")?> - <a href="account.php?id=5&viewall=<?=intval(!$_GET['viewall'])?>"><?=_("View all certificates")?></a></td>
<td colspan="6" class="title"><?=_("Client Certificates")?> - <a href="account.php?id=5&viewall=<?=!$viewall?>"><?=_("View all certificates")?></a></td>
</tr>
<tr>
<td class="DataTD"><?=_("Renew/Revoke/Delete")?></td>
@ -41,10 +42,10 @@
from `emailcerts`
where `emailcerts`.`memid`='".$_SESSION['profile']['id']."'
";
if($_GET['viewall'] != 1)
if($viewall != 1)
$query .= " AND `revoked`=0 AND `renewed`=0 ";
$query .= " GROUP BY `emailcerts`.`id` ";
if($_GET['viewall'] != 1)
if($viewall != 1)
$query .= " HAVING `timeleft` > 0 ";
$query .= " ORDER BY `emailcerts`.`modified` desc";
// echo $query."<br>\n";
@ -93,7 +94,7 @@
<? } ?>
<tr>
<td class="DataTD" colspan="8">
<a href="account.php?id=5&viewall=<?=intval(!$_GET['viewall'])?>"><b><?=$_GET['viewall']?_("Hide old certificates"):_("View all certificates")?></b></a>
<a href="account.php?id=5&viewall=<?=!viewall?>"><b><?=$viewall?_("Hide old certificates"):_("View all certificates")?></b></a>
</td>
</tr>

Loading…
Cancel
Save