voters.php 747 Bytes
Newer Older
1
2
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
3
4
include_once('aur.inc.php');
include_once('pkgfuncs.inc.php');
5
6
7

$SID = $_COOKIE['AURSID'];

8
$pkgid = intval($_GET['ID']);
9
$votes = getvotes($pkgid);
10
$atype = account_from_sid($SID);
11

12
13
14
html_header(__("Voters"));

if ($atype == 'Trusted User' || $atype== 'Developer'):
15
?>
16
17

<div class="box">
Lukas Fleischer's avatar
Lukas Fleischer committed
18
	<h2>Votes for <a href="<?= get_pkg_uri(pkgname_from_id($pkgid)); ?>"><?= pkgname_from_id($pkgid) ?></a></h2>
19
	<div class="boxbody">
20
21
		<ul>
			<?php while (list($indx, $row) = each($votes)): ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
22
			<li><a href="<?= get_user_uri($row['Username']); ?>"><?= htmlspecialchars($row['Username']) ?></a></li>
23
24
			<?php endwhile; ?>
		</ul>
25
26
27
	</div>
</div>

28
<?php
29
endif;
30

31
html_footer(AUR_VERSION);