Merge branch 'master' of github.com:hainatravel/information-system into master

hotfix/paypal-note
candice 3 years ago
commit 243a489fd1

@ -36,7 +36,10 @@ switch ($_SERVER['SERVER_NAME']) {
$base_url = 'https://int.mycht.cn'; $base_url = 'https://int.mycht.cn';
break; break;
case 'gh-int.mycht.cn': 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; break;
case 'origin-gh.mycht.cn': case 'origin-gh.mycht.cn':
$base_url = 'https://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']['jp']['cache_path'] = 'D:\wwwcache-intl\arachina.com';
$config['cache']['gm']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\chinarundreisen.com'; $config['cache']['gm']['cache_path'] = 'D:\wwwcache-intl\chinarundreisen.com';
$config['cache']['vc']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\voyageschine.com'; $config['cache']['vc']['cache_path'] = 'D:\wwwcache-intl\voyageschine.com';
$config['cache']['vac']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaje-a-china.com'; $config['cache']['vac']['cache_path'] = 'D:\wwwcache-intl\viaje-a-china.com';
$config['cache']['ru']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\chinahighlights.ru'; $config['cache']['ru']['cache_path'] = 'D:\wwwcache-intl\chinahighlights.ru';
$config['cache']['it']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaggio-in-cina.it'; $config['cache']['it']['cache_path'] = 'D:\wwwcache-intl\viaggio-in-cina.it';
//静态文件站点域名 //静态文件站点域名
$config['cache']['jp']['site_url'] = 'https://www.arachina.com'; $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']['jp']['cache_path'] = 'D:\wwwcache-intl\arachina.com';
$config['cache']['gm']['cache_path'] = 'C:\Dropbox\wwwcache\chinarundreisen.com'; $config['cache']['gm']['cache_path'] = 'D:\wwwcache-intl\chinarundreisen.com';
$config['cache']['vc']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\voyageschine.com'; $config['cache']['vc']['cache_path'] = 'D:\wwwcache-intl\voyageschine.com';
$config['cache']['vac']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaje-a-china.com'; $config['cache']['vac']['cache_path'] = 'D:\wwwcache-intl\viaje-a-china.com';
$config['cache']['ru']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\chinahighlights.ru'; $config['cache']['ru']['cache_path'] = 'D:\wwwcache-intl\chinahighlights.ru';
$config['cache']['it']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaggio-in-cina.it'; $config['cache']['it']['cache_path'] = 'D:\wwwcache-intl\viaggio-in-cina.it';
$config['cache']['ch']['cache_path'] = 'D:\wwwcache\chinahighlights.com'; $config['cache']['ch']['cache_path'] = 'D:\wwwcache\chinahighlights.com';
$config['cache']['ah']['cache_path'] = 'D:\wwwcache\asiahighlights.com'; $config['cache']['ah']['cache_path'] = 'D:\wwwcache\asiahighlights.com';
$config['cache']['gh']['cache_path'] = 'D:\wwwcache\globalhighlights.com'; $config['cache']['gh']['cache_path'] = 'D:\wwwcache\globalhighlights.com';

