<?php
/**
  @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
  @portion code Copyright (c) 2002 osCommerce
  @package osCSS-2 <www http://www.oscss.org>
  @version 2.1.0
  @date  16/09/10, 21:21
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8
  @brief the content special
*/
$specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and p.products_id = p2c.products_id and c.categories_id=p2c.categories_id and  categories_status = 1 and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC";

$listing_split = new splitPageResults($specials_query_raw,$page->_conf_value('MAX_DISPLAY_SPECIAL_PRODUCTS'));

?>
<div id="special">
  <?php $page->oscss_modules->_add(FILENAME_PRODUCT_LISTING,'center', array('title'=>HEADING_TITLE,'listing_split'=>$listing_split,'listing_query'=>$specials_query_raw)); ?>
</div>