git-interface: Factor out configuration file parsing
[aur.git] / web / html / voters.php
blob8833be1e95a8aec32bb61dd1f6fd7502f0967991
1 <?php
2 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
3 include_once('aur.inc.php');
4 include_once('pkgbasefuncs.inc.php');
6 $SID = $_COOKIE['AURSID'];
7 $pkgbase_name = htmlspecialchars($_GET['N']);
8 $votes = pkgbase_votes_from_name($pkgbase_name);
10 html_header(__("Voters"));
12 if (has_credential(CRED_PKGBASE_LIST_VOTERS)):
15 <div class="box">
16 <h2>Votes for <a href="<?= get_pkgbase_uri($pkgbase_name); ?>"><?= $pkgbase_name ?></a></h2>
17 <div class="boxbody">
18 <ul>
19 <?php while (list($indx, $row) = each($votes)): ?>
20 <li>
21 <a href="<?= get_user_uri($row['Username']); ?>"><?= htmlspecialchars($row['Username']) ?></a>
22 <?php if ($row["VoteTS"] > 0): ?>
23 (<?= gmdate("Y-m-d H:i", intval($row["VoteTS"])) ?>)
24 <?php endif; ?>
25 </li>
26 <?php endwhile; ?>
27 </ul>
28 </div>
29 </div>
31 <?php
32 endif;
34 html_footer(AURWEB_VERSION);