[ Index ]
 

Code source de osCommerce 2.2ms2-060817

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/catalog/admin/includes/classes/ -> box.php (source)

   1  <?php
   2  /*
   3    $Id: box.php,v 1.7 2003/06/20 16:23:08 hpdl Exp $
   4  
   5    osCommerce, Open Source E-Commerce Solutions
   6    http://www.oscommerce.com
   7  
   8    Copyright (c) 2003 osCommerce
   9  
  10    Released under the GNU General Public License
  11  
  12    Example usage:
  13  
  14    $heading = array();
  15    $heading[] = array('params' => 'class="menuBoxHeading"',
  16                       'text'  => BOX_HEADING_TOOLS,
  17                       'link'  => tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('selected_box')) . 'selected_box=tools'));
  18  
  19    $contents = array();
  20    $contents[] = array('text'  => SOME_TEXT);
  21  
  22    $box = new box;
  23    echo $box->infoBox($heading, $contents);
  24  */
  25  
  26    class box extends tableBlock {
  27      function box() {
  28        $this->heading = array();
  29        $this->contents = array();
  30      }
  31  
  32      function infoBox($heading, $contents) {
  33        $this->table_row_parameters = 'class="infoBoxHeading"';
  34        $this->table_data_parameters = 'class="infoBoxHeading"';
  35        $this->heading = $this->tableBlock($heading);
  36  
  37        $this->table_row_parameters = '';
  38        $this->table_data_parameters = 'class="infoBoxContent"';
  39        $this->contents = $this->tableBlock($contents);
  40  
  41        return $this->heading . $this->contents;
  42      }
  43  
  44      function menuBox($heading, $contents) {
  45        $this->table_data_parameters = 'class="menuBoxHeading"';
  46        if (isset($heading[0]['link'])) {
  47          $this->table_data_parameters .= ' onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . $heading[0]['link'] . '\'"';
  48          $heading[0]['text'] = '&nbsp;<a href="' . $heading[0]['link'] . '" class="menuBoxHeadingLink">' . $heading[0]['text'] . '</a>&nbsp;';
  49        } else {
  50          $heading[0]['text'] = '&nbsp;' . $heading[0]['text'] . '&nbsp;';
  51        }
  52        $this->heading = $this->tableBlock($heading);
  53  
  54        $this->table_data_parameters = 'class="menuBoxContent"';
  55        $this->contents = $this->tableBlock($contents);
  56  
  57        return $this->heading . $this->contents;
  58      }
  59    }
  60  ?>


Généré le : Mon Nov 26 19:48:25 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics