diff --git a/application/config/config.php b/application/config/config.php index f1e06ef5..2bae1579 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -393,8 +393,10 @@ $config['proxy_ips'] = ''; //各站信息组和人员权限分配 $config['site'] = array( - 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => 'https://images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,si'), 'ch' => array('site_code' => 'ch', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => 'https://images.chinahighlights.com', 'site_authors' => array('TDJ', 'ycc'), 'site_user' => ',ycc,'), + 'ah' => array('site_code' => 'ah', 'site_id' => 141, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.asiahighlights.com', 'site_url' => 'https://www.asiahighlights.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')), + 'jh' => array('site_code' => 'jh', 'site_id' => 186, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.japanhighlights.com', 'site_url' => 'https://www.japanhighlights.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')), + 'gh' => array('site_code' => 'gh', 'site_id' => 163, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.globalhighlights.com', 'site_url' => 'https://www.globalhighlights.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')), 'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), 'gh_gm' => array('site_code' => 'gh_gm', 'site_id' => 178, 'site_lgc' => '4', 'site_url' => 'https://www.globalhighlights.de', 'site_image_url' => '//www.globalhighlights.de', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), @@ -419,9 +421,7 @@ $config['site'] = array( 'cits' => array('site_code' => 'cits', 'site_id' => 10086, 'site_lgc' => '2', 'site_image_url' => '', 'site_url' => 'https://www.guilincits.com'), 'mct' => array('site_code' => 'mct', 'site_id' => 6, 'site_lgc' => '101', 'site_image_url' => '', 'site_url' => 'https://www.mychinatours.com', 'site_authors' => array('cj')), 'diy' => array('site_code' => 'diy', 'site_id' => 99, 'site_lgc' => '1', 'sitemap_name' => 'E:/Dropbox/wwwroot/diychinatours.com/information.sitemap.xml', 'site_image_url' => '//images.diychinatours.com', 'site_url' => 'http://www.diychinatours.com', 'site_sitemap' => 'E:/Dropbox/wwwroot/diychinatours.com/information.sitemap.xml', 'site_authors' => array('ycc,lyy')), - 'ah' => array('site_code' => 'ah', 'site_id' => 141, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.asiahighlights.com', 'site_url' => 'https://www.asiahighlights.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')), - 'gh' => array('site_code' => 'gh', 'site_id' => 163, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.globalhighlights.com', 'site_url' => 'https://www.globalhighlights.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')), - 'pgr' => array('site_code' => 'pgr', 'site_id' => 148, 'site_lgc' => '2', 'sitemap_name' => '', 'site_image_url' => '', 'site_url' => 'https://www.peregrine.cn', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')), + 'pgr' => array('site_code' => 'pgr', 'site_id' => 148, 'site_lgc' => '2', 'sitemap_name' => '', 'site_image_url' => '', 'site_url' => 'https://www.peregrine.cn', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')), 'ts' => array('site_code' => 'ts', 'site_id' => 149, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => '', 'site_url' => 'https://www.trainspread.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')), 'bht' => array('site_code' => 'bht', 'site_id' => 6565, 'site_lgc' => '1', 'site_image_url' => '', 'site_url' => 'https://www.beijinghighlights.com', 'site_authors' => array('cj')), 'trippest' => array('site_code' => 'trippest', 'site_id' => 145, 'site_lgc' => '1', 'site_image_url' => '', 'site_url' => 'https://www.trippest.com', 'site_authors' => array('cj'), 'site_user' => array(',ycc,zp,')), @@ -429,6 +429,7 @@ $config['site'] = array( 'beijing' => array('site_code' => 'beijing', 'site_id' => 98, 'site_lgc' => '106', 'site_url' => 'https://www.mybeijingchina.com', 'site_image_url' => 'https://images.mybeijingchina.com', 'site_authors' => array('ll', 'D'), 'site_user' => ',ycc,vz,bhn,J,wj,ll,D,ZP,lyy,'), 'trainspread' => array('site_code' => 'trainspread', 'site_id' => 149, 'site_lgc' => '1', 'site_url' => 'https://www.trainspread.com', 'site_image_url' => 'https://images.trainspread.com', 'site_authors' => array('ll', 'D'), 'site_user' => ',ycc,vz,bhn,J,wj,ll,D,ZP,lyy,'), 'guilin' => array('site_code' => 'guilin', 'site_id' => 90, 'site_lgc' => '103', 'site_url' => 'https://www.guilinchina.net/', 'site_image_url' => 'https://images.guilinchina.net', 'site_authors' => array('ll', 'D'), 'site_user' => ',ycc,vz,bhn,J,wj,ll,D,ZP,lyy,'), + 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => 'https://images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,si'), ); //静态文件生成路径 @@ -779,6 +780,7 @@ $config['cache']['ru']['cache_path'] = 'D:\wwwcache-intl\chinahighlights.ru'; $config['cache']['it']['cache_path'] = 'D:\wwwcache-intl\viaggio-in-cina.it'; $config['cache']['ch']['cache_path'] = 'D:\wwwcache\chinahighlights.com'; $config['cache']['ah']['cache_path'] = 'D:\wwwcache\asiahighlights.com'; +$config['cache']['jh']['cache_path'] = 'D:\wwwcache\japanhighlights.com'; $config['cache']['gh']['cache_path'] = 'D:\wwwcache\globalhighlights.com'; $config['cache']['chinatravel']['cache_path'] = 'D:\wwwcache\mobile-first\chinatravel.com'; $config['cache']['shanghai']['cache_path'] = 'D:\wwwcache\mobile-first\shanghaihighlights.com'; diff --git a/application/controllers/information.php b/application/controllers/information.php index 2142959c..61fca673 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -92,14 +92,14 @@ class Information extends CI_Controller $Structure = $this->InfoStructures_model->Detail($is_id); //目标文章结构信息 $Structure_parent = $this->InfoStructures_model->Detail($is_parent_id); - //只能移动到本站点下 - if ($Structure->is_sitecode == $Structure_parent->is_sitecode) { + //只能移动到本站点下,20250327改为允许搬迁到其它站点 ycc + //if ($Structure->is_sitecode == $Structure_parent->is_sitecode) { //不能搬迁到自己的子节点下 if (strpos(',' . $Structure_parent->is_path, ',' . $is_id . ',') == false) { $this->InfoStructures_model->set_path($is_parent_id, $is_id); } //信息的区域类型和id也要修改 todo - } + //} $data[] = array('name' => 'ok', 'value' => $this->lang->line('structures_success_move')); echo json_encode($data); $this->Logs_model->move($is_id); @@ -2551,6 +2551,383 @@ class Information extends CI_Controller file_put_contents($html_path, $template, LOCK_EX); } + + public function make_www_cache_jh($device, $information, $recommand_information) + { + + $data = array(); + $data['information'] = $information; + $recommand_template = ''; + $meta_show_advertise = get_meta($information->ic_id, 'meta_show_advertise'); + $data['meta_show_advertise'] = $meta_show_advertise; + switch ($device) { + case 'mobile': + //获取移动优先的模板,如果有的话 + $template_path = 'mobile_first/' . $this->config->item('site_code'); + if (is_file(APPPATH . 'views/' . $template_path . EXT)) { + $template = $this->load->view($template_path, '', true); + $html_path_ext = '-mobile.htm'; + } else { + return false; + } + $recommand_template = 'mobile_first/jh-next-mobile'; + break; + case 'pc': + //获取PC的模板,如果有的话 + $template_path = 'mobile_first/' . $this->config->item('site_code'); + if (is_file(APPPATH . 'views/' . $template_path . '-pc' . EXT)) { + $template = $this->load->view($template_path . '-pc', $data, true); + $html_path_ext = '-pc.htm'; + } else { + return false; + } + $recommand_template = 'mobile_first/jh-next'; + break; + default: + } + + //替换模板中的标签 + $template = str_replace('', $information->ic_seo_title, $template); + $template = str_replace('', $information->ic_seo_description, $template); + $template = str_replace('', $information->ic_seo_keywords, $template); + $template = str_replace('', $this->config->item('site_url') . $information->ic_url, $template); + + //顶部视频 + $data['meta_news_video'] = get_meta($information->ic_id, 'meta_news_video'); + $data['meta_video_picture'] = get_meta($information->ic_id, 'meta_video_picture'); + if (empty($data['meta_news_video']) && empty($data['meta_video_picture'])) { + //没有顶部视频时候才读取全屏大图 + //顶部全屏大图 + if ($device == 'mobile') { //移动端读取移动大图 + $data['meta_addon_picture'] = get_meta($information->ic_id, 'meta_addon_picture_mobile'); + } else { + $data['meta_addon_picture'] = get_meta($information->ic_id, 'meta_addon_picture'); + } + $data['meta_addon_picture_url'] = get_meta($information->ic_id, 'meta_addon_picture_url'); + } + + // AH Home 下层节点名称和链接映射 + $group_map = [ + 278011836 => [ + 'ic_url' => '/about-us', + 'ic_url_title' => 'About Us', + ], + ]; + + $breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map); + $ads_by_google = !empty(get_meta($information->ic_id, 'meta_google_ad_article')); + $data['meta_news_createdate'] = get_meta($information->ic_id, 'meta_news_createdate'); + $data['ads_by_google'] = $ads_by_google; + $data['author'] = ''; //获取作者信息 + $author = $this->Operator_model->get_author_nikename($information->ic_author); + if (!empty($author)) { + $data['author'] = $author->OPI_FirstName; + $data['OPI_Code'] = $author->OPI_Code; + } else { + $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 + if (!empty($author_web)) { + $data['author'] = $author_web->a_name; + } + } + $data['breadcrumb_data'] = $breadcrumb_data; + $template_H1 = $this->load->view($template_path . '-h1', $data, true); + $template = str_replace('', $template_H1, $template); + // 结构化标签:Article + $article_structured_data_content = $this->load->view( + $template_path . '-structured-data-article', + array('information' => $information, 'author' => $data['author']), + true + ); + $template = str_replace('', $article_structured_data_content, $template); + // 结构化标签:BreadcrumbList + $breadcrumb_structured_data_content = $this->load->view( + $template_path . '-structured-data-breadcrumb', + array('breadcrumb_data' => $breadcrumb_data, 'information' => $information), + true + ); + $template = str_replace( + '', + $breadcrumb_structured_data_content, + $template + ); + + //推荐信息或者产品 + $template_recommand = $recommand_information; + $template = str_replace('', $this->load->view($recommand_template, array('recommands' => $template_recommand), true), $template); + //广告,改叫tips,防止被插件屏蔽 + if (!empty($template_recommand['Tips Right']) && ($meta_show_advertise == 'yes' || empty($meta_show_advertise))) { + $template = str_replace('', "
" . $template_recommand['Tips Right']->it_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/ah-tips-right-list', + array( + 'tips_right_a' => $tips_right_a, + 'tips_right_b' => $tips_right_b, + 'tips_right_c' => $tips_right_c, + ), + true + ); + + if (($meta_show_advertise == 'yes' || empty($meta_show_advertise))) { + $template = str_replace('', $tips_right_list_content, $template); + } + + //文中的信息推荐 + if (strpos($information->ic_content, '') !== false) { + $information->ic_content = str_replace('', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), true), $information->ic_content); + } + //文中的线路推荐 + if (strpos($information->ic_content, '') !== false) { + $information->ic_content = str_replace('', $this->load->view($template_path . '-recommends-tour', array('recommands' => $template_recommand), true), $information->ic_content); + } + + //替换内容中广告 + $temp_array = array(); + preg_match_all('^^', $information->ic_content, $temp_array); + if (!empty($temp_array[1])) { + foreach ($temp_array[1] as $key => $item) { + $tips_detail = $this->recommends_and_tips_model->tips_detail($item); + if ($tips_detail) { + $information->ic_content = str_replace($temp_array[0][$key], $tips_detail->it_content, $information->ic_content); + } + } + } + + $meta_product_code = get_meta($information->ic_id, 'meta_product_code'); + // 非产品页面 + if (empty($meta_product_code)) { + $addthis_widget = $this->load->view($template_path . '-add-this', false, true); + $template = str_replace('', $addthis_widget, $template); + $template = str_replace('?product_code=', '', $template); + } else { + $template = str_replace('?product_code=', '?product_code=' . $meta_product_code, $template); + $inquiry_form_template = $this->load->view( + $template_path . '-inquiry-form', + array('meta_product_code' => $meta_product_code, 'information' => $information), + true + ); + $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); + + // GP 表单 + $gp_form_content = $this->load->view( + $template_path . '-gp-form', + array('meta_product_code' => $meta_product_code, 'information' => $information), + true + ); + $information->ic_content = str_replace('', $gp_form_content, $information->ic_content); + + // tour-list 表单 + $tour_list_form_content = $this->load->view( + $template_path . '-tour-list-form', + array('meta_product_code' => $meta_product_code, 'information' => $information), + true + ); + $information->ic_content = str_replace('', $tour_list_form_content, $information->ic_content); + + // 水灯节 GP 线路表单 + $gp_form_content = $this->load->view( + $template_path . '-lantern-festival-gp-form', + array('meta_product_code' => $meta_product_code, 'information' => $information), + true + ); + $information->ic_content = str_replace('', $gp_form_content, $information->ic_content); + } + + $price_tag_list = $this->parse_price_tag($information->ic_content); + + foreach ($price_tag_list as $price_tag) { + $information->ic_content = str_replace( + $price_tag['placeholder'], + $price_tag['price_number'], + $information->ic_content + ); + } + // why-us 相关的标签 + $why_us_mobile = $this->load->view($template_path . '-why-us-mobile', false, true); + $information->ic_content = str_replace('', $why_us_mobile, $information->ic_content); + + $why_us_tour_detail_pc = $this->load->view($template_path . '-why-us-tour-detail-pc', false, true); + $information->ic_content = str_replace('', $why_us_tour_detail_pc, $information->ic_content); + + $why_us_tour_list_pc = $this->load->view($template_path . '-why-us-tour-list-pc', false, true); + $information->ic_content = str_replace('', $why_us_tour_list_pc, $information->ic_content); + + $info_page_form_content = $this->load->view($template_path . '-info-page-form', false, true); + $information->ic_content = str_replace('', $info_page_form_content, $information->ic_content); + + + + // 动态加载反馈标签,第一个城市不足八条,使用第二城市数据。 + // HTLM:
+ // 解析结果:; Siem Reap,Bangkok + $feedback_array = []; + preg_match_all('^^', $information->ic_content, $feedback_array); + if (!empty($feedback_array)) { + foreach ($feedback_array[0] as $index => $tag_name) { + $city_name_string = $feedback_array[1][$index]; + $city_name_list = explode(',', $city_name_string); + $feedback_list = $this->Feedback_model->get_feedback_by_city_list($city_name_list); + // 防止触发 Google 网络垃圾政策只返回前三条 + $top3_feedback_list = array_slice($feedback_list, 0, 3); + $feedback_content = $this->load->view( + 'mobile_first/ah-feedback-list', + array('feedback_list' => $top3_feedback_list), + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_content, + $information->ic_content + ); + } + } + + // 动态加载反馈标签,每个城市三十条反馈。 + // HTLM:
+ // 解析结果:; Bangkok + $feedback30_array = []; + preg_match_all('^^', $information->ic_content, $feedback30_array); + if (!empty($feedback30_array)) { + foreach ($feedback30_array[0] as $index => $tag_name) { + $city_name = $feedback30_array[1][$index]; + $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name); + $feedback_30_content = $this->load->view( + 'mobile_first/ah-feedback-30-list', + array('feedback_list' => $feedback_list), + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_30_content, + $information->ic_content + ); + } + } + + // 集合页面反馈标签 + $feedback_city_array = []; + preg_match_all('^^', $information->ic_content, $feedback_city_array); + if (!empty($feedback_city_array)) { + foreach ($feedback_city_array[0] as $index => $tag_name) { + $city_name_string = $feedback_city_array[1][$index]; + $city_name_list = explode(',', $city_name_string); + $feedback_city_list = []; + foreach ($city_name_list as $index => $city_name) { + $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 5); + $data_name = str_replace(" ", "_", $city_name); + $feedback_city_list[$data_name] = $feedback_list; + } + + $feedback_city_content = $this->load->view( + 'mobile_first/ah-feedback-city-list', + $feedback_city_list, + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_city_content, + $information->ic_content + ); + } + } + + //主样式表,内联模式 + if (is_file('D:/wwwroot/origin-www.japanhighlights.com/css/mobile-first.css')) { //主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 + $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.japanhighlights.com/css/mobile-first.css')); + } else { + $main_css_string = compress_css(GET_HTTP('https://proxy-data.japanhighlights.com/css/mobile-first.css')); + } + $template = str_replace('', '', $template); + //额外样式 + $meta_addon_css = get_meta($information->ic_id, 'meta_addon_css'); + if (!empty($meta_addon_css)) { + //内联方式 + $meta_addon_css_string = compress_css(GET_HTTP($meta_addon_css)); + $template = str_replace('', '', $template); + } + //额外js + $meta_addon_js = get_meta($information->ic_id, 'meta_addon_js'); + if (!empty($meta_addon_js)) { + $template = str_replace('', '', $template); + } + + $meta_note_ogtitle = get_meta($information->ic_id, 'meta_note_ogtitle'); + if (!empty($meta_note_ogtitle)) { + $template = str_replace('', '', $template); + } + + $meta_note = get_meta($information->ic_id, 'meta_note'); + if (!empty($meta_note)) { + $template = str_replace('', '', $template); + } + + $meta_index_set = get_meta($information->ic_id, 'meta_index_set'); + if (!empty($meta_index_set)) { + $template = str_replace('', '', $template); + } + //设置内容图片缓加载 + $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.japanhighlights.com/grey.gif'); + $template = str_replace('', $lazy_content, $template); + + //Google广告代码 + //if (!empty(get_meta($information->ic_id, 'meta_google_ad_content'))) { + $template = str_replace('', '', $template); + //} + //社媒分享图片 + + $full_ic_photo = ''; + if (!empty($information->ic_photo)) { + $full_ic_photo = $this->config->item('site_image_url') . $information->ic_photo; + } else { + $full_ic_photo = get_meta($information->ic_id, 'meta_addon_picture_mobile'); + } + if (!empty($full_ic_photo)) { + $template = str_replace('', '', $template); + } + + // 设置图片尺寸 + // 优化过图片目录:D:\wwwroot\origin-images.chinahighlights.com\optimize\ + $www_local_path = 'D:/wwwroot/origin-www.japanhighlights.com'; + $image_local_path = 'D:/wwwroot/origin-images.chinahighlights.com/optimize'; + if (is_dir($www_local_path) && is_dir($image_local_path)) { + $template = $this->html_optimize_lib->set_image_size_local($template, $www_local_path, $image_local_path); + } else { + $template = $this->html_optimize_lib->set_image_size($template); + } + // /travelguide/chinese-zodiac/monthly-fortune-for-dog.htm + $html_path = $this->config->item('cache')[$this->config->item('site_code')]['cache_path'] . $information->ic_url; + $html_path = str_replace("\\", "/", $html_path); + if (substr($html_path, -1, 1) == '/') { + $html_path = $html_path . 'index.htm'; + } + $html_path .= $html_path_ext; + create_folder_by_path(dirname($html_path)); + file_put_contents($html_path, $template, LOCK_EX); + } /** * @description: CT用的生成静态文件方法.有些内容的替换,CT这边不一样,需要单独处理 zp * @param {type} $device='mobile' or 'pc' diff --git a/application/helpers/info_helper.php b/application/helpers/info_helper.php index cc65b805..68ba1c55 100644 --- a/application/helpers/info_helper.php +++ b/application/helpers/info_helper.php @@ -103,7 +103,7 @@ function is_mobile_first() { $CI = &get_instance(); $sitecode = $CI->config->item('site_code'); - if ($sitecode == 'ch' || $sitecode == 'ah' || $sitecode == 'chinatravel' || $sitecode == 'gh' || $sitecode == 'shanghai' || $sitecode=='beijing' || $sitecode == "trainspread" || $sitecode=="guilin") { + if ($sitecode == 'ch' || $sitecode == 'ah' || $sitecode == 'chinatravel' || $sitecode == 'gh' || $sitecode == 'jh' || $sitecode == 'shanghai' || $sitecode=='beijing' || $sitecode == "trainspread" || $sitecode=="guilin") { return true; } else { return false; diff --git a/application/models/infoStructures_model.php b/application/models/infoStructures_model.php index f88cfb5b..6628f90f 100644 --- a/application/models/infoStructures_model.php +++ b/application/models/infoStructures_model.php @@ -224,13 +224,15 @@ class InfoStructures_model extends CI_Model $set_parent_id = $parent->is_id; $set_level = $parent->is_level + 1; $set_path = $parent->is_path . $is_id . ','; + $set_is_sitecode = $parent->is_sitecode; $set_sql = "UPDATE infoStructures \n" . "SET is_parent_id = ?, \n" . " is_level = ?, \n" - . " is_path = ? \n" + . " is_path = ?, \n" + . " is_sitecode = ? \n" . "WHERE is_id = ?"; - $this->HT->query($set_sql, array($set_parent_id, $set_level, $set_path, $is_id)); + $this->HT->query($set_sql, array($set_parent_id, $set_level, $set_path,$set_is_sitecode, $is_id)); $structure = $this->Detail($is_id); @@ -250,14 +252,16 @@ class InfoStructures_model extends CI_Model $structure = $this->Detail($item->is_parent_id); } $set_parent_id = $structure->is_id; + $set_is_sitecode = $structure->is_sitecode; $set_level = $structure->is_level + 1; $set_path = $structure->is_path . $item->is_id . ','; $set_sql = "UPDATE infoStructures \n" . "SET is_parent_id = ?, \n" . " is_level = ?, \n" - . " is_path = ? \n" + . " is_path = ?, \n" + . " is_sitecode = ? \n" . "WHERE is_id = ?"; - $this->HT->query($set_sql, array($set_parent_id, $set_level, $set_path, $item->is_id)); + $this->HT->query($set_sql, array($set_parent_id, $set_level, $set_path,$set_is_sitecode, $item->is_id)); } } diff --git a/application/views/mobile_first/ah-lantern-form-2025.php b/application/views/mobile_first/ah-lantern-form-2025.php index 30e84a7d..ffa88512 100644 --- a/application/views/mobile_first/ah-lantern-form-2025.php +++ b/application/views/mobile_first/ah-lantern-form-2025.php @@ -1,7 +1,7 @@
-

