account_search_results.php 2.97 KB
Newer Older
1
2
3
4
<?php
if (!$result):
	print __("No results matched your search criteria.");
else:
canyonknight's avatar
canyonknight committed
5
	if ($result):
6
7
8
9
?>
		<table class="results">
			<thead>
				<tr>
Lukas Fleischer's avatar
Lukas Fleischer committed
10
11
12
13
14
15
16
17
					<th><?= __("Username") ?></th>
					<th><?= __("Type") ?></th>
					<th><?= __("Status") ?></th>
					<th><?= __("Real Name") ?></th>
					<th><?= __("IRC Nick") ?></th>
					<th><?= __("PGP Key Fingerprint") ?></th>
					<th><?= __("Last Voted") ?></th>
					<th><?= __("Edit Account") ?></th>
18
19
20
21
				</tr>
			</thead>
			<?php
			$i = 0;
22
			while (list($indx, $row) = each($userinfo)):
23
24
25
26
27
28
29
				if ($i % 2):
					$c = "even";
				else:
					$c = "odd";
				endif;
			?>
				<tbody>
Lukas Fleischer's avatar
Lukas Fleischer committed
30
31
32
				<tr class ="<?= $c ?>">
					<td><a href="<?= get_uri('/packages/'); ?>?SeB=m&amp;K=<?= $row["Username"] ?>"><?= $row["Username"] ?></a></td>
					<td><?= $row["AccountType"] ?></td>
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
					<td>
						<?php
						if ($row["Suspended"]):
							print __("Suspended");
						else:
							print __("Active");
						endif;
						?>
					</td>
					<td><?php $row["RealName"] ? print htmlspecialchars($row["RealName"],ENT_QUOTES) : print "&nbsp;" ?></td>
					<td><?php $row["IRCNick"] ? print htmlspecialchars($row["IRCNick"],ENT_QUOTES) : print "&nbsp;" ?></td>
					<td><?php $row["PGPKey"] ? print html_format_pgp_fingerprint($row["PGPKey"]) : print "&nbsp;" ?></td>
					<td><?php $row["LastVoted"] ? print date("Y-m-d", $row["LastVoted"]) : print __("Never") ?></td>
					<td>
					<?php
						if ($UTYPE == "Trusted User" && $row["AccountType"] == "Developer"):
							# TUs can't edit devs
							print "&nbsp;";
						else:
					?>
Lukas Fleischer's avatar
Lukas Fleischer committed
53
						<a href="<?= get_user_uri($row["Username"]) . "edit/" ?>"><?= __("Edit") ?></a>
54
55
56
57
58
59
60
61
62
63
64
65
					<?php endif; ?>
					</td>
				</tr>
			<?php
				$i++;
			endwhile;
			?>
	</table>

	<table class="results">
		<tr>
			<td align="left">
Lukas Fleischer's avatar
Lukas Fleischer committed
66
			<form action="<?= get_uri('/accounts/'); ?>" method="post">
67
68
					<fieldset>
						<input type="hidden" name="Action" value="SearchAccounts" />
Lukas Fleischer's avatar
Lukas Fleischer committed
69
						<input type="hidden" name="O" value="<?= ($OFFSET-$HITS_PER_PAGE) ?>" />
70
71
72
73
						<?php
						reset($search_vars);
						while (list($k, $ind) = each($search_vars)):
						?>
Lukas Fleischer's avatar
Lukas Fleischer committed
74
						<input type="hidden" name="<?= $ind ?>" value="<?= ${$ind} ?>" />
75
						<?php endwhile; ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
76
						<input type="submit" class="button" value="&lt;-- <?= __("Less") ?>" />
77
78
79
80
					</fieldset>
				</form>
			</td>
			<td align="right">
Lukas Fleischer's avatar
Lukas Fleischer committed
81
				<form action="<?= get_uri('/accounts/'); ?>" method="post">
82
83
					<fieldset>
						<input type="hidden" name="Action" value="SearchAccounts" />
Lukas Fleischer's avatar
Lukas Fleischer committed
84
						<input type="hidden" name="O" value="<?= ($OFFSET+$HITS_PER_PAGE) ?>" />
85
86
87
88
						<?php
						reset($search_vars);
						while (list($k, $ind) = each($search_vars)):
						?>
Lukas Fleischer's avatar
Lukas Fleischer committed
89
						<input type="hidden" name="<?= $ind ?>" value="<?= ${$ind} ?>" />
90
						<?php endwhile; ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
91
						<input type="submit" class="button" value="<?= __("More") ?> --&gt;" />
92
93
94
95
96
97
98
					</fieldset>
				</form>
			</td>
		</tr>
	</table>
	<?php else: ?>
		<p style="text-align:center;">
Lukas Fleischer's avatar
Lukas Fleischer committed
99
			<?= __("No more results to display."); ?>
100
101
102
		</p>
	<?php endif; ?>
<?php endif; ?>