<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=advanced_search.<br />
 * Displays options fields upon which a product search will be run
 *
 * @package templateSystem
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_advanced_search_default.php 18695 2011-05-04 05:24:19Z drbyte $
 */
?>
<div class="centerColumn" id="advSearchDefault">

<?php echo zen_draw_form('advanced_search', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get', 'onsubmit="return check_form(this);"') . zen_hide_session_id(); ?>
<?php echo zen_draw_hidden_field('main_page', FILENAME_ADVANCED_SEARCH_RESULT); ?>

<h1 id="advSearchDefaultHeading"><?php echo HEADING_TITLE_1; ?></h1>

<?php if ($messageStack->size('search') > 0) echo $messageStack->output('search'); ?>

<div class="pull-right"><?php echo '<a href="' . zen_href_link(FILENAME_POPUP_SEARCH_HELP) .'"  data-toggle="pt-ajaxlightbox" class="page-popup pt-button pt-button-vs">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></div>
<br><br>

<h3 class="section-title"><?php echo HEADING_SEARCH_CRITERIA; ?></h3>
<div class="form-group">
    <?php echo zen_draw_input_field('keyword', '', 'placeholder="' . $sData['keyword'] . '"'); ?>&nbsp;&nbsp;&nbsp;
    <label class="checkboxLabel checkbox-inline" for="search-in-description"><?php echo zen_draw_checkbox_field('search_in_description', '1', $sData['search_in_description'], 'id="search-in-description"'); ?> <?php echo TEXT_SEARCH_IN_DESCRIPTION; ?></label>
</div>
<br class="clearBoth" />

<div class="row">
    <div class="col-md-6">
        <h3 class="section-title"><?php echo ENTRY_CATEGORIES; ?></h3>
        <div class="form-group">
            <?php echo zen_draw_pull_down_menu('categories_id', zen_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)), '0' ,'', '1'), $sData['categories_id']); ?>&nbsp;&nbsp;&nbsp;
            <label class="checkboxLabel checkbox-inline" for="inc-subcat"><?php echo zen_draw_checkbox_field('inc_subcat', '1', $sData['inc_subcat'], 'id="inc-subcat"'); ?> <?php echo ENTRY_INCLUDE_SUBCATEGORIES; ?></label>
        </div>
        <br class="clearBoth" />
    </div>
    <div class="col-md-6">
        <h3 class="section-title"><?php echo ENTRY_MANUFACTURERS; ?></h3>
        <div class="form-group">
            <?php echo zen_draw_pull_down_menu('manufacturers_id', zen_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)), PRODUCTS_MANUFACTURERS_STATUS), $sData['manufacturers_id']); ?>
        </div>
        <br class="clearBoth" />
    </div>
</div><br>

<h2><?php echo ENTRY_PRICE_RANGE; ?></h2>
<br>
<div class="row">
    <div class="col-md-6">
        <h3 class="section-title"><?php echo ENTRY_PRICE_FROM; ?></h3>
        <div class="form-group"><?php echo zen_draw_input_field('pfrom', $sData['pfrom']); ?></div>
    </div>
    <div class="col-md-6">
        <h3 class="section-title"><?php echo ENTRY_PRICE_TO; ?></h3>
        <div class="form-group"><?php echo zen_draw_input_field('pto', $sData['pto']); ?></div>
    </div>
</div>
<br class="clearBoth" />

<h2><?php echo ENTRY_DATE_RANGE; ?></h2>
<div class="row">
    <div class="col-md-6">
        <h3 class="section-title"><?php echo ENTRY_DATE_FROM; ?></h3>
        <div class="form-group"><?php echo zen_draw_input_field('dfrom', '', 'placeholder="' . $sData['dfrom'] . '"'); ?></div>
    </div>
    <div class="col-md-6">
        <h3 class="section-title"><?php echo ENTRY_DATE_TO; ?></h3>
        <div class="form-group"><?php echo zen_draw_input_field('dto', '', 'placeholder="' . $sData['dto'] . '"'); ?></div>
    </div>
</div>
<br class="clearBoth" />


<div class="buttonRow pull-right"><input type="submit" value="<?php echo BUTTON_SEARCH_ALT; ?>" class="button button-inverse"></div>
<div class="buttonRow pull-left"><a href="<?php echo zen_back_link(true); ?>" class="button"><?php echo BUTTON_BACK_ALT; ?></a></div>

</form>
</div>