Chiang Mai CAD Yi Peng Festival 2025

+

Chiang Mai CAD Yi Peng Festival 2025 Ticket Booking

Choose a Date:

@@ -64,11 +64,8 @@
Please select at least one option.
-

Select Ticket Quantity: Adults and children (8+ years)

-

Children under 8 are free.

+

Quantity: Adults & children (8+) – Free for under 8

+
@@ -382,7 +379,6 @@ background: #fff;margin-top: 15px; margin-bottom: 20px; display: none;">

Once payment is received, we'll send your e-ticket within 24 hours.

@@ -619,5 +615,11 @@ background: #fff;margin-top: 15px; margin-bottom: 20px; display: none;"> \ No newline at end of file diff --git a/application/views/mobile_first/ah-new-year-countdown.php b/application/views/mobile_first/ah-new-year-countdown.php index 1eb9d298..57911d99 100644 --- a/application/views/mobile_first/ah-new-year-countdown.php +++ b/application/views/mobile_first/ah-new-year-countdown.php @@ -1,7 +1,7 @@
-

Chiang Mai CAD New Year Countdown on Dec.31st, 2025

+

Chiang Mai CAD New Year Countdown on Dec.31st, 2025

Select an Available Ticket Type:

@@ -98,8 +98,8 @@ -

