summaryrefslogtreecommitdiffstats
path: root/web/html/voters.php
blob: 8833be1e95a8aec32bb61dd1f6fd7502f0967991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include_once('aur.inc.php');
include_once('pkgbasefuncs.inc.php');

$SID = $_COOKIE['AURSID'];
$pkgbase_name = htmlspecialchars($_GET['N']);
$votes = pkgbase_votes_from_name($pkgbase_name);

html_header(__("Voters"));

if (has_credential(CRED_PKGBASE_LIST_VOTERS)):
?>

<div class="box">
	<h2>Votes for <a href="<?= get_pkgbase_uri($pkgbase_name); ?>"><?= $pkgbase_name ?></a></h2>
	<div class="boxbody">
		<ul>
			<?php while (list($indx, $row) = each($votes)): ?>
			<li>
				<a href="<?= get_user_uri($row['Username']); ?>"><?= htmlspecialchars($row['Username']) ?></a>
				<?php if ($row["VoteTS"] > 0): ?>
				(<?= gmdate("Y-m-d H:i", intval($row["VoteTS"])) ?>)
				<?php endif; ?>
			</li>
			<?php endwhile; ?>
		</ul>
	</div>
</div>

<?php
endif;

html_footer(AURWEB_VERSION);