From 54ca7a2b9fdc35236f2554902da59ec39196d77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Tue, 1 Aug 2017 10:41:45 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E8=B6=85=E8=BF=87151=E7=9A=84=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E8=AF=8D=E6=8E=92=E5=90=8D=E5=88=99=E4=B8=8D=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/keyworlds.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/application/controllers/keyworlds.php b/application/controllers/keyworlds.php index d6c2c1a9..429adf01 100644 --- a/application/controllers/keyworlds.php +++ b/application/controllers/keyworlds.php @@ -265,7 +265,7 @@ class Keyworlds extends CI_Controller { } } //保存排名数据 - if ($rank['rank'] == '151') { + if ($rank['rank'] == '151') { //超过151的排名则不记录 $this->Keywords_model->update_time($kw_id); } elseif (isset($last_rank[0]->kwr_datetime) and $last_rank[0]->kwr_datetime > strtotime(date('Y-m-d'))) { if ($rank['rank'] != -1 and $rank['rank'] != -2 and $this->Keywordsrank_model->update_rank($last_rank[0]->kwr_id, $rank['rank'], $rank['source'])) { @@ -321,15 +321,16 @@ class Keyworlds extends CI_Controller { break; } } - //if ($rank['rank'] == '151') { - if ($rank['rank'] != -1 and $rank['rank'] != -2 and $this->Keywordsrank_model->add_rank($v->kw_id, $rank['rank'], $rank['source'], $rank['engines'])) { - $this->load->model('InfoSMS_model'); - $last_rank = isset($last_rank[0]) ? $last_rank[0]->kwr_rank : $rank['rank']; - $this->InfoSMS_model->readed_for_info($v->kw_id, 'keywords_rank'); - $this->InfoSMS_model->add('keywords_rank', $v->kw_id, $rank['rank'], $last_rank, (string) ($rank['rank'] - $last_rank)); - if ($engines != 'yandex') - $this->Keywords_model->update_time($v->kw_id); - } + if ($rank['rank'] == '151') { //超过151的排名则不记录 + $this->Keywords_model->update_time($v->kw_id); + }else if ($rank['rank'] != -1 and $rank['rank'] != -2 and $this->Keywordsrank_model->add_rank($v->kw_id, $rank['rank'], $rank['source'], $rank['engines'])) { + $this->load->model('InfoSMS_model'); + $last_rank = isset($last_rank[0]) ? $last_rank[0]->kwr_rank : $rank['rank']; + $this->InfoSMS_model->readed_for_info($v->kw_id, 'keywords_rank'); + $this->InfoSMS_model->add('keywords_rank', $v->kw_id, $rank['rank'], $last_rank, (string) ($rank['rank'] - $last_rank)); + if ($engines != 'yandex') + $this->Keywords_model->update_time($v->kw_id); + } } var_dump($worldsList[0]->kw_keyworlds, $rank); } From 704fc58af1c1a092b7fbb2bc281b048ccd472db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 4 Aug 2017 15:53:06 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E5=A4=9A=E5=AA=92=E4=BD=93=E4=B8=AD?= =?UTF-8?q?=E5=BF=83IP=E8=AF=86=E5=88=AB=E9=97=AE=E9=A2=98=20::1=E4=B9=9F?= =?UTF-8?q?=E5=B1=9E=E4=BA=8E=E6=9C=AC=E5=9C=B0IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- media/popselectpicture.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/media/popselectpicture.php b/media/popselectpicture.php index 7ef6f6d7..9673ee2b 100644 --- a/media/popselectpicture.php +++ b/media/popselectpicture.php @@ -88,19 +88,17 @@ function is_remote_ip() if(isset($_SERVER["REMOTE_ADDR"]))$ip_list=$_SERVER["REMOTE_ADDR"].' '; if(isset($_SERVER["HTTP_X_FORWARDED_FOR"]))$ip_list.=$_SERVER["HTTP_X_FORWARDED_FOR"]; //$ip_list=$_SERVER["REMOTE_ADDR"].' '.$_SERVER["HTTP_X_FORWARDED_FOR"]; + //print_r($_SERVER); //echo $ip_list.'
'; - if (stripos($ip_list,'202.103.68.34')!==false) - { + + if (stripos($ip_list,'202.103.68.34')!==false) { return false; - } - elseif (stripos($ip_list,'221.7.151.39')!==false || stripos($ip_list,'221.7.151.37')!==false || stripos($ip_list,'221.7.151.41')!==false || stripos($ip_list,'111.59.90.31')!==false || stripos($ip_list,'180.140.114.208')!==false ) - { + }elseif (stripos($ip_list,'221.7.151.39')!==false || stripos($ip_list,'221.7.151.37')!==false || stripos($ip_list,'221.7.151.41')!==false || stripos($ip_list,'111.59.90.31')!==false || stripos($ip_list,'180.140.114.208')!==false ){ + return false; + }else if($ip_list!=='::1'){ //这个也是本地IP return false; } - else - { - return true; - } + return true; } ?> From d6bb2760dfe4e28cf5260d3e3f850d59ce5e4771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 4 Aug 2017 15:53:06 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E5=A4=9A=E5=AA=92=E4=BD=93=E4=B8=AD?= =?UTF-8?q?=E5=BF=83IP=E8=AF=86=E5=88=AB=E9=97=AE=E9=A2=98=20::1=E4=B9=9F?= =?UTF-8?q?=E5=B1=9E=E4=BA=8E=E6=9C=AC=E5=9C=B0IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- media/popselectpicture.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/media/popselectpicture.php b/media/popselectpicture.php index 7ef6f6d7..872868ef 100644 --- a/media/popselectpicture.php +++ b/media/popselectpicture.php @@ -88,19 +88,17 @@ function is_remote_ip() if(isset($_SERVER["REMOTE_ADDR"]))$ip_list=$_SERVER["REMOTE_ADDR"].' '; if(isset($_SERVER["HTTP_X_FORWARDED_FOR"]))$ip_list.=$_SERVER["HTTP_X_FORWARDED_FOR"]; //$ip_list=$_SERVER["REMOTE_ADDR"].' '.$_SERVER["HTTP_X_FORWARDED_FOR"]; - //echo $ip_list.'
'; - if (stripos($ip_list,'202.103.68.34')!==false) - { + //print_r($_SERVER); + echo ''; + + if (stripos($ip_list,'202.103.68.34')!==false) { return false; - } - elseif (stripos($ip_list,'221.7.151.39')!==false || stripos($ip_list,'221.7.151.37')!==false || stripos($ip_list,'221.7.151.41')!==false || stripos($ip_list,'111.59.90.31')!==false || stripos($ip_list,'180.140.114.208')!==false ) - { + }elseif (stripos($ip_list,'221.7.151.39')!==false || stripos($ip_list,'221.7.151.37')!==false || stripos($ip_list,'221.7.151.41')!==false || stripos($ip_list,'111.59.90.31')!==false || stripos($ip_list,'180.140.114.208')!==false ){ + return false; + }else if($ip_list!=='::1'){ //这个也是本地IP return false; } - else - { - return true; - } + return true; } ?> From babf7b1d812c29b7bb08f5eab0659c7abd72997f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Tue, 8 Aug 2017 11:26:14 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/bootstrap/header.php | 1 + application/views/bootstrap3/header.php | 1 + 2 files changed, 2 insertions(+) diff --git a/application/views/bootstrap/header.php b/application/views/bootstrap/header.php index 578b1108..952eace6 100644 --- a/application/views/bootstrap/header.php +++ b/application/views/bootstrap/header.php @@ -96,6 +96,7 @@ + diff --git a/application/views/bootstrap3/header.php b/application/views/bootstrap3/header.php index f743428d..02a83824 100644 --- a/application/views/bootstrap3/header.php +++ b/application/views/bootstrap3/header.php @@ -99,6 +99,7 @@ + From e6b9b4a8a1719119127479ba405b2dcb4ab377d7 Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Wed, 9 Aug 2017 10:16:22 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E8=BF=94=E5=9B=9E=E6=9B=B4=E6=96=B0=E6=89=80?= =?UTF-8?q?=E7=94=A8=E7=9A=84update=20cahce=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index ae63c41f..e77b7ea5 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -391,14 +391,19 @@ class Information extends CI_Controller { $ic_url = $this->input->post('ic_url'); $auto_update_cache = $this->input->get_post('auto_update_cache_checkbox'); if ($site_code == 'gm' && substr($ic_url, 0, 5) == '/faq/') { - $this->update_cache($ic_url, true); + $update_api_url = $this->update_cache($ic_url, true); } else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) { - $this->update_cache($ic_url); + $update_api_url = $this->update_cache($ic_url); } else if (strcasecmp($site_code, "cht") != 0) { - $this->update_cache($ic_url); + $update_api_url = $this->update_cache($ic_url); } - $data[] = array('name' => 'ok', 'value' => $this->lang->line('form_info_success')); + if (empty($update_api_url) || count($update_api_url)==0 || !isset($update_api_url[0]['url'])) + { + $update_api_url = 'not found url'; + } + + $data[] = array('name' => 'ok', 'value' => $this->lang->line('form_info_success'), 'update_api_url' => $update_api_url); $this->Logs_model->backup($information->is_id, $this->input->post('ic_content')); $this->Logs_model->backup_summary($information->is_id, $this->input->post('ic_summary')); From 828fa523bf010f4fc559ada071bd87766452c9a8 Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Wed, 9 Aug 2017 10:19:31 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E8=BF=94=E5=9B=9E=E6=9B=B4=E6=96=B0=E6=89=80?= =?UTF-8?q?=E7=94=A8=E7=9A=84update=20cahce=20api=20v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index e77b7ea5..a681d66d 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -391,19 +391,19 @@ class Information extends CI_Controller { $ic_url = $this->input->post('ic_url'); $auto_update_cache = $this->input->get_post('auto_update_cache_checkbox'); if ($site_code == 'gm' && substr($ic_url, 0, 5) == '/faq/') { - $update_api_url = $this->update_cache($ic_url, true); + $update_info_log = $this->update_cache($ic_url, true); } else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) { - $update_api_url = $this->update_cache($ic_url); + $update_info_log = $this->update_cache($ic_url); } else if (strcasecmp($site_code, "cht") != 0) { - $update_api_url = $this->update_cache($ic_url); + $update_info_log = $this->update_cache($ic_url); } - if (empty($update_api_url) || count($update_api_url)==0 || !isset($update_api_url[0]['url'])) + if (empty($update_info_log) || count($update_info_log)==0 || !isset($update_info_log[0]['url'])) { - $update_api_url = 'not found url'; + $update_info_log = 'not found update info log'; } - $data[] = array('name' => 'ok', 'value' => $this->lang->line('form_info_success'), 'update_api_url' => $update_api_url); + $data[] = array('name' => 'ok', 'value' => $this->lang->line('form_info_success'), 'update_info_log' => $update_info_log); $this->Logs_model->backup($information->is_id, $this->input->post('ic_content')); $this->Logs_model->backup_summary($information->is_id, $this->input->post('ic_summary')); From 2740a0b117fe251e6958c5e07a926a7bf3fe8d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Wed, 9 Aug 2017 16:17:42 +0800 Subject: [PATCH 07/20] =?UTF-8?q?CT=E7=9A=84=E5=AE=A2=E4=BA=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=94=B6=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/order/controllers/confirm.php | 12 +- .../order/views/ct/confirm_order.php | 738 ++++++++++++++++++ .../third_party/order/views/ct/link_tips.php | 75 ++ 3 files changed, 820 insertions(+), 5 deletions(-) create mode 100644 application/third_party/order/views/ct/confirm_order.php create mode 100644 application/third_party/order/views/ct/link_tips.php diff --git a/application/third_party/order/controllers/confirm.php b/application/third_party/order/controllers/confirm.php index 18b30c39..4dda6cd4 100644 --- a/application/third_party/order/controllers/confirm.php +++ b/application/third_party/order/controllers/confirm.php @@ -10,11 +10,12 @@ class Confirm extends CI_Controller { $this->load->model('Order_model'); } - public function index($COLI_SN = false, $visitor_link = false, $token = false) { + //site_code默认是空,ct的站点需要传值 + public function index($COLI_SN = false, $visitor_link = false, $token = false,$site_code='') { $data = array(); if (empty($COLI_SN) || strtoupper(md5($visitor_link)) != strtoupper($token)) { echo ''; - $this->load->view('link_tips', $data); + $this->load->view($site_code.'/link_tips', $data); return false; } @@ -29,19 +30,19 @@ class Confirm extends CI_Controller { } } } else { - $this->load->view('link_tips', $data); + $this->load->view($site_code.'/link_tips', $data); return false; } $visitor_link_arr = $this->Order_model->get_visitor_link($COLI_SN); foreach ($visitor_link_arr as $l) { if ($visitor_link == $l->visitor_link) { - $this->load->view('link_tips', $data); + $this->load->view($site_code.'/link_tips', $data); return false; } } - $this->load->view('confirm_order', $data); + $this->load->view($site_code.'/confirm_order', $data); } public function save_confirm_info() { @@ -133,6 +134,7 @@ class Confirm extends CI_Controller { } } + //只有ch有review功能 function review() { $data = array(); $data['postdata'] = $this->input->post(); diff --git a/application/third_party/order/views/ct/confirm_order.php b/application/third_party/order/views/ct/confirm_order.php new file mode 100644 index 00000000..c071f6ab --- /dev/null +++ b/application/third_party/order/views/ct/confirm_order.php @@ -0,0 +1,738 @@ + + + + + + + + www.chinatravel.com + + + + + + + + + + + + + + +
+ +
+ +
+
+
+ +
+

