diff --git a/application/controllers/information.php b/application/controllers/information.php index 9816802c..1f9e1ef6 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1,12 +1,13 @@ permission->is_admin(); @@ -49,7 +50,7 @@ class Information extends CI_Controller $data[] = array('name' => 'no', 'value' => $this->lang->line('form_info_error')); } echo json_encode($data); - return TRUE; + return true; } //移动结构顺序 @@ -70,7 +71,7 @@ class Information extends CI_Controller $data[] = array('name' => 'ok', 'value' => $this->lang->line('structures_success_move')); echo json_encode($data); $this->Logs_model->move($idsStr); - return TRUE; + return true; } //把文章移动到任意板块文章下 @@ -98,14 +99,14 @@ class Information extends CI_Controller $data[] = array('name' => 'ok', 'value' => $this->lang->line('structures_success_move')); echo json_encode($data); $this->Logs_model->move($is_id); - return TRUE; + return true; } public function delete($is_id) { //查询结构信息 $Structure = $this->InfoStructures_model->Detail($is_id); - if ($Structure == FALSE) { + if ($Structure == false) { $data[] = array('name' => 'no', 'value' => $this->lang->line('structures_error_notfound')); echo json_encode($data); return false; @@ -135,22 +136,23 @@ class Information extends CI_Controller } //删除成功后返回一个上级链接给用户 $drumpurl = site_url('information/edit/' . $Structure->is_parent_id); - if ($Structure->is_parent_id == 0) + if ($Structure->is_parent_id == 0) { $drumpurl = site_url('/'); + } + $data[] = array('name' => 'ok', 'value' => $drumpurl); echo json_encode($data); return true; } } - public function edit($is_id) { set_time_limit(30); //$this->output->enable_profiler(true); //查询结构信息 $Structure = $this->InfoStructures_model->Detail($is_id); - if ($Structure == FALSE) { + if ($Structure == false) { show_404(); } //查询结构根节点 @@ -207,7 +209,6 @@ class Information extends CI_Controller $this->config->set_item('templates', $this->config->item('templates_gm')); } - if ($Structure->is_sitecode == 'ct') { $data['infoTypeList'] = $this->config->item('InfoType_ct'); } elseif ($Structure->is_sitecode == 'ah') { @@ -254,7 +255,6 @@ class Information extends CI_Controller } } - $data['templateList'] = $this->config->item('templates'); //翰特产品类型 $data['productTypeList'] = $this->config->item('ProductType_HT'); @@ -307,7 +307,7 @@ class Information extends CI_Controller if (is_mobile_first()) { $mobile_first_template_path = 'mobile_first/' . $this->config->item('site_code'); if (is_file(APPPATH . 'views/' . $mobile_first_template_path . EXT)) { - $data['mobile_first_template'] = $this->load->view($mobile_first_template_path, '', TRUE); + $data['mobile_first_template'] = $this->load->view($mobile_first_template_path, '', true); //主样式表,内联模式 $main_css_string = compress_css(GET_HTTP('https://proxy-data.chinahighlights.com/css/mobile-first.css')); $data['mobile_first_template'] = str_replace('', '', $data['mobile_first_template']); @@ -328,13 +328,11 @@ class Information extends CI_Controller } } - $this->load->view('bootstrap3/header', $data); $this->load->view('bootstrap3/information_edit'); $this->load->view('bootstrap3/footer'); } - public function edit_save() { header('Cache-Control: no-cache'); @@ -356,7 +354,7 @@ class Information extends CI_Controller $this->form_validation->set_rules('ic_seo_title', 'lang:ic_seo_title', 'required'); $this->form_validation->set_rules('ic_seo_description', 'lang:ic_seo_description', 'required|max_length[250]'); } - if ($this->form_validation->run() == FALSE) { + if ($this->form_validation->run() == false) { $data = array(); foreach ($this->form_validation->_error_array as $key => $value) { $data[] = array('name' => $key, 'value' => $value); @@ -474,7 +472,7 @@ class Information extends CI_Controller '210000021' => 'http://www.chinahighlights.com/author/matthew/', '200000013' => 'http://www.chinahighlights.com/author/kit-onslow-smith/', '202000018' => 'http://www.chinahighlights.com/author/klaus-capra/', - '202000017' => 'http://www.chinahighlights.com/author/christy-campbell/' + '202000017' => 'http://www.chinahighlights.com/author/christy-campbell/', ); $key = $this->input->post('ic_author'); if (isset($author_pages[$key])) { @@ -487,7 +485,7 @@ class Information extends CI_Controller } //URL不重复检查 - function ic_url_check() + public function ic_url_check() { if ($this->input->post('ignore_url_check')) { return true; @@ -502,7 +500,7 @@ class Information extends CI_Controller } //URL格式检查,不能包含大小写、空格等特殊字符 - function ic_url_format($url) + public function ic_url_format($url) { if ($url != mb_strtolower($url) || strpos($url, ' ') !== false || strpos($url, '--') !== false || strpos($url, ')') !== false || strpos($url, '(') !== false || strpos($url, '//') !== false || strpos($url, '\\') !== false) { return false; @@ -543,7 +541,7 @@ class Information extends CI_Controller } //静态文件操作 - function html_file_helper($active = 'find', $ic_url = false) + public function html_file_helper($active = 'find', $ic_url = false) { if (empty($ic_url)) { $ic_url = $this->input->get_post('ic_url'); @@ -583,7 +581,7 @@ class Information extends CI_Controller } //生成静态文件 $device='mobile' or 'pc' - function make_www_cache($device, $information, $recommand_information) + public function make_www_cache($device, $information, $recommand_information) { $data = array(); switch ($device) { @@ -591,7 +589,7 @@ class Information extends CI_Controller //获取移动优先的模板,如果有的话 $template_path = 'mobile_first/' . $this->config->item('site_code'); if (is_file(APPPATH . 'views/' . $template_path . EXT)) { - $template = $this->load->view($template_path, '', TRUE); + $template = $this->load->view($template_path, '', true); $html_path_ext = '-mobile.htm'; } else { return false; @@ -601,7 +599,7 @@ class Information extends CI_Controller //获取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', '', TRUE); + $template = $this->load->view($template_path . '-pc', '', true); $html_path_ext = '-pc.htm'; } else { return false; @@ -666,7 +664,7 @@ class Information extends CI_Controller //火车票搜索框添加 -- zp if ($information->is_parent_id == "278008234") { //本地测试的火车父类ID为:278035939 。网前为:278008234 - $template_TrainSearch = $this->load->view($template_path . '-train-detail', null, TRUE); + $template_TrainSearch = $this->load->view($template_path . '-train-detail', null, true); $template = str_replace('', $template_TrainSearch, $template); } @@ -695,11 +693,12 @@ class Information extends CI_Controller $data_H1['breadcrumb_data'] = $breadcrumb_data; $data_H1['ads_by_google'] = $ads_by_google; $data_H1['ic_datetime'] = $information->ic_datetime; - $template_H1 = $this->load->view($template_path . '-h1', $data_H1, TRUE); + $template_H1 = $this->load->view($template_path . '-h1', $data_H1, true); $template = str_replace('', $template_H1, $template); $addthis_widget = $this->load->view($template_path . '-add-this', false, true); $template = str_replace('', $addthis_widget, $template); + $template = str_replace('?product_code=', '', $template); $article_structured_data_content = $this->load->view( $template_path . '-structured-data-article', @@ -708,7 +707,6 @@ class Information extends CI_Controller ); $template = str_replace('', $article_structured_data_content, $template); - $article_top_image_content = $this->load->view( $template_path . '-info-top-img', array('information' => $information), @@ -719,7 +717,8 @@ class Information extends CI_Controller $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); } else { - $inquiry_form_template = $this->load->view($template_path . '-inquiry-form', array('meta_product_code' => $meta_product_code), true); + $inquiry_form_template = $this->load->view($template_path . '-inquiry-form', array('meta_product_code' => $meta_product_code), true); + $template = str_replace('?product_code=', '?product_code=' . $meta_product_code, $template); $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); $breadcrumb_content = $this->load->view($template_path . '-breadcrumb', array('breadcrumb_data' => $breadcrumb_data), true); @@ -756,11 +755,11 @@ class Information extends CI_Controller //获取翰特对应信息 $dataTrippest['PagDetail'] = $this->trippest_model->get_pagdetail($meta_product_code); //所属那个目的地 select SYC_SN,SYC2_CodeDiscribe from dbo.V_System_Code where SYC_Type=132 and LGC_LGC=2 - // 132001 北京目的地 - // 132002 上海目的地 - // 132003 西安目的地 - // 132004 桂林目的地 - // 132005 成都目的地 + // 132001 北京目的地 + // 132002 上海目的地 + // 132003 西安目的地 + // 132004 桂林目的地 + // 132005 成都目的地 $PAG_SourceType = $dataTrippest['PagDetail']->PAG_SourceType; switch ($PAG_SourceType) { case '132001': @@ -826,7 +825,7 @@ class Information extends CI_Controller //信息推荐 $template_recommand = $recommand_information; //$this->recommand_information($information); 从外面传进来,pc和移动只需要查一次,减少数据库负担 - $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), TRUE), $template); + $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), true), $template); // //广告,改叫tips,防止被插件屏蔽 if (!empty($template_recommand['Tips Right TOP'])) { $template = str_replace('', "
", $template); @@ -836,11 +835,11 @@ class Information extends CI_Controller } //文中的信息推荐 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); + $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); + $information->ic_content = str_replace('', $this->load->view($template_path . '-recommends-tour', array('recommands' => $template_recommand), true), $information->ic_content); } // 未勾选In Article 广告时,加入标签 ,让 ezoic 识别出该页面不展示广告。 @@ -880,14 +879,13 @@ class Information extends CI_Controller // 火车票首页搜索框 --zp $template_TrainSearch = ""; if ($information->ic_url == "/china-trains/hometest.htm" || $information->ic_url == "/china-trains/") { - $template_TrainSearch = $this->load->view($template_path . '-train-index', null, TRUE); + $template_TrainSearch = $this->load->view($template_path . '-train-index', null, true); if ($device == "mobile") { //手机端的搜索框直接显示,不再加背景图,这样可以保证CLS分数。 $template = str_replace('', '
' . $template_TrainSearch . '
', $template); } } - $meta_addon_picture_url = get_meta($information->ic_id, 'meta_addon_picture_url'); if (!empty($meta_addon_picture)) { if (!empty($meta_addon_picture_url)) { @@ -963,8 +961,7 @@ class Information extends CI_Controller file_put_contents($html_path, $template, LOCK_EX); } - - function make_www_cache_gh($device, $information, $recommand_information) + public function make_www_cache_gh($device, $information, $recommand_information) { $data = array(); switch ($device) { @@ -972,7 +969,7 @@ class Information extends CI_Controller //获取移动优先的模板,如果有的话 $template_path = 'mobile_first/' . $this->config->item('site_code'); if (is_file(APPPATH . 'views/' . $template_path . EXT)) { - $template = $this->load->view($template_path, '', TRUE); + $template = $this->load->view($template_path, '', true); $html_path_ext = '-mobile.htm'; } else { return false; @@ -982,7 +979,7 @@ class Information extends CI_Controller //获取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', '', TRUE); + $template = $this->load->view($template_path . '-pc', '', true); $html_path_ext = '-pc.htm'; } else { return false; @@ -995,12 +992,12 @@ class Information extends CI_Controller $group_map = [ 278009289 => [ 'ic_url' => '/destinations', - 'ic_url_title' => 'Destinations' + 'ic_url_title' => 'Destinations', ], 278009290 => [ 'ic_url' => '/about', - 'ic_url_title' => 'About Us' - ] + 'ic_url_title' => 'About Us', + ], ]; $breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map); @@ -1059,7 +1056,7 @@ class Information extends CI_Controller $data_H1['ic_photo'] = $meta_addon_picture; //$information->ic_photo; 用额外设置的图片替代 $data_H1['breadcrumb_data'] = $breadcrumb_data; $data_H1['ads_by_google'] = $ads_by_google; - $template_H1 = $this->load->view($template_path . '-h1', $data_H1, TRUE); + $template_H1 = $this->load->view($template_path . '-h1', $data_H1, true); $template = str_replace('', $template_H1, $template); if (empty($meta_product_code)) { @@ -1082,7 +1079,7 @@ class Information extends CI_Controller //信息推荐 $template_recommand = $recommand_information; //$this->recommand_information($information); 从外面传进来,pc和移动只需要查一次,减少数据库负担 - $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), TRUE), $template); + $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), true), $template); // //广告,改叫tips,防止被插件屏蔽 if (!empty($template_recommand['Tips Right TOP'])) { // $template = str_replace('', "
", $template); @@ -1179,8 +1176,7 @@ class Information extends CI_Controller file_put_contents($html_path, $template, LOCK_EX); } - - function make_www_cache_ah($device, $information, $recommand_information) + public function make_www_cache_ah($device, $information, $recommand_information) { $data = array(); @@ -1190,7 +1186,7 @@ class Information extends CI_Controller //获取移动优先的模板,如果有的话 $template_path = 'mobile_first/' . $this->config->item('site_code'); if (is_file(APPPATH . 'views/' . $template_path . EXT)) { - $template = $this->load->view($template_path, '', TRUE); + $template = $this->load->view($template_path, '', true); $html_path_ext = '-mobile.htm'; } else { return false; @@ -1200,7 +1196,7 @@ class Information extends CI_Controller //获取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', '', TRUE); + $template = $this->load->view($template_path . '-pc', '', true); $html_path_ext = '-pc.htm'; } else { return false; @@ -1233,12 +1229,12 @@ class Information extends CI_Controller $group_map = [ 278002667 => [ 'ic_url' => '/destinations', - 'ic_url_title' => 'Destinations' + 'ic_url_title' => 'Destinations', ], 278008885 => [ 'ic_url' => '/about-us', - 'ic_url_title' => 'About Us' - ] + 'ic_url_title' => 'About Us', + ], ]; $breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map); @@ -1255,7 +1251,7 @@ class Information extends CI_Controller } } $data['breadcrumb_data'] = $breadcrumb_data; - $template_H1 = $this->load->view($template_path . '-h1', $data, TRUE); + $template_H1 = $this->load->view($template_path . '-h1', $data, true); $template = str_replace('', $template_H1, $template); // 结构化标签:Article $article_structured_data_content = $this->load->view( @@ -1279,18 +1275,18 @@ class Information extends CI_Controller //推荐信息或者产品 //信息推荐 $template_recommand = $recommand_information; // $this->recommand_information($information); - $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), TRUE), $template); + $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), true), $template); //广告,改叫tips,防止被插件屏蔽 if (!empty($template_recommand['Tips Right'])) { $template = str_replace('', "
" . $template_recommand['Tips Right']->it_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); + $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); + $information->ic_content = str_replace('', $this->load->view($template_path . '-recommends-tour', array('recommands' => $template_recommand), true), $information->ic_content); } //替换内容中广告 @@ -1418,7 +1414,6 @@ class Information extends CI_Controller $lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.asiahighlights.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); @@ -1482,13 +1477,13 @@ class Information extends CI_Controller * @return: * @Date Changed: */ - function make_www_cache_ct($information) + public function make_www_cache_ct($information) { $data = array(); #region 公用数据 //$apiurl = "http://202.103.68.104:61/info.php"; //本地测试 - $apiurl = "https://ct.mycht.cn/info.php"; //网前 + $apiurl = "https://ct.mycht.cn/info.php"; //网前 //先准备数据,CT采用直接赋值视图然后返回视图字符串的模式,不使用一次次替换视图模板内容的模式。 $data["TITLE"] = $information->ic_seo_title; @@ -1521,10 +1516,10 @@ class Information extends CI_Controller } //火车票详细页搜索框添加 -- zp - $meta_ct_page_trainform = get_meta($information->ic_id, 'meta_ct_page_trainform'); //是否插入火车票搜索框 - $template_TrainDetailSearch=""; + $meta_ct_page_trainform = get_meta($information->ic_id, 'meta_ct_page_trainform'); //是否插入火车票搜索框 + $template_TrainDetailSearch = ""; if ($meta_ct_page_trainform == "yes" || $information->is_parent_id == "278014609") { - $template_TrainDetailSearch = $this->load->view($template_path . '-train-detail', null, TRUE); + $template_TrainDetailSearch = $this->load->view($template_path . '-train-detail', null, true); } /* 详细内容 */ @@ -1533,9 +1528,9 @@ class Information extends CI_Controller #region old replace // /**替换详细内容里面的价格 /* 直接使用fetch来动态获取价格,这样不用替换标签,直接录标签 - // * // 一日游价格标签, "" 或者 逗号后面是人数 - // * //精华线路标签"" - // */ + // * // 一日游价格标签, "" 或者 逗号后面是人数 + // * //精华线路标签"" + // */ // $ic_content = preg_replace_callback('//i',function($match){ // //处理一日游每次配备 // $matchItem = $match[1]; @@ -1549,12 +1544,12 @@ class Information extends CI_Controller #enregion /** 替换H1加面包屑,加作者 */ - $ic_content = preg_replace('/

