blob: c2e2d399e5adce8323f0dee5a5384fb477fe0ff2 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<div class="box">
<h2><?= $type ?></h2>
<?php if ($type == __("Current Votes")): ?>
<ul class="admin-actions">
<li><a href="<?= get_uri('/addvote/'); ?>"><?= __("Add Proposal") ?></a></li>
</ul>
<?php endif; ?>
<table class="results">
<thead>
<tr>
<th><?= __("Proposal") ?></th>
<th><a href="?off=<?= $off ?>&by=<?= $by_next ?>"><?= __("Start") ?></a></th>
<th><?= __("End") ?></th>
<th><?= __("User") ?></th>
<th><?= __("Yes") ?></th>
<th><?= __("No") ?></th>
<th><?= __('Voted') ?></th>
</tr>
</thead>
<tbody>
<?php if (empty($result)): ?>
<tr><td align="center" colspan="0"><?= __("No results found.") ?></td></tr>
<?php else: while (list($indx, $row) = each($result)):
if ($indx % 2):
$c = "even";
else:
$c = "odd";
endif;
?>
<tr class="<?= $c ?>">
<td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?>
<a href="<?= get_uri('/tu/'); ?>?id=<?= $row['ID'] ?>"><?= $row["Agenda"] ?></a>
</td>
<td><?= gmdate("Y-m-d", $row["Submitted"]) ?></td>
<td><?= gmdate("Y-m-d", $row["End"]) ?></td>
<td>
<?php if (!empty($row['User'])): ?>
<a href="<?= get_uri('/packages/'); ?>?K=<?= $row['User'] ?>&SeB=m"><?= $row['User'] ?></a>
<?php else:
print "N/A";
endif;
?>
</td>
<td><?= $row['Yes'] ?></td>
<td><?= $row['No'] ?></td>
<td>
<?php if (tu_voted($row['ID'], uid_from_sid($_COOKIE["AURSID"]))): ?>
<span style="color: green; font-weight: bold"><?= __("Yes") ?></span>
<?php else: ?>
<span style="color: red; font-weight: bold"><?= __("No") ?></span>
<?php endif; ?>
</td>
</tr>
<?php
endwhile;
endif;
?>
</tbody>
</table>
<div class="pkglist-stats">
<p class="pkglist-nav">
<?php if ($result):
$by = htmlentities($by, ENT_QUOTES); ?>
<?php if ($nextresult > 0 && $off != 0):
$back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?>
<a class="page" href='<?= get_uri('/tu/'); ?>?off=<?= $back ?>&by=<?= $by ?>'>‹ <?= __("Back") ?></a>
<?php endif; ?>
<?php if (($off + $limit) < $nextresult):
$forw = $off + $limit; ?>
<a class="page" href="<?= get_uri('/tu/'); ?>?off=<?= $forw ?>&by=<?= $by ?>"><?= __("Next") ?> ›</a>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
|