$price = $price - intval($order['jifentprice']); //减去积分抵现的价格. } } else { $price = intval($order['dingnum']) * $order['dingjin']; if (!empty($order['usejifen']) && !empty($order['jifentprice'])) { $price = $price - intval($order['jifentprice']); //减去积分抵现的价格. } } if (empty($price)) { $url = "{$GLOBALS['cfg_basehost']}/spots/show_{$order['productaid']}.html"; header("location:{$url}"); exit; } echo Helper_Archive::payOnline($order['ordersn'], $order['productname'], $price, $paytype); } } } /** * 获得预订景点的基本信息 * * @access private * @return array */ function getSpotinfo($id) { global $dsql; $sql = "select *,id as productid,aid as productaid from #@__spot where id={$id}"; $row = $dsql->GetOne($sql); return $row;
<?php require_once dirname(__FILE__) . "/../include/common.inc.php"; if ($dopost == 'save') { $addtime = time(); $sql = "insert into sline_dzorder (ordersn,title,dingjin,username,phone,description,travelnum,addtime) values ('{$ordersn}','{$title}','{$dingjin}','{$username}','{$phone}','{$description}','{$travelnum}','{$addtime}')"; $result = $dsql->ExecuteNoneQuery2($sql); if ($result) { echo Helper_Archive::payOnline($ordersn, $title, $dingjin); } else { header('location:/pay/pay.php'); } exit; } require_once SLINEINC . "/view.class.php"; $pv = new View(); $ordersn = 'dz' . date('YmdHs'); if (empty($GLOBALS['cfg_pay_type']) || $GLOBALS['cfg_pay_type'] == 1) { $template = 'pay_alipay.htm'; } else { if ($GLOBALS['cfg_pay_type'] == 2) { $template = 'pay_99bill.htm'; } } $pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/pay/" . $template); $pv->Display(); exit;
$orderlist = Helper_Archive::getChildOrder($id); $totalprice = 0; $totalnum = 0; foreach ($orderlist as $row) { $totalprice += intval($row['dingnum']) * intval($row['price']); $totalnum += $row['dingnum']; } if (!empty($order_main_info['dingjin'])) { $totalprice = $totalnum * $order_main_info['dingjin']; } if (empty($totalprice)) { $url = "{$GLOBALS['cfg_basehost']}/hotels/show_{$order_main_info['productaid']}.html"; header("location:{$url}"); exit; } echo Helper_Archive::payOnline($order_main_info['ordersn'], $order_main_info['productname'], $totalprice, $paytype); } /** * 获得预订酒店的基本信息 * * @access private * @return array */ function getHotelinfo($id) { global $dsql; $sql = "select *,id as productid,aid as productaid from #@__hotel where id={$id}"; $row = $dsql->GetOne($sql); return $row; } function getRoomInfo($ticketid)