|
|
|
@ -3005,7 +3005,8 @@ class Information extends CI_Controller
|
|
|
|
|
//}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'vac': //国际站
|
|
|
|
|
//国际站
|
|
|
|
|
case 'vac':
|
|
|
|
|
case 'vc':
|
|
|
|
|
case 'it':
|
|
|
|
|
case 'ru':
|
|
|
|
@ -3056,6 +3057,58 @@ class Information extends CI_Controller
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//国际站 - GH
|
|
|
|
|
case 'gh_vac':
|
|
|
|
|
case 'gh_vc':
|
|
|
|
|
case 'gh_it':
|
|
|
|
|
case 'gh_ru':
|
|
|
|
|
case 'gh_jp':
|
|
|
|
|
$information = $this->Information_model->Detail($url);
|
|
|
|
|
$meta_pc_amp = @get_meta($information->ic_id, 'AMP_BODY_PC_STATUS');
|
|
|
|
|
if ($delete_only) {
|
|
|
|
|
//只删除操作,在url修改和不发布信息的时候使用
|
|
|
|
|
$url = $this->config->item('site_url') . '/index.php/welcome/update_cache/delete_only?static_html_url=' . $url;
|
|
|
|
|
} else {
|
|
|
|
|
$tmp = $url;
|
|
|
|
|
//判断是否是更新信息
|
|
|
|
|
// 产品页面不能生成静态页面,比如/beijing/hotel/只是为了在导航显示一个链接,如果生成了静态页面,网前只会显示一个空白页面了
|
|
|
|
|
if (!empty($information->ic_content) || !empty($information->ic_summary) || $meta_pc_amp == 'yes') {
|
|
|
|
|
$url = $this->config->item('site_url') . '/index.php/gh/info/detail/?static_html_url=' . $url;
|
|
|
|
|
} else {
|
|
|
|
|
$url = $this->config->item('site_url') . '/index.php/welcome/update_cache/?static_html_url=' . $url;
|
|
|
|
|
//$url = $this->config->item('site_url') . '/index.php/information/detail/?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;
|
|
|
|
|
}
|
|
|
|
|
//int return direct
|
|
|
|
|
$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);
|
|
|
|
|
curl_close($ch);
|
|
|
|
|
*/
|
|
|
|
|
$data['async_update'] = $url;
|
|
|
|
|
$data[] = array('name' => 'ok', 'value' => '信息保存成功,请在8秒后检查更新页面。', 'url' => $url);
|
|
|
|
|
//如果是外部调用就返回结果,内部就不返回了
|
|
|
|
|
if ($cache_url) {
|
|
|
|
|
echo json_encode($data);
|
|
|
|
|
}
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'ct': //子站点使用
|
|
|
|
|
$url = 'http://50.97.246.187:22223' . $url;
|
|
|
|
|