2008-05-10 10:59:41 +02:00
|
|
|
<?php
|
2008-11-25 16:57:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* Managing all possible inputs */
|
2008-05-10 10:59:41 +02:00
|
|
|
$select_watchlist = isset($select_watchlist)?$select_watchlist:'';
|
|
|
|
$select_all = isset($select_all)?$select_all:'';
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
2007-12-12 17:29:16 +01:00
|
|
|
<form id="search" action="<?php echo createURL('search'); ?>" method="post">
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<?php
|
|
|
|
if ($userservice->isLoggedOn()) {
|
2008-11-25 16:57:29 +01:00
|
|
|
$currentUser = $userservice->getCurrentObjectUser();
|
|
|
|
$currentUsername = $currentUser->getUsername();
|
2007-12-12 17:29:16 +01:00
|
|
|
}
|
2008-11-25 16:57:29 +01:00
|
|
|
if ($userservice->isLoggedOn() || isset($user)) {
|
2007-12-12 17:29:16 +01:00
|
|
|
?>
|
|
|
|
<td><?php echo T_('Search' /* Search ... for */); ?></td>
|
|
|
|
<td>
|
|
|
|
<select name="range">
|
|
|
|
<?php
|
|
|
|
if (!in_array($range, array($currentUsername, 'all', 'watchlist'))) {
|
|
|
|
?>
|
2008-05-10 10:59:41 +02:00
|
|
|
<option value="<?php echo $user ?>"<?php //echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option>
|
2007-12-12 17:29:16 +01:00
|
|
|
<?php
|
|
|
|
}
|
2008-11-25 16:57:29 +01:00
|
|
|
if ($userservice->isLoggedOn()) {
|
2007-12-12 17:29:16 +01:00
|
|
|
?>
|
2008-05-10 10:59:41 +02:00
|
|
|
<option value="<?php echo $currentUsername; ?>"<?php //echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option>
|
2007-12-12 17:29:16 +01:00
|
|
|
<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
|
|
|
|
}
|
|
|
|
?>
|
2008-05-10 10:59:41 +02:00
|
|
|
<td><input type="text" name="terms" size="30" value="<?php $terms=!isset($terms)?'':$terms; echo filter($terms); ?>" /></td>
|
2007-12-12 17:29:16 +01:00
|
|
|
<td><input type="submit" value="<?php echo T_('Search' /* Submit button */); ?>" /></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|