|
|
|
@ -171,7 +171,6 @@ class Information extends CI_Controller
|
|
|
|
|
$data['informationList'] = $this->Information_model->StructureList($rootStructure_ID);
|
|
|
|
|
|
|
|
|
|
//增加一项,属于这个区域,但是结构数据层次不准确的也要列出来
|
|
|
|
|
//todo:
|
|
|
|
|
//信息内容
|
|
|
|
|
$data['information'] = $this->Information_model->Detail($is_id);
|
|
|
|
|
|
|
|
|
@ -447,7 +446,7 @@ class Information extends CI_Controller
|
|
|
|
|
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
|
|
|
|
|
$this->make_www_cache_ct($information_new);
|
|
|
|
|
// $this->make_www_cache_ct('pc', $information_new);
|
|
|
|
|
} else if (strcasecmp($site_code, "shanghai") == 0 && !empty($auto_update_cache)){
|
|
|
|
|
} else if (strcasecmp($site_code, "shanghai") == 0 && !empty($auto_update_cache)) {
|
|
|
|
|
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
|
|
|
|
|
$this->make_www_cache_sh($information_new);
|
|
|
|
|
} else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) {
|
|
|
|
@ -928,40 +927,40 @@ class Information extends CI_Controller
|
|
|
|
|
// /day-tours/(278008224) 节点不使用推荐信息
|
|
|
|
|
if ($information->is_parent_id == '278008224') {
|
|
|
|
|
} else {
|
|
|
|
|
// 右侧列表广告
|
|
|
|
|
$tips_right_a = [];
|
|
|
|
|
$tips_right_b = [];
|
|
|
|
|
$tips_right_c = [];
|
|
|
|
|
for ($i = 1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right A_' . $i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tips_right_a[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for ($i = 1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right B_' . $i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tips_right_b[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for ($i = 1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right C_' . $i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tips_right_c[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$tips_right_list_content = $this->load->view(
|
|
|
|
|
'mobile_first/ch-tips-right-list',
|
|
|
|
|
array(
|
|
|
|
|
'tips_right_a' => $tips_right_a,
|
|
|
|
|
'tips_right_b' => $tips_right_b,
|
|
|
|
|
'tips_right_c' => $tips_right_c
|
|
|
|
|
),
|
|
|
|
|
true
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
|
|
|
|
|
// 右侧列表广告
|
|
|
|
|
$tips_right_a = [];
|
|
|
|
|
$tips_right_b = [];
|
|
|
|
|
$tips_right_c = [];
|
|
|
|
|
for ($i = 1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right A_' . $i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tips_right_a[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for ($i = 1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right B_' . $i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tips_right_b[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for ($i = 1; $i <= 12; $i++) {
|
|
|
|
|
$key = 'List Tips Right C_' . $i;
|
|
|
|
|
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
|
|
|
|
|
$tips_right_c[] = $recommand_information[$key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$tips_right_list_content = $this->load->view(
|
|
|
|
|
'mobile_first/ch-tips-right-list',
|
|
|
|
|
array(
|
|
|
|
|
'tips_right_a' => $tips_right_a,
|
|
|
|
|
'tips_right_b' => $tips_right_b,
|
|
|
|
|
'tips_right_c' => $tips_right_c
|
|
|
|
|
),
|
|
|
|
|
true
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//文中的信息推荐
|
|
|
|
@ -2460,7 +2459,7 @@ class Information extends CI_Controller
|
|
|
|
|
$ic_content = $information->ic_content;
|
|
|
|
|
|
|
|
|
|
/** 替换H1加面包屑,加作者 */
|
|
|
|
|
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" . $str_author . "\r\n", $ic_content, 1);
|
|
|
|
|
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" . $str_author . "\r\n", $ic_content, 1);
|
|
|
|
|
|
|
|
|
|
//图片加延迟
|
|
|
|
|
$ic_content = $this->html_optimize_lib->set_lazy_loader($ic_content, 'https://data.shanghaihighlights.com/image/grey.gif');
|
|
|
|
@ -2597,10 +2596,10 @@ class Information extends CI_Controller
|
|
|
|
|
$data["ADDONCSS"] .= '<link href="' . $apiweb . '/css/css3/flatpickr.css" rel="preload" as="style" onload="this.rel=\'stylesheet\'" />';
|
|
|
|
|
|
|
|
|
|
//一日游表单的替换
|
|
|
|
|
$DayTripData["productCode"]=$productCode;
|
|
|
|
|
$template_form_daydetail = $this->load->view($template_path.'-daydetail-form',$DayTripData,true); //模板内容
|
|
|
|
|
$DayTripData["productCode"] = $productCode;
|
|
|
|
|
$template_form_daydetail = $this->load->view($template_path . '-daydetail-form', $DayTripData, true); //模板内容
|
|
|
|
|
//使用simple_html_dom_lib库来进行表单添加
|
|
|
|
|
$ic_content = $this->html_optimize_lib->add_htmlcode($ic_content,"#maincontent",$template_form_daydetail);
|
|
|
|
|
$ic_content = $this->html_optimize_lib->add_htmlcode($ic_content, "#maincontent", $template_form_daydetail);
|
|
|
|
|
}
|
|
|
|
|
if ($meta_ct_page_type == "tourdetail") {
|
|
|
|
|
//线路
|
|
|
|
@ -2631,7 +2630,7 @@ class Information extends CI_Controller
|
|
|
|
|
$data["ADDONCSS"] .= '<link href="' . $apiweb . '/css/css3/flatpickr.css" rel="preload" as="style" onload="this.rel=\'stylesheet\'" />';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($meta_ct_page_type=="daytripform"){
|
|
|
|
|
if ($meta_ct_page_type == "daytripform") {
|
|
|
|
|
$productType = $meta_ct_page_type;
|
|
|
|
|
$addonJs .= '<script src="' . $apiweb . '/js/mobile-first/daytrip-form.js" defer></script>';
|
|
|
|
|
$data["ADDONCSS"] .= '<link href="' . $apiweb . '/css/css3/form.css" rel="preload" as="style" onload="this.rel=\'stylesheet\'" />';
|
|
|
|
@ -2828,7 +2827,7 @@ class Information extends CI_Controller
|
|
|
|
|
$exclude_ids = array($information->is_id); //需要排除的is_id,防止通过页面显示相同内容,默认排除本身,每个推荐内容都需要排除已经推荐过的
|
|
|
|
|
foreach ($root_recommands as $item) {
|
|
|
|
|
if ($this->config->item('site_code') == 'ah') { //如果是AH的页面,取消重复检测
|
|
|
|
|
$exclude_ids=array(0);
|
|
|
|
|
$exclude_ids = array(0);
|
|
|
|
|
}
|
|
|
|
|
$result = $this->recommand_information_rule($information, $root_detail, $item, $exclude_ids);
|
|
|
|
|
if (!empty($result)) {
|
|
|
|
@ -2837,8 +2836,8 @@ class Information extends CI_Controller
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($group_recommands as $item) {
|
|
|
|
|
if ($this->config->item('site_code') == 'ah' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh' ) { //如果是AH CH GH的页面,取消重复检测
|
|
|
|
|
$exclude_ids=array(0);
|
|
|
|
|
if ($this->config->item('site_code') == 'ah' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh') { //如果是AH CH GH的页面,取消重复检测
|
|
|
|
|
$exclude_ids = array(0);
|
|
|
|
|
}
|
|
|
|
|
if (empty($data[$item->ir_name])) {
|
|
|
|
|
$result = $this->recommand_information_rule($information, $root_detail, $item, $exclude_ids);
|
|
|
|
|