2009-06-30 09:22:30 +00:00
|
|
|
<?php
|
2009-06-30 09:24:29 +00:00
|
|
|
// $Header: /cvsroot/phpldapadmin/phpldapadmin/search_form_advanced.php,v 1.21 2005/03/05 09:41:01 wurley Exp $
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @package phpLDAPadmin
|
|
|
|
*/
|
|
|
|
|
2009-06-30 08:07:14 +00:00
|
|
|
?>
|
2009-06-30 09:24:29 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
<?php foreach ($server_info_list as $i => $ignore) { ?>
|
|
|
|
|
|
|
|
addToServersList(new server(<?php echo $i; ?>,"<?php echo $server_info_list[$i]['name']; ?>","<?php echo $server_info_list[$i]['base_dn']; ?>"));
|
|
|
|
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
function focus_filter() {
|
2009-06-30 09:22:30 +00:00
|
|
|
document.advanced_search_form.filter.focus();
|
2009-06-30 09:24:29 +00:00
|
|
|
}
|
2009-06-30 08:07:14 +00:00
|
|
|
</script>
|
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
<form action="search.php" method="get" class="search" name="advanced_search_form">
|
2009-06-30 08:05:37 +00:00
|
|
|
<input type="hidden" name="search" value="true" />
|
|
|
|
<input type="hidden" name="form" value="advanced" />
|
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
|
|
|
|
2009-06-30 08:07:14 +00:00
|
|
|
<center><b><?php echo $lang['advanced_search_form_str']; ?></b></center>
|
2009-06-30 09:24:29 +00:00
|
|
|
<small>(<a href="search.php?server_id=<?php echo $server_id; ?>&form=simple"><?php echo $lang['simple_search_form_str']; ?></a> |
|
2009-06-30 09:22:30 +00:00
|
|
|
<a href="search.php?form=predefined"><?php echo $lang['predefined_searches']; ?></a>)</small><br />
|
2009-06-30 08:05:37 +00:00
|
|
|
<br />
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
2009-06-30 08:09:20 +00:00
|
|
|
<td><small><?php echo $lang['server']; ?></small></td>
|
2009-06-30 08:05:37 +00:00
|
|
|
<td><?php echo $server_menu_html; ?></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2009-06-30 08:09:20 +00:00
|
|
|
<td><small><?php echo $lang['base_dn']; ?></small></td>
|
2009-06-30 09:24:29 +00:00
|
|
|
<td><input type="text" name="base_dn" value="<?php echo count($base_dns) == 1 ? $base_dns[0] : '' ?>" style="width: 200px" id="base_dn" />
|
|
|
|
|
|
|
|
<?php draw_chooser_link( 'advanced_search_form.base_dn' );
|
|
|
|
|
|
|
|
if( isset( $base_dn_is_invalid ) && $base_dn_is_invalid )
|
|
|
|
echo "<small style=\"color:red; white-space: nowrap\">" . $lang['this_base_dn_is_not_valid'] . "</small>";
|
|
|
|
|
|
|
|
if( isset( $base_dn_does_not_exist ) && $base_dn_does_not_exist )
|
|
|
|
echo "<small style=\"color:red; white-space: nowrap\">" . $lang['this_base_dn_does_not_exist'] . "</small>"; ?>
|
|
|
|
|
|
|
|
</td>
|
2009-06-30 08:05:37 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2009-06-30 08:09:20 +00:00
|
|
|
<td><small><acronym title="<?php echo $lang['scope_in_which_to_search']; ?>"><?php echo $lang['search_scope']; ?></acronym></small></td>
|
2009-06-30 08:05:37 +00:00
|
|
|
<td>
|
2009-06-30 09:22:30 +00:00
|
|
|
<select name="scope" style="width: 200px">
|
2009-06-30 08:09:20 +00:00
|
|
|
<option<?php echo $scope=='sub'?' selected':''; ?> value="sub">
|
|
|
|
<?php echo $lang['scope_sub']; ?>
|
|
|
|
</option>
|
|
|
|
<option<?php echo $scope=='one'?' selected':''; ?> value="one">
|
|
|
|
<?php echo $lang['scope_one']; ?>
|
|
|
|
</option>
|
|
|
|
<option<?php echo $scope=='base'?' selected':''; ?> value="base">
|
|
|
|
<?php echo $lang['scope_base']; ?>
|
|
|
|
</option>
|
2009-06-30 08:05:37 +00:00
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2009-06-30 08:09:20 +00:00
|
|
|
<td><small><acronym title="<?php echo $lang['standard_ldap_search_filter']; ?>">
|
|
|
|
<?php echo $lang['search_filter']; ?></acronym></small></td>
|
2009-06-30 09:24:29 +00:00
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
<td><input type="text" name="filter" id="filter" style="width: 200px" value="<?php echo $filter ? htmlspecialchars($filter) : 'objectClass=*'; ?>" /></td>
|
2009-06-30 08:05:37 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2009-06-30 08:09:20 +00:00
|
|
|
<td><small><acronym title="<?php echo $lang['list_of_attrs_to_display_in_results']; ?>">
|
|
|
|
<?php echo $lang['show_attributes']; ?></acronym></small></td>
|
2009-06-30 09:24:29 +00:00
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
<td><input type="text" name="display_attrs" style="width: 200px" value="<?php
|
2009-06-30 09:24:29 +00:00
|
|
|
echo isset( $_GET['display_attrs'] ) ?
|
|
|
|
htmlspecialchars( $_GET['display_attrs'] ) :
|
2009-06-30 08:09:20 +00:00
|
|
|
$search_result_attributes; ?>" />
|
2009-06-30 08:05:37 +00:00
|
|
|
|
2009-06-30 09:24:29 +00:00
|
|
|
</tr>
|
2009-06-30 08:05:37 +00:00
|
|
|
<tr>
|
2009-06-30 08:09:20 +00:00
|
|
|
<td colspan="2"><br /><center><input type="submit" value="<?php echo $lang['Search']; ?>" /></center></td>
|
2009-06-30 08:05:37 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
2009-06-30 09:24:29 +00:00
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
<script language="javascript">
|
|
|
|
// Move the cursor to the filter field
|
|
|
|
focus_filter();
|
|
|
|
</script>
|