blob: f204295fc9acb5d523ae4d27d83cf92af245f979 (
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
<?php if (!$result) { ?>
<div class='pgboxbody'><?php print _("Error retrieving package list.") ?></div>
<?php } elseif ($total == 0) { ?>
<div class='pgboxbody'><?php print _("No packages matched your search criteria.") ?></div>
<?php } else { ?>
<form action='packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>' method='post'>
<div class="pgbox">
<div class="pgboxtitle">
<span class='f3'><?php print _("Package Listing") ?></span>
</div>
<table width='100%' cellspacing='0' cellpadding='2'>
<tr>
<?php if ($SID): ?>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'> </th>
<?php endif; ?>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
<a href='?<?php print mkurl('SB=c&SO=' . $SO_next) ?>'><?php print _("Category") ?></a>
</span></th>
<th style='border-bottom: #666 1px solid; vertical-align: bottom; text-align: center;'><span class='f2'>
<a href='?<?php print mkurl('SB=n&SO=' . $SO_next) ?>'><?php print _("Name") ?></a>
</span></th>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
<a href='?<?php print mkurl('SB=v&SO=' . $SO_next) ?>'><?php print _("Votes") ?></a>
</span></th>
<?php if ($SID): ?>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
<a href='?<?php print mkurl('SB=w&SO=' . $SO_next) ?>'><?php print _("Voted") ?></a>
</span></th>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
<a href='?<?php print mkurl('SB=o&SO=' . $SO_next) ?>'><?php print _("Notify") ?></a>
</span></th>
<?php endif; ?>
<th style='border-bottom: #666 1px solid; vertical-align: bottom; text-align: center;'><span class='f2'><?php print _("Description") ?></span></th>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
<a href='?<?php print mkurl('SB=m&SO=' . $SO_next) ?>'><?php print _("Maintainer") ?></a>
</span></th>
</tr>
<?php
if (isset($_COOKIE['AURSID'])) {
$atype = account_from_sid($_COOKIE['AURSID']);
} else {
$atype = "";
}
for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
(($i % 2) == 0) ? $c = "data1" : $c = "data2";
if ($row["OutOfDateTS"] !== NULL): $c = "outofdate"; endif;
?>
<tr>
<?php if ($SID): ?>
<td class='<?php print $c ?>'><input type='checkbox' name='IDs[<?php print $row["ID"] ?>]' value='1' /></td>
<?php endif; ?>
<td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print htmlspecialchars($row["Category"]) ?></span></span></td>
<td class='<?php print $c ?>'><span class='f4'><a href='packages.php?ID=<?php print $row["ID"] ?>'><span class='black'><?php print htmlspecialchars($row["Name"]) ?> <?php print htmlspecialchars($row["Version"]) ?></span></a></span></td>
<td class='<?php print $c ?>' style="text-align: right"><span class='f5'><span class='blue'><?php print $row["NumVotes"] ?></span></span></td>
<?php if ($SID): ?>
<td class='<?php print $c ?>'><span class='f5'><span class='blue'>
<?php if (isset($row["Voted"])): ?>
<?php print _("Yes") ?></span></span></td>
<?php else: ?>
</span></span></td>
<?php endif; ?>
<td class='<?php print $c ?>'><span class='f5'><span class='blue'>
<?php if (isset($row["Notify"])): ?>
<?php print _("Yes") ?></span></span></td>
<?php else: ?>
</span></span></td>
<?php endif; ?>
<?php endif; ?>
<td class='<?php print $c ?>'><span class='f4'><span class='blue'>
<?php print htmlspecialchars($row['Description'], ENT_QUOTES); ?></span></span></td>
<td class='<?php print $c ?>'><span class='f5'><span class='blue'>
<?php if (isset($row["Maintainer"])): ?>
<a href='packages.php?K=<?php print htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&SeB=m'><?php print htmlspecialchars($row['Maintainer']) ?></a>
<?php else: ?>
<span style='color: blue; font-style: italic;'><?php print _("orphan") ?></span>
<?php endif; ?>
</span></span></td>
</tr>
<?php } ?>
</table>
</div> <!-- .pgbox ??! -->
<div class="pgbox pkg_search_results_footer">
<div class="legend_and_actions">
<div class="legend">
<span class='f3'><?php echo _('Legend') ?></span>
<span class="outofdate"><?php print _('Out of Date') ?></span>
</div>
<?php if ($SID): ?>
<div>
<select name='action'>
<option><?php print _("Actions") ?></option>
<option value='do_Flag'><?php print _("Flag Out-of-date") ?></option>
<option value='do_UnFlag'><?php print _("Unflag Out-of-date") ?></option>
<option value='do_Adopt'><?php print _("Adopt Packages") ?></option>
<option value='do_Disown'><?php print _("Disown Packages") ?></option>
<?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
<option value='do_Delete'><?php print _("Delete Packages") ?></option>
<?php endif; ?>
<option value='do_Notify'><?php print _("Notify") ?></option>
<option value='do_UnNotify'><?php print _("UnNotify") ?></option>
</select>
<?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
<input type='checkbox' name='confirm_Delete' value='1' /> <?php print _("Confirm") ?>
<?php endif; ?>
<input type='submit' class='button' style='width: 80px' value='<?php print _("Go") ?>' />
</div>
<?php endif; # if ($SID) ?>
</div> <!-- .legend_and_actions -->
<div class="page_links">
<div class="f4 blue">
<?php printf(_("Showing results %s - %s of %s"), $first, $last, $total) ?>
</div>
<div class="page_nav">
<?php foreach($templ_pages as $pagenr => $pagestart) { ?>
<?php if ($pagestart === false) { ?>
<?php echo $pagenr ?>
<?php } else if ($pagestart + 1 == $first) { ?>
<span class="page_sel"><?php echo $pagenr ?></span>
<?php } else { ?>
<a class="page_num" href="packages.php?<?php print mkurl('O=' . ( $pagestart)) ?>"><?php echo $pagenr ?></a>
<?php } ?>
<?php } ?>
</div>
</div> <!-- .page_links -->
</div> <!-- .pgbox .pkg_search_results_footer -->
</form>
<?php } # search was successful and returned multiple results ?>
|