Select Ticket Quantity: Adults and children (8+ years)

-

Children under 8 are free.

+

Quantity: Adults & children (8+) – Free for under 8

+
@@ -121,9 +121,7 @@
Total price: $129

Please provide correct personal information for your ticket - booking. Double - check.

+ margin-bottom: 10px;">Please provide correct personal info. Double check.

\ No newline at end of file + \ No newline at end of file diff --git a/application/views/mobile_first/jh-h1.php b/application/views/mobile_first/jh-h1.php new file mode 100644 index 00000000..45e84720 --- /dev/null +++ b/application/views/mobile_first/jh-h1.php @@ -0,0 +1,56 @@ +
+
+ + + + <?php echo !empty($information->ic_title)?$information->ic_title:'H1 title asiahighlights mobile first template'; ?> + + +
+
+
+ Home + $item) {?> + + + +
+
+

ic_title)?$information->ic_title:'H1 title asiahighlights mobile first template'; ?>

+
+ 'https://www.globalhighlights.com/aboutus/team/ruru-zhou', + '2' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou', + 'HWT' => 'https://www.globalhighlights.com/aboutus/team/mike-he', + 'CA' => 'https://www.globalhighlights.com/aboutus/team/carol-wang', + 'SI' => 'https://www.globalhighlights.com/aboutus/team/simon-huang', + 'TJQ' => 'https://www.globalhighlights.com/aboutus/team/cindy-tang', + 'CLA' => 'https://www.globalhighlights.com/aboutus/team/claire-wang', + 'Albee' => 'https://www.globalhighlights.com/aboutus/team/albee-ning', + 'KM' => 'https://www.globalhighlights.com/aboutus/team/kimi-huang', + 'RY' => 'https://www.globalhighlights.com/aboutus/team/rita-yu', + 'QMY' => 'https://www.globalhighlights.com/aboutus/team/chris-quan', + 'CY' => 'https://www.globalhighlights.com/aboutus/team/cynthia-li', + 'Vicky' => 'https://www.globalhighlights.com/aboutus/team/vicky-leng', + 'LXW' => 'https://www.globalhighlights.com/aboutus/team/carper-li', + 'zzyGH' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou', +]; +$OPI_Code = empty($OPI_Code) ? '' : $OPI_Code; +if (!empty($meta_news_createdate)) {?> +
+ Written by + + + + + + Updated +
+ \ No newline at end of file diff --git a/application/views/mobile_first/jh-next-mobile.php b/application/views/mobile_first/jh-next-mobile.php new file mode 100644 index 00000000..b4b49ae2 --- /dev/null +++ b/application/views/mobile_first/jh-next-mobile.php @@ -0,0 +1,127 @@ +
+ +

