diff options
author | Angel 'angvp' Velasquez <angvp@archlinux.com.ve> | 2009-02-13 21:27:05 +0100 |
---|---|---|
committer | Loui Chang <louipc.ist@gmail.com> | 2009-02-13 21:27:05 +0100 |
commit | df75621d232405c0ac3c6211f4c72ffd851bee67 (patch) | |
tree | 80db3272179d5c825dac9dd162c0ea116db441a8 /web | |
parent | 8a54ae0a8c2b286cfb8d8c251ed4b10c4a7f178b (diff) | |
download | aur-df75621d232405c0ac3c6211f4c72ffd851bee67.tar.gz aur-df75621d232405c0ac3c6211f4c72ffd851bee67.tar.xz |
List TUs that voted on a proposal.
This patch lists who voted on a proposal after the proposal is closed.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web')
-rw-r--r-- | web/html/tu.php | 13 | ||||
-rw-r--r-- | web/template/tu_details.php | 15 |
2 files changed, 27 insertions, 1 deletions
diff --git a/web/html/tu.php b/web/html/tu.php index 67addfb8..b400777a 100644 --- a/web/html/tu.php +++ b/web/html/tu.php @@ -38,6 +38,19 @@ if ($atype == "Trusted User" OR $atype == "Developer") { $qvoted.= "UserID = " . uid_from_sid($_COOKIE["AURSID"]); $hasvoted = mysql_num_rows(db_query($qvoted, $dbh)); + # List voters of a proposal. + $qwhoVoted = "SELECT tv.UserID,U.Username + FROM TU_Votes tv, Users U + WHERE tv.VoteID = {$row['ID']} + AND tv.UserID = U.ID + ORDER BY Username"; + $result = db_query($qwhoVoted,$dbh); + if (mysql_num_rows($result) > 0) { + while ($who = mysql_fetch_assoc($result)) { + $whovoted.= '<a href="account.php?Action=AccountInfo&ID='.$who['UserID'].'">'.$who['Username'].'</a> '; + } + } + $canvote = 1; $errorvote = ""; if ($isrunning == 0) { diff --git a/web/template/tu_details.php b/web/template/tu_details.php index 7fc9f09f..df392b48 100644 --- a/web/template/tu_details.php +++ b/web/template/tu_details.php @@ -44,7 +44,20 @@ N/A </table> </table> </div></div> -<br /> + +<?php +if (!$isrunning) { ?> +<div class="pgbox"> + <div class="pgboxtitle"> + <span class="f3"><?php echo __('Voters'); ?></span> + </div> + <div class="pgboxbody"> + <?php echo $whovoted; ?> + </div> +</div> +<?php +} ?> + <div class='pgbox'> <div class='pgboxtitle'><span class='f3'><?php print __("Vote Actions") ?></span></div> <div class='pgboxbody'> |