(.*)<\/h1>/i', $crumb . "\r\n" . '

$1

' . "\r\n" . $str_author .$template_TrainDetailSearch . "\r\n", $ic_content, 1); + $ic_content = preg_replace('/

(.*)<\/h1>/i', $crumb . "\r\n" . '

$1

' . "\r\n" . $str_author . $template_TrainDetailSearch . "\r\n", $ic_content, 1); /**替换zodiac标签 */ if (strpos($ic_content, '') !== false) { $zodiacCalc = $this->load->view('mobile_first/' . $this->config->item('site_code') . '-zodiac-calc', false, true); - $ic_content = str_replace('', $zodiacCalc, $ic_content); + $ic_content = str_replace('', $zodiacCalc, $ic_content); } //图片加延迟 @@ -1564,7 +1559,6 @@ class Information extends CI_Controller $data["CUSTOMCONENT"] = $ic_content; - //非产品页面 $data["PRODUCTJS"] = ""; $data["ISPRODUCT"] = "no"; //判断是否是产品页 @@ -1576,7 +1570,6 @@ class Information extends CI_Controller $data["ISPRODUCT"] = "yes"; } - //顶部视频 $data["TOPVIDEO"] = ""; $meta_news_video = get_meta($information->ic_id, 'meta_news_video'); @@ -1585,7 +1578,6 @@ class Information extends CI_Controller $data["TOPVIDEO"] = ''; } - //主样式表,内联模式 //$apiweb="http://202.103.68.104"; //本地测试 $apiweb = "https://data.chinatravel.com"; @@ -1624,7 +1616,7 @@ class Information extends CI_Controller //总JS:为了方便以后js好维护,必须的把一些公用的JS统计到一个文件。但是又不是所有页面都需要调用这个基础js,所以必须在这里进行判断 $addBaseJs = false; $addonJs = ""; - $meta_ct_page_price = get_meta($information->ic_id, 'meta_ct_page_price'); //是否包含价格 + $meta_ct_page_price = get_meta($information->ic_id, 'meta_ct_page_price'); //是否包含价格 if ($meta_ct_page_price == "yes") { $addBaseJs = true; @@ -1658,7 +1650,6 @@ class Information extends CI_Controller $addonJs .= ''; } - //页面传递参数 $passParam = ""; if (in_array($meta_ct_page_type, array("daytripindex", "tourindex", "attractionindex", "weatherpage"))) { //一日游和线路列表 @@ -1673,12 +1664,10 @@ class Information extends CI_Controller $passParam .= ''; } - //加信息平台的is_id $passParam .= ''; } - //产品详细页 $productType = ""; $productCode = ""; @@ -1710,8 +1699,8 @@ class Information extends CI_Controller //调取模板 $dataform["TourCode"] = $productCode; $dataform["CLI_SN"] = $tourdata->clisn; - $dataform["TourName"] = $information->ic_title;; - $template_form_tourqi = $this->load->view($template_path . '-form-tourqi', $dataform, TRUE); + $dataform["TourName"] = $information->ic_title; + $template_form_tourqi = $this->load->view($template_path . '-form-tourqi', $dataform, true); $data["template_form_tourqi"] = $template_form_tourqi; //表单模板字符串 } @@ -1724,7 +1713,7 @@ class Information extends CI_Controller $productCode = $meta_ct_page_value; } $dataCruise["shipname"] = $productCode; - $template_curisedetails = $this->load->view($template_path . '-cruisedetails-form', $dataCruise, TRUE); + $template_curisedetails = $this->load->view($template_path . '-cruisedetails-form', $dataCruise, true); $data["template_curisedetails"] = $template_curisedetails; } @@ -1738,7 +1727,6 @@ class Information extends CI_Controller $data["productType"] = $productType; $data["productCode"] = $productCode; - //页面添加的元素 $data["ADDONJS"] = $addonJs; $data["passParam"] = $passParam; @@ -1775,7 +1763,7 @@ class Information extends CI_Controller $template_TrainSearch = ""; if ($information->ic_url == "/china-trains/hometest" || $information->ic_url == "/china-trains") { //火车票首页 - $template_TrainSearch = $this->load->view($template_path . '-train-index', null, TRUE); + $template_TrainSearch = $this->load->view($template_path . '-train-index', null, true); $ImgText = ""; //火车票移动端去掉头部图片,保证搜索框CLS if ($device == 'mobile') { @@ -1784,7 +1772,7 @@ class Information extends CI_Controller } } 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); $ImgText = ""; //飞机票移动端去掉头部图片,保证搜索框CLS if ($device == 'mobile') { @@ -1801,14 +1789,13 @@ class Information extends CI_Controller } } - //两种设备分别调用两种模板 ,静态化 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, $data, TRUE); + $template = $this->load->view($template_path, $data, true); $html_path_ext = '-mobile.htm'; } else { return false; @@ -1818,7 +1805,7 @@ class Information extends CI_Controller //获取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); + $template = $this->load->view($template_path . '-pc', $data, true); $html_path_ext = '-pc.htm'; } else { return false; @@ -1827,7 +1814,6 @@ class Information extends CI_Controller default: } - //生成静态文件 $html_path = $this->config->item('cache')[$this->config->item('site_code')]['cache_path'] . $information->ic_url; $html_path = str_replace("\\", "/", $html_path); @@ -1843,7 +1829,7 @@ class Information extends CI_Controller } //通过内容找到第一张图片 - function set_photo_content($ic_photo, $ic_content) + public function set_photo_content($ic_photo, $ic_content) { if (empty($ic_photo)) { $images = get_image_url_by_source($ic_content); @@ -1857,7 +1843,7 @@ class Information extends CI_Controller } //根据推荐规则进行查询 - function recommand_information_rule($information, $root_information, $recommand, &$exclude_ids) + public function recommand_information_rule($information, $root_information, $recommand, &$exclude_ids) { $data = array(); switch ($recommand->ir_rule) { @@ -1890,7 +1876,7 @@ class Information extends CI_Controller return array($recommand->ir_name => false); break; default: //'rule_parent'://继承上级规则则留空,程序会循环一遍分组的规则 - return false;; + return false; } //读取备用节点 if (empty($data) && !empty($recommand->ir_urls)) { //查不到信息并且备选urls不为空,则随机选一条 @@ -1915,7 +1901,7 @@ class Information extends CI_Controller } //获取当前信息所有的推荐信息和广告内容 - function recommand_information($information) + public function recommand_information($information) { $data = array(); $group_detail = $this->Information_model->get_detail_by_path($information->is_path, 0); //信息所属分组,根据分组进行不同推荐 @@ -1944,7 +1930,7 @@ class Information extends CI_Controller return $data; } - function call_mobile_template_NEXT($template_path, $is_id) + public function call_mobile_template_NEXT($template_path, $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); //信息所属分组,根据分组进行不同推荐 @@ -1975,7 +1961,7 @@ class Information extends CI_Controller '/travelguide/article-what-chinese-eat-for-breakfast.htm', '/travelguide/china-top-10-attractions.htm', '/travelguide/chinese-food/eight-chinese-dishes.htm', - '/travelguide/china-travel-reopen-restrictions.htm' + '/travelguide/china-travel-reopen-restrictions.htm', ); $data['info_topthings'] = $this->Information_model->Detail($random_array[rand(0, count($random_array) - 1)]); if (!empty($data['info_topthings'])) { @@ -1992,7 +1978,7 @@ class Information extends CI_Controller '/travelguide/kungfu/', '/travelguide/culture/china-history.htm', '/travelguide/chinese-food/', - '/travelguide/chinese-language/' + '/travelguide/chinese-language/', ); $data['info_hotel'] = $this->Information_model->Detail($random_array[rand(0, count($random_array) - 1)]); if (!empty($data['info_hotel'])) { @@ -2039,7 +2025,7 @@ class Information extends CI_Controller '/travelguide/article-private-tour-vs-group-tour.htm', '/aboutus/who-recommended.htm', '/aboutus/no-shops.htm', - '/aboutus/company-history.htm' + '/aboutus/company-history.htm', ); $data['info_hotel'] = $this->Information_model->Detail($random_array[rand(0, count($random_array) - 1)]); if (!empty($data['info_hotel'])) { @@ -2051,10 +2037,9 @@ class Information extends CI_Controller return ''; } - return $this->load->view($template_path . '-next', $data, TRUE); + return $this->load->view($template_path . '-next', $data, true); } - //更新静态文件 //不用参数提交的原因是可能url带有特殊字符,CI会报错 public function update_cache($static_html_url = false, $delete_only = false) @@ -2067,11 +2052,11 @@ class Information extends CI_Controller switch ($this->config->item('site_code')) { case 'cht': $search_list = $this->Information_model->search_url($url); - $amp_request = FALSE; + $amp_request = false; foreach ($search_list as $key => $req_url) { $meta_amp_status = get_meta($req_url->ic_id, 'AMP_STATUS'); if ($meta_amp_status) { - $amp_request = TRUE; + $amp_request = true; } } if ($amp_request) { @@ -2126,20 +2111,20 @@ class Information extends CI_Controller $cache_url = $this->input->post('cache_url'); if ($url && !$cache_url) { /* - ignore_user_abort(true); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_TIMEOUT, 1); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查 - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); // 从证书中检查SSL加密算法是否存在 - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //禁止直接显示获取的内容 - curl_setopt($ch, CURLOPT_HEADER, 0); //不需要HEAD - curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); - curl_setopt($ch, CURLOPT_NOBODY, 1); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - curl_exec($ch); + ignore_user_abort(true); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_TIMEOUT, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查 + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); // 从证书中检查SSL加密算法是否存在 + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //禁止直接显示获取的内容 + curl_setopt($ch, CURLOPT_HEADER, 0); //不需要HEAD + curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); + curl_setopt($ch, CURLOPT_NOBODY, 1); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_exec($ch); curl_close($ch); - */ + */ $data['async_update'] = $url; $data[] = array('name' => 'ok', 'value' => '信息保存成功,请在8秒后检查更新页面。', 'url' => $url); //如果是外部调用就返回结果,内部就不返回了 @@ -2196,8 +2181,9 @@ class Information extends CI_Controller $update_site = array('jp', 'ru'); //需要更新CDN的站点 //需要更新的url $url = $static_html_url; - if (empty($url)) + if (empty($url)) { $url = $this->input->post('cache_url'); + } //如果传递进来的url是带有域名,则对域名进行判断 $tempu = parse_url($url); @@ -2209,8 +2195,10 @@ class Information extends CI_Controller else { $url = str_replace($this->config->item('site_url'), '', $url); $pad = str_replace('http://', '', $this->config->item('site_url')); - if (in_array($this->config->item('site_code'), $update_site)) - $flag = TRUE; + if (in_array($this->config->item('site_code'), $update_site)) { + $flag = true; + } + } //默认更新成功,如果不成功,则返回错误提示信息 @@ -2218,14 +2206,16 @@ class Information extends CI_Controller if ($flag) { $result = GET_HTTP('https://openapi.us.cdnetworks.com/purge/rest/doPurge?user=ycc@chinahighlights.com&pass=cXi2UbsTrw9Urv@&pad=' . $pad . '&type=item&path=' . $url . '&output=json'); $result = json_decode($result, true); - if ($result['resultCode'] != 200) + if ($result['resultCode'] != 200) { $notice = $result['notice'] . $result['details']; + } + } return $notice; } //获取产品信息,提供给用户选择进行绑定 - function get_products() + public function get_products() { $HT_productType = $this->input->post('product_type'); $HT_productName = $this->input->post('product_name'); @@ -2247,7 +2237,7 @@ class Information extends CI_Controller } //显示备份的内容 - function backup_content($log_id) + public function backup_content($log_id) { $data['log_info'] = $this->Logs_model->read($log_id); if ($data['log_info']->log_action == 'backup_amp') { @@ -2261,7 +2251,7 @@ class Information extends CI_Controller } //保存自定义配置 - function save_meta() + public function save_meta() { $im_ic_id = $this->input->post('im_ic_id'); $im_key = $this->input->post('im_key'); @@ -2282,7 +2272,7 @@ class Information extends CI_Controller } //保存自定义配置 - function delete_meta() + public function delete_meta() { $im_ic_id = $this->input->post('im_ic_id'); $im_key = $this->input->post('im_key'); diff --git a/application/third_party/order/controllers/confirm.php b/application/third_party/order/controllers/confirm.php index 20b1a8bd..6ed5c55a 100644 --- a/application/third_party/order/controllers/confirm.php +++ b/application/third_party/order/controllers/confirm.php @@ -47,6 +47,7 @@ class Confirm extends CI_Controller { $this->load->view($site_code.'/confirm_order', $data); } + // https://www.chinahighlights.com/secureinfoconfirm/confirm/test/991733/20230314153025/82899713caf652fc5e4cbe76655bdd3f/ah public function test($COLI_SN = false, $visitor_link = false, $token = false,$site_code='') { $data = array(); if (empty($COLI_SN)) { diff --git a/application/third_party/order/views/ah/confirm_order.php b/application/third_party/order/views/ah/confirm_order.php index 258c51e9..604a4827 100644 --- a/application/third_party/order/views/ah/confirm_order.php +++ b/application/third_party/order/views/ah/confirm_order.php @@ -335,6 +335,25 @@ dd.ui_tpicker_time { .ui-timepicker-div .ui_tpicker_unit_hide{ display: none; } .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide, .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; } +label.gender { + font-size: 19px; + font-weight: 400; + text-align: center; + margin-right: 10px; + float: left; + border: 1px solid #d1d1d1; + padding: 10px; + border-radius: 4px; +} +label.gender:hover { + cursor: pointer; + color: #fff; + background: #ad1818; +} +.tmpick:checked+label { + background: #ad1818; + color: #fff; +} @@ -374,6 +393,19 @@ dd.ui_tpicker_time {

