Merge branch 'master' of github.com:hainatravel/information-system into master

master
candice 1 year ago
commit 1c052d21de

@ -1201,8 +1201,9 @@ class Information extends CI_Controller
//信息推荐 //信息推荐
$template_recommand = $recommand_information; //$this->recommand_information($information); 从外面传进来pc和移动只需要查一次减少数据库负担 $template_recommand = $recommand_information; //$this->recommand_information($information); 从外面传进来pc和移动只需要查一次减少数据库负担
$template = str_replace('<!--@ARTICLENEXT@-->', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), true), $template); $template = str_replace('<!--@ARTICLENEXT@-->', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), true), $template);
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
// //广告改叫tips防止被插件屏蔽 // //广告改叫tips防止被插件屏蔽
if (!empty ($template_recommand['Tips Right TOP'])) { if (!empty ($template_recommand['Tips Right TOP']) || !empty ($meta_show_advertise)) {
$template = str_replace('<!--@TIPS-RIGHT-TOP@-->', "<div class='right_brand_info'><aside>" . $template_recommand['Tips Right TOP']->it_content . "</aside></div>", $template); $template = str_replace('<!--@TIPS-RIGHT-TOP@-->', "<div class='right_brand_info'><aside>" . $template_recommand['Tips Right TOP']->it_content . "</aside></div>", $template);
} }
if (!empty ($template_recommand['Tips Right'])) { if (!empty ($template_recommand['Tips Right'])) {
@ -1216,7 +1217,7 @@ class Information extends CI_Controller
$tips_right_a = []; $tips_right_a = [];
$tips_right_b = []; $tips_right_b = [];
$tips_right_c = []; $tips_right_c = [];
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
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]) {
@ -1653,6 +1654,8 @@ class Information extends CI_Controller
public function make_www_cache_gh($device, $information, $recommand_information) public function make_www_cache_gh($device, $information, $recommand_information)
{ {
$data = array(); $data = array();
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
$data['meta_show_advertise'] = $meta_show_advertise;
switch ($device) { switch ($device) {
case 'mobile': case 'mobile':
//获取移动优先的模板,如果有的话 //获取移动优先的模板,如果有的话
@ -1668,7 +1671,7 @@ class Information extends CI_Controller
//获取PC的模板如果有的话 //获取PC的模板如果有的话
$template_path = 'mobile_first/' . $this->config->item('site_code'); $template_path = 'mobile_first/' . $this->config->item('site_code');
if (is_file(APPPATH . 'views/' . $template_path . '-pc' . EXT)) { if (is_file(APPPATH . 'views/' . $template_path . '-pc' . EXT)) {
$template = $this->load->view($template_path . '-pc', '', true); $template = $this->load->view($template_path . '-pc', $data, true);
$html_path_ext = '-pc.htm'; $html_path_ext = '-pc.htm';
} else { } else {
return false; return false;
@ -1776,7 +1779,6 @@ class Information extends CI_Controller
$tips_right_a = []; $tips_right_a = [];
$tips_right_b = []; $tips_right_b = [];
$tips_right_c = []; $tips_right_c = [];
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
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]) {
@ -2018,12 +2020,14 @@ class Information extends CI_Controller
$data = array(); $data = array();
$data['information'] = $information; $data['information'] = $information;
$recommand_template = ''; $recommand_template = '';
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
$data['meta_show_advertise'] = $meta_show_advertise;
switch ($device) { switch ($device) {
case 'mobile': case 'mobile':
//获取移动优先的模板,如果有的话 //获取移动优先的模板,如果有的话
$template_path = 'mobile_first/' . $this->config->item('site_code'); $template_path = 'mobile_first/' . $this->config->item('site_code');
if (is_file(APPPATH . 'views/' . $template_path . EXT)) { if (is_file(APPPATH . 'views/' . $template_path . EXT)) {
$template = $this->load->view($template_path, '', true); $template = $this->load->view($template_path, $data, true);
$html_path_ext = '-mobile.htm'; $html_path_ext = '-mobile.htm';
} else { } else {
return false; return false;
@ -2123,7 +2127,7 @@ class Information extends CI_Controller
$tips_right_a = []; $tips_right_a = [];
$tips_right_b = []; $tips_right_b = [];
$tips_right_c = []; $tips_right_c = [];
$meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise');
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]) {

@ -227,6 +227,7 @@
<div class="pc_content"> <div class="pc_content">
<!--@CUSTOM-CONENT@--> <!--@CUSTOM-CONENT@-->
</div> </div>
<?php if (!empty($meta_show_advertise)) {?>
<div class="right_brand_info"> <div class="right_brand_info">
<h3>Why Asia Highlights (10,000+ reviews & 98.8% 5-star rating)</h3> <h3>Why Asia Highlights (10,000+ reviews & 98.8% 5-star rating)</h3>
@ -242,6 +243,7 @@
<li>Celebrate milestones with style!</li> <li>Celebrate milestones with style!</li>
</ul> </ul>
</div> </div>
<?php } ?>
<!--@TIPS-RIGHT@--> <!--@TIPS-RIGHT@-->
<!--@TIPS-RIGHT-LIST@--> <!--@TIPS-RIGHT-LIST@-->
<div class="info_tm_button"><a href="/forms/tailormade?product_code=" id="create_my_trip_button_pc">Create <div class="info_tm_button"><a href="/forms/tailormade?product_code=" id="create_my_trip_button_pc">Create

@ -190,6 +190,7 @@
<!--@CUSTOM-CONENT@--> <!--@CUSTOM-CONENT@-->
</section> </section>
</div> </div>
<?php if (!empty($meta_show_advertise)) {?>
<div class="right_brand_info"> <div class="right_brand_info">
<h3>Why Global Highlights (10,000+ reviews & 98.8% 5-star rating)</h3> <h3>Why Global Highlights (10,000+ reviews & 98.8% 5-star rating)</h3>
@ -205,6 +206,7 @@
<li>Celebrate milestones with style!</li> <li>Celebrate milestones with style!</li>
</ul> </ul>
</div> </div>
<?php } ?>
<!--@TIPS-RIGHT@--> <!--@TIPS-RIGHT@-->
<!--@TIPS-RIGHT-LIST@--> <!--@TIPS-RIGHT-LIST@-->
<div class="info_tm_button"><a href="/forms/tailormade?product_code=" id="create_my_trip_button_pc">Create <div class="info_tm_button"><a href="/forms/tailormade?product_code=" id="create_my_trip_button_pc">Create

Loading…
Cancel
Save