|
|
|
@ -751,7 +751,7 @@ class Information extends CI_Controller
|
|
|
|
|
|
|
|
|
|
function call_mobile_template_NEXT($template_path, $is_id)
|
|
|
|
|
{
|
|
|
|
|
$data['detail'] = $this->Information_model->Detail($is_id);//信息所属分类,获取信息顶级节点内容
|
|
|
|
|
$data['detail'] = $this->Information_model->Detail($is_id);
|
|
|
|
|
$data['type_detail'] = $this->Information_model->get_detail_by_path($data['detail']->is_path, 0);//信息所属分组,根据分组进行不同推荐
|
|
|
|
|
$data['root_detail'] = $this->Information_model->get_detail_by_path($data['detail']->is_path, 1);//信息所属分类,获取信息顶级节点内容
|
|
|
|
|
|
|
|
|
@ -805,9 +805,13 @@ class Information extends CI_Controller
|
|
|
|
|
$data['info_hotel']->ic_photo = $this->set_photo_content($data['info_hotel']->ic_photo, $data['info_hotel']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'destination':
|
|
|
|
|
case 'planing-1(guide)':
|
|
|
|
|
case 'planning-2 (decision tips)':
|
|
|
|
|
case 'destination': //url的第一段表示地区,根据第一段来搜索相关数据如/beijing/ 而不是根据is_parent_id因为可能信息和线路是在不同的分类下
|
|
|
|
|
$destination_url=trim($data['detail']->ic_url);
|
|
|
|
|
$destination_url=substr($destination_url,0,strpos($destination_url,'/',1)+1);
|
|
|
|
|
//how to plan
|
|
|
|
|
$data['info_howtoplan'] = $this->Information_model->search_by_words($data['root_detail']->is_path, array('how', 'plan'));
|
|
|
|
|
$data['info_howtoplan'] = $this->Information_model->search_by_words($destination_url, array('how', 'plan'),$data['detail']->is_id);
|
|
|
|
|
if (empty($data['info_howtoplan'])) {//找不到对应信息则显示备用
|
|
|
|
|
$data['info_howtoplan'] = $this->Information_model->Detail('/travelguide/plan-first-trip.htm');
|
|
|
|
|
}
|
|
|
|
@ -816,7 +820,7 @@ class Information extends CI_Controller
|
|
|
|
|
$data['info_howtoplan']->ic_photo = $this->set_photo_content($data['info_howtoplan']->ic_photo, $data['info_howtoplan']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
//best time to visit
|
|
|
|
|
$data['info_besttime'] = $this->Information_model->search_by_words($data['root_detail']->is_path, array('best', 'time'));
|
|
|
|
|
$data['info_besttime'] = $this->Information_model->search_by_words($destination_url, array('best', 'time'),$data['detail']->is_id);
|
|
|
|
|
if (empty($data['info_besttime'])) {
|
|
|
|
|
$data['info_besttime'] = $this->Information_model->Detail('/weather/china-best-times.htm');
|
|
|
|
|
}
|
|
|
|
@ -825,7 +829,7 @@ class Information extends CI_Controller
|
|
|
|
|
$data['info_besttime']->ic_photo = $this->set_photo_content($data['info_besttime']->ic_photo, $data['info_besttime']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
//top things to do
|
|
|
|
|
$data['info_topthings'] = $this->Information_model->search_by_words($data['root_detail']->is_path, array('top', 'things'));
|
|
|
|
|
$data['info_topthings'] = $this->Information_model->search_by_words($destination_url, array('top', 'things'),$data['detail']->is_id);
|
|
|
|
|
if (empty($data['info_topthings'])) {
|
|
|
|
|
$data['info_topthings'] = $this->Information_model->Detail('/travelguide/article-top-china-tourist-destination.htm');
|
|
|
|
|
}
|
|
|
|
@ -833,21 +837,7 @@ class Information extends CI_Controller
|
|
|
|
|
if (!empty($data['info_topthings'])) {
|
|
|
|
|
$data['info_topthings']->ic_photo = $this->set_photo_content($data['info_topthings']->ic_photo, $data['info_topthings']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
//hotel , where to stay
|
|
|
|
|
$data['info_hotel'] = $this->Information_model->search_by_words($data['root_detail']->is_path, array('hotel'));
|
|
|
|
|
if (empty($data['info_hotel'])) {
|
|
|
|
|
$data['info_hotel'] = $this->Information_model->search_by_words($data['root_detail']->is_path, array('where', 'stay'));
|
|
|
|
|
}
|
|
|
|
|
if (empty($data['info_hotel'])) {
|
|
|
|
|
$data['info_hotel'] = $this->Information_model->Detail('/travelguide/most-beautiful-places.htm');
|
|
|
|
|
}
|
|
|
|
|
$data['info_hotel_root'] = $this->Information_model->get_detail_by_path($data['info_hotel']->is_path, 1);//信息所属分类,获取信息顶级节点内容
|
|
|
|
|
if (!empty($data['info_hotel'])) {
|
|
|
|
|
$data['info_hotel']->ic_photo = $this->set_photo_content($data['info_hotel']->ic_photo, $data['info_hotel']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'planing-1(guide)':
|
|
|
|
|
case 'planning-2 (decision tips)':
|
|
|
|
|
//第四篇,随机推荐下方url
|
|
|
|
|
$random_array = array(
|
|
|
|
|
'/feedback/',
|
|
|
|
|
'/travelguide/how-chinahighlights-selects-your-hotel.htm',
|
|
|
|
@ -856,24 +846,9 @@ class Information extends CI_Controller
|
|
|
|
|
'/aboutus/no-shops.htm',
|
|
|
|
|
'/aboutus/company-history.htm'
|
|
|
|
|
);
|
|
|
|
|
$data['info_howtoplan'] = $this->Information_model->Detail('/travelguide/article-private-tour-vs-group-tour.htm');
|
|
|
|
|
if (!empty($data['info_howtoplan'])) {
|
|
|
|
|
$data['info_howtoplan_root'] = $this->Information_model->get_detail_by_path($data['info_howtoplan']->is_path, 1);//信息所属分类,获取信息顶级节点内容
|
|
|
|
|
$data['info_howtoplan']->ic_photo = $this->set_photo_content($data['info_howtoplan']->ic_photo, $data['info_howtoplan']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
$data['info_besttime'] = $this->Information_model->Detail('/travelguide/how-chinahighlights-selects-your-hotel.htm');
|
|
|
|
|
if (!empty($data['info_besttime'])) {
|
|
|
|
|
$data['info_besttime_root'] = $this->Information_model->get_detail_by_path($data['info_besttime']->is_path, 1);//信息所属分类,获取信息顶级节点内容
|
|
|
|
|
$data['info_besttime']->ic_photo = $this->set_photo_content($data['info_besttime']->ic_photo, $data['info_besttime']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
$data['info_topthings'] = $this->Information_model->Detail('/aboutus/who-recommended.htm');
|
|
|
|
|
if (!empty($data['info_topthings'])) {
|
|
|
|
|
$data['info_topthings_root'] = $this->Information_model->get_detail_by_path($data['info_topthings']->is_path, 1);//信息所属分类,获取信息顶级节点内容
|
|
|
|
|
$data['info_topthings']->ic_photo = $this->set_photo_content($data['info_topthings']->ic_photo, $data['info_topthings']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
$data['info_hotel'] = $this->Information_model->Detail('/aboutus/company-history.htm');
|
|
|
|
|
$data['info_hotel']=$this->Information_model->Detail($random_array[rand(0, count($random_array) - 1)]);
|
|
|
|
|
if (!empty($data['info_hotel'])) {
|
|
|
|
|
$data['info_hotel_root'] = $this->Information_model->get_detail_by_path($data['info_hotel']->is_path, 1);//信息所属分类,获取信息顶级节点内容
|
|
|
|
|
$data['info_hotel_root'] = $this->Information_model->get_detail_by_path($data['info_hotel']->is_path, 1);
|
|
|
|
|
$data['info_hotel']->ic_photo = $this->set_photo_content($data['info_hotel']->ic_photo, $data['info_hotel']->ic_content);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|