|
- <?php
- require_once '../php_include/Config.php';
- require_once '../php_include/class.db.inc';
- require_once '../php_include/disney.inc';
-
- date_default_timezone_set('PRC');
- $current_date = date("Y-m-d");
- if( $current_date >= "2016-09-01" ) {
- header("Location:http://sfx.zhizhuchuxing.com/");
- exit();
- }
- //DB
- $objDbh = new Db;
- $objDbh->setAccount(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB);
- $objDisney = new DbDisney($objDbh);
-
- if( !isset($_GET["orderno"]) ) {
- header("Location:list.php?cc=".$_COOKIE["companycode"]);exit();
- }
- $order_common_info = $objDisney->getOrderInfoFromSN($_GET["orderno"]);
- if( $order_common_info == false && isset($_COOKIE["orderno"])) {
- $_GET["orderno"] = $_COOKIE["orderno"];
- $order_common_info = $objDisney->getOrderInfoFromSN($_GET["orderno"]);
- if( $order_common_info == false ) {
- header("Location:list.php?cc=".$_COOKIE["companycode"]);exit();
- }
- }
- $good_info = $objDisney->getGoodInfoFromId($order_common_info["prod_id"]);
- $base_org_info = $objDisney->getBaseOrgInfoFromCode( $_COOKIE["companycode"] );
- $base_org_name = false == $base_org_info ? "酒店" : $base_org_info["org_name"];
- $org_id = $base_org_info["org_id"];
- if( $good_info["good_type"] == 1 ) {
- $good_info["good_name"] = $order_common_info["prod_id"] == 15 ? $good_info["good_name"]."(回{$base_org_name})" : $base_org_name.$good_info["good_name"];
- } else if( $good_info["good_type"] == 2 ) {
- $good_info["good_name"] = $order_common_info["prod_id"] == 3 ? "上海迪士尼乐园一日票" : "上海迪士尼乐园两日票";
- }
-
- $order_good_array = $objDisney->getOrderGoodsArray( $order_common_info["id"] );
- setcookie("orderno", $_GET["orderno"], time() + 3600 * 24 * 365);
- ?>
-
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
- <title>蜘蛛出行</title>
- <link rel="stylesheet" href="css/reset.css">
- <link rel="stylesheet" href="css/pay.css">
- <script src="js/flexible.js"></script>
- <script src="js/makegrid.js"></script>
- <script src="js/jquery-2.2.4.min.js"></script>
- </head>
- <body>
- <div id="pay" class="pay">
- <section class="information">
- <div class="a o">
- <?php if( $good_info["good_type"] == 1 || $good_info["good_type"] == 4 || $good_info["good_type"] == 5 ) { ?>
- <span class="wspacing h f">线</span><span class="h f">路:</span>
- <?php } else { ?>
- <span class="wspacing h f">商</span><span class="h f">品:</span>
- <?php } ?>
- <span class="f" style="width:7rem;"><?php echo $good_info["good_name"];?></span>
- </div>
- <div class="a o">
- <?php if( $good_info["good_type"] == 1 || $good_info["good_type"] == 4 || $good_info["good_type"] == 5 ) { ?>
- <span class="h f">线路时间:</span>
- <span class="f" style="width:7rem;">
- <?php
- $start_day = substr($order_common_info["start_day"],0,4)."年".substr($order_common_info["start_day"],5,2)."月".substr($order_common_info["start_day"],8,2)."日";
- $end_day = substr($order_common_info["end_day"],0,4)."年".substr($order_common_info["end_day"],5,2)."月".substr($order_common_info["end_day"],8,2)."日";
- if( $order_common_info["prod_id"] == 15 ) {
- echo $start_day . " " . $order_common_info["start_time"];
- } else {
- echo $start_day . " " . $order_common_info["start_time"] . "~" . $end_day . " " . $order_common_info["end_time"];
- if (mb_strlen($order_common_info["start_day2"]) > 0) {
- $start_day2 = substr($order_common_info["start_day2"], 0, 4) . "年" . substr($order_common_info["start_day2"], 5, 2) . "月" . substr($order_common_info["start_day2"], 8, 2) . "日";
- $end_day2 = substr($order_common_info["end_day2"], 0, 4) . "年" . substr($order_common_info["end_day2"], 5, 2) . "月" . substr($order_common_info["end_day2"], 8, 2) . "日";
- echo " " . $start_day2 . " " . $order_common_info["start_time2"] . "~" . $end_day2 . " " . $order_common_info["end_time2"];
- }
- }
- ?>
- </span>
- <?php if( $good_info["good_type"] == 4 || $good_info["good_type"] == 5 ) { ?>
- <span class="h f">上下站点:</span>
- <span class="f" style="width:7rem;">
- <?php
- $station_pos = mb_strpos( $order_common_info["prod_name"], "(" );
- $disp_station = mb_substr($order_common_info["prod_name"], $station_pos+1, -1);
- echo $disp_station;
- ?>
- </span>
- <?php } ?>
- <?php } else if( $good_info["good_type"] == 2 ) {?>
- <span class="h f">入园日期:</span>
- <span class="f" style="width:7rem;">
- <?php
- echo substr($order_common_info["start_day"],0,4)."年".substr($order_common_info["start_day"],5,2)."月".substr($order_common_info["start_day"],8,2)."日";
- if( mb_strlen($order_common_info["end_day"]) > 0 ) { echo "~".substr($order_common_info["end_day"],0,4)."年".substr($order_common_info["end_day"],5,2)."月".substr($order_common_info["end_day"],8,2)."日"; }
- ?>
- </span>
- <?php } else { ?>
- <span class="h f">演出时间:</span>
- <span class="f" style="width:7rem;">
- <?php
- echo substr($order_common_info["start_day"],0,4)."年".substr($order_common_info["start_day"],5,2)."月".substr($order_common_info["start_day"],8,2)."日";
- echo " ".$order_common_info["start_time"];
- ?>
- </span>
- <?php } ?>
- </div>
- <div class="a o">
- <span class="wspacing f h">数</span><span class="f h">量:</span>
- <div class="f">
- <?php foreach( $order_good_array as $order_good_info ) { ?>
- <div class="b">
- <span><?php echo $_ary_tickets_type[$order_good_info["subtype"]]; ?></span>
- <span><?php echo $order_good_info["good_num"];?>张</span>
- </div>
- <?php } ?>
- </div>
- </div>
- </section>
- <section class="payway">
- <div class="pwheader h">
- 选择支付方式
- </div>
- <a class="o wayone" href="http://wx.zhizhuchuxing.com/wechat/WxPay/realpay/onlinePay.php?orderid=<?php echo $_GET["orderno"];?>&disney=1">
- <div class="f">
- <img class="wt" src="images/wei.png" alt="">
- </div>
- <div class="f woy">
- <div class="h wzf">微信支付</div>
- <div class="tj">推荐已安装微信客户端的用户使用</div>
- </div>
- </a>
- </section>
- </div>
- </body>
- <script>
- var H=document.documentElement.clientHeight;
- var pay=document.getElementById('pay');
- if (pay.style.height<H) {
- pay.style.height=H+"px";
- };
- </script>
- </html>
|