2009-06-30 09:22:30 +00:00
|
|
|
<?php
|
2009-06-30 09:24:29 +00:00
|
|
|
// $Header: /cvsroot/phpldapadmin/phpldapadmin/search_form_predefined.php,v 1.7 2005/02/25 13:44:06 wurley Exp $
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @package phpLDAPadmin
|
|
|
|
*/
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<form action="search.php" method="get" class="search">
|
2009-06-30 09:22:30 +00:00
|
|
|
<input type="hidden" name="search" value="true" />
|
|
|
|
<input type="hidden" name="form" value="predefined" />
|
|
|
|
<input type="hidden" name="format" value="<?php echo $format; ?>" />
|
|
|
|
|
|
|
|
<table>
|
2009-06-30 09:24:29 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
|
|
|
|
<?php if( isset( $_GET['predefined'] ) )
|
|
|
|
$selected_q_number = intval( $_GET['predefined'] );
|
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
else
|
2009-06-30 09:24:29 +00:00
|
|
|
$selected_q_number = null; ?>
|
|
|
|
|
|
|
|
<center><b><?php echo $lang['predefined_searches']; ?></b><br />
|
|
|
|
<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?server_id=<?php echo $server_id; ?>&form=advanced"><?php echo $lang['advanced_search_form_str']; ?></a>)</small><br />
|
2009-06-30 09:24:29 +00:00
|
|
|
<br />
|
|
|
|
|
|
|
|
<?php if( ! isset( $queries ) || ! is_array( $queries ) || 0 == count( $queries ) ) {
|
2009-06-30 09:22:30 +00:00
|
|
|
echo "<br />\n";
|
2009-06-30 09:24:29 +00:00
|
|
|
echo $lang['no_predefined_queries'];
|
2009-06-30 09:22:30 +00:00
|
|
|
echo "<br />\n";
|
|
|
|
echo "<br />\n";
|
|
|
|
echo "<br />\n";
|
2009-06-30 09:24:29 +00:00
|
|
|
echo "</td></tr></table>\n";
|
2009-06-30 09:22:30 +00:00
|
|
|
echo "</body>\n";
|
|
|
|
echo "</html>\n";
|
|
|
|
die();
|
2009-06-30 09:24:29 +00:00
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
} else { ?>
|
|
|
|
|
|
|
|
<small><?php echo $lang['predefined_search_str']; ?>: </small>
|
|
|
|
<select name="predefined">
|
2009-06-30 09:24:29 +00:00
|
|
|
|
|
|
|
<?php foreach( $queries as $q_number => $q ) {
|
|
|
|
|
|
|
|
if ($selected_q_number === $q_number)
|
|
|
|
$selected = " selected";
|
|
|
|
|
|
|
|
else
|
|
|
|
$selected = "";
|
|
|
|
|
|
|
|
print("\t<option value=\"" . $q_number . "\"" . $selected . ">\n");
|
|
|
|
print("\t" . htmlspecialchars( $q['name'] ) . "\n");
|
|
|
|
print("\t</option>\n");
|
|
|
|
} ?>
|
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
</select>
|
2009-06-30 09:24:29 +00:00
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
<?php } ?>
|
2009-06-30 09:24:29 +00:00
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<center><input type="submit" value="<?php echo $lang['Search']; ?>" /></center>
|
|
|
|
</td>
|
|
|
|
</table>
|
|
|
|
</form>
|