[ Index ] |
|
Code source de osCommerce 2.2ms2-060817 |
1 <?php 2 /* 3 $Id: order_total.php,v 1.4 2003/02/11 00:04:53 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 order_total { 14 var $modules; 15 16 // class constructor 17 function order_total() { 18 global $language; 19 20 if (defined('MODULE_ORDER_TOTAL_INSTALLED') && tep_not_null(MODULE_ORDER_TOTAL_INSTALLED)) { 21 $this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED); 22 23 reset($this->modules); 24 while (list(, $value) = each($this->modules)) { 25 include(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value); 26 include(DIR_WS_MODULES . 'order_total/' . $value); 27 28 $class = substr($value, 0, strrpos($value, '.')); 29 $GLOBALS[$class] = new $class; 30 } 31 } 32 } 33 34 function process() { 35 $order_total_array = array(); 36 if (is_array($this->modules)) { 37 reset($this->modules); 38 while (list(, $value) = each($this->modules)) { 39 $class = substr($value, 0, strrpos($value, '.')); 40 if ($GLOBALS[$class]->enabled) { 41 $GLOBALS[$class]->process(); 42 43 for ($i=0, $n=sizeof($GLOBALS[$class]->output); $i<$n; $i++) { 44 if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) { 45 $order_total_array[] = array('code' => $GLOBALS[$class]->code, 46 'title' => $GLOBALS[$class]->output[$i]['title'], 47 'text' => $GLOBALS[$class]->output[$i]['text'], 48 'value' => $GLOBALS[$class]->output[$i]['value'], 49 'sort_order' => $GLOBALS[$class]->sort_order); 50 } 51 } 52 } 53 } 54 } 55 56 return $order_total_array; 57 } 58 59 function output() { 60 $output_string = ''; 61 if (is_array($this->modules)) { 62 reset($this->modules); 63 while (list(, $value) = each($this->modules)) { 64 $class = substr($value, 0, strrpos($value, '.')); 65 if ($GLOBALS[$class]->enabled) { 66 $size = sizeof($GLOBALS[$class]->output); 67 for ($i=0; $i<$size; $i++) { 68 $output_string .= ' <tr>' . "\n" . 69 ' <td align="right" class="main">' . $GLOBALS[$class]->output[$i]['title'] . '</td>' . "\n" . 70 ' <td align="right" class="main">' . $GLOBALS[$class]->output[$i]['text'] . '</td>' . "\n" . 71 ' </tr>'; 72 } 73 } 74 } 75 } 76 77 return $output_string; 78 } 79 } 80 ?>
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 |
![]() |