diff --git a/application/controllers/information.php b/application/controllers/information.php
index 86dc86a7..28ef32ca 100644
--- a/application/controllers/information.php
+++ b/application/controllers/information.php
@@ -735,6 +735,9 @@ class Information extends CI_Controller
} else if (strcasecmp($site_code, "trainspread") == 0 && !empty($auto_update_cache)) {
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
$this->make_www_cache_ts($information_new);
+ } else if (strcasecmp($site_code, "guilin") == 0 && !empty($auto_update_cache)) {
+ $information_new = $this->Information_model->Detail($this->input->post('is_id'));
+ $this->make_www_cache_gl($information_new);
} else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) {
$update_info_log = $this->update_cache($ic_url);
} else if (strcasecmp($site_code, "ah") == 0 && !empty($auto_update_cache)) {
@@ -3021,12 +3024,80 @@ class Information extends CI_Controller
$str_author = '
Written by ' . $OPI_FirstName . ' Updated ' . date("M. j, Y", strtotime($information->ic_datetime)) . '
';
}
+ //火车票详细页搜索框添加 -- zp
+ $meta_ct_page_trainform = get_meta($information->ic_id, 'meta_ct_page_trainform'); //是否插入火车票搜索框
+ $template_TrainDetailSearch = "";
+ if ($meta_ct_page_trainform == "yes" || strpos($information->ic_url,"/china-trains")!==false) {
+ $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-index', $data_TrainCity, true);
+ }
+
+
/* 详细内容 */
$ic_content = $information->ic_content;
/** 替换H1加面包屑,加作者 */
- $ic_content = preg_replace('/(.*)<\/h1>/i', $crumb . "\r\n" . '$1
' . "\r\n" . $str_author . "\r\n", $ic_content, 1);
+ $ic_content = preg_replace('/(.*)<\/h1>/i', $crumb . "\r\n" . '$1
' . "\r\n" . $str_author . $template_TrainDetailSearch . "\r\n", $ic_content, 1);
+
+ // 动态加载反馈标签,按城市出前三条。左侧
+ // HTLM:
,显示全部用
+ // 解析结果:; Shanghai,Beijing
+ $feedback_array = [];
+ preg_match_all('^^', $information->ic_content, $feedback_array);
+ if (!empty($feedback_array)) {
+ foreach ($feedback_array[0] as $index => $tag_name) {
+ $city_name_string = $feedback_array[1][$index];
+ $feedback_list = $this->Feedback_model->get_CT_feedback_by_cityname($city_name_string,30);
+ // 防止触发 Google 网络垃圾政策只返回前三条
+ $top3_feedback_list = array_slice($feedback_list, 0, 3);
+ $feedback_content = $this->load->view(
+ 'mobile_first/chinatravel-feedback-list',
+ array('feedback_list' => $top3_feedback_list),
+ true
+ );
+ $ic_content = str_replace(
+ $tag_name,
+ $feedback_content,
+ $ic_content
+ );
+ }
+ }
+
+ // 动态加载反馈标签,按城市出前三条。整页
+ // HTLM: ,显示全部用
+ // 解析结果:; Shanghai,Beijing
+ $feedback_array = [];
+ preg_match_all('^^', $information->ic_content, $feedback_array);
+ if (!empty($feedback_array)) {
+ foreach ($feedback_array[0] as $index => $tag_name) {
+ $city_name_string = $feedback_array[1][$index];
+ $feedback_list = $this->Feedback_model->get_CT_feedback_by_cityname($city_name_string,30);
+ // 防止触发 Google 网络垃圾政策只返回前三条
+ $top3_feedback_list = array_slice($feedback_list, 0, 3);
+ $feedback_content = $this->load->view(
+ 'mobile_first/chinatravel-feedback-cross',
+ array('feedback_list' => $top3_feedback_list),
+ true
+ );
+ $ic_content = str_replace(
+ $tag_name,
+ $feedback_content,
+ $ic_content
+ );
+ }
+ }
//图片加延迟
$ic_content = $this->html_optimize_lib->set_lazy_loader($ic_content, 'https://data.shanghaihighlights.com/image/grey.gif');
@@ -3248,7 +3319,7 @@ class Information extends CI_Controller
// 搜索框
$template_TrainSearch = "";
- if ($information->ic_url == "/china-trains/hometest" || $information->ic_url == "/china-trains") {
+ if ($information->ic_url == "/china-trains/hometest" || $information->ic_url == "/trains") {
//火车票首页
$template_TrainSearch = $this->load->view($template_path . '-train-index', null, true);
$ImgText = "";
@@ -4244,6 +4315,13 @@ class Information extends CI_Controller
#endregion
}
+ /**
+ * 桂林站 www.guilinchina.net
+ */
+ public function make_www_cache_gl($information){
+
+ }
+
//通过内容找到第一张图片
public function set_photo_content($ic_photo, $ic_content)
{
diff --git a/application/views/mobile_first/ah-gp-form.php b/application/views/mobile_first/ah-gp-form.php
index 9d1f274d..0fa161c1 100644
--- a/application/views/mobile_first/ah-gp-form.php
+++ b/application/views/mobile_first/ah-gp-form.php
@@ -70,7 +70,7 @@
-