Get Inspired with Some Popular Itineraries

+

At Japan Highlights, we create your kind of journey — your dates, your destinations, at your pace. You can have any trip tailor made for your travel.

+ + + + + + + + + + + + + + + + + + + + + + + + + +

More Travel Ideas and Inspiration

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/application/views/mobile_first/jh-next.php b/application/views/mobile_first/jh-next.php new file mode 100644 index 00000000..cbe05ffa --- /dev/null +++ b/application/views/mobile_first/jh-next.php @@ -0,0 +1,142 @@ +
+ +

Get Inspired with Some Popular Itineraries

+

At Japan Highlights, we create your kind of journey — your dates, your destinations, at your pace. You can have any trip tailor made for your travel.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +

More Travel Ideas and Inspiration

+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + + +
\ No newline at end of file diff --git a/application/views/mobile_first/jh-pc.php b/application/views/mobile_first/jh-pc.php new file mode 100644 index 00000000..212cb99e --- /dev/null +++ b/application/views/mobile_first/jh-pc.php @@ -0,0 +1,509 @@ + + + + + + + <!--@TITLE@--> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+ + + +
+ + +
+ + + + +
+ + + Start planning your tailor-made tour with 1-1 help + from our travel advisors. + Create My Trip + + +
4.9 ExcellentTrustPilot rating + TrustPilot Logo +
+
+ + +
+

