diff --git a/application/controllers/information.php b/application/controllers/information.php index c146973e..de82b99f 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -656,6 +656,28 @@ class Information extends CI_Controller } } + // 动态加载反馈标签,每个城市三十条反馈。 + // HTLM:
+ // 解析结果:; Bangkok + $feedback30_array = []; + preg_match_all('^^', $information->ic_content, $feedback30_array); + if (!empty($feedback30_array)) { + foreach ($feedback30_array[0] as $index => $tag_name) { + $city_name = $feedback30_array[1][$index]; + $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); + $feedback_30_content = $this->load->view( + 'mobile_first/ch-feedback-30-list', + array('feedback_list' => $feedback_list), + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_30_content, + $information->ic_content + ); + } + } + $feedback_newest = $this->Feedback_model->get_feedback_newest(); $feedback_newest_content = $this->load->view( $template_path . '-feedback-newest', @@ -1397,6 +1419,28 @@ class Information extends CI_Controller $information->ic_content = str_replace('', $tour_form_content, $information->ic_content); } + // 动态加载反馈标签,每个城市三十条反馈。 + // HTLM:
+ // 解析结果:; Bangkok + $feedback30_array = []; + preg_match_all('^^', $information->ic_content, $feedback30_array); + if (!empty($feedback30_array)) { + foreach ($feedback30_array[0] as $index => $tag_name) { + $city_name = $feedback30_array[1][$index]; + $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); + $feedback_30_content = $this->load->view( + 'mobile_first/gh-feedback-30-list', + array('feedback_list' => $feedback_list), + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_30_content, + $information->ic_content + ); + } + } + $feedback_newest = $this->Feedback_model->get_feedback_newest(); $feedback_newest_content = $this->load->view( $template_path . '-feedback-newest', @@ -1729,14 +1773,40 @@ class Information extends CI_Controller foreach ($feedback30_array[0] as $index => $tag_name) { $city_name = $feedback30_array[1][$index]; $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); - $feedback_content = $this->load->view( + $feedback_30_content = $this->load->view( 'mobile_first/ah-feedback-30-list', array('feedback_list' => $feedback_list), true ); $information->ic_content = str_replace( $tag_name, - $feedback_content, + $feedback_30_content, + $information->ic_content + ); + } + } + + // 集合页面反馈标签 + $feedback_city_array = []; + preg_match_all('^^', $information->ic_content, $feedback_city_array); + if (!empty($feedback_city_array)) { + foreach ($feedback_city_array[0] as $index => $tag_name) { + $city_name_string = $feedback_city_array[1][$index]; + $city_name_list = explode(',', $city_name_string); + $feedback_city_list = []; + foreach ($city_name_list as $index => $city_name) { + $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 5); + $feedback_city_list[$city_name] = $feedback_list; + } + + $feedback_city_content = $this->load->view( + 'mobile_first/ah-feedback-city-list', + $feedback_city_list, + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_city_content, $information->ic_content ); } diff --git a/application/views/mobile_first/ah-feedback-city-list.php b/application/views/mobile_first/ah-feedback-city-list.php index 7db0ef9f..cbd8bae9 100644 --- a/application/views/mobile_first/ah-feedback-city-list.php +++ b/application/views/mobile_first/ah-feedback-city-list.php @@ -1,22 +1,4 @@ -

98.8% positive customer reviews among 10,000+

-
-
- -
-
- Tour Review - -
-
- $feedback) {?> @@ -26,9 +8,11 @@ More
,
+
More Thailand reviews
- - + + + $feedback) {?>
@@ -37,34 +21,71 @@ More
,
+
More Vietnam reviews
- - - - $feedback) {?> + + + + + $feedback) {?> +
+ +

+ More +
,
+
+
More Cambodia reviews
+ + + + + + $feedback) {?>

More
,
+
More Japan reviews
- - -
More Thailand reviews
+ + + + + $feedback) {?> +
+ +

+ More +
,
+
+
More India reviews
+ + + + + + $feedback) {?> +
+ +

+ More +
,
+
+
More Myanmar reviews
+ + -
-
Asia Highlights Reviews
- -
- -
-
- \ No newline at end of file + + + $feedback) {?> +
+ +

+ More +
,
+
+
More China reviews
+ + \ No newline at end of file