From 215cb9076cca3f44a091c40313a3562f41762ddc Mon Sep 17 00:00:00 2001 From: root Date: Wed, 10 Oct 2007 22:22:10 +0000 Subject: [PATCH] Added a list of open TVerify requests Added a check whether a request had been voted before, when opening the request page --- pages/account/52.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/pages/account/52.php b/pages/account/52.php index 5bd203c..57fb0b5 100644 --- a/pages/account/52.php +++ b/pages/account/52.php @@ -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.")."
"; } else { - echo _("Unable to locate a valid request for that UID.")."
"; + if($uid) echo _("Unable to locate a valid request for that UID.")."
"; } // Search for open requests: @@ -68,10 +79,21 @@ { echo "
"._("The following requests are still open:")."
\n
\n"; } + else + { + echo "
"._("There are no pending requests where you haven't voted yet."); + } } } ?>