@ -1,22 +1,27 @@
<?php header('Cache-Control: no-cache'); ?> <?php header('Cache-Control: no-cache'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head >
<head>
<title>China Highlights Media Center</title> <title>China Highlights Media Center</title>
<style type="text/css"> <style type="text/css">
html,body,iframe { html,
body,
iframe {
height: 100%; height: 100%;
margin: 0; margin: 0;
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;
width: 100%; width: 100%;
} }
iframe { iframe {
overflow: auto; overflow: auto;
} }
</style> </style>
</head> </head>
<body>
<body>
<script type="text/javascript"> <script type="text/javascript">
function SetReturnValue(s) { function SetReturnValue(s) {
if (s) { if (s) {
@ -27,116 +32,120 @@
} }
window.parent.close(); window.parent.close();
} }
this.opener.callBack = window.opener ? window.opener.CallBack: window.parent.CallBack; this.opener.callBack = window.opener ? window.opener.CallBack : window.parent.CallBack;
</script> </script>
<?php <?php
$media_site_code='ch'; $media_site_code = 'ch';
if (isset($_GET['site_code'])){ if (isset($_GET['site_code'])) {
switch ($_GET['site_code']){ switch ($_GET['site_code']) {
case 'cht': case 'cht':
$media_site_code='ch'; $media_site_code = 'ch';
break; break;
case 'gm': case 'gm':
$media_site_code='ge'; $media_site_code = 'ge';
break; break;
case 'it': case 'it':
$media_site_code='it'; $media_site_code = 'it';
break; break;
case 'jp': case 'jp':
$media_site_code='jp'; $media_site_code = 'jp';
break; break;
case 'ru': case 'ru':
$media_site_code='ru'; $media_site_code = 'ru';
break; break;
case 'vac': case 'vac':
$media_site_code='sp'; $media_site_code = 'sp';
break; break;
case 'vc': case 'vc':
$media_site_code='fr'; $media_site_code = 'fr';
break; break;
case 'ct': case 'ct':
$media_site_code='ct'; $media_site_code = 'ct';
break; break;
case 'mbj': case 'mbj':
$media_site_code='bj'; $media_site_code = 'bj';
break; break;
case 'sht': case 'sht':
$media_site_code='sh'; $media_site_code = 'sh';
break; break;
case 'yz': case 'yz':
$media_site_code='yz'; $media_site_code = 'yz';
break; break;
case 'gl': case 'gl':
$media_site_code='gl'; $media_site_code = 'gl';
break; break;
case 'tbt': case 'tbt':
$media_site_code='tb'; $media_site_code = 'tb';
break; break;
default: default:
$media_site_code='ch'; $media_site_code = 'ch';
} }
} }
/* /*
$_SERVER["REMOTE_ADDR"]!=='221.7.151.34' && $_SERVER["REMOTE_ADDR"]!=='221.7.151.43' && $_SERVER["REMOTE_ADDR"]!=='111.59.90.31' && $_SERVER["REMOTE_ADDR"]!=='221.7.151.41' && $_SERVER["REMOTE_ADDR"]!=='116.251.208.170' && $_SERVER["REMOTE_ADDR"]!=='221.7.151.39' $_SERVER["REMOTE_ADDR"]!=='221.7.151.34' && $_SERVER["REMOTE_ADDR"]!=='221.7.151.43' && $_SERVER["REMOTE_ADDR"]!=='111.59.90.31' && $_SERVER["REMOTE_ADDR"]!=='221.7.151.41' && $_SERVER["REMOTE_ADDR"]!=='116.251.208.170' && $_SERVER["REMOTE_ADDR"]!=='221.7.151.39'
*/ */
function is_remote_ip() function is_remote_ip()
{ {
$ip_list=''; $ip_list = '';
if(isset($_SERVER["REMOTE_ADDR"]))$ip_list=$_SERVER["REMOTE_ADDR"].' '; if (isset($_SERVER["REMOTE_ADDR"])) $ip_list = $_SERVER["REMOTE_ADDR"] . ' ';
if(isset($_SERVER["HTTP_X_FORWARDED_FOR"]))$ip_list.=$_SERVER["HTTP_X_FORWARDED_FOR"]; if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) $ip_list .= $_SERVER["HTTP_X_FORWARDED_FOR"];
//$ip_list=$_SERVER["REMOTE_ADDR"].' '.$_SERVER["HTTP_X_FORWARDED_FOR"]; //$ip_list=$_SERVER["REMOTE_ADDR"].' '.$_SERVER["HTTP_X_FORWARDED_FOR"];
//print_r($_SERVER); //print_r($_SERVER);
echo '<!--'.$ip_list.'-->'; echo '<!--' . $ip_list . '-->';
if (stripos($ip_list,'202.103.68.34')!==false if (
|| stripos($ip_list,'221.7.151.39')!==false stripos($ip_list, '202.103.68.34') !== false
|| stripos($ip_list,'221.7.151.37')!==false || stripos($ip_list, '221.7.151.39') !== false
|| stripos($ip_list,'221.7.151.41')!==false || stripos($ip_list, '221.7.151.37') !== false
|| stripos($ip_list,'111.59.90.31')!==false || stripos($ip_list, '221.7.151.41') !== false
|| stripos($ip_list,'180.140.114.225')!==false || stripos($ip_list, '111.59.90.31') !== false
|| stripos($ip_list,'116.8.4.34')!==false || stripos($ip_list, '180.140.114.225') !== false
|| stripos($ip_list,'180.140.114.208')!==false || stripos($ip_list, '116.8.4.34') !== false
|| stripos($ip_list,'116.8.4.34')!==false || stripos($ip_list, '180.140.114.208') !== false
|| stripos($ip_list,'::1')!==false //这个也是本地IP || stripos($ip_list, '116.8.4.34') !== false
){ || stripos($ip_list, '::1') !== false //这个也是本地IP
) {
return false; return false;
} }
return true; return true;
} }
//CDN分发之后源站和前端域名不一致在这里修正否则程序生成的链接是源站的域名 //CDN分发之后源站和前端域名不一致在这里修正否则程序生成的链接是源站的域名
$base_url=''; $base_url = '';
switch ($_SERVER['SERVER_NAME']){ switch ($_SERVER['SERVER_NAME']) {
case 'origin-ct.mycht.cn': case 'origin-ct.mycht.cn':
$base_url='https://ct.mycht.cn'; $base_url = 'https://ct.mycht.cn';
break; break;
case 'origin-gm.mycht.cn': case 'origin-gm.mycht.cn':
$base_url='https://gm.mycht.cn'; $base_url = 'https://gm.mycht.cn';
break; break;
case 'origin-cht.mycht.cn': case 'origin-cht.mycht.cn':
$base_url='https://cht.mycht.cn'; $base_url = 'https://cht.mycht.cn';
break; break;
case 'origin-int.mycht.cn': case 'origin-int.mycht.cn':
$base_url='https://int.mycht.cn'; $base_url = 'https://int.mycht.cn';
case 'gh-int.mycht.cn':
$base_url = 'https://int.mycht.cn';
break; break;
default:$base_url='https://'.$_SERVER['HTTP_HOST']; default:
} $base_url = 'https://' . $_SERVER['HTTP_HOST'];
}
?> ?>
<?php <?php
if (isset($_GET['rwidth'])) { if (isset($_GET['rwidth'])) {
$rwidth = 'rwidth='.$_GET['rwidth'].'&'; $rwidth = 'rwidth=' . $_GET['rwidth'] . '&';
} else { } else {
$rwidth = ''; $rwidth = '';
}?> } ?>
<?php if (isset($_GET['remote']) || is_remote_ip()){ ?> <?php if (isset($_GET['remote']) || is_remote_ip()) { ?>
<iframe id="test" frameborder="0" src="https://media-center.mycht.cn/OutputApp/searchpicture.aspx?<?php echo($rwidth);?>webcode=<?php echo $media_site_code; ?>&lgc=<?php echo $_GET['site_lgc'];?>&apptype=translate&uname=ycc&upass=ycc&lmisn=1&WebUrl=<?php echo isset($_GET['WebUrl'])?$_GET['WebUrl']:false;?>&redirecturl=<?php echo $base_url; ?>/media/transitval.php" > </iframe> <iframe id="test" frameborder="0" src="https://media-center.mycht.cn/OutputApp/searchpicture.aspx?<?php echo ($rwidth); ?>webcode=<?php echo $media_site_code; ?>&lgc=<?php echo $_GET['site_lgc']; ?>&apptype=translate&uname=ycc&upass=ycc&lmisn=1&WebUrl=<?php echo isset($_GET['WebUrl']) ? $_GET['WebUrl'] : false; ?>&redirecturl=<?php echo $base_url; ?>/media/transitval.php"> </iframe>
<?php }else{ ?> <?php } else { ?>
<iframe id="test" frameborder="0" src="https://video.chtcdn.com/OutputApp/searchpicture.aspx?<?php echo($rwidth);?>webcode=<?php echo $media_site_code; ?>&lgc=<?php echo $_GET['site_lgc'];?>&apptype=infomation&WebUrl=<?php echo isset($_GET['WebUrl'])?$_GET['WebUrl']:false;?>&redirecturl=<?php echo $base_url; ?>/media/transitval.php" > </iframe> <iframe id="test" frameborder="0" src="https://video.chtcdn.com/OutputApp/searchpicture.aspx?<?php echo ($rwidth); ?>webcode=<?php echo $media_site_code; ?>&lgc=<?php echo $_GET['site_lgc']; ?>&apptype=infomation&WebUrl=<?php echo isset($_GET['WebUrl']) ? $_GET['WebUrl'] : false; ?>&redirecturl=<?php echo $base_url; ?>/media/transitval.php"> </iframe>
<?php } ?> <?php } ?>
</body> </body>
</html> </html>

@ -108,7 +108,7 @@ switch ($sitecode) {
//文件上传目录,使用相对路径,在文件夹中建立虚拟目录指向真实文件夹 //文件上传目录,使用相对路径,在文件夹中建立虚拟目录指向真实文件夹
//创建指向目录 mklink /D D:\wwwroot\uploader-file\gh\image D:\wwwroot\origin-www.globalhighlights.com\image //创建指向目录 mklink /D D:\wwwroot\uploader-file\gh\image D:\wwwroot\origin-www.globalhighlights.com\image
//需要移出项目文件夹防止FTP访问到防止误删 //需要移出项目文件夹防止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; $site_upload_dir = dirname(__FILE__) . ('/userfiles/') . $sitecode;
} else { } else {

Loading…
Cancel
Save