[ Index ] |
|
Code source de osCommerce 2.2ms2-060817 |
1 <?php 2 /* 3 $Id: breadcrumb.php,v 1.3 2003/02/11 00:04:50 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 13 class breadcrumb { 14 var $_trail; 15 16 function breadcrumb() { 17 $this->reset(); 18 } 19 20 function reset() { 21 $this->_trail = array(); 22 } 23 24 function add($title, $link = '') { 25 $this->_trail[] = array('title' => $title, 'link' => $link); 26 } 27 28 function trail($separator = ' - ') { 29 $trail_string = ''; 30 31 for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) { 32 if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) { 33 $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>'; 34 } else { 35 $trail_string .= $this->_trail[$i]['title']; 36 } 37 38 if (($i+1) < $n) $trail_string .= $separator; 39 } 40 41 return $trail_string; 42 } 43 } 44 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 19:48:25 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |