order_total.php
来自「全新且完善的强大网上商店系统」· PHP 代码 · 共 74 行
PHP
74 行
<?php
class order_total {
var $modules;
// class constructor
function order_total() {
global $language, $soobic;
if (defined('MODULE_ORDER_TOTAL_INSTALLED') && tep_not_null(MODULE_ORDER_TOTAL_INSTALLED)) {
$this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED);
reset($this->modules);
while (list(, $value) = each($this->modules)) {
include($soobic.'./languages/'.$language . '/modules/order_total/' . $value);
include($soobic.'./modules/order_total/' . $value);
$class = substr($value, 0, strrpos($value, '.'));
$GLOBALS[$class] = new $class;
}
}
}
function process() {
$order_total_array = array();
if (is_array($this->modules)) {
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled) {
$GLOBALS[$class]->process();
for ($i=0, $n=sizeof($GLOBALS[$class]->output); $i<$n; $i++) {
if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) {
$order_total_array[] = array('code' => $GLOBALS[$class]->code,
'title' => $GLOBALS[$class]->output[$i]['title'],
'text' => $GLOBALS[$class]->output[$i]['text'],
'value' => $GLOBALS[$class]->output[$i]['value'],
'sort_order' => $GLOBALS[$class]->sort_order);
}
}
}
}
}
return $order_total_array;
}
function output() {
$output_string = '';
if (is_array($this->modules)) {
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled) {
$size = sizeof($GLOBALS[$class]->output);
for ($i=0; $i<$size; $i++) {
$output_string .= ' <tr bgcolor="'.ALTBG2.'">' . "\n" .
' <td align="right" width="70%">' . $GLOBALS[$class]->output[$i]['title'] . '</td>' . "\n" .
' <td align="left" >' . $GLOBALS[$class]->output[$i]['text'] . '</td>' . "\n" .
' </tr>';
}
}
}
}
return $output_string;
}
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?