LMR
parent
3b21e3a85f
commit
6486a067a3
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
class Api_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->JH=$this->load->database('JH', TRUE);
|
||||
}
|
||||
|
||||
function getAll($table,$where="1=1",$order="id desc") {
|
||||
$query = $this->JH->order_by("id desc")->get($table);
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
function _insert($table,$data){
|
||||
return $this->JH->insert($table, $data);
|
||||
}
|
||||
function _update($table,$data,$where){
|
||||
return $this->JH->where($where)->update($table, $data);
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Sendmail_model extends CI_Model {
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->HT = $this->load->database('HT', TRUE);
|
||||
}
|
||||
|
||||
function SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body)
|
||||
{
|
||||
if($this->validEmail($toEmail))
|
||||
{
|
||||
$data = array(
|
||||
"M_ReplyToName" => $fromName, //回复人
|
||||
"M_ReplyToEmail" => $fromEmail, //回复地址
|
||||
"M_ToName" => $toName, //收件人名
|
||||
"M_ToEmail" => $toEmail, //收件邮件地址
|
||||
"M_Title" => $subject, //主题
|
||||
"M_Body" => $body, //邮件正文
|
||||
"M_Web" => "CHT", //所属站点
|
||||
"M_FromName" => "Chinahighlights.com", //站点名称
|
||||
"M_State" => 0,
|
||||
);
|
||||
$this->HT->insert('Email_AutomaticSend',$data);
|
||||
return TRUE;
|
||||
}else{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function validEmail($email){
|
||||
$isValid = true;
|
||||
$atIndex = strrpos($email, "@");
|
||||
if (is_bool($atIndex) && !$atIndex){
|
||||
$isValid = false;
|
||||
}else{
|
||||
$domain = substr($email, $atIndex+1);
|
||||
$local = substr($email, 0, $atIndex);
|
||||
$localLen = strlen($local);
|
||||
$domainLen = strlen($domain);
|
||||
if ($localLen < 1 || $localLen > 64){
|
||||
// local part length exceeded
|
||||
$isValid = false;
|
||||
}else if ($domainLen < 1 || $domainLen > 255){
|
||||
// domain part length exceeded
|
||||
$isValid = false;
|
||||
}else if ($local[0] == '.' || $local[$localLen-1] == '.'){
|
||||
// local part starts or ends with '.'
|
||||
$isValid = false;
|
||||
}else if (preg_match('/\\.\\./', $local)){
|
||||
// local part has two consecutive dots
|
||||
$isValid = false;
|
||||
}else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)){
|
||||
// character not valid in domain part
|
||||
$isValid = false;
|
||||
}else if (preg_match('/\\.\\./', $domain)){
|
||||
// domain part has two consecutive dots
|
||||
$isValid = false;
|
||||
}else if(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',str_replace("\\\\","",$local))){
|
||||
// character not valid in local part unless
|
||||
// local part is quoted
|
||||
if (!preg_match('/^"(\\\\"|[^"])+"$/',str_replace("\\\\","",$local))){
|
||||
$isValid = false;
|
||||
}
|
||||
}
|
||||
/*
|
||||
不检查是否有DNS解析
|
||||
if ($isValid && !(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A"))){
|
||||
// domain not found in DNS
|
||||
$isValid = false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
return $isValid;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
<thead>
|
||||
<tr><th>车次</th><th>出发地->目的地</th><th>时间</th><th>历时</th><th>商务座</th><th>特等座</th><th>一等座</th><th>二等座</th><th>高级软卧</th><th>软卧</th><th>硬卧</th><th>软座</th><th>硬座</th><th>无座</th><th>预定</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($result["list"] as $v) {
|
||||
switch ($v["arrive_days"]) {
|
||||
case '0':
|
||||
$arrive_days = "当天到达";
|
||||
break;
|
||||
case '1':
|
||||
$arrive_days = "次日达到";
|
||||
break;
|
||||
case '2':
|
||||
$arrive_days = "两日到达";
|
||||
break;
|
||||
case '3':
|
||||
$arrive_days = "三日到达";
|
||||
break;
|
||||
case '4':
|
||||
$arrive_days = "四日到达";
|
||||
break;
|
||||
case '5':
|
||||
$arrive_days = "五日到达";
|
||||
break;
|
||||
case '6':
|
||||
$arrive_days = "六日到达";
|
||||
break;
|
||||
case '7':
|
||||
$arrive_days = "七日到达";
|
||||
break;
|
||||
default:
|
||||
$arrive_days = "超过七天到达";
|
||||
break;
|
||||
}
|
||||
$zwxx = ""; //座位信息
|
||||
if (is_numeric($v['swz_num'])) {
|
||||
$zwxx.="&swz_num=" . $v['swz_num'];
|
||||
$zwxx.="&swz_price=" . $v['swz_price'];
|
||||
}
|
||||
if (is_numeric($v['tdz_num'])) {
|
||||
$zwxx.="&tdz_num=" . $v['tdz_num'];
|
||||
$zwxx.="&tdz_price=" . $v['tdz_price'];
|
||||
}
|
||||
if (is_numeric($v['ydz_num'])) {
|
||||
$zwxx.="&ydz_num=" . $v['ydz_num'];
|
||||
$zwxx.="&ydz_price=" . $v['ydz_price'];
|
||||
}
|
||||
if (is_numeric($v['edz_num'])) {
|
||||
$zwxx.="&edz_num=" . $v['edz_num'];
|
||||
$zwxx.="&edz_price=" . $v['edz_price'];
|
||||
}
|
||||
if (is_numeric($v['gjrw_num'])) {
|
||||
$zwxx.="&gjrw_num=" . $v['gjrw_num'];
|
||||
$zwxx.="&gjrw_price=" . $v['gjrw_price'];
|
||||
}
|
||||
if (is_numeric($v['rw_num'])) {
|
||||
$zwxx.="&rw_num=" . $v['rw_num'];
|
||||
$zwxx.="&rw_price=" . $v['rw_price'];
|
||||
}
|
||||
if (is_numeric($v['yw_num'])) {
|
||||
$zwxx.="&yw_num=" . $v['yw_num'];
|
||||
$zwxx.="&yw_price=" . $v['yw_price'];
|
||||
}
|
||||
if (is_numeric($v['rz_num'])) {
|
||||
$zwxx.="&rz_num=" . $v['rz_num'];
|
||||
$zwxx.="&rz_price=" . $v['rz_price'];
|
||||
}
|
||||
if (is_numeric($v['yz_num'])) {
|
||||
$zwxx.="&yz_num=" . $v['yz_num'];
|
||||
$zwxx.="&yz_price=" . $v['yz_price'];
|
||||
}
|
||||
if (is_numeric($v['wz_num'])) {
|
||||
$zwxx.="&wz_num=" . $v['wz_num'];
|
||||
$zwxx.="&wz_price=" . $v['wz_price'];
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td rowspan="2" style="vertical-align:middle;"><?php echo $v['train_code']; ?></td>
|
||||
<td rowspan="2" style="vertical-align:middle;"><?php echo $v['from_station_name']; ?>-><?php echo $v['to_station_name']; ?></td>
|
||||
<td rowspan="2" style="vertical-align:middle;"><?php echo $v['start_time']; ?>~<?php echo $v['arrive_time']; ?></td>
|
||||
<td style="vertical-align:middle;"><?php echo $v['run_time']; ?></td>
|
||||
<td><?php echo $v['swz_num']; ?></td>
|
||||
<td><?php echo $v['tdz_num']; ?></td>
|
||||
<td><?php echo $v['ydz_num']; ?></td>
|
||||
<td><?php echo $v['edz_num']; ?></td>
|
||||
<td><?php echo $v['gjrw_num']; ?></td>
|
||||
<td><?php echo $v['rw_num']; ?></td>
|
||||
<td><?php echo $v['yw_num']; ?></td>
|
||||
<td><?php echo $v['rz_num']; ?></td>
|
||||
<td><?php echo $v['yz_num']; ?></td>
|
||||
<td><?php echo $v['wz_num']; ?></td>
|
||||
<td rowspan="2" style="vertical-align:middle;"><a target="_blank" class="btn btn-primary btn-sm" href="<?php echo site_url("/apps/train/index/booking?from_station_code={$v['from_station_code']}&from_station_name={$v['from_station_name']}&to_station_code={$v['to_station_code']}&to_station_name={$v['to_station_name']}&train_code={$v['train_code']}&date={$date}&start_time={$v['start_time']}&arrive_time={$v['arrive_time']}{$zwxx}"); ?>">预定</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $arrive_days; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['swz_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['tdz_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['ydz_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['edz_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['gjrw_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['rw_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['yw_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['rz_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['yz_price']; ?></td>
|
||||
<td style="color:red;">¥<?php echo $v['wz_price']; ?></td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>无标题文档</title>
|
||||
<style>
|
||||
*{ font-family:Verdana, Geneva, sans-serif;}
|
||||
h1{ font-size:18px; text-align:center; color:#545454; margin:0 0 10px 0!important;}
|
||||
p{ font-size:14px; color:#545454; line-height:22px; margin-bottom:12px!important;}
|
||||
table.table{ width:90%; border-width:1px 1px 0 1px; border-color:#d1d1d1; border-style: solid; margin-bottom:15px;}
|
||||
table.table th{ background:#f1f1f1; color:#666; border-bottom:1px solid #d1d1d1; width:180px; font-size:14px; text-align:left; padding:8px 10px 8px 10px;}
|
||||
table.table td{ padding:8px 0 8px 10px; border-bottom:1px solid #d1d1d1; font-size:14px; color:#545454;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>China Highlights Booking Confirmation</h1>
|
||||
<p>Dear <?php echo $user[0]->GUT_LastName?>,</p>
|
||||
<p>Thanks for payment US$145 . The train tickets have already been issued. </p>
|
||||
<p> You can collect the paper ticket(s) from now at any train station in mainland China. </p>
|
||||
<p> Please present all passenger(s) original passport(s) and Ticket Pick Up No.E601014106 at any ticket collecting counters (in Chinese 取票窗口)of any railway stations in mainland China. They will then issue your paper train ticket(s). </p>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<th>Passenger(s)</th>
|
||||
<td><p>2 adult(s)
|
||||
</p>
|
||||
<p> 1. ALEXANDER JAMES JOHNSON , passport number 503406354<br />
|
||||
2. SIAN MARIE JOHNSON , passport number 528876517</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>Train 1:</p>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<th><strong>Ticket Pick Up No.</strong></th>
|
||||
<td>E601014106 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>Train No.</strong></th>
|
||||
<td>Z19</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>Departure</strong></th>
|
||||
<td>20:40 Jun.06 Beijing Xi (West) Station(in Chinese 北京西火车站)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>Arrival</strong></th>
|
||||
<td>08:31AM Jun.07 Xi'an Station(in Chinese 西安火车站) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>Class</strong></th>
|
||||
<td>Soft Sleeper </td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>Kindly note below:</p>
|
||||
<p> 1. The same passport that was used for booking should also be used for ticket collection. A renewed passport won't be acceptable even if the holder is the same person. The system does not allow us to change passport number or passenger name after issue ticket. Have to issue new ticket if wrong passport number or name.</p>
|
||||
<p> 2. There is no further fee if collect train ticket(s) at the DEPARTURE station shown on your ticket(s). RMB 5 per ticket will be charged at a ticket counter at other stations. E.g. if you have booked Beijing-Shanghai and Shanghai-Beijing ticket(s), and you collect them all at Beijing, you will be charged RMB 5 per ticket for the Shanghai-Beijing ticket(s), but if you pick up the return leg ticket(s) separately in Shanghai you will avoid the charge.</p>
|
||||
<p> 3. On departure day, please time your arrival wisely. If you are going to collect your tickets on departure day, we suggest you be at the station at least 1.5 hours ahead of the stated departure time to allow for waiting in queue at the ticket-counter, for security checks and for ticket checks.<br />
|
||||
If you’ve already collected before the departure day, it is also wise to be at the station at least 40 minutes ahead. </p>
|
||||
<p> 4. Download railway station instructions, maps and tips at <a href="http://www.chinahighlights.com/china-trains/station-map.htm">http://www.chinahighlights.com/china-trains/station-map.htm</a> <br />
|
||||
<br />
|
||||
5.Terms & Conditions. <a href="http://www.chinahighlights.com/china-trains/booking-policy.htm">http://www.chinahighlights.com/china-trains/booking-policy.htm</a></p>
|
||||
<p> Best Regards!<br />
|
||||
Iris Wang, Travel Advisor<br />
|
||||
Tel: +86-773-2801368 Mobile:+86-18775900313 <br />
|
||||
Fax: 86-773-2827424, 86-773-2885308 <br />
|
||||
E-mail: <a href="mailto:iris@chinahighlights.me">iris@chinahighlights.me</a><br />
|
||||
<a href="http://www.chinahighlights.com">www.chinahighlights.com</a> <br />
|
||||
Address: Building 6, Chuangyi Business Park, 70 Qilidian Road, Guilin, Guangxi, 541004, China<br />
|
||||
If you wish to share anything with my supervisor (Ms. Alex Yang), please feel free to send your email to <a href="mailto:alex@chinahighlights.net">alex@chinahighlights.net</a>. </p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,59 @@
|
||||
<div style="width:90%;margin:30px auto;">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">订单搜索</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<form style="" action="" method="get">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" placeholder="汉特订单号或聚合订单号" name="order" value="<?php echo !empty($order)?"$order":"";?>">
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<button type="submit" id="sub" class="btn btn-success btn-sm"><span class="glyphicon glyphicon-search"></span> 搜索</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">订单列表</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped" style="text-align:center;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">序号</th>
|
||||
<th style="text-align:center;">汉特订单号</th>
|
||||
<th style="text-align:center;">聚合订单号</th>
|
||||
<th style="text-align:center;">车次</th>
|
||||
<th style="text-align:center;">出发</th>
|
||||
<th style="text-align:center;">到达</th>
|
||||
<th style="text-align:center;">状态</th>
|
||||
<th style="text-align:center;">价格</th>
|
||||
<th style="text-align:center;">提交时间</th>
|
||||
<th style="text-align:center;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $num=0; foreach($data as $v):?>
|
||||
<tr>
|
||||
<td><?php echo ++$num;?></td>
|
||||
<td><?php echo $v->COLI_ID;?></td>
|
||||
<td><?php echo $v->JOL_JuheOrder;?></td>
|
||||
<td><?php echo $v->JOL_TrainCode;?></td>
|
||||
<td><?php echo $v->JOL_FromStation;?></td>
|
||||
<td><?php echo $v->JOL_ToStation;?></td>
|
||||
<td><?php echo $v->info;?></td>
|
||||
<td><?php echo $v->JOL_Price;?></td>
|
||||
<td><?php echo $v->JOL_SubTime;?></td>
|
||||
<td><a target="_blank" href="order?order=<?php echo $v->JOL_JuheOrder;?>">详情</a></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:right;"><ul class="pagination"><?php echo $page_link;?></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,112 @@
|
||||
<div style="width:90%;margin:30px auto;">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">翰特订单号 <a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/train/index/ht_order_list');?>">订单列表>></a></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form style="width: 300px;float: left;" action="" method="post">
|
||||
<input type="text" name="ht_order" value="<?php echo isset($cols_id)?$cols_id:""; ?>">
|
||||
<button type="submit" id="sub" class="btn btn-warning btn-sm"><span class="glyphicon glyphicon-download-alt"></span> 获取信息</button>
|
||||
</form>
|
||||
<p style="margin: 0 0 10px; width: 200px; float: left; line-height: 30px;">外联:<span><?php if(!empty($wl)){echo $wl[0]->OPI_Name;}?></span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">火车订单信息</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php if(!empty($info)):?>
|
||||
<?php $num=1; foreach($info as $v):?>
|
||||
<table class="table table-bordered table-hover" style="text-align:center;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">序号</th>
|
||||
<th style="text-align:center;">车次</th>
|
||||
<th style="text-align:center;">座位</th>
|
||||
<th style="text-align:center;">出发城市</th>
|
||||
<th style="text-align:center;">抵达城市</th>
|
||||
<th style="text-align:center;">发车日期</th>
|
||||
<th style="text-align:center;">发车时间</th>
|
||||
<th style="text-align:center;">抵达时间</th>
|
||||
<th style="text-align:center;">票价</th>
|
||||
<th style="text-align:center;">是否提交过</th>
|
||||
<th style="text-align:center;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $num++;?></td>
|
||||
<td><?php echo $v->train[0]->FlightsNo;?></td>
|
||||
<td><?php echo $v->train[0]->Cabin;?></td>
|
||||
<td><?php echo $v->train[0]->DepartureCity;?></td>
|
||||
<td><?php echo $v->train[0]->ArrivalCity;?></td>
|
||||
<td><?php echo $v->train[0]->DepartureDate;?></td>
|
||||
<td><?php echo $v->train[0]->DepartureTime;?></td>
|
||||
<td><?php echo $v->train[0]->ArrivalTime;?></td>
|
||||
<td><?php echo $v->train[0]->adultcost;?></td>
|
||||
<td><?php echo !empty($v->status)?"<span style='color:red;'>是</span>":"否";?></td>
|
||||
<td><a class="pay_api" href="javascript:;" data-order="<?php echo $v->train[0]->FOI_COLD_SN;?>" >订票</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="11">
|
||||
<table class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">姓名</th>
|
||||
<th style="text-align:center;">护照</th>
|
||||
<th style="text-align:center;">年龄类型</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($v->people as $p): ?>
|
||||
<tr>
|
||||
<td><?php echo $p->BPE_FirstName." ".$p->BPE_MiddleName." ".$p->BPE_LastName;?></td>
|
||||
<td><?php echo $p->BPE_Passport;?></td>
|
||||
<td><?php echo $p->BPE_GuestType==1?"成人":($p->BPE_GuestType==2?"儿童":"婴儿");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr id="back_<?php echo $v->train[0]->FOI_COLD_SN;?>" style="display:none;">
|
||||
<td colspan="3">
|
||||
处理结果:<span style="color:red;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endforeach;endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var url="<?php echo site_url('apps/train/index/submit_juhe_order?').'order=';?>";
|
||||
var order_ul="<?php echo site_url('apps/train/index/order?').'order=';?>";//订单详情页面
|
||||
$(".pay_api").click(function(){
|
||||
// alert(url+$(this).attr("data-order"));
|
||||
var THIS=$(this);
|
||||
var order=$(this).attr("data-order");
|
||||
$.get(
|
||||
url+$(this).attr("data-order"),
|
||||
|
||||
function(data){
|
||||
// alert("#back_"+order);
|
||||
if(data.status==1){
|
||||
THIS.parent().html("<a href='"+order_ul+data.order+"' target='_blank'>详情</a>");
|
||||
}
|
||||
$("#back_"+order+" span").html(data.mes);
|
||||
$("#back_"+order).show();
|
||||
},
|
||||
'json'
|
||||
);
|
||||
|
||||
return false;
|
||||
});
|
||||
</script>
|
@ -0,0 +1,51 @@
|
||||
<div style="width:90%;margin:30px auto;">
|
||||
<div class="panel panel-primary" style="width:60%;margin:0 auto;">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?php echo $result["train_date"];?> <?php echo $result["checi"];?> <?php echo isset($result["ordernumber"])?$result["ordernumber"]:"";?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php if((int)$result["status"]>1):?>
|
||||
<p><?php echo $result["from_station_name"];?><span class="glyphicon glyphicon-arrow-right"></span><?php echo $result["to_station_name"];?></p>
|
||||
<?php foreach ($result["passengers"] as $v):?>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p><?php echo @$v["passengersename"]."({$v['piaotypename']}) {$v['zwname']} {$v['cxin']} 票价:¥{$v['price']}";?></p>
|
||||
<?php endforeach;?>
|
||||
<?php if((int)$result["status"]===2):?>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p>占座成功,请在:<?php echo date("Y-m-d H:i:s",strtotime($result["deal_time"])+30*60);?> 前付款,超时将失效</p>
|
||||
|
||||
<?php if((strtotime($result["deal_time"])+30*60)<time()):?>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p style="text-align:center;color:red;">订单已超时失效</p>
|
||||
<?php else:?>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p style="text-align:center;"><a href="cancel_order?order=<?php echo $result['orderid']?>" style="padding:5px 15px;" class="btn btn-warning btn-sm"><span class="glyphicon glyphicon-remove"></span>取消订单</a> <a href="pay?order=<?php echo $result['orderid']?>" style="padding:5px 15px;" class="btn btn-success btn-sm">¥支付</a></p>
|
||||
<?php endif;?>
|
||||
|
||||
<?php endif;?>
|
||||
<?php if((int)$result["status"]===4):?>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p>出票成功</p>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p style="text-align:center;"><a href="refund?order=<?php echo $result['orderid']?>" style="padding:5px 15px;" class="btn btn-warning btn-sm">前往退票 <span class="glyphicon glyphicon-forward"></span></a></p>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if((int)$result["status"]===6):?>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p>正在处理退票</p>
|
||||
<p style="text-align:center;"><a href="refund?order=<?php echo $result['orderid']?>" style="padding:5px 15px;" class="btn btn-warning btn-sm">查看详情 <span class="glyphicon glyphicon-forward"></span></a></p>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if((int)$result["status"]===7):?>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p><?php echo $result["msg"];?></p>
|
||||
<p style="text-align:center;"><a href="refund?order=<?php echo $result['orderid']?>" style="padding:5px 15px;" class="btn btn-warning btn-sm">查看详情 <span class="glyphicon glyphicon-forward"></span></a></p>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<p><?php echo $result["msg"];?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -0,0 +1,39 @@
|
||||
<div style="width:90%;margin:30px auto;">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">订单列表</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped" style="text-align:center;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">序号</th>
|
||||
<th style="text-align:center;">订单号</th>
|
||||
<th style="text-align:center;">车次</th>
|
||||
<th style="text-align:center;">出发</th>
|
||||
<th style="text-align:center;">到达</th>
|
||||
<th style="text-align:center;">状态</th>
|
||||
<th style="text-align:center;">金额</th>
|
||||
<th style="text-align:center;">提交时间</th>
|
||||
<th style="text-align:center;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $num=0; foreach($data as $v):?>
|
||||
<tr>
|
||||
<td><?php echo ++$num;?></td>
|
||||
<td><?php echo $v["order_num"];?></td>
|
||||
<td><?php echo $v["train_code"];?></td>
|
||||
<td><?php echo $v["from_station"];?></td>
|
||||
<td><?php echo $v["to_station"];?></td>
|
||||
<td><?php echo $v["info"];?></td>
|
||||
<td><?php echo $v["price"];?></td>
|
||||
<td><?php echo date("Y-m-d H:i:s",$v["sub_time"]);?></td>
|
||||
<td><a target="_blank" href="order?order=<?php echo $v['order_num']?>">详情</a></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,41 @@
|
||||
<div style="width:90%;margin:30px auto;">
|
||||
<div class="panel panel-primary" style="width:60%;margin:0 auto;">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?php echo $result["train_date"];?> <?php echo $result["checi"];?> <?php echo isset($result["ordernumber"])?$result["ordernumber"]:"";?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php if((int)$result["status"]>1):?>
|
||||
<p><?php echo $result["from_station_name"];?><span class="glyphicon glyphicon-arrow-right"></span><?php echo $result["to_station_name"];?></p>
|
||||
<?php foreach ($result["passengers"] as $v):?>
|
||||
<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>
|
||||
<p><?php echo @$v["passengersename"]."({$v['piaotypename']}) {$v['zwname']} {$v['cxin']} 票价:¥{$v['price']}";?></p>
|
||||
<?php if(empty($v["refundTimeline"])){?>
|
||||
<p>
|
||||
<a href="refund_do?order=<?php echo $result['orderid']?>&name=<?php echo $v['passengersename']?>&passportseno=<?php echo $v['passportseno']?>&passporttypeseid=<?php echo $v['passporttypeseid']?>&ticket_no=<?php echo $v['ticket_no']?>" style="padding:5px 15px;" class="btn btn-warning btn-sm"><span class="glyphicon glyphicon-remove"></span>退票
|
||||
</a>
|
||||
</p>
|
||||
<?php }else{?>
|
||||
<p>
|
||||
<table class="table table-bordered table-hover" style="text-align:center;">
|
||||
<tr>
|
||||
<th colspan="2" style="text-align:center;">退票处理</th>
|
||||
</tr>
|
||||
<?php foreach ($v["refundTimeline"] as $v_refund) {?>
|
||||
<tr>
|
||||
<td><?php echo $v_refund["time"]?></td>
|
||||
<td><?php echo $v_refund["msg"]?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</p>
|
||||
<?php }?>
|
||||
<?php endforeach;?>
|
||||
|
||||
<?php else:?>
|
||||
<p><?php echo $result["msg"];?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -0,0 +1,62 @@
|
||||
<div>
|
||||
<div>火车票查询</div>
|
||||
<div>
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;" id="">出发地:</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="from" class="form-control" placeholder="如:桂林">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;">目的地:</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="to" class="form-control" placeholder="如:桂林北">
|
||||
</div>
|
||||
<label for="inputEmail3" class="col-sm-2 control-label" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;">时间:</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="date" class="form-control" placeholder="2016-09-05">
|
||||
</div>
|
||||
<button id="sub" type="button" class="btn btn-primary btn-sm">查询</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-responsive" style="text-align: center;">
|
||||
<table class="table table-bordered" id="back_table" style="">
|
||||
|
||||
|
||||
</table>
|
||||
<img id="loading" src="/bootstrap/img/loading.gif" style="display:none;margin:0 auto;" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var url='<?php echo site_url()."/apps/train/index/search";?>';
|
||||
|
||||
$("#sub").click(function(){
|
||||
$("#loading").css("display","block");alert();
|
||||
// $("#back_table").css("display","none");
|
||||
$("#back_table").hide();
|
||||
var from=$("#from").val();
|
||||
var to=$("#to").val();
|
||||
var date=$("#date").val();
|
||||
$.post(url,
|
||||
{
|
||||
'from':from,
|
||||
'to':to,
|
||||
'date':date,
|
||||
},
|
||||
function(data){
|
||||
$("#loading").css("display","none");
|
||||
if(data.status===1){
|
||||
// $("#back_table").css("display","block");
|
||||
$("#back_table").show();
|
||||
$("#back_table").html(data.backdata);
|
||||
|
||||
}else{
|
||||
alert(data.mes);
|
||||
}
|
||||
|
||||
},
|
||||
'json');
|
||||
});
|
||||
|
||||
</script>
|
@ -0,0 +1,3 @@
|
||||
移植注意事项:
|
||||
1、需要设置消息推送
|
||||
2、添加相应的数据表
|
Loading…
Reference in New Issue