diff --git a/application/config/config.php b/application/config/config.php index 897a4e5e..2c1ee505 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -436,7 +436,7 @@ $config['cache']['ru']['cache_path'] = 'D:\wwwcache-intl\chinahighlights.ru'; $config['cache']['it']['cache_path'] = 'D:\wwwcache-intl\viaggio-in-cina.it'; $config['cache']['gh_jp']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.jp'; -$config['cache']['gh_gm']['cache_path'] = 'D:\wwwcache-gm\globalhighlights.de'; +$config['cache']['gh_gm']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.de'; $config['cache']['gh_vc']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.fr'; $config['cache']['gh_vac']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.es'; $config['cache']['gh_ru']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.ru'; diff --git a/application/controllers/information.php b/application/controllers/information.php index d0292232..816def97 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1104,6 +1104,11 @@ class Information extends CI_Controller //本地 278035929 //网前 278008224 if ($information->is_parent_id == "278008224") { + $template = str_replace( + '', + '', + $template + ); if (!empty ($meta_product_code)) { //准备需要的数据 $dataTrippest = []; @@ -1135,64 +1140,67 @@ class Information extends CI_Controller // 132003 西安目的地 // 132004 桂林目的地 // 132005 成都目的地 - $PAG_SourceType = $dataTrippest['PagDetail']->PAG_SourceType; - switch ($PAG_SourceType) { - case '132001': - $dataTrippest['PAG_SourceType'] = "beijing"; - break; - case '132002': - $dataTrippest['PAG_SourceType'] = "shanghai"; - break; - case '132003': - $dataTrippest['PAG_SourceType'] = "xian"; - break; - case '132004': - $dataTrippest['PAG_SourceType'] = "guilin"; - break; - case '132005': - $dataTrippest['PAG_SourceType'] = "chengdu"; - break; - case '132006': - $dataTrippest['PAG_SourceType'] = "zhangjiajie"; - break; - case '132007': - $dataTrippest['PAG_SourceType'] = "huangshan"; - break; - default: - $dataTrippest['PAG_SourceType'] = ""; - break; - } - - //每周发团 - $PAG_Scheme = $dataTrippest['PagDetail']->PAG_Scheme; - $dataTrippest['PAG_Scheme'] = $PAG_Scheme; - //接送 - if ($dataTrippest["t_Type"] == "transfer" || 1 == 1) { - $PagList = $this->trippest_model->GetTransfer($dataTrippest['PagDetail']->PAG_SN); - $dataTrippest["PagList"] = $PagList; - } + if (isset($dataTrippest['PagDetail']) && $dataTrippest['PagDetail']!=null ) { + $PAG_SourceType = $dataTrippest['PagDetail']->PAG_SourceType; + switch ($PAG_SourceType) { + case '132001': + $dataTrippest['PAG_SourceType'] = "beijing"; + break; + case '132002': + $dataTrippest['PAG_SourceType'] = "shanghai"; + break; + case '132003': + $dataTrippest['PAG_SourceType'] = "xian"; + break; + case '132004': + $dataTrippest['PAG_SourceType'] = "guilin"; + break; + case '132005': + $dataTrippest['PAG_SourceType'] = "chengdu"; + break; + case '132006': + $dataTrippest['PAG_SourceType'] = "zhangjiajie"; + break; + case '132007': + $dataTrippest['PAG_SourceType'] = "huangshan"; + break; + default: + $dataTrippest['PAG_SourceType'] = ""; + break; + } + + + //每周发团 + $PAG_Scheme = $dataTrippest['PagDetail']->PAG_Scheme; + $dataTrippest['PAG_Scheme'] = $PAG_Scheme; + //接送 + if ($dataTrippest["t_Type"] == "transfer" || 1 == 1) { + $PagList = $this->trippest_model->GetTransfer($dataTrippest['PagDetail']->PAG_SN); + $dataTrippest["PagList"] = $PagList; + } - //价格 - // $price = $this->trippest_model->get_price("BJALC-1",2); - $price = $this->trippest_model->get_price($dataTrippest['PagDetail']->PAG_Code, 2); - $showPrice = ""; - if (!empty ($price)) { - $PKP_AdultNetPrice = $price->PKP_AdultNetPrice; - $PKP_AdultSpecialPrice = $price->PKP_AdultSpecialPrice; - if ($PKP_AdultSpecialPrice > 0) { - $showPrice = $PKP_AdultSpecialPrice; - } else { - $showPrice = $PKP_AdultNetPrice; + //价格 + // $price = $this->trippest_model->get_price("BJALC-1",2); + $price = $this->trippest_model->get_price($dataTrippest['PagDetail']->PAG_Code, 2); + $showPrice = ""; + if (!empty ($price)) { + $PKP_AdultNetPrice = $price->PKP_AdultNetPrice; + $PKP_AdultSpecialPrice = $price->PKP_AdultSpecialPrice; + if ($PKP_AdultSpecialPrice > 0) { + $showPrice = $PKP_AdultSpecialPrice; + } else { + $showPrice = $PKP_AdultNetPrice; + } } - } - $dataTrippest["showPrice"] = $showPrice; + $dataTrippest["showPrice"] = $showPrice; - //替换内容 - $trippest_detail_template = $this->load->view($template_path . '-daytours-detail', $dataTrippest, true); + //替换内容 + $trippest_detail_template = $this->load->view($template_path . '-daytours-detail', $dataTrippest, true); - // print_r($trippest_detail_template); - // die(); - $information->ic_content = str_replace('', $trippest_detail_template, $information->ic_content); + // print_r($trippest_detail_template); + // die(); + $information->ic_content = str_replace('', $trippest_detail_template, $information->ic_content); + } } } @@ -2453,7 +2461,19 @@ class Information extends CI_Controller $meta_ct_page_trainform = get_meta($information->ic_id, 'meta_ct_page_trainform'); //是否插入火车票搜索框 $template_TrainDetailSearch = ""; if ($meta_ct_page_trainform == "yes" || $information->is_parent_id == "278014609") { - $template_TrainDetailSearch = $this->load->view($template_path . '-train-detail', null, true); + $meta_train_city = get_meta($information->ic_id, 'meta_train_city'); //默认的出发及目的地城市 , beijing|shanghai + $data_TrainCity = array(); + $data_TrainCity["from"] = ""; + $data_TrainCity["to"] = ""; + if (!empty ($meta_train_city)) { + if (strpos($meta_train_city, '|') !== false) { + $arrTrainCity = explode('|', $meta_train_city); + $data_TrainCity["from"] = $arrTrainCity[0]; + $data_TrainCity["to"] = $arrTrainCity[1]; + + } + } + $template_TrainDetailSearch = $this->load->view($template_path . '-train-detail', $data_TrainCity, true); } /* 详细内容 */ @@ -2477,8 +2497,14 @@ class Information extends CI_Controller // },$ic_content); #enregion - /** 替换H1加面包屑,加作者 */ - $ic_content = preg_replace('/

