hotfix/paypal-note
LMR 2 years ago
parent 7b4025739c
commit 31b4b18d77

@ -614,11 +614,13 @@ class Information extends CI_Controller
$breadcrumb_structured_data_content = $this->load->view( $breadcrumb_structured_data_content = $this->load->view(
$template_path . '-structured-data-breadcrumb', $template_path . '-structured-data-breadcrumb',
array('breadcrumb_data' => $breadcrumb_data, 'information' => $information), array('breadcrumb_data' => $breadcrumb_data, 'information' => $information),
true); true
);
$template = str_replace( $template = str_replace(
'<!--@STRUCTURED-DATA-BREADCRUMB-BLOCK@-->', '<!--@STRUCTURED-DATA-BREADCRUMB-BLOCK@-->',
$breadcrumb_structured_data_content, $breadcrumb_structured_data_content,
$template); $template
);
//替换模板中的标签 //替换模板中的标签
$template = str_replace('<!--@TITLE@-->', $information->ic_seo_title, $template); $template = str_replace('<!--@TITLE@-->', $information->ic_seo_title, $template);
@ -639,11 +641,13 @@ class Information extends CI_Controller
$feedback_content = $this->load->view( $feedback_content = $this->load->view(
$template_path . '-feedback-list', $template_path . '-feedback-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_content, $feedback_content,
$information->ic_content); $information->ic_content
);
} }
} }
@ -651,11 +655,13 @@ class Information extends CI_Controller
$weather_forecast_content = $this->load->view( $weather_forecast_content = $this->load->view(
$template_path . '-weather-forecast', $template_path . '-weather-forecast',
array(), array(),
true); true
);
$information->ic_content = str_replace( $information->ic_content = str_replace(
'<!--@WEATHER-FORECAST-BLOCK@-->', '<!--@WEATHER-FORECAST-BLOCK@-->',
$weather_forecast_content, $weather_forecast_content,
$information->ic_content); $information->ic_content
);
//火车票搜索框添加 -- zp //火车票搜索框添加 -- zp
if ($information->is_parent_id == "278008234") { if ($information->is_parent_id == "278008234") {
@ -698,14 +704,16 @@ class Information extends CI_Controller
$article_structured_data_content = $this->load->view( $article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article', $template_path . '-structured-data-article',
array('information' => $information, 'author' => $author), array('information' => $information, 'author' => $author),
true); true
);
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template); $template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
$article_top_image_content = $this->load->view( $article_top_image_content = $this->load->view(
$template_path . '-info-top-img', $template_path . '-info-top-img',
array('information' => $information), array('information' => $information),
true); true
);
$template = str_replace('<!--@INFO-TOP-IMAGE@-->', $article_top_image_content, $template); $template = str_replace('<!--@INFO-TOP-IMAGE@-->', $article_top_image_content, $template);
$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);
@ -811,7 +819,6 @@ class Information extends CI_Controller
// print_r($trippest_detail_template); // print_r($trippest_detail_template);
// die(); // die();
$information->ic_content = str_replace('<!--@TRIPPEST-FORM@-->', $trippest_detail_template, $information->ic_content); $information->ic_content = str_replace('<!--@TRIPPEST-FORM@-->', $trippest_detail_template, $information->ic_content);
} }
} }
@ -841,12 +848,14 @@ class Information extends CI_Controller
$template = str_replace( $template = str_replace(
'<!--@Meta-Ezoic-NoAds@-->', '<!--@Meta-Ezoic-NoAds@-->',
'<meta name="ezoic" content="noads"/>', '<meta name="ezoic" content="noads"/>',
$template); $template
);
} else { } else {
$template = str_replace( $template = str_replace(
'<!--@Meta-Ezoic-NoAds@-->', '<!--@Meta-Ezoic-NoAds@-->',
'', '',
$template); $template
);
} }
//替换内容中广告 //替换内容中广告
@ -998,20 +1007,24 @@ class Information extends CI_Controller
$breadcrumb_structured_data_content = $this->load->view( $breadcrumb_structured_data_content = $this->load->view(
$template_path . '-structured-data-breadcrumb', $template_path . '-structured-data-breadcrumb',
array('breadcrumb_data' => $breadcrumb_data, 'information' => $information), array('breadcrumb_data' => $breadcrumb_data, 'information' => $information),
true); true
);
$template = str_replace( $template = str_replace(
'<!--@STRUCTURED-DATA-BREADCRUMB-BLOCK@-->', '<!--@STRUCTURED-DATA-BREADCRUMB-BLOCK@-->',
$breadcrumb_structured_data_content, $breadcrumb_structured_data_content,
$template); $template
);
$tour_form_content = $this->load->view( $tour_form_content = $this->load->view(
$template_path . '-tour-form', $template_path . '-tour-form',
array('information' => $information), array('information' => $information),
true); true
);
$template = str_replace( $template = str_replace(
'<!--@TOUR-FORM-TAG@-->', '<!--@TOUR-FORM-TAG@-->',
$tour_form_content, $tour_form_content,
$template); $template
);
//替换模板中的标签 //替换模板中的标签
$template = str_replace('<!--@TITLE@-->', $information->ic_seo_title, $template); $template = str_replace('<!--@TITLE@-->', $information->ic_seo_title, $template);
@ -1057,7 +1070,8 @@ class Information extends CI_Controller
$article_structured_data_content = $this->load->view( $article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article', $template_path . '-structured-data-article',
array('information' => $information, 'author_name' => $data_H1['author']), array('information' => $information, 'author_name' => $data_H1['author']),
true); true
);
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template); $template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
if (!empty($meta_product_code)) { if (!empty($meta_product_code)) {
@ -1098,10 +1112,16 @@ class Information extends CI_Controller
} }
$why_us_covid_list_pc = $this->load->view( $why_us_covid_list_pc = $this->load->view(
$template_path . '-why-us-covid-list-pc', array(), true); $template_path . '-why-us-covid-list-pc',
array(),
true
);
$information->ic_content = str_replace('<!--@WHY-US-COVID-LIST-PC@-->', $why_us_covid_list_pc, $information->ic_content); $information->ic_content = str_replace('<!--@WHY-US-COVID-LIST-PC@-->', $why_us_covid_list_pc, $information->ic_content);
$why_us_covid_list_mobile = $this->load->view( $why_us_covid_list_mobile = $this->load->view(
$template_path . '-why-us-covid-mobile', array(), true); $template_path . '-why-us-covid-mobile',
array(),
true
);
$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);
$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);
@ -1241,17 +1261,20 @@ class Information extends CI_Controller
$article_structured_data_content = $this->load->view( $article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article', $template_path . '-structured-data-article',
array('information' => $information, 'author' => $author), array('information' => $information, 'author' => $author),
true); true
);
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template); $template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
// 结构化标签BreadcrumbList // 结构化标签BreadcrumbList
$breadcrumb_structured_data_content = $this->load->view( $breadcrumb_structured_data_content = $this->load->view(
$template_path . '-structured-data-breadcrumb', $template_path . '-structured-data-breadcrumb',
array('breadcrumb_data' => $breadcrumb_data, 'information' => $information), array('breadcrumb_data' => $breadcrumb_data, 'information' => $information),
true); true
);
$template = str_replace( $template = str_replace(
'<!--@STRUCTURED-DATA-BREADCRUMB-BLOCK@-->', '<!--@STRUCTURED-DATA-BREADCRUMB-BLOCK@-->',
$breadcrumb_structured_data_content, $breadcrumb_structured_data_content,
$template); $template
);
//推荐信息或者产品 //推荐信息或者产品
//信息推荐 //信息推荐
@ -1293,21 +1316,24 @@ class Information extends CI_Controller
$inquiry_form_template = $this->load->view( $inquiry_form_template = $this->load->view(
$template_path . '-inquiry-form', $template_path . '-inquiry-form',
array('meta_product_code' => $meta_product_code, 'information' => $information), array('meta_product_code' => $meta_product_code, 'information' => $information),
true); true
);
$information->ic_content = str_replace('<!--@INQUIRY-FORM@-->', $inquiry_form_template, $information->ic_content); $information->ic_content = str_replace('<!--@INQUIRY-FORM@-->', $inquiry_form_template, $information->ic_content);
// GP 表单 // GP 表单
$gp_form_content = $this->load->view( $gp_form_content = $this->load->view(
$template_path . '-gp-form', $template_path . '-gp-form',
array('meta_product_code' => $meta_product_code, 'information' => $information), array('meta_product_code' => $meta_product_code, 'information' => $information),
true); true
);
$information->ic_content = str_replace('<!--@GP-FORM@-->', $gp_form_content, $information->ic_content); $information->ic_content = str_replace('<!--@GP-FORM@-->', $gp_form_content, $information->ic_content);
// 水灯节 GP 线路表单 // 水灯节 GP 线路表单
$gp_form_content = $this->load->view( $gp_form_content = $this->load->view(
$template_path . '-lantern-festival-gp-form', $template_path . '-lantern-festival-gp-form',
array('meta_product_code' => $meta_product_code, 'information' => $information), array('meta_product_code' => $meta_product_code, 'information' => $information),
true); true
);
$information->ic_content = str_replace('<!--@LANTERN-GP-FORM@-->', $gp_form_content, $information->ic_content); $information->ic_content = str_replace('<!--@LANTERN-GP-FORM@-->', $gp_form_content, $information->ic_content);
} }
// why-us 相关的标签 // why-us 相关的标签
@ -1327,13 +1353,15 @@ class Information extends CI_Controller
$lantern_form_content = $this->load->view( $lantern_form_content = $this->load->view(
$template_path . '-lantern-form', $template_path . '-lantern-form',
array('information' => $information), array('information' => $information),
true); true
);
$information->ic_content = str_replace('<!--@LANTERN-FORM@-->', $lantern_form_content, $information->ic_content); $information->ic_content = str_replace('<!--@LANTERN-FORM@-->', $lantern_form_content, $information->ic_content);
// 水灯节在信息页面表单 // 水灯节在信息页面表单
$lantern_form_info_page_content = $this->load->view( $lantern_form_info_page_content = $this->load->view(
$template_path . '-lantern-form-info-page', $template_path . '-lantern-form-info-page',
array('information' => $information), array('information' => $information),
true); true
);
$information->ic_content = str_replace('<!--@LANTERN-FORM-INFO-PAGE@-->', $lantern_form_info_page_content, $information->ic_content); $information->ic_content = str_replace('<!--@LANTERN-FORM-INFO-PAGE@-->', $lantern_form_info_page_content, $information->ic_content);
// 动态加载反馈标签,第一个城市不足八条,使用第二城市数据。 // 动态加载反馈标签,第一个城市不足八条,使用第二城市数据。
@ -1349,11 +1377,13 @@ class Information extends CI_Controller
$feedback_content = $this->load->view( $feedback_content = $this->load->view(
$template_path . '-feedback-list', $template_path . '-feedback-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_content, $feedback_content,
$information->ic_content); $information->ic_content
);
} }
} }
@ -1414,7 +1444,8 @@ class Information extends CI_Controller
file_put_contents($html_path, $template, LOCK_EX); file_put_contents($html_path, $template, LOCK_EX);
} }
public function test_ah_feedback() { public function test_ah_feedback()
{
$feedback_array = []; $feedback_array = [];
preg_match_all('^<!--@FEEDBACK_(.*)@-->^', '<div><!--@FEEDBACK_Siem Reap,Bangkok@--></div>', $feedback_array); preg_match_all('^<!--@FEEDBACK_(.*)@-->^', '<div><!--@FEEDBACK_Siem Reap,Bangkok@--></div>', $feedback_array);
if (!empty($feedback_array)) { if (!empty($feedback_array)) {
@ -1426,7 +1457,8 @@ class Information extends CI_Controller
$feedback_content = $this->load->view( $feedback_content = $this->load->view(
'mobile_first/ah' . '-feedback-list', 'mobile_first/ah' . '-feedback-list',
array('feedback_list' => $feedback_list), array('feedback_list' => $feedback_list),
true); true
);
echo $feedback_content; echo $feedback_content;
// $information->ic_content = str_replace( // $information->ic_content = str_replace(
// $tag_name, // $tag_name,
@ -1732,7 +1764,6 @@ class Information extends CI_Controller
$meta_addon_picture = ""; $meta_addon_picture = "";
$data["TOPBANNER"] = '<div class="banner">' . $template_TrainSearch . '</div>'; $data["TOPBANNER"] = '<div class="banner">' . $template_TrainSearch . '</div>';
} }
} else if ($information->ic_url == "/china-flights") { } else if ($information->ic_url == "/china-flights") {
//机票首页 //机票首页
$template_TrainSearch = $this->load->view($template_path . '-flight-index', null, TRUE); $template_TrainSearch = $this->load->view($template_path . '-flight-index', null, TRUE);
@ -1788,7 +1819,6 @@ class Information extends CI_Controller
$html_path .= $html_path_ext; $html_path .= $html_path_ext;
create_folder_by_path(dirname($html_path)); create_folder_by_path(dirname($html_path));
file_put_contents($html_path, $template, LOCK_EX); file_put_contents($html_path, $template, LOCK_EX);
} }
#endregion #endregion
@ -2057,7 +2087,7 @@ class Information extends CI_Controller
case 'ru': case 'ru':
case 'jp': case 'jp':
$information = $this->Information_model->Detail($url); $information = $this->Information_model->Detail($url);
if ($delete_only || !$information || $information->ic_ht_area_type === 'q') { if ($delete_only) {
//只删除操作在url修改和不发布信息的时候使用 //只删除操作在url修改和不发布信息的时候使用
$url = $this->config->item('site_url') . '/index.php/welcome/update_cache/delete_only?static_html_url=' . $url; $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/delete_only?static_html_url=' . $url;
} else { } else {

Loading…
Cancel
Save