aurweb/web/html/voters.php
Lukas Fleischer 6102759b7c Use echo shortcut syntax
Replace all occurrences of "<?php echo" and "<?php print" by "<?=" to
reduce noise in templates.

Note that as of PHP 5.4.0, "<?=" is always available and no longer
requires "short_open_tag" to be set.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24 12:23:04 +02:00

31 lines
747 B
PHP

<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include_once('aur.inc.php');
include_once('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="<?= get_pkg_uri(pkgname_from_id($pkgid)); ?>"><?= pkgname_from_id($pkgid) ?></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></li>
<?php endwhile; ?>
</ul>
</div>
</div>
<?php
endif;
html_footer(AUR_VERSION);