diff options
author | canyonknight <canyonknight@gmail.com> | 2012-05-23 13:43:43 -0400 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-07-06 11:26:10 +0200 |
commit | cf0718bd43f12c0038e73c63f246a6732823ec49 (patch) | |
tree | 11262a728a9ab751f2846d7fe0eea63edc5136d8 /web/html/voters.php | |
parent | bfc4a11006eff1909d8129f217f1fe73b471886f (diff) | |
download | aurweb-cf0718bd43f12c0038e73c63f246a6732823ec49.tar.xz |
voters.php: Overhaul to match archweb
* Currently voters.php has no navigation links and/or styling. This patch adds
the appropriate styling
* User PHP alternative syntax for control structures
* Change a variable name to more frequently used "atype"
* General clean-up of XHTML
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/voters.php')
-rw-r--r-- | web/html/voters.php | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/web/html/voters.php b/web/html/voters.php index 02abe29..cf119a6 100644 --- a/web/html/voters.php +++ b/web/html/voters.php @@ -15,26 +15,28 @@ $SID = $_COOKIE['AURSID']; $pkgid = intval($_GET['ID']); $votes = getvotes($pkgid); -$account = account_from_sid($SID); +$atype = account_from_sid($SID); -if ($account == 'Trusted User' || $account == 'Developer') { +html_header(__("Voters")); + +if ($atype == 'Trusted User' || $atype== 'Developer'): ?> -<html> -<body> -<h3><?php echo account_from_sid($SID) ?></h3> -<h2>Votes for <a href="packages.php?ID=<?php echo $pkgid ?>"><?php echo pkgname_from_id($pkgid) ?></a></h2> + +<div class="box"> + <h2>Votes for <a href="packages.php?ID=<?php echo $pkgid ?>"><?php echo pkgname_from_id($pkgid) ?></a></h2> + <div class="boxbody"> + <?php - while ($row = mysql_fetch_assoc($votes)) { + while ($row = mysql_fetch_assoc($votes)): $uid = $row['UsersID']; $username = $row['Username']; ?> -<a href="account.php?Action=AccountInfo&ID=<?php echo $uid ?>"> -<?php echo htmlspecialchars($username) ?></a><br /> -<?php - } -?> -</body> -</html> + <a href="account.php?Action=AccountInfo&ID=<?php echo $uid ?>"><?php echo htmlspecialchars($username) ?></a><br /> + <?php endwhile; ?> + </div> +</div> + <?php -} +endif; +html_footer(AUR_VERSION); |