[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/includes/templates/template_default/sideboxes/ -> tpl_document_categories.php (source)

   1  <?php
   2  /**

   3   * Side Box Template

   4   *

   5   * @package templateSystem

   6   * @copyright Copyright 2003-2005 Zen Cart Development Team

   7   * @copyright Portions Copyright 2003 osCommerce

   8   * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

   9   * @version $Id: tpl_document_categories.php 2975 2006-02-05 19:33:51Z birdbrain $

  10   */
  11    $content = "";
  12    
  13    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
  14    for ($i=0;$i<sizeof($box_categories_array);$i++) {
  15  /*

  16      if ($box_categories_array[$i]['has_sub_cat'] or $box_categories_array[$i]['parent'] == 'true') {

  17        $new_style = 'category-parent';

  18      } else {

  19        $new_style = 'category-child';

  20      }

  21  */
  22      switch(true) {
  23        case ($box_categories_array[$i]['top'] == 'true'):
  24          $new_style = 'category-top';
  25          break;
  26        case ($box_categories_array[$i]['has_sub_cat']):
  27          $new_style = 'category-subs';
  28          break;
  29        default:
  30          $new_style = 'category-products';
  31        }
  32  
  33      $content .= '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
  34  
  35        if ($box_categories_array[$i]['current']) {
  36          if ($box_categories_array[$i]['has_sub_cat']) {
  37            $content .= '<span class="category-subs-parent">' . $box_categories_array[$i]['name'] . '</span>';
  38          } else {
  39            $content .= '<span class="category-subs-selected">' . $box_categories_array[$i]['name'] . '</span>';
  40          }
  41        } else {
  42          $content .= $box_categories_array[$i]['name'];
  43        }
  44  
  45        if ($box_categories_array[$i]['has_sub_cat']) {
  46          $content .= CATEGORIES_SEPARATOR;
  47        }
  48        $content .= '</a>';
  49  
  50        if (SHOW_COUNTS == 'true') {
  51          if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
  52            $content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
  53          }
  54        }
  55  
  56        $content .= '<br />';
  57      }
  58        $content .= '</div>';
  59  ?>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics