<?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  18/12/10, 08:18
 *\author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
 *\encode UTF-8
 *\group boxes
 *\dir includes/boxes/
 *\file
*/
global $random_product;
$languages_id=$page->the_var('languages_id');
if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, 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 p.products_id = s.products_id and p.products_id = pd.products_id and p.products_id = p2c.products_id and categories_status = 1 and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc limit " . $page->_conf_value('MAX_RANDOM_SELECT_SPECIALS'))) {

  $array= array('title'=>__('box heading specials'),'content'=>tep_output_string_protected(tep_get_include_contents('box.specials'),false,true));
}
else $array= array('title'=>'','content'=>'');
?>