|
|
@ -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);
|
|
|
@ -1013,35 +1013,36 @@ 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];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
@ -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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1214,7 +1215,8 @@ class Information extends CI_Controller
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//使用正则匹配出价格标签,返回一个价格数组
|
|
|
|
//使用正则匹配出价格标签,返回一个价格数组
|
|
|
|
private function price_pregmatch($content) {
|
|
|
|
private function price_pregmatch($content)
|
|
|
|
|
|
|
|
{
|
|
|
|
$price_array = array();
|
|
|
|
$price_array = array();
|
|
|
|
$temp_array = array();
|
|
|
|
$temp_array = array();
|
|
|
|
$result = false;
|
|
|
|
$result = false;
|
|
|
@ -1240,7 +1242,8 @@ class Information extends CI_Controller
|
|
|
|
case 'EC':
|
|
|
|
case 'EC':
|
|
|
|
$cli_grade = '7003';
|
|
|
|
$cli_grade = '7003';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default :$cli_grade = '7001';
|
|
|
|
default:
|
|
|
|
|
|
|
|
$cli_grade = '7001';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$person_size = (!empty($price_array[2]) && is_numeric($price_array[2])) ? $price_array[2] : 2; //人等1,2-5,6-9,10,默认2人等
|
|
|
|
$person_size = (!empty($price_array[2]) && is_numeric($price_array[2])) ? $price_array[2] : 2; //人等1,2-5,6-9,10,默认2人等
|
|
|
|
//为了兼容以前的人等方式,把算数人等转换为单数 25=>2
|
|
|
|
//为了兼容以前的人等方式,把算数人等转换为单数 25=>2
|
|
|
@ -1620,20 +1623,20 @@ 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];
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1644,7 +1647,8 @@ class Information extends CI_Controller
|
|
|
|
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
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
@ -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);
|
|
|
|