2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 if($_SESSION['profile']['tverify'] <= 0) {
20 echo _("You don't have access to this area.");
22 $uid = intval($_GET['uid']);
23 $query = "select * from `tverify` where `id`='".intval($uid)."' and `modified`=0";
24 $res = mysql_query($query);
25 if(mysql_num_rows($res) > 0) {
26 $row = mysql_fetch_assoc($res);
27 $memid = intval($row['memid']);
29 $query2 = "select * from `tverify-vote` where `tverify`='".intval($uid)."' and `memid`='".intval($_SESSION['profile']['id'])."'";
30 $rc2 = mysql_num_rows(mysql_query($query2));
32 showheader(_("My CAcert.org Account!"));
33 echo _("You have already voted on this request.");
38 $query = "select sum(`points`) as `points` from `notary` where `to`='".intval($memid)."' and `deleted` = 0";
39 $notary = mysql_fetch_assoc(mysql_query($query));
40 $query = "select * from `users` where `id`='".intval($memid)."'";
41 $user = mysql_fetch_assoc(mysql_query($query));
42 $tobe = 50 - $notary['points'];
43 if($row['URL'] != '' && $row['photoid'] != '') {
44 $tobe = 150 - $notary['points'];
45 } else if($row['URL'] != '') {
46 $tobe = 90 - $notary['points'];
48 if(intval($tobe) <= 0) {
52 <?
=_("Request Details")?
>:<br
>
53 <?
=_("Name on file")?
>: <?
=sanitizeHTML($user['fname']." ".$user['mname']." ".$user['lname']." ".$user['suffix'])?
><br
>
54 <?
=_("Primary email address")?
>: <?
=sanitizeHTML($user['email'])." (".intval($user['id']).")"?
><br
>
55 <?
=_("Certificate Subject")?
>: <?
=sanitizeHTML($row['CN'])?
><br
>
56 <?
if($row['URL'] != '') { ?
>
57 <?
=_("Notary URL")?
>: <a href
="<?=$row['URL']?>"><?
=$row['URL']?
></a
><br
>
59 <?
if($row['photoid'] != '') { ?
>
60 <?
=_("Photo ID URL")?
>: <a href
="/account.php?id=51&photoid=<?=intval($row['id'])?>"><?
=_("Here")?
></a
><br
>
62 <?
=_("Current Points")?
>: <?
=intval($notary['points'])?
><br
>
63 <?
=_("Potential Points")?
>: <?
=intval($tobe)?
><br
>
64 <?
=_("Date of Birth")?
>: <?
=$user['dob']?
> (YYYY
-MM
-DD
)<br
>
67 <form method
="post" action
="account.php">
68 <?
=_("Comment")?
>: <input type
="text" name
="comment"><br
>
69 <input type
="submit" name
="agree" value
="<?=_("I agree with this Application
")?>">
70 <input type
="submit" name
="disagree" value
="<?=_("I don
't agree with this Application")?>">
71 <input type="hidden" name="oldid" value="<?=intval($_GET['id
'])?>">
72 <input type="hidden" name="uid" value="<?=intval($uid)?>">
76 $query = "select * from `tverify` where `id`='".intval($uid)."' and `modified`=1";
77 $res = mysql_query($query);
78 if(mysql_num_rows($res) > 0) {
79 echo _("This UID has already been voted on.")."<br/>";
81 if($uid) echo _("Unable to locate a valid request for that UID.")."<br/>";
84 // Search for open requests:
85 $query = "select * from `tverify` where `modified`=0";
86 $res = mysql_query($query);
87 if(mysql_num_rows($res) > 0) {
88 echo "<br/>"._("The following requests are still open:")."<br/><ul>";
89 while($row = mysql_fetch_assoc($res)) {
90 $uid=intval($row['id
']);
91 $query3 = "select * from `tverify-vote` where `tverify`='".intval($uid)."' and `memid`='".intval($_SESSION['profile']['id'])."'";
92 $rc3 = mysql_num_rows(mysql_query($query3));
95 echo "<li><a href='account
.php?id
=52&
;uid
=".intval($row['id'])."'>".intval($row['id
'])."</a></li>\n";
100 echo "<br/>"._("There are no pending requests where you haven't voted yet
.");