<?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  12/12/10, 21:55
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8

  Prend en charge les appels vers les listes, type listing: produits, articles, rubriques
*/
$cPath=$page->the_var('cPath');
$categories=$page->the_var('categories');
$category_depth=$page->the_var('category_depth');
?>
<div id="index">

  <h2 class="content title <?php echo $language ;?>"><?php echo (isset($categories->categories_name))? $categories->categories_name : (isset($manuf['manufacturers_name'])?$manuf['manufacturers_name'] : '' ); ?></h2>

  <div class="prod_box_big">
    <div class="top_prod_box_big"></div>
      <div class="center_prod_box_big">
	<?php /** Image cat or manufacturer */ if (!empty($image)) : ?>
	  <div id="headingCatImg">
	    <?php echo tep_image(DIR_WS_IMAGES . $image, isset($categories->categories_name)? $categories->categories_name : $manuf['manufacturers_name'],  $page->_conf_value('HEADING_IMAGE_WIDTH'),  $page->_conf_value('HEADING_IMAGE_HEIGHT')); ?>
	  </div>
	<?php endif; ?>
	<?php /** Image cat */ if(isset($categories->categories_description)) : ?>
	  <div id="headingCatTxt">
	    <?php  echo $categories->categories_description; ?>
	  </div>
	<?php endif; ?>
    </div>
    <div class="bottom_prod_box_big"></div>
  </div>

  <?php /** liste des categories   */ if(!isset($_GET['manufacturers_id']) && $category_depth=='products')  echo tep_manufacturers_list($page->the_var('current_category_id')); ?>

</div>

<?php /** L'appel du module sera prise en charge par le template */

      /** init module liste image des categories enfant.  */
        if ($category_depth == 'nested') $page->oscss_modules->_add('listing_cat.php','center');
      /** init module liste des produit ou page de la categories concerné */
        if (isset($listing_split) && (isset($listing_query) && tep_db_num_rows($listing_query)>0) ) {
	  if($category_depth=='products'||$category_depth == 'nested') $page->oscss_modules->_add(FILENAME_PRODUCT_LISTING,'center', array('listing_split'=>$listing_split,'listing_query'=>@$listing_query) );
	  elseif($category_depth=='pages') $page->oscss_modules->_add('listing_pages.php','center', array('title'=>TEXT_HEADING_CHILD_PRODUCT, 'listing_split'=>$listing_split, 'listing_query'=>@$listing_query) );
      /** init d'un module de remplacement ...; */
        } else $page->oscss_modules->_add(FILENAME_NEW_PRODUCTS,'center');
?>