Why Asia Highlights

+
+ + + + + + + + + + +
+
+
Customize Your Tour +
+ +

Customize Your Tour

+
    +
  • Travel Advisors Rooted in Asia
  • +
  • Instant Response, No More Waits!
  • +
  • Direct Connections, Supreme Values
  • +
+ +
+
+
+
Maximize Your Flexibility
+

Maximize Your Flexibility

+
    +
  • Your own personal guide and ride.
  • +
  • Explore at your own pace.
  • +
  • Unparalleled flexibility, impossible on a group tour.
  • +
+
+
+
+
Ensure Your Satisfactory
+

Ensure Your Satisfactory

+
    +
  • The Top 20% nationwide guides at your service.
  • +
  • 20% more space on your group's transportation.
  • +
  • 24/7 emergency support.
  • +
+
+
+
+
Celebrate Your Journey +
+

Celebrate Your Journey

+
    +
  • Family adventures
  • +
  • Celebrate milestones with style!
  • +
  • Photographer service for special moments
  • +
+ +
+
+
+
+ +
+
+

Where Can We Take You Today?

+ + + +
+
+ +
+
+
+
+
+ Asia Highlights' logo +
+ tour review + Rated 4.9 out of 5 | 98.8% Excellence
+ China Highlights International
Travel Service Co., LTD +
+
+ +
+ +
+
Language
+ +
+ +
+
Featured on
+ We are recommended by these social medias. +
+ +