Traveler 1

+
+ + + + +
@@ -738,7 +770,7 @@ dd.ui_tpicker_time {
- + @@ -754,7 +786,7 @@ dd.ui_tpicker_time {
- + diff --git a/application/third_party/order/views/confirm_order.php b/application/third_party/order/views/confirm_order.php index a8b8bb32..32dd0ea2 100644 --- a/application/third_party/order/views/confirm_order.php +++ b/application/third_party/order/views/confirm_order.php @@ -335,6 +335,25 @@ dd.ui_tpicker_time { .ui-timepicker-div .ui_tpicker_unit_hide{ display: none; } .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide, .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; } +label.gender { + font-size: 19px; + font-weight: 400; + text-align: center; + margin-right: 10px; + float: left; + border: 1px solid #d1d1d1; + padding: 10px; + border-radius: 4px; +} +label.gender:hover { + cursor: pointer; + color: #fff; + background: #ad1818; +} +.tmpick:checked+label { + background: #ad1818; + color: #fff; +} @@ -374,6 +393,19 @@ dd.ui_tpicker_time {

Traveler 1

+
+ + + + +
@@ -738,7 +770,7 @@ dd.ui_tpicker_time {
- + @@ -754,7 +786,7 @@ dd.ui_tpicker_time {
- + diff --git a/application/third_party/order/views/gh/confirm_order.php b/application/third_party/order/views/gh/confirm_order.php index 70e86ee5..50250c38 100644 --- a/application/third_party/order/views/gh/confirm_order.php +++ b/application/third_party/order/views/gh/confirm_order.php @@ -335,6 +335,26 @@ dd.ui_tpicker_time { .ui-timepicker-div .ui_tpicker_unit_hide{ display: none; } .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide, .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; } + +label.gender { + font-size: 19px; + font-weight: 400; + text-align: center; + margin-right: 10px; + float: left; + border: 1px solid #d1d1d1; + padding: 10px; + border-radius: 4px; +} +label.gender:hover { + cursor: pointer; + color: #fff; + background: #ad1818; +} +.tmpick:checked+label { + background: #ad1818; + color: #fff; +} @@ -374,6 +394,19 @@ dd.ui_tpicker_time {

Traveler 1

+
+ + + + +
@@ -738,7 +771,7 @@ dd.ui_tpicker_time {
- + @@ -754,7 +787,7 @@ dd.ui_tpicker_time {
- + diff --git a/application/third_party/recommend/views/templates.php b/application/third_party/recommend/views/templates.php index 667f2ed1..1232c0f3 100644 --- a/application/third_party/recommend/views/templates.php +++ b/application/third_party/recommend/views/templates.php @@ -1,30 +1,34 @@ -

CH完整的文中广告代码:

-
Beijing trip -
- - All things you need to know view more
-
+

CH文中信息广告代码:

+
Beijing trip -

CH 完整的右侧广告代码:

+
+ +All things you need to know view more
+
+ +

CH文中tour广告代码:

+ +
Recommended Itinerary
-
- + +

CH 完整的右侧广告代码:

+
+ -

AH 右侧和文中广告代码模板

-
Recommended Itinerary
- \ No newline at end of file diff --git a/application/views/bootstrap/cache_url.php b/application/views/bootstrap/cache_url.php index 815f8460..23516bc6 100644 --- a/application/views/bootstrap/cache_url.php +++ b/application/views/bootstrap/cache_url.php @@ -1,45 +1,42 @@ @@ -68,6 +65,8 @@ function batch_update_cache(url, index) { ic_url; ?> + diff --git a/application/views/bootstrap/header.php b/application/views/bootstrap/header.php index 76f46b8c..5a98abdf 100644 --- a/application/views/bootstrap/header.php +++ b/application/views/bootstrap/header.php @@ -4,142 +4,162 @@ - - 信息平台 - - - - - - - + + 信息平台 + + + + + + + - \ No newline at end of file +
+
\ No newline at end of file diff --git a/application/views/bootstrap3/header.php b/application/views/bootstrap3/header.php index e2394970..a05e32b4 100644 --- a/application/views/bootstrap3/header.php +++ b/application/views/bootstrap3/header.php @@ -4,192 +4,223 @@ - - 信息平台 - - - - + + 信息平台 + + + + - - + use_pictures = use_pictures + result.Pinfo[key].ID + ':' + result.Pinfo[key].PUrl + ':' + result.Pinfo[key].wh + + ','; + } + $("#use_pictures").val(use_pictures); + } + } + + -
+ \ No newline at end of file diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index ea5427bf..df6c05ae 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -573,7 +573,7 @@
-
    +
      - +
      @@ -208,7 +208,7 @@
      @@ -222,7 +222,7 @@ - @@ -241,7 +241,7 @@ We are here to help you...
      start planning your tailor-made tour with 1-1 help from our travel advisors. - Create Your Trip + Create Your Trip
      @@ -368,8 +368,6 @@
    • Loyalty & Referral Program
    • Partner
    • - -
    • Work for us
    • Privacy Policy
    • Terms
    • diff --git a/application/views/mobile_first/ch.php b/application/views/mobile_first/ch.php index 1547b4b8..f5ee7230 100644 --- a/application/views/mobile_first/ch.php +++ b/application/views/mobile_first/ch.php @@ -47,14 +47,14 @@
      @@ -264,7 +264,7 @@ - @@ -272,7 +272,7 @@
      We are here to help you...
      start planning your tailor-made tour with 1-1 help from our travel advisors. - Create Your Trip + Create Your Trip
      @@ -384,12 +384,10 @@ diff --git a/application/views/mobile_first/gh-structured-data-article.php b/application/views/mobile_first/gh-structured-data-article.php index 4f345911..241d36b8 100644 --- a/application/views/mobile_first/gh-structured-data-article.php +++ b/application/views/mobile_first/gh-structured-data-article.php @@ -4,11 +4,11 @@ "@type": "Article", "mainEntityOfPage": { "@type": "WebPage", - "@id": "https://www.asiahighlights.comic_url; ?>" + "@id": "https://www.globalhighlights.comic_url; ?>" }, "headline": "ic_seo_title; ?>", "image": [ - "https://images.asiahighlights.comic_photo; ?>" + "https://images.globalhighlights.comic_photo; ?>" ], "datePublished": "is_datetime; ?>", "dateModified": "", @@ -21,7 +21,7 @@ "name": "China Highlights", "logo": { "@type": "ImageObject", - "url": "https://data.asiahighlights.com/pic/logo-ah.png" + "url": "https://data.chinahighlights.com/image/aboutus/logo-gh.png" } } } diff --git a/css/information-system3.css b/css/information-system3.css index 86cca4ae..0c6ca95f 100644 --- a/css/information-system3.css +++ b/css/information-system3.css @@ -115,7 +115,7 @@ .ke-edit-iframe{width: 101.5% !important;padding-left:10px !important;} .edit_tool a i{padding-left: 5px;} #treeDemo:hover{overflow-y:scroll !important;} - .ztree li ul{overflow: hidden;} + .ztree li ul{overflow: visible;} #tecate-errors{height: 90px !important;} .recommend_info_popover{top: 69px !important;left: -102px !important;max-width:500px;min-height:300px;margin-bottom:50px;} #recommend_list{max-height: 315px;overflow-y: auto;overflow-x: hidden;margin-right: -16px;float: right;} diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 54666eb5..e57a148e 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1572,6 +1572,44 @@ class Index extends CI_Controller { } echo json_encode($this->load->view('gai_setting', $data, true)); } + + /** 测试收款记录的是否已录入到订单 + * 测试找不到订单信息使用 + */ + public function test_gai_modal($pn_txn_id=null, $pn_id = null, $neworder=null) + { + $data = array(); + $data['note'] = $this->Note_model->note($pn_txn_id, $pn_id); + $orderid_info = $this->analysis_orderid($data['note']->pn_invoice); + if (!empty($orderid_info)) { + $orderid_info = json_decode($orderid_info); + $data['old_order_info'] = $orderid_info; + if ($orderid_info->ordertype === 'TP' || $orderid_info->ordertype === 'A') { + $orderid_info->ordertype = 'B'; + } + if ($orderid_info->ordertype === 'T') { + $data['gai_info'] = $this->Paypal_model->get_money_t($pn_txn_id); + } elseif ($orderid_info->ordertype === 'B') { + $data['gai_info'] = $this->Paypal_model->get_money_b($pn_txn_id); + } + } + $data['old_order'] = $data['note']->pn_invoice; + $data['new_order'] = $neworder; + $data['order_info'] = null; + if ($neworder !== null) { + $neworder_id = $this->analysis_orderid($neworder); + $neworder_id = json_decode($neworder_id); + $data['new_order_info'] = $neworder_id; + if ($neworder_id->ordertype === 'TP') { + $neworder_id->ordertype = 'B'; + } + if (!empty($neworder_id)) { + $data['order_info'] = $this->Paypal_model->get_order($neworder_id->orderid, true, $neworder_id->ordertype); + } + } + echo json_encode($data); + } + public function gai_modal_save() { $data = array(); diff --git a/webht/third_party/paypal/views/gai_setting.php b/webht/third_party/paypal/views/gai_setting.php index e11d0137..187b5f0a 100644 --- a/webht/third_party/paypal/views/gai_setting.php +++ b/webht/third_party/paypal/views/gai_setting.php @@ -19,6 +19,8 @@ +
      订单详细内容:
      diff --git a/webht/third_party/paypal/views/note_list.php b/webht/third_party/paypal/views/note_list.php index 47b4c3a9..2fa72dc9 100644 --- a/webht/third_party/paypal/views/note_list.php +++ b/webht/third_party/paypal/views/note_list.php @@ -383,6 +383,23 @@ echo "