]> projects.mako.cc - scuttle/blob - search.inc.php
updated readme with information on a series of bugs I know exist
[scuttle] / search.inc.php
1 <form id="search" action="<?php echo createURL('search'); ?>" method="post">
2     <table>
3     <tr>
4         <?php
5         $logged_on = FALSE;
6         if ($userservice->isLoggedOn()) {
7           $currentUser = $userservice->getCurrentUser();
8           $currentUsername = $currentUser[$userservice->getFieldName('username')];
9           $logged_on = TRUE;
10         }
11         if (!$logged_on && !isset($user)) {
12         ?>
13         <td><input type="hidden" name="range" value="all" /></td>
14         <?php
15         } else {
16         ?>
17         <td><?php echo T_('Search' /* Search ... for */); ?></td>
18         <td>
19             <select name="range">
20                 <?php if (isset($currentUsername) && $user != $currentUsername): ?>
21                 <option value="<?php echo $user ?>"><?php echo T_("this user's bookmarks"); ?></option>
22                 <?php
23                 endif;
24                 if ($logged_on) {
25                 ?>
26                 <option value="<?php echo $currentUsername; ?>"><?php echo T_('my bookmarks'); ?></option>
27                 <option value="watchlist"<?php if (isset($select_watchlist)) { echo $select_watchlist; } ?>><?php echo T_('my watchlist'); ?></option>
28                 <?php
29                 }
30                 ?>
31                 <option value="all"<?php if (isset($select_all)) { echo $select_all; } ?>><?php echo T_('all bookmarks'); ?></option>
32             </select>
33         </td>
34         <td><?php echo T_('for' /* Search ... for */); ?></td>
35         <?php
36         }
37         ?>
38         <td><input type="text" name="terms" size="50" value="<?php if (isset($terms)) { echo filter($terms); } ?>" /></td>
39         <td><input type="submit" value="<?php echo T_('Search' /* Submit button */); ?>" /></td>
40     </tr>
41     </table>
42 </form>

Benjamin Mako Hill || Want to submit a patch?