mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
* Create new function in pkgfuncs.inc.php with SQL queries from voters.php * Centralization of DB code important in a future transition to PDO interface Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
31 lines
750 B
PHP
31 lines
750 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="packages.php?ID=<?php echo $pkgid ?>"><?php echo pkgname_from_id($pkgid) ?></a></h2>
|
|
<div class="boxbody">
|
|
|
|
<?php
|
|
while (list($indx, $row) = each($votes)): ?>
|
|
<a href="account.php?Action=AccountInfo&ID=<?php echo $row['UsersID'] ?>"><?php echo htmlspecialchars($row['Username']) ?></a><br />
|
|
<?php endwhile; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
endif;
|
|
|
|
html_footer(AUR_VERSION);
|