]> projects.mako.cc - scuttle/blob - search.inc.php
* Fixed REG_BADRPT error in isValidEmail() that prevented registration
[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><?php echo T_('Search' /* Search ... for */); ?></td>
14         <td>
15             <select name="range">
16                 <?php
17                 if (!in_array($range, array($currentUsername, 'all', 'watchlist'))) {
18                 ?>
19                 <option value="<?php echo $user ?>"<?php echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option>
20                 <?php
21                 }
22                 if ($logged_on) {
23                 ?>
24                 <option value="<?php echo $currentUsername; ?>"<?php echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option>
25                 <option value="watchlist"<?php echo $select_watchlist; ?>><?php echo T_('my watchlist'); ?></option>
26                 <?php
27                 }
28                 ?>
29                 <option value="all"<?php echo $select_all; ?>><?php echo T_('all bookmarks'); ?></option>
30             </select>
31         </td>
32         <td><?php echo T_('for' /* Search ... for */); ?></td>
33         <?php
34         } else {
35         ?>
36         <td><input type="hidden" name="range" value="all" /></td>
37         <?php
38         }
39         ?>
40         <td><input type="text" name="terms" size="50" value="<?php echo filter($terms); ?>" /></td>
41         <td><input type="submit" value="<?php echo T_('Search' /* Submit button */); ?>" /></td>
42     </tr>
43     </table>
44 </form>

Benjamin Mako Hill || Want to submit a patch?