fix new gm domain

master
LMR 8 months ago
parent 229dc18b46
commit 7fe372f556

@ -397,7 +397,7 @@ $config['site'] = [
'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,'],
'gm' => ['site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinahighlightstravel.de', 'site_image_url' => '//images.chinahighlightstravel.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,'],
'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,'],
'vc' => ['site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.chinahighlights.fr', 'site_image_url' => '//images.chinahighlights.fr', 'site_authors' => ['JE', 'kq', 'lya', 'lyz', 'zyh'], 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'],
'gh_vc' => ['site_code' => 'gh_vc', 'site_id' => 180, 'site_lgc' => '5', 'site_url' => 'https://www.globalhighlights.fr', 'site_image_url' => '//www.globalhighlights.fr', 'site_authors' => ['JE', 'kq', 'lya', 'lyz', 'zyh'], 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'],
@ -450,7 +450,7 @@ $config['cache']['gh_it']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.it
//静态文件站点域名
$config['cache']['jp']['site_url'] = 'https://www.arachina.com';
$config['cache']['gm']['site_url'] = 'https://www.chinarundreisen.com';
$config['cache']['gm']['site_url'] = 'https://www.chinahighlightstravel.de';
$config['cache']['vc']['site_url'] = 'https://www.chinahighlights.fr';
$config['cache']['vac']['site_url'] = 'https://www.chinahighlights.es';
$config['cache']['ru']['site_url'] = 'https://www.chinahighlights.ru';
@ -534,7 +534,7 @@ $config['access_super_manage'] = ['ycc', 'lmr', 'lyj', 'rz', 'zp'];
$config['css_source_cht'] = 'https://data.chinahighlights.com/css/min.php?f=/public/css/global.min.css,/css/festival-detail.css';
$config['css_source_ch'] = 'https://data.chinahighlights.com/css/mobile-first.css';
$config['css_source_gm'] = 'https://data.chinarundreisen.com/public/pkg/css/baselAlRkXMnl750806T065919409Z.css';
$config['css_source_gm'] = 'https://data.chinahighlightstravel.de/public/pkg/css/baselAlRkXMnl750806T065919409Z.css';
$config['css_source_vc'] = 'https://data.chinahighlights.fr/information-view/tools/min/?v=20150611&f=/bootstrap/css/bootstrap.min.css,/information/css/base.css,/information/css/r/Header.css,/information/css/r/PublicContent.css,/information/css/r/footergray.css,/information/js/i18n/jquery.ui.datepicker/smoothness/jquery.min.css,/information/css/tip-yellowsimple/tip-yellowsimple.css,/information/css/private-vc.css';
$config['css_source_vac'] = 'https://data.viaje-a-china.com/information-view/tools/min/?v=20150611&f=/bootstrap/css/bootstrap.min.css,/information/css/base.css,/information/css/r/Header.css,/information/css/r/PublicContent.css,/information/css/r/footergray.css,/information/js/i18n/jquery.ui.datepicker/smoothness/jquery.min.css,/information/css/tip-yellowsimple/tip-yellowsimple.css,/information/css/private-vac.css';

@ -1,7 +1,8 @@
<?php
if (!defined('BASEPATH'))
if (! defined('BASEPATH')) {
exit('No direct script access allowed');
}
class Welcome extends CI_Controller {
@ -18,16 +19,16 @@ class Welcome extends CI_Controller {
}
public function index() {
$data=array();
$data = [];
$data['countryList'] = $this->Area_model->get_country_list();
$data['provinceList'] = $this->Area_model->get_province_list();
$data['city_list'] = $this->Area_model->get_municipalities_list();
$data['lastEditList'] = $this->Information_model->get_last_edit_list();
$data['last_city_list'] = $this->Area_model->get_last_edit_city();
$data['groupList']=$this->Information_model->group_list();
$data['groupList'] = $this->Information_model->group_list();
if(is_mobile_first() ){
if (is_mobile_first()) {
$this->load->view('bootstrap3/header', $data);
$this->load->view('bootstrap3/welcome');
@ -35,9 +36,6 @@ class Welcome extends CI_Controller {
return;
}
if ($this->config->item('site_code') == 'pgr') {
$data['countryList'] = $this->Area_model->get_country_list_for_site("'589','645','632','517','31','28','609','630','9','708','709'");
}
@ -47,9 +45,6 @@ class Welcome extends CI_Controller {
$this->load->view('bootstrap/footer');
}
public function search($isrecommend = false) {
//先搜索url如果找到唯一就跳走多于一条的则列出来一条没有的就去搜索信息
$data['keywords'] = $this->input->post('keywords');
@ -57,8 +52,8 @@ class Welcome extends CI_Controller {
$search_url = str_replace($this->config->item('site_url'), "", $data['keywords']);
$data['search_list'] = $this->Information_model->search_url($search_url);
if (count($data['search_list']) === 0) {
if (!empty($data['all_text_search']) && $data['all_text_search'] == 'true') {
$data['search_list'] = $this->Information_model->search_all_text($data['keywords'],48);
if (! empty($data['all_text_search']) && $data['all_text_search'] == 'true') {
$data['search_list'] = $this->Information_model->search_all_text($data['keywords'], 48);
} else {
$data['search_list'] = $this->Information_model->search($data['keywords']);
}
@ -82,7 +77,7 @@ class Welcome extends CI_Controller {
}
//获取所有信息URL,用来批量静态化更新
public function create_all_urls($view=false) {
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_id,ic_url,ic_sitecode,is_id');
@ -100,10 +95,10 @@ class Welcome extends CI_Controller {
//获取某个信息节点和子节点url
//$is_parent_id 结构id或者是url
public function create_infomation_urls($is_parent_id, $view = false) {
$ic_url=$this->input->get_post('ic_url');
if(!empty($ic_url)){
$ic_url = $this->input->get_post('ic_url');
if (! empty($ic_url)) {
$structure = $this->Information_model->Detail($ic_url);
}else{
} else {
$structure = $this->InfoStructures_model->Detail($is_parent_id);
}
@ -111,9 +106,9 @@ class Welcome extends CI_Controller {
show_404();
return false;
}
$data['all_information'] = $this->Information_model->get_list_by_path($structure->is_path,false,false,'is_id,ic_url,ic_id,ic_status');
$data['all_information'] = $this->Information_model->get_list_by_path($structure->is_path, false, false, 'is_id,ic_url,ic_id,ic_status');
$this->load->view('bootstrap3/header', $data);
switch ($view){
switch ($view) {
case 'amp':
$this->load->view('bootstrap3/refresh_amp_urls');
break;
@ -128,8 +123,8 @@ class Welcome extends CI_Controller {
}
//根据信息节点ID获取信息用于搜索结果的批量更新静态页面
public function create_infomation_urls_by_ids($view = false){
$is_ids=$this->input->get('key');
public function create_infomation_urls_by_ids($view = false) {
$is_ids = $this->input->get('key');
if (empty($is_ids)) {
show_404();
return false;
@ -163,19 +158,19 @@ class Welcome extends CI_Controller {
public function get_info_backup_id($info_id) {
$last_backup = $this->Logs_model->get_last_backup($info_id);
if (empty($last_backup)) {
$this->echo_json(array(
$this->echo_json([
'status' => 'error',
'logId' => 0,
'datetime' => 0,
'username' => 0
));
'username' => 0,
]);
} else {
$this->echo_json(array(
$this->echo_json([
'status' => 'success',
'logId' => $last_backup->log_id,
'datetime' => $last_backup->log_datetime,
'username' => $last_backup->log_ht_username
));
'username' => $last_backup->log_ht_username,
]);
}
}
@ -186,11 +181,11 @@ class Welcome extends CI_Controller {
libxml_use_internal_errors(true);
$htm_doc->strictErrorChecking = false;
if (empty($information->ic_content)) {
$this->echo_json(array(
$this->echo_json([
'status' => 'error',
'infoId' => $info_id,
'message' => 'info content is empty'
));
'message' => 'info content is empty',
]);
return;
}
$htm_doc->loadHTML(
@ -208,7 +203,7 @@ class Welcome extends CI_Controller {
$a_href = $anchor->getAttribute('href');
echo 'a.href: ' . $a_href . '<br>';
$match_result = array();
$match_result = [];
preg_match('/^http:\/\/www.chinahighlights.com(.*)/', $a_href, $match_result);
$result_count = count($match_result);
if ($result_count == 2) {
@ -223,7 +218,7 @@ class Welcome extends CI_Controller {
public function count_redirect_nofollow() {
$include_redirece_info = $this->Information_model->search_all_text('&t=78002', 2000);
echo 'redirect count: ' . count($include_redirece_info) . '<br/>';
$redirect_nofollow_list = array();
$redirect_nofollow_list = [];
$htm_doc = new DOMDocument();
$htm_doc->encoding = 'UTF-8';
libxml_use_internal_errors(true);
@ -237,7 +232,7 @@ class Welcome extends CI_Controller {
$a_href = $anchor->getAttribute('href');
$a_rel = $anchor->getAttribute('rel');
$match_result = array();
$match_result = [];
preg_match('/.*&t=78002$/', $a_href, $match_result);
$result_count = count($match_result);
if ($result_count > 0 && $a_rel != 'nofollow') {
@ -316,9 +311,9 @@ class Welcome extends CI_Controller {
//批量替换二级域名如图片或者data域名
function replace_hostname($topnum) {
$data = array();
$find_host = 'http://data.chinarundreisen.com/'; //http://bilder.chinarundreisen.com/
$new_host = '//data.chinarundreisen.com/';
$data = [];
$find_host = 'http://data.chinahighlightstravel.de/'; //http://images.chinahighlightstravel.de/
$new_host = '//data.chinahighlightstravel.de/';
$data['all_information'] = $this->Information_model->search_all_text($find_host, $topnum);
if ($data['all_information']) {
foreach ($data['all_information'] as $item) {
@ -335,13 +330,13 @@ class Welcome extends CI_Controller {
private function check_url($subject) {
$result = $subject;
$check_rules = array(
$check_rules = [
'/^\/image\/(.*)/' => '//data.chinahighlights.com/image/',
'/^\/pic\/(.*)/' => '//data.chinahighlights.com/pic/',
'/^\/allpicture\/(.*)/' => '//data.chinahighlights.com/allpicture/',
'/^http:\/\/images.chinahighlights.com(.*)/' => '//images.chinahighlights.com',
'/^http:\/\/data.chinahighlights.com(.*)/' => '//data.chinahighlights.com',
'/^http:\/\/www.chinahighlights.com(.*)/' => '//www.chinahighlights.com');
'/^http:\/\/www.chinahighlights.com(.*)/' => '//www.chinahighlights.com'];
foreach ($check_rules as $pattern => $replace) {
$result = $this->replace_url($pattern, $replace, $result);
@ -351,7 +346,7 @@ class Welcome extends CI_Controller {
private function replace_url($pattern, $replace, $subject) {
$result = $subject;
$match_result = array();
$match_result = [];
preg_match($pattern, $subject, $match_result);
$result_count = count($match_result);
if ($result_count == 2) {
@ -375,8 +370,10 @@ class Welcome extends CI_Controller {
public function set_path($is_id, $parent_path = '') {
$parent_path = str_replace('-', ',', $parent_path);
$parent_path = trim($parent_path, ',');
if ($parent_path != '')
if ($parent_path != '') {
$parent_path .= ',';
}
$this->load->model('Import_model');
$this->Import_model->set_path($is_id, $parent_path);
echo 'ok';
@ -397,9 +394,9 @@ class Welcome extends CI_Controller {
* @return:
* @Date Changed:
*/
public function AddRootNote(){
public function AddRootNote() {
$this->InfoContents_model->Add('', 'NewRootNote', 'root', 'NewRootNote', '', '', '', '', '', 0, 0, '', '', 0, 0, '', '', '', '', 0,
'','');
'', '');
$this->InfoStructures_model->AddRootNote($this->InfoContents_model->insert_id);
$is_id = $this->InfoStructures_model->insert_id;
redirect(site_url('information/edit/' . $is_id));

@ -1,34 +1,33 @@
<?php
if (!defined('BASEPATH'))
if (! defined('BASEPATH')) {
exit('No direct script access allowed');
}
/*
* AMP的相关方法
*/
class Amplib
{
class Amplib {
var $CI;
public function __construct()
{
public function __construct() {
$this->CI = &get_instance();
$this->CI->load->model('Information_model');
$this->CI->load->model('InfoMetas_model');
$this->CI->load->model('Logs_model');
}
public function edit($ic_id)
{
$data = array();
public function edit($ic_id) {
$data = [];
$data['information'] = $this->CI->Information_model->detail_by_ic_id($ic_id);
if ($data['information'] == FALSE) {
show_404();
}
//查询上一次保存记录
$amp_log = $this->CI->Logs_model->get_last_edit_amp($ic_id);
if (!empty($amp_log)) {
if (! empty($amp_log)) {
$data['last_edit_amp_id'] = $amp_log->log_id;
} else {
$data['last_edit_amp_id'] = '';
@ -39,15 +38,14 @@ class Amplib
$this->CI->load->view('bootstrap3/footer');
}
public function auto_create($ic_id)
{
$data = array();
public function auto_create($ic_id) {
$data = [];
if (strtolower($this->CI->config->item('site_code')) == 'cht') {
$this->CI->Information_model->ic_type = "AND ic.ic_type != 'none'";
}
$data['information'] = $this->CI->Information_model->detail_by_ic_id($ic_id);
if ($data['information'] == FALSE) {
return json_encode(array('result' => 'no', 'data' => '找不到这个页面'));
return json_encode(['result' => 'no', 'data' => '找不到这个页面']);
}
//144.76.185.44:8029
@ -64,7 +62,7 @@ class Amplib
$html_source_url = 'http://169.54.172.35:3588' . $data['information']->ic_url;
break;
case 'gm':
$websitehost = 'https://data.chinarundreisen.com';
$websitehost = 'https://data.chinahighlightstravel.de';
$html_source_url = 'https://www.chinarundreisen.com/' . $data['information']->ic_url;
break;
case 'ct':
@ -77,12 +75,12 @@ class Amplib
}
//获取网页当前源码,然后发送到信息平台
$html_source = GET_HTTP($html_source_url);
if (!empty($html_source)) {
$post_data = array('websitehost' => $websitehost, 'template_name' => $site_code, 'create_amp' => 'true', 'htmlsource' => $html_source);
if (! empty($html_source)) {
$post_data = ['websitehost' => $websitehost, 'template_name' => $site_code, 'create_amp' => 'true', 'htmlsource' => $html_source];
//德语站点走另外一个控制器,其他站点还是走原来的流程
if ($site_code == 'gm') {
if ($data['information']->ic_url == '/massgeschneiderte-china-reisen/') {
return json_encode(array());
return json_encode([]);
} else {
return GET_HTTP(site_url('/apps/htmlcompressor/index_gm/choose_way'), $post_data, 'POST');
}
@ -92,12 +90,11 @@ class Amplib
return GET_HTTP(site_url('/apps/htmlcompressor/index/optimize'), $post_data, 'POST');
}
}
return json_encode(array('result' => 'no', 'data' => '不知道哪里错了,看代码'));
return json_encode(['result' => 'no', 'data' => '不知道哪里错了,看代码']);
}
public function edit_save($ic_id = false, $textarea_htmlcode = false, $amp_status = false)
{
$data = array();
public function edit_save($ic_id = false, $textarea_htmlcode = false, $amp_status = false) {
$data = [];
if ($ic_id === false) {
$ic_id = $this->CI->input->post('ic_id');
}
@ -120,16 +117,16 @@ class Amplib
$this->CI->Logs_model->write('backup_amp', $ic_id, $textarea_htmlcode);
//AMP格式验证
if ($amp_status !== '0') {//只有发布的时候才需要验证
if ($amp_status !== '0') { //只有发布的时候才需要验证
//把AMP网页内容到purifycss处理内置了AMP-Validator
$purifycss_server = 'http://169.54.167.189:33033/';
if ($this->CI->config->item('site_code' == 'gm')) {//德语站点使用自己的css处理服务器
if ($this->CI->config->item('site_code' == 'gm')) { //德语站点使用自己的css处理服务器
$purifycss_server = 'http://158.177.67.52:33033/';
}
$validator_result = GET_HTTP($purifycss_server, 'amp_source=' . urlencode($textarea_htmlcode), 'POST');
$validator_result = json_decode($validator_result);
if ($validator_result->status == 'FAIL') {
return json_encode(array('name' => 'no', 'value' => $validator_result->errors));
return json_encode(['name' => 'no', 'value' => $validator_result->errors]);
}
}
$amp = $this->CI->InfoMetas_model->get($ic_id, 'AMP');
@ -146,7 +143,7 @@ class Amplib
$this->CI->InfoMetas_model->update($ic_id, 'AMP_STATUS', $amp_status);
}
return json_encode(array('name' => 'ok', 'value' => $this->CI->lang->line('form_info_success')));
return json_encode(['name' => 'ok', 'value' => $this->CI->lang->line('form_info_success')]);
}
}

@ -1,21 +1,22 @@
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
if (! defined('BASEPATH')) {
exit('No direct script access allowed');
}
class Index_ah extends CI_Controller
{
class Index_ah extends CI_Controller {
public function __construct(){
public function __construct() {
parent::__construct();
$this->load->library('simple_html_dom_lib');
}
public function index(){
public function index() {
$this->load->view('welcome');
}
//选择处理方式
public function choose_way(){
public function choose_way() {
$this->htmlsource = $this->input->post('htmlsource');
$this->websitehost = $this->input->post('websitehost');
$this->template_name = $this->input->post('template_name');
@ -23,7 +24,7 @@ class Index_ah extends CI_Controller
$this->debug = $this->input->post('debug');
/*$this->htmlsource = file_get_contents('aa.htm');
$this->websitehost = 'https://data.chinarundreisen.com';
$this->websitehost = 'https://data.chinahighlightstravel.de';
$this->create_amp = 'true';
$this->template_name = 'gm';*/
@ -43,10 +44,10 @@ class Index_ah extends CI_Controller
$this->html_object = str_get_html($this->htmlsource);
//PC或AMP的构造方式
if (!empty($this->create_amp)) {
if (! empty($this->create_amp)) {
echo $this->create_amp();
return;
}else{
} else {
echo $this->optimize();
return;
}
@ -54,13 +55,13 @@ class Index_ah extends CI_Controller
}
//html优化处理
function optimize(){
function optimize() {
//提取css样式地址
$link_css_array = array();
$link_css_array = [];
$css_content = '';
foreach ($this->html_object->find('link') as $link_css) {
//将所有的样式链接存储为一个数组
if ($link_css->rel == 'stylesheet' && !empty($link_css->href)) {
if ($link_css->rel == 'stylesheet' && ! empty($link_css->href)) {
$link_css_array[] = $link_css->href;
$link_css->outertext = ''; //删除链接
}
@ -86,11 +87,11 @@ class Index_ah extends CI_Controller
}
//提取和下载所有JS脚本包括链接文件和页面脚本
$link_js_array = array();
$link_js_array = [];
$js_inline_content = '';
$js_jquery_content = '';
foreach ($this->html_object->find('script') as $link_script) {
if (!empty($link_script->src)) {
if (! empty($link_script->src)) {
if (empty($link_script->defer) && empty($link_script->async)) { //没有defer标记的才处理否则让js延后加载
$link_js_array[] = $link_script->src;
$link_script->outertext = ''; //删除链接,移动到页底
@ -101,7 +102,7 @@ class Index_ah extends CI_Controller
// $js_content.= $link_script;//js的内容包含<script>
//含有$表示调用了jquery的函数添加延迟加载defer
//包含gtm的js引入就跳出本次循环
if(strpos($link_script, 'https://www.googletagmanager.com/gtm.js')){
if (strpos($link_script, 'https://www.googletagmanager.com/gtm.js')) {
continue;
}
if (strpos($link_script, '$') !== FALSE) {
@ -137,7 +138,7 @@ class Index_ah extends CI_Controller
//把精简的css添加到head前面
$this->html_object = str_replace('</head>', '<style type="text/css">' . $optimize_css . "</style></head>", $this->html_object);
//删除多余空格和换行符
$this->html_object = str_replace(array(" ", "\t", "\n", "\r"), " ", $this->html_object);
$this->html_object = str_replace([" ", "\t", "\n", "\r"], " ", $this->html_object);
//循环n次把双空格替换为一个空格
for ($i = 0; $i <= 4; $i++) {
$this->html_object = str_replace(" ", " ", $this->html_object);
@ -157,7 +158,7 @@ class Index_ah extends CI_Controller
$lastload_js .= $js_inline_content;
$this->html_object = str_replace('</body>', $lastload_js . '</body>', $this->html_object);
echo json_encode(array('result' => 'ok', 'data' => array('html_object' => $this->html_object, 'js_content' => $js_content)));
echo json_encode(['result' => 'ok', 'data' => ['html_object' => $this->html_object, 'js_content' => $js_content]]);
}
//生成AMP版本 用移动端版本生成
@ -172,7 +173,7 @@ class Index_ah extends CI_Controller
8.todo:增加application/ld+json
要求: 图片文件必须带有域名,否则的获取尺寸会出错,如 https://data.asiahighlights.com/pic/abc.jpg
*/
function create_amp(){
function create_amp() {
//读取站点的AMP模板
$amp_template = $this->load->view('amp-template/' . $this->template_name, null, true);
@ -203,10 +204,10 @@ class Index_ah extends CI_Controller
}
foreach ($this->html_object->find('link') as $link) {
if ($link->rel == 'stylesheet' && !empty($link->href)) {
if ($link->rel == 'stylesheet' && ! empty($link->href)) {
$link->outertext = '';
}
if ($link->rel == 'canonical' && !empty($link->href)) {
if ($link->rel == 'canonical' && ! empty($link->href)) {
$amp_template = str_replace('<!--@CANONICAL@-->', $link->href, $amp_template);
}
}
@ -214,14 +215,14 @@ class Index_ah extends CI_Controller
//获取图片尺寸AMP要求必须填写width和height
//格式化图片URL
foreach ($this->html_object->find('img') as $image) {
if (!empty($image->src)) {
if (! empty($image->src)) {
$img_src_host = parse_url($image->src, PHP_URL_HOST);
if (empty($img_src_host)) {
$img_src_host = $this->websitehost;
}
$image->src = $this->format_url($image->src, $img_src_host);
}
if (!empty($image->originalsrc)) {
if (! empty($image->originalsrc)) {
$img_src_host = parse_url($image->src, PHP_URL_HOST);
if (empty($img_src_host)) {
$img_src_host = $websitehost;
@ -231,13 +232,13 @@ class Index_ah extends CI_Controller
}
//拼接请求的图片url如 https://data.asiahighlights.com/imagesize.php?photo=/pic/logo-ah.png,/pic/ah-slide-logo.png
$request_size = array();
$request_size = [];
foreach ($this->html_object->find('img') as $image) {
$img_src = $image->src;
if (!empty($image->originalsrc)) {
if (! empty($image->originalsrc)) {
$img_src = $image->originalsrc;
}
if (strpos($img_src, 'facebook.com') !== false || strpos($img_src, 'dmca.com') !== false) {//facebook dmca会添加一个跟踪代码需要删除掉否则获取图片尺寸会报错
if (strpos($img_src, 'facebook.com') !== false || strpos($img_src, 'dmca.com') !== false) { //facebook dmca会添加一个跟踪代码需要删除掉否则获取图片尺寸会报错
$image->outertext = '';
continue;
}
@ -246,11 +247,11 @@ class Index_ah extends CI_Controller
}
//请求图片尺寸
$image_sizes = array();
$image_sizes = [];
foreach ($request_size as $host => $path) {
$parse_url = "https://{$host}/imagesize.php?photo=" . urlencode(implode(',', $path));
$size_data = GET_HTTP($parse_url);
if (!empty($size_data)) {
if (! empty($size_data)) {
$size_data = json_decode($size_data);
foreach ($size_data as $size_item) {
$size_item->photo = "https://{$host}" . $size_item->photo;
@ -262,33 +263,33 @@ class Index_ah extends CI_Controller
//获取图片尺寸 end
foreach ($this->html_object->find('img') as $image) {
$img_src = $image->src;
if (!empty($image->originalsrc)) {
if (! empty($image->originalsrc)) {
$img_src = $image->originalsrc;
}
if(empty($image_sizes[$img_src])){
if (empty($image_sizes[$img_src])) {
//如果尺寸不存在则跳过
continue;
}
$img_size = $image_sizes[$img_src];
$img_alt = $image->alt;
$img_class = $image->class;
if (!empty($img_size)) {
if (! empty($img_size)) {
//添加webp图片支持
$img_src_webp='';
$img_src_webp = '';
$layout = 'responsive';
if(substr($img_src, -4) == '.jpg'){
if($img_size->width < 400){
if (substr($img_src, -4) == '.jpg') {
if ($img_size->width < 400) {
$layout = 'fixed';
}
$img_src_jpg=" <amp-img fallback layout=\"{$layout}\" class=\"{$img_class}\" alt=\"{$img_alt}\" src=\"{$img_src}\" width=\"{$img_size->width}\" height=\"{$img_size->height}\"></amp-img>";
$img_src_jpg = " <amp-img fallback layout=\"{$layout}\" class=\"{$img_class}\" alt=\"{$img_alt}\" src=\"{$img_src}\" width=\"{$img_size->width}\" height=\"{$img_size->height}\"></amp-img>";
$img_src_webp=substr($img_src, 0, strlen($img_src) - 4).'.webp';
$img_src_webp = substr($img_src, 0, strlen($img_src) - 4) . '.webp';
$img_src_webp = " <amp-img layout=\"{$layout}\" class=\"{$img_class}\" alt=\"{$img_alt}\" src=\"{$img_src_webp}\" width=\"{$img_size->width}\" height=\"{$img_size->height}\">{$img_src_jpg}</amp-img>";
}
if(!empty($img_src_webp)){
$image->outertext =$img_src_webp;
}else{
if (! empty($img_src_webp)) {
$image->outertext = $img_src_webp;
} else {
$image->outertext = " <amp-img layout=\"{$layout}\" class=\"{$img_class}\" alt=\"{$img_alt}\" src=\"{$img_src}\" width=\"{$img_size->width}\" height=\"{$img_size->height}\"></amp-img>";
}
}
@ -313,18 +314,18 @@ class Index_ah extends CI_Controller
$amp_template = str_replace($form, '', $amp_template);
}
if(!empty($form)){
if (! empty($form)) {
$replace_text = '<script async="" custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script><style amp-custom>';
$amp_template = str_replace('<style amp-custom>',$replace_text, $amp_template);
$amp_template = str_replace('<style amp-custom>', $replace_text, $amp_template);
}
//产品页面处理结束
$link_css_array = array();
$link_css_array = [];
$css_content = '';
foreach ($this->html_object->find('link') as $link_css) {
//将所有的样式链接存储为一个数组
if ($link_css->rel == 'stylesheet' && !empty($link_css->href)) {
if ($link_css->rel == 'stylesheet' && ! empty($link_css->href)) {
$link_css_array[] = $link_css->href;
$link_css->outertext = ''; //删除链接
}
@ -333,12 +334,12 @@ class Index_ah extends CI_Controller
//循环下载所有的css样式拼接成字符串
foreach ($link_css_array as $item) {
//排除一定不会用到的css提高精简的速度
if(strpos($item,'base.css')){
$item = 'https://data.chinarundreisen.com/min/?f=/css/base.css';
if (strpos($item, 'base.css')) {
$item = 'https://data.chinahighlightstravel.de/min/?f=/css/base.css';
}
if(strpos($item,'reiseroute.css')){
$item = 'https://data.chinarundreisen.com/min/?f=/css/reiseroute-amp.css';
if (strpos($item, 'reiseroute.css')) {
$item = 'https://data.chinahighlightstravel.de/min/?f=/css/reiseroute-amp.css';
}
$get_http_temp = GET_HTTP($this->format_url($item, $this->websitehost));
@ -371,18 +372,18 @@ class Index_ah extends CI_Controller
//替换掉写在组件上的样式
$amp_template = preg_replace('/style=.+?[\'|"]/i', '', $amp_template);
echo json_encode(array('result' => 'ok', 'data' => array('amp' => $amp_template)));
echo json_encode(['result' => 'ok', 'data' => ['amp' => $amp_template]]);
}
//格式化url保证请求的URL有域名//更换为对应的域名路径
function format_url($url, $host = ''){
function format_url($url, $host = '') {
if (substr($url, 0, 8) == 'https://' || substr($url, 0, 7) == 'http://') {
$url = str_replace('http://', 'https://', $url);//http要改为https
$url = str_replace('http://', 'https://', $url); //http要改为https
return urldecode($url);
}
if (substr($url, 0, 2) == '//') { //https或http
return urldecode('https://'.substr($url, 2, strlen($url)-2)); //只替换开头的//部分url不规范有//在url中间
return urldecode('https://' . substr($url, 2, strlen($url) - 2)); //只替换开头的//部分url不规范有//在url中间
}
return urldecode($host . $url);

@ -1,21 +1,22 @@
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
if (! defined('BASEPATH')) {
exit('No direct script access allowed');
}
class Index_gm extends CI_Controller
{
class Index_gm extends CI_Controller {
public function __construct(){
public function __construct() {
parent::__construct();
$this->load->library('simple_html_dom_lib');
}
public function index(){
public function index() {
$this->load->view('welcome');
}
//选择处理方式
public function choose_way(){
public function choose_way() {
$this->htmlsource = $this->input->post('htmlsource');
$this->websitehost = $this->input->post('websitehost');
$this->template_name = $this->input->post('template_name');
@ -23,7 +24,7 @@ class Index_gm extends CI_Controller
$this->debug = $this->input->post('debug');
/*$this->htmlsource = file_get_contents('aa.htm');
$this->websitehost = 'https://data.chinarundreisen.com';
$this->websitehost = 'https://data.chinahighlightstravel.de';
$this->create_amp = 'true';
$this->template_name = 'gm';*/
@ -43,10 +44,10 @@ class Index_gm extends CI_Controller
$this->html_object = str_get_html($this->htmlsource);
//PC或AMP的构造方式
if (!empty($this->create_amp)) {
if (! empty($this->create_amp)) {
echo $this->create_amp();
return;
}else{
} else {
echo $this->optimize();
return;
}
@ -54,13 +55,13 @@ class Index_gm extends CI_Controller
}
//html优化处理
function optimize(){
function optimize() {
//提取css样式地址
$link_css_array = array();
$link_css_array = [];
$css_content = '';
foreach ($this->html_object->find('link') as $link_css) {
//将所有的样式链接存储为一个数组
if ($link_css->rel == 'stylesheet' && !empty($link_css->href)) {
if ($link_css->rel == 'stylesheet' && ! empty($link_css->href)) {
$link_css_array[] = $link_css->href;
$link_css->outertext = ''; //删除链接
}
@ -86,11 +87,11 @@ class Index_gm extends CI_Controller
}
//提取和下载所有JS脚本包括链接文件和页面脚本
$link_js_array = array();
$link_js_array = [];
$js_inline_content = '';
$js_jquery_content = '';
foreach ($this->html_object->find('script') as $link_script) {
if (!empty($link_script->src)) {
if (! empty($link_script->src)) {
if (empty($link_script->defer) && empty($link_script->async)) { //没有defer标记的才处理否则让js延后加载
$link_js_array[] = $link_script->src;
$link_script->outertext = ''; //删除链接,移动到页底
@ -101,7 +102,7 @@ class Index_gm extends CI_Controller
// $js_content.= $link_script;//js的内容包含<script>
//含有$表示调用了jquery的函数添加延迟加载defer
//包含gtm的js引入就跳出本次循环
if(strpos($link_script, 'https://www.googletagmanager.com/gtm.js')){
if (strpos($link_script, 'https://www.googletagmanager.com/gtm.js')) {
continue;
}
if (strpos($link_script, '$') !== FALSE) {
@ -137,7 +138,7 @@ class Index_gm extends CI_Controller
//把精简的css添加到head前面
$this->html_object = str_replace('</head>', '<style type="text/css">' . $optimize_css . "</style></head>", $this->html_object);
//删除多余空格和换行符
$this->html_object = str_replace(array(" ", "\t", "\n", "\r"), " ", $this->html_object);
$this->html_object = str_replace([" ", "\t", "\n", "\r"], " ", $this->html_object);
//循环n次把双空格替换为一个空格
for ($i = 0; $i <= 4; $i++) {
$this->html_object = str_replace(" ", " ", $this->html_object);
@ -157,7 +158,7 @@ class Index_gm extends CI_Controller
$lastload_js .= $js_inline_content;
$this->html_object = str_replace('</body>', $lastload_js . '</body>', $this->html_object);
echo json_encode(array('result' => 'ok', 'data' => array('html_object' => $this->html_object, 'js_content' => $js_content)));
echo json_encode(['result' => 'ok', 'data' => ['html_object' => $this->html_object, 'js_content' => $js_content]]);
}
//生成AMP版本 用移动端版本生成
@ -172,7 +173,7 @@ class Index_gm extends CI_Controller
8.todo:增加application/ld+json
要求: 图片文件必须带有域名,否则的获取尺寸会出错,如 https://data.asiahighlights.com/pic/abc.jpg
*/
function create_amp(){
function create_amp() {
//读取站点的AMP模板
$amp_template = $this->load->view('amp-template/' . $this->template_name, null, true);
@ -203,10 +204,10 @@ class Index_gm extends CI_Controller
}
foreach ($this->html_object->find('link') as $link) {
if ($link->rel == 'stylesheet' && !empty($link->href)) {
if ($link->rel == 'stylesheet' && ! empty($link->href)) {
$link->outertext = '';
}
if ($link->rel == 'canonical' && !empty($link->href)) {
if ($link->rel == 'canonical' && ! empty($link->href)) {
$amp_template = str_replace('<!--@CANONICAL@-->', $link->href, $amp_template);
}
}
@ -214,14 +215,14 @@ class Index_gm extends CI_Controller
//获取图片尺寸AMP要求必须填写width和height
//格式化图片URL
foreach ($this->html_object->find('img') as $image) {
if (!empty($image->src)) {
if (! empty($image->src)) {
$img_src_host = parse_url($image->src, PHP_URL_HOST);
if (empty($img_src_host)) {
$img_src_host = $this->websitehost;
}
$image->src = $this->format_url($image->src, $img_src_host);
}
if (!empty($image->originalsrc)) {
if (! empty($image->originalsrc)) {
$img_src_host = parse_url($image->src, PHP_URL_HOST);
if (empty($img_src_host)) {
$img_src_host = $websitehost;
@ -231,13 +232,13 @@ class Index_gm extends CI_Controller
}
//拼接请求的图片url如 https://data.asiahighlights.com/imagesize.php?photo=/pic/logo-ah.png,/pic/ah-slide-logo.png
$request_size = array();
$request_size = [];
foreach ($this->html_object->find('img') as $image) {
$img_src = $image->src;
if (!empty($image->originalsrc)) {
if (! empty($image->originalsrc)) {
$img_src = $image->originalsrc;
}
if (strpos($img_src, 'facebook.com') !== false || strpos($img_src, 'dmca.com') !== false) {//facebook dmca会添加一个跟踪代码需要删除掉否则获取图片尺寸会报错
if (strpos($img_src, 'facebook.com') !== false || strpos($img_src, 'dmca.com') !== false) { //facebook dmca会添加一个跟踪代码需要删除掉否则获取图片尺寸会报错
$image->outertext = '';
continue;
}
@ -246,11 +247,11 @@ class Index_gm extends CI_Controller
}
//请求图片尺寸
$image_sizes = array();
$image_sizes = [];
foreach ($request_size as $host => $path) {
$parse_url = "https://{$host}/imagesize.php?photo=" . urlencode(implode(',', $path));
$size_data = GET_HTTP($parse_url);
if (!empty($size_data)) {
if (! empty($size_data)) {
$size_data = json_decode($size_data);
foreach ($size_data as $size_item) {
$size_item->photo = "https://{$host}" . $size_item->photo;
@ -262,33 +263,33 @@ class Index_gm extends CI_Controller
//获取图片尺寸 end
foreach ($this->html_object->find('img') as $image) {
$img_src = $image->src;
if (!empty($image->originalsrc)) {
if (! empty($image->originalsrc)) {
$img_src = $image->originalsrc;
}
if(empty($image_sizes[$img_src])){
if (empty($image_sizes[$img_src])) {
//如果尺寸不存在则跳过
continue;
}
$img_size = $image_sizes[$img_src];
$img_alt = $image->alt;
$img_class = $image->class;
if (!empty($img_size)) {
if (! empty($img_size)) {
//添加webp图片支持
$img_src_webp='';
$img_src_webp = '';
$layout = 'responsive';
if(substr($img_src, -4) == '.jpg'){
if($img_size->width < 400){
if (substr($img_src, -4) == '.jpg') {
if ($img_size->width < 400) {
$layout = 'fixed';
}
$img_src_jpg=" <amp-img fallback layout=\"{$layout}\" class=\"{$img_class}\" alt=\"{$img_alt}\" src=\"{$img_src}\" width=\"{$img_size->width}\" height=\"{$img_size->height}\"></amp-img>";
$img_src_jpg = " <amp-img fallback layout=\"{$layout}\" class=\"{$img_class}\" alt=\"{$img_alt}\" src=\"{$img_src}\" width=\"{$img_size->width}\" height=\"{$img_size->height}\"></amp-img>";
$img_src_webp=substr($img_src, 0, strlen($img_src) - 4).'.webp';
$img_src_webp = substr($img_src, 0, strlen($img_src) - 4) . '.webp';
$img_src_webp = " <amp-img layout=\"{$layout}\" class=\"{$img_class}\" alt=\"{$img_alt}\" src=\"{$img_src_webp}\" width=\"{$img_size->width}\" height=\"{$img_size->height}\">{$img_src_jpg}</amp-img>";
}
if(!empty($img_src_webp)){
$image->outertext =$img_src_webp;
}else{
if (! empty($img_src_webp)) {
$image->outertext = $img_src_webp;
} else {
$image->outertext = " <amp-img layout=\"{$layout}\" class=\"{$img_class}\" alt=\"{$img_alt}\" src=\"{$img_src}\" width=\"{$img_size->width}\" height=\"{$img_size->height}\"></amp-img>";
}
}
@ -313,18 +314,18 @@ class Index_gm extends CI_Controller
$amp_template = str_replace($form, '', $amp_template);
}
if(!empty($form)){
if (! empty($form)) {
$replace_text = '<script async="" custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script><style amp-custom>';
$amp_template = str_replace('<style amp-custom>',$replace_text, $amp_template);
$amp_template = str_replace('<style amp-custom>', $replace_text, $amp_template);
}
//产品页面处理结束
$link_css_array = array();
$link_css_array = [];
$css_content = '';
foreach ($this->html_object->find('link') as $link_css) {
//将所有的样式链接存储为一个数组
if ($link_css->rel == 'stylesheet' && !empty($link_css->href)) {
if ($link_css->rel == 'stylesheet' && ! empty($link_css->href)) {
$link_css_array[] = $link_css->href;
$link_css->outertext = ''; //删除链接
}
@ -333,12 +334,12 @@ class Index_gm extends CI_Controller
//循环下载所有的css样式拼接成字符串
foreach ($link_css_array as $item) {
//排除一定不会用到的css提高精简的速度
if(strpos($item,'base.css')){
$item = 'https://data.chinarundreisen.com/min/?f=/css/base.css';
if (strpos($item, 'base.css')) {
$item = 'https://data.chinahighlightstravel.de/min/?f=/css/base.css';
}
if(strpos($item,'reiseroute.css')){
$item = 'https://data.chinarundreisen.com/min/?f=/css/reiseroute-amp.css';
if (strpos($item, 'reiseroute.css')) {
$item = 'https://data.chinahighlightstravel.de/min/?f=/css/reiseroute-amp.css';
}
$get_http_temp = GET_HTTP($this->format_url($item, $this->websitehost));
@ -371,18 +372,18 @@ class Index_gm extends CI_Controller
//替换掉写在组件上的样式
$amp_template = preg_replace('/style=.+?[\'|"]/i', '', $amp_template);
echo json_encode(array('result' => 'ok', 'data' => array('amp' => $amp_template)));
echo json_encode(['result' => 'ok', 'data' => ['amp' => $amp_template]]);
}
//格式化url保证请求的URL有域名//更换为对应的域名路径
function format_url($url, $host = ''){
function format_url($url, $host = '') {
if (substr($url, 0, 8) == 'https://' || substr($url, 0, 7) == 'http://') {
$url = str_replace('http://', 'https://', $url);//http要改为https
$url = str_replace('http://', 'https://', $url); //http要改为https
return urldecode($url);
}
if (substr($url, 0, 2) == '//') { //https或http
return urldecode('https://'.substr($url, 2, strlen($url)-2)); //只替换开头的//部分url不规范有//在url中间
return urldecode('https://' . substr($url, 2, strlen($url) - 2)); //只替换开头的//部分url不规范有//在url中间
}
return urldecode($host . $url);

@ -9,7 +9,7 @@
<link rel="canonical" href="<!--@CANONICAL@-->">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<link rel="shortcut icon" href="https://www.chinarundreisen.com/favicon.ico" />
<link rel="shortcut icon" href="https://www.chinahighlightstravel.de/favicon.ico" />
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js" async></script>
<script async custom-element="amp-accordion" src="https://cdn.ampproject.org/v0/amp-accordion-0.1.js"></script>

@ -6,13 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>China Reisen und China Rundreisen individuell | Chinarundreisen.com</title>
<link rel="stylesheet" href="//data.chinarundreisen.com/min/?f=/css/base.css,/css/header.css,/css/kunden-form.css"/>
<link href="https://data.chinarundreisen.com/information-view/information/css/bootstrap-datetimepicker.min.css?v=201506022" rel="stylesheet" type="text/css"/>
<script language="javascript" src="//data.chinarundreisen.com/min/?f=/js/base.js,/js/bootstrap.min.3.3.5.js,/js/lazyload.js,/js/common.js,/js/gotop.js" type="text/javascript"></script>
<script src="https://data.chinarundreisen.com/information-view/information/js/jquery-ui.min.1-11-3.js" type="text/javascript"></script>
<script src="https://data.chinarundreisen.com/information-view/information/js/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
<link rel="stylesheet" href="//data.chinahighlightstravel.de/min/?f=/css/base.css,/css/header.css,/css/kunden-form.css"/>
<link href="https://data.chinahighlightstravel.de/information-view/information/css/bootstrap-datetimepicker.min.css?v=201506022" rel="stylesheet" type="text/css"/>
<script language="javascript" src="//data.chinahighlightstravel.de/min/?f=/js/base.js,/js/bootstrap.min.3.3.5.js,/js/lazyload.js,/js/common.js,/js/gotop.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/information/js/jquery-ui.min.1-11-3.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/information/js/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="https://data.chinarundreisen.com/information-view/bootstrap/js/respond.min.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/bootstrap/js/respond.min.js" type="text/javascript"></script>
<![endif]-->
<style type="text/css">.popover{background-color:#f2f600;}</style>
</head>
@ -30,10 +30,10 @@
<div class="clearfix"></div>
</div>
<ul class="sidenav-menu">
<li> <a href="//www.chinarundreisen.com/massgeschneiderte-china-reisen/" class="active" style="margin-left:30px !important; padding-right: 50px;">Maßschneidern Ihrer Reise</a>
<li> <a href="//www.chinahighlightstravel.de/massgeschneiderte-china-reisen/" class="active" style="margin-left:30px !important; padding-right: 50px;">Maßschneidern Ihrer Reise</a>
</li>
<li style="position:relative"><span class="close-btn"></span>
<a href="//www.chinarundreisen.com/china-rundreisen/" class="active">Chinarundreisen<span class="phone-arrow"></span></a>
<a href="//www.chinahighlightstravel.de/china-rundreisen/" class="active">Chinarundreisen<span class="phone-arrow"></span></a>
<ul class="sidenav-dropdown" style="display:none">
<li><a href="/chinareisen/">China Reisen 2018</a></li>
<li><a href="/china-individualreisen/">China Individualreisen</a></li>
@ -73,7 +73,7 @@
<div class="container">
<div class="logo">
<a href="/">
<img src="http://data.chinarundreisen.com/public/pic/common/widget/header/pic/logo1_3d64397.jpg" alt="China Highlights" />
<img src="http://data.chinahighlightstravel.de/public/pic/common/widget/header/pic/logo1_3d64397.jpg" alt="China Highlights" />
</a>
</div>
<div class="top-content">
@ -295,7 +295,7 @@ Andere Abfahrts-/Ankunftszeit für
<input type="hidden" name="COLI_SN" value="<?php echo $userinfo[0]->COLI_SN; ?>">
<input type="hidden" name="visitor_link" value="<?php echo $visitor_link; ?>">
<button href="javascript:;" id="form-confirm-info" class="btn btn-danger btn-lg">Überprüfen & Absenden</button>
<p><img src="https://data.chinarundreisen.com/pic/btn-text.jpg" width="311" height="30" /></p>
<p><img src="https://data.chinahighlightstravel.de/pic/btn-text.jpg" width="311" height="30" /></p>
</div>
<div class="form-footer">
@ -366,7 +366,7 @@ $(function(){
});
var coli_sn = <?php echo $userinfo[0]->COLI_SN;?>;
var coli_sn = <?php echo $userinfo[0]->COLI_SN; ?>;
//ajax获取新生成页面的url
$.ajax({

@ -6,16 +6,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>China Reisen und China Rundreisen individuell | Chinarundreisen.com</title>
<link href="https://data.chinarundreisen.com/information-view/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="https://data.chinarundreisen.com/information-view/information/css/order.css" rel="stylesheet" type="text/css"/>
<link href="https://data.chinarundreisen.com/information-view/information/css/bootstrap-datetimepicker.min.css?v=201506022" rel="stylesheet" type="text/css"/>
<link href="https://data.chinahighlightstravel.de/information-view/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="https://data.chinahighlightstravel.de/information-view/information/css/order.css" rel="stylesheet" type="text/css"/>
<link href="https://data.chinahighlightstravel.de/information-view/information/css/bootstrap-datetimepicker.min.css?v=201506022" rel="stylesheet" type="text/css"/>
<!--[if lt IE 9]>
<script src="https://data.chinarundreisen.com/information-view/bootstrap/js/respond.min.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/bootstrap/js/respond.min.js" type="text/javascript"></script>
<![endif]-->
<script src="https://data.chinarundreisen.com/information-view/information/js/jquery.min.js" type="text/javascript"></script>
<script src="https://data.chinarundreisen.com/information-view/bootstrap/js/bootstrap.js" type="text/javascript"></script>
<script src="https://data.chinarundreisen.com/information-view/information/js/jquery-ui.min.1-11-3.js" type="text/javascript"></script>
<script src="https://data.chinarundreisen.com/information-view/information/js/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/information/js/jquery.min.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/bootstrap/js/bootstrap.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/information/js/jquery-ui.min.1-11-3.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/information/js/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
<style type="text/css">.popover{background-color:#f2f600;}</style>
</head>
@ -28,13 +28,17 @@
<div class="row">
<div class="col-lg-3 col-sm-4 logobox hidden-xs">
<a href="/">
<img width="135" src="http://data.chinarundreisen.com/public/pic/common/widget/header/pic/logo1_3d64397.jpg" alt="logo">
<img width="135" src="http://data.chinahighlightstravel.de/public/pic/common/widget/header/pic/logo1_3d64397.jpg" alt="logo">
</a>
</div>
<div class="col-lg-14 col-sm-13 col-lg-offset-3 col-sm-offset-4">
<div class="navbar-header">
<div class="col-xs-24 btn-lg"></div>
<div class="col-xs-24 text-white"><?php if(!isset($dear)) $dear='Liebe/r'; echo $dear; ?> <?php echo $username; ?></div>
<div class="col-xs-24 text-white"><?php if (! isset($dear)) {
$dear = 'Liebe/r';
}
echo $dear; ?><?php echo $username; ?></div>
<div class="col-xs-24 text-white">Buchungsnummer: <?php echo $userinfo[0]->COLI_ID; ?></div>
</div>
</div>
@ -203,7 +207,7 @@
</div>
</div>
</div>
<?php if($userinfo[0]->COLI_CustomerType!=44003){ ?>
<?php if ($userinfo[0]->COLI_CustomerType != 44003) {?>
<div class="form-group col-xs-24 Home-Address">
<div class="input-group">
<span class="input-group-addon" style="min-width:120px;">
@ -229,7 +233,7 @@
<input class="form-control input-sm visible-xs-block" name="home_address">
</div>
</div>
<?php } ?>
<?php }?>
</div>
</div>
@ -299,7 +303,7 @@ Andere Abfahrts-/Ankunftszeit für
</div>
</div>
</div>
<?php if($userinfo[0]->COLI_CustomerType!=44003){ ?>
<?php if ($userinfo[0]->COLI_CustomerType != 44003) {?>
<div class="col-xs-24">
<div class="panel panel-default">
<div class="panel-body">
@ -347,7 +351,7 @@ Andere Abfahrts-/Ankunftszeit für
</div>
</div>
</div>
<?php } ?>
<?php }?>
<div class="col-xs-24">
<input type="hidden" name="toname" value="<?php echo $userinfo[0]->OPI_FirstName; ?>">

@ -7,13 +7,13 @@
<meta name="robots" content="noindex,nofollow" />
<title>China Reisen und China Rundreisen individuell | Chinarundreisen.com</title>
<link href="https://data.chinarundreisen.com/information-view/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="https://data.chinarundreisen.com/information-view/information/css/order.css" rel="stylesheet" type="text/css"/>
<link href="https://data.chinahighlightstravel.de/information-view/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="https://data.chinahighlightstravel.de/information-view/information/css/order.css" rel="stylesheet" type="text/css"/>
<!--[if lt IE 9]>
<script src="https://data.chinarundreisen.com/information-view/bootstrap/js/respond.min.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/bootstrap/js/respond.min.js" type="text/javascript"></script>
<![endif]-->
<script src="https://data.chinarundreisen.com/information-view/information/js/jquery.min.js" type="text/javascript"></script>
<script src="https://data.chinarundreisen.com/information-view/bootstrap/js/bootstrap.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/information/js/jquery.min.js" type="text/javascript"></script>
<script src="https://data.chinahighlightstravel.de/information-view/bootstrap/js/bootstrap.js" type="text/javascript"></script>
</head>
@ -26,7 +26,7 @@
<div class="row">
<div class="col-lg-3 col-sm-4 logobox hidden-xs">
<a href="/">
<img width="135" src="http://data.chinarundreisen.com/public/pic/common/widget/header/pic/logo1_3d64397.jpg" alt="logo">
<img width="135" src="http://data.chinahighlightstravel.de/public/pic/common/widget/header/pic/logo1_3d64397.jpg" alt="logo">
</a>
</div>
<div class="col-lg-16 col-sm-13 col-lg-offset-3 col-sm-offset-4">
@ -61,7 +61,7 @@
</div>
<div class="modal-body" style="height:150px;">
<h4 style="padding-top:10px;">Für jeglichen Grund kontaktieren Sie bitte Ihren Reiseführer.</h4>
<p>----<a href="http://www.chinarundreisen.com" class="">www.chinarundreisen.com</a></p>
<p>----<a href="http://www.chinahighlightstravel.de" class="">www.chinahighlightstravel.de</a></p>
</div>
</div><!-- /.modal-content -->

@ -40,7 +40,7 @@
</div>
<div class="modal-body">
<label>需要更新的URL</label>
<input type="text" class="form-control" name="cdn_url" id="cdn_url" placeholder="如https://data.chinarundreisen.com/min/?f=/css/tailorbox.css" style="width:98%"/>
<input type="text" class="form-control" name="cdn_url" id="cdn_url" placeholder="如https://data.chinahighlightstravel.de/min/?f=/css/tailorbox.css" style="width:98%"/>
<input type="hidden" name="updatecdn_byhand" id="updatecdn_byhand" value="">
<p class="text-danger" id="cdncache_refresh_modal_msg" name="cdncache_refresh_modal_msg"></p>

@ -44,7 +44,7 @@
</div>
<div class="modal-body">
<label>需要更新的URL</label>
<input type="text" class="form-control" name="cdn_url" id="cdn_url" placeholder="如https://data.chinarundreisen.com/min/?f=/css/tailorbox.css" />
<input type="text" class="form-control" name="cdn_url" id="cdn_url" placeholder="如https://data.chinahighlightstravel.de/min/?f=/css/tailorbox.css" />
<input type="hidden" name="updatecdn_byhand" id="updatecdn_byhand" value="">
<p class="text-danger" id="cdncache_refresh_modal_msg" name="cdncache_refresh_modal_msg"></p>

@ -43,7 +43,7 @@
// echo "alert(url.replace('/kcfinder/upload/ah/','https://data.asiahighlights.com/'));";
// break;
// case 'gm':
// echo "alert(url.replace('/kcfinder/upload/gm/','https://data.chinarundreisen.com/'));";
// echo "alert(url.replace('/kcfinder/upload/gm/','https://data.chinahighlightstravel.de/'));";
// break;
// default:
// echo 'alert(url);';
@ -202,21 +202,21 @@
<span class="input-group-btn">
<button class="btn btn-default btn-sm" type="submit">搜索</button>
<?php if (in_array($this->config->item('site_code'), array('jp', 'gm', 'vc', 'vac', 'ru', 'it', 'gh_jp', 'gh_gm', 'gh_vc', 'gh_vac', 'gh_ru', 'gh_it'))) { ?>
<?php if (in_array($this->config->item('site_code'), ['jp', 'gm', 'vc', 'vac', 'ru', 'it', 'gh_jp', 'gh_gm', 'gh_vc', 'gh_vac', 'gh_ru', 'gh_it'])) {?>
<a href="<?php
$admin_info = $this->session->userdata('session_admin');
echo 'https://multimedia.mycht.cn/authorise/' . $admin_info['OPI_SN'] . '/' . $this->config->item('site_code') ?>"
$admin_info = $this->session->userdata('session_admin');
echo 'https://multimedia.mycht.cn/authorise/' . $admin_info['OPI_SN'] . '/' . $this->config->item('site_code')?>"
target="_blank" class="btn btn-default btn-sm" title="多媒体图片"><span
class="glyphicon glyphicon-picture"></span></a>
<?php } else { ?>
<?php } else {?>
<a href="#" onclick="openKCFinder_singleFile_res();" class="btn btn-default btn-sm" title="快速上传图片"><span
class="glyphicon glyphicon-picture"></span></a>
<a target="_blank"
href="<?php
$admin_info = $this->session->userdata('session_admin');
echo 'https://multimedia.mycht.cn/authorise/' . $admin_info['OPI_SN'] . '/' . $this->config->item('site_code') ?>"
echo 'https://multimedia.mycht.cn/authorise/' . $admin_info['OPI_SN'] . '/' . $this->config->item('site_code')?>"
class="btn btn-default btn-sm" title="多媒体图片"><span class="glyphicon glyphicon-new-window"></span></a>
<?php } ?>
<?php }?>
<a href="#" title="静态化更新" class="btn btn-default btn-sm" data-toggle="modal"
data-target="#cache_refresh_modal"><span class="glyphicon glyphicon-repeat"></span></a>
<a href="#" title="cdn缓存清理" class="btn btn-default btn-sm" data-toggle="modal"
@ -228,10 +228,14 @@
<?php
$all_unread_sms = get_all_unread_sms();
$info_unread_sms = get_all_unread_sms('info');
if (isset($information->ic_id))
if (isset($information->ic_id)) {
$current_msg = $information->ic_id;
if (isset($task->t_id))
}
if (isset($task->t_id)) {
$current_msg = $task->t_id;
}
$total_count = $all_unread_sms['sms_count'] + $info_unread_sms['sms_count']; //计算未读消息总数
$unread_sms_ic_id = 0; //用于设置所有收录消息为已读
if ($total_count != 0) {
@ -243,7 +247,7 @@
unset($all_unread_sms['sms'][$current_msg]);
}
?>
<?php
<?php
if (isset($current_msg) && isset($info_unread_sms['sms'][$current_msg])) {
$total_count = $total_count - count($info_unread_sms['sms'][$current_msg]);
unset($info_unread_sms['sms'][$current_msg]);
@ -258,11 +262,11 @@
</a>
<ul class="dropdown-menu">
<!-- 信息平台的消息 -->
<?php if (isset($info_unread_sms['sms']) && !empty($info_unread_sms['sms'])) { ?>
<?php if (isset($info_unread_sms['sms']) && ! empty($info_unread_sms['sms'])) {?>
<a style="padding-left:20px;" href="javascript:void(0);"
onclick="set_allmsg_to_read($('#unreadinfomsg').val());">标记全部收录信息为已读</a>
<li class="divider"></li>
<?php foreach ($info_unread_sms['sms'] as $m) { ?>
<?php foreach ($info_unread_sms['sms'] as $m) {?>
<li><a href="<?php echo site_url('information/edit/' . $m[0]->is_id); ?>">
<?php
$t_title = get_text_short($m[0]->t_title, 15);
@ -271,12 +275,12 @@
</a>
</li>
<?php $unread_sms_ic_id .= ',' . $m[0]->m_object_id; ?>
<?php } ?>
<?php }?>
<li class="divider"></li>
<input type="hidden" name="unreadinfomsg" id="unreadinfomsg" value="<?php echo $unread_sms_ic_id; ?>">
<?php } ?>
<?php }?>
<!--作者平台的消息-->
<?php foreach ($all_unread_sms['sms'] as $am) { ?>
<?php foreach ($all_unread_sms['sms'] as $am) {?>
<li><a href="<?php echo site_url('author/edit_task/' . $am[0]->m_object_id); ?>">
<?php
$t_title = get_text_short($am[0]->t_title, 15);
@ -284,10 +288,10 @@
?>
</a>
</li>
<?php } ?>
<?php }?>
</ul>
</li>
<?php } ?>
<?php }?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<?php
@ -299,12 +303,12 @@
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<?php foreach ($this->config->item('site') as $site_item) { ?>
<?php foreach ($this->config->item('site') as $site_item) {?>
<li> <a href="<?php echo site_url('login/change_site/' . $site_item['site_code']); ?>">
<?php echo $site_item['site_code'] ?>
</a>
</li>
<?php } ?>
<?php }?>
<li><a href="<?php echo site_url('login/out'); ?>">退出</a></li>
</ul>
</li>

@ -342,7 +342,7 @@
//德语站点跳转测试页面
function goto_gmtest_page() {
var site_url = 'https://www.chinarundreisen.com/gm.php/information/detail/?cache=false&static_html_url=';
var site_url = 'https://www.chinahighlightstravel.de/gm.php/information/detail/?cache=false&static_html_url=';
$('#goto_test_page_button').attr("href", site_url + $('#ic_url').val());
return true;
}
@ -486,10 +486,10 @@
width: '100%',
height: '560px',
readOnly: false,
<?php if (is_series_site()) { ?>
<?php if (is_series_site()) {?>
allowedContent: true,
autoParagraph: false,
<?php } ?>
<?php }?>
filebrowserBrowseUrl: '/wysiwyg/ckfinder/ckfinder.php?sitecode=<?php echo $this->config->item('site_code'); ?>',
filebrowserUploadUrl: '/wysiwyg/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=image',
contentsCss: '<?php echo $this->config->item("css_source_" . $this->config->item("site_code")); ?>'
@ -602,12 +602,12 @@
<ul id="treeDemo" name="treeDemo" class="ztree" style="height:600px;overflow-x:auto;"></ul>
<ul class="nav nav-list">
<li class="nav-header">
<?php if (!is_mobile_first()) { ?>
<?php if (! is_mobile_first()) {?>
<a href="<?php echo site_url('welcome/create_infomation_urls/' . $information->is_id); ?>" target="_blank" class="col-sm-5" title="批量更新静态化页面"><i class="text-muted glyphicon glyphicon-retweet"></i></a>
<a href="<?php echo site_url('welcome/create_infomation_urls/' . $information->is_id . '/amp'); ?>" target="_blank" class="col-sm-5" title="批量更新AMP页面"><i class="glyphicon glyphicon-flash"></i></a>
<?php } else { ?>
<?php } else {?>
<a href="<?php echo site_url('welcome/create_infomation_urls/' . $information->is_id . '/mobile-first'); ?>" target="_blank" class="col-sm-5" title="批量更新静态页面"><i class="glyphicon glyphicon-flash"></i></a>
<?php } ?>
<?php }?>
</li>
</ul>
</div>
@ -642,7 +642,7 @@
}
$amp_build_url = "/amp_app/?icid=" . $information->ic_id . "&is_path=" . $information->is_path . "&usr=" . urlencode($amp_user['OPI_Name']) . "&url=" . urlencode($information->ic_url) . "&photo=" . urlencode($amp_photo) . "&site=" . urlencode($this->config->item('site_url')) . "&imgurl=" . urlencode($this->config->item('site_image_url'));
?>
<?php if (is_series_site()) {
<?php if (is_series_site()) {
$PcAmpChecked = '';
// if (get_meta($information->ic_id, 'AMP_BODY_PC_STATUS') == 'yes') {
// $PcAmpChecked = 'checked';
@ -664,7 +664,7 @@
<!--
<label id="PcAmp">
<input type="checkbox" <?php echo ($PcAmpChecked); ?>>
<input type="checkbox" <?php echo($PcAmpChecked); ?>>
PC端页面也使用构建工具发布
</label> |
-->
@ -688,16 +688,16 @@
// });
</script>
<?php
} ?>
<?php if ($information->amp_status === '1') { ?>
}?>
<?php if ($information->amp_status === '1') {?>
<label title="AMP页面编辑"><a href="<?php echo site_url('amp/edit/' . $information->ic_id); ?>" target="_blank"><i class="glyphicon glyphicon-flash"></i></a></label>
<?php } ?>
<?php if ($information->amp_status === '2') { ?>
<?php }?>
<?php if ($information->amp_status === '2') {?>
<label title="AMP页面编辑"><a href="<?php echo site_url('amp/edit/' . $information->ic_id); ?>" target="_blank"><i class="glyphicon glyphicon-hand-up"></i></a></label>
<?php } ?>
<?php if ($information->amp_status === '0') { ?>
<?php }?>
<?php if ($information->amp_status === '0') {?>
<label title="创建AMP页面"><a href="<?php echo site_url('amp/edit/' . $information->ic_id); ?>" target="_blank"><i class="glyphicon glyphicon-plus"></i></a></label>
<?php } ?>
<?php }?>
</div>
<div class="col-xs-24">
<input class="form-control" type="text" id="ic_title" style="<?php
@ -733,25 +733,25 @@
<a href="javascript:void(0);" onclick="goto_page();" id="goto_page_button" name="goto_page_button" target="_blank" title="查看"><i class="glyphicon glyphtext-muted glyphicon glyphicon-eye-open text-muted"></i></a>
<?php if ($information->ic_sitecode == 'ch') { ?>
<?php if ($information->ic_sitecode == 'ch') {?>
<a href="javascript:void(0);" onclick="goto_test_page();" id="goto_test_page_button" name="goto_test_page_button" target="_blank" title="查看测试页面"><i class="glyphicon glyphtext-muted glyphicon glyphicon-random text-muted"></i></a>
<?php } ?>
<?php if ($information->ic_sitecode == 'gm') { ?>
<?php }?>
<?php if ($information->ic_sitecode == 'gm') {?>
<a href="javascript:void(0);" onclick="goto_gmtest_page();" id="goto_test_page_button" name="goto_test_page_button" target="_blank" title="查看测试页面"><i class="glyphicon glyphtext-muted glyphicon glyphicon-random text-muted"></i></a>
<?php } ?>
<?php if ($information->ic_sitecode == 'htravel') { ?>
<?php }?>
<?php if ($information->ic_sitecode == 'htravel') {?>
<a href="javascript:void(0);" onclick="goto_ahtest_page();" id="goto_test_page_button" name="goto_test_page_button" target="_blank" title="查看测试页面"><i class="glyphicon glyphtext-muted glyphicon glyphicon-random text-muted"></i></a>
<?php } ?>
<?php if ($information->ic_sitecode == 'gh') { ?>
<?php }?>
<?php if ($information->ic_sitecode == 'gh') {?>
<a href="javascript:void(0);" onclick="goto_ghtest_page();" id="goto_test_page_button" name="goto_test_page_button" target="_blank" title="查看测试页面"><i class="glyphicon glyphtext-muted glyphicon glyphicon-random text-muted"></i></a>
<?php } ?>
<?php if ($information->ic_sitecode == 'jh') { ?>
<?php }?>
<?php if ($information->ic_sitecode == 'jh') {?>
<a href="javascript:void(0);" onclick="goto_jhtest_page();" id="goto_test_page_button" name="goto_test_page_button" target="_blank" title="查看测试页面"><i class="glyphicon glyphtext-muted glyphicon glyphicon-random text-muted"></i></a>
<?php } ?>
<?php }?>
</div>
<input class="form-control col-xs-24" type="text" id="ic_url" name="ic_url" value="<?php echo $information->ic_url; ?>">
</div>
<?php if ($information->ic_sitecode == 'ct' || $information->ic_sitecode == 'chinatravel') { ?>
<?php if ($information->ic_sitecode == 'ct' || $information->ic_sitecode == 'chinatravel') {?>
<div class="col-sm-24 col-xs-24 nopadding">
<label>CT信息旧URL
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_ct_oldurl', $('#meta_ct_oldurl').val())"><i class="text-muted glyphicon glyphicon-remove"></i></a>
@ -762,7 +762,7 @@
</label>
<input type="text" name="meta_ct_oldurl" class="form-control" value="<?php echo get_meta($information->ic_id, 'meta_ct_oldurl'); ?>" id="meta_ct_oldurl" />
</div>
<?php } ?>
<?php }?>
<div class="col-xs-24 edit_tool nopadding" style="margin-top:5px;">
<i class="icon-stop icon-white pull-right" id="display_count"></i>
</div>
@ -810,11 +810,11 @@
<select name="meta_website_nav" id="meta_website_nav" class="form-control">
<option value="">不选择</option>
<?php
if (!empty($setting_website_nav)) {
if (! empty($setting_website_nav)) {
$setting_website_nav_active = trim(get_meta($information->ic_id, 'meta_website_nav'));
foreach ($setting_website_nav as $item) {
$strcasecmp_nav = strcasecmp($setting_website_nav_active, $item->im_value); ?>
<option <?php echo $strcasecmp_nav == 0 ? 'selected' : false; ?> value="<?php echo $item->im_value ?>">
<option<?php echo $strcasecmp_nav == 0 ? 'selected' : false; ?> value="<?php echo $item->im_value ?>">
<?php echo $item->im_value ?>
</option>
<?php
@ -1000,7 +1000,7 @@
</div>
</div>
<?php
} ?>
}?>
<input type="hidden" name="ic_photo_width" id="ic_photo_width" value="<?php echo $information->ic_photo_width; ?>" />
<input type="hidden" name="ic_photo_height" id="ic_photo_height" value="<?php echo $information->ic_photo_height; ?>" />
@ -1021,9 +1021,9 @@
<p></p>
<div class="col-xs-24">
<label><a href="javascript:void(0);" onclick="$('#customize').toggle();">自定义选项</a> </label>
<?php if ($information->ic_sitecode == "trippest" || $information->ic_sitecode == "trainspread" || $information->ic_sitecode == "hly") { ?>
<?php if ($information->ic_sitecode == "trippest" || $information->ic_sitecode == "trainspread" || $information->ic_sitecode == "hly") {?>
<label><a class="btn default" data-toggle="modal" id="aBokunData"> 管理TPBokun数据 </a> </label>
<?php } ?>
<?php }?>
</div>
<div id="customize" class="col-xs-24" style="display:none;">
@ -1124,7 +1124,7 @@
<div class="col-sm-5 <?php
if ($information->ic_ht_area_type != 'c' && $information->ic_sitecode != "ct") {
echo 'hidden';
} ?>">
}?>">
<label>景点评论数
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_review_count', $('#meta_review_count').val())"><i class="text-muted glyphicon glyphicon-remove"></i></a>
<a href="javascript:void(0);" onclick="meta('save', '<?php echo $information->ic_id; ?>', 'meta_review_count', $('#meta_review_count').val())"><i class="text-muted glyphicon glyphicon-hdd"></i></a>
@ -1164,7 +1164,7 @@
echo 'col-sm-4';
} else {
echo 'col-sm-9';
} ?>">
}?>">
<label>显示作者
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_show_author', $('#meta_show_author').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
<a href="javascript:void(0);" onclick="meta('save', '<?php echo $information->ic_id; ?>', 'meta_show_author', $('#meta_show_author').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-hdd"></i></a>
@ -1210,7 +1210,7 @@
</div>
</div>
<?php
} ?>
}?>
<div class="row">
<div class="col-xs-24">
<label>自定义导航
@ -1226,7 +1226,7 @@
</div>
<?php
} ?>
}?>
<label>og:title
@ -1340,7 +1340,7 @@
</div>
<?php if (is_series_site()) { ?>
<?php if (is_series_site()) {?>
<div class="row">
<div class="col-sm-8">
<label>机票目的地
@ -1380,71 +1380,71 @@
<a href="javascript:void(0);" title="用于配置此信息对应的一级导航"><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
</label>
<select name="meta_subnavi" id="meta_subnavi" class="form-control">
<?php if ($meta_subnavi = get_meta($information->ic_id, 'meta_subnavi')) { ?>
<?php if ($meta_subnavi = get_meta($information->ic_id, 'meta_subnavi')) {?>
<option selected="selected" value="<?php echo $meta_subnavi; ?>">
<?php echo $meta_subnavi_arr[$meta_subnavi]; ?>
</option>
<?php } else { ?>
<?php } else {?>
<option selected="selected" value="info">
<?php echo $meta_subnavi_arr['info']; ?>
</option>
<?php } ?>
<?php }?>
<option value="index">
<?php echo ($meta_subnavi_arr['index']); ?>
<?php echo($meta_subnavi_arr['index']); ?>
</option>
<option value="tour">
<?php echo ($meta_subnavi_arr['tour']); ?>
<?php echo($meta_subnavi_arr['tour']); ?>
</option>
<option value="asia_tour">
<?php echo ($meta_subnavi_arr['asia_tour']); ?>
<?php echo($meta_subnavi_arr['asia_tour']); ?>
</option>
<option value="dest">
<?php echo ($meta_subnavi_arr['dest']); ?>
<?php echo($meta_subnavi_arr['dest']); ?>
</option>
<option value="tailormade">
<?php echo ($meta_subnavi_arr['tailormade']); ?>
<?php echo($meta_subnavi_arr['tailormade']); ?>
</option>
<option value="train">
<?php echo ($meta_subnavi_arr['train']); ?>
<?php echo($meta_subnavi_arr['train']); ?>
</option>
<option value="ship">
<?php echo ($meta_subnavi_arr['ship']); ?>
<?php echo($meta_subnavi_arr['ship']); ?>
</option>
<option value="hotel">
<?php echo ($meta_subnavi_arr['hotel']); ?>
<?php echo($meta_subnavi_arr['hotel']); ?>
</option>
<option value="flight">
<?php echo ($meta_subnavi_arr['flight']); ?>
<?php echo($meta_subnavi_arr['flight']); ?>
</option>
<option value="info">
<?php echo ($meta_subnavi_arr['info']); ?>
<?php echo($meta_subnavi_arr['info']); ?>
</option>
<option value="deal">
<?php echo ($meta_subnavi_arr['deal']); ?>
<?php echo($meta_subnavi_arr['deal']); ?>
</option>
<option value="tour2017">
<?php echo ($meta_subnavi_arr['tour2017']); ?>
<?php echo($meta_subnavi_arr['tour2017']); ?>
</option>
<option value="2015">
<?php echo ($meta_subnavi_arr['2015']); ?>
<?php echo($meta_subnavi_arr['2015']); ?>
</option>
<option value="op">
<?php echo ($meta_subnavi_arr['op']); ?>
<?php echo($meta_subnavi_arr['op']); ?>
</option>
<option value="best">
<?php echo ($meta_subnavi_arr['best']); ?>
<?php echo($meta_subnavi_arr['best']); ?>
</option>
<option value="culture">
<?php echo ($meta_subnavi_arr['culture']); ?>
<?php echo($meta_subnavi_arr['culture']); ?>
</option>
<option value="top10">
<?php echo ($meta_subnavi_arr['top10']); ?>
<?php echo($meta_subnavi_arr['top10']); ?>
</option>
<option value="lifestyle">
<?php echo ($meta_subnavi_arr['lifestyle']); ?>
<?php echo($meta_subnavi_arr['lifestyle']); ?>
</option>
<option value="aboutus">
<?php echo ($meta_subnavi_arr['aboutus']); ?>
<?php echo($meta_subnavi_arr['aboutus']); ?>
</option>
</select>
</div>
@ -1455,13 +1455,13 @@
<a href="javascript:void(0);" title="用于配置是否在面包屑中显示Guide首页."><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
</label>
<select name="meta_bread_showinfo" id="meta_bread_showinfo" class="form-control">
<?php if (get_meta($information->ic_id, 'meta_bread_showinfo') == 'noshow') { ?>
<?php if (get_meta($information->ic_id, 'meta_bread_showinfo') == 'noshow') {?>
<option selected="selected" value="noshow">不显示</option>
<option value="show">显示</option>
<?php } else { ?>
<?php } else {?>
<option value="noshow">不显示</option>
<option selected="selected" value="show">显示</option>
<?php } ?>
<?php }?>
</select>
</div>
<div class="col-sm-8">
@ -1481,10 +1481,10 @@
</label>
<select name="meta_haiwai" id="meta_haiwai" class="form-control">
<?php $meta_haiwai = get_meta($information->ic_id, 'meta_haiwai'); ?>
<option <?php if ($meta_haiwai == false) { ?>selected="selected" <?php } ?> value=""></option>
<option <?php if ($meta_haiwai == 'info') { ?>selected="selected" <?php } ?> value="info">海外信息
<option<?php if ($meta_haiwai == false) {?>selected="selected"<?php }?> value=""></option>
<option <?php if ($meta_haiwai == 'info') {?>selected="selected"<?php }?> value="info">海外信息
</option>
<option <?php if ($meta_haiwai == 'tour') { ?>selected="selected" <?php } ?> value="tour">海外线路
<option <?php if ($meta_haiwai == 'tour') {?>selected="selected"<?php }?> value="tour">海外线路
</option>
</select>
</div>
@ -1496,16 +1496,16 @@
<a href="javascript:void(0);" title="是否显示作者和更新日期?"><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
</label>
<select name="meta_show_author" id="meta_show_author" class="form-control">
<?php if (get_meta($information->ic_id, 'meta_show_author') == 'show') { ?>
<?php if (get_meta($information->ic_id, 'meta_show_author') == 'show') {?>
<option selected="selected" value="show">显示</option>
<option value="hide">隐藏</option>
<?php } else { ?>
<?php } else {?>
<option value="show">显示</option>
<option selected="selected" value="hide">隐藏</option>
<?php } ?>
<?php }?>
</select>
</div>
<?php if ($information->ic_ht_area_type == 'err') { ?>
<?php if ($information->ic_ht_area_type == 'err') {?>
<div class="col-sm-8">
<label>自定义样式
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_my_class', $('#meta_my_class').val())"><i class="text-muted glyphicon glyphicon-remove"></i></a>
@ -1529,11 +1529,11 @@
</label>
<input class="form-control" type="text" name="meta_z_res" value="<?php echo get_meta($information->ic_id, 'meta_z_res'); ?>" id="meta_z_res" />
</div>
<?php } ?>
<?php }?>
</div>
<?php } ?>
<?php }?>
<?php if ($this->config->item('site_code') == 'gm') { ?>
<?php if ($this->config->item('site_code') == 'gm') {?>
<div class="col-sm-8">
<label>海外页面标签
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_haiwai', $('#meta_haiwai').val())"><i class="text-muted glyphicon glyphicon-remove"></i></a>
@ -1542,16 +1542,16 @@
</label>
<select name="meta_haiwai" id="meta_haiwai" class="form-control">
<?php $meta_haiwai = get_meta($information->ic_id, 'meta_haiwai'); ?>
<option <?php if ($meta_haiwai == false) { ?>selected="selected" <?php } ?> value=""></option>
<option <?php if ($meta_haiwai == 'info') { ?>selected="selected" <?php } ?> value="info">海外信息
<option<?php if ($meta_haiwai == false) {?>selected="selected"<?php }?> value=""></option>
<option <?php if ($meta_haiwai == 'info') {?>selected="selected"<?php }?> value="info">海外信息
</option>
<option <?php if ($meta_haiwai == 'tour') { ?>selected="selected" <?php } ?> value="tour">海外线路
<option <?php if ($meta_haiwai == 'tour') {?>selected="selected"<?php }?> value="tour">海外线路
</option>
</select>
</div>
<?php } ?>
<?php }?>
<?php if ($information->ic_ht_area_type == 'g') { ?>
<?php if ($information->ic_ht_area_type == 'g') {?>
<div class="row">
@ -1592,7 +1592,7 @@
</div>
</div>
<?php } ?>
<?php }?>
<div class="row">
<div class="col-sm-5">
<label>展示打赏功能
@ -1643,9 +1643,9 @@
</div>
<?php if ($information->ic_sitecode == "ct") { ?>
<?php if ($information->ic_sitecode == "ct") {?>
<div class="row">
<?php if ($information->SRMS_SIC_Code == "Attraction" || $information->ic_type == "c_attraction_detail") { ?>
<?php if ($information->SRMS_SIC_Code == "Attraction" || $information->ic_type == "c_attraction_detail") {?>
<div class="col-sm-6">
<label>景点类别
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_attraction_type', $('#meta_attraction_type').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
@ -1771,7 +1771,7 @@
</option>
</select>
</div>
<?php } ?>
<?php }?>
<div class="col-sm-6">
<label>排序
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_attraction_Order', $('#meta_attraction_Order').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
@ -1845,7 +1845,7 @@
</div>
<?php } ?>
<?php }?>
<!-- 目的地产品选项 -->
<div class="row">
@ -1993,7 +1993,7 @@
<input type="text" name="meta_trippest_defaultDate" class="form-control" value="<?php echo get_meta($information->ic_id, 'meta_trippest_defaultDate'); ?>" id="meta_trippest_defaultDate" />
</div>
</div>
<?php if ($information->ic_sitecode == "trainspread" || $information->ic_sitecode == "hly") { ?>
<?php if ($information->ic_sitecode == "trainspread" || $information->ic_sitecode == "hly") {?>
<div class="row">
<div class="col-sm-8">
<label>产品关联这里做
@ -2056,7 +2056,7 @@
<input type="text" name="meta_trainspread_CustomCancel" class="form-control" value="<?php echo get_meta($information->ic_id, 'meta_trainspread_CustomCancel'); ?>" id="meta_trainspread_CustomCancel" />
</div>
</div>
<?php } ?>
<?php }?>
<!-- 自定义选项 -->
</div>
@ -2100,7 +2100,7 @@
</div>
</div>
<?php if (is_mobile_first()) { ?>
<?php if (is_mobile_first()) {?>
<script>
function show_ad_mate(mate_name, value) {
if ($('#' + mate_name).prop("checked")) {
@ -2133,19 +2133,19 @@
</label>
</div>
</div>
<?php } ?>
<?php }?>
<?php if (!is_mobile_first()) { ?>
<?php if (! is_mobile_first()) {?>
<label>信息类型</label>
<select name="ic_type" id="ic_type" class="form-control" onselect="">
<?php
foreach ($infoTypeList as $key => $value) {
$value == $information->ic_type ? $select_str = 'selected' : $select_str = ''; ?>
<option <?php echo $select_str; ?> value="<?php echo $value; ?>">
<option<?php echo $select_str; ?> value="<?php echo $value; ?>">
<?php echo $key; ?>
</option>
<?php
} ?>
}?>
</select>
<label style="width:48px;">模板</label>
@ -2153,11 +2153,11 @@
<?php
foreach ($templateList as $key => $value) {
$value == $information->ic_template ? $select_str = 'selected' : $select_str = ''; ?>
<option <?php echo $select_str; ?> value="<?php echo $value; ?>">
<option<?php echo $select_str; ?> value="<?php echo $value; ?>">
<?php echo $key; ?>
</option>
<?php
} ?>
}?>
</select>
<label>是否作为面包屑显示</label>
@ -2167,7 +2167,7 @@
<option <?php echo $information->ic_show_bread_crumbs == 1 ? 'selected' : false; ?> value="1">显示
</option>
</select>
<?php } ?>
<?php }?>
<label>作者</label>
<select name="ic_author" id="ic_author" class="form-control">
@ -2182,24 +2182,24 @@
$hasselected = true;
} else {
$select_str = '';
if (!$hasselected && !empty($information->ic_content) && $information->ic_url_title != 'New Information' && $editor_item->OPI_Code == 'PKL') {
if (! $hasselected && ! empty($information->ic_content) && $information->ic_url_title != 'New Information' && $editor_item->OPI_Code == 'PKL') {
$select_str = 'selected';
}
} ?>
<option <?php echo ($select_str); ?> value="<?php echo $editor_item->OPI_Code; ?>">
}?>
<option<?php echo($select_str); ?> value="<?php echo $editor_item->OPI_Code; ?>">
<?php echo $editor_item->OPI_Name; ?>
</option>
<?php
} ?>
}?>
<option value="">-</option>
<?php
foreach ($author_list as $author_item) {
($author_item->a_id == $information->ic_author) ? $select_str = 'selected' : $select_str = ''; ?>
<option <?php echo $select_str; ?> value="<?php echo $author_item->a_id; ?>">
<option<?php echo $select_str; ?> value="<?php echo $author_item->a_id; ?>">
<?php echo $author_item->a_name; ?>
</option>
<?php
} ?>
}?>
</select>
<label>是否发布</label>
@ -2219,23 +2219,23 @@
<input type="checkbox" name="ignore_url_check" id="ignore_url_check" />忽略URL重复
</label>
<div class="clearfix"></div>
<?php if (in_array($this->config->item('site_code'), ['ch', 'cht', 'gm', 'htravel', 'jh', 'gh', 'ct', 'chinatravel', 'shanghai', 'beijing', 'trainspread', 'guilin', 'hly'])) { ?>
<?php if (in_array($this->config->item('site_code'), ['ch', 'cht', 'gm', 'htravel', 'jh', 'gh', 'ct', 'chinatravel', 'shanghai', 'beijing', 'trainspread', 'guilin', 'hly'])) {?>
<label class="checkbox col-xs-24" style="font-weight: normal;margin-top:0;padding-left: 21px;">
<input type="checkbox" name="auto_update_cache_checkbox" id="auto_update_cache_checkbox" onclick="get_update_cache_url();" value="<?php echo $information->ic_url; ?>" />静态更新
</label>
<?php } ?>
<?php }?>
<?php if (in_array($this->config->item('site_code'), ['cht', 'gm'])) { ?>
<?php if (in_array($this->config->item('site_code'), ['cht', 'gm'])) {?>
<label class="checkbox col-xs-24" style="font-weight: normal;margin-top:0;padding-left: 21px;">
<input type="checkbox" name="auto_update_amp" id="auto_update_amp" <?php if ($information->amp_status === '2') {
echo 'disabled';
} ?> value="true" />AMP更新
}?> value="true" />AMP更新
<?php if ($information->amp_status === '2') {
echo '<i class="glyphicon glyphicon-hand-up" title="手动管理,不会自动更新"></i>';
} ?>
}?>
</label>
<?php } ?>
<?php }?>
<div class="clearfix"></div>
@ -2244,21 +2244,21 @@
<a href="javascript:void(0);" class="btn btn-primary col-xs-19" onclick=" editor.updateElement();
// 保存增加AMP判断 - lmr
// <?php if (get_meta($information->ic_id, 'AMP_JSON') && get_meta($information->ic_id, 'AMP_STATUS') && get_meta($information->ic_id, 'AMP_BODY_PC_STATUS') !== 'yes') { ?>
// <?php if (get_meta($information->ic_id, 'AMP_JSON') && get_meta($information->ic_id, 'AMP_STATUS') && get_meta($information->ic_id, 'AMP_BODY_PC_STATUS') !== 'yes') {?>
// if (!$('#PcAmp input').is(':checked')) {
// var amp_confirm = window.confirm('\n检测到页面存在AMP版本是否需要打开AMP编辑界面\n\r注意如果修改了PC端版本那么同时也需要修改AMP版本。\n');
// if (amp_confirm) {
// window.open('<?php echo ($amp_build_url); ?>', '_blank');
// window.open('<?php echo($amp_build_url); ?>', '_blank');
// }
// }
// <?php } ?>
// <?php }?>
<?php if (get_meta($information->ic_id, 'AMP_JSON') && get_meta($information->ic_id, 'AMP_STATUS') && get_meta($information->ic_id, 'AMP_BODY_PC_STATUS') === 'yes') { ?>
<?php if (get_meta($information->ic_id, 'AMP_JSON') && get_meta($information->ic_id, 'AMP_STATUS') && get_meta($information->ic_id, 'AMP_BODY_PC_STATUS') === 'yes') {?>
// if (editor.element.getText() == '') {
// editor.setData('From HTML-Generator');
// editor.updateElement();
// }
<?php } ?>
<?php }?>
if (information_check() != false) {
submitForm('form_information_edit');
}">保存修改</a>
@ -2279,7 +2279,7 @@
<li class="dropdown-submenu pull-left">
<a id="history_log_toggle" tabindex="-1" href="javascript:void(0);">历史记录</a>
<ul class="dropdown-menu history_log" style="right: 157px;left: inherit;top: 83px;">
<?php foreach ($content_backup_list as $item) { ?>
<?php foreach ($content_backup_list as $item) {?>
<li>
<a href="<?php echo site_url('information/backup_content/' . $item->log_id); ?>" target="_blank">
<?php echo $item->log_datetime ?>
@ -2287,16 +2287,16 @@
<?php echo $item->log_ht_username ?>
</a>
</li>
<?php } ?>
<?php }?>
</ul>
</li>
</ul>
<?php if (!empty($has_html_file)) { ?>
<?php if (! empty($has_html_file)) {?>
<label class="checkbox col-xs-24" style="font-weight: normal;margin-top:30px;padding-left: 21px;">
<a href="<?php echo site_url('information/html_file_helper/delete?ic_url=') . $information->ic_url; ?>" target="_blank">静态文件已生成,点击删除</a>
</label>
<?php } ?>
<?php }?>
</div>
<div class="clearfix"></div>
@ -2316,9 +2316,9 @@
</div>
</div>
<textarea id="mobile_first_template" style="display: none;"><?php if (!empty($mobile_first_template)) {
<textarea id="mobile_first_template" style="display: none;"><?php if (! empty($mobile_first_template)) {
echo htmlentities($mobile_first_template);
} ?></textarea>
}?></textarea>
<!-- Trippest bokun窗口 -->
<div class="modal fade" id="NoPermissionModal">

@ -366,7 +366,7 @@
<span class="followtitle">Language</span>
<div class="listtour" style="display: flex;">
<div>
<ul style="width:185px;">
<ul style="width:185px;www.chinahighlightstravel.de
<li><a href="https://www.chinarundreisen.com/" target="_blank" rel="nofollow">Deutsch</a></li>
<li><a href="https://www.voyageschine.com/" target="_blank" rel="nofollow">Français</a></li>
<li><a href="https://www.chinahighlights.es/" target="_blank" rel="nofollow">Español</a></li>

@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php if (! defined('BASEPATH')) {
exit('No direct script access allowed');
}
/*
|--------------------------------------------------------------------------
@ -93,7 +95,6 @@ $config['charset'] = 'UTF-8';
*/
$config['enable_hooks'] = FALSE;
/*
|--------------------------------------------------------------------------
| Class Extension Prefix
@ -108,7 +109,6 @@ $config['enable_hooks'] = FALSE;
*/
$config['subclass_prefix'] = 'MY_';
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
@ -128,7 +128,6 @@ $config['subclass_prefix'] = 'MY_';
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
/*
|--------------------------------------------------------------------------
| Enable Query Strings
@ -330,7 +329,6 @@ $config['compress_output'] = FALSE;
*/
$config['time_reference'] = 'local';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
@ -343,7 +341,6 @@ $config['time_reference'] = 'local';
*/
$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
@ -357,7 +354,6 @@ $config['rewrite_short_tags'] = FALSE;
*/
$config['proxy_ips'] = '';
//多媒体中心的本地图片路径
//上传图片是异步上网的所以用此url进行本地预览
$config['media_image_url'] = 'http://photo.chtcdn.com:3581/upload';
@ -365,32 +361,31 @@ $config['media_image_url'] = 'http://photo.chtcdn.com:3581/upload';
/* End of file config.php */
/* Location: ./application/config/config.php */
$config['site'] = array(
'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'http://www.chinahighlights.com'),
'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'http://www.chinarundreisen.com'),
'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'http://www.voyageschine.com'),
'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'http://www.arachina.com'),
'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'http://www.viaje-a-china.com'),
'it' => array('site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'http://www.viaggio-in-cina.it'),
'ru' => array('site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'http://www.chinahighlights.ru'),
'wt' => array('site_code' => 'wt', 'site_id' => 172, 'site_lgc' => '2', 'site_url' => 'http://www.iiiyooo.com'),
'tbt' => array('site_code' => 'tbt', 'site_id' => 169, 'site_lgc' => '1', 'site_url' => 'http://www.tibettravel.info'),
'sht' => array('site_code' => 'sht', 'site_id' => 96, 'site_lgc' => '1', 'site_url' => 'http://www.shanghaihighlights.com'),
'yz' => array('site_code' => 'yz', 'site_id' => 89, 'site_lgc' => '1', 'site_url' => 'http://www.yangtzeriver.org'),
'gl' => array('site_code' => 'gl', 'site_id' => 90, 'site_lgc' => '1', 'site_url' => 'http://www.guilinchina.net'),
'mbj' => array('site_code' => 'mbj', 'site_id' => 98, 'site_lgc' => '1', 'site_url' => 'http://www.mybeijingchina.com'),
'ct' => array('site_code' => 'ct', 'site_id' => 1000, 'site_lgc' => '104', 'site_url' => 'http://www.chinatravel.com'),
'ah' => array('site_code' => 'ah', 'site_id' => 141, 'site_lgc' => '1', 'site_url' => 'https://www.asiahighlights.com/'),
'dct' => array('site_code' => 'dct', 'site_id' => 99, 'site_lgc' => '1', 'site_url' => 'http://www.diychinatours.com')
);
$config['auhtor_task_type'] = array(
$config['site'] = [
'cht' => ['site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'http://www.chinahighlights.com'],
'gm' => ['site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'http://www.chinahighlightstravel.de'],
'vc' => ['site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'http://www.voyageschine.com'],
'jp' => ['site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'http://www.arachina.com'],
'vac' => ['site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'http://www.viaje-a-china.com'],
'it' => ['site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'http://www.viaggio-in-cina.it'],
'ru' => ['site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'http://www.chinahighlights.ru'],
'wt' => ['site_code' => 'wt', 'site_id' => 172, 'site_lgc' => '2', 'site_url' => 'http://www.iiiyooo.com'],
'tbt' => ['site_code' => 'tbt', 'site_id' => 169, 'site_lgc' => '1', 'site_url' => 'http://www.tibettravel.info'],
'sht' => ['site_code' => 'sht', 'site_id' => 96, 'site_lgc' => '1', 'site_url' => 'http://www.shanghaihighlights.com'],
'yz' => ['site_code' => 'yz', 'site_id' => 89, 'site_lgc' => '1', 'site_url' => 'http://www.yangtzeriver.org'],
'gl' => ['site_code' => 'gl', 'site_id' => 90, 'site_lgc' => '1', 'site_url' => 'http://www.guilinchina.net'],
'mbj' => ['site_code' => 'mbj', 'site_id' => 98, 'site_lgc' => '1', 'site_url' => 'http://www.mybeijingchina.com'],
'ct' => ['site_code' => 'ct', 'site_id' => 1000, 'site_lgc' => '104', 'site_url' => 'http://www.chinatravel.com'],
'ah' => ['site_code' => 'ah', 'site_id' => 141, 'site_lgc' => '1', 'site_url' => 'https://www.asiahighlights.com/'],
'dct' => ['site_code' => 'dct', 'site_id' => 99, 'site_lgc' => '1', 'site_url' => 'http://www.diychinatours.com'],
];
$config['auhtor_task_type'] = [
'翻译' => 'translate',
'修改' => 'modify',
'审核' => 'review',
'投稿' => 'contribute'
);
'投稿' => 'contribute',
];
//当前站点代号默认是cht用户登录之后修改
$config['site_code']='cht';
$config['site_code'] = 'cht';

@ -1,26 +1,26 @@
<?php
//订单号 -> IP
//
//{
// "COLI_WebCode": "JP",
// "COLI_ID": "ZPL161028068",
// "COLI_ApplyDate": "2016-04-15 23:17:20",
// "COLI_SenderIP": "116.226.169.236"
//}
//
//CHT:http://www.chinahighlights.com/api/api.php?method=order.json_by_lmr&order_id=hy161104033
//国际:http://www.viaje-a-china.com/index.php/ajax/ajax_order_datas/
//
//
$order_id = isset($_GET['order_id']) ? $_GET['order_id'] : FALSE;
$order_id = isset($_POST['order_id']) ? $_POST['order_id'] : $order_id;
//$site = isset($_GET['site']) ? $_GET['site'] : FALSE;
//$site = isset($_POST['site']) ? $_POST['site'] : $site;
$ip = '255.255.255.255';
$web_code = FALSE;
$date = date('Y-m-d h:i:s');
$host = array(
//订单号 -> IP
//
//{
// "COLI_WebCode": "JP",
// "COLI_ID": "ZPL161028068",
// "COLI_ApplyDate": "2016-04-15 23:17:20",
// "COLI_SenderIP": "116.226.169.236"
//}
//
//CHT:http://www.chinahighlights.com/api/api.php?method=order.json_by_lmr&order_id=hy161104033
//国际:http://www.viaje-a-china.com/index.php/ajax/ajax_order_datas/
//
//
$order_id = isset($_GET['order_id']) ? $_GET['order_id'] : FALSE;
$order_id = isset($_POST['order_id']) ? $_POST['order_id'] : $order_id;
//$site = isset($_GET['site']) ? $_GET['site'] : FALSE;
//$site = isset($_POST['site']) ? $_POST['site'] : $site;
$ip = '255.255.255.255';
$web_code = FALSE;
$date = date('Y-m-d h:i:s');
$host = [
'xx' => 'xx',
'jp' => 'JP',
'vc' => 'FR',
@ -34,8 +34,8 @@ $host = array(
'ct' => 'yincheng',
'gm' => 'gm-vps',
'ah' => 'AH',
);
$host_name = array(
];
$host_name = [
'jp' => 'http://www.arachina.com',
'vc' => 'http://www.voyageschine.com',
'vac' => 'http://www.viaje-a-china.com',
@ -46,70 +46,64 @@ $host_name = array(
'train_it' => 'http://www.viaggio-in-cina.it',
'cht' => 'http://www.chinahighlights.com',
'ct' => 'http://www.chinatravel.com',
'gm' => 'http://www.chinarundreisen.com',
'gm' => 'http://www.chinahighlightstravel.de',
'ah' => 'http://www.asiahighlights.com',
);
$bf_date = date('m/d/Y:00:00:00', time() - 3600*24*90);
$af_date = date('m/d/Y:00:00:00', time() + 3600*24*90);
$order_txt = '';
$web_code = 'xx';
$order_date = '';
];
$bf_date = date('m/d/Y:00:00:00', time() - 3600 * 24 * 90);
$af_date = date('m/d/Y:00:00:00', time() + 3600 * 24 * 90);
$order_txt = '';
$web_code = 'xx';
$order_date = '';
if ($order_id)
{
if ($order_id) {
//if ($site == 'ch')
//{
// $order = @file_get_contents('http://www.chinahighlights.com/api/api.php?method=order.json_by_lmr&order_id='.$order_id);
//}
//else
//{
$order = @file_get_contents('http://www.viaje-a-china.com/index.php/ajax/ajax_order_datas/'.$order_id);
$order = @file_get_contents('http://www.viaje-a-china.com/index.php/ajax/ajax_order_datas/' . $order_id);
//}
if ($order && $order !== 'no data')
{
if ($order && $order !== 'no data') {
$order = json_decode($order);
$ip = $order->COLI_SenderIP;
if (!$ip || $ip=='159.8.126.74' || $ip=='180.140.114.208')
{
if (! $ip || $ip == '159.8.126.74' || $ip == '180.140.114.208') {
$ip = null;
}
$web_code = $order->COLI_WebCode;
$order_date = $order->COLI_ApplyDate;
$date_time = strtotime($order->COLI_ApplyDate);
$bf_date = date('m/d/Y:00:00:00', $date_time - 3600*24*90);
$af_date = date('m/d/Y:00:00:00', $date_time + 3600*24*90);
$bf_date = date('m/d/Y:00:00:00', $date_time - 3600 * 24 * 90);
$af_date = date('m/d/Y:00:00:00', $date_time + 3600 * 24 * 90);
$order_txt = $order->COLI_OrderDetailText;
}
}
}
//连接Splunk SDK
require_once '../Splunk.php';
$connect_arguments = array(
//连接Splunk SDK
require_once '../Splunk.php';
$connect_arguments = [
'scheme' => 'https',
'host' => '192.155.250.125',
'port' => 8089,
'username' => 'haina',
'password' => '383d43GZ82[Ai',
);
$service = new Splunk_Service($connect_arguments);
$service->login();
];
$service = new Splunk_Service($connect_arguments);
$service->login();
//查询IP
//[EXA] host=ES "68.180.229.232" earliest="11/1/2016:00:00:00" latest="11/2/2016:00:00:00"
$results = array();
if ($ip)
{
$search = 'search host='.$host[strtolower($web_code)].' "'.$ip.'" earliest="'.$bf_date.'" latest="'.$af_date.'" NOT("/ngx_pagespeed_beacon" OR "/tourprice" OR "/include" OR "/api" OR "/ajax" OR "/image" OR "/common" OR "/ckplayer" OR ".css" OR ".js" OR ".ico" OR ".gif" OR ".jpg" OR ".png" OR ".json" OR ".xml" OR ".ttf" OR ".woff" OR ".eot" OR "webhtmllog" OR "asphttp_accept_language" OR "down.asp" OR "verifyemail" OR "test")';
//查询IP
//[EXA] host=ES "68.180.229.232" earliest="11/1/2016:00:00:00" latest="11/2/2016:00:00:00"
$results = [];
if ($ip) {
$search = 'search host=' . $host[strtolower($web_code)] . ' "' . $ip . '" earliest="' . $bf_date . '" latest="' . $af_date . '" NOT("/ngx_pagespeed_beacon" OR "/tourprice" OR "/include" OR "/api" OR "/ajax" OR "/image" OR "/common" OR "/ckplayer" OR ".css" OR ".js" OR ".ico" OR ".gif" OR ".jpg" OR ".png" OR ".json" OR ".xml" OR ".ttf" OR ".woff" OR ".eot" OR "webhtmllog" OR "asphttp_accept_language" OR "down.asp" OR "verifyemail" OR "test")';
//调用Spluck Search
$job = $service->getJobs()->create($search);
while (!$job->isDone())
{
while (! $job->isDone()) {
$job->refresh();
}
$results = $job->getResults();
}
}
?><!DOCTYPE html>
<html lang="en">
@ -155,16 +149,28 @@ pre {margin-top: 5px;font-size: 0.8em;}
<form class="form-inline" action="" method="post" id="sform">
<div class="form-group has-success">
<label class="sr-only" for="order_id">订单号</label>
<input type="text" name="order_id" class="form-control" id="order_id" placeholder="输入订单号" value="<?php if ($order_id) echo($order_id); ?>">
<input type="text" name="order_id" class="form-control" id="order_id" placeholder="输入订单号" value="<?php if ($order_id) {
echo($order_id);
}
?>">
</div>
<button type="submit" class="btn btn-primary" data-loading-text="Loading..." id="btn6">查询</button>
</form>
</div>
<div class="alert alert-info" role="alert" id="fix_alert">
<?php
if ($web_code) echo(' [站点:'.$web_code.']');
if ($order_date) echo(' [提交日期:'.$order_date.']');
if ($order_txt) echo('<pre>'.$order_txt.'</pre>');
if ($web_code) {
echo(' [站点:' . $web_code . ']');
}
if ($order_date) {
echo(' [提交日期:' . $order_date . ']');
}
if ($order_txt) {
echo('<pre>' . $order_txt . '</pre>');
}
//echo(' 【SPL'.$search.'】');
?>
</div>
@ -174,22 +180,31 @@ pre {margin-top: 5px;font-size: 0.8em;}
$page = 1;
$page_count = 10;
$prev_cls = '';
if ($page == 1) $prev_cls = 'disabled';
if ($page == 1) {
$prev_cls = 'disabled';
}
$next_cls = '';
if ($page == $page_count) $next_cls = 'disabled';
if ($page == $page_count) {
$next_cls = 'disabled';
}
?>
<li class="<?php echo($prev_cls);?>">
<li class="<?php echo($prev_cls); ?>">
<a href="#" aria-label="Previous" id="prev">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
<?php for ($i=1; $i<=$page_count; $i++) {
<?php for ($i = 1; $i <= $page_count; $i++) {
$cls = '';
if ($i == $page) $cls = 'active';
if ($i == $page) {
$cls = 'active';
}
?>
<li class="<?php echo($cls);?>"><a href="javascript:;" class="page_a" data-action="/train/china-trains/search/logs/<?php echo($i);?>"><?php echo($i);?></a></li>
<?php } ?>
<li class="<?php echo($next_cls);?>">
<li class="<?php echo($cls); ?>"><a href="javascript:;" class="page_a" data-action="/train/china-trains/search/logs/<?php echo($i); ?>"><?php echo($i); ?></a></li>
<?php }?>
<li class="<?php echo($next_cls); ?>">
<a href="#" aria-label="Next" id="next">
<span aria-hidden="true">&raquo;</span>
</a>
@ -198,92 +213,78 @@ pre {margin-top: 5px;font-size: 0.8em;}
</nav-->
<table class="table table-bordered table-hover">
<?php
$messages = array();
$messages = [];
$anyRows = FALSE;
$columnNames = NULL;
foreach($results as $result)
{
if ($result instanceof Splunk_ResultsFieldOrder)
{
foreach ($results as $result) {
if ($result instanceof Splunk_ResultsFieldOrder) {
//所有字段
$columnNames = $result->getFieldNames();
//所需字段
$need_th = array('_serial', '_raw', '_time');
$need_th = ['_serial', '_raw', '_time'];
//字段差集
$columnNames = array_intersect($need_th, $columnNames);
echo '<thead><tr><td colspan="3" class="tt">提示: “GET”表示正常访问“POST”表示从表单提交访问“标黄”表示订单相关的访问。</td></tr><tr>';
foreach($columnNames as $columnName)
echo '<th>'.htmlspecialchars($columnName).
foreach ($columnNames as $columnName) {
echo '<th>' . htmlspecialchars($columnName) .
'</th>';
}
echo '</tr></thead>';
echo "\n";
}
else if ($result instanceof Splunk_ResultsMessage)
{
} else if ($result instanceof Splunk_ResultsMessage) {
$messages[] = $result;
}
else if (is_array($result))
{
} else if (is_array($result)) {
$anyRows = TRUE;
assert($columnNames !== NULL);
echo '<tr>';
foreach($columnNames as $columnName)
{
foreach ($columnNames as $columnName) {
$cellValue = array_key_exists($columnName, $result) ? $result[$columnName] : NULL;
//nginx日志
if ($columnName == '_raw')
{
if ($columnName == '_raw') {
echo '<td><div class="_raw">';
if (is_array($cellValue))
{
if (is_array($cellValue)) {
$log = implode('', $cellValue);
//116.226.169.236 - - [27/Oct/2016:07:35:39 -0500] "GET / HTTP/1.1" 200 8857 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/14A456 Safari/602.1"
//ip(1), visit(3), from(6), ua(7)
$p = '/^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})\s-\s-\s\[(.*)\]\s\"(.*)\"\s(\d{3})\s(\d+)\s\"(.*)\"\s\"(.*)\"$/';
preg_match($p, $log, $matches);
//print_r($matches);
if (isset($matches[3]))
{
if (isset($matches[3])) {
$tmp_a = explode(' ', $matches[3]);
echo '<a href="'.$host_name[strtolower($web_code)].@$tmp_a[1].'" class="btn btn-sm btn-primary" type="button" target="_blank"><span class="badge">visit</span> '.urldecode($matches[3]).'</a> &nbsp;';
echo '<a href="' . $host_name[strtolower($web_code)] . @$tmp_a[1] . '" class="btn btn-sm btn-primary" type="button" target="_blank"><span class="badge">visit</span> ' . urldecode($matches[3]) . '</a> &nbsp;';
}
if (isset($matches[6]))
{
if ($matches[6]=='-') $matches[6] = '从收藏夹、历史记录或地址栏直接访问';
echo '<a href="'.$matches[6].'" class="btn btn-sm btn-default" type="button" target="_blank"><span class="badge">from</span> '.urldecode($matches[6]).'</a> &nbsp;';
if (isset($matches[6])) {
if ($matches[6] == '-') {
$matches[6] = '从收藏夹、历史记录或地址栏直接访问';
}
if (!isset($matches[1]))
{
echo '<a href="' . $matches[6] . '" class="btn btn-sm btn-default" type="button" target="_blank"><span class="badge">from</span> ' . urldecode($matches[6]) . '</a> &nbsp;';
}
if (! isset($matches[1])) {
echo $log;
}
}
echo '</div></td>';
}
//日期
else if ($columnName == '_time')
{
else if ($columnName == '_time') {
echo '<td>';
$time = strtotime($cellValue);
echo date('Y-m-d h:i:s', $time);
echo '</td>';
}
//splunk记录
else
{
else {
echo '<td>';
if ($cellValue !== NULL)
{
if (is_array($cellValue))
{
if ($cellValue !== NULL) {
if (is_array($cellValue)) {
echo '<ul>';
foreach($cellValue as $value)
{
echo '<li>'.htmlspecialchars($value).'</li>';
foreach ($cellValue as $value) {
echo '<li>' . htmlspecialchars($value) . '</li>';
}
echo '</ul>';
}
else
{
} else {
echo htmlspecialchars($cellValue);
}
}
@ -299,15 +300,14 @@ pre {margin-top: 5px;font-size: 0.8em;}
<?php if (count($messages) > 0): ?>
<ul>
<?php
foreach ($messages as $message)
{
foreach ($messages as $message) {
echo '<li>[' . htmlspecialchars($message->getType()) . '] ';
echo htmlspecialchars($message->getText()) . '</li>';
}
?>
</ul>
<?php endif; ?>
<?php if (!$anyRows && (count($messages) === 0)): ?>
<?php if (! $anyRows && (count($messages) === 0)): ?>
<p>
没有查到相关日志
</p>

@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php if (! defined('BASEPATH')) {
exit('No direct script access allowed');
}
/*
|--------------------------------------------------------------------------
@ -93,7 +95,6 @@ $config['charset'] = 'UTF-8';
*/
$config['enable_hooks'] = FALSE;
/*
|--------------------------------------------------------------------------
| Class Extension Prefix
@ -108,7 +109,6 @@ $config['enable_hooks'] = FALSE;
*/
$config['subclass_prefix'] = 'MY_';
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
@ -128,7 +128,6 @@ $config['subclass_prefix'] = 'MY_';
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-u4e00-u9fa5';
/*
|--------------------------------------------------------------------------
| Enable Query Strings
@ -330,7 +329,6 @@ $config['compress_output'] = FALSE;
*/
$config['time_reference'] = 'local';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
@ -343,7 +341,6 @@ $config['time_reference'] = 'local';
*/
$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
@ -360,22 +357,21 @@ $config['proxy_ips'] = '';
/* End of file config.php */
/* Location: ./application/config/config.php */
$config['site'] = array(
'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com'),
'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinarundreisen.com'),
'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.voyageschine.com'),
'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'https://www.arachina.com'),
'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'https://www.viaje-a-china.com'),
'it' => array('site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'https://www.viaggio-in-cina.it'),
'ru' => array('site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'https://www.chinahighlights.ru'),
'wt' => array('site_code' => 'wt', 'site_id' => 172, 'site_lgc' => '2', 'site_url' => 'https://www.iiiyooo.com'),
'tbt' => array('site_code' => 'tbt', 'site_id' => 169, 'site_lgc' => '1', 'site_url' => 'https://www.tibettravel.info'),
'sht' => array('site_code' => 'sht', 'site_id' => 96, 'site_lgc' => '1', 'site_url' => 'https://www.shanghaihighlights.com'),
'yz' => array('site_code' => 'yz', 'site_id' => 89, 'site_lgc' => '1', 'site_url' => 'https://www.yangtzeriver.org'),
'gl' => array('site_code' => 'gl', 'site_id' => 90, 'site_lgc' => '1', 'site_url' => 'https://www.guilinchina.net'),
'mbj' => array('site_code' => 'mbj', 'site_id' => 98, 'site_lgc' => '1', 'site_url' => 'https://www.mybeijingchina.com'),
'ct' => array('site_code' => 'ct', 'site_id' => 1000, 'site_lgc' => '104', 'site_url' => 'https://www.chinatravel.com'),
'dct' => array('site_code' => 'dct', 'site_id' => 99, 'site_lgc' => '1', 'site_url' => 'https://www.diychinatours.com'),
'trippest' => array('site_code' => 'trippest', 'site_id' => 0, 'site_lgc' => '1', 'site_url' => 'https://www.trippest.com')
);
$config['site'] = [
'cht' => ['site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com'],
'gm' => ['site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinahighlightstravel.de'],
'vc' => ['site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.voyageschine.com'],
'jp' => ['site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'https://www.arachina.com'],
'vac' => ['site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'https://www.viaje-a-china.com'],
'it' => ['site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'https://www.viaggio-in-cina.it'],
'ru' => ['site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'https://www.chinahighlights.ru'],
'wt' => ['site_code' => 'wt', 'site_id' => 172, 'site_lgc' => '2', 'site_url' => 'https://www.iiiyooo.com'],
'tbt' => ['site_code' => 'tbt', 'site_id' => 169, 'site_lgc' => '1', 'site_url' => 'https://www.tibettravel.info'],
'sht' => ['site_code' => 'sht', 'site_id' => 96, 'site_lgc' => '1', 'site_url' => 'https://www.shanghaihighlights.com'],
'yz' => ['site_code' => 'yz', 'site_id' => 89, 'site_lgc' => '1', 'site_url' => 'https://www.yangtzeriver.org'],
'gl' => ['site_code' => 'gl', 'site_id' => 90, 'site_lgc' => '1', 'site_url' => 'https://www.guilinchina.net'],
'mbj' => ['site_code' => 'mbj', 'site_id' => 98, 'site_lgc' => '1', 'site_url' => 'https://www.mybeijingchina.com'],
'ct' => ['site_code' => 'ct', 'site_id' => 1000, 'site_lgc' => '104', 'site_url' => 'https://www.chinatravel.com'],
'dct' => ['site_code' => 'dct', 'site_id' => 99, 'site_lgc' => '1', 'site_url' => 'https://www.diychinatours.com'],
'trippest' => ['site_code' => 'trippest', 'site_id' => 0, 'site_lgc' => '1', 'site_url' => 'https://www.trippest.com'],
];

@ -1,7 +1,7 @@
<?php
$lang['logo'] = "https://www.chinarundreisen.com/pic/homepage/logo.png";
$lang['logo_url'] = "https://www.chinarundreisen.com/";
$lang['logo'] = "https://www.chinahighlightstravel.de/pic/homepage/logo.png";
$lang['logo_url'] = "https://www.chinahighlightstravel.de/";
$lang['right'] = '<div class="pay_footer text-right">
<p>© 1998 China Highlights.
<a href="https://www.chinahighlights.com/privacy.htm" rel="nofollow">Privacy Statement</a>

@ -19,7 +19,7 @@ ini_set('display_errors', 0);
/*============================ General Settings =======================================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html
$config = array();
$config = [];
/*============================ Enable PHP Connector HERE ==============================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_authentication
@ -37,80 +37,80 @@ $config['licenseKey'] = '*J?L-*1**-C**X-*D**-*B**-Z*6*-3**J';
/*============================ CKFinder Internal Directory ============================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_privateDir
$config['privateDir'] = array(
$config['privateDir'] = [
'backend' => 'default',
'tags' => '.ckfinder/tags',
'logs' => '.ckfinder/logs',
'cache' => '.ckfinder/cache',
'thumbs' => '.ckfinder/cache/thumbs',
);
];
/*============================ Images and Thumbnails ==================================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_images
$config['images'] = array(
$config['images'] = [
'maxWidth' => 2560,
'maxHeight' => 1440,
'quality' => 0,
'sizes' => array(
'small' => array('width' => 480, 'height' => 320, 'quality' => 0),
'medium' => array('width' => 600, 'height' => 480, 'quality' => 0),
'large' => array('width' => 800, 'height' => 600, 'quality' => 0)
)
);
'sizes' => [
'small' => ['width' => 480, 'height' => 320, 'quality' => 0],
'medium' => ['width' => 600, 'height' => 480, 'quality' => 0],
'large' => ['width' => 800, 'height' => 600, 'quality' => 0],
],
];
/*=================================== Backends ========================================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_backends
$sitecode = 'empty';
if (!empty($_GET['sitecode'])) {
if (! empty($_GET['sitecode'])) {
$sitecode = $_GET['sitecode'];
}
switch ($sitecode) {
case 'cht':
case 'cht':
$site_url = 'https://data.chinahighlights.com';
break;
case 'ch':
case 'ch':
$site_url = 'https://data.chinahighlights.com';
break;
case 'gm':
$site_url = 'https://data.chinarundreisen.com';
case 'gm':
$site_url = 'https://data.chinahighlightstravel.de';
break;
case 'gh':
case 'gh':
$site_url = 'https://data.globalhighlights.com';
break;
case 'ah':
case 'ah':
$site_url = 'https://data.asiahighlights.com';
break;
case 'vc':
case 'vc':
$site_url = 'https://data.voyageschine.com/kcfinder/upload/vc';
break;
case 'jp':
case 'jp':
$site_url = 'https://data.arachina.com/kcfinder/upload/jp';
break;
case 'vac':
case 'vac':
$site_url = 'https://data.viaje-a-china.com/kcfinder/upload/vac';
break;
case 'it':
case 'it':
$site_url = 'https://data.viaggio-in-cina.it/kcfinder/upload/it';
break;
case 'ru':
case 'ru':
$site_url = 'https://data.chinahighlights.ru/kcfinder/upload/ru';
break;
case 'ct':
case 'ct':
$site_url = 'https://data.chinatravel.com';
break;
case 'chinatravel':
case 'chinatravel':
$site_url = 'https://data.chinatravel.com';
break;
case 'shanghai':
case 'shanghai':
$site_url = 'https://data.shanghaihighlights.com';
break;
case 'beijing':
case 'beijing':
$site_url = 'https://www.mybeijingchina.com';
break;
default:
default:
$site_url = '';
}
@ -124,7 +124,7 @@ if ('gh-int.mycht.cn' == $_SERVER["SERVER_NAME"] || 'origin-gm.mycht.cn' == $_SE
$site_upload_dir = dirname(dirname(dirname(dirname(__FILE__)))) . '/uploader-file/' . $sitecode;
}
$config['backends'][] = array(
$config['backends'][] = [
'name' => 'default',
'adapter' => 'local',
'baseUrl' => $site_url,
@ -133,7 +133,7 @@ $config['backends'][] = array(
'chmodFolders' => 0755,
'filesystemEncoding' => 'UTF-8',
'followSymlinks' => true,
);
];
/*================================ Resource Types =====================================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_resourceTypes
@ -142,22 +142,22 @@ $config['defaultResourceTypes'] = '';
//按日期生成不同文件夹,每周一个文件夹
//$week_folder= date("Y-m_W", time());
$config['resourceTypes'][] = array(
$config['resourceTypes'][] = [
'name' => 'image', // Single quotes not allowed.
'directory' => 'image',
'maxSize' => 0,
'allowedExtensions' => '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip,svg',
'deniedExtensions' => '',
'backend' => 'default'
);
$config['resourceTypes'][] = array(
'backend' => 'default',
];
$config['resourceTypes'][] = [
'name' => 'pic', // Single quotes not allowed.
'directory' => 'pic',
'maxSize' => 0,
'allowedExtensions' => '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip,svg',
'deniedExtensions' => '',
'backend' => 'default'
);
'backend' => 'default',
];
/*
$config['resourceTypes'][] = array(
@ -192,7 +192,7 @@ $config['resourceTypes'][] = array(
$config['roleSessionVar'] = 'CKFinder_UserRole';
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_accessControl
$config['accessControl'][] = array(
$config['accessControl'][] = [
'role' => '*',
'resourceType' => '*',
'folder' => '/',
@ -208,9 +208,8 @@ $config['accessControl'][] = array(
'FILE_DELETE' => true,
'IMAGE_RESIZE' => true,
'IMAGE_RESIZE_CUSTOM' => true
);
'IMAGE_RESIZE_CUSTOM' => true,
];
/*================================ Other Settings =====================================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html
@ -220,9 +219,9 @@ $config['checkDoubleExtension'] = true;
$config['disallowUnsafeCharacters'] = true;
$config['secureImageUploads'] = true;
$config['checkSizeAfterScaling'] = true;
$config['htmlExtensions'] = array('html', 'htm', 'xml', 'js');
$config['hideFolders'] = array('.*', 'CVS', '__thumbs');
$config['hideFiles'] = array('.*');
$config['htmlExtensions'] = ['html', 'htm', 'xml', 'js'];
$config['hideFolders'] = ['.*', 'CVS', '__thumbs'];
$config['hideFiles'] = ['.*'];
$config['forceAscii'] = false;
$config['xSendfile'] = false;
@ -233,16 +232,16 @@ $config['debug'] = false;
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_plugins
$config['pluginsDirectory'] = __DIR__ . '/plugins';
$config['plugins'] = array();
$config['plugins'] = [];
/*================================ Cache settings =====================================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_cache
$config['cache'] = array(
$config['cache'] = [
'imagePreview' => 24 * 3600,
'thumbnails' => 24 * 3600 * 365,
'proxyCommand' => 0
);
'proxyCommand' => 0,
];
/*============================ Temp Directory settings ================================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_tempDirectory
@ -262,7 +261,7 @@ $config['csrfProtection'] = true;
/*===================================== Headers =======================================*/
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_headers
$config['headers'] = array();
$config['headers'] = [];
/*============================== End of Configuration =================================*/

Loading…
Cancel
Save