phpldapadmin/lib/search_form_simple.php

67 lines
2.1 KiB
PHP
Raw Normal View History

2009-06-30 09:22:30 +00:00
<?php
2009-06-30 10:40:03 +00:00
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/search_form_simple.php,v 1.15 2005/12/10 10:34:55 wurley Exp $
2009-06-30 09:29:51 +00:00
/**
* @package phpLDAPadmin
*/
?>
2009-06-30 10:26:08 +00:00
<script type="text/javascript" language="javascript">
2009-06-30 09:22:30 +00:00
function focus_filter() {
document.simple_search_form.filter.focus();
}
</script>
<form action="search.php" method="get" class="search" name="simple_search_form">
2009-06-30 08:05:37 +00:00
<input type="hidden" name="search" value="true" />
<input type="hidden" name="form" value="simple" />
<input type="hidden" name="scope" value="sub" />
2009-06-30 09:22:30 +00:00
<input type="hidden" name="format" value="<?php echo $format; ?>" />
2009-06-30 08:05:37 +00:00
<table>
2009-06-30 09:29:51 +00:00
<tr>
<td>
2009-06-30 10:26:08 +00:00
<center><b><?php echo _('Simple Search Form'); ?></b><br />
<small>(<a href="search.php?server_id=<?php echo $ldapserver->server_id; ?>&amp;form=advanced"><?php echo _('Advanced Search Form'); ?></a> |
<a href="search.php?server_id=<?php echo $ldapserver->server_id; ?>&amp;form=predefined"><?php echo _('Predefined Searches'); ?></a>)</small><br />
2009-06-30 09:29:51 +00:00
</center>
<br />
2009-06-30 10:26:08 +00:00
<small><?php echo _('Server'); ?></small><br /> <?php echo $server_menu_html; ?><br />
2009-06-30 09:29:51 +00:00
<br />
2009-06-30 10:26:08 +00:00
<small><?php echo _('Search for entries whose'); ?></small><br />
2009-06-30 09:29:51 +00:00
<nobr>
<select name="attribute">
<?php foreach( $config->GetValue('search','attributes') as $id => $attribute ) { ?>
<option value="<?php echo rawurlencode( $attribute ); ?>"<?php echo $attribute==$attr?' selected="true"':''; ?>>
2009-06-30 10:26:08 +00:00
<?php echo htmlspecialchars($ldapserver->showFriendlyAttr($attribute)); ?>
2009-06-30 09:29:51 +00:00
</option>
<?php } ?>
</select>
2009-06-30 10:26:08 +00:00
</nobr>
2009-06-30 09:29:51 +00:00
<select name="criterion">
2009-06-30 10:26:08 +00:00
<?php
2009-06-30 09:29:51 +00:00
foreach( $config->GetValue('search','criteria_options') as $c ) { ?>
<option value="<?php echo $c; ?>"<?php echo $c==$criterion?' selected="true"':''; ?>>
2009-06-30 10:26:08 +00:00
<?php echo htmlspecialchars(_($c)); ?>
2009-06-30 09:29:51 +00:00
</option>
<?php } ?>
</select>
<input type="text" name="filter" id="filter" size="20" value="<?php echo htmlspecialchars($filter); ?>" /><br />
<br />
2009-06-30 10:26:08 +00:00
<center><input type="submit" value="<?php echo _('Search'); ?>" /></center>
2009-06-30 09:29:51 +00:00
</td>
</tr>
2009-06-30 08:05:37 +00:00
</table>
</form>
2009-06-30 09:29:51 +00:00
2009-06-30 10:26:08 +00:00
<script type="text/javascript" language="javascript">
2009-06-30 09:22:30 +00:00
// Move the cursor to the filter field
focus_filter();
</script>