<?php
/**
 * Page Template - Featured Products listing
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 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_featured_products_default.php 2603 2005-12-19 20:22:08Z wilt $
 */
?>
<div class="centerColumn" id="featuredDefault">

<h3 id="featuredDefaultHeading" class="section-title"><?php echo HEADING_TITLE; ?></h3>

<div class="clearfix">
  <div id="featuredProductsListingTopNumber" class="navSplitPagesResult pull-left"><?php echo $featured_products_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_FEATURED_PRODUCTS); ?></div>
  <?php require($template->get_template_dir('/tpl_modules_listing_display_order.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_listing_display_order.php'); ?>
</div>

<?php
  if (PRODUCT_FEATURED_LISTING_MULTIPLE_ADD_TO_CART > 0 and $show_submit == true and $featured_products_split->number_of_rows > 0) {
    if ($show_top_submit_button == true or $show_bottom_submit_button == true) {
      echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_FEATURED_PRODUCTS, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product'), 'post', 'enctype="multipart/form-data"');
    }
  }
?>

<div class="before-product-listing clearfix">
  <?php if (($featured_products_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?>
  <div id="featuredProductsListingTopLinks" class="navSplitPagesLinks pull-right"><?php echo TEXT_RESULT_PAGE . ' ' . $featured_products_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div>
  <?php } ?>

  <?php if ($show_top_submit_button == true) { ?>
  <div class="buttonRow pull-right"><input type="submit" id="submit1" name="submit1" class="button" value="<?php echo BUTTON_ADD_PRODUCTS_TO_CART_ALT; ?>"></div>
  <?php } ?>
</div>
<?php
/**
 * display the featured products
 */
require($template->get_template_dir('/tpl_modules_products_featured_listing.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_featured_listing.php'); ?>

<div class="after-product-listing clearfix">
  <?php if ( ($featured_products_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) : ?>
  <div  id="productsListingListingBottomLinks" class="navSplitPagesLinks pull-left"><?php echo TEXT_RESULT_PAGE . ' ' . $featured_products_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></div>
  <?php endif; ?>

  <?php if ($show_bottom_submit_button == true) : ?>
  <div class="buttonRow pull-right"><input id="submit2" type="submit" name="submit1" value="<?php echo BUTTON_ADD_PRODUCTS_TO_CART_ALT; ?>"></div>
  <?php endif; ?>
</div>

<?php
// only end form if form is created
    if ($show_top_submit_button == true or $show_bottom_submit_button == true) {
?>
</form>
<?php } // end if form is made ?>
</div>