Address: Building 6, Chuangyi Business + Park, 70 Qilidian Road, Guilin, Guangxi, 541004, China

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/mobile_first/jh-recommends-article.php b/application/views/mobile_first/jh-recommends-article.php new file mode 100644 index 00000000..8e37666a --- /dev/null +++ b/application/views/mobile_first/jh-recommends-article.php @@ -0,0 +1,110 @@ +
+ +
You might be interested in:
+ + +
+ <?php echo $recommands['Content Article A']->ic_title; ?> + +
ic_title; ?> +
+
+
+
+ + + +
+ <?php echo $recommands['Content Article B']->ic_title; ?> + +
ic_title; ?> +
+
+
+
+ + + + +
+ <?php echo $recommands['Content Article C']->ic_title; ?> + +
ic_title; ?> +
+
+
+
+ + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/application/views/mobile_first/jh-recommends-tour.php b/application/views/mobile_first/jh-recommends-tour.php new file mode 100644 index 00000000..314c4edf --- /dev/null +++ b/application/views/mobile_first/jh-recommends-tour.php @@ -0,0 +1,74 @@ +
+ +
Explore similar itineraries:
+ +
+ <?php echo $recommands['Content Tour A']->ic_title; ?> + +
ic_title; ?> +
+
+
+
+ + + +
+ <?php echo $recommands['Content Tour B']->ic_title; ?> + +
ic_title; ?> +
+
+
+
+ + + + +
+ <?php echo $recommands['Content Tour C']->ic_title; ?> + +
ic_title; ?> +
+
+
+
+ + + +
+ <?php echo $recommands['Content Tour D']->ic_title; ?> + +
ic_title; ?> +
+
+
+
+ + + +
\ No newline at end of file diff --git a/application/views/mobile_first/jh-structured-data-article.php b/application/views/mobile_first/jh-structured-data-article.php new file mode 100644 index 00000000..10969b24 --- /dev/null +++ b/application/views/mobile_first/jh-structured-data-article.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/application/views/mobile_first/jh-structured-data-breadcrumb.php b/application/views/mobile_first/jh-structured-data-breadcrumb.php new file mode 100644 index 00000000..053eb27b --- /dev/null +++ b/application/views/mobile_first/jh-structured-data-breadcrumb.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/application/views/mobile_first/jh.php b/application/views/mobile_first/jh.php new file mode 100644 index 00000000..6de0d85c --- /dev/null +++ b/application/views/mobile_first/jh.php @@ -0,0 +1,439 @@ + + + + + + + <!--@TITLE@--> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + +
+ + + + + + + + +
+
+ Start planning your tailor-made tour with 1-1 help + from our travel advisors. + Create My Trip + +
4.9 ExcellentTrustPilot rating + TrustPilot Logo +
+
+ +
+

