<tr class="order-total">
<td class="deal-buy-desc"><strong>应付总额:</strong></td>
<td class="deal-buy-quantity"></td>
<td class="deal-buy-multi"></td>
<td class="deal-buy-price"></td>
<td class="deal-buy-equal">=</td>
<td class="deal-buy-total"><span class="money">{$currency}</span>{$order['origin']}</td>
</tr>》》》》》》》》》》》》
{$order['origin']}是订单金额 如果大于39 就无邮费
如果小于39 就总金额 {$order['origin']} 再加上3元运费另外的代码是这些
<?php
require_once(dirname(dirname(__FILE__)) . '/app.php');
require_once(dirname(__FILE__) . '/paybank.php');
$id = intval($_GET['id']);
$order = Table::Fetch('order', $id);
if (!$order) {
Session::Set('error', '订单不存在');
redirect( WEB_ROOT . '/index.php' );
}
if ( $order['user_id'] != $login_user['id']) {
redirect( WEB_ROOT . "/team.php?id={$order['team_id']}");
}
$team = Table::Fetch('team', $order['team_id']);
$team['state'] = team_state($team);
if ( $team['close_time'] ) {
redirect( WEB_ROOT . "/team.php?id={$id}");
}//如果购物车有多件商品
if(is_user_edit() == true){
$condition = array(
"packageid = $id or id = $id",
);
$order_list = DB::LimitQuery('order', array(
'condition' => $condition,
));
}
$team_num = count($order_list);
function get_team_title($id){
$team = Table::Fetch('team', $id);
return $team['title'];
}
if ( $order['state'] == 'unpay' ) { /* payservice choice */
if(@$INI[$order['service']]['mid'] || @$INI[$order['service']]['acc']) {
$ordercheck[$order['service']] = 'checked';
}
else {
foreach($payservice AS $pone) {
if(@$INI[$order['service']]['mid'] || @$INI[$order['service']]['acc']) { $ordercheck[$order['service']] = 'checked'; }
}
}
$credityes = ($login_user['money'] >= $order['origin']);
$creditonly = ($team['team_type'] == 'seconds' && option_yes('creditseconds')); /* generator unique pay_id */
if (! ($order['pay_id']
&& (preg_match('#-(\d+)-(\d+)-#', $order['pay_id'], $m)
&& ( $m[1] == $order['id'] && $m[2] == $order['quantity']) )
)) {
$randid = strtolower(Utility::GenSecret(4, Utility::CHAR_WORD));
$pay_id = "go-{$order['id']}-{$order['quantity']}-{$randid}";
Table::UpdateCache('order', $order['id'], array(
'pay_id' => $pay_id,
));
}
die(include template('order_check'));
}
redirect( WEB_ROOT . "/order/view.php?id={$id}");
<td class="deal-buy-desc"><strong>应付总额:</strong></td>
<td class="deal-buy-quantity"></td>
<td class="deal-buy-multi"></td>
<td class="deal-buy-price"></td>
<td class="deal-buy-equal">=</td>
<td class="deal-buy-total"><span class="money">{$currency}</span>{$order['origin']}</td>
</tr>》》》》》》》》》》》》
{$order['origin']}是订单金额 如果大于39 就无邮费
如果小于39 就总金额 {$order['origin']} 再加上3元运费另外的代码是这些
<?php
require_once(dirname(dirname(__FILE__)) . '/app.php');
require_once(dirname(__FILE__) . '/paybank.php');
$id = intval($_GET['id']);
$order = Table::Fetch('order', $id);
if (!$order) {
Session::Set('error', '订单不存在');
redirect( WEB_ROOT . '/index.php' );
}
if ( $order['user_id'] != $login_user['id']) {
redirect( WEB_ROOT . "/team.php?id={$order['team_id']}");
}
$team = Table::Fetch('team', $order['team_id']);
$team['state'] = team_state($team);
if ( $team['close_time'] ) {
redirect( WEB_ROOT . "/team.php?id={$id}");
}//如果购物车有多件商品
if(is_user_edit() == true){
$condition = array(
"packageid = $id or id = $id",
);
$order_list = DB::LimitQuery('order', array(
'condition' => $condition,
));
}
$team_num = count($order_list);
function get_team_title($id){
$team = Table::Fetch('team', $id);
return $team['title'];
}
if ( $order['state'] == 'unpay' ) { /* payservice choice */
if(@$INI[$order['service']]['mid'] || @$INI[$order['service']]['acc']) {
$ordercheck[$order['service']] = 'checked';
}
else {
foreach($payservice AS $pone) {
if(@$INI[$order['service']]['mid'] || @$INI[$order['service']]['acc']) { $ordercheck[$order['service']] = 'checked'; }
}
}
$credityes = ($login_user['money'] >= $order['origin']);
$creditonly = ($team['team_type'] == 'seconds' && option_yes('creditseconds')); /* generator unique pay_id */
if (! ($order['pay_id']
&& (preg_match('#-(\d+)-(\d+)-#', $order['pay_id'], $m)
&& ( $m[1] == $order['id'] && $m[2] == $order['quantity']) )
)) {
$randid = strtolower(Utility::GenSecret(4, Utility::CHAR_WORD));
$pay_id = "go-{$order['id']}-{$order['quantity']}-{$randid}";
Table::UpdateCache('order', $order['id'], array(
'pay_id' => $pay_id,
));
}
die(include template('order_check'));
}
redirect( WEB_ROOT . "/order/view.php?id={$id}");
解决方案 »
- 比较难的一个CURL
- 哪有php+jquery教程或者实列啊?
- 有谁用过Discuz的BBS??
- 求救:一个PHP页面运行以后,打开另外一个页面,而自己在5秒后自动更新为另外一个页面
- 如果用户关闭了cookie,session的登录程序不能用,应该怎么办啊!
- 急急急,请问为什么会出现这个错误
- 请问@是什么意思怎么使用?
- 关于“相关链接”已贴出概略设计。现在又遇到了个难题:如何从标题中自动提取关键字?
- 求段代码,请大家帮助
- 用php输出语句进行显示时整型数变成了(100.00)日期型数变成了(1999-1-1 00:00:00.000)
- 求助!MYSQL的INSERT问题
- int(5) 和 int(6)显示宽度,不补0的情况下有什么好处;
if (!$order) {
Session::Set('error', '订单不存在');
redirect( WEB_ROOT . '/index.php' );
}
$order['origin'] = $order['origin'] > 39 ? $order['origin'] : ($order['origin']+3);
....