Added a division to include the search results in, suppressed some

output in an ajax request.
This commit is contained in:
ninadsp
2010-07-02 03:34:44 +05:30
parent 77aa8c50dd
commit 4767612d3c

View File

@@ -55,6 +55,9 @@
*/ */
require_once './libraries/common.inc.php'; require_once './libraries/common.inc.php';
$GLOBALS['js_include'][] = 'jquery/jquery-1.4.2.js';
$GLOBALS['js_include'][] = 'db_search.js';
/** /**
* Gets some core libraries and send headers * Gets some core libraries and send headers
*/ */
@@ -129,8 +132,11 @@ if (empty($_REQUEST['field_str']) || ! is_string($_REQUEST['field_str'])) {
* Displays top links * Displays top links
*/ */
$sub_part = ''; $sub_part = '';
require './libraries/db_info.inc.php';
if( $GLOBALS['is_ajax_request'] != true) {
require './libraries/db_info.inc.php';
echo '<div id="searchresults">';
}
/** /**
* 1. Main search form has been submitted * 1. Main search form has been submitted
@@ -287,13 +293,19 @@ if (isset($_REQUEST['submit_search'])) {
} }
} // end 1. } // end 1.
if($GLOBALS['is_ajax_request'] == true) {
exit;
}
else {
echo '</div>';//end searchresults div
}
/** /**
* 2. Displays the main search form * 2. Displays the main search form
*/ */
?> ?>
<a name="db_search"></a> <a name="db_search"></a>
<form method="post" action="db_search.php" name="db_search"> <form id="db_search_form" method="post" action="db_search.php" name="db_search">
<?php echo PMA_generate_common_hidden_inputs($GLOBALS['db']); ?> <?php echo PMA_generate_common_hidden_inputs($GLOBALS['db']); ?>
<fieldset> <fieldset>
<legend><?php echo __('Search in database'); ?></legend> <legend><?php echo __('Search in database'); ?></legend>