diff --git a/application/config/config.php b/application/config/config.php index 349837f8..99f00d34 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -36,7 +36,10 @@ switch ($_SERVER['SERVER_NAME']) { $base_url = 'https://int.mycht.cn'; break; case 'gh-int.mycht.cn': - $base_url = 'https://gh-int.mycht.cn'; + $base_url = 'https://int.mycht.cn'; + break; + case 'int.mycht.cn': + $base_url = 'https://int.mycht.cn'; break; case 'origin-gh.mycht.cn': $base_url = 'https://gh.mycht.cn'; @@ -419,12 +422,12 @@ $config['site'] = array( ); //静态文件生成路径 -$config['cache']['jp']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\arachina.com'; -$config['cache']['gm']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\chinarundreisen.com'; -$config['cache']['vc']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\voyageschine.com'; -$config['cache']['vac']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaje-a-china.com'; -$config['cache']['ru']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\chinahighlights.ru'; -$config['cache']['it']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaggio-in-cina.it'; +$config['cache']['jp']['cache_path'] = 'D:\wwwcache-intl\arachina.com'; +$config['cache']['gm']['cache_path'] = 'D:\wwwcache-intl\chinarundreisen.com'; +$config['cache']['vc']['cache_path'] = 'D:\wwwcache-intl\voyageschine.com'; +$config['cache']['vac']['cache_path'] = 'D:\wwwcache-intl\viaje-a-china.com'; +$config['cache']['ru']['cache_path'] = 'D:\wwwcache-intl\chinahighlights.ru'; +$config['cache']['it']['cache_path'] = 'D:\wwwcache-intl\viaggio-in-cina.it'; //静态文件站点域名 $config['cache']['jp']['site_url'] = 'https://www.arachina.com'; @@ -722,12 +725,12 @@ $config['css_source_ts'] = 'https://www.trainspread.com/css/bootstrap.min.css'; //静态文件生成路径 -$config['cache']['jp']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\arachina.com'; -$config['cache']['gm']['cache_path'] = 'C:\Dropbox\wwwcache\chinarundreisen.com'; -$config['cache']['vc']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\voyageschine.com'; -$config['cache']['vac']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaje-a-china.com'; -$config['cache']['ru']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\chinahighlights.ru'; -$config['cache']['it']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaggio-in-cina.it'; +$config['cache']['jp']['cache_path'] = 'D:\wwwcache-intl\arachina.com'; +$config['cache']['gm']['cache_path'] = 'D:\wwwcache-intl\chinarundreisen.com'; +$config['cache']['vc']['cache_path'] = 'D:\wwwcache-intl\voyageschine.com'; +$config['cache']['vac']['cache_path'] = 'D:\wwwcache-intl\viaje-a-china.com'; +$config['cache']['ru']['cache_path'] = 'D:\wwwcache-intl\chinahighlights.ru'; +$config['cache']['it']['cache_path'] = 'D:\wwwcache-intl\viaggio-in-cina.it'; $config['cache']['ch']['cache_path'] = 'D:\wwwcache\chinahighlights.com'; $config['cache']['ah']['cache_path'] = 'D:\wwwcache\asiahighlights.com'; $config['cache']['gh']['cache_path'] = 'D:\wwwcache\globalhighlights.com'; diff --git a/media/popselectpicture.php b/media/popselectpicture.php index 340047ac..25e3c71c 100644 --- a/media/popselectpicture.php +++ b/media/popselectpicture.php @@ -1,142 +1,151 @@ - - China Highlights Media Center - - - - - + China Highlights Media Center + + + + + + '; - - if (stripos($ip_list,'202.103.68.34')!==false - || stripos($ip_list,'221.7.151.39')!==false - || stripos($ip_list,'221.7.151.37')!==false - || stripos($ip_list,'221.7.151.41')!==false - || stripos($ip_list,'111.59.90.31')!==false - || stripos($ip_list,'180.140.114.225')!==false - || stripos($ip_list,'116.8.4.34')!==false - || stripos($ip_list,'180.140.114.208')!==false - || stripos($ip_list,'116.8.4.34')!==false - || stripos($ip_list,'::1')!==false //这个也是本地IP - ){ - return false; +*/ + function is_remote_ip() + { + $ip_list = ''; + if (isset($_SERVER["REMOTE_ADDR"])) $ip_list = $_SERVER["REMOTE_ADDR"] . ' '; + if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) $ip_list .= $_SERVER["HTTP_X_FORWARDED_FOR"]; + //$ip_list=$_SERVER["REMOTE_ADDR"].' '.$_SERVER["HTTP_X_FORWARDED_FOR"]; + //print_r($_SERVER); + echo ''; + + if ( + stripos($ip_list, '202.103.68.34') !== false + || stripos($ip_list, '221.7.151.39') !== false + || stripos($ip_list, '221.7.151.37') !== false + || stripos($ip_list, '221.7.151.41') !== false + || stripos($ip_list, '111.59.90.31') !== false + || stripos($ip_list, '180.140.114.225') !== false + || stripos($ip_list, '116.8.4.34') !== false + || stripos($ip_list, '180.140.114.208') !== false + || stripos($ip_list, '116.8.4.34') !== false + || stripos($ip_list, '::1') !== false //这个也是本地IP + ) { + return false; + } + return true; + } + + //CDN分发之后,源站和前端域名不一致在这里修正,否则程序生成的链接是源站的域名 + $base_url = ''; + switch ($_SERVER['SERVER_NAME']) { + case 'origin-ct.mycht.cn': + $base_url = 'https://ct.mycht.cn'; + break; + case 'origin-gm.mycht.cn': + $base_url = 'https://gm.mycht.cn'; + break; + case 'origin-cht.mycht.cn': + $base_url = 'https://cht.mycht.cn'; + break; + case 'origin-int.mycht.cn': + $base_url = 'https://int.mycht.cn'; + case 'gh-int.mycht.cn': + $base_url = 'https://int.mycht.cn'; + break; + default: + $base_url = 'https://' . $_SERVER['HTTP_HOST']; } - return true; -} -//CDN分发之后,源站和前端域名不一致在这里修正,否则程序生成的链接是源站的域名 -$base_url=''; -switch ($_SERVER['SERVER_NAME']){ - case 'origin-ct.mycht.cn': - $base_url='https://ct.mycht.cn'; - break; - case 'origin-gm.mycht.cn': - $base_url='https://gm.mycht.cn'; - break; - case 'origin-cht.mycht.cn': - $base_url='https://cht.mycht.cn'; - break; - case 'origin-int.mycht.cn': - $base_url='https://int.mycht.cn'; - break; - default:$base_url='https://'.$_SERVER['HTTP_HOST']; -} + ?> + + + + + + + - ?> - - - - - - - - + \ No newline at end of file diff --git a/wysiwyg/ckfinder/config.php b/wysiwyg/ckfinder/config.php index d3ca03d6..c7a3f554 100644 --- a/wysiwyg/ckfinder/config.php +++ b/wysiwyg/ckfinder/config.php @@ -108,7 +108,7 @@ switch ($sitecode) { //文件上传目录,使用相对路径,在文件夹中建立虚拟目录指向真实文件夹 //创建指向目录 mklink /D D:\wwwroot\uploader-file\gh\image D:\wwwroot\origin-www.globalhighlights.com\image //需要移出项目文件夹,防止FTP访问到,防止误删 -if ('origin-int.mycht.cn' == $_SERVER["SERVER_NAME"] || 'origin-gm.mycht.cn' == $_SERVER["SERVER_NAME"]) { +if ('gh-int.mycht.cn' == $_SERVER["SERVER_NAME"] || 'origin-gm.mycht.cn' == $_SERVER["SERVER_NAME"]) { // 国际站和德语站不需要更改目录 $site_upload_dir = dirname(__FILE__) . ('/userfiles/') . $sitecode; } else {