3 $fmtth = function($title, $sb=false, $so=false, $hint=false) {
6 echo '<a href="?' . mkurl('SB=' . $sb . '&SO=' . $so) . '">' . $title . '</a>';
11 echo '<span title="' . $hint . '" class="hover-help"><sup>?</sup></span>';
16 $fmtth = function($title, $sb=false, $so=false, $hint=false) {
17 echo '<th>' . $title . '</th>';
22 <p
><?
= __("Error retrieving package list.") ?
></p
>
23 <?php
elseif ($total == 0): ?
>
24 <p
><?
= __("No packages matched your search criteria.") ?
></p
>
26 <?php
if ($show_headers): ?
>
27 <div
class="pkglist-stats">
29 <?
= _n('%d package found.', '%d packages found.', $total) ?
>
30 <?
= __('Page %d of %d.', $current, $pages) ?
>
32 <?php
if (count($templ_pages) > 1): ?
>
33 <p
class="pkglist-nav">
34 <?php
foreach ($templ_pages as $pagenr => $pagestart): ?
>
35 <?php
if ($pagestart === false): ?
>
36 <span
class="page"><?
= $pagenr ?
></span
>
37 <?php
elseif ($pagestart +
1 == $first): ?
>
38 <span
class="page"><?
= $pagenr ?
></span
>
40 <a
class="page" href
="<?= get_uri('/packages/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?
= $pagenr ?
></a
>
48 <form id
="pkglist-results-form" method
="post" action
="<?= get_uri('/pkgbase/'); ?>?<?= htmlentities($_SERVER['QUERY_STRING']) ?>">
49 <table
class="results">
52 <?php
if ($SID && $show_headers): ?
>
55 <?php
$fmtth(__('Name'), 'n', $SO_next) ?
>
56 <?php
$fmtth(__('Version')) ?
>
57 <?php
$fmtth(__('Votes'), 'v', $SO_next) ?
>
58 <?php
$fmtth(__('Popularity'), 'p', $SO_next, __('Popularity is calculated as the sum of all votes with each vote being weighted with a factor of %.2f per day since its creation.', 0.98)) ?
>
60 <?php
$fmtth(__('Voted'), 'w', $SO_next) ?
>
61 <?php
$fmtth(__('Notify'), 'o', $SO_next) ?
>
63 <?php
$fmtth(__('Description')) ?
>
64 <?php
$fmtth(__('Maintainer'), 'm', $SO_next) ?
>
69 <?php
while (list($indx, $row) = each($searchresults)): ?
>
70 <tr
class="<?= ($indx % 2 == 0) ? 'odd' : 'even' ?>">
71 <?php
if ($SID && $show_headers): ?
>
72 <td
><input type
="checkbox" name
="IDs[<?= $row["PackageBaseID
"] ?>]" value
="1" /></td
>
74 <td
><a href
="<?= htmlspecialchars(get_pkg_uri($row["Name
"]), ENT_QUOTES); ?>"><?
= htmlspecialchars($row["Name"]) ?
></a
></td
>
75 <td
<?php
if ($row["OutOfDateTS"]): ?
> class="flagged"<?php
endif; ?
>><?
= htmlspecialchars($row["Version"]) ?
></td
>
76 <td
><?
= $row["NumVotes"] ?
></td
>
77 <td
><?
= number_format($row["Popularity"], 2) ?
></td
>
80 <?php
if (isset($row["Voted"])): ?
>
85 <?php
if (isset($row["Notify"])): ?
>
90 <td
class="wrap"><?
= htmlspecialchars($row['Description'], ENT_QUOTES
); ?
></td
>
92 <?php
if (isset($row["Maintainer"])): ?
>
94 <a href
="<?= get_uri('/account/') . htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>" title
="<?= __('View account information for %s', htmlspecialchars($row['Maintainer'])) ?>"><?
= htmlspecialchars($row['Maintainer']) ?
></a
>
96 <a href
="<?= get_uri('/packages/'); ?>?K=<?= htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&SeB=m"><?
= htmlspecialchars($row['Maintainer']) ?
></a
>
99 <span
><?
= __("orphan") ?
></span
>
108 <?php
if ($show_headers): ?
>
109 <div
class="pkglist-stats">
111 <?
= _n('%d package found.', '%d packages found.', $total) ?
>
112 <?
= __('Page %d of %d.', $current, $pages) ?
>
114 <?php
if (count($templ_pages) > 1): ?
>
115 <p
class="pkglist-nav">
116 <?php
foreach ($templ_pages as $pagenr => $pagestart): ?
>
117 <?php
if ($pagestart === false): ?
>
118 <span
class="page"><?
= $pagenr ?
></span
>
119 <?php
elseif ($pagestart +
1 == $first): ?
>
120 <span
class="page"><?
= $pagenr ?
></span
>
122 <a
class="page" href
="<?= get_uri('/packages/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?
= $pagenr ?
></a
>
131 <select name
="action">
132 <option
><?
= __("Actions") ?
></option
>
133 <option value
="do_UnFlag"><?
= __("Unflag Out-of-date") ?
></option
>
134 <option value
="do_Adopt"><?
= __("Adopt Packages") ?
></option
>
135 <option value
="do_Disown"><?
= __("Disown Packages") ?
></option
>
136 <?php
if (has_credential(CRED_PKGBASE_DELETE
)): ?
>
137 <option value
="do_Delete"><?
= __("Delete Packages") ?
></option
>
139 <option value
="do_Notify"><?
= __("Notify") ?
></option
>
140 <option value
="do_UnNotify"><?
= __("UnNotify") ?
></option
>
142 <?php
if (has_credential(CRED_PKGBASE_DELETE
)): ?
>
143 <label
for="merge_Into"><?
= __("Merge into") ?
></label
>
144 <input type
="text" id
="merge_Into" name
="merge_Into" />
146 <label
class="confirmation"><input type
="checkbox" name
="confirm" value
="1" /> <?
= __("Confirm") ?
></label
>
147 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
148 <input type
="submit" class="button" style
="width: 80px" value
="<?= __("Go
") ?>" />
150 <?php
endif; # if ($SID) ?>
153 <?php
endif; # search was successful and returned multiple results ?>