(.*)<\/h1>/i', $crumb . "\r\n" . '

$1

' . "\r\n" . $str_author . $template_TrainDetailSearch . "\r\n", $ic_content, 1); + /** 替换H1加面包屑,加作者. 2024-4-26不在H1放火车搜索框,改为替换标签 */ + //$ic_content = preg_replace('/

(.*)<\/h1>/i', $crumb . "\r\n" . '

$1

' . "\r\n" . $str_author . $template_TrainDetailSearch . "\r\n", $ic_content, 1); + $ic_content = preg_replace('/

(.*)<\/h1>/i', $crumb . "\r\n" . '

$1

' . "\r\n" . $str_author . "\r\n", $ic_content, 1); + + /**替换火车标签 */ + if (strpos($ic_content, '') !== false) { + $ic_content = str_replace('', $template_TrainDetailSearch, $ic_content); + } /**替换zodiac标签 */ if (strpos($ic_content, '') !== false) { @@ -2968,7 +2994,7 @@ class Information extends CI_Controller } //获取cli_sn - $tourdata = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/api/getCliSn/?param=" . $productCode)); + $tourdata = json_decode(GET_HTTP($apiurl . "/thirdparty/ctmobilefirst/apish/getCliSn/?param=" . $productCode)); $data["clisn"] = $tourdata->clisn; //调取模板 diff --git a/application/third_party/recommend/views/templates.php b/application/third_party/recommend/views/templates.php index 7c569e29..29a1bb66 100644 --- a/application/third_party/recommend/views/templates.php +++ b/application/third_party/recommend/views/templates.php @@ -1,5 +1,7 @@ +

请修改图片尺寸/ 改完请删除此标题 !!!

+

文中tour广告代码:

11-Day Classic Japan Tour @@ -22,4 +24,33 @@
View More
- \ No newline at end of file + + +

AH GH 线路卡片 代码:

