aurweb/web/html/voters.php
Lukas Fleischer 03486c3b6f Use virtual paths for package details
Extend the routing front/back ends to allow for using
"/package/$pkgname/" for individual packages.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-15 22:48:32 +02:00

31 lines
789 B
PHP

<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include('aur.inc.php');
include('pkgfuncs.inc.php');
$SID = $_COOKIE['AURSID'];
$pkgid = intval($_GET['ID']);
$votes = getvotes($pkgid);
$atype = account_from_sid($SID);
html_header(__("Voters"));
if ($atype == 'Trusted User' || $atype== 'Developer'):
?>
<div class="box">
<h2>Votes for <a href="<?php echo get_pkg_uri(pkgname_from_id($pkgid)); ?>"><?php echo pkgname_from_id($pkgid) ?></a></h2>
<div class="boxbody">
<?php
while (list($indx, $row) = each($votes)): ?>
<a href="<?php echo get_uri('/account/'); ?>?Action=AccountInfo&amp;ID=<?php echo $row['UsersID'] ?>"><?php echo htmlspecialchars($row['Username']) ?></a><br />
<?php endwhile; ?>
</div>
</div>
<?php
endif;
html_footer(AUR_VERSION);