diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2007-12-12 16:29:16 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2007-12-12 16:29:16 +0000 |
commit | d582054c77b22daeb08d2bff17794b9a69a20dd4 (patch) | |
tree | d6e7cef8639da6f573cd0b21a5316abf5af24fac /search.inc.php | |
download | semanticscuttle-d582054c77b22daeb08d2bff17794b9a69a20dd4.tar.gz semanticscuttle-d582054c77b22daeb08d2bff17794b9a69a20dd4.tar.bz2 |
import of scuttle 0.7.2
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@1 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'search.inc.php')
-rw-r--r-- | search.inc.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/search.inc.php b/search.inc.php new file mode 100644 index 0000000..1c2cbc3 --- /dev/null +++ b/search.inc.php @@ -0,0 +1,44 @@ +<form id="search" action="<?php echo createURL('search'); ?>" method="post"> + <table> + <tr> + <?php + $logged_on = false; + if ($userservice->isLoggedOn()) { + $currentUser = $userservice->getCurrentUser(); + $currentUsername = $currentUser[$userservice->getFieldName('username')]; + $logged_on = true; + } + if ($logged_on || isset($user)) { + ?> + <td><?php echo T_('Search' /* Search ... for */); ?></td> + <td> + <select name="range"> + <?php + if (!in_array($range, array($currentUsername, 'all', 'watchlist'))) { + ?> + <option value="<?php echo $user ?>"<?php echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option> + <?php + } + if ($logged_on) { + ?> + <option value="<?php echo $currentUsername; ?>"<?php echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option> + <option value="watchlist"<?php echo $select_watchlist; ?>><?php echo T_('my watchlist'); ?></option> + <?php + } + ?> + <option value="all"<?php echo $select_all; ?>><?php echo T_('all bookmarks'); ?></option> + </select> + </td> + <td><?php echo T_('for' /* Search ... for */); ?></td> + <?php + } else { + ?> + <td><input type="hidden" name="range" value="all" /></td> + <?php + } + ?> + <td><input type="text" name="terms" size="50" value="<?php echo filter($terms); ?>" /></td> + <td><input type="submit" value="<?php echo T_('Search' /* Submit button */); ?>" /></td> + </tr> + </table> +</form> |