phpldapadmin/search_form_simple.php

60 lines
2.1 KiB
PHP
Raw Normal View History

2009-06-30 08:12:47 +00:00
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/search_form_simple.php,v 1.10 2004/04/02 14:44:46 uugdave Exp $
?><script language="javascript">
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" />
<table>
<td>
2009-06-30 08:07:14 +00:00
<center><b><?php echo $lang['simple_search_form_str']; ?></b><br />
2009-06-30 08:12:47 +00:00
<small>(<a href="search.php?server_id=<?php echo $server_id; ?>&amp;form=advanced"><?php echo $lang['advanced_search_form_str']; ?></a> |
<a href="search.php?form=predefined"><?php echo $lang['predefined_searches']; ?></a>)</small><br />
2009-06-30 08:05:37 +00:00
</center>
2009-06-30 08:12:47 +00:00
<br />
2009-06-30 08:05:37 +00:00
2009-06-30 08:09:20 +00:00
<small><?php echo $lang['server']; ?></small><br /> <?php echo $server_menu_html; ?><br />
2009-06-30 08:12:47 +00:00
<br />
2009-06-30 08:09:20 +00:00
<small><?php echo $lang['search_for_entries_whose']; ?></small><br />
2009-06-30 08:05:37 +00:00
<nobr>
<select name="attribute">
<?php foreach( $search_attributes as $id => $attribute ) { ?>
<option value="<?php echo rawurlencode( $attribute ); ?>"<?php echo $attribute==$attr?' selected':''; ?>>
<?php echo htmlspecialchars($search_attributes_display[$id]); ?>
</option>
<?php } ?>
</select>
<select name="criterion">
2009-06-30 08:07:14 +00:00
<?php
2009-06-30 08:12:47 +00:00
if( ! isset( $search_criteria_options ) || ! is_array( $search_criteria_options ) )
$search_criteria_options = array( "equals", "starts with", "contains", "ends with", "sounds like" );
2009-06-30 08:07:14 +00:00
foreach( $search_criteria_options as $c ) { ?>
2009-06-30 08:05:37 +00:00
<option value="<?php echo $c; ?>"<?php echo $c==$criterion?' selected':''; ?>>
2009-06-30 08:09:20 +00:00
<?php echo htmlspecialchars( $lang[$c] ); ?>
2009-06-30 08:05:37 +00:00
</option>
<?php } ?>
</select>
2009-06-30 08:12:47 +00:00
<input type="text" name="filter" id="filter" size="20" value="<?php echo htmlspecialchars($filter); ?>" /><br />
2009-06-30 08:05:37 +00:00
<br />
2009-06-30 08:09:20 +00:00
<center><input type="submit" value="<?php echo $lang['Search']; ?>" /></center>
2009-06-30 08:05:37 +00:00
</nobr>
</td>
</table>
</form>
2009-06-30 08:12:47 +00:00
<script language="javascript">
// Move the cursor to the filter field
focus_filter();
</script>