diff --git a/application/controllers/information.php b/application/controllers/information.php index fa0db104..4def86fb 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1042,6 +1042,13 @@ class Information extends CI_Controller } } } + + $why_us_covid_list_pc = $this->load->view( + $template_path . '-why-us-covid-list-pc', array(), true); + $information->ic_content = str_replace('', $why_us_covid_list_pc, $information->ic_content); + $why_us_covid_list_mobile = $this->load->view( + $template_path . '-why-us-covid-mobile', array(), true); + $information->ic_content = str_replace('', $why_us_covid_list_mobile, $information->ic_content); if (is_file('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')) {//主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 @@ -1068,15 +1075,7 @@ class Information extends CI_Controller //设置内容图片缓加载 $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.chinahighlights.com/grey.gif'); $template = str_replace('', $lazy_content, $template); - - //替换内容中各种标签 - //$tag_why_us = $this->load->view($template_path . '-why-us', false, true); - // $template = str_replace('', $tag_why_us, $template); - - //Google广告代码 - //if (!empty(get_meta($information->ic_id, 'meta_google_ad_content'))) { - //$template = str_replace('', '', $template); - //} + //社媒分享图片 $full_ic_photo = ''; if (!empty($information->ic_photo)) { @@ -1223,6 +1222,39 @@ class Information extends CI_Controller true); $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); } + // why-us 相关的标签 + $why_us_mobile = $this->load->view($template_path . '-why-us-mobile', false, true); + $information->ic_content = str_replace('', $why_us_mobile, $information->ic_content); + + $why_us_tour_detail_pc = $this->load->view($template_path . '-why-us-tour-detail-pc', false, true); + $information->ic_content = str_replace('', $why_us_tour_detail_pc, $information->ic_content); + + $why_us_tour_list_pc = $this->load->view($template_path . '-why-us-tour-list-pc', false, true); + $information->ic_content = str_replace('', $why_us_tour_list_pc, $information->ic_content); + + $breadcrumb_content = $this->load->view($template_path . '-breadcrumb', array('breadcrumb_data' => $breadcrumb_data), true); + $information->ic_content = str_replace('', $breadcrumb_content, $information->ic_content); + + // 动态加载反馈标签,第一个城市不足八条,使用第二城市数据。 + // HTLM:
+ // 解析结果:; Siem Reap,Bangkok + $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]; + $city_name_list = explode(',', $city_name_string); + $feedback_list = $this->Feedback_model->get_feedback_by_city_list($city_name_list); + $feedback_content = $this->load->view( + $template_path . '-feedback-list', + array('feedback_list' => $feedback_list), + true); + $information->ic_content = str_replace( + $tag_name, + $feedback_content, + $information->ic_content); + } + } //主样式表,内联模式 if (is_file('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css')) {//主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 @@ -1281,6 +1313,28 @@ class Information extends CI_Controller file_put_contents($html_path, $template, LOCK_EX); } + public function test_ah_feedback() { + $feedback_array = []; + preg_match_all('^^', '', $feedback_array); + if (!empty($feedback_array)) { + foreach ($feedback_array[0] as $index => $tag_name) { + $city_name_string = $feedback_array[1][$index]; + $city_name_list = explode(',', $city_name_string); + $feedback_list = $this->Feedback_model->get_feedback_by_city_list($city_name_list); + var_dump($feedback_list); + $feedback_content = $this->load->view( + 'mobile_first/ah' . '-feedback-list', + array('feedback_list' => $feedback_list), + true); + echo $feedback_content; + // $information->ic_content = str_replace( + // $tag_name, + // $feedback_content, + // $information->ic_content); + } + } + } + /** * @description: CT用的生成静态文件方法.有些内容的替换,CT这边不一样,需要单独处理 zp * @param {type} $device='mobile' or 'pc' @@ -1501,6 +1555,18 @@ class Information extends CI_Controller } + //游船详细页 + if ($meta_ct_page_type == "cruisedetails"){ + $productType = $meta_ct_page_type; + $meta_ct_page_value = get_meta($information->ic_id, 'meta_ct_page_value'); + if (!empty($meta_ct_page_value)) { + $productCode = $meta_ct_page_value; + } + $dataCruise["shipname"]=$productCode; + $template_curisedetails = $this->load->view($template_path . '-cruisedetails-form', $dataCruise, TRUE); + $data["template_curisedetails"] = $template_curisedetails; + } + //表单页 if (in_array($meta_ct_page_type, array("customize", "contactus", "pagewithform","tourdetail"))) { $productType = $meta_ct_page_type; diff --git a/application/models/feedback_model.php b/application/models/feedback_model.php index 3defcc51..a488d08a 100644 --- a/application/models/feedback_model.php +++ b/application/models/feedback_model.php @@ -7,6 +7,74 @@ class Feedback_model extends CI_Model { $this->HT = $this->load->database('HT', TRUE); } + /** + * 根据城市英文名查找最新八条反馈信息 + */ + function get_feedback_by_city_list($city_name_list) { + + $feedback_query = + $this->HT->query(" + select top 8 + tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name + from Eva_TAInfo + left join Eva_TADetail on TAD_TAI_SN=TAI_SN + left join V_CIty_Info vci on vci.cii_sn = tai_cii_sn and vci.LGC_LGC = 1 + where TAD_Content is not null and vci.cii2_name = ? + order by tai_getdate desc", + array($city_name_list[0])); + + $first_city_num = $feedback_query->num_rows(); + $feedback_result = $feedback_query->result(); + $feedback_list = []; + + foreach ($feedback_result as $feedback_row) { + $createdOn = new DateTime($feedback_row->tai_getdate); + $createdOnString = $createdOn->format('M Y'); + + $feedback = [ + 'title' => $feedback_row->tai_title, + 'customer' => $feedback_row->tai_customerid, + 'content' => $feedback_row->tad_content, + 'url' => $feedback_row->tai_url, + 'createdOn' => $createdOnString + ]; + $feedback_list[] = $feedback; + } + + $enough_count = 8 - $first_city_num; + + if ($enough_count > 0 && count($city_name_list) > 1) { + + $feedback_query = + $this->HT->query(" + select top ? + tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name + from Eva_TAInfo + left join Eva_TADetail on TAD_TAI_SN=TAI_SN + left join V_CIty_Info vci on vci.cii_sn = tai_cii_sn and vci.LGC_LGC = 1 + where TAD_Content is not null and vci.cii2_name = ? + order by tai_getdate desc", + array($enough_count, $city_name_list[1])); + $feedback_result = $feedback_query->result(); + + foreach ($feedback_result as $feedback_row) { + $createdOn = new DateTime($feedback_row->tai_getdate); + $createdOnString = $createdOn->format('M Y'); + + $feedback = [ + 'title' => $feedback_row->tai_title, + 'customer' => $feedback_row->tai_customerid, + 'content' => $feedback_row->tad_content, + 'url' => $feedback_row->tai_url, + 'createdOn' => $createdOnString + ]; + $feedback_list[] = $feedback; + } + } + + return $feedback_list; + } + /** * 根据城市英文名查找最新一条反馈信息 */ 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 07892940..e9a9c140 100644 --- a/application/third_party/train/models/BIZ_intel_train_model.php +++ b/application/third_party/train/models/BIZ_intel_train_model.php @@ -120,7 +120,11 @@ class BIZ_intel_train_model extends CI_Model { } public function get_allstations(){ - $sql = "SELECT * FROM TrainStation_intel where station_id != 1"; + // $sql = "SELECT * FROM TrainStation_intel where station_id != 1"; + //2022-4-20 zp 上面所有站点由于印度有8335个站点,循环读取系统吃不消,用下面的限制有车次的才显示。 + $sql = "SELECT * FROM TrainStation_intel + inner join TrainSearch_intel on tsi_ToStation = station_id + where station_id <> 1"; $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 757c6f4c..40dbbaab 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -1,4 +1,5 @@ - +