+
+ 8-Day Diwali Festival in India Golden Triangle Tour 2024 +
+

8-Day Diwali Festival in India Golden Triangle Tour 2024

+ +
Discover Colorful India during the Diwali Festival
+ +
+
Private tour from: US$1,719
+View More
+
+
+ +

CH 线路卡片 代码:

+
+
China family travelFamily Happiness
+ +
11-Day Beijing - Xi'an - Guilin - Shanghai Family Tour + + + + +
+
\ No newline at end of file diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php index 7d23b3bc..3008feca 100644 --- a/application/third_party/trainsystem/controllers/addorders.php +++ b/application/third_party/trainsystem/controllers/addorders.php @@ -173,6 +173,13 @@ class addorders extends CI_Controller{ //筛选出能自动出票的订单 $auto_pool = $this->BIZ_train_model->auto_check_ticket_2(); + + // $DepartureDate = strtotime(date('Y-m-d',strtotime("2024-5-9"))); //只取日期部分 + // $now = strtotime(date('Y-m-d')); + // $depart_diff = ($DepartureDate - $now) / 86400; + // $saletime = strtotime("17:00"); + // $sale_diff = (time() - $saletime) / 3600; + //创建一个不允许自动出票的国际火车票数组 $nation_train = array('K19', 'K23', 'Z8701', 'Z8702', 'Z97', 'Z98', 'Z99', 'Z100', 'K9795','D87'); @@ -237,33 +244,57 @@ class addorders extends CI_Controller{ $now = strtotime(date('Y-m-d')); $depart_diff = ($DepartureDate - $now) / 86400; - //如果刚好是第15天的订单 - if($depart_diff==15 && 1==2){ + //如果刚好是第15天的订单(12306的15天预售是算当天的,所以时间差是14天) + if($depart_diff==14){ //$this->isauto = 1; - $time = strtotime(time()); - $autolasttime = $item->ts_autolasttime; - if(($timestamp = strtotime($autolasttime)) !== false) { - $time_diff = ($time - strtotime($autolasttime)) / 3600; - if ($time_diff < 1){ - $auto_flag = 0; - $back_message .= '-预售期每小时只能提交一次'; - } + $time_obj = $this->BIZ_train_model->get_saletime($train_info->DepartAirport_cn); + //print_r($time_obj); + if(!empty($time_obj)){ + $saletime = strtotime($time_obj->TST_saletime); + }else{ + $saletime = strtotime("12:00"); //如果没有设置预售时间,默认8点 } - }else{ //不是预售期的,只能3次抢票 - if ($item->ts_autotimes > 3){ + //echo $saletime; + $sale_diff = (time() - $saletime) / 3600; + if($sale_diff > 1){ $auto_flag = 0; - $back_message .= '-抢票次数已到3次'; - } + $back_message .= '-超过抢票时间'; + }else if($sale_diff <0){ + $auto_flag = 0; + $back_message .= '-未到抢票时间'; + } + + //$time = strtotime(time()); + // $autolasttime = $item->ts_autolasttime; + // if(($timestamp = strtotime($autolasttime)) !== false) { + // $time_diff = ($time - strtotime($autolasttime)) / 3600; + // if ($time_diff < 1){ + // $auto_flag = 0; + // $back_message .= '-预售期每小时只能提交一次'; + // } + // } + } + + + //只能3次抢票 + if ($item->ts_autotimes > 3){ + $auto_flag = 0; + $back_message .= '-抢票次数已到3次'; } + if($auto_flag == 0){ $string .= '汉特订单号:'.$coli_id.'('.$cold_sn.')'.$back_message.''; + if($depart_diff==14){ - log_message('error','自动出票错误信息:'.''.$string.'
'); + }else{ + log_message('error','自动出票错误信息:'.''.$string.'
'); + } + }else{ //单个订单提交 echo $cold_sn.'
'; - $this->booktickets($cold_sn,$bpe_sn,'','ctrip'); + $this->booktickets($cold_sn,$bpe_sn,'','ctrip'); //调用出票 //$string .= '汉特订单号:'.$coli_id.'('.$cold_sn.')可以自动出票'; } } diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php index 032ae2a4..00970446 100644 --- a/application/third_party/trainsystem/models/BIZ_train_model.php +++ b/application/third_party/trainsystem/models/BIZ_train_model.php @@ -328,9 +328,9 @@ class BIZ_train_model extends CI_Model { } - //获取能够自动出票的订单列表2.0版本 20240130 zp + //获取能够自动出票的订单列表2.0版本 20240130 zp (coli_state 11 我的订单 8 已收款 63 出票中 13 新订单(已支付)) function auto_check_ticket_2(){ - $sql = "SELECT distinct top 2 COLD_SN ,coli_id,COLD_SPFS,COLI_State,(SELECT TOP 1 GAI_Type FROM BIZ_GroupAccountInfo WHERE GAI_COLI_SN=bcli.COLI_SN AND ISNULL(DeleteFlag,0)=0) as GAI_Type + $sql = "SELECT distinct top 10 COLD_SN ,coli_id,COLD_SPFS,COLI_State,(SELECT TOP 1 GAI_Type FROM BIZ_GroupAccountInfo WHERE GAI_COLI_SN=bcli.COLI_SN AND ISNULL(DeleteFlag,0)=0) as GAI_Type ,cold_startdate ,isnull((select top 1 ts_autotimes from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc),0) as ts_autotimes ,(select top 1 ts_autolasttime from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc) as ts_autolasttime @@ -353,6 +353,8 @@ class BIZ_train_model extends CI_Model { where (ts_status='4' or ts_status='3' or ts_status='10') and ts_cold_sn = COLD_SN) )) AND COLD_SN NOT IN ( select FOI_COLD_SN from BIZ_FlightsOrderInfo where FOI_COLD_SN=COLD_SN and FOI_TrainNetOrderNo>'') and (COLD_StartDate between GETDATE() and CONVERT(varchar(100),GETDATE()+14,23)+' 23:59') + and isnull((select top 1 ts_autotimes from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc),0)<4 + order by COLD_StartDate "; $query = $this->HT->query($sql); return $query->result(); diff --git a/application/third_party/trainsystem/views/presale_add.php b/application/third_party/trainsystem/views/presale_add.php new file mode 100644 index 00000000..df41ad7e --- /dev/null +++ b/application/third_party/trainsystem/views/presale_add.php @@ -0,0 +1,30 @@ +
+
+
+

预售时间添加(车站名是中文名)

+
+
+
+ + + + + + + + + + + + + + + + +
车站名
预售时间(例:8:00 ,18:30)
车站编码
+ +
+
+
+
+
\ No newline at end of file diff --git a/application/third_party/trainsystem/views/presale_edit.php b/application/third_party/trainsystem/views/presale_edit.php new file mode 100644 index 00000000..a3fafd22 --- /dev/null +++ b/application/third_party/trainsystem/views/presale_edit.php @@ -0,0 +1,31 @@ +
+
+
+

预售时间修改(车站名尽量不要修改)

+
+
+
+ + + + + + + + + + + + + + + + +
车站名
预售时间
车站编码
+ + +
+
+
+
+
\ No newline at end of file diff --git a/application/third_party/trainsystem/views/presale_list.php b/application/third_party/trainsystem/views/presale_list.php new file mode 100644 index 00000000..ac7bace0 --- /dev/null +++ b/application/third_party/trainsystem/views/presale_list.php @@ -0,0 +1,54 @@ +
+
+
+

预售时间搜索

+
+
+
+
+
+ " autocomplete="off"> +
+
+ +   新增站点 +
+
+
+
+
+
+
+

预售时间列表

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
序号ID车站预售时间车站编码更新时间操作
TST_id;?>TST_station_cn;?>TST_saletime;?>TST_station_code;?>TST_updatetime;?>修改
+
+
+
+
\ No newline at end of file diff --git a/application/views/cache/update.php b/application/views/cache/update.php index 522d7325..617012fe 100644 --- a/application/views/cache/update.php +++ b/application/views/cache/update.php @@ -193,14 +193,18 @@ + $it) { // $encode = mb_detect_encoding($it, array('ASCII', 'GBK', 'ISO-8859-1', 'UTF-8')); // $_it = mb_convert_encoding($it, 'UTF8', $encode); $_it = preg_replace('/#(.*)$/i', '', $it); + if (strlen($it) != strlen($_it)) + continue; + $c++; ?> - + 100) { ?> diff --git a/application/views/mobile_first/ah-new-year-countdown.php b/application/views/mobile_first/ah-new-year-countdown.php index dee0cc97..0c9817c6 100644 --- a/application/views/mobile_first/ah-new-year-countdown.php +++ b/application/views/mobile_first/ah-new-year-countdown.php @@ -12,9 +12,9 @@
- -
@@ -24,8 +24,10 @@