|
|
|
@ -66,27 +66,23 @@ class Welcome extends CI_Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取所有信息URL,用来批量静态化更新
|
|
|
|
|
public function create_all_urls() {
|
|
|
|
|
public function create_all_urls($view=false) {
|
|
|
|
|
set_time_limit(0);
|
|
|
|
|
$this->output->enable_profiler(false);
|
|
|
|
|
$data['all_information'] = $this->Information_model->GetList('ic_status,ic_url,ic_sitecode');
|
|
|
|
|
$data['all_information'] = $this->Information_model->GetList('ic_status,ic_id,ic_url,ic_sitecode');
|
|
|
|
|
if ($view == 'amp') {
|
|
|
|
|
$this->load->view('bootstrap3/header', $data);
|
|
|
|
|
$this->load->view('bootstrap3/refresh_amp_urls');
|
|
|
|
|
$this->load->view('bootstrap3/footer');
|
|
|
|
|
} else {
|
|
|
|
|
$this->load->view('bootstrap/header', $data);
|
|
|
|
|
$this->load->view('bootstrap/cache_url', $data);
|
|
|
|
|
$this->load->view('bootstrap/footer');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取所有信息URL,用来批量静态化更新
|
|
|
|
|
public function create_all_amp_urls() {
|
|
|
|
|
set_time_limit(0);
|
|
|
|
|
$this->output->enable_profiler(false);
|
|
|
|
|
$data['all_information'] = $this->Information_model->GetList('ic_id,ic_status,ic_url,ic_sitecode');
|
|
|
|
|
$this->load->view('bootstrap3/header', $data);
|
|
|
|
|
$this->load->view('bootstrap3/refresh_amp_urls');
|
|
|
|
|
$this->load->view('bootstrap3/footer');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取某个信息节点和子节点url
|
|
|
|
|
public function create_infomation_urls($is_parent_id) {
|
|
|
|
|
public function create_infomation_urls($is_parent_id, $view = false) {
|
|
|
|
|
$this->output->enable_profiler(FALSE);
|
|
|
|
|
$structure = $this->InfoStructures_model->Detail($is_parent_id);
|
|
|
|
|
if (empty($structure)) {
|
|
|
|
@ -94,10 +90,16 @@ class Welcome extends CI_Controller {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
$data['all_information'] = $this->Information_model->get_list_by_path($structure->is_path);
|
|
|
|
|
if ($view == 'amp') {
|
|
|
|
|
$this->load->view('bootstrap3/header', $data);
|
|
|
|
|
$this->load->view('bootstrap3/refresh_amp_urls');
|
|
|
|
|
$this->load->view('bootstrap3/footer');
|
|
|
|
|
} else {
|
|
|
|
|
$this->load->view('bootstrap/header', $data);
|
|
|
|
|
$this->load->view('bootstrap/cache_url', $data);
|
|
|
|
|
$this->load->view('bootstrap/footer');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function get_infomation_urls($is_parent_id) {
|
|
|
|
|
$this->output->enable_profiler(FALSE);
|
|
|
|
@ -196,7 +198,6 @@ class Welcome extends CI_Controller {
|
|
|
|
|
// $information->ic_ht_product_id,
|
|
|
|
|
// $information->ic_ht_product_type,
|
|
|
|
|
// $information->ic_author);
|
|
|
|
|
|
|
|
|
|
// $this->echo_json(array(
|
|
|
|
|
// 'status' => 'ok',
|
|
|
|
|
// 'infoId' => $info_id,
|
|
|
|
@ -206,8 +207,7 @@ class Welcome extends CI_Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function count_redirect_nofollow() {
|
|
|
|
|
$include_redirece_info =
|
|
|
|
|
$this->Information_model->search_all_text('&t=78002', 2000);
|
|
|
|
|
$include_redirece_info = $this->Information_model->search_all_text('&t=78002', 2000);
|
|
|
|
|
echo 'redirect count: ' . count($include_redirece_info) . '<br/>';
|
|
|
|
|
$redirect_nofollow_list = array();
|
|
|
|
|
$htm_doc = new DOMDocument();
|
|
|
|
@ -255,29 +255,7 @@ class Welcome extends CI_Controller {
|
|
|
|
|
$this->Logs_model->backup($info->is_id, $info->ic_content);
|
|
|
|
|
$info->ic_content = $htm_doc->saveHTML();
|
|
|
|
|
$this->InfoContents_model->Update(
|
|
|
|
|
$info->ic_id,
|
|
|
|
|
$info->ic_url,
|
|
|
|
|
$info->ic_url_title,
|
|
|
|
|
$info->ic_type,
|
|
|
|
|
$info->ic_title,
|
|
|
|
|
$info->ic_content,
|
|
|
|
|
$info->ic_summary,
|
|
|
|
|
$info->ic_seo_title,
|
|
|
|
|
$info->ic_seo_description,
|
|
|
|
|
$info->ic_seo_keywords,
|
|
|
|
|
$info->ic_show_bread_crumbs,
|
|
|
|
|
$info->ic_status,
|
|
|
|
|
$info->ic_template,
|
|
|
|
|
$info->ic_photo,
|
|
|
|
|
$info->ic_photo_width,
|
|
|
|
|
$info->ic_photo_height,
|
|
|
|
|
$info->ic_recommend_tours,
|
|
|
|
|
$info->ic_recommend_packages,
|
|
|
|
|
$info->ic_ht_area_id,
|
|
|
|
|
$info->ic_ht_area_type,
|
|
|
|
|
$info->ic_ht_product_id,
|
|
|
|
|
$info->ic_ht_product_type,
|
|
|
|
|
$info->ic_author);
|
|
|
|
|
$info->ic_id, $info->ic_url, $info->ic_url_title, $info->ic_type, $info->ic_title, $info->ic_content, $info->ic_summary, $info->ic_seo_title, $info->ic_seo_description, $info->ic_seo_keywords, $info->ic_show_bread_crumbs, $info->ic_status, $info->ic_template, $info->ic_photo, $info->ic_photo_width, $info->ic_photo_height, $info->ic_recommend_tours, $info->ic_recommend_packages, $info->ic_ht_area_id, $info->ic_ht_area_type, $info->ic_ht_product_id, $info->ic_ht_product_type, $info->ic_author);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -285,8 +263,7 @@ class Welcome extends CI_Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function count_http_of_href() {
|
|
|
|
|
$data['all_information'] =
|
|
|
|
|
$this->Information_model->search_all_text('http://www.chinahighlights.com/', 2000);
|
|
|
|
|
$data['all_information'] = $this->Information_model->search_all_text('http://www.chinahighlights.com/', 2000);
|
|
|
|
|
echo 'count: ' . count($data['all_information']) . '<br/>';
|
|
|
|
|
var_dump($data['all_information']);
|
|
|
|
|
}
|
|
|
|
@ -294,8 +271,7 @@ class Welcome extends CI_Controller {
|
|
|
|
|
public function transform_href_to_https() {
|
|
|
|
|
$http_host = 'http://www.chinahighlights.com/';
|
|
|
|
|
$https_host = 'https://www.chinahighlights.com/';
|
|
|
|
|
$data['all_information'] =
|
|
|
|
|
$this->Information_model->search_all_text($http_host, 200);
|
|
|
|
|
$data['all_information'] = $this->Information_model->search_all_text($http_host, 200);
|
|
|
|
|
echo 'count: ' . count($data['all_information']) . '<br/>';
|
|
|
|
|
if (empty($data['all_information'])) {
|
|
|
|
|
echo 'nothing transform to https';
|
|
|
|
@ -312,29 +288,7 @@ class Welcome extends CI_Controller {
|
|
|
|
|
$this->Logs_model->backup($item->is_id, $item->ic_content);
|
|
|
|
|
$item->ic_content = str_replace($http_host, $https_host, $item->ic_content);
|
|
|
|
|
$this->InfoContents_model->Update(
|
|
|
|
|
$item->ic_id,
|
|
|
|
|
$item->ic_url,
|
|
|
|
|
$item->ic_url_title,
|
|
|
|
|
$item->ic_type,
|
|
|
|
|
$item->ic_title,
|
|
|
|
|
$item->ic_content,
|
|
|
|
|
$item->ic_summary,
|
|
|
|
|
$item->ic_seo_title,
|
|
|
|
|
$item->ic_seo_description,
|
|
|
|
|
$item->ic_seo_keywords,
|
|
|
|
|
$item->ic_show_bread_crumbs,
|
|
|
|
|
$item->ic_status,
|
|
|
|
|
$item->ic_template,
|
|
|
|
|
$item->ic_photo,
|
|
|
|
|
$item->ic_photo_width,
|
|
|
|
|
$item->ic_photo_height,
|
|
|
|
|
$item->ic_recommend_tours,
|
|
|
|
|
$item->ic_recommend_packages,
|
|
|
|
|
$item->ic_ht_area_id,
|
|
|
|
|
$item->ic_ht_area_type,
|
|
|
|
|
$item->ic_ht_product_id,
|
|
|
|
|
$item->ic_ht_product_type,
|
|
|
|
|
$item->ic_author
|
|
|
|
|
$item->ic_id, $item->ic_url, $item->ic_url_title, $item->ic_type, $item->ic_title, $item->ic_content, $item->ic_summary, $item->ic_seo_title, $item->ic_seo_description, $item->ic_seo_keywords, $item->ic_show_bread_crumbs, $item->ic_status, $item->ic_template, $item->ic_photo, $item->ic_photo_width, $item->ic_photo_height, $item->ic_recommend_tours, $item->ic_recommend_packages, $item->ic_ht_area_id, $item->ic_ht_area_type, $item->ic_ht_product_id, $item->ic_ht_product_type, $item->ic_author
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -346,7 +300,6 @@ class Welcome extends CI_Controller {
|
|
|
|
|
->set_output(json_encode($obj));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//批量替换二级域名,如图片或者data域名
|
|
|
|
|
function replace_hostname($topnum) {
|
|
|
|
|
$data = array();
|
|
|
|
@ -358,29 +311,7 @@ class Welcome extends CI_Controller {
|
|
|
|
|
echo $item->ic_url . '<br/>';
|
|
|
|
|
$item->ic_content = str_replace($find_host, $new_host, $item->ic_content);
|
|
|
|
|
$this->InfoContents_model->Update(
|
|
|
|
|
$item->ic_id,
|
|
|
|
|
$item->ic_url,
|
|
|
|
|
$item->ic_url_title,
|
|
|
|
|
$item->ic_type,
|
|
|
|
|
$item->ic_title,
|
|
|
|
|
$item->ic_content,
|
|
|
|
|
$item->ic_summary,
|
|
|
|
|
$item->ic_seo_title,
|
|
|
|
|
$item->ic_seo_description,
|
|
|
|
|
$item->ic_seo_keywords,
|
|
|
|
|
$item->ic_show_bread_crumbs,
|
|
|
|
|
$item->ic_status,
|
|
|
|
|
$item->ic_template,
|
|
|
|
|
$item->ic_photo,
|
|
|
|
|
$item->ic_photo_width,
|
|
|
|
|
$item->ic_photo_height,
|
|
|
|
|
$item->ic_recommend_tours,
|
|
|
|
|
$item->ic_recommend_packages,
|
|
|
|
|
$item->ic_ht_area_id,
|
|
|
|
|
$item->ic_ht_area_type,
|
|
|
|
|
$item->ic_ht_product_id,
|
|
|
|
|
$item->ic_ht_product_type,
|
|
|
|
|
$item->ic_author
|
|
|
|
|
$item->ic_id, $item->ic_url, $item->ic_url_title, $item->ic_type, $item->ic_title, $item->ic_content, $item->ic_summary, $item->ic_seo_title, $item->ic_seo_description, $item->ic_seo_keywords, $item->ic_show_bread_crumbs, $item->ic_status, $item->ic_template, $item->ic_photo, $item->ic_photo_width, $item->ic_photo_height, $item->ic_recommend_tours, $item->ic_recommend_packages, $item->ic_ht_area_id, $item->ic_ht_area_type, $item->ic_ht_product_id, $item->ic_ht_product_type, $item->ic_author
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|