|
|
@ -32,16 +32,16 @@ $config['authentication'] = function () {
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_licenseKey
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_licenseKey
|
|
|
|
|
|
|
|
|
|
|
|
$config['licenseName'] = 'www.iro.com';
|
|
|
|
$config['licenseName'] = 'www.iro.com';
|
|
|
|
$config['licenseKey'] = '*J?L-*1**-C**X-*D**-*B**-Z*6*-3**J';
|
|
|
|
$config['licenseKey'] = '*J?L-*1**-C**X-*D**-*B**-Z*6*-3**J';
|
|
|
|
|
|
|
|
|
|
|
|
/*============================ CKFinder Internal Directory ============================*/
|
|
|
|
/*============================ CKFinder Internal Directory ============================*/
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_privateDir
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_privateDir
|
|
|
|
|
|
|
|
|
|
|
|
$config['privateDir'] = array(
|
|
|
|
$config['privateDir'] = array(
|
|
|
|
'backend' => 'default',
|
|
|
|
'backend' => 'default',
|
|
|
|
'tags' => '.ckfinder/tags',
|
|
|
|
'tags' => '.ckfinder/tags',
|
|
|
|
'logs' => '.ckfinder/logs',
|
|
|
|
'logs' => '.ckfinder/logs',
|
|
|
|
'cache' => '.ckfinder/cache',
|
|
|
|
'cache' => '.ckfinder/cache',
|
|
|
|
'thumbs' => '.ckfinder/cache/thumbs',
|
|
|
|
'thumbs' => '.ckfinder/cache/thumbs',
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
@ -49,77 +49,80 @@ $config['privateDir'] = array(
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_images
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_images
|
|
|
|
|
|
|
|
|
|
|
|
$config['images'] = array(
|
|
|
|
$config['images'] = array(
|
|
|
|
'maxWidth' => 2560,
|
|
|
|
'maxWidth' => 2560,
|
|
|
|
'maxHeight' => 1440,
|
|
|
|
'maxHeight' => 1440,
|
|
|
|
'quality' => 0,
|
|
|
|
'quality' => 0,
|
|
|
|
'sizes' => array(
|
|
|
|
'sizes' => array(
|
|
|
|
'small' => array('width' => 480, 'height' => 320, 'quality' => 0),
|
|
|
|
'small' => array('width' => 480, 'height' => 320, 'quality' => 0),
|
|
|
|
'medium' => array('width' => 600, 'height' => 480, 'quality' => 0),
|
|
|
|
'medium' => array('width' => 600, 'height' => 480, 'quality' => 0),
|
|
|
|
'large' => array('width' => 800, 'height' => 600, 'quality' => 0)
|
|
|
|
'large' => array('width' => 800, 'height' => 600, 'quality' => 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/*=================================== Backends ========================================*/
|
|
|
|
/*=================================== Backends ========================================*/
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_backends
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_backends
|
|
|
|
|
|
|
|
|
|
|
|
$sitecode='empty';
|
|
|
|
$sitecode = 'empty';
|
|
|
|
if(!empty($_GET['sitecode'])){
|
|
|
|
if (!empty($_GET['sitecode'])) {
|
|
|
|
$sitecode=$_GET['sitecode'];
|
|
|
|
$sitecode = $_GET['sitecode'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
switch ($sitecode){
|
|
|
|
switch ($sitecode) {
|
|
|
|
case 'cht':
|
|
|
|
case 'cht':
|
|
|
|
$site_url='https://data.chinahighlights.com';
|
|
|
|
$site_url = 'https://data.chinahighlights.com';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'ch':
|
|
|
|
case 'ch':
|
|
|
|
$site_url='https://data.chinahighlights.com';
|
|
|
|
$site_url = 'https://data.chinahighlights.com';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'gm':
|
|
|
|
case 'gm':
|
|
|
|
$site_url='https://data.chinarundreisen.com';
|
|
|
|
$site_url = 'https://data.chinarundreisen.com';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'ah':
|
|
|
|
case 'gh':
|
|
|
|
$site_url='https://data.asiahighlights.com';
|
|
|
|
$site_url = 'https://data.globalhighlights.com';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'vc':
|
|
|
|
case 'ah':
|
|
|
|
$site_url='https://data.voyageschine.com/kcfinder/upload/vc';
|
|
|
|
$site_url = 'https://data.asiahighlights.com';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'jp':
|
|
|
|
case 'vc':
|
|
|
|
$site_url='https://data.arachina.com/kcfinder/upload/jp';
|
|
|
|
$site_url = 'https://data.voyageschine.com/kcfinder/upload/vc';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'vac':
|
|
|
|
case 'jp':
|
|
|
|
$site_url='https://data.viaje-a-china.com/kcfinder/upload/vac';
|
|
|
|
$site_url = 'https://data.arachina.com/kcfinder/upload/jp';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'it':
|
|
|
|
case 'vac':
|
|
|
|
$site_url='https://data.viaggio-in-cina.it/kcfinder/upload/it';
|
|
|
|
$site_url = 'https://data.viaje-a-china.com/kcfinder/upload/vac';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'ru':
|
|
|
|
case 'it':
|
|
|
|
$site_url='https://data.chinahighlights.ru/kcfinder/upload/ru';
|
|
|
|
$site_url = 'https://data.viaggio-in-cina.it/kcfinder/upload/it';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'ct':
|
|
|
|
case 'ru':
|
|
|
|
$site_url='https://data.chinatravel.com';
|
|
|
|
$site_url = 'https://data.chinahighlights.ru/kcfinder/upload/ru';
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
case 'ct':
|
|
|
|
$site_url='';
|
|
|
|
$site_url = 'https://data.chinatravel.com';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
$site_url = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//文件上传目录,使用相对路径,在文件夹中建立虚拟目录指向真实文件夹
|
|
|
|
//文件上传目录,使用相对路径,在文件夹中建立虚拟目录指向真实文件夹
|
|
|
|
//需要移出项目文件夹,防止FTP访问到,防止误删
|
|
|
|
//需要移出项目文件夹,防止FTP访问到,防止误删
|
|
|
|
if ('origin-int.mycht.cn' == $_SERVER["SERVER_NAME"] || 'origin-gm.mycht.cn' == $_SERVER["SERVER_NAME"]) {
|
|
|
|
if ('origin-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 {
|
|
|
|
$site_upload_dir = dirname(dirname(dirname(dirname(__FILE__)))).'/uploader-file/'.$sitecode;
|
|
|
|
$site_upload_dir = dirname(dirname(dirname(dirname(__FILE__)))) . '/uploader-file/' . $sitecode;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$config['backends'][] = array(
|
|
|
|
$config['backends'][] = array(
|
|
|
|
'name' => 'default',
|
|
|
|
'name' => 'default',
|
|
|
|
'adapter' => 'local',
|
|
|
|
'adapter' => 'local',
|
|
|
|
'baseUrl' => $site_url,
|
|
|
|
'baseUrl' => $site_url,
|
|
|
|
'root' => $site_upload_dir, // Can be used to explicitly set the CKFinder user files directory.
|
|
|
|
'root' => $site_upload_dir, // Can be used to explicitly set the CKFinder user files directory.
|
|
|
|
'chmodFiles' => 0777,
|
|
|
|
'chmodFiles' => 0777,
|
|
|
|
'chmodFolders' => 0755,
|
|
|
|
'chmodFolders' => 0755,
|
|
|
|
'filesystemEncoding' => 'UTF-8',
|
|
|
|
'filesystemEncoding' => 'UTF-8',
|
|
|
|
'followSymlinks'=>true,
|
|
|
|
'followSymlinks' => true,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/*================================ Resource Types =====================================*/
|
|
|
|
/*================================ Resource Types =====================================*/
|
|
|
@ -130,20 +133,20 @@ $config['defaultResourceTypes'] = '';
|
|
|
|
//按日期生成不同文件夹,每周一个文件夹
|
|
|
|
//按日期生成不同文件夹,每周一个文件夹
|
|
|
|
//$week_folder= date("Y-m_W", time());
|
|
|
|
//$week_folder= date("Y-m_W", time());
|
|
|
|
$config['resourceTypes'][] = array(
|
|
|
|
$config['resourceTypes'][] = array(
|
|
|
|
'name' => 'image', // Single quotes not allowed.
|
|
|
|
'name' => 'image', // Single quotes not allowed.
|
|
|
|
'directory' => 'image',
|
|
|
|
'directory' => 'image',
|
|
|
|
'maxSize' => 0,
|
|
|
|
'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',
|
|
|
|
'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' => '',
|
|
|
|
'deniedExtensions' => '',
|
|
|
|
'backend' => 'default'
|
|
|
|
'backend' => 'default'
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$config['resourceTypes'][] = array(
|
|
|
|
$config['resourceTypes'][] = array(
|
|
|
|
'name' => 'pic', // Single quotes not allowed.
|
|
|
|
'name' => 'pic', // Single quotes not allowed.
|
|
|
|
'directory' => 'pic',
|
|
|
|
'directory' => 'pic',
|
|
|
|
'maxSize' => 0,
|
|
|
|
'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',
|
|
|
|
'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' => '',
|
|
|
|
'deniedExtensions' => '',
|
|
|
|
'backend' => 'default'
|
|
|
|
'backend' => 'default'
|
|
|
|
);
|
|
|
|
);
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
|
@ -180,21 +183,21 @@ $config['roleSessionVar'] = 'CKFinder_UserRole';
|
|
|
|
|
|
|
|
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_accessControl
|
|
|
|
// https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_accessControl
|
|
|
|
$config['accessControl'][] = array(
|
|
|
|
$config['accessControl'][] = array(
|
|
|
|
'role' => '*',
|
|
|
|
'role' => '*',
|
|
|
|
'resourceType' => '*',
|
|
|
|
'resourceType' => '*',
|
|
|
|
'folder' => '/',
|
|
|
|
'folder' => '/',
|
|
|
|
|
|
|
|
|
|
|
|
'FOLDER_VIEW' => true,
|
|
|
|
'FOLDER_VIEW' => true,
|
|
|
|
'FOLDER_CREATE' => true,
|
|
|
|
'FOLDER_CREATE' => true,
|
|
|
|
'FOLDER_RENAME' => true,
|
|
|
|
'FOLDER_RENAME' => true,
|
|
|
|
'FOLDER_DELETE' => false,
|
|
|
|
'FOLDER_DELETE' => false,
|
|
|
|
|
|
|
|
|
|
|
|
'FILE_VIEW' => true,
|
|
|
|
'FILE_VIEW' => true,
|
|
|
|
'FILE_CREATE' => true,
|
|
|
|
'FILE_CREATE' => true,
|
|
|
|
'FILE_RENAME' => true,
|
|
|
|
'FILE_RENAME' => true,
|
|
|
|
'FILE_DELETE' => true,
|
|
|
|
'FILE_DELETE' => true,
|
|
|
|
|
|
|
|
|
|
|
|
'IMAGE_RESIZE' => true,
|
|
|
|
'IMAGE_RESIZE' => true,
|
|
|
|
'IMAGE_RESIZE_CUSTOM' => true
|
|
|
|
'IMAGE_RESIZE_CUSTOM' => true
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
@ -227,7 +230,7 @@ $config['plugins'] = array();
|
|
|
|
|
|
|
|
|
|
|
|
$config['cache'] = array(
|
|
|
|
$config['cache'] = array(
|
|
|
|
'imagePreview' => 24 * 3600,
|
|
|
|
'imagePreview' => 24 * 3600,
|
|
|
|
'thumbnails' => 24 * 3600 * 365,
|
|
|
|
'thumbnails' => 24 * 3600 * 365,
|
|
|
|
'proxyCommand' => 0
|
|
|
|
'proxyCommand' => 0
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|