diff --git a/application/controllers/information.php b/application/controllers/information.php index d4cd7dd1..3df77f35 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -22,7 +22,7 @@ class Information extends CI_Controller { $this->load->model('InfoSMS_model'); if (is_series_site()) { - $this->load->model('InfoTags_model'); + //$this->load->model('InfoTags_model'); } $this->load->library('Accesscheck'); @@ -271,10 +271,10 @@ class Information extends CI_Controller { $data['all_tags'] = array(); if (is_series_site()) { //信息标签 - $this->InfoTags_model->ic_id = null; - $data['all_tags'] = $this->InfoTags_model->list_tag(); - $this->InfoTags_model->ic_id = $data['information']->ic_id; - $data['my_tags'] = $this->InfoTags_model->list_tag(); + //$this->InfoTags_model->ic_id = null; + //$data['all_tags'] = $this->InfoTags_model->list_tag(); + //$this->InfoTags_model->ic_id = $data['information']->ic_id; + //$data['my_tags'] = $this->InfoTags_model->list_tag(); //差集 foreach ($data['all_tags'] as &$it) { diff --git a/application/controllers/payment.php b/application/controllers/payment.php index 82a594ed..cdced964 100644 --- a/application/controllers/payment.php +++ b/application/controllers/payment.php @@ -16,8 +16,7 @@ class Payment extends CI_Controller { $data=array(); if ($this->input->post('price')) { - $data['payurl']=' - Order_model->add_customer_info($gender[$key], $nationality[$key], $MEI_FirstName, $MEI_LastName, $passport[$key], $expiration_date_tmp, $birthday_tmp, $MEI_Memo, $MEI_Street, '', $contact_phone, 0, $COLI_SN, $visitor_link); + $MEI_SN = $this->Order_model->add_customer_info($gender[$key], $nationality[$key], $MEI_FirstName, $MEI_LastName, $passport[$key], $expiration_date_tmp, $birthday_tmp, $MEI_Memo, $MEI_Street, '', $contact_phone, 0, $COLI_SN, $visitor_link,$MEI_ArrivalFlightNo,$MEI_ArrivalTime,$MEI_DepartureFlightNo,$MEI_DepartureTime); } } diff --git a/application/third_party/order/views/confirm_order.php b/application/third_party/order/views/confirm_order.php index fc30948a..9278f57a 100644 --- a/application/third_party/order/views/confirm_order.php +++ b/application/third_party/order/views/confirm_order.php @@ -730,6 +730,8 @@ }); + $("#btn-add-personinfo-box").click(); + //日期初始化 $('.f_datepicker').datetimepicker({ diff --git a/application/third_party/order/views/gm/confirm_order.php b/application/third_party/order/views/gm/confirm_order.php new file mode 100644 index 00000000..17c7c123 --- /dev/null +++ b/application/third_party/order/views/gm/confirm_order.php @@ -0,0 +1,533 @@ + + + + + + + China Reisen und China Rundreisen individuell | Chinarundreisen.com + + + + + + + + + + + + + + +
+ +
+ +
+
+
+ +
+

Vielen Dank für die Buchung bei Chinarundreisen!

+

Bitte füllen Sie das folgende Formular aus und schicken es zurück.

+
+
+
+
+
+ +
+

Kunden informationen

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+ + +
+
+
+
+
+ +
+
/
+
+ +
+
+
+
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + + +
+
+ +
+ +
+ + Mitreisende hinzufügen + +
+
+ +
+
+ + Kontakttelefon: + +
+
+ +
+
+ +
+
+
+
+ COLI_CustomerType!=44003){ ?> +
+
+ + Anschrift: + + + +
+
+ + +
+
+
+ +
+
+
+ +
+

Fluginformationen

+
+ +
+
+ + +
+ +
+ +
+ +
+
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+
+
+ +
+

+ Besondere Anforderungen +

+
+ +
+
+
+ +
+
+
+
+ +
+
+
+ COLI_CustomerType!=44003){ ?> +
+
+
+ +
+

+ Kontaktinformationen für Notfälle + (im Falle eines Notfalls während Ihrer Chinareise) +

+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+
+ + +
+ + + + + +
+ +
+
Danke! Mit besten Grüßen, OPI_FirstName; ?>
+
+ +
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/application/third_party/order/views/gm/link_tips.php b/application/third_party/order/views/gm/link_tips.php new file mode 100644 index 00000000..ba6b04e5 --- /dev/null +++ b/application/third_party/order/views/gm/link_tips.php @@ -0,0 +1,73 @@ + + + + + + + + China Reisen und China Rundreisen individuell | Chinarundreisen.com + + + + + + + + + + + +
+ +
+ +
+ +
+ + + \ No newline at end of file diff --git a/application/third_party/train/controllers/search.php b/application/third_party/train/controllers/search.php index 7ac5f7b0..a7feea75 100644 --- a/application/third_party/train/controllers/search.php +++ b/application/third_party/train/controllers/search.php @@ -85,32 +85,27 @@ class search extends CI_Controller{ $this->BIZ_train_model->addOrUpdate($fromStation,$toStation,$search_return); $operate_data = $search_return; }else{ - if($this->seveth == 'yes'){ - $cache_train_info = $this->BIZ_train_model->get_train_info($fromStation,$toStation); - if(empty($cache_train_info)){ - log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|缓存为空'); + $cache_train_info = $this->BIZ_train_model->get_train_info($fromStation,$toStation); + if(empty($cache_train_info)){ + log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|缓存为空'); + $operate_data = NULL; + }else{ + $cache_time = $cache_train_info->tpc_datetime; + $now_time = time(); + $differ_time = ($now_time - strtotime($cache_time)) / 86400; + if($differ_time >= 3){ + $this->BIZ_train_model->delete_traincache($fromStation,$toStation); + log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|缓存超时,已经删除'); $operate_data = NULL; }else{ - $cache_time = $cache_train_info->tpc_datetime; - $now_time = time(); - $differ_time = ($now_time - strtotime($cache_time)) / 86400; - if($differ_time >= 3){ - $this->BIZ_train_model->delete_traincache($fromStation,$toStation); - log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|缓存超时,已经删除'); - $operate_data = NULL; - }else{ - $this->cache = 'yes'; - $operate_data = $cache_train_info->tpc_content; - log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|调用缓存号:'.$cache_train_info->tpc_sn.'|缓存生成的时间:'.$cache_train_info->tpc_datetime); - } - } - }else{ - $operate_data = NULL; + $this->cache = 'yes'; + $operate_data = $cache_train_info->tpc_content; + log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|调用缓存号:'.$cache_train_info->tpc_sn.'|缓存生成的时间:'.$cache_train_info->tpc_datetime); + } } } return $operate_data; } - //字符串拼接模块 function createTrainJson($returnjson){ $return_data = new stdClass(); @@ -200,7 +195,7 @@ class search extends CI_Controller{ $pricestr = $seat_type.'"train_no":'.'"'.$value->train_no.'"'; //余票字符串 $this->can_buy_now = $value->can_buy_now; - $return_data->data->result[$i] = '|预定|'.$value->train_no.'|'.$value->train_code.'|'.$value->from_station_name.'|'.$value->to_station_name.'|'.$value->from_station_code.'|'.$value->to_station_code.'|'.$value->start_time.'|'.$value->arrive_time.'|'.$value->run_time.'|'.$value->can_buy_now.'||'.$value->train_start_date.'||||||||'.$this->ticket_exchange($value->gjrw_num).'|'.$this->ticket_exchange($value->qtxb_num).'|'.$this->ticket_exchange($value->rw_num).'|'.$this->ticket_exchange($value->rz_num).'|'.$this->ticket_exchange($value->tdz_num).'|'.$this->ticket_exchange($value->wz_num).'||'.$this->ticket_exchange($value->yw_num).'|'.$this->ticket_exchange($value->yz_num).'|'.$this->ticket_exchange($value->edz_num).'|'.$this->ticket_exchange($value->ydz_num).'|'.$this->ticket_exchange($value->swz_num).'|'.$this->ticket_exchange($value->dw_num).'||'; + $return_data->data->result[$i] = '|预定|'.$value->train_no.'|'.$value->train_code.'|'.$value->from_station_name.'|'.$value->to_station_name.'|'.$value->from_station_code.'|'.$value->to_station_code.'|'.$value->start_time.'|'.$value->arrive_time.'|'.$value->run_time.'|'.$value->can_buy_now.'||'.$value->train_start_date.'||||||||'.$this->ticket_exchange($value->gjrw_price,$value->gjrw_num).'|'.$this->ticket_exchange($value->qtxb_price,$value->qtxb_num).'|'.$this->ticket_exchange($value->rw_price,$value->rw_num).'|'.$this->ticket_exchange($value->rz_price,$value->rz_num).'|'.$this->ticket_exchange($value->tdz_price,$value->tdz_num).'|'.$this->ticket_exchange($value->wz_price,$value->wz_num).'||'.$this->ticket_exchange($value->yw_price,$value->yw_num).'|'.$this->ticket_exchange($value->yz_price,$value->yz_num).'|'.$this->ticket_exchange($value->edz_price,$value->edz_num).'|'.$this->ticket_exchange($value->ydz_price,$value->ydz_num).'|'.$this->ticket_exchange($value->swz_price,$value->swz_num).'|'.$this->ticket_exchange($value->dw_price,$value->dw_num).'||'; $data = '{"validateMessagesShowId":"_validatorMessage","status":true,"httpstatus":200,"data":{'.$pricestr.'},"messages":[],"validateMessages":{}}'; $return_data->data->price[$i] = $data; $i++; @@ -219,20 +214,13 @@ class search extends CI_Controller{ header('Access-Control-Max-Age:0'); header('Access-Control-Allow-Headers:x-requested-with, Content-Type'); header('Access-Control-Allow-Credentials:true'); - - $json = file_get_contents('php://input'); - - if(empty($json)){ - header("HTTP/1.1 404 Not Found"); - exit('{"status":"404","reason":"出发站或到达站为空"}'); - } - - $trainFrom = json_decode($json)->trainFrom; - $trainTo = json_decode($json)->trainTo; - $trainDate = json_decode($json)->trainDate; + $trainFrom = $this->input->get_post('trainFrom'); + $trainTo = $this->input->get_post('trainTo'); + $trainDate = $this->input->get_post('trainDate'); if(empty($trainFrom) || empty($trainTo)){ + header("HTTP/1.1 404 Not Found"); exit('{"status":"201","reason":"车站查询失败","data":""}'); } @@ -241,19 +229,27 @@ class search extends CI_Controller{ $trainToCode = $this->BIZ_intel_train_model->get_code_by_name($trainTo); if(empty($trainFromCode) || empty($trainToCode)){ + header("HTTP/1.1 404 Not Found"); exit('{"status":"202","reason":"站点名转换失败","data":""}'); } //获取车次信息 $obj = $this->BIZ_intel_train_model->get_train_info($trainFromCode->s_code,$trainToCode->s_code); - $enobj = array(); - //如果结果为空则直接返回为空的结果 if(empty($obj)){ + header("HTTP/1.1 404 Not Found"); exit('{"status":"203","reason":"无车次信息!","data":""}'); } + //处理返回的字符串 + $return_json = new StdClass(); + $return_json->status = '200'; + $return_json->reason = '成功的返回'; + $return_json->rate = $this->GetCurrencyRate(); + $return_json->data = array(); + $return_json->endata = array(); + //如果有结果则进行字符串处理 foreach($obj as $key=>$item){ //发车规则处理 @@ -270,7 +266,6 @@ class search extends CI_Controller{ } } - //价格处理 $item->adult_seat = array(); $item->child_seat = array(); @@ -286,6 +281,7 @@ class search extends CI_Controller{ $item->adult_seat[$i]['name'] = $seat_name; $item->adult_seat[$i]['code'] = $key_adult; $item->adult_seat[$i]['price'] = $value; + $item->adult_seat[$i]['pic'] = $this->BIZ_intel_train_model->get_seatname($key_adult)->Seat_Pic; $i++; } } @@ -301,21 +297,16 @@ class search extends CI_Controller{ } } + //最后进行当前日期判断,对数据进行分组 $flag = $this->checkDateRule($trainDate,$item->DateRule); if(!$flag){ //将不符合发车日期的列车放入到另外一个数组中存储起来 - array_push($enobj,$obj[$key]); - unset($obj[$key]); + array_push($return_json->endata,$obj[$key]); + }else{ + array_push($return_json->data,$obj[$key]); } - } - //处理返回的字符串 - $return_json = new StdClass(); - $return_json->status = '200'; - $return_json->reason = '成功的返回'; - $return_json->data = $obj; - $return_json->endata = $enobj; print_r(json_encode($return_json)); } @@ -356,10 +347,51 @@ class search extends CI_Controller{ //获取所有的列车信息 public function get_all_inteltrain(){ + header('Access-Control-Allow-Origin:*'); + header('Access-Control-Allow-Methods:POST, GET'); + header('Access-Control-Max-Age:0'); + header('Access-Control-Allow-Headers:x-requested-with, Content-Type'); + header('Access-Control-Allow-Credentials:true'); + $obj = $this->BIZ_intel_train_model->get_allinteltrain(); + print_r(json_encode($obj)); } + //获取国际火车出发规则 + public function get_station_rules(){ + header('Access-Control-Allow-Origin:*'); + header('Access-Control-Allow-Methods:POST, GET'); + header('Access-Control-Max-Age:0'); + header('Access-Control-Allow-Headers:x-requested-with, Content-Type'); + header('Access-Control-Allow-Credentials:true'); + + //获取所有站点的列表 + $return_json = array(); + $return_json['TrainList'] = array(); + $all_stations = $this->BIZ_intel_train_model->get_allstations(); + $i = 0; + foreach($all_stations as $item){ + $rule_arr = $this->BIZ_intel_train_model->get_train_rules($item->station_id); + if(!empty($rule_arr)){ + $return_json['TrainList'][$i]['FromStation'] = $item->s_ename.','.$item->s_country; + $return_json['TrainList'][$i]['ToStations'] = array(); + + $j = 0; + foreach($rule_arr as $rule_info){ + $return_json['TrainList'][$i]['ToStations'][$j]['Message'] = $rule_info->tsi_Message; + $return_json['TrainList'][$i]['ToStations'][$j]['Station'] = $rule_info->S_ename.','.$item->s_country; + $j++; + } + + $i++; + } + } + //print_r($return_json); + header('Content-type: application/json'); + print_r(json_encode($return_json)); + } + //获取价格(废弃) /* fromStationCode:出发站三字码 @@ -380,10 +412,15 @@ class search extends CI_Controller{ } //余票转换 - function ticket_exchange($num){ + function ticket_exchange($price,$num){ //echo $this->can_buy_now; if($this->cache == 'yes' || $this->seveth == 'yes'){ - return '有'; + if(isset($price)){ + if($price > 0){ + return '有'; + } + } + return ''; }else{ if(is_numeric($num)){ if($num == 0){ @@ -577,6 +614,33 @@ class search extends CI_Controller{ curl_close($curl); //关闭CURL会话 return $tmpInfo; //返回数据 } + + function GetCurrencyRate() { + $this->HT = $this->load->database('HT', TRUE); + $sql = "SELECT CRI_BuyIn / 100.00 AS tmpExRate, \n" + . " CRI_Code \n" + . "FROM tourmanager.dbo.CurrencyRateInfo \n" + . "WHERE CRI_Code IN ('USD', 'EUR', 'RUB') \n" + . " AND GETDATE() BETWEEN CRI_Start AND CRI_Stop"; + $query = $this->HT->query($sql); + foreach ($query->result() as $item) { + switch ($item->CRI_Code) { + case 'USD': + $this->USD_Rate = $item->tmpExRate; + break; + case 'EUR': + $this->EUR_Rate = $item->tmpExRate; + break; + case 'RUB': + $this->RUB_Rate = $item->tmpExRate; + break; + } + } +// echo $this->USD_Rate . '
'; +// echo $this->EUR_Rate . '
'; +// echo $this->RUB_Rate . '
'; + return $this->USD_Rate; + } } diff --git a/application/third_party/train/models/BIZ_intel_train_model.php b/application/third_party/train/models/BIZ_intel_train_model.php index 0c193d8a..615287ee 100644 --- a/application/third_party/train/models/BIZ_intel_train_model.php +++ b/application/third_party/train/models/BIZ_intel_train_model.php @@ -56,7 +56,7 @@ class BIZ_intel_train_model extends CI_Model { } public function get_seatname($seat_code){ - $sql = "select Seat_EName1 from TrainSeat_Intel where Seat_code = '{$seat_code}'"; + $sql = "select Seat_EName1,Seat_Pic from TrainSeat_Intel where Seat_code = '{$seat_code}'"; $query = $this->HT->query($sql); return $query->row(); } @@ -112,4 +112,24 @@ class BIZ_intel_train_model extends CI_Model { return $query->result(); } + public function get_allstations(){ + $sql = "SELECT * FROM TrainStation_intel"; + $query = $this->HT->query($sql); + return $query->result(); + } + + public function get_train_rules($station_id){ + $sql = "SELECT + S_ename,s_country,tsi_Message + FROM + TrainSearch_intel + LEFT JOIN + TrainStation_intel + ON + tsi_ToStation = station_id + where + tsi_FromStation = '{$station_id}'"; + $query = $this->HT->query($sql); + return $query->result(); + } } diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index 367fafed..02b3f765 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -555,9 +555,10 @@ if ($information->ic_photo && $show_photo_meta !== 'no') { $amp_photo = $this->config->item('site_image_url').$information->ic_photo; } + $amp_build_url = "/amp_app/?icid=".$information->ic_id."&is_path=".$information->is_path."&usr=".urlencode($amp_user['OPI_Name'])."&url=".urlencode($information->ic_url)."&photo=".urlencode($amp_photo)."&site=".urlencode($this->config->item('site_url'))."&imgurl=".urlencode($this->config->item('site_image_url')); ?> - | + | ic_id, 'AMP_STATUS') === '1') {?> @@ -1279,8 +1280,14 @@ foreach ($author_list as $author_item) { if (editor.html() != '' && editor.text() == '') { alert('当前信息内容只包含空白标签,请在编辑器HTML界面把空白代码标签去掉再保存!'); return false; - } - ; + }; + //保存增加AMP判断 - lmr + ic_id, 'AMP_JSON') && get_meta($information->ic_id, 'AMP_STATUS')) {?> + var amp_confirm = window.confirm('\n检测到页面存在AMP版本,是否需要打开AMP编辑界面?\n\r注意:如果修改了PC端版本,那么同时也需要修改AMP版本。\n'); + if (amp_confirm) { + window.open('', '_blank'); + } + if (information_check() != false) { submitForm('form_information_edit'); }">保存修改