Thanks for booking with China Travel!

+

Please complete and submit the information below.

+
+
+
+
+
+ +
+

Passenger Information (we need passport info for all the group members)

+
+ +
+ +
+ +
+
+ + +
+
+
+
+
+ +
+
/
+
+ +
+
+
+
+
+
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + + + +
+
+ +
+ +
+ + Add a passenger + +
+
+ +
+
+ + Contact phone no.: + +
+
+ +
+
+ +
+
+
+
+ COLI_CustomerType!=44003){ ?> +
+
+ + Home Address: + + + +
+
+ + +
+
+
+ +
+
+
+ +
+

Flight Information (please skip this if your don’t need airport pick up and drop off service)

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

+ Special Request +

+
+ +
+
+
+ +
+
+
+
+ +
+
+
+ COLI_CustomerType!=44003){ ?> +
+
+
+ +
+

+ Emergency Contact Information + (in case an unlikely event happens when you are traveling) +

+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+
+ + +
+ + + + + +
+ +
+
Thanks,yours OPI_FirstName; ?>
+
+ +
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/application/third_party/order/views/ct/link_tips.php b/application/third_party/order/views/ct/link_tips.php new file mode 100644 index 00000000..8649ac67 --- /dev/null +++ b/application/third_party/order/views/ct/link_tips.php @@ -0,0 +1,75 @@ + + + + + + + + www.chinatravel.com + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + \ No newline at end of file From 5b0b0bd208389032cf171568c28694dec039f23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 11 Aug 2017 14:50:56 +0800 Subject: [PATCH 08/20] =?UTF-8?q?=E8=BF=87=E6=BB=A4defer=E7=9A=84js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/htmlcompressor/controllers/index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/third_party/htmlcompressor/controllers/index.php b/application/third_party/htmlcompressor/controllers/index.php index bbf12e44..c2b57b76 100644 --- a/application/third_party/htmlcompressor/controllers/index.php +++ b/application/third_party/htmlcompressor/controllers/index.php @@ -63,8 +63,10 @@ class Index extends CI_Controller { $js_jquery_content = ''; foreach ($html_object->find('script') as $link_script) { if (!empty($link_script->src)) { - $link_js_array[] = $link_script->src; - $link_script->outertext = ''; //删除链接,移动到页底 + if(empty($link_script->defer)){ //没有defer标记的才处理,否则让js延后加载 + $link_js_array[] = $link_script->src; + $link_script->outertext = ''; //删除链接,移动到页底 + } } else { //网页内的js不需要提取 //$js_content.= $link_script->innertext;//js的内容 From 0882c80699ee8634d2543fdb39aad9a6ed63c077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 18 Aug 2017 14:15:12 +0800 Subject: [PATCH 09/20] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BE=B7=E8=AF=AD?= =?UTF-8?q?=E9=9D=99=E6=80=81=E5=8C=96=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 132 +++++++++++------------- 1 file changed, 61 insertions(+), 71 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index a681d66d..b9f1da5d 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -398,8 +398,7 @@ class Information extends CI_Controller { $update_info_log = $this->update_cache($ic_url); } - if (empty($update_info_log) || count($update_info_log)==0 || !isset($update_info_log[0]['url'])) - { + if (empty($update_info_log) || count($update_info_log) == 0 || !isset($update_info_log[0]['url'])) { $update_info_log = 'not found update info log'; } @@ -433,24 +432,6 @@ class Information extends CI_Controller { } echo json_encode($data); - - //设置图片应用URL - /* $use_pictures=$this->input->post('use_pictures'); - if(!empty($use_pictures)) - { - foreach(explode(',',$use_pictures.'0:0:0') as $picture) - { - list($p_id,$p_path,$p_wh)=explode(':',$picture); - if (stripos($this->input->post('ic_content'),$p_path) !== FALSE || $p_path==$this->input->post('ic_photo') ) - { - if($p_id!=0) - { - $this->load->model('pictureUseStat_model'); - $this->pictureUseStat_model->set_useurl($p_id,$p_wh,$this->config->item('site_url').$this->input->post('ic_url')); - } - } - } - } */ } } @@ -479,63 +460,72 @@ class Information extends CI_Controller { //更新静态文件 //不用参数提交的原因是可能url带有特殊字符,CI会报错 public function update_cache($static_html_url = false, $delete_only = false) { - - $url = $static_html_url; - if (empty($url)) { - $url = $this->input->post('cache_url'); - } + $url = !empty($static_html_url) ? $static_html_url : $this->input->post('cache_url'); $url = str_replace($this->config->item('site_url'), '', $url); - //原始链接 - $original_url = $url; + $original_url = $url; //原始链接 + $delete_only = !empty($delete_only) ? $delete_only : $this->input->get_post('delete_only'); + + switch ($this->config->item('site_code')) { + case 'cht': + $url = 'http://192.155.224.195:8080/guide-use.php/travelguide/guide/?static_html_url=' . $url; + if (strpos($url, '/festivals/') !== false || strpos($url, '/faq/') !== false) {//ch的部分控制器不是travelguide,所以不能统一更新和生产缓存文件,只能跳过,统一控制器再回头取消这个限制 + $url = 'http://www.chinahighlights.com/'; + } + break; - if ($this->config->item('site_code') == 'cht') { - //$url = 'http://www.chinahighlights.com/api/community/updatecache.asp?gurl=http://www.chinahighlights.com' . $url . '&other=1&site=info'; - //$url = 'http://192.155.224.195:2222/guide-use.php/travelguide/guide/?static_html_url=' . $url; - $url = 'http://192.155.224.195:8080/guide-use.php/travelguide/guide/?static_html_url=' . $url; + case 'ah': + if ($delete_only === true) { + $url = 'https://www.asiahighlights.com/index.php/information/delete_cache_8X913mksJ/?static_html_url=' . $url; + } else {// static_html_optimize=comeon 启用静态化压缩和js、css延迟加载 + $url = 'https://www.asiahighlights.com/index.php/information/detail/?static_html_url=' . $url . '&static_html_optimize=comeon'; + } + break; - //ch的部分控制器不是travelguide,所以不能统一更新和生产缓存文件,只能跳过,统一控制器再回头取消这个限制 - if (strpos($url, '/festivals/') !== false) { - $url = 'http://www.chinahighlights.com/'; - } - if (strpos($url, '/faq/') !== false) { - $url = 'http://www.chinahighlights.com/'; - } - } elseif ($this->config->item('site_code') == 'gm') { - $url = "http://148.251.35.42:3300/create-cache/?url=$url"; - } else if (is_series_site()) { - if (FALSE === $delete_only) { - $delete_only = $this->input->get_post('delete_only'); - } - if ($delete_only) { - //只删除操作,在url修改和不发布信息的时候使用 - $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/delete_only?static_html_url=' . $url; - } else { - $information = $this->Information_model->Detail($url); - $tmp = $url; - //判断是否是更新信息 - /* 产品页面不能生成静态页面,比如/beijing/hotel/只是为了在导航显示一个链接,如果生成了静态页面,网前只会显示一个空白页面了 - */ - if (!empty($information->ic_content)) { - //先尝试删除静态文件。 - $try_del = $this->config->item('site_url') . '/index.php/welcome/update_cache/delete_only?static_html_url=' . $url; - file_get_contents($try_del); - $url = $this->config->item('site_url') . '/index.php/information/detail/?static_html_url=' . $url; + case 'gm': + GET_HTTP("http://148.251.35.42:3300/create-cache/?url=" . urlencode($url)); //请求nodejs静态化更新页面,删除缓存,因为部分页面没有进入信息平台 + if ($delete_only) { + $url = $this->config->item('site_url') . "/gm.php/information/delete_cache_23Xd913mddkgssODII?static_html_url=" . urlencode($url); } else { - $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/?static_html_url=' . $url; + $url = $this->config->item('site_url') . "/gm.php/information/detail?static_html_optimize=comeon&static_html_url=" . urlencode($url); } - if (isset($information->ic_type) && $information->ic_type == 'product') { - $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/?static_html_url=' . $tmp; + break; + + case 'vac'://国际站 + case 'vc': + case 'it': + case 'ru': + case 'jp': + if ($delete_only) { + //只删除操作,在url修改和不发布信息的时候使用 + $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/delete_only?static_html_url=' . $url; + } else { + $information = $this->Information_model->Detail($url); + $tmp = $url; + //判断是否是更新信息 + // 产品页面不能生成静态页面,比如/beijing/hotel/只是为了在导航显示一个链接,如果生成了静态页面,网前只会显示一个空白页面了 + if (!empty($information->ic_content)) { + //先尝试删除静态文件。 + $try_del = $this->config->item('site_url') . '/index.php/welcome/update_cache/delete_only?static_html_url=' . $url; + file_get_contents($try_del); + $url = $this->config->item('site_url') . '/index.php/information/detail/?static_html_url=' . $url; + } else { + $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/?static_html_url=' . $url; + } + if (isset($information->ic_type) && $information->ic_type == 'product') { + $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/?static_html_url=' . $tmp; + } } - } - } else if ($this->config->item('site_code') == 'ah') { - if ($delete_only === true) { - $url = 'https://www.asiahighlights.com/index.php/information/delete_cache_8X913mksJ/?static_html_url=' . $url; - } else { - // static_html_optimize=comeon 启用静态化压缩和js、css延迟加载 - $url = 'https://www.asiahighlights.com/index.php/information/detail/?static_html_url=' . $url . '&static_html_optimize=comeon'; - } - } else { //子站点使用 - $url = $this->config->item('site_url') . $url . '@cache@refresh'; + break; + + case 'ct'://子站点使用 + case 'sht': + case 'gl': + case 'mbj': + case 'yz': + $url = $this->config->item('site_url') . $url . '@cache@refresh'; + break; + default:return false; + break; } //关闭错误提示,防止file_get_contents请求特殊字符的时候会报错或者404、500,特殊字符需要用urlencode编码第一个/后面的url From d99f76779bed6386160c02277c7be0e58fe8af12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Mon, 21 Aug 2017 14:35:38 +0800 Subject: [PATCH 10/20] Merge branch 'master' of git.mycht.cn:developers/information-system # Conflicts: # media/popselectpicture.php --- application/controllers/information.php | 2 +- application/views/bootstrap3/information_edit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index b9f1da5d..dd801e17 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -394,7 +394,7 @@ class Information extends CI_Controller { $update_info_log = $this->update_cache($ic_url, true); } else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) { $update_info_log = $this->update_cache($ic_url); - } else if (strcasecmp($site_code, "cht") != 0) { + } else if (strcasecmp($site_code, "cht") != 0) {//非cht站点 $update_info_log = $this->update_cache($ic_url); } diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index 406cf330..40edd1fb 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -1183,7 +1183,7 @@ 忽略URL重复
- config->item('site_code') == 'ah')) { ?> + config->item('site_code') == 'ah') || ($this->config->item('site_code') == 'gm') ) { ?>