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>
This commit is contained in:
canyonknight 2012-05-23 13:43:43 -04:00 committed by Lukas Fleischer
parent bfc4a11006
commit cf0718bd43

View file

@ -15,26 +15,28 @@ $SID = $_COOKIE['AURSID'];
$pkgid = intval($_GET['ID']); $pkgid = intval($_GET['ID']);
$votes = getvotes($pkgid); $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> <div class="box">
<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> <h2>Votes for <a href="packages.php?ID=<?php echo $pkgid ?>"><?php echo pkgname_from_id($pkgid) ?></a></h2>
<div class="boxbody">
<?php <?php
while ($row = mysql_fetch_assoc($votes)) { while ($row = mysql_fetch_assoc($votes)):
$uid = $row['UsersID']; $uid = $row['UsersID'];
$username = $row['Username']; $username = $row['Username'];
?> ?>
<a href="account.php?Action=AccountInfo&amp;ID=<?php echo $uid ?>"> <a href="account.php?Action=AccountInfo&amp;ID=<?php echo $uid ?>"><?php echo htmlspecialchars($username) ?></a><br />
<?php echo htmlspecialchars($username) ?></a><br /> <?php endwhile; ?>
<?php </div>
} </div>
?>
</body>
</html>
<?php
}
<?php
endif;
html_footer(AUR_VERSION);