diff --git a/application/config/config.php b/application/config/config.php index e3b658eb..054f1cfa 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -395,6 +395,7 @@ $config['site'] = [ 'ch' => ['site_code' => 'ch', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => 'https://images.chinahighlights.com', 'site_authors' => ['TDJ', 'ycc'], 'site_user' => ',ycc,'], 'ah' => ['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' => ['X', 'sfx'], 'site_user' => [',ycc,sfx,X,']], 'jh' => ['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' => ['X', 'sfx'], 'site_user' => [',ycc,sfx,X,']], + 'htravel' => ['site_code' => 'htravel', 'site_id' => 187, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.highlightstravel.com', 'site_url' => 'https://www.highlightstravel.com', 'site_sitemap' => '', 'site_authors' => ['X', 'sfx'], 'site_user' => [',ycc,sfx,X,']], 'gh' => ['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' => ['X', 'sfx'], 'site_user' => [',ycc,sfx,X,']], 'gm' => ['site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => ['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' => ['site_code' => 'gh_gm', 'site_id' => 178, 'site_lgc' => '4', 'site_url' => 'https://www.globalhighlights.de', 'site_image_url' => '//www.globalhighlights.de', 'site_authors' => ['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,'], @@ -548,6 +549,7 @@ $config['css_source_mbj'] = 'https://www.mybeijingchina.com/css/layout.c $config['css_source_yz'] = 'https://www.yangtzeriver.org/css/css3/bootstrap/bootstrap.css'; $config['css_source_ah'] = 'https://data.asiahighlights.com/css/mobile-first.css'; $config['css_source_jh'] = 'https://data.japanhighlights.com/css/mobile-first.css'; +$config['css_source_htravel'] = 'https://data.highlightstravel.com/css/mobile-first.css'; $config['css_source_gh'] = 'https://data.globalhighlights.com/css/gh-global.css'; $config['css_source_ct'] = 'https://data.chinatravel.com/css/min.php?f=/css/css3/bootstrap/bootstrap.css,/css/css3/style.css,/css/css3/destination-details.css'; $config['css_source_chinatravel'] = 'https://data.chinatravel.com/css/newcss3/base.css'; @@ -563,6 +565,7 @@ $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']['htravel']['cache_path'] = 'D:\wwwcache\highlightstravel.com'; $config['cache']['chinatravel']['cache_path'] = 'D:\wwwcache\mobile-first\chinatravel.com'; $config['cache']['shanghai']['cache_path'] = 'D:\wwwcache\mobile-first\shanghaihighlights.com'; $config['cache']['beijing']['cache_path'] = 'D:\wwwcache\mobile-first\mybeijingchina.com'; @@ -790,7 +793,7 @@ $config['InfoType_ct'] = [ ]; //AH站点用到了 -$config['InfoType_ah'] = [ +$config['InfoType_htravel'] = [ '国家信息' => 'country_info', '区域信息' => 'area_info', '国家信息列表页' => 'country_info_list', diff --git a/application/controllers/information.php b/application/controllers/information.php index 44badc07..630bc30f 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -484,6 +484,9 @@ class Information extends CI_Controller if (in_array($this->config->item('site_code'), array('ah'))) { $this->config->set_item('templates', $this->config->item('templates_ah')); } + if (in_array($this->config->item('site_code'), array('htravel'))) { + $this->config->set_item('templates', $this->config->item('templates_htravel')); + } if (in_array($this->config->item('site_code'), array('pgr'))) { $this->config->set_item('templates', $this->config->item('templates_pgr')); } @@ -499,8 +502,8 @@ class Information extends CI_Controller if ($Structure->is_sitecode == 'ct') { $data['infoTypeList'] = $this->config->item('InfoType_ct'); - } elseif ($Structure->is_sitecode == 'ah') { - $data['infoTypeList'] = $this->config->item('InfoType_ah'); + } elseif ($Structure->is_sitecode == 'htravel') { + $data['infoTypeList'] = $this->config->item('InfoType_htravel'); } else { switch ($data['rootInformation']->ic_ht_area_type) { case 'c': //城市 @@ -710,12 +713,12 @@ class Information extends CI_Controller $this->make_www_cache('mobile', $information_new, $recommand_information); $this->make_www_cache('pc', $information_new, $recommand_information); //echo ' |000~111: '.$this->benchmark->elapsed_time('000', '111'); - } else if (strcasecmp($site_code, "ah") == 0 && !empty($auto_update_cache)) { + } else if (strcasecmp($site_code, "htravel") == 0 && !empty($auto_update_cache)) { //读取模板生成PC和移动优先文件 $recommand_information = $this->recommand_information($information); $information_new = $this->Information_model->Detail($this->input->post('is_id')); - $this->make_www_cache_ah('mobile', $information_new, $recommand_information); - $this->make_www_cache_ah('pc', $information_new, $recommand_information); + $this->make_www_cache_htravel('mobile', $information_new, $recommand_information); + $this->make_www_cache_htravel('pc', $information_new, $recommand_information); } else if (strcasecmp($site_code, "gh") == 0 && !empty($auto_update_cache)) { $recommand_information = $this->recommand_information($information); $information_new = $this->Information_model->Detail($this->input->post('is_id')); @@ -748,9 +751,9 @@ class Information extends CI_Controller $this->make_www_cache_hly($information_new); } else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) { $update_info_log = $this->update_cache($ic_url); - } else if (strcasecmp($site_code, "ah") == 0 && !empty($auto_update_cache)) { + } else if (strcasecmp($site_code, "htravel") == 0 && !empty($auto_update_cache)) { //$update_info_log = $this->update_cache($ic_url); - } else if (strcasecmp($site_code, "cht") != 0 && strcasecmp($site_code, "gm") != 0 && strcasecmp($site_code, "ah") != 0) { //非cht站点并且非GM并且非AH + } else if (strcasecmp($site_code, "cht") != 0 && strcasecmp($site_code, "gm") != 0 && strcasecmp($site_code, "htravel") != 0) { //非cht站点并且非GM并且非AH $update_info_log = $this->update_cache($ic_url); } else if (strcasecmp($site_code, "ct") == 0 && !empty($auto_update_cache)) { $update_info_log = $this->update_cache($ic_url); @@ -830,9 +833,9 @@ class Information extends CI_Controller if ($this->config->item('site_code') == 'ch') { $this->make_www_cache('pc', $information, $recommand_information); $this->make_www_cache('mobile', $information, $recommand_information); - } else if ($this->config->item('site_code') == 'ah') { - $this->make_www_cache_ah('pc', $information, $recommand_information); - $this->make_www_cache_ah('mobile', $information, $recommand_information); + } else if ($this->config->item('site_code') == 'htravel') { + $this->make_www_cache_htravel('pc', $information, $recommand_information); + $this->make_www_cache_htravel('mobile', $information, $recommand_information); }else if ($this->config->item('site_code') == 'jh') { $this->make_www_cache_jh('pc', $information, $recommand_information); $this->make_www_cache_jh('mobile', $information, $recommand_information); @@ -2179,7 +2182,7 @@ class Information extends CI_Controller file_put_contents($html_path, $template, LOCK_EX); } - public function make_www_cache_ah($device, $information, $recommand_information) + public function make_www_cache_htravel($device, $information, $recommand_information) { $data = array(); @@ -2197,7 +2200,7 @@ class Information extends CI_Controller } else { return false; } - $recommand_template = 'mobile_first/ah-next-mobile'; + $recommand_template = 'mobile_first/htravel-next-mobile'; break; case 'pc': //获取PC的模板,如果有的话 @@ -2208,7 +2211,7 @@ class Information extends CI_Controller } else { return false; } - $recommand_template = 'mobile_first/ah-next'; + $recommand_template = 'mobile_first/htravel-next'; break; default: } @@ -2255,8 +2258,8 @@ class Information extends CI_Controller if (!empty($author)) { $data['author'] = $author->OPI_FirstName; $data['OPI_Code'] = $author->OPI_Code; - $data['author_url'] = $this->get_author_url('www.asiahighlights.com', $author->OPI_Code); - $author_url = $this->get_author_url('www.asiahighlights.com', $author->OPI_Code); + $data['author_url'] = $this->get_author_url('www.highlightstravel.com', $author->OPI_Code); + $author_url = $this->get_author_url('www.highlightstravel.com', $author->OPI_Code); } else { $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 @@ -2318,7 +2321,7 @@ class Information extends CI_Controller } $tips_right_list_content = $this->load->view( - 'mobile_first/ah-tips-right-list', + 'mobile_first/htravel-tips-right-list', array( 'tips_right_a' => $tips_right_a, 'tips_right_b' => $tips_right_b, @@ -2416,7 +2419,7 @@ class Information extends CI_Controller // 水灯节表单 $lantern_form_content = $this->load->view( - 'mobile_first/ah-lantern-form', + 'mobile_first/htravel-lantern-form', array('information' => $information), true ); @@ -2424,7 +2427,7 @@ class Information extends CI_Controller // 水灯节2025表单 $lantern_form_content_2025 = $this->load->view( - 'mobile_first/ah-lantern-form-2025', + 'mobile_first/htravel-lantern-form-2025', array('information' => $information), true ); @@ -2432,7 +2435,7 @@ class Information extends CI_Controller // Chiang Mai Authentic Sky Lantern Festival on Nov. 5, 2025 $lantern_form_content_authentic_sky = $this->load->view( - 'mobile_first/ah-chiang-mai-lantern-festival', + 'mobile_first/htravel-chiang-mai-lantern-festival', array('information' => $information), true ); @@ -2441,7 +2444,7 @@ class Information extends CI_Controller // CAD 跨年表单 $new_year_countdown_form_content = $this->load->view( - 'mobile_first/ah-new-year-countdown', + 'mobile_first/htravel-new-year-countdown', array('information' => $information), true ); @@ -2464,7 +2467,7 @@ class Information extends CI_Controller // 防止触发 Google 网络垃圾政策只返回前三条 $top3_feedback_list = array_slice($feedback_list, 0, 3); $feedback_content = $this->load->view( - 'mobile_first/ah-feedback-list', + 'mobile_first/htravel-feedback-list', array('feedback_list' => $top3_feedback_list), true ); @@ -2486,7 +2489,7 @@ class Information extends CI_Controller $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', + 'mobile_first/htravel-feedback-30-list', array('feedback_list' => $feedback_list), true ); @@ -2513,7 +2516,7 @@ class Information extends CI_Controller } $feedback_city_content = $this->load->view( - 'mobile_first/ah-feedback-city-list', + 'mobile_first/htravel-feedback-city-list', $feedback_city_list, true ); @@ -2526,10 +2529,10 @@ class Information extends CI_Controller } //主样式表,内联模式 - if (is_file('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css')) { //主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 - $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.asiahighlights.com/css/mobile-first.css')); + if (is_file('D:/wwwroot/origin-www.highlightstravel.com/css/mobile-first.css')) { //主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 + $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.highlightstravel.com/css/mobile-first.css')); } else { - $main_css_string = compress_css(GET_HTTP('https://proxy-data.asiahighlights.com/css/mobile-first.css')); + $main_css_string = compress_css(GET_HTTP('https://proxy-data.highlightstravel.com/css/mobile-first.css')); } $template = str_replace('', '', $template); //额外样式 @@ -2560,7 +2563,7 @@ class Information extends CI_Controller $template = str_replace('', '', $template); } //设置内容图片缓加载 - $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.asiahighlights.com/grey.gif'); + $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.highlightstravel.com/grey.gif'); $template = str_replace('', $lazy_content, $template); //Google广告代码 @@ -2581,7 +2584,7 @@ class Information extends CI_Controller // 设置图片尺寸 // 优化过图片目录:D:\wwwroot\origin-images.chinahighlights.com\optimize\ - $www_local_path = 'D:/wwwroot/origin-www.asiahighlights.com'; + $www_local_path = 'D:/wwwroot/origin-www.highlightstravel.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); @@ -5638,7 +5641,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' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh' or $this->config->item('site_code') == 'jh') { //如果是AH CH GH的页面,取消重复检测 + if ($this->config->item('site_code') == 'ah' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh' or $this->config->item('site_code') == 'jh' or $this->config->item('site_code') == 'htravel') { //如果是AH CH GH的页面,取消重复检测 $exclude_ids = array(0); } $result = $this->recommand_information_rule($information, $root_detail, $item, $exclude_ids); @@ -5648,7 +5651,7 @@ 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' or $this->config->item('site_code') == 'jh') { //如果是AH CH GH JH的页面,取消重复检测 + if ($this->config->item('site_code') == 'ah' or $this->config->item('site_code') == 'ch' or $this->config->item('site_code') == 'gh' or $this->config->item('site_code') == 'jh' or $this->config->item('site_code') == 'htravel') { //如果是AH CH GH JH的页面,取消重复检测 $exclude_ids = array(0); } if (empty($data[$item->ir_name])) { @@ -5805,7 +5808,13 @@ class Information extends CI_Controller $url = 'https://www.asiahighlights.com/index.php/information/detail/?static_html_url=' . $url . '&static_html_optimize=comeon'; } break; - + case 'htravel': + if ($delete_only === true) { + $url = 'https://www.highlightstravel.com/index.php/information/delete_cache_8X913mksJ/?static_html_url=' . $url; + } else { // static_html_optimize=comeon 启用静态化压缩和js、css延迟加载 + $url = 'https://www.highlightstravel.com/index.php/information/detail/?static_html_url=' . $url . '&static_html_optimize=comeon'; + } + break; case 'gm': //GET_HTTP("http://148.251.35.42:3300/create-cache/?url=" . urlencode($url)); //请求nodejs静态化更新页面,删除缓存,因为部分页面没有进入信息平台 //if ($delete_only) { diff --git a/application/helpers/info_helper.php b/application/helpers/info_helper.php index cc87ec76..b165469f 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 == 'jh' || $sitecode == 'shanghai' || $sitecode=='beijing' || $sitecode == "trainspread" || $sitecode=="guilin" || $sitecode=="hly") { + if ($sitecode == 'ch' || $sitecode == 'ah' || $sitecode == 'htravel' || $sitecode == 'chinatravel' || $sitecode == 'gh' || $sitecode == 'jh' || $sitecode == 'shanghai' || $sitecode=='beijing' || $sitecode == "trainspread" || $sitecode=="guilin" || $sitecode=="hly") { return true; } else { return false; diff --git a/application/third_party/ctmobilefirst/controllers/api.php b/application/third_party/ctmobilefirst/controllers/api.php index 6317512a..b4d526ae 100644 --- a/application/third_party/ctmobilefirst/controllers/api.php +++ b/application/third_party/ctmobilefirst/controllers/api.php @@ -462,6 +462,14 @@ class Api extends CI_Controller { } + /** + * 获取线路类型列表 + */ + function getLineTypeList(){ + $list = $this->api_model->getLineTypeList(); + echo json_encode($list,JSON_NUMERIC_CHECK); + } + } /* End of file Api.php */ diff --git a/application/third_party/ctmobilefirst/models/api_model.php b/application/third_party/ctmobilefirst/models/api_model.php index caa9d422..c63dcfb8 100644 --- a/application/third_party/ctmobilefirst/models/api_model.php +++ b/application/third_party/ctmobilefirst/models/api_model.php @@ -266,6 +266,7 @@ class Api_model extends CI_Model { * @param {type} $old_pid,$new_pid 父类的Id,分为旧网站的和新网站的 * @return: * @Date Changed: + * 这个目前就只有CT能用 */ function getGuideList($old_pid,$new_pid){ @@ -301,7 +302,7 @@ class Api_model extends CI_Model { ,'2' as sortby , is_sort FROM dbo.infoContents inner join infoStructures on ic_id=is_ic_id - WHERE is_sitecode='".$this->WebCode."' + WHERE is_sitecode='ct' and ic_status=1 and ic_url like ? and is_parent_id <> ? @@ -313,7 +314,7 @@ class Api_model extends CI_Model { ,'1' as sortby ,is_sort FROM dbo.infoContents inner join infoStructures on ic_id=is_ic_id - WHERE is_sitecode='".$this->WebCode."' + WHERE is_sitecode='chinatravel' and ic_status=1 and is_parent_id = ? ) allbt @@ -576,6 +577,74 @@ class Api_model extends CI_Model { + /** + * 获取发布的线路详细页的所有产品对应的线路类型列表。(用于搜索页) + */ + function getLineTypeList(){ + + $sql = " SELECT DISTINCT CLI_LineType + FROM CustomerLineInfo INNER JOIN + CustomerLineInfo2 ON CustomerLineInfo.CLI_SN = CustomerLineInfo2.CLI2_CLI_SN + WHERE (CLI_DEI_SN=".$this->dei_sn.") + AND (CLI_State = 1005004) + AND (CLI2_LGC = ".$this->CTLGC.") + and isnull(CustomerLineInfo2.DeleteFlag,0)=0 + and CLI_NO in ( SELECT convert(varchar(100),( + SELECT TOP 1 im_value + FROM information_ct.dbo.infoMetas + WHERE im_key = 'meta_ct_page_value' + AND im_ic_id = ic_id + )) AS code + FROM information_ct.dbo.infoContents + INNER JOIN information_ct.dbo.infoStructures ON ic_id = is_ic_id + WHERE is_sitecode ='".$this->WebCode."' AND ic_status = 1 + and ic_id in (select im_ic_id from information_ct.dbo.infoMetas where im_key='meta_ct_page_type' and convert(varchar(100),im_value)='tourdetail') + + )"; + + $query =$this->HT->query($sql); + $all_values = array(); + + if ($query->num_rows() > 0) { + foreach ($query->result_array() as $row) { + $column_data = $row['code']; + // 分割逗号分隔的值 + $values = explode(',', $column_data); + // 去除每个值的空白字符 + $values = array_map('trim', $values); + // 合并到总数组 + $all_values = array_merge($all_values, $values); + } + } + + // 去重 + $unique_values = array_unique($all_values); + + // // 重新索引数组(可选) + // $unique_values = array_values($unique_values); + + // // 按数值大小排序(如果需要) + // sort($unique_values, SORT_NUMERIC); + + // 合并为逗号分隔的字符串,所有类型的字符串 + $result_string = implode(',', $unique_values); + + //return $result_string; + $sql2 = " select SYC_SN, SYC2_CodeDiscribe + from SystemCode + inner join SystemCode2 on SYC_SN = SYC2_SYC_SN + where SYC_Type=6 and SYC2_LGC=".$this->CTLGC." and SYC2_CodeDiscribe>'' and SYC_SN in (".$result_string.") "; + + + $query = $this->HT->query($sql2); + if ($query->num_rows()>0){ + return $query->result(); + }else { + return null; + } + + } + } /* End of file Api_model.php */ diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index aeb29732..981d7e3d 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -349,7 +349,7 @@ //ah跳转测试页面 function goto_ahtest_page() { - var site_url = 'https://proxy-www.asiahighlights.com'; + var site_url = 'https://proxy-www.highlightstravel.com'; $('#goto_test_page_button').attr("href", site_url + $('#ic_url').val()); return true; } @@ -759,7 +759,7 @@ function goto_ghtest_page() { name="goto_test_page_button" target="_blank" title="查看测试页面"> -ic_sitecode == 'ah') {?> +ic_sitecode == 'htravel') {?> @@ -2696,7 +2696,7 @@ function goto_ghtest_page() { 忽略URL重复
- config->item('site_code'), ['ch', 'cht', 'gm', 'ah', 'jh', 'gh', 'ct', 'chinatravel', 'shanghai', 'beijing', 'trainspread', 'guilin', 'hly'])) {?> + config->item('site_code'), ['ch', 'cht', 'gm', 'htravel', 'jh', 'gh', 'ct', 'chinatravel', 'shanghai', 'beijing', 'trainspread', 'guilin', 'hly'])) {?>