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