Added a list of open TVerify requests

Added a check whether a request had been voted before, when opening the request page
pull/1/head
root 17 years ago
parent e18c2cdf76
commit 215cb9076c

@ -21,6 +21,17 @@
{
$row = mysql_fetch_assoc($res);
$memid = $row['memid'];
$query2 = "select * from `tverify-vote` where `tverify`='$uid' and `memid`='".$_SESSION['profile']['id']."'";
$rc2 = mysql_num_rows(mysql_query($query2));
if($rc2 > 0)
{
showheader(_("My CAcert.org Account!"));
echo _("You have already voted on this request.");
showfooter();
exit;
}
$query = "select sum(`points`) as `points` from `notary` where `to`='$memid'";
$notary = mysql_fetch_assoc(mysql_query($query));
$query = "select * from `users` where `id`='$memid'";
@ -58,7 +69,7 @@
{
echo _("This UID has already been voted on.")."<br/>";
} else {
echo _("Unable to locate a valid request for that UID.")."<br/>";
if($uid) echo _("Unable to locate a valid request for that UID.")."<br/>";
}
// Search for open requests:
@ -68,10 +79,21 @@
{
echo "<br/>"._("The following requests are still open:")."<br/><ul>";
while($row = mysql_fetch_assoc($res))
echo "<li><a href='account.php?id=52&uid=${row['id']}'>$row[id]</a></li>\n";
{
$uid=$row[id];
$query3 = "select * from `tverify-vote` where `tverify`='$uid' and `memid`='".$_SESSION['profile']['id']."'";
$rc3 = mysql_num_rows(mysql_query($query3));
if($rc3 <= 0)
{
echo "<li><a href='account.php?id=52&uid=${row['id']}'>$row[id]</a></li>\n";
}
}
echo "</ul>\n<br>\n";
}
else
{
echo "<br/>"._("There are no pending requests where you haven't voted yet.");
}
} } ?>

Loading…
Cancel
Save