diff --git a/application/controllers/information.php b/application/controllers/information.php index 802d3632..98ec8ac8 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1242,8 +1242,9 @@ class Information extends CI_Controller preg_match_all('^^', $information->ic_content, $feedback_array); if (!empty($feedback_array)) { foreach ($feedback_array[0] as $index => $tag_name) { - $city_name = $feedback_array[1][$index]; - $feedback_data = $this->Feedback_model->get_feedback_by_city($city_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', // array('feedback_data' => $feedback_data), @@ -1312,6 +1313,27 @@ 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( + // $template_path . '-feedback', + // array('feedback_data' => $feedback_data), + // true); + // $information->ic_content = str_replace( + // $tag_name, + // $feedback_content, + // $information->ic_content); + } + } + } + /** * @description: CT用的生成静态文件方法.有些内容的替换,CT这边不一样,需要单独处理 zp * @param {type} $device='mobile' or 'pc' 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/views/mobile_first/ah-feedback-list.php b/application/views/mobile_first/ah-feedback-list.php new file mode 100644 index 00000000..a85a6094 --- /dev/null +++ b/application/views/mobile_first/ah-feedback-list.php @@ -0,0 +1,60 @@ +
+
+
+ Asia Highlights tour of Thailand =AMAZING I highly recommend Asia Highlights!!! My husband and I chose the 12 day tour of Thailand for our honeymoon and could not have been happier. If you're thinking of using Asia Highlights, DO IT! More
+
+ Melissa Gornie, Apr 9, 2022
+ ![]() |
+
+
+
+ Had a MARVELOUS experience with Asia… Had a MARVELOUS experience with Asia Highlights Travel! The trip was very well organized and stood up very high standards. Thank you! More
+
+ Otto Lawrence, Oct 9, 2021
+ ![]() |
+
+
+
+ Vietnam & UAE FANTASTIC tour! Thank you Albee Ning! Albee was INCREDIBLE. She arranged a 9-day private tour of both North and South Vietnam. No stone was left unturned: excellent hotel reservations; personal, caring, and knowledgeable tour guides; etc. More
+
+ Barbara Sheran, Jun 21, 2020
+ ![]() |
+
+
+
+ We traveled with Asia Highlights… She ensured our needs were met in a timely and caring way, even after we paid in full for the trip. In spite of the threat of the Coronavirus and working from home for most of our trip, she was always available to us. More
+
+ Lurinda Smith Barton Barnwell, Mar 10, 2020
+ ![]() |
+
+
+
+ Excellent tour to Thailand Many thanks to Albee Ning, my agent with Asia Highlights. I had a wonderful tour that was exactly what I was looking for. The drivers and guides in Bangcock, Chiang Mai and Phuket were excellent. More
+
+ Harold Miller, Feb 15, 2020
+ ![]() |
+
+
+
+ A truly magical experience We have just returned from an amazing trip to Laos, Cambodia and Vietnam. Our travel adviser Albee Ning prepared a wonderful itinerary taking us to great locations with creative activities highlighting local culture. More
+
+ Bob Bosshard, Mar 11, 2020
+ ![]() |
+
+
+
+ Amazing experience! We took the 5 day Yi Peng Festival your in Chiang Mai, Thailand. It was an amazing experience. We had two tour guides who were absolutely phenomenal. They answered all the questions we had and were always on time. More
+
+ Bianca Hernandez, Dec 20, 2019
+ ![]() |
+