[ 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/common/ -> tpl_tabular_display.php (source)

   1  <?php
   2  /**

   3   * Common Template - tpl_tabular_display.php

   4   *

   5   * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.

   6   *

   7   * @package templateSystem

   8   * @copyright Copyright 2003-2006 Zen Cart Development Team

   9   * @copyright Portions Copyright 2003 osCommerce

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

  11   * @version $Id: tpl_tabular_display.php 3957 2006-07-13 07:27:06Z drbyte $

  12   */
  13  
  14  //print_r($list_box_contents);

  15    $cell_scope = (!isset($cell_scope) || empty($cell_scope)) ? 'col' : $cell_scope;
  16    $cell_title = (!isset($cell_title) || empty($cell_title)) ? 'list' : $cell_title;
  17  
  18  ?>
  19  <table width="100%" border="0" cellspacing="0" cellpadding="0" id="<?php echo 'cat' . $cPath . 'Table'; ?>" class="tabTable">
  20  <?php
  21    for($row=0; $row<sizeof($list_box_contents); $row++) {
  22      $r_params = "";
  23      $c_params = "";
  24      if (isset($list_box_contents[$row]['params'])) $r_params .= ' ' . $list_box_contents[$row]['params'];
  25  ?>
  26    <tr <?php echo $r_params; ?>>
  27  <?php
  28      for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
  29        $c_params = "";
  30        $cell_type = ($row==0) ? 'th' : 'td';
  31        if (isset($list_box_contents[$row][$col]['params'])) $c_params .= ' ' . $list_box_contents[$row][$col]['params'];
  32        if (isset($list_box_contents[$row][$col]['align']) && $list_box_contents[$row][$col]['align'] != '') $c_params .= ' align="' . $list_box_contents[$row][$col]['align'] . '"';
  33        if ($cell_type=='th') $c_params .= ' scope="' . $cell_scope . '" id="' . $cell_title . 'Cell' . $row . '-' . $col.'"';
  34        if (isset($list_box_contents[$row][$col]['text'])) {
  35  ?>
  36     <?php echo '<' . $cell_type . $c_params . '>'; ?><?php echo $list_box_contents[$row][$col]['text'] ?><?php echo '</' . $cell_type . '>'  . "\n"; ?>
  37  <?php
  38        }
  39      }
  40  ?>
  41    </tr>
  42  <?php
  43    }
  44  ?> 
  45  </table>


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