hotfix/paypal-note
LMR 2 years ago
parent ec13581dfa
commit 416bdfa0c8

@ -571,7 +571,7 @@ class Information extends CI_Controller
} else { } else {
return false; return false;
} }
break; // break;
case 'delete': case 'delete':
if (is_file($html_file_mobile)) { if (is_file($html_file_mobile)) {
unlink($html_file_mobile); unlink($html_file_mobile);
@ -662,20 +662,20 @@ class Information extends CI_Controller
$feedback30_array = []; $feedback30_array = [];
preg_match_all('^<!--@FEEDBACK-30_(.*)@-->^', $information->ic_content, $feedback30_array); preg_match_all('^<!--@FEEDBACK-30_(.*)@-->^', $information->ic_content, $feedback30_array);
if (!empty($feedback30_array)) { if (!empty($feedback30_array)) {
foreach ($feedback30_array[0] as $index => $tag_name) { foreach ($feedback30_array[0] as $index => $tag_name) {
$city_name = $feedback30_array[1][$index]; $city_name = $feedback30_array[1][$index];
$feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name);
$feedback_30_content = $this->load->view( $feedback_30_content = $this->load->view(
'mobile_first/ch-feedback-30-list', 'mobile_first/ch-feedback-30-list',
array('feedback_list' => $feedback_list), array('feedback_list' => $feedback_list),
true true
); );
$information->ic_content = str_replace( $information->ic_content = str_replace(
$tag_name, $tag_name,
$feedback_30_content, $feedback_30_content,
$information->ic_content $information->ic_content
); );
} }
} }
$feedback_newest = $this->Feedback_model->get_feedback_newest(); $feedback_newest = $this->Feedback_model->get_feedback_newest();
@ -1007,103 +1007,104 @@ class Information extends CI_Controller
public function test_recommand() public function test_recommand()
{ {
$information = $this->Information_model->Detail($this->input->get('is_id')); $information = $this->Information_model->Detail($this->input->get('is_id'));
$recommand_information = $this->recommand_information($information); $recommand_information = $this->recommand_information($information);
// var_dump($recommand_information); // var_dump($recommand_information);
$tips_right_a = []; $tips_right_a = [];
$tips_right_b = []; $tips_right_b = [];
$tips_right_c = []; $tips_right_c = [];
for ($i=1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right A_'.$i; $key = 'List Tips Right A_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_a[] = $recommand_information[$key]; $tips_right_a[] = $recommand_information[$key];
} }
} }
for ($i=1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right B_'.$i; $key = 'List Tips Right B_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_b[] = $recommand_information[$key]; $tips_right_b[] = $recommand_information[$key];
} }
} }
for ($i=1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right C_'.$i; $key = 'List Tips Right C_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_c[] = $recommand_information[$key]; $tips_right_c[] = $recommand_information[$key];
} }
} }
echo 'List Tips Right A: '.COUNT($tips_right_a); echo 'List Tips Right A: ' . COUNT($tips_right_a);
echo '; List Tips Right B: '.COUNT($tips_right_b); echo '; List Tips Right B: ' . COUNT($tips_right_b);
echo '; List Tips Right C: '.COUNT($tips_right_c); echo '; List Tips Right C: ' . COUNT($tips_right_c);
$tips_right_list_content = $this->load->view( $tips_right_list_content = $this->load->view(
'mobile_first/ah-tips-right-list', 'mobile_first/ah-tips-right-list',
array( array(
'tips_right_a' => $tips_right_a, 'tips_right_a' => $tips_right_a,
'tips_right_b' => $tips_right_b, 'tips_right_b' => $tips_right_b,
'tips_right_c' => $tips_right_c), 'tips_right_c' => $tips_right_c
true ),
); true
echo $tips_right_list_content; );
echo $tips_right_list_content;
} }
public function test_feedback() public function test_feedback()
{ {
$feedback_newest = $this->Feedback_model->test_feedback_newest(); $feedback_newest = $this->Feedback_model->test_feedback_newest();
var_dump($feedback_newest); var_dump($feedback_newest);
} }
public function test_feedback30() public function test_feedback30()
{ {
$feedback30_array = []; $feedback30_array = [];
preg_match_all('^<!--@FEEDBACK-30_(.*)@-->^', '<div><!--@FEEDBACK-30_Bangkok@--></div>', $feedback30_array); preg_match_all('^<!--@FEEDBACK-30_(.*)@-->^', '<div><!--@FEEDBACK-30_Bangkok@--></div>', $feedback30_array);
if (!empty($feedback30_array)) { if (!empty($feedback30_array)) {
foreach ($feedback30_array[0] as $index => $tag_name) { foreach ($feedback30_array[0] as $index => $tag_name) {
$city_name = $feedback30_array[1][$index]; $city_name = $feedback30_array[1][$index];
$feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 2); $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 2);
$feedback_content = $this->load->view( $feedback_content = $this->load->view(
'mobile_first/ah-feedback-30-list', 'mobile_first/ah-feedback-30-list',
array('feedback_list' => $feedback_list), array('feedback_list' => $feedback_list),
true true
); );
echo $feedback_content; echo $feedback_content;
}
} }
}
} }
public function test_feedback_city_list() public function test_feedback_city_list()
{ {
$feedback_city_array = []; $feedback_city_array = [];
preg_match_all('^<!--@FEEDBACK-CITY-LIST_(.*)@-->^', '<div><!--@FEEDBACK-CITY-LIST_Bangkok,Hanoi,Tokyo,Delhi,Yangon,Beijing@--></div>', $feedback_city_array); preg_match_all('^<!--@FEEDBACK-CITY-LIST_(.*)@-->^', '<div><!--@FEEDBACK-CITY-LIST_Bangkok,Hanoi,Tokyo,Delhi,Yangon,Beijing@--></div>', $feedback_city_array);
if (!empty($feedback_city_array)) { if (!empty($feedback_city_array)) {
foreach ($feedback_city_array[0] as $index => $tag_name) { foreach ($feedback_city_array[0] as $index => $tag_name) {
$city_name_string = $feedback_city_array[1][$index]; $city_name_string = $feedback_city_array[1][$index];
$city_name_list = explode(',', $city_name_string); $city_name_list = explode(',', $city_name_string);
$feedback_city_list = []; $feedback_city_list = [];
foreach ($city_name_list as $index => $city_name) { foreach ($city_name_list as $index => $city_name) {
$feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 5); $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 5);
$data_name = str_replace(" ", "_", $city_name); $data_name = str_replace(" ", "_", $city_name);
$feedback_city_list[$data_name] = $feedback_list; $feedback_city_list[$data_name] = $feedback_list;
} }
// header('Content-Type: application/json'); // header('Content-Type: application/json');
// echo json_encode($feedback_city_list); // echo json_encode($feedback_city_list);
$feedback_content = $this->load->view( $feedback_content = $this->load->view(
'mobile_first/ah-feedback-city-list', 'mobile_first/ah-feedback-city-list',
$feedback_city_list, $feedback_city_list,
true true
); );
echo $feedback_content; echo $feedback_content;
}
} }
}
} }
public function test_price() public function test_price()
{ {
$price_rule = '<div style="color: red;">#ah-8,st,2#</div><div style="color: red;">#ah-8,st,2#</div>'; $price_rule = '<div style="color: red;">#ah-8,st,2#</div><div style="color: red;">#ah-8,st,2#</div>';
$price_tag_list = $this->parse_price_tag($price_rule); $price_tag_list = $this->parse_price_tag($price_rule);
var_dump($price_tag_list); var_dump($price_tag_list);
} }
/*! /*!
@ -1140,7 +1141,7 @@ class Information extends CI_Controller
case 'AR': case 'AR':
$price_number = $price->PLP_AdultUnitPrice + $price->PLP_RoomDiffPrice; //成人加单间房差 $price_number = $price->PLP_AdultUnitPrice + $price->PLP_RoomDiffPrice; //成人加单间房差
break; break;
default : default:
$price_number = $price->PLP_AdultUnitPrice; $price_number = $price->PLP_AdultUnitPrice;
} }
} else { } else {
@ -1153,10 +1154,10 @@ class Information extends CI_Controller
case '1': case '1':
$price_number = $price->CLP_OneAdultPriceRMB; $price_number = $price->CLP_OneAdultPriceRMB;
break; break;
case '2'://25 case '2': //25
$price_number = $price->CLP_TwoToFiveAdultPriceRMB; $price_number = $price->CLP_TwoToFiveAdultPriceRMB;
break; break;
case '6'://69 case '6': //69
$price_number = $price->CLP_SixToNineAdultPriceRMB; $price_number = $price->CLP_SixToNineAdultPriceRMB;
break; break;
case '10': case '10':
@ -1177,10 +1178,10 @@ class Information extends CI_Controller
case '1': case '1':
$price_number = $price->CLP_OneRoomDiffPriceRMB; $price_number = $price->CLP_OneRoomDiffPriceRMB;
break; break;
case '2'://25 case '2': //25
$price_number = $price->CLP_TwoToFiveRoomDiffPriceRMB; $price_number = $price->CLP_TwoToFiveRoomDiffPriceRMB;
break; break;
case '6'://69 case '6': //69
$price_number = $price->CLP_SixToNineRoomDiffPriceRMB; $price_number = $price->CLP_SixToNineRoomDiffPriceRMB;
break; break;
case '10': case '10':
@ -1190,10 +1191,10 @@ class Information extends CI_Controller
$price_number = $price->CLP_TwoToFiveRoomDiffPriceRMB; $price_number = $price->CLP_TwoToFiveRoomDiffPriceRMB;
} }
break; break;
case 'AR'://成人加单间房差 case 'AR': //成人加单间房差
$price_number = 0; $price_number = 0;
break; break;
default : default:
$price_number = 0; $price_number = 0;
} }
} }
@ -1202,11 +1203,11 @@ class Information extends CI_Controller
//把金额格式化为带有逗号(,)方便阅读,如 12,345 //把金额格式化为带有逗号(,)方便阅读,如 12,345
$price_number = is_numeric($price_number) ? number_format($site_money) : $price_number; $price_number = is_numeric($price_number) ? number_format($site_money) : $price_number;
if (!empty($price_number)) { if (!empty($price_number)) {
$price_tag = [ $price_tag = [
'placeholder' => $price_item->placeholder, 'placeholder' => $price_item->placeholder,
'price_number' => $price_number, 'price_number' => $price_number,
]; ];
$price_tag_list[] = $price_tag; $price_tag_list[] = $price_tag;
} }
} }
} }
@ -1214,50 +1215,52 @@ class Information extends CI_Controller
} }
//使用正则匹配出价格标签,返回一个价格数组 //使用正则匹配出价格标签,返回一个价格数组
private function price_pregmatch($content) { private function price_pregmatch($content)
$price_array = array(); {
$temp_array = array(); $price_array = array();
$result = false; $temp_array = array();
//#ah-1,lx,2,2016-01-23,A# $result = false;
//线路代号,等级(st标准、lx豪华、ec经济),人等,时间,人型(A成人、C小孩、B婴儿、R单间房差、AR成人+房差) //#ah-1,lx,2,2016-01-23,A#
preg_match_all('^#[a-zA-Z0-9,-]+#^', $content, $temp_array); //线路代号,等级(st标准、lx豪华、ec经济),人等,时间,人型(A成人、C小孩、B婴儿、R单间房差、AR成人+房差)
foreach ($temp_array[0] as $item) { preg_match_all('^#[a-zA-Z0-9,-]+#^', $content, $temp_array);
$placeholder = $item; foreach ($temp_array[0] as $item) {
$item = str_replace('#', '', $item); $placeholder = $item;
$price_array = explode(',', $item); $item = str_replace('#', '', $item);
$cli_no = !empty($price_array[0]) ? $price_array[0] : false; //线路代号 $price_array = explode(',', $item);
if (empty($cli_no)) { $cli_no = !empty($price_array[0]) ? $price_array[0] : false; //线路代号
continue; //没有设置线路代号则进入下一条 if (empty($cli_no)) {
} continue; //没有设置线路代号则进入下一条
$cli_grade = !empty($price_array[1]) ? $price_array[1] : false; //标准7001、豪华7002、经济7003 }
switch (strtoupper($cli_grade)) { $cli_grade = !empty($price_array[1]) ? $price_array[1] : false; //标准7001、豪华7002、经济7003
case 'ST': switch (strtoupper($cli_grade)) {
$cli_grade = '7001'; case 'ST':
break; $cli_grade = '7001';
case 'LX': break;
$cli_grade = '7002'; case 'LX':
break; $cli_grade = '7002';
case 'EC': break;
$cli_grade = '7003'; case 'EC':
break; $cli_grade = '7003';
default :$cli_grade = '7001'; break;
} default:
$person_size = (!empty($price_array[2]) && is_numeric($price_array[2])) ? $price_array[2] : 2; //人等1,2-5,6-9,10默认2人等 $cli_grade = '7001';
//为了兼容以前的人等方式,把算数人等转换为单数 25=>2 }
switch ($person_size) { $person_size = (!empty($price_array[2]) && is_numeric($price_array[2])) ? $price_array[2] : 2; //人等1,2-5,6-9,10默认2人等
case '25': //为了兼容以前的人等方式,把算数人等转换为单数 25=>2
$person_size = '2'; switch ($person_size) {
break; case '25':
case '69': $person_size = '2';
$person_size = '6'; break;
break; case '69':
} $person_size = '6';
$price_date = !empty($price_array[3]) ? $price_array[3] : false; //价格时间 break;
$price_people = !empty($price_array[4]) ? $price_array[4] : 'A'; //A成人、C小孩、B婴儿、R单间房差 }
$result[] = (object) array('placeholder' => $placeholder, 'cli_no' => $cli_no, 'cli_grade' => $cli_grade, 'person_size' => $person_size, 'price_date' => $price_date, 'price_people' => $price_people); $price_date = !empty($price_array[3]) ? $price_array[3] : false; //价格时间
} $price_people = !empty($price_array[4]) ? $price_array[4] : 'A'; //A成人、C小孩、B婴儿、R单间房差
return $result; $result[] = (object) array('placeholder' => $placeholder, 'cli_no' => $cli_no, 'cli_grade' => $cli_grade, 'person_size' => $person_size, 'price_date' => $price_date, 'price_people' => $price_people);
} }
return $result;
}
public function make_www_cache_gh($device, $information, $recommand_information) public function make_www_cache_gh($device, $information, $recommand_information)
{ {
@ -1365,9 +1368,9 @@ class Information extends CI_Controller
} }
if (empty($meta_product_code)) { if (empty($meta_product_code)) {
$template = str_replace('?product_code=', '', $template); $template = str_replace('?product_code=', '', $template);
} else { } else {
$template = str_replace('?product_code=', '?product_code=' . $meta_product_code, $template); $template = str_replace('?product_code=', '?product_code=' . $meta_product_code, $template);
} }
//信息推荐 //信息推荐
@ -1415,15 +1418,15 @@ class Information extends CI_Controller
$information->ic_content = str_replace('<!--@WHY-US-COVID-MOBILE@-->', $why_us_covid_list_mobile, $information->ic_content); $information->ic_content = str_replace('<!--@WHY-US-COVID-MOBILE@-->', $why_us_covid_list_mobile, $information->ic_content);
if (empty($meta_product_code)) { if (empty($meta_product_code)) {
$info_page_form_content = $this->load->view($template_path . '-info-page-form', false, true); $info_page_form_content = $this->load->view($template_path . '-info-page-form', false, true);
$information->ic_content = str_replace('<!--@INFO-PAGE-FORM@-->', $info_page_form_content, $information->ic_content); $information->ic_content = str_replace('<!--@INFO-PAGE-FORM@-->', $info_page_form_content, $information->ic_content);
} else { } else {
$tour_form_content = $this->load->view( $tour_form_content = $this->load->view(
$template_path . '-tour-form', $template_path . '-tour-form',
array('information' => $information, 'meta_product_code' => $meta_product_code), array('information' => $information, 'meta_product_code' => $meta_product_code),
true true
); );
$information->ic_content = str_replace('<!--@TOUR-FORM-TAG@-->', $tour_form_content, $information->ic_content); $information->ic_content = str_replace('<!--@TOUR-FORM-TAG@-->', $tour_form_content, $information->ic_content);
} }
// 动态加载反馈标签,每个城市三十条反馈。 // 动态加载反馈标签,每个城市三十条反馈。
@ -1432,20 +1435,20 @@ class Information extends CI_Controller
$feedback30_array = []; $feedback30_array = [];
preg_match_all('^<!--@FEEDBACK-30_(.*)@-->^', $information->ic_content, $feedback30_array); preg_match_all('^<!--@FEEDBACK-30_(.*)@-->^', $information->ic_content, $feedback30_array);
if (!empty($feedback30_array)) { if (!empty($feedback30_array)) {
foreach ($feedback30_array[0] as $index => $tag_name) { foreach ($feedback30_array[0] as $index => $tag_name) {
$city_name = $feedback30_array[1][$index]; $city_name = $feedback30_array[1][$index];
$feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name);
$feedback_30_content = $this->load->view( $feedback_30_content = $this->load->view(
'mobile_first/gh-feedback-30-list', 'mobile_first/gh-feedback-30-list',
array('feedback_list' => $feedback_list), array('feedback_list' => $feedback_list),
true true
); );
$information->ic_content = str_replace( $information->ic_content = str_replace(
$tag_name, $tag_name,
$feedback_30_content, $feedback_30_content,
$information->ic_content $information->ic_content
); );
} }
} }
$feedback_newest = $this->Feedback_model->get_feedback_newest(); $feedback_newest = $this->Feedback_model->get_feedback_newest();
@ -1620,32 +1623,33 @@ class Information extends CI_Controller
$tips_right_a = []; $tips_right_a = [];
$tips_right_b = []; $tips_right_b = [];
$tips_right_c = []; $tips_right_c = [];
for ($i=1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right A_'.$i; $key = 'List Tips Right A_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_a[] = $recommand_information[$key]; $tips_right_a[] = $recommand_information[$key];
} }
} }
for ($i=1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right B_'.$i; $key = 'List Tips Right B_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_b[] = $recommand_information[$key]; $tips_right_b[] = $recommand_information[$key];
} }
} }
for ($i=1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right C_'.$i; $key = 'List Tips Right C_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_c[] = $recommand_information[$key]; $tips_right_c[] = $recommand_information[$key];
} }
} }
$tips_right_list_content = $this->load->view( $tips_right_list_content = $this->load->view(
'mobile_first/ah-tips-right-list', 'mobile_first/ah-tips-right-list',
array( array(
'tips_right_a' => $tips_right_a, 'tips_right_a' => $tips_right_a,
'tips_right_b' => $tips_right_b, 'tips_right_b' => $tips_right_b,
'tips_right_c' => $tips_right_c), 'tips_right_c' => $tips_right_c
true ),
true
); );
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template); $template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
@ -1713,11 +1717,11 @@ class Information extends CI_Controller
$price_tag_list = $this->parse_price_tag($information->ic_content); $price_tag_list = $this->parse_price_tag($information->ic_content);
foreach ($price_tag_list as $price_tag) { foreach ($price_tag_list as $price_tag) {
$information->ic_content = str_replace( $information->ic_content = str_replace(
$price_tag['placeholder'], $price_tag['placeholder'],
$price_tag['price_number'], $price_tag['price_number'],
$information->ic_content $information->ic_content
); );
} }
} }
// why-us 相关的标签 // why-us 相关的标签
@ -1777,47 +1781,47 @@ class Information extends CI_Controller
$feedback30_array = []; $feedback30_array = [];
preg_match_all('^<!--@FEEDBACK-30_(.*)@-->^', $information->ic_content, $feedback30_array); preg_match_all('^<!--@FEEDBACK-30_(.*)@-->^', $information->ic_content, $feedback30_array);
if (!empty($feedback30_array)) { if (!empty($feedback30_array)) {
foreach ($feedback30_array[0] as $index => $tag_name) { foreach ($feedback30_array[0] as $index => $tag_name) {
$city_name = $feedback30_array[1][$index]; $city_name = $feedback30_array[1][$index];
$feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name);
$feedback_30_content = $this->load->view( $feedback_30_content = $this->load->view(
'mobile_first/ah-feedback-30-list', 'mobile_first/ah-feedback-30-list',
array('feedback_list' => $feedback_list), array('feedback_list' => $feedback_list),
true true
); );
$information->ic_content = str_replace( $information->ic_content = str_replace(
$tag_name, $tag_name,
$feedback_30_content, $feedback_30_content,
$information->ic_content $information->ic_content
); );
} }
} }
// 集合页面反馈标签 // 集合页面反馈标签
$feedback_city_array = []; $feedback_city_array = [];
preg_match_all('^<!--@FEEDBACK-CITY-LIST_(.*)@-->^', $information->ic_content, $feedback_city_array); preg_match_all('^<!--@FEEDBACK-CITY-LIST_(.*)@-->^', $information->ic_content, $feedback_city_array);
if (!empty($feedback_city_array)) { if (!empty($feedback_city_array)) {
foreach ($feedback_city_array[0] as $index => $tag_name) { foreach ($feedback_city_array[0] as $index => $tag_name) {
$city_name_string = $feedback_city_array[1][$index]; $city_name_string = $feedback_city_array[1][$index];
$city_name_list = explode(',', $city_name_string); $city_name_list = explode(',', $city_name_string);
$feedback_city_list = []; $feedback_city_list = [];
foreach ($city_name_list as $index => $city_name) { foreach ($city_name_list as $index => $city_name) {
$feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 5); $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 5);
$data_name = str_replace(" ", "_", $city_name); $data_name = str_replace(" ", "_", $city_name);
$feedback_city_list[$data_name] = $feedback_list; $feedback_city_list[$data_name] = $feedback_list;
} }
$feedback_city_content = $this->load->view( $feedback_city_content = $this->load->view(
'mobile_first/ah-feedback-city-list', 'mobile_first/ah-feedback-city-list',
$feedback_city_list, $feedback_city_list,
true true
); );
$information->ic_content = str_replace( $information->ic_content = str_replace(
$tag_name, $tag_name,
$feedback_city_content, $feedback_city_content,
$information->ic_content $information->ic_content
); );
} }
} }
$feedback_newest = $this->Feedback_model->get_feedback_newest(); $feedback_newest = $this->Feedback_model->get_feedback_newest();
@ -1980,12 +1984,12 @@ class Information extends CI_Controller
$data["PRODUCTJS"] = ""; $data["PRODUCTJS"] = "";
$data["ISPRODUCT"] = "no"; //判断是否是产品页 $data["ISPRODUCT"] = "no"; //判断是否是产品页
$data["addthis_widget"] = ""; $data["addthis_widget"] = "";
$data["FloatIcon"]=""; //浮动图标替代addthis $data["FloatIcon"] = ""; //浮动图标替代addthis
$arrExitUrl = array("/","/culture","/guide","/tour","/citytour","/daytrip","/asia-tour","/china-trains"); $arrExitUrl = array("/", "/culture", "/guide", "/tour", "/citytour", "/daytrip", "/asia-tour", "/china-trains");
if (empty(get_meta($information->ic_id, 'meta_product_code')) || in_array($information->ic_url,$arrExitUrl)) { if (empty(get_meta($information->ic_id, 'meta_product_code')) || in_array($information->ic_url, $arrExitUrl)) {
//$data["addthis_widget"] = $this->load->view($template_path . '-add-this', false, true); //社媒代码addthis //$data["addthis_widget"] = $this->load->view($template_path . '-add-this', false, true); //社媒代码addthis
$data["FloatIcon"]="<div class=\"fixed-tm\"><a href=\"/forms/customize\" >Create My Trip</a></div>"; $data["FloatIcon"] = "<div class=\"fixed-tm\"><a href=\"/forms/customize\" >Create My Trip</a></div>";
} else { } else {
// $data["PRODUCTJS"] = '<script src="https://data.chinatravel.com/js/mobile-first/flatpickr.js"></script>'; // $data["PRODUCTJS"] = '<script src="https://data.chinatravel.com/js/mobile-first/flatpickr.js"></script>';
$data["ISPRODUCT"] = "yes"; $data["ISPRODUCT"] = "yes";
@ -2292,10 +2296,10 @@ class Information extends CI_Controller
case 'rule_show_tips': //显示广告 case 'rule_show_tips': //显示广告
$data = $this->recommends_and_tips_model->tips_detail($recommand->ir_pointer_it_id); $data = $this->recommends_and_tips_model->tips_detail($recommand->ir_pointer_it_id);
return array($recommand->ir_name => $data); return array($recommand->ir_name => $data);
break; //break;
case 'rule_no_show': //不显示 case 'rule_no_show': //不显示
return array($recommand->ir_name => false); return array($recommand->ir_name => false);
break; //break;
default: //'rule_parent'://继承上级规则则留空,程序会循环一遍分组的规则 default: //'rule_parent'://继承上级规则则留空,程序会循环一遍分组的规则
return false; return false;
} }
@ -2568,7 +2572,7 @@ class Information extends CI_Controller
break; break;
default: default:
return false; return false;
break; //break;
} }
$content = GET_HTTP($url); $content = GET_HTTP($url);

Loading…
Cancel
Save