Why Asia Highlights

+
+ + + + + + + + + + +
+
+
Customize Your Tour
+ +

Customize Your Tour

+
    +
  • Travel Advisors Rooted in Asia
  • +
  • Instant Response, No More Waits!
  • +
  • Direct Connections, Supreme Values
  • +
+ +
+
+
+
Maximize Your Flexibility
+

Maximize Your Flexibility

+
    +
  • Your own personal guide and ride.
  • +
  • Explore at your own pace.
  • +
  • Unparalleled flexibility, impossible on a group tour.
  • +
+
+
+
+
Ensure Your Satisfactory
+

Ensure Your Satisfactory

+
    +
  • The Top 20% nationwide guides at your service.
  • +
  • 20% more space on your group's transportation.
  • +
  • 24/7 emergency support.
  • +
+
+
+
+
Celebrate Your Journey
+

Celebrate Your Journey

+
    +
  • Family adventures
  • +
  • Celebrate milestones with style!
  • +
  • Photographer service for special moments
  • +
+ +
+
+
+
+ +
+
+

Where Can We Take You Today?

+
+ + +
+
+
+ + +
+
+ Asia Highlights' logo + tour review + Rated 4.9 out of 5 | 98.8% Excellence
+ China Highlights International
Travel Service Co., LTD +
+ + + + + + +
+
+ Featured on + We are recommended by these social medias. + +
+
+ Address + Building 6, Chuangyi Business Park, 70 Qilidian Road, Guilin, Guangxi, 541004, China +
+
+ + +
+ + + + + + + + + + + + + + + + + + \ No newline at end of file