{{@LNG.copyright_desc}}
\nFrom 16291565bd9a0156ec842839bc392a23f3c3f189 Mon Sep 17 00:00:00 2001
From: warlee <824691958@qq.com>
Date: Fri, 29 Sep 2017 18:22:02 +0800
Subject: [PATCH] version 4.22 release
---
ChangeLog.md | 21 +
app/api/sso.class.php | 4 +-
app/controller/api.class.php | 1 -
app/controller/app.class.php | 2 +-
app/controller/desktop.class.php | 1 -
app/controller/editor.class.php | 3 +-
app/controller/explorer.class.php | 16 +-
app/controller/pluginApp.class.php | 18 +-
app/controller/setting.class.php | 1 -
app/controller/share.class.php | 6 +-
app/controller/user.class.php | 14 +-
app/controller/util.php | 4 +-
app/core/Controller.class.php | 14 +-
app/function/common.function.php | 96 +--
app/function/file.function.php | 145 ++--
app/function/helper.function.php | 6 +-
app/function/web.function.php | 72 +-
app/kod/.cache_data | 4 +-
app/kod/ImageThumb.class.php | 55 ++
app/kod/KodArchive.class.php | 5 +-
app/kod/archiveLib/kodRarArchive.class.php | 2 +-
app/kod/archiveLib/pcltar.lib.php | 19 +-
app/kod/archiveLib/pcltrace.lib.php | 3 +-
app/kod/archiveLib/pclzip.class.php | 6 +-
app/model/ConfigModel.class .php | 7 -
app/model/PluginModel.class.php | 11 +-
app/sdks/medoo.class.php | 715 ------------------
config/config.php | 2 +-
config/i18n/ar/main.php | 16 +-
config/i18n/bg/main.php | 18 +-
config/i18n/bn/main.php | 18 +-
config/i18n/ca/main.php | 20 +-
config/i18n/cs/main.php | Bin 53900 -> 54108 bytes
config/i18n/da/main.php | Bin 52224 -> 52438 bytes
config/i18n/de/main.php | 20 +-
config/i18n/el/main.php | 20 +-
config/i18n/en/main.php | 12 +-
config/i18n/es/main.php | 20 +-
config/i18n/et/main.php | Bin 51566 -> 51789 bytes
config/i18n/fa/main.php | 18 +-
config/i18n/fi/main.php | Bin 53033 -> 53237 bytes
config/i18n/fr/main.php | 18 +-
config/i18n/gl/main.php | Bin 54376 -> 54609 bytes
config/i18n/hi/main.php | 16 +-
config/i18n/hr/main.php | Bin 53112 -> 53343 bytes
config/i18n/hu/main.php | 18 +-
config/i18n/id/main.php | Bin 52421 -> 52644 bytes
config/i18n/it/main.php | 18 +-
config/i18n/ja/main.php | 16 +-
config/i18n/ko/main.php | Bin 55147 -> 55363 bytes
config/i18n/lt/main.php | 20 +-
config/i18n/nl/main.php | Bin 53588 -> 53812 bytes
config/i18n/no/main.php | Bin 52295 -> 52500 bytes
config/i18n/pl/main.php | Bin 54434 -> 54703 bytes
config/i18n/pt/main.php | 18 +-
config/i18n/ro/main.php | 18 +-
config/i18n/ru/about.html | 4 +-
config/i18n/ru/help.html | 2 +-
config/i18n/ru/main.php | 28 +-
config/i18n/si/main.php | 20 +-
config/i18n/sk/main.php | Bin 54132 -> 54358 bytes
config/i18n/sl/main.php | Bin 52353 -> 52591 bytes
config/i18n/sr/main.php | 20 +-
config/i18n/sv/main.php | Bin 52917 -> 53149 bytes
config/i18n/ta/main.php | 20 +-
config/i18n/th/main.php | 18 +-
config/i18n/tr/main.php | Bin 52912 -> 53121 bytes
config/i18n/uk/main.php | 20 +-
config/i18n/uz/main.php | Bin 53626 -> 53855 bytes
config/i18n/vi/main.php | 20 +-
config/i18n/zh-CN/main.php | 20 +-
config/i18n/zh-TW/main.php | 20 +-
config/setting.php | 15 +-
config/version.php | 2 +-
plugins/adminer/adminer/index.php | 11 +-
plugins/adminer/adminer/sso2.php | 5 -
plugins/adminer/app.php | 6 +-
plugins/adminer/i18n/zh-CN.php | 2 +-
plugins/adminer/package.json | 10 +-
plugins/officeLive/package.json | 11 +-
plugins/yzOffice/php/assign/header.php | 7 +-
static/js/app/src/api/view/main.js | 8 +-
static/js/app/src/app/main.js | 8 +-
static/js/app/src/desktop/main.js | 18 +-
static/js/app/src/edit/main.js | 14 +-
static/js/app/src/editor/main.js | 14 +-
static/js/app/src/explorer/main.js | 18 +-
static/js/app/src/explorerWap/main.js | 12 +-
static/js/app/src/plugins/main.js | 9 +-
static/js/app/src/plugins/tpl/main.js | 2 +-
static/js/app/src/setting/main.js | 10 +-
static/js/app/src/shareEditor/main.js | 12 +-
static/js/app/src/shareExplorer/main.js | 18 +-
static/js/app/src/shareIndex/main.js | 8 +-
static/js/app/src/user/main.js | 8 +-
.../src-min-noconflict/ext-searchboxKod.js | 1 +
static/js/lib/util.js | 63 +-
static/style/common.css | 5 +-
.../style/font-awesome/css/font-awesome.css | 9 +
.../SourceCodePro-Regular.otf.woff | Bin 0 -> 89024 bytes
static/style/skin/alpha_image.css | 6 +-
static/style/skin/alpha_image_sky.css | 6 +-
static/style/skin/alpha_image_sun.css | 6 +-
static/style/skin/base/app_code_edit.css | 8 +-
static/style/skin/base/app_desktop.css | 8 +-
static/style/skin/base/app_editor.css | 6 +-
static/style/skin/base/app_explorer.css | 8 +-
static/style/skin/base/app_setting.css | 6 +-
static/style/skin/diy.css | 6 +-
static/style/skin/mac.css | 4 +-
static/style/skin/metro.css | 6 +-
static/style/skin/metro_green.css | 6 +-
static/style/skin/metro_orange.css | 6 +-
static/style/skin/metro_pink.css | 6 +-
static/style/skin/metro_purple.css | 6 +-
static/style/skin/win10.css | 4 +-
static/style/skin/win7.css | 6 +-
117 files changed, 830 insertions(+), 1329 deletions(-)
delete mode 100755 app/sdks/medoo.class.php
delete mode 100755 plugins/adminer/adminer/sso2.php
create mode 100755 static/style/font/sourcecodepro/SourceCodePro-Regular.otf.woff
diff --git a/ChangeLog.md b/ChangeLog.md
index 4756e31..fb097da 100755
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,24 @@
+### ver4.22 `2017/9/20`
+-----
+#### update:
+- 压缩文件预览:tab栏中文问题;插件filePath文件名优化记录
+- 上传兼容性优化;支持自定义多线程上传,支持自定义是否二进制上传
+- 其他优化: iframe 点击事件冒泡到上级;编辑器主题黑色样式优化;树目录自动记录以及目录展开状态优化;文件大小逗号分隔;
+- 图片缩略图缓存问题优化
+- 图片exif插件;图片预览时自动修正方向
+- ie8: 样式调整优化,js报错兼容优化
+- 文件夹双击事件优化:系统双击鼠标位置不懂情况下不触发双击事件问题
+- 文件保存插件挂载点
+
+#### fix bug
+- 桌面图片缩略图加载慢问题
+- 解压缩含中文路径优化
+- 移动端
+ - 点击不了问题;右键菜单二级菜单无法点击问题
+ - 移动端字体问题
+
+
+
### ver4.21 `2017/9/11`
-----
#### update:
diff --git a/app/api/sso.class.php b/app/api/sso.class.php
index 8ccd696..6530bdd 100755
--- a/app/api/sso.class.php
+++ b/app/api/sso.class.php
@@ -57,8 +57,7 @@ class SSO{
static public function sessionCheck($key,$value='success'){
$session = self::init();
- if( isset($session[$key]) &&
- $session[$key] == $value){
+ if( isset($session[$key]) && $session[$key] == $value){
return true;
}
return false;
@@ -79,6 +78,7 @@ class SSO{
':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
}
if(!self::sessionCheck($appKey)){
+ session_destroy();
header('Location: '.$authUrl.'&link='.rawurlencode($appUrl));
exit;
}
diff --git a/app/controller/api.class.php b/app/controller/api.class.php
index f5d81a9..86938b8 100755
--- a/app/controller/api.class.php
+++ b/app/controller/api.class.php
@@ -9,7 +9,6 @@
class api extends Controller{
function __construct(){
parent::__construct();
- $this->tpl = TEMPLATE.'api/';
}
/**
diff --git a/app/controller/app.class.php b/app/controller/app.class.php
index e2ed2df..8e9527e 100755
--- a/app/controller/app.class.php
+++ b/app/controller/app.class.php
@@ -16,7 +16,7 @@ class app extends Controller{
* 用户首页展示
*/
public function index() {
- $this->display(TEMPLATE.'app/index.html');
+ $this->display('index.html');
}
public function initApp(){
diff --git a/app/controller/desktop.class.php b/app/controller/desktop.class.php
index ccd487d..8374368 100755
--- a/app/controller/desktop.class.php
+++ b/app/controller/desktop.class.php
@@ -9,7 +9,6 @@
class desktop extends Controller{
function __construct() {
parent::__construct();
- $this->tpl = TEMPLATE.'desktop/';
}
public function index() {
$wap = is_wap() && (!isset($_COOKIE['forceWap']) || $_COOKIE['forceWap'] == '1');
diff --git a/app/controller/editor.class.php b/app/controller/editor.class.php
index 558207e..adc4099 100755
--- a/app/controller/editor.class.php
+++ b/app/controller/editor.class.php
@@ -9,7 +9,6 @@
class editor extends Controller{
function __construct() {
parent::__construct();
- $this->tpl = TEMPLATE . 'editor/';
}
// 多文件编辑器
@@ -71,7 +70,7 @@ class editor extends Controller{
if (!path_readable($filepath)){
show_json(LNG('no_permission_read_all'),false);
}
- if (filesize($filepath) >= 1024*1024*20){
+ if (filesize($filepath) >= 1024*1024*40){
show_json(LNG('edit_too_big'),false);
}
}
diff --git a/app/controller/explorer.class.php b/app/controller/explorer.class.php
index 35a3fe4..4e0704f 100755
--- a/app/controller/explorer.class.php
+++ b/app/controller/explorer.class.php
@@ -11,7 +11,6 @@ class explorer extends Controller{
public $user;
public function __construct(){
parent::__construct();
- $this->tpl = TEMPLATE."explorer/";
$this->user = $_SESSION['kodUser'];
if (isset($this->in['path'])) {
//游客访问别人zip,解压到**目录;入口不检测权限
@@ -625,7 +624,8 @@ class explorer extends Controller{
if(!path_writeable($pathThis)){
$error++;
continue;
- }
+ }
+ //show_json($pathThis,false,file_exists($pathThis));
// 群组文件删除,移动到个人回收站。
// $GLOBALS['kodPathType'] == KOD_GROUP_SHARE ||
@@ -1015,10 +1015,8 @@ class explorer extends Controller{
if (!is_dir(DATA_THUMB)){
mk_dir(DATA_THUMB);
}
-
$image = $this->path;
$imageMd5 = @md5_file($image);//文件md5
-
if (strlen($imageMd5)<5) {
$imageMd5 = md5($image);
}
@@ -1108,15 +1106,15 @@ class explorer extends Controller{
//通用缩略图
public function fileThumb(){
- Hook::trigger("explorer.fileThumb",$this->path);
+ Hook::trigger("explorer.fileThumbStart",$this->path);
}
//通用预览
public function fileView(){
- Hook::trigger("explorer.fileView",$this->path);
+ Hook::trigger("explorer.fileViewStart",$this->path);
}
//通用保存
public function fileSave(){
- Hook::trigger("explorer.fileSave",$this->path);
+ Hook::trigger("explorer.fileSaveStart",$this->path);
}
//代理输出
public function fileProxy(){
@@ -1372,7 +1370,7 @@ class explorer extends Controller{
$list['info']['role'] = "owner";
}
if($GLOBALS['isRoot']){
- $list['info']['adminRealPath'] = USER_PATH.$user['path'].'/home/';
+ $list['info']['adminRealPath'] = get_path_father($GLOBALS['kodPathPre']);
}
}
//自己管理的目录
@@ -1397,7 +1395,7 @@ class explorer extends Controller{
if($GLOBALS['isRoot']){
$list['groupSpaceUse'] = $group['config'];//自己
$list['info']['role'] = 'owner';
- $list['info']['adminRealPath'] = GROUP_PATH.$group['path'].'/home/';
+ $list['info']['adminRealPath'] = $GLOBALS['kodPathPre'];
}
}
}
diff --git a/app/controller/pluginApp.class.php b/app/controller/pluginApp.class.php
index 42979a0..5b77be9 100755
--- a/app/controller/pluginApp.class.php
+++ b/app/controller/pluginApp.class.php
@@ -12,7 +12,6 @@
class pluginApp extends Controller{
function __construct() {
parent::__construct();
- $this->tpl = TEMPLATE.'pluginApp/';
}
//?pluginApp/to/epubReader/index&a=1
@@ -20,17 +19,22 @@ class pluginApp extends Controller{
public function to() {
$route = $this->in['URLremote'];
if(count($route) >= 3){
+ $app = $route[2];
+ $action = $route[3];
+
if(count($route) == 3){
- $route[3] = 'index';
+ $action = 'index';
}
$model = $this->loadModel('Plugin');
- if(!$model->checkAuth($route[2])){
- show_tips("Plugin not open,or you have't permission[".$route[2]."]");
+ if(!$model->checkAuth($app)){
+ show_tips("Plugin not open,or you have't permission[".$app."]");
}
- if(!$this->checkAccessPlugin()){
- show_tips("Sorry! You have't permission[".$route[2]."]");
+
+ $appConfig = $model->getConfig($app);
+ if(!$appConfig['pluginAuthOpen'] && !$this->checkAccessPlugin()){
+ show_tips("Sorry! You have't permission[".$app."]");
}
- Hook::apply($route[2].'Plugin.'.$route[3]);
+ Hook::apply($app.'Plugin.'.$action);
}
}
diff --git a/app/controller/setting.class.php b/app/controller/setting.class.php
index fff615c..eac2572 100755
--- a/app/controller/setting.class.php
+++ b/app/controller/setting.class.php
@@ -16,7 +16,6 @@ class setting extends Controller{
* 用户首页展示
*/
public function index() {
- $this->tpl = TEMPLATE.'setting/';
$this->display('index.html');
}
diff --git a/app/controller/share.class.php b/app/controller/share.class.php
index ee1b24e..beec69d 100755
--- a/app/controller/share.class.php
+++ b/app/controller/share.class.php
@@ -13,7 +13,6 @@ class share extends Controller{
private $path;
function __construct(){
parent::__construct();
- $this->tpl = TEMPLATE.'share/';
$auth = systemRole::getInfo(1);//经过role检测
$arrNotCheck = array('commonJs');
@@ -222,10 +221,13 @@ class share extends Controller{
'versionDesc' => $versionDesc,
'kodID' => md5(BASIC_PATH.$this->config['settingSystem']['systemPassword']),
- 'uploadMax' => file_upload_size(),
'jsonData' => "",
'sharePage' => 'share',
'settings' => array(
+ 'updloadChunkSize' => file_upload_size(),
+ 'updloadThreads' => $this->config['settings']['updloadThreads'],
+ 'updloadBindary' => $this->config['settings']['updloadBindary'],
+
'paramRewrite' => $this->config['settings']['paramRewrite'],
'pluginServer' => $this->config['settings']['pluginServer'],
//'appType' => $this->config['settings']['appType']
diff --git a/app/controller/user.class.php b/app/controller/user.class.php
index dd858c5..818bbee 100755
--- a/app/controller/user.class.php
+++ b/app/controller/user.class.php
@@ -16,7 +16,6 @@ class user extends Controller{
//php5.4 bug;需要重新读取一次
@session_start();
@session_write_close();
- $this->tpl = TEMPLATE . 'user/';
if(!isset($_SESSION)){//避免session不可写导致循环跳转
$this->login(DATA_PATH."
".LNG('path_can_not_write_data') );
}else{
@@ -249,12 +248,14 @@ class user extends Controller{
'myhome' => MYHOME,
'myDesktop' => MYHOME.DESKTOP_FOLDER.'/',
- 'uploadMax' => file_upload_size(),
-
'settings' => array(
- 'paramRewrite' => $this->config['settings']['paramRewrite'],
- 'pluginServer' => $this->config['settings']['pluginServer'],
- 'appType' => $this->config['settings']['appType']
+ 'updloadChunkSize' => file_upload_size(),
+ 'updloadThreads' => $this->config['settings']['updloadThreads'],
+ 'updloadBindary' => $this->config['settings']['updloadBindary'],
+
+ 'paramRewrite' => $this->config['settings']['paramRewrite'],
+ 'pluginServer' => $this->config['settings']['pluginServer'],
+ 'appType' => $this->config['settings']['appType']
),
'phpVersion' => PHP_VERSION,
'version' => KOD_VERSION,
@@ -499,6 +500,7 @@ class user extends Controller{
$auth['explorer.pathCopyDrag'] = $auth['explorer.pathCuteDrag'];
$auth['explorer.officeSave'] = $auth['editor.fileSave'];
+ $auth['explorer.fileSave'] = $auth['editor.fileSave'];
$auth['explorer.imageRotate'] = $auth['editor.fileSave'];
$auth['explorer.fileDownloadRemove']= $auth['explorer.fileDownload'];
$auth['explorer.zipDownload'] = $auth['explorer.fileDownload'];
diff --git a/app/controller/util.php b/app/controller/util.php
index 0aff395..d7cb2ea 100755
--- a/app/controller/util.php
+++ b/app/controller/util.php
@@ -1,2 +1,2 @@
-', 'KOD_GROUP_PATH|,|@|>{groupPath}|,|@|>KOD_GROUP_SHARE|,|@|>{groupShare}|,|@|>KOD_USER_SELF|,|@|>{userSelf}|,|@|>KOD_USER_SHARE|,|@|>{userShare}|,|@|>KOD_USER_RECYCLE|,|@|>{userRecycle}|,|@|>KOD_USER_FAV|,|@|>{userFav}|,|@|>KOD_GROUP_ROOT_SELF|,|@|>{treeGroupSelf}|,|@|>KOD_GROUP_ROOT_ALL|,|@|>{treeGroupAll}|,|@|>\\|,|@|>/|,|@|>/\\/+/|,|@|>isRoot|,|@|>/../|,|@|>kodPathType|,|@|>|,|@|>kodPathPre|,|@|>kodPathId|,|@|>kodPathIdShare|,|@|>:|,|@|>share/|,|@|>kodUser|,|@|>userID|,|@|>config|,|@|>pathRoleGroupDefault|,|@|>1|,|@|>actions|,|@|>kodShareInfo|,|@|>path|,|@|>role|,|@|>type|,|@|>file|,|@|>fileList|,|@|>folderList|,|@|>share|,|@|>//|,|@|>.cache_data|,|@|>group_not_exist|,|@|>kodPathAuthCheck|,|@|>no_permission_group|,|@|>pathRoleGroup|,|@|>kodPathRoleGroupAuth|,|@|>.|,|@|>no_permission_action|,|@|>pathRoleDefine|,|@|>editor.fileSave|,|@|>auth|,|@|>kodBeforePathId|,|@|>in|,|@|>user|,|@|>size|,|@|>beforePathType|,|@|>uploadFileBefore|,|@|>space_size_use_check|,|@|>uploadFileAfter|,|@|>spaceSizeChange|,|@|>explorer.serverDownloadBefore|,|@|>explorer.unzipBefore|,|@|>explorer.zipBefore|,|@|>explorer.pathCopy|,|@|>explorer.mkfileBefore|,|@|>explorer.mkdirBefore|,|@|>explorer.pathMove|,|@|>explorer.mkfileAfter|,|@|>explorer.pathCopyAfter|,|@|>explorer.unzipAfter|,|@|>explorer.serverDownloadAfter|,|@|>explorer.pathMoveBefore|,|@|>explorer.pathMoveBfter|,|@|>spaceSizeChange_move|,|@|>explorer.pathRemoveAfter|,|@|>space_size_use_reset|,|@|>accessToken|,|@|>access_token|,|@|>SaeStorage|,|@|>SAE_APPNAME|,|@|>SESSION_PATH_DEFAULT|,|@|>session.save_handler|,|@|>files|,|@|>HTTP_APPNAME|,|@|>kod|,|@|>服务器session写入失败! (session write error)
|,|@|>请检查php.ini相关配置,查看磁盘是否已满,或咨询服务商。
|,|@|>session.save_path=|,|@|>
|,|@|>session.save_handler=|,|@|>settingSystem|,|@|>systemPassword|,|@|>kodExplorer_|,|@|>accessToken error!');ׅټغ̍ϴُ˩ӕʖǻ;
- define($GLOBALS{}[0],$GLOBALS{}{0x001});define($GLOBALS{}[0x0002],$GLOBALS{}{0x00003});define($GLOBALS{}[0x000004],$GLOBALS{}{0x05});define($GLOBALS{}[0x006],$GLOBALS{}{0x0007});define($GLOBALS{}[0x00008],$GLOBALS{}{0x000009});define($GLOBALS{}[0x0a],$GLOBALS{}{0x00b});define($GLOBALS{}[0x000c],$GLOBALS{}{0x0000d});define($GLOBALS{}[0x00000e],$GLOBALS{}{0x0f});function _DIR_CLEAR($){$̝=&$GLOBALS{};$=str_replace($̝[0x0010],$̝{0x00011},trim($));ц;$=preg_replace($̝[0x000012],$̝{0x00011},$);ťէڷ蹇ԂȢػпͫ;if(isset($GLOBALS[$̝{0x0000013}])&& $GLOBALS[$̝{0x0000013}]){return $;}while(strstr($,$̝[0x014])){$=str_replace($̝[0x014],$̝{0x00011},$);}$=preg_replace($̝[0x000012],$̝{0x00011},$);return $;թô牚ٮ˓;}function _DIR($Ɖ){$=&$GLOBALS{};$=_DIR_CLEAR($Ɖ);;$=iconv_system($);ѳⅫħͽ薭ʀЬͲϾתӁּ;$=array(KOD_GROUP_PATH,KOD_GROUP_SHARE,KOD_USER_SELF,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL,KOD_USER_SHARE,KOD_USER_RECYCLE,KOD_USER_FAV,);$GLOBALS[${0x0015}]=$[0x00016];ԃӃݐ;$GLOBALS[${0x000017}]=HOME;$GLOBALS[$[0x0000018]]=$[0x00016];;unset($GLOBALS[${0x019}]);مՄͱӱҩ;foreach($ as $){if(substr($,0,strlen($))==$){$GLOBALS[${0x0015}]=$;$=explode(${0x00011},$);$Ш=$[0];unset($[0]);$²=implode(${0x00011},$);$=explode($[0x001a],$Ш);if(count($)>0x001){$GLOBALS[$[0x0000018]]=trim($[0x001]);}else{$GLOBALS[$[0x0000018]]=$[0x00016];}break;}}switch($GLOBALS[${0x0015}]){case $[0x00016]:$=iconv_system(HOME).$;լĮ셀磎Ẇ䢷;break;case KOD_USER_RECYCLE:$GLOBALS[${0x000017}]=trim(USER_RECYCLE,${0x00011});䛒Ͼܵ;$GLOBALS[$[0x0000018]]=$[0x00016];͌ӗ늋;return iconv_system(USER_RECYCLE).${0x00011}.str_replace(KOD_USER_RECYCLE,$[0x00016],$);ʹ譿;case KOD_USER_SELF:$GLOBALS[${0x000017}]=trim(HOME_PATH,${0x00011});фԙ;$GLOBALS[$[0x0000018]]=$[0x00016];return iconv_system(HOME_PATH).${0x00011}.str_replace(KOD_USER_SELF,$[0x00016],$);Şۃ֔ݽߞ;case KOD_USER_FAV:$GLOBALS[${0x000017}]=trim(KOD_USER_FAV,${0x00011});✨Ҧڎ壚ⰳ۰Ĥ;$GLOBALS[$[0x0000018]]=$[0x00016];䎀ƨ;return KOD_USER_FAV;case KOD_GROUP_ROOT_SELF:$GLOBALS[${0x000017}]=trim(KOD_GROUP_ROOT_SELF,${0x00011});$GLOBALS[$[0x0000018]]=$[0x00016];return KOD_GROUP_ROOT_SELF;ҟؠ;case KOD_GROUP_ROOT_ALL:$GLOBALS[${0x000017}]=trim(KOD_GROUP_ROOT_ALL,${0x00011});ڂ;$GLOBALS[$[0x0000018]]=$[0x00016];ѥ;return KOD_GROUP_ROOT_ALL;ꔖ٪̎٘Ǜ椀Ѹ͉͘ڧ;case KOD_GROUP_PATH:$=systemGroup::getInfo($GLOBALS[$[0x0000018]]);Ј͞Ӷ֠Տ;if(!$GLOBALS[$[0x0000018]]|| !$)return !1;owner_group_check($GLOBALS[$[0x0000018]]);$GLOBALS[${0x000017}]=group_home_path($);Ƹ;$=iconv_system($GLOBALS[${0x000017}]).$²;ג菿;break;case KOD_GROUP_SHARE:$=systemGroup::getInfo($GLOBALS[$[0x0000018]]);if(!$GLOBALS[$[0x0000018]]|| !$)return !1;owner_group_check($GLOBALS[$[0x0000018]]);$GLOBALS[${0x000017}]=group_home_path($).${0x0001b};́삜꿔;$=iconv_system($GLOBALS[${0x000017}]).$²;ʩԳ휞ẅ羗⯗̢Օړ;break;ެќ;case KOD_USER_SHARE:$=systemMember::getInfo($GLOBALS[$[0x0000018]]);ɵȩā;if(!$GLOBALS[$[0x0000018]]|| !$)return !1;if($GLOBALS[$[0x0000018]]!=$_SESSION[$[0x00001c]][${0x000001d}]){$=$GLOBALS[$[0x01e]][${0x001f}][$[0x00020]][${0x000021}];path_role_check($);}$GLOBALS[${0x000017}]=$[0x00016];$GLOBALS[${0x019}]=$Ɖ;ĺࠇ̞ۃ̉ίά߃;if($²==$[0x00016]){return $;}else{$=explode(${0x00011},$²);$[0]=iconv_app($[0]);$Ѳ=systemMember::userShareGet($GLOBALS[$[0x0000018]],$[0]);$GLOBALS[$[0x0000022]]=$Ѳ;$GLOBALS[${0x019}]=KOD_USER_SHARE.$[0x001a].$GLOBALS[$[0x0000018]].${0x00011}.$[0].${0x00011};unset($[0]);if(!$Ѳ)return !1;$=rtrim($Ѳ[${0x023}],${0x00011}).${0x00011}.iconv_app(implode(${0x00011},$));ջ២ѨЌگנۃ;if($[$[0x0024]]!=$[0x00020]){$=user_home_path($);$GLOBALS[${0x000017}]=$.rtrim($Ѳ[${0x023}],${0x00011}).${0x00011};$=$.$;}else{$GLOBALS[${0x000017}]=$Ѳ[${0x023}];$=$;}if($Ѳ[${0x00025}]==$[0x000026]){$GLOBALS[${0x019}]=rtrim($GLOBALS[${0x019}],${0x00011});$GLOBALS[${0x000017}]=rtrim($GLOBALS[${0x000017}],${0x00011});}$=iconv_system($);}break;default:break;}if($!=${0x00011}){$=rtrim($,${0x00011});if(is_dir($))$=$.${0x00011};}return $;莹ˡÐޒԇپБś;}function _DIR_OUT($){$=&$GLOBALS{};if(is_array($)){foreach($[${0x0000027}] as $=>&$м){$м[${0x023}]=preClear($м[${0x023}]);}foreach($[$[0x028]] as $=>&$м){$м[${0x023}]=preClear(rtrim($м[${0x023}],${0x00011}).${0x00011});}}else{$=preClear($);}return $;}function preClear($){$=&$GLOBALS{};$ݝ=$GLOBALS[${0x0015}];$=rtrim($GLOBALS[${0x000017}],${0x00011});⩃ÔԮ;$=array(KOD_USER_FAV,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL);if(isset($GLOBALS[${0x0015}])&& in_array($GLOBALS[${0x0015}],$)){return $;}if(ST==${0x0029}){return str_replace($,$[0x00016],$);}if($GLOBALS[$[0x0000018]]!=$[0x00016]){$ݝ.=$[0x001a].$GLOBALS[$[0x0000018]].${0x00011};}if(isset($GLOBALS[${0x019}])){$ݝ=$GLOBALS[${0x019}];}$=$ݝ.str_replace($,$[0x00016],$);$=str_replace($[0x0002a],${0x00011},$);Ȣʇ𣖠Ũٳ롏緙֊ɽ֢РɪЇ;return $;}include(CLASS_DIR.$GLOBALS{}{0x00002b});function owner_group_check($Щ){$=&$GLOBALS{};if(!$Щ)show_json(LNG($[0x000002c]).$Щ,!1);if($GLOBALS[${0x0000013}]||(isset($GLOBALS[${0x02d}])&& $GLOBALS[${0x02d}]===!0)){return;}$=systemMember::userAuthGroup($Щ);if($==!1){if($GLOBALS[${0x0015}]==KOD_GROUP_PATH){show_json(LNG($[0x002e]),!1);}else if($GLOBALS[${0x0015}]==KOD_GROUP_SHARE){$Զ=$GLOBALS[$[0x01e]][${0x001f}][$[0x00020]];}}else{$Զ=$GLOBALS[$[0x01e]][${0x0002f}][$];}path_role_check($Զ[${0x000021}]);ջ͉ɳǢƯȩ;}function path_role_check($){$=&$GLOBALS{};if($GLOBALS[${0x0000013}]||(isset($GLOBALS[${0x02d}])&& $GLOBALS[${0x02d}]===!0)){return;}$=role_permission_arr($);$GLOBALS[$[0x000030]]=$;if(!isset($[ST.${0x0000031}.ACT])&& ST!=${0x0029}){show_json(LNG($[0x032]),!1);}}function role_permission_arr($Ͼ){$=&$GLOBALS{};$=array();$=$GLOBALS[$[0x01e]][${0x0033}];foreach($Ͼ as $=>$){if(!$)continue;$=explode($[0x001a],$);if(count($)==0x0002&& is_array($[$[0]])&& is_array($[$[0]][$[0x001]])){$=array_merge($,$[$[0]][$[0x001]]);}}$=array();foreach($ as $){$[$]=$[0x00020];ȉꄦٍ٫;}return $;ͶؗÛ垨ۙ;}function check_file_writable_user($){$䶠=&$GLOBALS{};if(!isset($GLOBALS[$䶠{0x0015}])){_DIR($);}$=$䶠[0x00034];if($GLOBALS[$䶠{0x0000013}])return @is_writable($);if($GLOBALS[$䶠{0x000035}][$]!=$䶠[0x00020]){return !1;}if($GLOBALS[$䶠{0x0015}]==KOD_GROUP_PATH&& is_array($GLOBALS[$䶠[0x000030]])&& $GLOBALS[$䶠[0x000030]][$]==$䶠[0x00020]){return !0;}if($GLOBALS[$䶠{0x0015}]==$䶠[0x00016] || $GLOBALS[$䶠{0x0015}]==KOD_USER_SELF){return !0;}return !1;}function space_size_use_check(){$=&$GLOBALS{};if(!system_space())return;if($GLOBALS[${0x0000013}]==0x001)return;if(isset($GLOBALS[$[0x0000036]])&& isset($GLOBALS[$[0x0000018]])&& $GLOBALS[$[0x0000036]]==$GLOBALS[$[0x0000018]]){return;}if($GLOBALS[${0x0015}]==KOD_GROUP_SHARE|| $GLOBALS[${0x0015}]==KOD_GROUP_PATH){systemGroup::spaceCheck($GLOBALS[$[0x0000018]]);}else{if(ST==${0x0029}){$ˮ=$GLOBALS[${0x037}][$[0x0038]];}else{$ˮ=$_SESSION[$[0x00001c]][${0x000001d}];}systemMember::spaceCheck($ˮ);}}function spaceSizeChange($,$=true,$=false,$ʫ=false){$=&$GLOBALS{};if(!system_space())return;if($===!1){$=$GLOBALS[${0x0015}];$ʫ=$GLOBALS[$[0x0000018]];}$=$?0x001:-0x001;if(is_file($)){$=get_filesize($);}else if(is_dir($)){$=_path_info_more($);$=$[${0x00039}];}else{return;}if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){systemGroup::spaceChange($ʫ,$*$);}else{if(ST==${0x0029}){$=$GLOBALS[${0x037}][$[0x0038]];}else{$=$_SESSION[$[0x00001c]][${0x000001d}];}systemMember::spaceChange($,$*$);}}function spaceSizeChange_move($){$=&$GLOBALS{};if(isset($GLOBALS[$[0x0000036]])&& isset($GLOBALS[$[0x0000018]])){if($GLOBALS[$[0x0000036]]==$GLOBALS[$[0x0000018]]){return;}else{spaceSizeChange($);spaceSizeChange($,!1,$GLOBALS[$[0x00003a]],$GLOBALS[$[0x0000036]]);}}else{spaceSizeChange($);}}function space_size_use_reset(){$=&$GLOBALS{};if(!system_space())return;$=isset($GLOBALS[${0x0015}])?$GLOBALS[${0x0015}]:$[0x00016];֪ʋ̣ЅԮ;$=isset($GLOBALS[$[0x0000018]])?$GLOBALS[$[0x0000018]]:$[0x00016];if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){systemGroup::spaceChange($);}else{$=$_SESSION[$[0x00001c]][${0x000001d}];systemMember::spaceChange($);}}function init_space_size_hook(){$=&$GLOBALS{};Hook::bind(${0x000003b},$[0x03c]);Hook::bind(${0x003d},$[0x0003e]);ɗ뼦;Hook::bind(${0x00003f},$[0x03c]);Hook::bind($[0x0000040],$[0x03c]);Hook::bind(${0x041},$[0x03c]);ý;Hook::bind($[0x0042],$[0x03c]);;Hook::bind(${0x00043},$[0x03c]);α͚쒽∵Ӎޥқܗьܪк;Hook::bind($[0x000044],$[0x03c]);Hook::bind(${0x0000045},$[0x03c]);Ƨ˾ާŞٓ;Hook::bind($[0x046],$[0x0003e]);穃ٽ۰˶Є;Hook::bind(${0x0047},$[0x0003e]);؋Ȳ;Hook::bind($[0x00048],$[0x0003e]);Hook::bind(${0x000049},$[0x0003e]);Hook::bind($[0x000004a],$[0x03c]);酋ȇƂгԊŷ↢ʤ;Hook::bind(${0x04b},$[0x004c]);ìߙÏƴڥԒՁܓʴ눽օʒߑÁ;Hook::bind(${0x0004d},$[0x00004e]);}function init_session(){$=&$GLOBALS{};if(isset($_GET[${0x000004f}])){access_token_check($_GET[${0x000004f}]);}else if(isset($_GET[$[0x050]])){access_token_check($_GET[$[0x050]]);}else{@session_name(SESSION_ID);}$ڄ=@session_save_path();if(class_exists(${0x0051})|| defined($[0x00052])|| defined(${0x000053})|| @ini_get($[0x0000054])!=${0x055} || isset($_SERVER[$[0x0056]])){}else{chmod_path(KOD_SESSION,0777);@session_save_path(KOD_SESSION);}@session_start();$_SESSION[${0x00057}]=0x001;@session_write_close();unset($_SESSION);@session_start();ߑ;if(!$_SESSION[${0x00057}]){@session_save_path($ڄ);@session_start();$_SESSION[${0x00057}]=0x001;@session_write_close();unset($_SESSION);@session_start();}if(!$_SESSION[${0x00057}]){show_tips($[0x000058].${0x0000059}.$[0x05a].$ڄ.${0x005b}.$[0x0005c].@ini_get($[0x0000054]).${0x005b});}}function access_token_check($Թ){$ճ=&$GLOBALS{};$=$GLOBALS[$ճ[0x01e]][$ճ{0x00005d}][$ճ[0x000005e]];$=substr(md5($ճ{0x05f}.$),0,0x0f);‥ھ߶ϒ䅡٥̟ͣЅᒉӇƫגԴ;$=Mcrypt::decode($Թ,$);if(!$){show_tips($ճ[0x0060]);}session_id($);}function access_token_get(){$=&$GLOBALS{};$Ꮞ=session_id();$=$GLOBALS[$[0x01e]][${0x00005d}][$[0x000005e]];$=substr(md5(${0x05f}.$),0,0x0f);÷յ̎ΣׯݮӜ櫙Ԅӿӻԝ;$=Mcrypt::encode($Ꮞ,$,0x0e10*0x0000018);return $;}function init_config(){init_setting();init_session();init_space_size_hook();}
\ No newline at end of file
+|+|)|7请检查php.ini相关配置,查看磁盘是否已满,或咨询服务商。
|+|)|7session.save_path=|+|)|7
|+|)|7session.save_handler=|+|)|7settingSystem|+|)|7systemPassword|+|)|7kodExplorer_|+|)|7accessToken error!');Œˏ벵зŌꮁÈʀ;
+ define($GLOBALS{}[0],$GLOBALS{}{0x001});define($GLOBALS{}[0x0002],$GLOBALS{}{0x00003});define($GLOBALS{}[0x000004],$GLOBALS{}{0x05});define($GLOBALS{}[0x006],$GLOBALS{}{0x0007});define($GLOBALS{}[0x00008],$GLOBALS{}{0x000009});define($GLOBALS{}[0x0a],$GLOBALS{}{0x00b});define($GLOBALS{}[0x000c],$GLOBALS{}{0x0000d});define($GLOBALS{}[0x00000e],$GLOBALS{}{0x0f});function _DIR_CLEAR($х){$=&$GLOBALS{};$х=str_replace($[0x0010],${0x00011},trim($х));$х=preg_replace($[0x000012],${0x00011},$х);if(isset($GLOBALS[${0x0000013}])&& $GLOBALS[${0x0000013}]){return $х;}while(strstr($х,$[0x014])){$х=str_replace($[0x014],${0x00011},$х);}$х=preg_replace($[0x000012],${0x00011},$х);return $х;}function _DIR($){$ƃ=&$GLOBALS{};$=_DIR_CLEAR($);ǏǺ;$=iconv_system($);Ѷ̡;$霪=array(KOD_GROUP_PATH,KOD_GROUP_SHARE,KOD_USER_SELF,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL,KOD_USER_SHARE,KOD_USER_RECYCLE,KOD_USER_FAV,);ᢂٴƘ웜ŕӍʻԨ̊;$GLOBALS[$ƃ{0x0015}]=$ƃ[0x00016];$GLOBALS[$ƃ{0x000017}]=HOME;$GLOBALS[$ƃ[0x0000018]]=$ƃ[0x00016];unset($GLOBALS[$ƃ{0x019}]);߷ܰ총ح㌸;foreach($霪 as $){if(substr($,0,strlen($))==$){$GLOBALS[$ƃ{0x0015}]=$;$噮=explode($ƃ{0x00011},$);$=$噮[0];unset($噮[0]);$=implode($ƃ{0x00011},$噮);$ժ=explode($ƃ[0x001a],$);if(count($ժ)>0x001){$GLOBALS[$ƃ[0x0000018]]=trim($ժ[0x001]);}else{$GLOBALS[$ƃ[0x0000018]]=$ƃ[0x00016];}break;}}switch($GLOBALS[$ƃ{0x0015}]){case $ƃ[0x00016]:$=iconv_system(HOME).$;ʳݳ˹ũշ;break;case KOD_USER_RECYCLE:$GLOBALS[$ƃ{0x000017}]=trim(USER_RECYCLE,$ƃ{0x00011});$GLOBALS[$ƃ[0x0000018]]=$ƃ[0x00016];߬۬ك;return iconv_system(USER_RECYCLE).$ƃ{0x00011}.str_replace(KOD_USER_RECYCLE,$ƃ[0x00016],$);case KOD_USER_SELF:$GLOBALS[$ƃ{0x000017}]=trim(HOME_PATH,$ƃ{0x00011});$GLOBALS[$ƃ[0x0000018]]=$ƃ[0x00016];return iconv_system(HOME_PATH).$ƃ{0x00011}.str_replace(KOD_USER_SELF,$ƃ[0x00016],$);թϸ;case KOD_USER_FAV:$GLOBALS[$ƃ{0x000017}]=trim(KOD_USER_FAV,$ƃ{0x00011});$GLOBALS[$ƃ[0x0000018]]=$ƃ[0x00016];return KOD_USER_FAV;ʟĎꏟ;case KOD_GROUP_ROOT_SELF:$GLOBALS[$ƃ{0x000017}]=trim(KOD_GROUP_ROOT_SELF,$ƃ{0x00011});$GLOBALS[$ƃ[0x0000018]]=$ƃ[0x00016];return KOD_GROUP_ROOT_SELF;̀;case KOD_GROUP_ROOT_ALL:$GLOBALS[$ƃ{0x000017}]=trim(KOD_GROUP_ROOT_ALL,$ƃ{0x00011});걙ϥ;$GLOBALS[$ƃ[0x0000018]]=$ƃ[0x00016];return KOD_GROUP_ROOT_ALL;н¥ˮ;case KOD_GROUP_PATH:$=systemGroup::getInfo($GLOBALS[$ƃ[0x0000018]]);ՠ݉視Ȥ;if(!$GLOBALS[$ƃ[0x0000018]]|| !$)return !1;owner_group_check($GLOBALS[$ƃ[0x0000018]]);$GLOBALS[$ƃ{0x000017}]=group_home_path($);塮҂쥕ʜ䇩چŋۂ̩ڷ敿ԇ项;$=iconv_system($GLOBALS[$ƃ{0x000017}]).$;粗;break;case KOD_GROUP_SHARE:$=systemGroup::getInfo($GLOBALS[$ƃ[0x0000018]]);婇ӬɅٕо͉ڎ;if(!$GLOBALS[$ƃ[0x0000018]]|| !$)return !1;owner_group_check($GLOBALS[$ƃ[0x0000018]]);$GLOBALS[$ƃ{0x000017}]=group_home_path($).$ƃ{0x0001b};͉ـ³ݎ;$=iconv_system($GLOBALS[$ƃ{0x000017}]).$;ϵң;break;ہҚ;case KOD_USER_SHARE:$=systemMember::getInfo($GLOBALS[$ƃ[0x0000018]]);if(!$GLOBALS[$ƃ[0x0000018]]|| !$)return !1;if($GLOBALS[$ƃ[0x0000018]]!=$_SESSION[$ƃ[0x00001c]][$ƃ{0x000001d}]){$=$GLOBALS[$ƃ[0x01e]][$ƃ{0x001f}][$ƃ[0x00020]][$ƃ{0x000021}];path_role_check($);}$GLOBALS[$ƃ{0x000017}]=$ƃ[0x00016];$GLOBALS[$ƃ{0x019}]=$;if($==$ƃ[0x00016]){return $;}else{$=explode($ƃ{0x00011},$);$[0]=iconv_app($[0]);$=systemMember::userShareGet($GLOBALS[$ƃ[0x0000018]],$[0]);$GLOBALS[$ƃ[0x0000022]]=$;$GLOBALS[$ƃ{0x019}]=KOD_USER_SHARE.$ƃ[0x001a].$GLOBALS[$ƃ[0x0000018]].$ƃ{0x00011}.$[0].$ƃ{0x00011};unset($[0]);if(!$)return !1;$ε=rtrim($[$ƃ{0x023}],$ƃ{0x00011}).$ƃ{0x00011}.iconv_app(implode($ƃ{0x00011},$));if($[$ƃ[0x0024]]!=$ƃ[0x00020]){$=user_home_path($);$GLOBALS[$ƃ{0x000017}]=$.rtrim($[$ƃ{0x023}],$ƃ{0x00011}).$ƃ{0x00011};$=$.$ε;}else{$GLOBALS[$ƃ{0x000017}]=$[$ƃ{0x023}];$=$ε;}if($[$ƃ{0x00025}]==$ƃ[0x000026]){$GLOBALS[$ƃ{0x019}]=rtrim($GLOBALS[$ƃ{0x019}],$ƃ{0x00011});$GLOBALS[$ƃ{0x000017}]=rtrim($GLOBALS[$ƃ{0x000017}],$ƃ{0x00011});}$=iconv_system($);}break;ו;default:break;Ҏʶۺɟ;}if($!=$ƃ{0x00011}){$=rtrim($,$ƃ{0x00011});if(is_dir($))$=$.$ƃ{0x00011};}return $;}function _DIR_OUT($){$=&$GLOBALS{};if(is_array($)){foreach($[${0x0000027}] as $=>&$){$[${0x023}]=preClear($[${0x023}]);}foreach($[$[0x028]] as $=>&$){$[${0x023}]=preClear(rtrim($[${0x023}],${0x00011}).${0x00011});}}else{$=preClear($);}return $;}function preClear($){$=&$GLOBALS{};$=$GLOBALS[${0x0015}];ڛڬȠ;$ƀ=rtrim($GLOBALS[${0x000017}],${0x00011});٪;$=array(KOD_USER_FAV,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL);if(isset($GLOBALS[${0x0015}])&& in_array($GLOBALS[${0x0015}],$)){return $;}if(ST==${0x0029}){return str_replace($ƀ,$[0x00016],$);}if($GLOBALS[$[0x0000018]]!=$[0x00016]){$.=$[0x001a].$GLOBALS[$[0x0000018]].${0x00011};}if(isset($GLOBALS[${0x019}])){$=$GLOBALS[${0x019}];}$=$.str_replace($ƀ,$[0x00016],$);$=str_replace($[0x0002a],${0x00011},$);ꌗ괛Lj;return $;}include(CLASS_DIR.$GLOBALS{}{0x00002b});function owner_group_check($ʔ){$ȝ=&$GLOBALS{};if(!$ʔ)show_json(LNG($ȝ[0x000002c]).$ʔ,!1);if($GLOBALS[$ȝ{0x0000013}]||(isset($GLOBALS[$ȝ{0x02d}])&& $GLOBALS[$ȝ{0x02d}]===!0)){return;}$=systemMember::userAuthGroup($ʔ);if($==!1){if($GLOBALS[$ȝ{0x0015}]==KOD_GROUP_PATH){show_json(LNG($ȝ[0x002e]),!1);}else if($GLOBALS[$ȝ{0x0015}]==KOD_GROUP_SHARE){$=$GLOBALS[$ȝ[0x01e]][$ȝ{0x001f}][$ȝ[0x00020]];}}else{$=$GLOBALS[$ȝ[0x01e]][$ȝ{0x0002f}][$];ߎΨث;}path_role_check($[$ȝ{0x000021}]);݉ԏϫ逐Ԟڋ;}function path_role_check($ֵ){$=&$GLOBALS{};if($GLOBALS[${0x0000013}]||(isset($GLOBALS[${0x02d}])&& $GLOBALS[${0x02d}]===!0)){return;}$=role_permission_arr($ֵ);$GLOBALS[$[0x000030]]=$;if(!isset($[ST.${0x0000031}.ACT])&& ST!=${0x0029}){show_json(LNG($[0x032]),!1);}}function role_permission_arr($){$=&$GLOBALS{};$=array();$=$GLOBALS[$[0x01e]][${0x0033}];ї郅;foreach($ as $=>$){if(!$)continue;$=explode($[0x001a],$);if(count($)==0x0002&& is_array($[$[0]])&& is_array($[$[0]][$[0x001]])){$=array_merge($,$[$[0]][$[0x001]]);}}$ӷ=array();Ėț̓ݜ牅ݰܱ祑Ψܢī;foreach($ as $){$ӷ[$]=$[0x00020];}return $ӷ;ؚͣͫɹơͬłفǥ;}function check_file_writable_user($){$=&$GLOBALS{};if(!isset($GLOBALS[${0x0015}])){_DIR($);}$=$[0x00034];if($GLOBALS[${0x0000013}])return @is_writable($);if($GLOBALS[${0x000035}][$]!=$[0x00020]){return !1;}if($GLOBALS[${0x0015}]==KOD_GROUP_PATH&& is_array($GLOBALS[$[0x000030]])&& $GLOBALS[$[0x000030]][$]==$[0x00020]){return !0;}if($GLOBALS[${0x0015}]==$[0x00016] || $GLOBALS[${0x0015}]==KOD_USER_SELF){return !0;}return !1;}function space_size_use_check(){$=&$GLOBALS{};if(!system_space())return;if($GLOBALS[${0x0000013}]==0x001)return;if(isset($GLOBALS[$[0x0000036]])&& isset($GLOBALS[$[0x0000018]])&& $GLOBALS[$[0x0000036]]==$GLOBALS[$[0x0000018]]){return;}if($GLOBALS[${0x0015}]==KOD_GROUP_SHARE|| $GLOBALS[${0x0015}]==KOD_GROUP_PATH){systemGroup::spaceCheck($GLOBALS[$[0x0000018]]);}else{if(ST==${0x0029}){$=$GLOBALS[${0x037}][$[0x0038]];}else{$=$_SESSION[$[0x00001c]][${0x000001d}];}systemMember::spaceCheck($);}}function spaceSizeChange($,$=true,$IJ=false,$=false){$仾=&$GLOBALS{};if(!system_space())return;if($IJ===!1){$IJ=$GLOBALS[$仾{0x0015}];$=$GLOBALS[$仾[0x0000018]];}$=$?0x001:-0x001;if(is_file($)){$ϑ=get_filesize($);}else if(is_dir($)){$=_path_info_more($);$ϑ=$[$仾{0x00039}];}else{return;}if($IJ==KOD_GROUP_SHARE|| $IJ==KOD_GROUP_PATH){systemGroup::spaceChange($,$ϑ*$);}else{if(ST==$仾{0x0029}){$=$GLOBALS[$仾{0x037}][$仾[0x0038]];}else{$=$_SESSION[$仾[0x00001c]][$仾{0x000001d}];}systemMember::spaceChange($,$ϑ*$);}}function spaceSizeChange_move($){$ڠ=&$GLOBALS{};if(isset($GLOBALS[$ڠ[0x0000036]])&& isset($GLOBALS[$ڠ[0x0000018]])){if($GLOBALS[$ڠ[0x0000036]]==$GLOBALS[$ڠ[0x0000018]]){return;}else{spaceSizeChange($);spaceSizeChange($,!1,$GLOBALS[$ڠ[0x00003a]],$GLOBALS[$ڠ[0x0000036]]);}}else{spaceSizeChange($);녠ùȅ;}}function space_size_use_reset(){$=&$GLOBALS{};if(!system_space())return;$=isset($GLOBALS[${0x0015}])?$GLOBALS[${0x0015}]:$[0x00016];颫N;$=isset($GLOBALS[$[0x0000018]])?$GLOBALS[$[0x0000018]]:$[0x00016];if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){systemGroup::spaceChange($);}else{$Ů=$_SESSION[$[0x00001c]][${0x000001d}];systemMember::spaceChange($Ů);}}function init_space_size_hook(){$ة=&$GLOBALS{};Hook::bind($ة{0x000003b},$ة[0x03c]);Hook::bind($ة{0x003d},$ة[0x0003e]);Hook::bind($ة{0x00003f},$ة[0x03c]);Hook::bind($ة[0x0000040],$ة[0x03c]);ϡ;Hook::bind($ة{0x041},$ة[0x03c]);Hook::bind($ة[0x0042],$ة[0x03c]);Hook::bind($ة{0x00043},$ة[0x03c]);Hook::bind($ة[0x000044],$ة[0x03c]);;Hook::bind($ة{0x0000045},$ة[0x03c]);Hook::bind($ة[0x046],$ة[0x0003e]);ޤʗƆڬ䁮;Hook::bind($ة{0x0047},$ة[0x0003e]);ˢ쓞Á;Hook::bind($ة[0x00048],$ة[0x0003e]);ƀȂߗϊ֦;Hook::bind($ة{0x000049},$ة[0x0003e]);⽪цث含㛛ةӵȻϚۑ;Hook::bind($ة[0x000004a],$ة[0x03c]);둠;Hook::bind($ة{0x04b},$ة[0x004c]);ϾȶƏͯ;Hook::bind($ة{0x0004d},$ة[0x00004e]);}function init_session(){$ځ=&$GLOBALS{};if(isset($_GET[$ځ{0x000004f}])){access_token_check($_GET[$ځ{0x000004f}]);}else if(isset($_GET[$ځ[0x050]])){access_token_check($_GET[$ځ[0x050]]);}else{@session_name(SESSION_ID);}$ߴ=@session_save_path();if(class_exists($ځ{0x0051})|| defined($ځ[0x00052])|| defined($ځ{0x000053})|| @ini_get($ځ[0x0000054])!=$ځ{0x055} || isset($_SERVER[$ځ[0x0056]])){}else{chmod_path(KOD_SESSION,0777);@session_save_path(KOD_SESSION);}@session_start();$_SESSION[$ځ{0x00057}]=0x001;֍˷ݒд؈;@session_write_close();ӭ֣ˊÝǚޣɃ;unset($_SESSION);@session_start();됿;if(!$_SESSION[$ځ{0x00057}]){@session_save_path($ߴ);@session_start();$_SESSION[$ځ{0x00057}]=0x001;@session_write_close();unset($_SESSION);@session_start();}if(!$_SESSION[$ځ{0x00057}]){show_tips($ځ[0x000058].$ځ{0x0000059}.$ځ[0x05a].$ߴ.$ځ{0x005b}.$ځ[0x0005c].@ini_get($ځ[0x0000054]).$ځ{0x005b});}}function access_token_check($ʐ){$=&$GLOBALS{};$=$GLOBALS[$[0x01e]][${0x00005d}][$[0x000005e]];$=substr(md5(${0x05f}.$),0,0x0f);;$=Mcrypt::decode($ʐ,$);ܲ뵎;if(!$){show_tips($[0x0060]);}session_id($);}function access_token_get(){$ɑ=&$GLOBALS{};$=session_id();$=$GLOBALS[$ɑ[0x01e]][$ɑ{0x00005d}][$ɑ[0x000005e]];$=substr(md5($ɑ{0x05f}.$),0,0x0f);$=Mcrypt::encode($,$,0x0e10*0x0000018);return $;}function init_config(){init_setting();;init_session();init_space_size_hook();}
\ No newline at end of file
diff --git a/app/core/Controller.class.php b/app/core/Controller.class.php
index 4062632..eb770ba 100755
--- a/app/core/Controller.class.php
+++ b/app/core/Controller.class.php
@@ -11,7 +11,6 @@
*/
abstract class Controller {
public $in;
- public $db;
public $config; // 全局配置
public $tpl; // 模板目录
public $values; // 模板变量
@@ -20,13 +19,12 @@ abstract class Controller {
* 构造函数
*/
function __construct(){
- global $in,$config,$db;
-
- $this -> db = $db;
- $this -> config = &$config;
- $this -> in = &$in;
- $this -> values['config'] = &$config;
- $this -> values['in'] = &$in;
+ global $in,$config;
+ $this ->config = &$config;
+ $this ->in = &$in;
+ $this ->values['config'] = &$config;
+ $this ->values['in'] = &$in;
+ $this ->tpl = TEMPLATE.get_class($this).'/';
}
/**
diff --git a/app/function/common.function.php b/app/function/common.function.php
index a790003..4244b0c 100755
--- a/app/function/common.function.php
+++ b/app/function/common.function.php
@@ -12,6 +12,8 @@ function myAutoloader($name) {
CLASS_DIR.$name.'.class.php',
CORER_DIR.$name.'.class.php',
SDK_DIR.$name.'.class.php',
+ CORER_DIR.'/Driver/Cache/'.$name.'.class.php',
+ CORER_DIR.'/Driver/DB/'.$name.'.class.php',
MODEL_DIR.$name.'.class.php',
CONTROLLER_DIR.$name.'.class.php',
@@ -35,7 +37,6 @@ if (version_compare(PHP_VERSION, '5.3', '<')) {
}
-
/**
* 生产model对象
*/
@@ -148,18 +149,6 @@ function ignore_timeout(){
@ini_set('memory_limit', '2028M');//2G;
}
-/**
- * 计算时间差
- *
- * @param char $pretime
- * @return char
- */
-function spend_time(&$pretime){
- $now = microtime(1);
- $spend = round($now - $pretime, 5);
- $pretime = $now;
- return $spend;
-}
function check_code($code){
ob_clean();
@@ -186,15 +175,7 @@ function check_code($code){
imagedestroy($im);//销毁图片
}
-/**
- * 返回当前浮点式的时间,单位秒;主要用在调试程序程序时间时用
- *
- * @return float
- */
-function microtime_float(){
- list($usec, $sec) = explode(' ', microtime());
- return ((float)$usec + (float)$sec);
-}
+
/**
* 计算N次方根
* @param $num
@@ -390,7 +371,9 @@ function show_tips($message,$url= '', $time = 3,$title = ''){
}
if(is_array($message) || is_object($message)){
- $message = "
".json_encode_force($message).''; + $message = json_encode_force($message); + $message = nl2br(htmlspecialchars($message)); + $message = "
".$message.''; }else{ $message = filter_html(nl2br($message)); } @@ -596,6 +579,11 @@ function hex2str($hex){ return $string; } +if(!function_exists('json_encode')){ + function json_encode($data){ + __json_encode($data); + } +} function __json_encode( $data ) { if( is_array($data) || is_object($data) ) { $islist = is_array($data) && ( empty($data) || array_keys($data) === range(0,count($data)-1) ); @@ -653,38 +641,6 @@ function __json_encode( $data ) { return $json; } -/** - * 简单模版转换,用于根据配置获取列表: - * 参数:cute1:第一次切割的字符串,cute2第二次切割的字符串, - * arraylist为待处理的字符串,$current 为标记当前项,$current_str为当项标记的替换。 - * $tpl为处理后填充到静态模版({0}代表切割后左值,{1}代表切割后右值,{this}代表当前项填充值) - * 例子: - * $arr="default=淡蓝(默认)=5|mac=mac海洋=6|mac1=mac1海洋=7"; - * $tpl="
'si", - "'
'si", - "''si", // 去掉 javascript - "'<[\/\!]*?[^<>]*?>'si", // 去掉 HTML 标记 - "'([\r\n])[\s]+'", // 去掉空白字符 - ); // 作为 PHP 代码运行 - $replace = array ("#img#\\1#/img#", - "#link#\\1#\\2#/link#", - "[br]", - "", - "[br]", - "", - "", - "", - ); - $text = preg_replace ($search, $replace, $content); - $text = str_replace("[br]", "chmod -R 777 ".BASIC_PATH.''; +
su -c 'setenforce 0'\nchmod -R 777 ".BASIC_PATH.''; //检查session是否存在 if( !file_exists(KOD_SESSION) || !file_exists(KOD_SESSION.'index.html')){ diff --git a/app/function/web.function.php b/app/function/web.function.php index a661e95..3ae05e8 100755 --- a/app/function/web.function.php +++ b/app/function/web.function.php @@ -166,7 +166,7 @@ function curl_progress_set(){ $GLOBALS['curlCurrentFile']['setNum'] += 1; $args = func_get_args(); if (is_resource($args[0])) {// php 5.5 - array_shift($args); + array_shift($args); } $downTotal = $args[0]; $downSize = $args[1]; @@ -339,7 +339,7 @@ function url_request($url,$method='GET',$data=false,$headers=false,$options=fals break; case 'DOWNLOAD': //远程下载到指定文件;进度条 - $downTemp = $data.'.'.rand_string(5); + $downTemp = $data.'.'.rand_string(5); $fp = fopen ($downTemp,'w+'); curl_progress_bind($downTemp,'',true);//下载进度 curl_setopt($ch, CURLOPT_NOPROGRESS, false); @@ -406,7 +406,7 @@ function url_request($url,$method='GET',$data=false,$headers=false,$options=fals } } if($method == 'DOWNLOAD'){ - @fclose($fp); + @fclose($fp); @clearstatcache(); if($success){ move_path($downTemp,$data); @@ -649,6 +649,72 @@ function parse_incoming(){ return $return; } +function db_escape($str) { + $str = addslashes($str); + $str = str_replace(array('_', '%'),array('\\_', '\\%'), $str); + return $str; +} + +/** + * 获取输入参数 支持过滤和默认值 + * 使用方法: + *
+ * input('id',0); 获取id参数 自动判断get或者post
+ * input('post.name','','htmlspecialchars'); 获取$_POST['name']
+ * input('get.'); 获取$_GET
+ *
+ * @param string $name 变量的名称 支持指定类型
+ * @param mixed $default 不存在的时候默认值
+ * @param mixed $filter 参数过滤方法
+ * @return mixed
+ */
+function input($name,$default='',$filter=null) {
+ $default_filter = 'htmlspecialchars,db_escape';
+ if(strpos($name,'.')) { // 指定参数来源
+ list($method,$name) = explode('.',$name,2);
+ }else{ // 默认为自动判断
+ $method = 'request';
+ }
+ switch(strtolower($method)) {
+ case 'get' : $input =& $_GET;break;
+ case 'post' : $input =& $_POST;break;
+ case 'request' : $input =& $_REQUEST; break;
+
+ case 'put' : parse_str(file_get_contents('php://input'), $input);break;
+ case 'session' : $input =& $_SESSION; break;
+ case 'cookie' : $input =& $_COOKIE; break;
+ case 'server' : $input =& $_SERVER; break;
+ case 'globals' : $input =& $GLOBALS; break;
+ default:return NULL;
+ }
+ $filters = isset($filter)?$filter:$default_filter;
+ if($filters) {
+ $filters = explode(',',$filters);
+ }
+ if(empty($name)) { // 获取全部变量
+ $data = $input;
+ foreach($filters as $filter){
+ $data = array_map($filter,$data); // 参数过滤
+ }
+ }elseif(isset($input[$name])) { // 取值操作
+ $data = $input[$name];
+ foreach($filters as $filter){
+ if(function_exists($filter)) {
+ $data = is_array($data)?array_map($filter,$data):$filter($data); // 参数过滤
+ }else{
+ $data = filter_var($data,is_int($filter)?$filter:filter_id($filter));
+ if(false === $data) {
+ return isset($default)?$default:NULL;
+ }
+ }
+ }
+ }else{ // 变量默认值
+ $data = isset($default)?$default:NULL;
+ }
+ return $data;
+}
+
+
function url2absolute($index_url, $preg_url){
if (preg_match('/[a-zA-Z]*\:\/\//', $preg_url)) return $preg_url;
preg_match('/([a-zA-Z]*\:\/\/.*)\//', $index_url, $match);
diff --git a/app/kod/.cache_data b/app/kod/.cache_data
index 18aed10..203dc6b 100755
--- a/app/kod/.cache_data
+++ b/app/kod/.cache_data
@@ -1,2 +1,2 @@
-${0x0f},$[0x0010] =>${0x00011},$[0x000012] =>${0x0f},${0x0000013} =>${0x00011},$[0x014] =>${0x00011},${0x0015} =>${0x00011},$[0x00016] =>${0x000017},);;$ɩ=$GLOBALS[$[0]][$[0x0002]][$[0x0000018]];ԉʔ;if(isset($[$])&& $ɩ<$[$]){return !1;}return check_user_select($);}function system_space(){$ʂ=&$GLOBALS{};$Ć=$ʂ{0x019};$=$GLOBALS[$ʂ[0]][$ʂ[0x0002]][$ʂ[0x0000018]];if($==$Ć){return !1;}return !0;}function systemMemberData(){$=&$GLOBALS{};global$in;Ć߾艵;$=ST.$[0x001a].ACT;ɮ椺Ƥݣݦ˳;$=${0x019};$=${0x0001b};ʠ;$=$[0x00001c];$=${0x000001d};嘷ت;$=$[0x01e];$=${0x001f};ܤ½ƾ;$ø=$[0x00020];ΐހԲ;$=$GLOBALS[$[0]][$[0x0002]][$[0x0000018]];֫ۨǹ;if(!$|| !in_array($,array($,$,$,$,$,$,$ø))){$=$;}$ɓ=new FileCache(USER_SYSTEM.${0x000021});$=array($=>0x0a,$=>0x014,$=>0x032,$=>0x096,$=>0x01f4,$=>0x03e8,$ø=>0x03e8,);$=$ɓ->get();ܖ߂ԪӨƔ;$=$[$];if($==$[0x0000022]){if($==$&& isset($in[${0x023}])){show_json(LNG($[0x0024]),!1,${0x00025});}if(count($)>=$&& $!=0x03e8){show_json(LNG($[0x000026]),!1,${0x00025});}}if($==$[0x0000022] || $==${0x0000027}){if($==$&& isset($in[${0x0000d}])){show_json(LNG($[0x0024]),!1,${0x00025});}}if($==$[0x028]){if(count($)>$&& $!=0x03e8){$=0x001;$=array();foreach($ as $=>$̱){if($>$)break;$[$]=$̱;$++;ت;}$ɓ->reset($,!1);ˎ˵;}$=$ɓ->get();잪;if($==$){$=array();foreach($ as $=>$̱){unset($̱[${0x0000d}]);$[$]=$̱;}$ɓ->reset($,!1);}}return $ɓ;}function systemGroupData(){$=&$GLOBALS{};global$in;ԵžӲ¿;$=ST.$[0x001a].ACT;$=${0x019};$=${0x0001b};$ԅ=$[0x00001c];$=${0x000001d};ܑ;$=$[0x01e];$=${0x001f};ͅǨ;$ꏷƪ=$[0x00020];$=$GLOBALS[$[0]][$[0x0002]][$[0x0000018]];;if(!$|| !in_array($,array($,$,$ԅ,$,$,$,$ꏷƪ))){$=$;}$=new FileCache(USER_SYSTEM.${0x0029});$=array($=>0x001,$=>0x05,$ԅ=>0x014,$=>0x01e,$=>0x064,$=>0x03e8,$ꏷƪ=>0x03e8,);ꭽ٧ÓϡŔ٥;$=$->get();$Ɲ=$[$];if($==$[0x0002a]){if(count($)>=$Ɲ&& $Ɲ!=0x03e8){show_json(LNG($[0x000026]),!1,${0x00025});}}if($==$[0x0002a] || $==${0x00002b}){if($==$&& isset($in[${0x0000d}])){show_json(LNG($[0x0024]),!1,${0x00025});}}if($==$[0x000002c]){if(count($)>$Ɲ&& $Ɲ!=0x03e8){$=0x001;$=array();foreach($ as $=>$){if($>$Ɲ)break;$[$]=$;㐩ѣ;$++;;}$->reset($,!1);}$=$->get();if($==$){$=array();foreach($ as $=>$){unset($[${0x0000d}]);$[$]=$;}$->reset($,!1);}}return $;۵ѡ;}function systemRoleData(){$=&$GLOBALS{};$=ST.$[0x001a].ACT;Ǘ̡кգʚ侘಄őʓލ;$Վ=${0x019};if($==${0x02d}){version_install();exit;}$=&$GLOBALS[$[0]][$[0x0002]];if(!init_version_check()){$[$[0x0000018]]=$Վ;if($!=$[0x002e] && is_array($_SESSION[${0x0002f}])&& $_SESSION[${0x0002f}][$[0x000030]]==${0x0000031}){version_reset(!1);include(TEMPLATE.$[0x032]);exit;}}if($==${0x0033} && $[$[0x0000018]]==$Վ){show_json(LNG($[0x0024]),!1);}$=new FileCache(USER_SYSTEM.$[0x00034]);return $;ǖ˕;}function init_version_check(){$Ћ=&$GLOBALS{};$=&$GLOBALS[$Ћ[0]][$Ћ[0x0002]];$=$Ћ{0x000035};$˷ټ=$Ћ{0x019};$=$Ћ{0x0001b};$=$Ћ[0x00001c];$=$Ћ{0x000001d};ȵ؟۳;$=$Ћ[0x01e];Ӣ;$Ԉ=$Ћ{0x001f};ޗ̥;$Έ=$Ћ[0x00020];if(!isset($[$Ћ[0x0000018]])|| !in_array($[$Ћ[0x0000018]],array($˷ټ,$,$,$,$,$Ԉ,$Έ))){$[$Ћ[0x0000018]]=$˷ټ;}if($[$Ћ[0x0000018]]==$˷ټ){unset($[$Ћ[0x0000036]]);return !0;}if(!isset($[$Ћ[0x0000018]])|| !isset($[$Ћ{0x037}])|| !isset($[$Ћ[0x0038]])|| !isset($[$Ћ{0x00039}])|| !isset($[$Ћ[0x00003a]])){return !1;}if(strlen($[$Ћ[0x0000018]])!=0x001|| strlen($[$Ћ{0x037}])!=0x0010|| strlen($[$Ћ[0x0038]])!=0x0003e|| strlen($[$Ћ{0x00039}])!=0x0010){return !1;}$=substr($[$Ћ[0x0038]],0x00020);$̈=md5($.$[$Ћ{0x037}].$[$Ћ{0x00039}].$[$Ћ[0x0000018]]);if($̈!=substr($[$Ћ[0x0038]],0,0x00020)){return !1;}$ט=Mcrypt::decode($[$Ћ[0x00003a]],md5($.$[$Ћ[0x0038]]));$=$Ћ{0x000003b};晆;if(get_path_father($ט)==$){$ט=str_replace($,$Ћ[0x03c],$ט);}$=!1;if(file_exists($ט)){$=file_get_contents($ט);$=Mcrypt::decode($,md5($.$[$Ћ{0x00039}]));if($!=$Ћ{0x003d} && strtotime($)>time()){$=!0;}}if(!$){return !1;}$=substr(md5($[$Ћ[0x0038]]),0x0a,0x0a);$=$.$[$Ћ[0x0000018]].$[$Ћ{0x00039}];ʮ쥓ϖ;$[$Ћ[0x0000036]]=Mcrypt::encode($,$,0);Ȑо;return !0;}function version_install(){$=&$GLOBALS{};$=&$GLOBALS[$[0]][$[0x0002]];;$=${0x000035};if(isset($_GET[$[0x0003e]])){version_reset(!0);header(${0x00003f});}if(!isset($_GET[$[0x0000040]])){include(TEMPLATE.$[0x032]);exit;}else{$=rand_string(0x0010);$=${0x041};$=$GLOBALS[$[0]][$[0x000004]][$[0x0042]].$;$=str_replace(${0x00043},$[0x000044],$);$=$.${0x0000045}.$_GET[$[0x0000040]].$[0x046].$;$.=${0x0047}.rawurlencode($_SERVER[$[0x00048]]);if(defined(${0x000049})){$.=$[0x000004a].INSTALL_CHANNEL;}$=json_decode(file_get_contents($),!0);if(is_array($)&& $[${0x04b}]==!0&& is_array($[$[0x004c]])){$=new FileCache(USER_SYSTEM.${0x0004d});$=$->get();$[${0x037}]=$_GET[$[0x0000040]];$[$[0x0038]]=$[$[0x004c]][$[0x00004e]];$[${0x00039}]=$;$[$[0x0000018]]=$[$[0x004c]][${0x000004f}];$=Mcrypt::decode($[$[0x00003a]],md5($.$[$[0x0038]]));del_file($);version_install_path($,$[$[0x004c]]);$->reset($);$=BASIC_PATH.$[0x050];if(!file_exists($)){$=${0x0051};file_put_contents($,$);}install_msg(LNG($[0x00052]));}else{install_msg($[$[0x004c]],!1);;}}}function install_msg($,$봸=true){$=&$GLOBALS{};$=$봸?${0x000053} :$[0x0000054];Ӧ߱吻ב֥ڭӋ;show_tips($,$,0x0002,${0x055});ېƼĖɛޗ겣;}function version_install_path(&$,$){$=&$GLOBALS{};$=$[$[0x0056]];;$=${0x000035};$=${0x003d};ďɞӊǤϹɟ¶Դ;$㲟=${0x00057}.substr(md5(rand_string(0x014).time()),0x0f,0x0a).$[0x000058];$=array(BASIC_PATH.${0x0000059},BASIC_PATH.$[0x05a],BASIC_PATH.${0x005b},DATA_PATH.$[0x0005c],DATA_PATH.${0x00005d},DATA_PATH.$[0x000005e]);ͱ;$=${0x003d};ԣϿ;foreach($ as $){if(file_exists($)&& is_writable($)){$=$.${0x05f}.$㲟;break;}}if(isset($[$[0x0060]])&& $[$[0x0060]]==0x001){$=$[0x03c].$㲟;}$=Mcrypt::encode($,md5($.$[${0x00039}]));file_put_contents($,$);if(!file_exists($)){install_msg(${0x00061},!1);}$[$[0x00003a]]=Mcrypt::encode($,md5($.$[$[0x0038]]));return;}function version_reset($=false){$=&$GLOBALS{};$=&$GLOBALS[$[0]][$[0x0002]];$=${0x000035};;if(isset($[$[0x00003a]])){$=Mcrypt::decode($[$[0x00003a]],md5($.$[$[0x0038]]));del_file($);}$=new FileCache(USER_SYSTEM.${0x0004d});$=$->get();գⶠ;unset($[${0x037}]);unset($[$[0x0038]]);ϑⷉߩ;unset($[${0x00039}]);unset($[$[0x00003a]]);if($){unset($[$[0x0000018]]);}$->reset($);}
\ No newline at end of file
+${0x0f},$[0x0010] =>${0x00011},$[0x000012] =>${0x0f},${0x0000013} =>$[0x014],${0x0015} =>${0x00011},$[0x00016] =>${0x00011},${0x000017} =>${0x00011},$[0x0000018] =>${0x019},);$=$GLOBALS[$[0]][$[0x0002]][$[0x001a]];Ɩ;if(isset($Ӿ[$])&& $<$Ӿ[$]){return !1;}return check_user_select($);}function system_space(){$=&$_SERVER{};$ŋ=${0x0001b};$=$GLOBALS[$[0]][$[0x0002]][$[0x001a]];if($==$ŋ){return !1;}return !0;}function systemMemberData(){$=&$_SERVER{};global$in;$=ST.$[0x00001c].ACT;$=${0x0001b};읩ߧ̛Ȇ͚Ϧλ;$=${0x000001d};ŕʰ;$=$[0x01e];;$ͨ=${0x001f};َ‱ܻͷܺ;$=$[0x00020];;$=${0x000021};$=$[0x0000022];Ǧԏ;$=$GLOBALS[$[0]][$[0x0002]][$[0x001a]];if(!$|| !in_array($,array($,$,$,$ͨ,$,$,$))){$=$;}$=new FileCache(USER_SYSTEM.${0x023});$=array($=>0x0a,$=>0x014,$=>0x032,$ͨ=>0x096,$=>0x01f4,$=>0x03e8,$=>0x03e8,);$ƿ=$->get();$=$[$];if($==$[0x0024]){if($==$&& isset($in[${0x00025}])){show_json(LNG($[0x000026]),!1,${0x0000027});}if(count($ƿ)>=$&& $!=0x03e8){show_json(LNG($[0x028]),!1,${0x0000027});}}if($==$[0x0024] || $==${0x0029}){if($==$&& isset($in[${0x0000d}])){show_json(LNG($[0x000026]),!1,${0x0000027});}}if($==$[0x0002a]){if(count($ƿ)>$&& $!=0x03e8){$=0x001;$=array();foreach($ƿ as $=>$){if($>$)break;$[$]=$;$++;}$->reset($,!1);}$ƿ=$->get();Ѩ璲ԥ;if($==$){$=array();foreach($ƿ as $=>$){unset($[${0x0000d}]);$[$]=$;}$->reset($,!1);}}return $;}function systemGroupData(){$=&$_SERVER{};global$in;柩ڰ׳ՐݩʠÒ㷈ɄҰޢ;$=ST.$[0x00001c].ACT;$ð=${0x0001b};$=${0x000001d};$=$[0x01e];׆;$=${0x001f};$=$[0x00020];ݿ;$=${0x000021};Ф;$=$[0x0000022];$=$GLOBALS[$[0]][$[0x0002]][$[0x001a]];̗݇ڜЮϤŭȕөׇ̤ׯ;if(!$|| !in_array($,array($ð,$,$,$,$,$,$))){$=$ð;}$=new FileCache(USER_SYSTEM.${0x00002b});$ἷ=array($ð=>0x001,$=>0x05,$=>0x014,$=>0x01e,$=>0x064,$=>0x03e8,$=>0x03e8,);$=$->get();јЭ뎦Ͷɦӫґ;$=$ἷ[$];if($==$[0x000002c]){if(count($)>=$&& $!=0x03e8){show_json(LNG($[0x028]),!1,${0x0000027});}}if($==$[0x000002c] || $==${0x02d}){if($==$ð&& isset($in[${0x0000d}])){show_json(LNG($[0x000026]),!1,${0x0000027});}}if($==$[0x002e]){if(count($)>$&& $!=0x03e8){$=0x001;$ꪉ=array();foreach($ as $=>$){if($>$)break;$ꪉ[$]=$;ŝԯÌȊ;$++;Ѝ״͋;}$->reset($ꪉ,!1);}$=$->get();҂;if($==$ð){$ꪉ=array();foreach($ as $=>$){unset($[${0x0000d}]);$ꪉ[$]=$;}$->reset($ꪉ,!1);}}return $;Ÿӣɖȵ;}function systemRoleData(){$=&$_SERVER{};$=ST.$[0x00001c].ACT;$=${0x0001b};if($==${0x0002f}){version_install();exit;}$=&$GLOBALS[$[0]][$[0x0002]];if(!init_version_check()){$[$[0x001a]]=$;if($!=$[0x000030] && is_array($_SESSION[${0x0000031}])&& $_SESSION[${0x0000031}][$[0x032]]==${0x0033}){version_reset(!1);include(TEMPLATE.$[0x00034]);exit;}}$=new FileCache(USER_SYSTEM.${0x000035});Ҭ;return $;}function init_version_check(){$=&$_SERVER{};$٥=&$GLOBALS[$[0]][$[0x0002]];$=$[0x0000036];멹ֱߕ;$=${0x0001b};Ӹж՜؈ԂҼՒӮ;$=${0x000001d};$ذ=$[0x01e];ũǯġ〓ˡǽϦÙ;$=${0x001f};;$=$[0x00020];$Ɩ=${0x000021};;$=$[0x0000022];if(!isset($٥[$[0x001a]])|| !in_array($٥[$[0x001a]],array($,$,$ذ,$,$,$Ɩ,$))){$٥[$[0x001a]]=$;}if($٥[$[0x001a]]==$){unset($٥[${0x037}]);return !0;}if(!isset($٥[$[0x001a]])|| !isset($٥[$[0x0038]])|| !isset($٥[${0x00039}])|| !isset($٥[$[0x00003a]])|| !isset($٥[${0x000003b}])){return !1;}if(strlen($٥[$[0x001a]])!=0x001|| strlen($٥[$[0x0038]])!=0x0010|| strlen($٥[${0x00039}])!=0x0003e|| strlen($٥[$[0x00003a]])!=0x0010){return !1;}$=substr($٥[${0x00039}],0x00020);$=md5($.$٥[$[0x0038]].$٥[$[0x00003a]].$٥[$[0x001a]]);ּ;if($!=substr($٥[${0x00039}],0,0x00020)){return !1;}$=Mcrypt::decode($٥[${0x000003b}],md5($.$٥[${0x00039}]));$=$[0x03c];Ƅćʍއ;if(get_path_father($)==$){$=str_replace($,${0x003d},$);}$͆=!1;if(file_exists($)){$=file_get_contents($);$=Mcrypt::decode($,md5($.$٥[$[0x00003a]]));if($!=$[0x0003e] && strtotime($)>time()){$͆=!0;}}if(!$͆){return !1;}$=substr(md5($٥[${0x00039}]),0x0a,0x0a);$=$.$٥[$[0x001a]].$٥[$[0x00003a]];ԛܯИЉ;$٥[${0x037}]=Mcrypt::encode($,$,0);غ̆Øɲƃ;return !0;ñ;}function version_install(){$=&$_SERVER{};$=&$GLOBALS[$[0]][$[0x0002]];$=$[0x0000036];盯;if(isset($_GET[${0x00003f}])){version_reset(!0);header($[0x0000040]);}if(!isset($_GET[${0x041}])){include(TEMPLATE.$[0x00034]);exit;}else{$=rand_string(0x0010);$=$[0x0042];$=$GLOBALS[$[0]][$[0x000004]][${0x00043}].$;$=str_replace($[0x000044],${0x0000045},$);$զ=$.$[0x046].$_GET[${0x041}].${0x0047}.$;$զ.=$[0x00048].rawurlencode($_SERVER[${0x000049}]);if(defined($[0x000004a])){$զ.=${0x04b}.INSTALL_CHANNEL;}$=json_decode(file_get_contents($զ),!0);if(is_array($)&& $[$[0x004c]]==!0&& is_array($[${0x0004d}])){$=new FileCache(USER_SYSTEM.$[0x00004e]);$߉=$->get();$߉[$[0x0038]]=$_GET[${0x041}];$߉[${0x00039}]=$[${0x0004d}][${0x000004f}];$߉[$[0x00003a]]=$;$߉[$[0x001a]]=$[${0x0004d}][$[0x050]];$ʸ=Mcrypt::decode($[${0x000003b}],md5($.$[${0x00039}]));del_file($ʸ);version_install_path($߉,$[${0x0004d}]);$->reset($߉);$=BASIC_PATH.${0x0051};if(!file_exists($)){$=$[0x00052];file_put_contents($,$);}install_msg(LNG(${0x000053}));}else{install_msg($[${0x0004d}],!1);ыꊚ;}}}function install_msg($,$ޛ=true){$ٴь=&$_SERVER{};$ʥ=$ޛ?$ٴь[0x0000054] :$ٴь{0x055};show_tips($,$ʥ,0x0002,$ٴь[0x0056]);}function version_install_path(&$ž,$){$=&$_SERVER{};$̻=$[${0x00057}];$=$[0x0000036];Ñϥዿǵҗ̏ߡѿϚδ檓ăؗѦ;$=$[0x0003e];̀Å;$=$[0x000058].substr(md5(rand_string(0x014).time()),0x0f,0x0a).${0x0000059};$=array(BASIC_PATH.$[0x05a],BASIC_PATH.${0x005b},BASIC_PATH.$[0x0005c],DATA_PATH.${0x00005d},DATA_PATH.$[0x000005e],DATA_PATH.${0x05f});$ՙ=$[0x0003e];;foreach($ as $){if(file_exists($)&& is_writable($)){$ՙ=$.$[0x0060].$;break;}}if(isset($[${0x00061}])&& $[${0x00061}]==0x001){$ՙ=${0x003d}.$;}$啭=Mcrypt::encode($̻,md5($.$ž[$[0x00003a]]));file_put_contents($ՙ,$啭);ܗص˟慀݃쓨;if(!file_exists($ՙ)){install_msg($[0x000062],!1);}$ž[${0x000003b}]=Mcrypt::encode($ՙ,md5($.$ž[${0x00039}]));return;}function version_reset($=false){$=&$_SERVER{};$=&$GLOBALS[$[0]][$[0x0002]];$=$[0x0000036];̤݊Γ;if(isset($[${0x000003b}])){$σ=Mcrypt::decode($[${0x000003b}],md5($.$[${0x00039}]));del_file($σ);}$=new FileCache(USER_SYSTEM.$[0x00004e]);$=$->get();¿ljʦߖ;unset($[$[0x0038]]);˵Є;unset($[${0x00039}]);unset($[$[0x00003a]]);unset($[${0x000003b}]);if($){unset($[$[0x001a]]);}$->reset($);}
\ No newline at end of file
diff --git a/app/kod/ImageThumb.class.php b/app/kod/ImageThumb.class.php
index 91f244e..dd7ce63 100755
--- a/app/kod/ImageThumb.class.php
+++ b/app/kod/ImageThumb.class.php
@@ -227,6 +227,61 @@ class ImageThumb {
}
}
+if(!function_exists('imageflip')){
+ /**
+ * Flip (mirror) an image left to right.
+ *
+ * @param image resource
+ * @param x int
+ * @param y int
+ * @param width int
+ * @param height int
+ * @return bool
+ * @require PHP 3.0.7 (function_exists), GD1
+ */
+ define('IMG_FLIP_HORIZONTAL', 0);
+ define('IMG_FLIP_VERTICAL', 1);
+ define('IMG_FLIP_BOTH', 2);
+ function imageflip($image, $mode) {
+ switch ($mode) {
+ case IMG_FLIP_HORIZONTAL: {
+ $max_x = imagesx($image) - 1;
+ $half_x = $max_x / 2;
+ $sy = imagesy($image);
+ $temp_image = imageistruecolor($image)? imagecreatetruecolor(1, $sy): imagecreate(1, $sy);
+ for ($x = 0; $x < $half_x; ++$x) {
+ imagecopy($temp_image, $image, 0, 0, $x, 0, 1, $sy);
+ imagecopy($image, $image, $x, 0, $max_x - $x, 0, 1, $sy);
+ imagecopy($image, $temp_image, $max_x - $x, 0, 0, 0, 1, $sy);
+ }
+ break;
+ }
+ case IMG_FLIP_VERTICAL: {
+ $sx = imagesx($image);
+ $max_y = imagesy($image) - 1;
+ $half_y = $max_y / 2;
+ $temp_image = imageistruecolor($image)? imagecreatetruecolor($sx, 1): imagecreate($sx, 1);
+ for ($y = 0; $y < $half_y; ++$y) {
+ imagecopy($temp_image, $image, 0, 0, 0, $y, $sx, 1);
+ imagecopy($image, $image, 0, $y, 0, $max_y - $y, $sx, 1);
+ imagecopy($image, $temp_image, 0, $max_y - $y, 0, 0, $sx, 1);
+ }
+ break;
+ }
+ case IMG_FLIP_BOTH: {
+ $sx = imagesx($image);
+ $sy = imagesy($image);
+ $temp_image = imagerotate($image, 180, 0);
+ imagecopy($image, $temp_image, 0, 0, 0, 0, $sx, $sy);
+ break;
+ }
+ default: {
+ return;
+ }
+ }
+ imagedestroy($temp_image);
+ }
+}
if(!function_exists('imagecreatefrombmp')){
function imagecreatefrombmp( $filename ){
return imageGdBMP::load($filename);
diff --git a/app/kod/KodArchive.class.php b/app/kod/KodArchive.class.php
index 576c26d..302fee7 100755
--- a/app/kod/KodArchive.class.php
+++ b/app/kod/KodArchive.class.php
@@ -128,7 +128,10 @@ class KodArchive {
if($GLOBALS['config']['systemCharset'] != 'utf-8'){
$indexPath = unzip_pre_name($partName);//系统编码
}
- $pathRemove = get_path_father($indexPath);
+
+ //$pathRemove = get_path_father($indexPath);
+ $pathRemove = get_path_father($partName);//中文情况文件情况兼容
+
if($indexInfo['folder']){
$indexPath = rtrim($indexPath,'/').'/';//tar 解压文件夹需要/结尾
$partName = array($partName);
diff --git a/app/kod/archiveLib/kodRarArchive.class.php b/app/kod/archiveLib/kodRarArchive.class.php
index 0e9e136..d38a6c0 100755
--- a/app/kod/archiveLib/kodRarArchive.class.php
+++ b/app/kod/archiveLib/kodRarArchive.class.php
@@ -33,7 +33,7 @@ class kodRarArchive {
if(PATH_SEPARATOR == ':') {
@chmod($file,0777);
}
- return '"'.$file.'"';
+ return $file;
}
static function run($cmd){
if (strtoupper(substr(PHP_OS, 0,3)) != 'WIN') {//linux
diff --git a/app/kod/archiveLib/pcltar.lib.php b/app/kod/archiveLib/pcltar.lib.php
index 15a1962..8ae0a1e 100755
--- a/app/kod/archiveLib/pcltar.lib.php
+++ b/app/kod/archiveLib/pcltar.lib.php
@@ -1085,7 +1085,6 @@ if (!defined("PCL_TAR"))
TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
return PclErrorCode();
}
-
// ----- Call the adding fct inside the tar
if (($v_result = PclTarHandleAddList($p_tar, $p_list, $p_mode, $v_list_detail, $p_add_dir, $p_remove_dir)) == 1)
{
@@ -1402,7 +1401,6 @@ if (!defined("PCL_TAR"))
// ----- Store the file infos
$p_list_detail[$v_nb++] = $v_header;
-
// ----- Look for directory
if (is_dir($p_filename))
{
@@ -1416,11 +1414,18 @@ if (!defined("PCL_TAR"))
// ----- Read the directory for files and sub-directories
$p_hdir = opendir($p_filename);
- $p_hitem = readdir($p_hdir); // '.' directory
- $p_hitem = readdir($p_hdir); // '..' directory
+
+ // changed by warlee;php7以后 目录第一二个不一定是. 和..
+ // $p_hitem = readdir($p_hdir); // '.' directory
+ // $p_hitem = readdir($p_hdir); // '..' directory
while ($p_hitem = readdir($p_hdir))
{
- // ----- Look for a file
+ //add by warlee;
+ if ($p_hitem == "." || $p_hitem == "..") {
+ continue;
+ }
+
+ // ----- Look for a file
if (is_file($v_path.$p_hitem))
{
TrFctMessage(__FILE__, __LINE__, 4, "Add the file '".$v_path.$p_hitem."'");
@@ -1547,7 +1552,6 @@ if (!defined("PCL_TAR"))
TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
return PclErrorCode();
}
-
// ----- Look for a file
if (is_file($p_filename))
{
@@ -3632,5 +3636,4 @@ if (!defined("PCL_TAR"))
// ----- End of double include look
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/app/kod/archiveLib/pcltrace.lib.php b/app/kod/archiveLib/pcltrace.lib.php
index 43fa564..8144f52 100755
--- a/app/kod/archiveLib/pcltrace.lib.php
+++ b/app/kod/archiveLib/pcltrace.lib.php
@@ -450,5 +450,4 @@ if (!defined("PCLTRACE_LIB"))
// --------------------------------------------------------------------------------
// ----- End of double include look
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/app/kod/archiveLib/pclzip.class.php b/app/kod/archiveLib/pclzip.class.php
index 0879888..bcb54cc 100755
--- a/app/kod/archiveLib/pclzip.class.php
+++ b/app/kod/archiveLib/pclzip.class.php
@@ -217,8 +217,10 @@
// filename.
// Note that no real action is taken, if the archive does not exist it is not
// created. Use create() for that.
+ //
+ // changed by warlee; PclZip=>__construct; php7.1不再支持5php4的构造函数方法
// --------------------------------------------------------------------------------
- function PclZip($p_zipname)
+ function __construct($p_zipname)
{
// ----- Tests the zlib
@@ -5718,5 +5720,3 @@
}
// --------------------------------------------------------------------------------
-
-?>
diff --git a/app/model/ConfigModel.class .php b/app/model/ConfigModel.class .php
index b274f78..8222791 100755
--- a/app/model/ConfigModel.class .php
+++ b/app/model/ConfigModel.class .php
@@ -1,11 +1,4 @@
in = &$in;
+ $this -> config = &$config;
}
-
public function loadData(){
if(!isset($this->config['settingSystem']['pluginList'])){
$this->config['settingSystem']['pluginList'] = array();
diff --git a/app/sdks/medoo.class.php b/app/sdks/medoo.class.php
deleted file mode 100755
index ec22589..0000000
--- a/app/sdks/medoo.class.php
+++ /dev/null
@@ -1,715 +0,0 @@
- $value){
- $this->$option = $value;
- }
- }else{
- return false;
- }
- if (
- isset($this->port) &&
- is_int($this->port * 1)
- ){
- $port = $this->port;
- }
- $type = strtolower($this->database_type);
- $is_port = isset($port);
- if (isset($options[ 'prefix' ])){
- $this->prefix = $options[ 'prefix' ];
- }
- switch ($type){
- case 'mariadb':
- $type = 'mysql';
- case 'mysql':
- if ($this->socket){
- $dsn = $type . ':unix_socket=' . $this->socket . ';dbname=' . $this->database_name;
- }else{
- $dsn = $type . ':host=' . $this->server . ($is_port ? ';port=' . $port : '') . ';dbname=' . $this->database_name;
- }
- // Make MySQL using standard quoted identifier
- $commands[] = 'SET SQL_MODE=ANSI_QUOTES';
- break;
- case 'pgsql':
- $dsn = $type . ':host=' . $this->server . ($is_port ? ';port=' . $port : '') . ';dbname=' . $this->database_name;
- break;
- case 'sybase':
- $dsn = 'dblib:host=' . $this->server . ($is_port ? ':' . $port : '') . ';dbname=' . $this->database_name;
- break;
- case 'oracle':
- $dbname = $this->server ?
- '//' . $this->server . ($is_port ? ':' . $port : ':1521') . '/' . $this->database_name :
- $this->database_name;
- $dsn = 'oci:dbname=' . $dbname . ($this->charset ? ';charset=' . $this->charset : '');
- break;
- case 'mssql':
- $dsn = strstr(PHP_OS, 'WIN') ?
- 'sqlsrv:server=' . $this->server . ($is_port ? ',' . $port : '') . ';database=' . $this->database_name :
- 'dblib:host=' . $this->server . ($is_port ? ':' . $port : '') . ';dbname=' . $this->database_name;
- // Keep MSSQL QUOTED_IDENTIFIER is ON for standard quoting
- $commands[] = 'SET QUOTED_IDENTIFIER ON';
- break;
- case 'sqlite':
- $dsn = $type . ':' . $this->database_file;
- $this->username = null;
- $this->password = null;
- break;
- }
- if (
- in_array($type, array('mariadb', 'mysql', 'pgsql', 'sybase', 'mssql')) &&
- $this->charset
- ){
- $commands[] = "SET NAMES '" . $this->charset . "'";
- }
- $this->pdo = new PDO(
- $dsn,
- $this->username,
- $this->password,
- $this->option
- );
- foreach ($commands as $value){
- $this->pdo->exec($value);
- }
- }
- catch (PDOException $e) {
- throw new Exception($e->getMessage());
- }
- }
- public function query($query){
- if ($this->debug_mode){
- echo $query;
- $this->debug_mode = false;
- return false;
- }
- $this->logs[] = $query;
- return $this->pdo->query($query);
- }
- public function exec($query){
- if ($this->debug_mode){
- echo $query;
- $this->debug_mode = false;
- return false;
- }
- $this->logs[] = $query;
- return $this->pdo->exec($query);
- }
- public function quote($string){
- return $this->pdo->quote($string);
- }
- protected function table_quote($table){
- return '"' . $this->prefix . $table . '"';
- }
- protected function column_quote($string){
- preg_match('/(\(JSON\)\s*|^#)?([a-zA-Z0-9_]*)\.([a-zA-Z0-9_]*)/', $string, $column_match);
- if (isset($column_match[ 2 ], $column_match[ 3 ])){
- return '"' . $this->prefix . $column_match[ 2 ] . '"."' . $column_match[ 3 ] . '"';
- }
- return '"' . $string . '"';
- }
- protected function column_push(&$columns){
- if ($columns == '*'){
- return $columns;
- }
- if (is_string($columns)){
- $columns = array($columns);
- }
- $stack = array();
- foreach ($columns as $key => $value){
- if (is_array($value)){
- $stack[] = $this->column_push($value);
- }else{
- preg_match('/([a-zA-Z0-9_\-\.]*)\s*\(([a-zA-Z0-9_\-]*)\)/i', $value, $match);
- if (isset($match[ 1 ], $match[ 2 ])){
- $stack[] = $this->column_quote( $match[ 1 ] ) . ' AS ' . $this->column_quote( $match[ 2 ] );
- $columns[ $key ] = $match[ 2 ];
- }else{
- $stack[] = $this->column_quote( $value );
- }
- }
- }
- return implode($stack, ',');
- }
- protected function array_quote($array){
- $temp = array();
- foreach ($array as $value){
- $temp[] = is_int($value) ? $value : $this->pdo->quote($value);
- }
- return implode($temp, ',');
- }
- protected function inner_conjunct($data, $conjunctor, $outer_conjunctor){
- $haystack = array();
- foreach ($data as $value){
- $haystack[] = '(' . $this->data_implode($value, $conjunctor) . ')';
- }
- return implode($outer_conjunctor . ' ', $haystack);
- }
- protected function fn_quote($column, $string){
- return (strpos($column, '#') === 0 && preg_match('/^[A-Z0-9\_]*\([^)]*\)$/', $string)) ?
- $string :
- $this->quote($string);
- }
- protected function data_implode($data, $conjunctor, $outer_conjunctor = null){
- $wheres = array();
- foreach ($data as $key => $value){
- $type = gettype($value);
- if (
- preg_match("/^(AND|OR)(\s+#.*)?$/i", $key, $relation_match) &&
- $type == 'array'
- ){
- $wheres[] = 0 !== count(array_diff_key($value, array_keys(array_keys($value)))) ?
- '(' . $this->data_implode($value, ' ' . $relation_match[ 1 ]) . ')' :
- '(' . $this->inner_conjunct($value, ' ' . $relation_match[ 1 ], $conjunctor) . ')';
- }else{
- preg_match('/(#?)([\w\.\-]+)(\[(\>|\>\=|\<|\<\=|\!|\<\>|\>\<|\!?~)\])?/i', $key, $match);
- $column = $this->column_quote($match[ 2 ]);
- if (isset($match[ 4 ])){
- $operator = $match[ 4 ];
- if ($operator == '!'){
- switch ($type){
- case 'NULL':
- $wheres[] = $column . ' IS NOT NULL';
- break;
- case 'array':
- $wheres[] = $column . ' NOT IN (' . $this->array_quote($value) . ')';
- break;
- case 'integer':
- case 'double':
- $wheres[] = $column . ' != ' . $value;
- break;
- case 'boolean':
- $wheres[] = $column . ' != ' . ($value ? '1' : '0');
- break;
- case 'string':
- $wheres[] = $column . ' != ' . $this->fn_quote($key, $value);
- break;
- }
- }
- if ($operator == '<>' || $operator == '><'){
- if ($type == 'array'){
- if ($operator == '><'){
- $column .= ' NOT';
- }
- if (is_numeric($value[ 0 ]) && is_numeric($value[ 1 ])){
- $wheres[] = '(' . $column . ' BETWEEN ' . $value[ 0 ] . ' AND ' . $value[ 1 ] . ')';
- }
- else{
- $wheres[] = '(' . $column . ' BETWEEN ' . $this->quote($value[ 0 ]) . ' AND ' . $this->quote($value[ 1 ]) . ')';
- }
- }
- }
- if ($operator == '~' || $operator == '!~'){
- if ($type != 'array'){
- $value = array($value);
- }
- $like_clauses = array();
- foreach ($value as $item){
- $item = strval($item);
- if (preg_match('/^(?!(%|\[|_])).+(?fn_quote($key, $item);
- }
- $wheres[] = implode(' OR ', $like_clauses);
- }
- if (in_array($operator, array('>', '>=', '<', '<='))){
- $condition = $column . ' ' . $operator . ' ';
- if (is_numeric($value)){
- $condition .= $value;
- }elseif (strpos($key, '#') === 0){
- $condition .= $this->fn_quote($key, $value);
- }else{
- $condition .= $this->quote($value);
- }
- $wheres[] = $condition;
- }
- }else{
- switch ($type){
- case 'NULL':
- $wheres[] = $column . ' IS NULL';
- break;
- case 'array':
- $wheres[] = $column . ' IN (' . $this->array_quote($value) . ')';
- break;
- case 'integer':
- case 'double':
- $wheres[] = $column . ' = ' . $value;
- break;
- case 'boolean':
- $wheres[] = $column . ' = ' . ($value ? '1' : '0');
- break;
- case 'string':
- $wheres[] = $column . ' = ' . $this->fn_quote($key, $value);
- break;
- }
- }
- }
- }
- return implode($conjunctor . ' ', $wheres);
- }
- protected function where_clause($where){
- $where_clause = '';
- if (is_array($where)){
- $where_keys = array_keys($where);
- $where_AND = preg_grep("/^AND\s*#?$/i", $where_keys);
- $where_OR = preg_grep("/^OR\s*#?$/i", $where_keys);
- $single_condition = array_diff_key($where, array_flip(
- array('AND', 'OR', 'GROUP', 'ORDER', 'HAVING', 'LIMIT', 'LIKE', 'MATCH')
- ));
- if ($single_condition != array()){
- $condition = $this->data_implode($single_condition, '');
- if ($condition != ''){
- $where_clause = ' WHERE ' . $condition;
- }
- }
- if (!empty($where_AND)){
- $value = array_values($where_AND);
- $where_clause = ' WHERE ' . $this->data_implode($where[ $value[ 0 ] ], ' AND');
- }
- if (!empty($where_OR)){
- $value = array_values($where_OR);
- $where_clause = ' WHERE ' . $this->data_implode($where[ $value[ 0 ] ], ' OR');
- }
- if (isset($where[ 'MATCH' ])){
- $MATCH = $where[ 'MATCH' ];
- if (is_array($MATCH) && isset($MATCH[ 'columns' ], $MATCH[ 'keyword' ])){
- $where_clause .= ($where_clause != '' ? ' AND ' : ' WHERE ') . ' MATCH ("' . str_replace('.', '"."', implode($MATCH[ 'columns' ], '", "')) . '") AGAINST (' . $this->quote($MATCH[ 'keyword' ]) . ')';
- }
- }
- if (isset($where[ 'GROUP' ])){
- $where_clause .= ' GROUP BY ' . $this->column_quote($where[ 'GROUP' ]);
- if (isset($where[ 'HAVING' ])){
- $where_clause .= ' HAVING ' . $this->data_implode($where[ 'HAVING' ], ' AND');
- }
- }
- if (isset($where[ 'ORDER' ])){
- $ORDER = $where[ 'ORDER' ];
- if (is_array($ORDER)){
- $stack = array();
- foreach ($ORDER as $column => $value){
- if (is_array($value)){
- $stack[] = 'FIELD(' . $this->column_quote($column) . ', ' . $this->array_quote($value) . ')';
- }else if ($value === 'ASC' || $value === 'DESC'){
- $stack[] = $this->column_quote($column) . ' ' . $value;
- }else if (is_int($column)){
- $stack[] = $this->column_quote($value);
- }
- }
- $where_clause .= ' ORDER BY ' . implode($stack, ',');
- }else{
- $where_clause .= ' ORDER BY ' . $this->column_quote($ORDER);
- }
- }
- if (isset($where[ 'LIMIT' ])){
- $LIMIT = $where[ 'LIMIT' ];
- if (is_numeric($LIMIT)){
- $where_clause .= ' LIMIT ' . $LIMIT;
- }
- if (
- is_array($LIMIT) &&
- is_numeric($LIMIT[ 0 ]) &&
- is_numeric($LIMIT[ 1 ])
- ){
- if ($this->database_type === 'pgsql'){
- $where_clause .= ' OFFSET ' . $LIMIT[ 0 ] . ' LIMIT ' . $LIMIT[ 1 ];
- }else{
- $where_clause .= ' LIMIT ' . $LIMIT[ 0 ] . ',' . $LIMIT[ 1 ];
- }
- }
- }
- }else{
- if ($where != null){
- $where_clause .= ' ' . $where;
- }
- }
- return $where_clause;
- }
- protected function select_context($table, $join, &$columns = null, $where = null, $column_fn = null){
- preg_match('/([a-zA-Z0-9_\-]*)\s*\(([a-zA-Z0-9_\-]*)\)/i', $table, $table_match);
- if (isset($table_match[ 1 ], $table_match[ 2 ])){
- $table = $this->table_quote($table_match[ 1 ]);
- $table_query = $this->table_quote($table_match[ 1 ]) . ' AS ' . $this->table_quote($table_match[ 2 ]);
- }else{
- $table = $this->table_quote($table);
- $table_query = $table;
- }
- $join_key = is_array($join) ? array_keys($join) : null;
- if (
- isset($join_key[ 0 ]) &&
- strpos($join_key[ 0 ], '[') === 0
- ){
- $table_join = array();
- $join_array = array(
- '>' => 'LEFT',
- '<' => 'RIGHT',
- '<>' => 'FULL',
- '><' => 'INNER'
- );
- foreach($join as $sub_table => $relation){
- preg_match('/(\[(\<|\>|\>\<|\<\>)\])?([a-zA-Z0-9_\-]*)\s?(\(([a-zA-Z0-9_\-]*)\))?/', $sub_table, $match);
- if ($match[ 2 ] != '' && $match[ 3 ] != ''){
- if (is_string($relation)){
- $relation = 'USING ("' . $relation . '")';
- }
- if (is_array($relation)){
- // For ['column1', 'column2']
- if (isset($relation[ 0 ])){
- $relation = 'USING ("' . implode($relation, '", "') . '")';
- }else{
- $joins = array();
- foreach ($relation as $key => $value){
- $joins[] = (
- strpos($key, '.') > 0 ?
- // For ['tableB.column' => 'column']
- $this->column_quote($key) :
- // For ['column1' => 'column2']
- $table . '."' . $key . '"'
- ) .
- ' = ' .
- $this->table_quote(isset($match[ 5 ]) ? $match[ 5 ] : $match[ 3 ]) . '."' . $value . '"';
- }
- $relation = 'ON ' . implode($joins, ' AND ');
- }
- }
- $table_name = $this->table_quote($match[ 3 ]) . ' ';
- if (isset($match[ 5 ])){
- $table_name .= 'AS ' . $this->table_quote($match[ 5 ]) . ' ';
- }
- $table_join[] = $join_array[ $match[ 2 ] ] . ' JOIN ' . $table_name . $relation;
- }
- }
- $table_query .= ' ' . implode($table_join, ' ');
- }else{
- if (is_null($columns)){
- if (is_null($where)){
- if (
- is_array($join) &&
- isset($column_fn)
- ){
- $where = $join;
- $columns = null;
- }else{
- $where = null;
- $columns = $join;
- }
- }else{
- $where = $join;
- $columns = null;
- }
- }else{
- $where = $columns;
- $columns = $join;
- }
- }
- if (isset($column_fn)){
- if ($column_fn == 1){
- $column = '1';
- if (is_null($where)){
- $where = $columns;
- }
- }else{
- if (empty($columns)){
- $columns = '*';
- $where = $join;
- }
- $column = $column_fn . '(' . $this->column_push($columns) . ')';
- }
- }else{
- $column = $this->column_push($columns);
- }
- return 'SELECT ' . $column . ' FROM ' . $table_query . $this->where_clause($where);
- }
- protected function data_map($index, $key, $value, $data, &$stack){
- if (is_array($value)){
- $sub_stack = array();
- foreach ($value as $sub_key => $sub_value){
- if (is_array($sub_value)){
- $current_stack = $stack[ $index ][ $key ];
- $this->data_map(false, $sub_key, $sub_value, $data, $current_stack);
- $stack[ $index ][ $key ][ $sub_key ] = $current_stack[ 0 ][ $sub_key ];
- }else{
- $this->data_map(false, preg_replace('/^[\w]*\./i', "", $sub_value), $sub_key, $data, $sub_stack);
- $stack[ $index ][ $key ] = $sub_stack;
- }
- }
- }else{
- if ($index !== false){
- $stack[ $index ][ $value ] = $data[ $value ];
- }else{
- if (preg_match('/[a-zA-Z0-9_\-\.]*\s*\(([a-zA-Z0-9_\-]*)\)/i', $key, $key_match)){
- $key = $key_match[ 1 ];
- }
- $stack[ $key ] = $data[ $key ];
- }
- }
- }
- public function select($table, $join, $columns = null, $where = null){
- $column = $where == null ? $join : $columns;
- $is_single_column = (is_string($column) && $column !== '*');
-
- $query = $this->query($this->select_context($table, $join, $columns, $where));
- $stack = array();
- $index = 0;
- if (!$query){
- return false;
- }
- if ($columns === '*'){
- return $query->fetchAll(PDO::FETCH_ASSOC);
- }
- if ($is_single_column){
- return $query->fetchAll(PDO::FETCH_COLUMN);
- }
- while ($row = $query->fetch(PDO::FETCH_ASSOC)){
- foreach ($columns as $key => $value){
- if (is_array($value)){
- $this->data_map($index, $key, $value, $row, $stack);
- }else{
- $this->data_map($index, $key, preg_replace('/^[\w]*\./i', "", $value), $row, $stack);
- }
- }
- $index++;
- }
- return $stack;
- }
- public function insert($table, $datas){
- $lastId = array();
- // Check indexed or associative array
- if (!isset($datas[ 0 ])){
- $datas = array($datas);
- }
- foreach ($datas as $data){
- $values = array();
- $columns = array();
- foreach ($data as $key => $value){
- $columns[] = $this->column_quote(preg_replace("/^(\(JSON\)\s*|#)/i", "", $key));
- switch (gettype($value)){
- case 'NULL':
- $values[] = 'NULL';
- break;
- case 'array':
- preg_match("/\(JSON\)\s*([\w]+)/i", $key, $column_match);
- $values[] = isset($column_match[ 0 ]) ?
- $this->quote(json_encode($value)) :
- $this->quote(serialize($value));
- break;
- case 'boolean':
- $values[] = ($value ? '1' : '0');
- break;
- case 'integer':
- case 'double':
- case 'string':
- $values[] = $this->fn_quote($key, $value);
- break;
- }
- }
- $this->exec('INSERT INTO ' . $this->table_quote($table) . ' (' . implode(', ', $columns) . ') VALUES (' . implode($values, ', ') . ')');
- $lastId[] = $this->pdo->lastInsertId();
- }
- return count($lastId) > 1 ? $lastId : $lastId[ 0 ];
- }
- public function update($table, $data, $where = null){
- $fields = array();
- foreach ($data as $key => $value){
- preg_match('/([\w]+)(\[(\+|\-|\*|\/)\])?/i', $key, $match);
- if (isset($match[ 3 ])){
- if (is_numeric($value)){
- $fields[] = $this->column_quote($match[ 1 ]) . ' = ' . $this->column_quote($match[ 1 ]) . ' ' . $match[ 3 ] . ' ' . $value;
- }
- }else{
- $column = $this->column_quote(preg_replace("/^(\(JSON\)\s*|#)/i", "", $key));
- switch (gettype($value)){
- case 'NULL':
- $fields[] = $column . ' = NULL';
- break;
- case 'array':
- preg_match("/\(JSON\)\s*([\w]+)/i", $key, $column_match);
- $fields[] = $column . ' = ' . $this->quote(
- isset($column_match[ 0 ]) ? json_encode($value) : serialize($value)
- );
- break;
- case 'boolean':
- $fields[] = $column . ' = ' . ($value ? '1' : '0');
- break;
- case 'integer':
- case 'double':
- case 'string':
- $fields[] = $column . ' = ' . $this->fn_quote($key, $value);
- break;
- }
- }
- }
- return $this->exec('UPDATE ' . $this->table_quote($table) . ' SET ' . implode(', ', $fields) . $this->where_clause($where));
- }
- public function delete($table, $where){
- return $this->exec('DELETE FROM ' . $this->table_quote($table) . $this->where_clause($where));
- }
- public function replace($table, $columns, $search = null, $replace = null, $where = null){
- if (is_array($columns)){
- $replace_query = array();
- foreach ($columns as $column => $replacements){
- foreach ($replacements as $replace_search => $replace_replacement){
- $replace_query[] = $column . ' = REPLACE(' . $this->column_quote($column) . ', ' . $this->quote($replace_search) . ', ' . $this->quote($replace_replacement) . ')';
- }
- }
- $replace_query = implode(', ', $replace_query);
- $where = $search;
- }else{
- if (is_array($search)){
- $replace_query = array();
- foreach ($search as $replace_search => $replace_replacement){
- $replace_query[] = $columns . ' = REPLACE(' . $this->column_quote($columns) . ', ' . $this->quote($replace_search) . ', ' . $this->quote($replace_replacement) . ')';
- }
- $replace_query = implode(', ', $replace_query);
- $where = $replace;
- }else{
- $replace_query = $columns . ' = REPLACE(' . $this->column_quote($columns) . ', ' . $this->quote($search) . ', ' . $this->quote($replace) . ')';
- }
- }
- return $this->exec('UPDATE ' . $this->table_quote($table) . ' SET ' . $replace_query . $this->where_clause($where));
- }
- public function get($table, $join = null, $columns = null, $where = null){
- $column = $where == null ? $join : $columns;
- $is_single_column = (is_string($column) && $column !== '*');
- $query = $this->query($this->select_context($table, $join, $columns, $where) . ' LIMIT 1');
- if ($query){
- $data = $query->fetchAll(PDO::FETCH_ASSOC);
- if (isset($data[ 0 ])){
- if ($is_single_column){
- return $data[ 0 ][ preg_replace('/^[\w]*\./i', "", $column) ];
- }
-
- if ($column === '*'){
- return $data[ 0 ];
- }
- $stack = array();
- foreach ($columns as $key => $value){
- if (is_array($value)){
- $this->data_map(0, $key, $value, $data[ 0 ], $stack);
- }else{
- $this->data_map(0, $key, preg_replace('/^[\w]*\./i', "", $value), $data[ 0 ], $stack);
- }
- }
- return $stack[ 0 ];
- }else{
- return false;
- }
- }else{
- return false;
- }
- }
- public function has($table, $join, $where = null){
- $column = null;
- $query = $this->query('SELECT EXISTS(' . $this->select_context($table, $join, $column, $where, 1) . ')');
- if ($query){
- return $query->fetchColumn() === '1';
- }else{
- return false;
- }
- }
- public function count($table, $join = null, $column = null, $where = null){
- $query = $this->query($this->select_context($table, $join, $column, $where, 'COUNT'));
- return $query ? 0 + $query->fetchColumn() : false;
- }
- public function max($table, $join, $column = null, $where = null){
- $query = $this->query($this->select_context($table, $join, $column, $where, 'MAX'));
- if ($query){
- $max = $query->fetchColumn();
- return is_numeric($max) ? $max + 0 : $max;
- }else{
- return false;
- }
- }
- public function min($table, $join, $column = null, $where = null){
- $query = $this->query($this->select_context($table, $join, $column, $where, 'MIN'));
- if ($query){
- $min = $query->fetchColumn();
- return is_numeric($min) ? $min + 0 : $min;
- }else{
- return false;
- }
- }
- public function avg($table, $join, $column = null, $where = null){
- $query = $this->query($this->select_context($table, $join, $column, $where, 'AVG'));
- return $query ? 0 + $query->fetchColumn() : false;
- }
- public function sum($table, $join, $column = null, $where = null){
- $query = $this->query($this->select_context($table, $join, $column, $where, 'SUM'));
- return $query ? 0 + $query->fetchColumn() : false;
- }
- public function action($actions){
- if (is_callable($actions)){
- $this->pdo->beginTransaction();
- $result = $actions($this);
- if ($result === false){
- $this->pdo->rollBack();
- }else{
- $this->pdo->commit();
- }
- }else{
- return false;
- }
- }
- public function debug(){
- $this->debug_mode = true;
- return $this;
- }
- public function error(){
- return $this->pdo->errorInfo();
- }
- public function last_query(){
- return end($this->logs);
- }
- public function log(){
- return $this->logs;
- }
- public function info(){
- $output = array(
- 'server' => 'SERVER_INFO',
- 'driver' => 'DRIVER_NAME',
- 'client' => 'CLIENT_VERSION',
- 'version' => 'SERVER_VERSION',
- 'connection' => 'CONNECTION_STATUS'
- );
- foreach ($output as $key => $value){
- $output[ $key ] = $this->pdo->getAttribute(constant('PDO::ATTR_' . $value));
- }
- return $output;
- }
-}
-
diff --git a/config/config.php b/config/config.php
index bba9c5d..558f60a 100755
--- a/config/config.php
+++ b/config/config.php
@@ -10,6 +10,7 @@ define('GLOBAL_DEBUG',0);//0 or 1
@date_default_timezone_set(@date_default_timezone_get());
@set_time_limit(1200);//20min pathInfoMuti,search,upload,download...
@ini_set("max_execution_time",1200);
+@ini_set('memory_limit','500M');//
@ini_set('session.cache_expire',1800);
if(GLOBAL_DEBUG){
@@ -99,4 +100,3 @@ $config['autorun'] = array(
array('controller'=>'user','function'=>'authCheck'),
array('controller'=>'user','function'=>'bindHook'),
);
-
diff --git a/config/i18n/ar/main.php b/config/i18n/ar/main.php
index 8deb7c3..fd119e4 100755
--- a/config/i18n/ar/main.php
+++ b/config/i18n/ar/main.php
@@ -157,14 +157,14 @@ return array(
"zip_download_ready" => "بعد ضغط تلقائيا التحميل، يرجى الانتظار ...",
"set_background" => "تعيين كخلفية سطح المكتب",
"share" => "سهم",
- "my_share" => "أنا مشتركة",
- "group_share" => "مجموعات من الحصة الأجنبية",
- "share_edit" => "تحرير حصة",
- "share_remove" => "إلغاء مشاركة",
- "share_remove_tips" => "موافق الغاء حصة؟ ستفشل فتح اتصال.",
- "share_path" => "مسار المشتركة",
+ "my_share" => "نصيبي",
+ "group_share" => "مشاركة المجموعة الخارجية",
+ "share_edit" => "تعديل المشاركة",
+ "share_remove" => "إلغاء المشاركة",
+ "share_remove_tips" => "هل تريد بالتأكيد إلغاء المشاركة؟ سيتم إبطال الاتصال العام.",
+ "share_path" => "مشاركة المسار",
"share_title" => "تقاسم الموارد",
- "share_name" => "حصة عنوان",
+ "share_name" => "مشاركة العنوان",
"share_time" => "انتهاء",
"share_time_desc" => "لم يتم تعيين لاغية",
"share_password" => "كلمة استخراج",
@@ -733,6 +733,8 @@ return array(
"PluginInstallSelf" => "التثبيت اليدوي",
"Plugin.config.auth" => "أذونات",
"Plugin.config.authDesc" => "كافة الإعدادات المتاحة، أو تحديد المستخدمين، ومجموعات المستخدمين وجماعات حقوق يمكن استخدام",
+ "Plugin.config.authOpen" => "الدخول المفتوح",
+ "Plugin.config.authOpenDesc" => "لا حاجة لزيارة يمكن الوصول إليها، ويمكن استخدامها للاتصال الخارجي واجهة",
"Plugin.config.authAll" => "حائز",
"Plugin.config.authUser" => "المستخدم",
"Plugin.config.authGroup" => "المجموعات",
diff --git a/config/i18n/bg/main.php b/config/i18n/bg/main.php
index a753fe8..96fa45e 100755
--- a/config/i18n/bg/main.php
+++ b/config/i18n/bg/main.php
@@ -157,14 +157,14 @@ return array(
"zip_download_ready" => "След компресия автоматично ще изтеглите, моля изчакайте ...",
"set_background" => "Задай като Desktop Wallpaper",
"share" => "дял",
- "my_share" => "споделих",
- "group_share" => "Групи от чуждестранни акции",
- "share_edit" => "Edit Share",
- "share_remove" => "премахване на споделянето",
- "share_remove_tips" => "OK Cancel Share? Open връзка ще се провали.",
- "share_path" => "Споделено Path",
- "share_title" => "Resource Sharing",
- "share_name" => "Сподели Title",
+ "my_share" => "Моят дял",
+ "group_share" => "Групово външно споделяне",
+ "share_edit" => "Редактирайте споделянето",
+ "share_remove" => "Отмяна на споделянето",
+ "share_remove_tips" => "Наистина ли искате да анулирате споделянето? Обществената връзка ще бъде деактивирана.",
+ "share_path" => "Споделете пътя",
+ "share_title" => "Споделяне на ресурси",
+ "share_name" => "Споделете заглавието",
"share_time" => "изтичане",
"share_time_desc" => "Null не е настроено",
"share_password" => "Екстракт парола",
@@ -733,6 +733,8 @@ return array(
"PluginInstallSelf" => "Ръчна инсталация",
"Plugin.config.auth" => "Разрешения",
"Plugin.config.authDesc" => "Всички на наличните настройки, свързани с определяне на потребителите, потребителски групи, правозащитни организации могат да използват",
+ "Plugin.config.authOpen" => "Отворен достъп",
+ "Plugin.config.authOpenDesc" => "Няма нужда да посещавате, може да се използва за външно разговор",
"Plugin.config.authAll" => "притежател",
"Plugin.config.authUser" => "потребител",
"Plugin.config.authGroup" => "Групи",
diff --git a/config/i18n/bn/main.php b/config/i18n/bn/main.php
index 2c20731..bee796b 100755
--- a/config/i18n/bn/main.php
+++ b/config/i18n/bn/main.php
@@ -157,14 +157,14 @@ return array(
"zip_download_ready" => "কম্প্রেশন স্বয়ংক্রিয়ভাবে ডাউনলোড হবে পরে, অনুগ্রহ করে অপেক্ষা করুন ...",
"set_background" => "যেমন ডেস্কটপ ওয়ালপেপার সেট করুন",
"share" => "ভাগ",
- "my_share" => "আমি ভাগ",
- "group_share" => "বিদেশী ভাগ গোষ্ঠীসমূহ",
- "share_edit" => "শেয়ার সম্পাদনা",
- "share_remove" => "Unsharing",
- "share_remove_tips" => "ওকে শেয়ার বাতিল করবেন? ওপেন সংযোগ ব্যর্থ হবে.",
- "share_path" => "শেয়ারকৃত পাথ",
- "share_title" => "রিসোর্স শেয়ারিং",
- "share_name" => "সেয়ার শিরোনাম",
+ "my_share" => "আমার শেয়ার",
+ "group_share" => "বাহ্যিক অংশীদারী গ্রুপ",
+ "share_edit" => "শেয়ার সম্পাদনা করুন",
+ "share_remove" => "ভাগ করা বাতিল করুন",
+ "share_remove_tips" => "আপনি কি ভাগ করা বাতিল করার বিষয়ে নিশ্চিত? পাবলিক সংযোগ অবৈধ হবে।",
+ "share_path" => "পথ ভাগ করুন",
+ "share_title" => "সম্পদ শেয়ারিং",
+ "share_name" => "শিরোনাম শেয়ার করুন",
"share_time" => "শ্বাসত্যাগ",
"share_time_desc" => "নাল সেট না করা হয়",
"share_password" => "এক্সট্র্যাক্ট পাসওয়ার্ড",
@@ -733,6 +733,8 @@ return array(
"PluginInstallSelf" => "ম্যানুয়াল ইনস্টলেশন",
"Plugin.config.auth" => "অনুমতিসমূহ",
"Plugin.config.authDesc" => "প্রাপ্তিসাধ্য সকল সেটিংস, অথবা নির্দিষ্ট ব্যবহারকারীদের ব্যবহারকারী গোষ্ঠী, অধিকার সংগঠনগুলো ব্যবহার করতে পারেন",
+ "Plugin.config.authOpen" => "অ্যাক্সেস খুলুন",
+ "Plugin.config.authOpenDesc" => "দেখার কোন প্রয়োজন অ্যাক্সেস করা যাবে না, বহিরাগত ইন্টারফেস কল জন্য ব্যবহার করা যেতে পারে",
"Plugin.config.authAll" => "ধারক",
"Plugin.config.authUser" => "ব্যবহারকারী",
"Plugin.config.authGroup" => "গ্রুপ",
diff --git a/config/i18n/ca/main.php b/config/i18n/ca/main.php
index 8865f6a..d83437b 100755
--- a/config/i18n/ca/main.php
+++ b/config/i18n/ca/main.php
@@ -156,15 +156,15 @@ return array(
"explorerNew" => "kod enllaç",
"zip_download_ready" => "Després de la compressió es descarrega automàticament, si us plau esperi ...",
"set_background" => "Establir com a Fons d'Escriptori",
- "share" => "quota",
- "my_share" => "vaig compartir",
- "group_share" => "Grups de participació estrangera",
- "share_edit" => "Edita Compartir",
- "share_remove" => "unsharing",
- "share_remove_tips" => "Acceptar Cancel Compartir? Obrir una connexió fallarà.",
- "share_path" => "ruta compartida",
- "share_title" => "Intercanvi de recursos",
- "share_name" => "compartir Títol",
+ "share" => "Comparteix",
+ "my_share" => "La meva participació",
+ "group_share" => "Compartició externa de grup",
+ "share_edit" => "Edita compartir",
+ "share_remove" => "Cancel·lació d'ús compartit",
+ "share_remove_tips" => "Estàs segur que vols cancel·lar la compartició? La connexió pública quedarà invalidada.",
+ "share_path" => "Comparteix el camí",
+ "share_title" => "Compartir recursos",
+ "share_name" => "Compartiu el títol",
"share_time" => "expiració",
"share_time_desc" => "Null no s'estableix",
"share_password" => "extracte de la contrasenya",
@@ -733,6 +733,8 @@ return array(
"PluginInstallSelf" => "Instal·lació manual",
"Plugin.config.auth" => "permisos",
"Plugin.config.authDesc" => "Tots els paràmetres disponibles, o especificar els usuaris, grups d'usuaris, grups de drets poden utilitzar",
+ "Plugin.config.authOpen" => "Accés obert",
+ "Plugin.config.authOpenDesc" => "No es pot accedir a la necessitat de visitar, es pot utilitzar per trucar a la interfície externa",
"Plugin.config.authAll" => "titular",
"Plugin.config.authUser" => "usuari",
"Plugin.config.authGroup" => "grups",
diff --git a/config/i18n/cs/main.php b/config/i18n/cs/main.php
index 071cc3a2d54ca343bfa17a35642975ae6c2f1f0e..7b9d270d569cd4b1b29a9d050daab9fad53cc3f2 100755
GIT binary patch
delta 330
zcmX9)Jxc>Y5Jf`F5zxvaLHzl3Ah KODExplorer - это веб-интерфейс с открытым исходным кодом, созданный для управления онлайн документами и редактирования кода. В нём использован классический оконный интерфейс, как у Windows. Он имеет набор онлайн инструментов для предварительного просмотра, редактирования, выгрузки, скачивания и распаковывания файлов, онлайн воспроизведения музыки. Вы можете работать прямо в браузере, смотреть код, а также напрямую разворачивать свой веб-сайт. Это удобно, быстро и безопасно. —Концепция дизайна—
Выбор, выделяя указателем мыши, перемещение или загрузка с помощью drag-and-drop, онлайн-редактор, видео-плеер, упаковка и распаковка архивов. Бесшовная интеграция всех частей; диалоговые окна, многофункциональный диспетчер задач и другие функции. Онлайн редактор поддерживает множество синтаксисов кода, такие как HTML, CSS, JS, а также многие-многие другие! Идеально поддерживает китайский язык... А также русский! -Примечание переводчика Идеально поддерживает китайский язык... А также русский! -Примечание переводчика Ctrl+Backspace - Вперед F2 - Переименовать выбранный файл(папку) Home/End/стрелки - Выбор файлов и навигация
\ No newline at end of file
diff --git a/config/i18n/ru/main.php b/config/i18n/ru/main.php
index 5190de9..54e0315 100755
--- a/config/i18n/ru/main.php
+++ b/config/i18n/ru/main.php
@@ -156,15 +156,15 @@ return array(
"explorerNew" => "KOD ссылка",
"zip_download_ready" => "Архив будет автоматически загружен, пожалуйста подождите...",
"set_background" => "Установить как обои для рабочего стола",
- "share" => "Общий доступ",
- "my_share" => "Общий доступ",
- "group_share" => "Публичная группа",
- "share_edit" => "Редактировать общий доступ",
- "share_remove" => "Удалить общий доступ",
- "share_remove_tips" => "Удалить общий доступ? Файл не будет доступен другим пользователям",
- "share_path" => "Путь к файлу",
- "share_title" => "Общий доступ",
- "share_name" => "Название файла",
+ "share" => "доля",
+ "my_share" => "Моя доля",
+ "group_share" => "Групповой внешний обмен",
+ "share_edit" => "Изменить долю",
+ "share_remove" => "Отменить обмен",
+ "share_remove_tips" => "Вы действительно хотите отменить совместное использование? Общественное соединение будет признано недействительным.",
+ "share_path" => "Доля пути",
+ "share_title" => "Совместное использование ресурсов",
+ "share_name" => "Поделиться заголовком",
"share_time" => "Истекает",
"share_time_desc" => "0 - никогда",
"share_password" => "Пароль",
@@ -281,7 +281,7 @@ return array(
"forget_password" => "Забыли пароль",
"forget_password_tips" => "Забыли пароль администратора: {{@LNG.copyright_desc}} [TOC] {{@LNG.copyright_desc}} [TOC] {{@LNG.copyright_desc}} {{@LNG.copyright_desc}} {{@LNG.copyright_desc}} {{@LNG.copyright_desc}} {{@LNG.copyright_desc}} [TOC] 标题 文字格式 水平线 无序列表 有序列表 图片 连接 引用 代码 公式 Headers Emphasis Line Unordered list Ordered list Image Links Blockquotes Code LaTeX Math7>;1)S_&lir|dIqEsavE(IV^Dh6>Te-IX#Ji(NGazYW?WF-U9$)|PYwEVpl9Mh7D
zQh{3R75oc;8p~3Pk}~sBGV{_EsuFV)ax;r_O0$8|lU?<6C(kk9WC=(t$(UTHr^8j0
hTAW{6l$@#%Jb8
Пожалуйста , войдите на сервер и удалите файл ./data/system/install.lockдля сброса пароля;
Обычный пользователь:
Пожалуйста, обратитесь к администратору, чтобы сбросить пароль.",
"copyright_desc" => "KodExplorer - это система управления веб-документами. Вы можете использовать её для внутреннего или совместного управления документами, на сервере для управления сайтом, замены FTP, и даже webIDE для интерактивного режима разработки. Вы также можете интегрировать её в другие системы.",
- "copyright_contact" => "Свяжитесь с нами: kodcloud@qq.com
Обратная связь",
+ "copyright_contact" => "Свяжитесь с нами: kodcloud@qq.comОбратная связь",
"copyright_info" => "Copyright © kodcloud.com Все права защищены.",
"copyright_pre" => "Powered by KodExplorer",
"kod_name" => "KodExplorer",
@@ -596,8 +596,8 @@ return array(
"action_add" => "Добавить",
"action_edit" => "Изменить",
"action_del" => "Удалить",
- "group_role_ext_warning" => "Не разрешено
Переименовывать, редактировать сохранять, загружать, распаковывать файлы",
- "group_tips" => "
Переименовывать, редактировать сохранять,
загружать, распаковывать файлы",
+ "group_tips" => "
支持管理的数据库:MySQL, PostgreSQL, SQLite, MS SQL, Oracle, SimpleDB, Elasticsearch, MongoDB, Firebird"
+ 'Adminer.meta.desc' => "Adminer 是一款全功能的数据库管理工具,类似phpMyAdmin,相比而言更轻量强大。
支持管理的数据库:MySQL, PostgreSQL, SQLite, MS SQL, Oracle, SimpleDB, Elasticsearch, MongoDB, Firebird
由于安全要求比较高,此插件仅限管理员可以使用"
);
\ No newline at end of file
diff --git a/plugins/adminer/package.json b/plugins/adminer/package.json
index 5f6841a..80b2fa0 100755
--- a/plugins/adminer/package.json
+++ b/plugins/adminer/package.json
@@ -16,12 +16,10 @@
"homePage":"https://www.adminer.org"
},
"configItem":{
- "pluginAuth":{
- "type":"userSelect",
- "value":"role:1",
- "display":"{{LNG.Plugin.config.auth}}",
- "desc":"{{LNG.Plugin.config.authDesc}}",
- "require":1
+ "menuSubMenu":{
+ "type":"switch",
+ "value":1,
+ "display":"{{LNG.menu_sub_menu}}"
}
}
}
diff --git a/plugins/officeLive/package.json b/plugins/officeLive/package.json
index e444579..4ffc236 100755
--- a/plugins/officeLive/package.json
+++ b/plugins/officeLive/package.json
@@ -18,7 +18,7 @@
"tabs":[
{
"name":"{{LNG.Plugin.tab.basic}}",
- "field":["sep001","pluginAuth","openWith","apiServer"]
+ "field":["pluginAuth","pluginAuthOpen","sep001","openWith","apiServer"]
}
]
},
@@ -29,6 +29,14 @@
"desc":"{{LNG.Plugin.config.authDesc}}",
"require":1
},
+ "pluginAuthOpen":{
+ "type":"switch",
+ "value":0,
+ "display":"{{LNG.Plugin.config.authOpen}}",
+ "desc":"{{LNG.Plugin.config.authOpenDesc}}",
+ "require":1
+ },
+ "sep001":"
",
"openWith":{
"type":"radio",
"value":"dialog",
@@ -45,7 +53,6 @@
"desc":"{{LNG.officeLive.Config.apiServerDesc}}",
"require":1
},
- "sep1001":"
",
"fileExt":{
"type":"tags",
"display":"{{LNG.Plugin.Config.fileExt}}",
diff --git a/plugins/yzOffice/php/assign/header.php b/plugins/yzOffice/php/assign/header.php
index 66fb8ee..1007013 100755
--- a/plugins/yzOffice/php/assign/header.php
+++ b/plugins/yzOffice/php/assign/header.php
@@ -36,7 +36,7 @@
}
div.navbar-inverse .navbar-inner {
- background:#eee;
+ background:#eee;filter:none;
background-image: linear-gradient(to bottom,#fff,#eee);
border-bottom: 1px solid #ddd;
background-repeat: repeat-x;
@@ -103,6 +103,11 @@
}
?>
+
"==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),t='";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n\n ',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()
-},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready),f=$('
':'':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='( )");var c='
{{/if}} {{app.title}} {{/each}}
{{/if}} {{app.title}} {{/each}}
"+t+''+o(a)+"
";$(".content-box").addClass("show-code").append(r),Hook.trigger("api.view.fileShow.showCode");var l=ace.edit(n);l.setTheme("ace/theme/tomorrow"),l.setReadOnly(!0),l.setShowPrintMargin(!1),l.getSession().setMode(i),l.getSession().setTabSize(4),l.getSession().setUseWrapMode(1),l.setFontSize(15)})},r=function(t){var a=e("../../edit/previewMarkdownParse");e.async("lib/markdown/markdown-it.min",function(){var e=window.markdownit({html:!0,breaks:!0,linkify:!0});core.fileGet(t,function(i){var n=e.render(i),o=pathTools.pathThis(urlDecode(t)),s=$('
")}}),$("body").bind("mousedown",function(){$(".ptips-skin").remove(),$.setStyle("body .ptips-skin{display:none !important;}","ptips-title")}).bind("mouseup",function(){$.setStyle("","ptips-title")}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,formMake:formMake,getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var a=trim(trim(e),"/");if(e={},"{"!=a.substring(0,1)||a.split("/").length>1)return{icon:"",name:""};e.pathType=a.match(/\{.*\}/),e.id=a.split(":")[1]}var i={};i[G.KOD_USER_SHARE]={icon:"user-self",name:LNG.my_share},i[G.KOD_GROUP_PATH]={icon:"group-self-owner"},i[G.KOD_GROUP_SHARE]={icon:"group-guest"},i[G.KOD_USER_SELF]={icon:"user-self"},i[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},i[G.KOD_USER_FAV]={icon:"tree-fav",name:LNG.fav},i[G.KOD_GROUP_ROOT_SELF]={icon:"group-self-root",name:LNG.my_kod_group},i[G.KOD_GROUP_ROOT_ALL]={icon:"group-root",name:LNG.kod_group};var n=i[e.pathType];return e.pathType==G.KOD_USER_SHARE&&G.userID!=e.id?n={icon:"user",name:t}:e.pathType==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"group-self-owner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),a=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];return-1!==$.inArray(t[0],a)?!0:!1},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{$.contextMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can-right-menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit-body").length||0!=$(t.target).parents(".aui-state-focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/"),i=t.substr(a+1);if(0==i.search("fileProxy")){i=urlDecode(i.substr(i.search("&path=")));var n=i.split("/");i=n[n.length-1],""==i&&(i=n[n.length-2])}return i},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/");return t.substr(0,a+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},pathUrlEncode:function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var a,i=this.pathClear(e);return G.isRoot&&t&&i.substring(0,G.webRoot.length)==G.webRoot?a=G.webHost+this.pathUrlEncode(i.replace(G.webRoot,"")):(a=G.appHost+"explorer/fileProxy&accessToken="+G.accessToken+"&path="+urlEncode(i),G.sharePage!==void 0&&(a=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(i),i.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE&&(a=G.appHost+"share/fileProxy&path="+urlEncode(i)))),a},pathCommon:function(e){if("http"==e.substr(0,4))return urlEncode(e);if(e.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE)return urlEncode(e);var t=this.pathClear(e),a=urlEncode(t);return G.sharePage!==void 0&&(a=urlEncode(G.KOD_USER_SHARE+":"+G.user+"/"+G.shareInfo.name+t)),a},isApp:function(e){if("undefined"==typeof Config)return!1;var t=Config.pageApp;return"string"==typeof e?t==e:$.isArray(e)?-1!==$.inArray(t,e)?!0:!1:!1},pathReadable:function(e){if("object"!=typeof G.jsonData)return!0;for(var t=G.jsonData.fileList,a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;t=G.jsonData.folderList;for(var a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;return!0},pathCurrentWriteable:function(){return core.isApp("editor")?!1:G.jsonData.info?G.jsonData.info.canUpload:!1},authCheck:function(e,t){return G.isRoot?!0:AUTH.hasOwnProperty(e)&&AUTH[e]?!0:(t&&(t=t===!0?LNG.no_permission:t,Tips.tips(t,!1)),!1)},ajaxError:function(e,t,a){console.log(e,t,a);var i=e.responseText,n=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==i&&(i="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),i='";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua29kY2xvdWQuY29tL3VwZGF0ZS9tYWluNC5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n\n ',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);
+var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready),f=$('
':'':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='( )");var c='
{{/if}} {{app.title}} {{/each}}
{{/if}} {{app.title}} {{/each}}
"+t+''+o(a)+"
";$(".content-box").addClass("show-code").append(r),Hook.trigger("api.view.fileShow.showCode");var l=ace.edit(n);l.setTheme("ace/theme/tomorrow"),l.setReadOnly(!0),l.setShowPrintMargin(!1),l.getSession().setMode(i),l.getSession().setTabSize(4),l.getSession().setUseWrapMode(1),l.setFontSize(15)})},r=function(t){var a=e("../../edit/previewMarkdownParse");e.async("lib/markdown/markdown-it.min",function(){var e=window.markdownit({html:!0,breaks:!0,linkify:!0});core.fileGet(t,function(i){var n=e.render(i),o=pathTools.pathThis(urlDecode(t)),s=$('
")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,formMake:formMake,getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var a=trim(trim(e),"/");if(e={},"{"!=a.substring(0,1)||a.split("/").length>1)return{icon:"",name:""};e.pathType=a.match(/\{.*\}/),e.id=a.split(":")[1]}var i={};i[G.KOD_USER_SHARE]={icon:"user-self",name:LNG.my_share},i[G.KOD_GROUP_PATH]={icon:"group-self-owner"},i[G.KOD_GROUP_SHARE]={icon:"group-guest"},i[G.KOD_USER_SELF]={icon:"user-self"},i[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},i[G.KOD_USER_FAV]={icon:"tree-fav",name:LNG.fav},i[G.KOD_GROUP_ROOT_SELF]={icon:"group-self-root",name:LNG.my_kod_group},i[G.KOD_GROUP_ROOT_ALL]={icon:"group-root",name:LNG.kod_group};var n=i[e.pathType];return e.pathType==G.KOD_USER_SHARE&&G.userID!=e.id?n={icon:"user",name:t}:e.pathType==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"group-self-owner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),a=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];return-1!==$.inArray(t[0],a)?!0:!1},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{$.contextMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can-right-menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit-body").length||0!=$(t.target).parents(".aui-state-focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/"),i=t.substr(a+1);if(0==i.search("fileProxy")){i=urlDecode(i.substr(i.search("&path=")));var n=i.split("/");i=n[n.length-1],""==i&&(i=n[n.length-2])}return i},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/");return t.substr(0,a+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},pathUrlEncode:function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var a,i=this.pathClear(e);return G.isRoot&&t&&i.substring(0,G.webRoot.length)==G.webRoot?a=G.webHost+this.pathUrlEncode(i.replace(G.webRoot,"")):(a=G.appHost+"explorer/fileProxy&accessToken="+G.accessToken+"&path="+urlEncode(i),G.sharePage!==void 0&&(a=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(i),i.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE&&(a=G.appHost+"share/fileProxy&path="+urlEncode(i)))),a},pathCommon:function(e){if("http"==e.substr(0,4))return urlEncode(e);if(e.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE)return urlEncode(e);var t=this.pathClear(e),a=urlEncode(t);return G.sharePage!==void 0&&(a=urlEncode(G.KOD_USER_SHARE+":"+G.user+"/"+G.shareInfo.name+t)),a},isApp:function(e){if("undefined"==typeof Config)return!1;var t=Config.pageApp;return"string"==typeof e?t==e:$.isArray(e)?-1!==$.inArray(t,e)?!0:!1:!1},pathReadable:function(e){if("object"!=typeof G.jsonData)return!0;for(var t=G.jsonData.fileList,a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;t=G.jsonData.folderList;for(var a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;return!0},pathCurrentWriteable:function(){return core.isApp("editor")?!1:G.jsonData.info?G.jsonData.info.canUpload:!1},authCheck:function(e,t){return G.isRoot?!0:AUTH.hasOwnProperty(e)&&AUTH[e]?!0:(t&&(t=t===!0?LNG.no_permission:t,Tips.tips(t,!1)),!1)},ajaxError:function(e){var t=e.responseText,a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),t='";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n\n ',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];
-e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready),f=$('
':'':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='( )");var c='
{{/if}} {{app.title}} {{/each}}
{{/if}} {{app.title}} {{/each}}
"+t+'
")}}),$("body").bind("mousedown",function(){$(".ptips-skin").remove(),$.setStyle("body .ptips-skin{display:none !important;}","ptips-title")}).bind("mouseup",function(){$.setStyle("","ptips-title")}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,formMake:formMake,getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var a=trim(trim(e),"/");if(e={},"{"!=a.substring(0,1)||a.split("/").length>1)return{icon:"",name:""};e.pathType=a.match(/\{.*\}/),e.id=a.split(":")[1]}var i={};i[G.KOD_USER_SHARE]={icon:"user-self",name:LNG.my_share},i[G.KOD_GROUP_PATH]={icon:"group-self-owner"},i[G.KOD_GROUP_SHARE]={icon:"group-guest"},i[G.KOD_USER_SELF]={icon:"user-self"},i[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},i[G.KOD_USER_FAV]={icon:"tree-fav",name:LNG.fav},i[G.KOD_GROUP_ROOT_SELF]={icon:"group-self-root",name:LNG.my_kod_group},i[G.KOD_GROUP_ROOT_ALL]={icon:"group-root",name:LNG.kod_group};var n=i[e.pathType];return e.pathType==G.KOD_USER_SHARE&&G.userID!=e.id?n={icon:"user",name:t}:e.pathType==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"group-self-owner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),a=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];return-1!==$.inArray(t[0],a)?!0:!1},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{$.contextMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can-right-menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit-body").length||0!=$(t.target).parents(".aui-state-focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/"),i=t.substr(a+1);if(0==i.search("fileProxy")){i=urlDecode(i.substr(i.search("&path=")));var n=i.split("/");i=n[n.length-1],""==i&&(i=n[n.length-2])}return i},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/");return t.substr(0,a+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},pathUrlEncode:function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var a,i=this.pathClear(e);return G.isRoot&&t&&i.substring(0,G.webRoot.length)==G.webRoot?a=G.webHost+this.pathUrlEncode(i.replace(G.webRoot,"")):(a=G.appHost+"explorer/fileProxy&accessToken="+G.accessToken+"&path="+urlEncode(i),G.sharePage!==void 0&&(a=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(i),i.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE&&(a=G.appHost+"share/fileProxy&path="+urlEncode(i)))),a},pathCommon:function(e){if("http"==e.substr(0,4))return urlEncode(e);if(e.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE)return urlEncode(e);var t=this.pathClear(e),a=urlEncode(t);return G.sharePage!==void 0&&(a=urlEncode(G.KOD_USER_SHARE+":"+G.user+"/"+G.shareInfo.name+t)),a},isApp:function(e){if("undefined"==typeof Config)return!1;var t=Config.pageApp;return"string"==typeof e?t==e:$.isArray(e)?-1!==$.inArray(t,e)?!0:!1:!1},pathReadable:function(e){if("object"!=typeof G.jsonData)return!0;for(var t=G.jsonData.fileList,a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;t=G.jsonData.folderList;for(var a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;return!0},pathCurrentWriteable:function(){return core.isApp("editor")?!1:G.jsonData.info?G.jsonData.info.canUpload:!1},authCheck:function(e,t){return G.isRoot?!0:AUTH.hasOwnProperty(e)&&AUTH[e]?!0:(t&&(t=t===!0?LNG.no_permission:t,Tips.tips(t,!1)),!1)},ajaxError:function(e,t,a){console.log(e,t,a);var i=e.responseText,n=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==i&&(i="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),i='";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua29kY2xvdWQuY29tL3VwZGF0ZS9tYWluNC5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n\n ',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];
+i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready),f=$('
':'':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='( )");var c='
{{/if}} {{app.title}} {{/each}}
{{/if}} {{app.title}} {{/each}}
"+t+'
")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,formMake:formMake,getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var a=trim(trim(e),"/");if(e={},"{"!=a.substring(0,1)||a.split("/").length>1)return{icon:"",name:""};e.pathType=a.match(/\{.*\}/),e.id=a.split(":")[1]}var i={};i[G.KOD_USER_SHARE]={icon:"user-self",name:LNG.my_share},i[G.KOD_GROUP_PATH]={icon:"group-self-owner"},i[G.KOD_GROUP_SHARE]={icon:"group-guest"},i[G.KOD_USER_SELF]={icon:"user-self"},i[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},i[G.KOD_USER_FAV]={icon:"tree-fav",name:LNG.fav},i[G.KOD_GROUP_ROOT_SELF]={icon:"group-self-root",name:LNG.my_kod_group},i[G.KOD_GROUP_ROOT_ALL]={icon:"group-root",name:LNG.kod_group};var n=i[e.pathType];return e.pathType==G.KOD_USER_SHARE&&G.userID!=e.id?n={icon:"user",name:t}:e.pathType==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"group-self-owner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),a=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];return-1!==$.inArray(t[0],a)?!0:!1},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{$.contextMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can-right-menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit-body").length||0!=$(t.target).parents(".aui-state-focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/"),i=t.substr(a+1);if(0==i.search("fileProxy")){i=urlDecode(i.substr(i.search("&path=")));var n=i.split("/");i=n[n.length-1],""==i&&(i=n[n.length-2])}return i},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/");return t.substr(0,a+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},pathUrlEncode:function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var a,i=this.pathClear(e);return G.isRoot&&t&&i.substring(0,G.webRoot.length)==G.webRoot?a=G.webHost+this.pathUrlEncode(i.replace(G.webRoot,"")):(a=G.appHost+"explorer/fileProxy&accessToken="+G.accessToken+"&path="+urlEncode(i),G.sharePage!==void 0&&(a=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(i),i.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE&&(a=G.appHost+"share/fileProxy&path="+urlEncode(i)))),a},pathCommon:function(e){if("http"==e.substr(0,4))return urlEncode(e);if(e.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE)return urlEncode(e);var t=this.pathClear(e),a=urlEncode(t);return G.sharePage!==void 0&&(a=urlEncode(G.KOD_USER_SHARE+":"+G.user+"/"+G.shareInfo.name+t)),a},isApp:function(e){if("undefined"==typeof Config)return!1;var t=Config.pageApp;return"string"==typeof e?t==e:$.isArray(e)?-1!==$.inArray(t,e)?!0:!1:!1},pathReadable:function(e){if("object"!=typeof G.jsonData)return!0;for(var t=G.jsonData.fileList,a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;t=G.jsonData.folderList;for(var a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;return!0},pathCurrentWriteable:function(){return core.isApp("editor")?!1:G.jsonData.info?G.jsonData.info.canUpload:!1},authCheck:function(e,t){return G.isRoot?!0:AUTH.hasOwnProperty(e)&&AUTH[e]?!0:(t&&(t=t===!0?LNG.no_permission:t,Tips.tips(t,!1)),!1)},ajaxError:function(e){var t=e.responseText,a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),t='";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n\n ',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];
-if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready),f=$('
':'':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='( )");var c='
{{/if}} {{app.title}} {{/each}}
{{/if}} {{app.title}} {{/each}}
"+t+'
"+s:c+"
"+s}var d=function(){$.ajax({url:r,type:"POST",dataType:"json",data:l,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(a){if(Tips.close(a),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.selfShare=a.info;var i=$.dialog.list["share-dialog"];void 0!=i&&i.close()}o==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof t&&t(a)}})};a?d():$.dialog({id:"dialog-path-remove",fixed:!0,icon:"question",title:o,padding:"40px 40px",lock:!0,background:"#000",opacity:.1,content:"
";for(var n=40,o=0;e.length>o;o++){var s=e[o],r=s.path;r=n>r.length?r:"..."+r.substr(-n),i+="
"+s.type+": "+r+""}i+='').fadeIn(100)},error:function(){core.ajaxError(),a.html(LNG.error)},success:function(e){u(e)}})};s()}}),define("app/path/tpl/search.html",[],"
\n
\n {{each v.searchInfo value index}}\n
\n
")}}),$("body").bind("mousedown",function(){$(".ptips-skin").remove(),$.setStyle("body .ptips-skin{display:none !important;}","ptips-title")}).bind("mouseup",function(){$.setStyle("","ptips-title")}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,formMake:formMake,getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var a=trim(trim(e),"/");if(e={},"{"!=a.substring(0,1)||a.split("/").length>1)return{icon:"",name:""};e.pathType=a.match(/\{.*\}/),e.id=a.split(":")[1]}var i={};i[G.KOD_USER_SHARE]={icon:"user-self",name:LNG.my_share},i[G.KOD_GROUP_PATH]={icon:"group-self-owner"},i[G.KOD_GROUP_SHARE]={icon:"group-guest"},i[G.KOD_USER_SELF]={icon:"user-self"},i[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},i[G.KOD_USER_FAV]={icon:"tree-fav",name:LNG.fav},i[G.KOD_GROUP_ROOT_SELF]={icon:"group-self-root",name:LNG.my_kod_group},i[G.KOD_GROUP_ROOT_ALL]={icon:"group-root",name:LNG.kod_group};var n=i[e.pathType];return e.pathType==G.KOD_USER_SHARE&&G.userID!=e.id?n={icon:"user",name:t}:e.pathType==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"group-self-owner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),a=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];return-1!==$.inArray(t[0],a)?!0:!1},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{$.contextMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can-right-menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit-body").length||0!=$(t.target).parents(".aui-state-focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/"),i=t.substr(a+1);if(0==i.search("fileProxy")){i=urlDecode(i.substr(i.search("&path=")));var n=i.split("/");i=n[n.length-1],""==i&&(i=n[n.length-2])}return i},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/");return t.substr(0,a+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},pathUrlEncode:function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var a,i=this.pathClear(e);return G.isRoot&&t&&i.substring(0,G.webRoot.length)==G.webRoot?a=G.webHost+this.pathUrlEncode(i.replace(G.webRoot,"")):(a=G.appHost+"explorer/fileProxy&accessToken="+G.accessToken+"&path="+urlEncode(i),G.sharePage!==void 0&&(a=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(i),i.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE&&(a=G.appHost+"share/fileProxy&path="+urlEncode(i)))),a},pathCommon:function(e){if("http"==e.substr(0,4))return urlEncode(e);if(e.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE)return urlEncode(e);var t=this.pathClear(e),a=urlEncode(t);return G.sharePage!==void 0&&(a=urlEncode(G.KOD_USER_SHARE+":"+G.user+"/"+G.shareInfo.name+t)),a},isApp:function(e){if("undefined"==typeof Config)return!1;var t=Config.pageApp;return"string"==typeof e?t==e:$.isArray(e)?-1!==$.inArray(t,e)?!0:!1:!1},pathReadable:function(e){if("object"!=typeof G.jsonData)return!0;for(var t=G.jsonData.fileList,a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;t=G.jsonData.folderList;for(var a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;return!0},pathCurrentWriteable:function(){return core.isApp("editor")?!1:G.jsonData.info?G.jsonData.info.canUpload:!1},authCheck:function(e,t){return G.isRoot?!0:AUTH.hasOwnProperty(e)&&AUTH[e]?!0:(t&&(t=t===!0?LNG.no_permission:t,Tips.tips(t,!1)),!1)},ajaxError:function(e,t,a){console.log(e,t,a);var i=e.responseText,n=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==i&&(i="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),i='";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua29kY2xvdWQuY29tL3VwZGF0ZS9tYWluNC5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n\n ',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];
+if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready),f=$('
':'':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='( )");var c='
{{/if}} {{app.title}} {{/each}}
{{/if}} {{app.title}} {{/each}}
"+t+'
"+s:c+"
"+s}var d=function(){$.ajax({url:r,type:"POST",dataType:"json",data:l,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(a){if(Tips.close(a),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.selfShare=a.info;var i=$.dialog.list["share-dialog"];void 0!=i&&i.close()}o==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof t&&t(a)}})};a?d():$.dialog({id:"dialog-path-remove",fixed:!0,icon:"question",title:o,padding:"40px 40px",lock:!0,background:"#000",opacity:.1,content:"
";for(var n=40,o=0;e.length>o;o++){var s=e[o],r=s.path;r=n>r.length?r:"..."+r.substr(-n),i+="
"+s.type+": "+r+""}i+='').fadeIn(100)},error:function(e,t,i){core.ajaxError(e,t,i),a.html(LNG.error)},success:function(e){u(e)}})};s()}}),define("app/path/tpl/search.html",[],"
\n
\n {{each v.searchInfo value index}}\n
\n
")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,formMake:formMake,getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var a=trim(trim(e),"/");if(e={},"{"!=a.substring(0,1)||a.split("/").length>1)return{icon:"",name:""};e.pathType=a.match(/\{.*\}/),e.id=a.split(":")[1]}var i={};i[G.KOD_USER_SHARE]={icon:"user-self",name:LNG.my_share},i[G.KOD_GROUP_PATH]={icon:"group-self-owner"},i[G.KOD_GROUP_SHARE]={icon:"group-guest"},i[G.KOD_USER_SELF]={icon:"user-self"},i[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},i[G.KOD_USER_FAV]={icon:"tree-fav",name:LNG.fav},i[G.KOD_GROUP_ROOT_SELF]={icon:"group-self-root",name:LNG.my_kod_group},i[G.KOD_GROUP_ROOT_ALL]={icon:"group-root",name:LNG.kod_group};var n=i[e.pathType];return e.pathType==G.KOD_USER_SHARE&&G.userID!=e.id?n={icon:"user",name:t}:e.pathType==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"group-self-owner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),a=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];return-1!==$.inArray(t[0],a)?!0:!1},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{$.contextMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can-right-menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit-body").length||0!=$(t.target).parents(".aui-state-focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/"),i=t.substr(a+1);if(0==i.search("fileProxy")){i=urlDecode(i.substr(i.search("&path=")));var n=i.split("/");i=n[n.length-1],""==i&&(i=n[n.length-2])}return i},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/");return t.substr(0,a+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},pathUrlEncode:function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var a,i=this.pathClear(e);return G.isRoot&&t&&i.substring(0,G.webRoot.length)==G.webRoot?a=G.webHost+this.pathUrlEncode(i.replace(G.webRoot,"")):(a=G.appHost+"explorer/fileProxy&accessToken="+G.accessToken+"&path="+urlEncode(i),G.sharePage!==void 0&&(a=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(i),i.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE&&(a=G.appHost+"share/fileProxy&path="+urlEncode(i)))),a},pathCommon:function(e){if("http"==e.substr(0,4))return urlEncode(e);if(e.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE)return urlEncode(e);var t=this.pathClear(e),a=urlEncode(t);return G.sharePage!==void 0&&(a=urlEncode(G.KOD_USER_SHARE+":"+G.user+"/"+G.shareInfo.name+t)),a},isApp:function(e){if("undefined"==typeof Config)return!1;var t=Config.pageApp;return"string"==typeof e?t==e:$.isArray(e)?-1!==$.inArray(t,e)?!0:!1:!1},pathReadable:function(e){if("object"!=typeof G.jsonData)return!0;for(var t=G.jsonData.fileList,a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;t=G.jsonData.folderList;for(var a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;return!0},pathCurrentWriteable:function(){return core.isApp("editor")?!1:G.jsonData.info?G.jsonData.info.canUpload:!1},authCheck:function(e,t){return G.isRoot?!0:AUTH.hasOwnProperty(e)&&AUTH[e]?!0:(t&&(t=t===!0?LNG.no_permission:t,Tips.tips(t,!1)),!1)},ajaxError:function(e){var t=e.responseText,a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),t='";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n\n ',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];
-if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready),f=$('
':'':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='( )");var c='
{{/if}} {{app.title}} {{/each}}
{{/if}} {{app.title}} {{/each}}
"+t+''+htmlEncode(a);if(t){t.title(i);var n=G.appHost+"editor/edit";G.sid!==void 0&&(n=G.appHost+"share/edit&user="+G.user+"&sid="+G.sid),n=n+"#filename="+urlEncode(a),window.parent.$(".openEditor .aui-content iframe").attr("src",n)}}catch(o){}$("title").text(core.pathThis(a))}},g=function(e,t){try{Editor.current().completer.popup.hide()}catch(i){}$(".edit-tab .this").removeClass("this"),$(".edit-tab .tab-"+e).addClass("this"),a=e,t&&$(".edit-tab .this").stop(!0,!0).animate({opacity:.5},50).animate({opacity:.8},50).animate({opacity:.5},50).animate({opacity:1},50,function(){}),v(),H(),D(),N(),Toolbar.toolbarSelected(),b(),Hook.trigger("editor.selectTab",Editor.current())},b=function(){var e=P();e&&void 0!==e.kod&&Editor.searchBox&&Editor.searchBox.isShow()&&(Editor.searchBox.setEditor(Editor,Editor.current()),Editor.searchBox.find(!1,!1,!0))},y=function(e,t){if(void 0!=e&&""!=e){$(".edit-body .this").removeClass("this"),$(".edit-body #"+e).parent().addClass("this"),g(e,t);
-var a=$(".tab-"+e).attr("data-name");j(function(e){e.ui.tree.setSelect(a)})}},k=function(e,i,n){var o=t;$.extend(!0,{},G.codeConfig),void 0!=n&&(o={},o[n]?o[n]=t[n]:o[a]=t[a]);var s=function(e){var t=Number(!Number(e));return isNaN(t)?0:t};i!==void 0?G.codeConfig[e]=i:(G.codeConfig[e]=s(G.codeConfig[e]),i=G.codeConfig[e]),Toolbar.toolbarSelected();for(var r in o){var l=o[r];if(l&&l.kod&&l.resize)switch(-1!=$.inArray(e,["fontSize","autoWrap","fontFamily"])&&h(l),e){case"theme":l.setTheme("ace/theme/"+i);break;case"tabSize":l.getSession().setTabSize(parseInt(i));break;case"showGutter":l.renderer.setShowGutter(parseInt(i));break;case"softTab":l.getSession().setUseSoftTabs(parseInt(i));break;case"fontSize":l.setFontSize(parseInt(i));break;case"autoWrap":l.getSession().setUseWrapMode(parseInt(i));break;case"displayChar":l.setShowInvisibles(parseInt(i));break;case"fontFamily":x();break;case"keyboardType":"ace"==G.codeConfig.keyboardType?l.setKeyboardHandler():l.setKeyboardHandler("ace/keyboard/"+G.codeConfig.keyboardType);break;case"functionList":break;case"autoComplete":l.setOptions({enableLiveAutocompletion:G.codeConfig[e]}),l.$enableBasicAutocompletion=G.codeConfig[e];break;default:}}$.ajax({url:G.appHost+"editor/setConfig&k="+e+"&v="+G.codeConfig[e],dataType:"json",success:function(){}})},x=function(){var e=G.codeConfig.fontFamily;e="'"+e+"',Monaco,Menlo,Consolas,source-code-pro,'Liberation Mono','Ubuntu Mono','Microsoft Yahei','微软雅黑',Courier,'Helvetica Neue','Lantinghei SC',STXihei,WenQuanYi,sans-serif",$(".ace-editor-content").css("font-family",e)},w=function(e){var a=t;for(var i in a){var n=a[i];if(n&&n.kod&&n.resize)switch(e){case"resize":n.resize();break;case"setting":n.commands.exec("showSettingsMenu",n);break;default:}}"resize"==e&&N()},N=function(){var e=P();if(e){var t=$("#"+e.kod.uuid).parent().find(".edit-right-frame"),a=0;t.hasClass("hidden")||(a=100*(t.width()/$(window).width())),$(".edit-body .bottom-toolbar").css("right",a+"%")}},L=function(e,t){t!=e.hasChanged&&(e.hasChanged=t,$(".edit-tab .tabs .tab-"+e.kod.uuid).toggleClass("edit-changed"))},_=function(e,i){if(void 0!=a){void 0==e&&(e=a),void 0==i&&(i=!1);var n=t[e];if(void 0==n||""==n)return Tips.tips(LNG.data_error,"warning"),void 0;if(n.hasChanged){P().focus();var o=n.kod.filename;""==o?core.api.pathSelect({type:"file",title:LNG.newfile_save_as},function(e){T(n,e,i)}):T(n,o,i)}}},C=function(){for(var e in t)""!=t[e].kod.filename&&_(e)},T=function(e,t,a){if("view"===e.kod.tabType)return Tips.tips(LNG.error,"warning"),void 0;var i={path:t,charset:e.kod.charset,filestr:e.getValue()};e.kod.charsetSave&&(i.charsetSave=e.kod.charsetSave);var n=G.appHost+"editor/fileSave";G.sharePage!==void 0&&(n=G.appHost+"share/fileSave&user="+G.user+"&sid="+G.sid),e.kod.base64&&(i.base64="1",i.filestr=base64Encode(i.filestr)),i.filestr=urlEncode(i.filestr),""==e.kod.filename&&(i.create_file=1),Tips.loading(LNG.getting,!0),$(".tab-"+e.kod.uuid).addClass("loading"),$.ajax({type:"POST",dataType:"json",url:n,data:i,error:core.ajaxError,success:function(i){return $(".tab-"+e.kod.uuid).removeClass("loading"),i.code?(Tips.close(LNG.success,!0),""==e.kod.filename&&(e.kod.filename=t,S(e)),L(e,!1),v(),a&&A(e.kod.uuid),void 0):(Tips.close(i,!1),void 0)}})},S=function(e){var t=e.kod.filename;e.kod.name=core.pathThis(t),e.kod.mode=p(t),e.kod.theUrl=G.appHost+"editor/fileGet&filename="+t;var a=$(".tab-"+e.kod.uuid);a.attr("title",t),a.find(".name").html(e.kod.name)},E=function(e){if(void 0==e&&(e=a),void 0==t[e])return A(e),void 0;var i=t[e];i.hasChanged?$.dialog({title:LNG.warning,resize:!1,background:"#fff",opacity:.4,lock:!0,icon:"question",content:i.kod.name+"
"+LNG.if_save_file,padding:40,button:[{name:LNG.button_save,focus:!0,callback:function(){_(e,!0)}},{name:LNG.button_not_save,callback:function(){A(e)}}]}):A(e)},A=function(e){delete t[e];var a="",i=$(".edit-tab .tab"),n=$(".edit-tab .tab-"+e),o=$(".edit-body pre#"+e).parent();n.removeClass("edit-tab-menu"),n.hasClass("this")?($(i[0]).attr("uuid")==e?a=$(i[1]).attr("uuid"):i.each(function(){var t=$(this).attr("uuid");return t==e?!1:(a=t,void 0)}),""!=a&&$(".edit-body pre#"+a).addClass("this"),o.remove(),Tap.resetWidth("remove",n,a)):(o.remove(),Tap.resetWidth("remove",n)),D()},D=function(){0==$(".edit-body .tabs .edit-content").length?(P()&&P().kod.preview.close(),$(".disable-mask,.introduction").removeClass("hidden"),$(".bottom-toolbar").addClass("hidden"),$(".edit-body .tabs").addClass("hidden")):($(".disable-mask,.introduction").addClass("hidden"),$(".bottom-toolbar").removeClass("hidden"),$(".edit-body .tabs").removeClass("hidden")),j(function(e){var t=[];$(".edit-tab .tabs .edit-tab-menu").each(function(){var e=$(this).attr("data-name");e&&t.push(e)}),e.ui.fileHistory(t)})},j=function(e){ShareData.frameTop("",function(t){t.core&&t.core.isApp("editor")&&0!=t.$("#page-editor").length&&"function"==typeof e&&e(t)})},z=function(){for(var e in t)try{if(t[e].hasChanged)return!0}catch(a){}return!1},I=function(e){core.setSkin(e)},P=function(){return a&&t[a]&&t[a].focus?t[a]:!1},O=function(e){var a=P();e&&(a=t[e]);var i=a.kod.theUrl,e=a.kod.uuid;return""==i?(Tips.tips(LNG.not_exists,"warning"),void 0):($(".tab-"+e).addClass("loading"),Tips.loading(LNG.loading),i+="&charset="+a.kod.charset,core.fileGet(i,function(t,i){Tips.close(),$(".tab-"+e).removeClass("loading");var n=i.data,o="";if(null==n.content&&(n.content=""),"php"==n.ext&&0==n.content.indexOf(o)){var s=n.content.substr(o.length);n.content=o+js_beautify(s)}"oexe"==n.ext&&(n.content=js_beautify(n.content)),a.kod.charset=n.charset,a.kod.base64=n.base64,a.getSession().setValue(n.content);var r=a.getFirstVisibleRow();a.scrollToLine(r),L(a,!1)},function(t){t||(t=LNG.error),Tips.close(t),Tips.tips(t,!1),$(".tab-"+e).removeClass("loading")}),void 0)},R=function(){ShareData.data("FILE_SEARCH_AT")&&setTimeout(function(){for(var e=ShareData.data("FILE_SEARCH_AT"),t=P(),a={row:e.line-1,column:0};e.lineIndex-->=0;){t.selection.moveTo(a.row,a.column);var i=-1==e.lineIndex?!0:!1,n=t.find(e.search,{},i);a=n.end}t.session.highlight(t.$search.$options.re),t.renderer.updateBackMarkers(),ShareData.remove("FILE_SEARCH_AT")},100)},M=function(e){e||(e=G.codeConfig.theme);var t=["ambiance","idle_fingers","monokai","pastel_on_dark","twilight","solarized_dark","tomorrow_night_blue","tomorrow_night_eighties"];return inArray(t,e)?!0:!1},H=function(){var e=Editor.current();if(e){var t=e.selection.getCursor(),a=t.row+1+":"+(t.column+1);e.selection.rangeCount>1&&(a+=" ["+e.selection.rangeCount+"]");for(var i=e.selection.getAllRanges(),n=0,o=0,s=0;i.length>s;s++){var r={start:i[s].start,end:i[s].end},l=e.selection.doc.getTextRange(r);n+=l.length,o+=r.end.row-r.start.row+1}n>0&&(a+=" ("+n+" ~ "+o+")"),$(".editor_position").html(a)}};return{init:d,current:P,getParentEditor:j,hasFileSave:z,setChanged:L,saveConfig:k,doAction:w,setTheme:I,isBlackTheme:M,select:y,remove:E,save:_,saveall:C,refresh:O,getFileMode:p,aceModeList:aceModeList,add:function(e){e=urlDecode(e);var t=c("filename",e);""!=t?(y(t,!0),R()):u(e)}}}),define("app/src/edit/preview",["./previewMarkdown","./previewMarkdownParse","./functionList","./markdownTools"],function(e){return function(t){var a=$("#"+t.kod.uuid).parent(".edit-content"),i=a.find(".edit-right-frame"),n=$("#"+t.kod.uuid),o=a.find(".function-list-frame"),s=a.find(".preview-url-frame"),r=a.find(".preview-markdown-frame"),l=e("./previewMarkdown"),c=e("./functionList"),d=e("./markdownTools"),p=new l(t),u=new c(t),f=10,h=function(){a.find(".preview-url-tool input").keyEnter(L);var e=a.find(".resize"),t=0;e.drag({start:function(){t=i.width(),e.addClass("resize-active"),$("body").css("cursor","col-resize"),i.append(''),i.addClass("can-not-select")},move:function(a){var o=t-a,s=$(window).width();o>=s-f&&(o=s-f),f>=o&&(o=f),n.width(s-o),i.width(o),e.css("left",s-o+"px")},end:function(){e.removeClass("resize-active"),$("body").css("cursor","default"),i.find(".mask-view").remove(),i.removeClass("can-not-select"),m()}})},m=function(){if(0==$(".markdown-full-page").length){if(i.is(":visible")){var e=i.width(),t=$(window).width();e>=t-f&&(e=t-f),f>=e&&(e=f);var s=100*parseFloat(e/t);i.width(s+"%"),n.width(100-s+"%");var l=a.find(".resize");l.css("left",100-s+"%"),o.is(":visible")&&i.attr("data-size-width",e),r.is(":visible")&&p.refreshScroll()}Editor.doAction("resize")}},v=function(){a.find(".edit-right-frame .box a,.function-list-tool .box a,[markdown-action]").bind("click",function(t){var i=$(this).attr("class");switch($(this).attr("markdown-action")&&(i=$(this).attr("markdown-action")),i){case"tool-markdown-menu":if(a.find(".markdown-menu-box").toggleClass("hidden"),!a.find(".markdown-menu-box").hasClass("hidden")){var n=p.markdownMenu(a.find(".markdown-preview"));a.find(".markdown-menu-box .content").html(n)}break;case"tool-markdown-download-html":p.markdownDownload(a.find(".markdown-preview").html(),"html");break;case"tool-markdown-download-pdf":p.markdownDownload(a.find(".markdown-preview").html(),"pdf");break;case"tool-markdown-download-markdown":p.markdownDownload("","md");break;case"tool-markdown-full":a.toggleClass("markdown-full"),a.hasClass("markdown-full")&&(a.find(".ace_editor").css("width","50%"),a.find(".edit-right-frame").css("width","50%"),a.find(".resize").css("left","50%")),Editor.doAction("resize");break;case"tool-markdown-setting":a.find(".markdown-setting").toggleClass("hidden");break;case"tool-markdown-help":if(""==a.find(".markdown-help .content").html()){var n="";n="zh-CN"==G.lang||"zh-TW"==G.lang?e("./tpl/markdownHelpCN.html"):e("./tpl/markdownHelp.html"),a.find(".markdown-help .content").html(n)}a.find(".markdown-help").toggleClass("hidden");break;case"tool-markdown-max":a.toggleClass("markdown-full-page"),a.hasClass("markdown-full-page")||m();break;case"tool-open-url":y();break;case"tool-refresh":L();break;case"tool-close":N();break;case"tool-markdown-help":break;default:}return stopPP(t),!1})},g=function(e){var l=0;if(i.removeClass("hidden"),o.addClass("hidden"),r.addClass("hidden"),s.addClass("hidden"),a.find(".resize").removeClass("hidden"),"function-list"==e)o.removeClass("hidden"),l=200,u.refresh(),i.find(".function-search input").focus();else if("markdown"==e)l=.51*$(window).width(),r.removeClass("hidden"),p.refresh(),d.bindEvent(a,t);else if("html"==e){l=.5*$(window).width(),s.removeClass("hidden");var c=t.kod.filename;c=core.path2url(c),i.find(".preview-url-tool input").val(c),i.find("iframe").attr("src",c)}i.css({width:l}),n.css({width:$(window).width()-l}),m()},b=function(){o.hasClass("hidden")?r.hasClass("hidden")||p.refresh():u.refresh()},y=function(e){if(r.hasClass("hidden"))window.open(a.find(".preview-url-frame input").attr("value"));else{var t=p.markdown2html(a.find(".markdown-preview").html()),i=window.open("","_blank","");i.document.open("text/html","replace"),i.opener=null,i.document.write(t),i.document.close()}stopPP(e)},k=function(){return u.support(t.kod.mode)?(o.hasClass("hidden")?(autoFunctionList=1,g("function-list")):(autoFunctionList=0,N()),Editor.saveConfig("functionList",autoFunctionList),void 0):(Tips.tips(LNG.not_support,"warning"),void 0)},x=function(){i.hasClass("hidden")?w()||g("html"):r.hasClass("hidden")&&g("html")},w=function(){return autoFunctionList&&u.support(t.kod.mode)?(g("function-list"),!0):"markdown"==t.kod.mode?(g("markdown"),!0):!1},N=function(){(s.hasClass("hidden")||!w())&&(i.addClass("hidden"),o.addClass("hidden"),r.addClass("hidden"),s.addClass("hidden"),a.find(".resize").addClass("hidden"),$(".markdown-full-page").removeClass("markdown-full-page"),n.css("width","100%"),Editor.doAction("resize"))},L=function(){var e=a.find(".preview-url-tool input"),t=e.attr("value");a.find(".open-browser").attr("href",t),a.find("iframe").attr("src",t)},_=function(){h(),v(),w();var e,n=function(){clearTimeout(e),e=!1,e=setTimeout(function(){o.is(":visible")&&(i.width(i.attr("data-size-width")),m())},10)};$(window).bind("resize",n),d.bindEvent(a,t)};return _(),{open:g,editChange:b,close:N,resize:m,openFunctionList:k,previewForce:x}}}),define("app/src/edit/previewMarkdown",["./previewMarkdownParse"],function(e){var t=e("./previewMarkdownParse"),a=function(){$(".edit-right-frame .markdown-menu a").die("click").live("click",function(e){stopPP(e);var t=$(this).parents(".right-main"),a=t.find("[data-link='"+$(this).attr("href")+"']");if(0!=a.length){var i=a.offset().top+t.scrollTop()-t.offset().top+"px";t.stop(!0).animate({scrollTop:i},100,"linear")}})},i=function(){var e="newfile",t=Editor.current().kod.filename;return""!=t&&(t=core.pathThis(t),e=t.substr(0,t.indexOf("."))),e},n=function(t){var a=e("./tpl/markdownPreview.html"),n=template.compile(a),o=n({addStyle:G.staticPath+"js/lib/markdown/katex/katex.min.css",content:t,title:i(),black_theme:Editor.isBlackTheme()});return o=o.replace(/ data-link="#(.*?)">/g,'>')},o=function(e,t){var a=i()+"."+t;switch(t){case"html":$.htmlDownload(n(e),a);break;case"md":var o=Editor.current(),s=o.getValue();$.htmlDownload(s,a);break;case"pdf":$.htmlPrint(n(e));break;default:}};return function(){var i,s,r,l,c=!1,d=!1,p=function(){if(i=Editor.current(),i&&void 0!==i.focus){var e=i.kod.uuid;s=$("#"+e).parent().find(".markdown-preview"),r=$("#"+e).parent().find(".edit-right-frame .right-main"),h(),f(),a(),t.bindBigView()}},u=function(){e.async("lib/markdown/markdown-it.min",function(){if(s&&0!=s.length&&window.markdownit){var e=window.markdownit({html:!0,breaks:!0,linkify:!0}),a=i.getValue(),n=e.render(a),o=$(".markdown-buffer");0==o.length&&($("").appendTo("body"),o=$(".markdown-buffer")),o.html(n),t.menu(o),t.code(o,function(){t.math(o,function(){t.flow(o,function(){s.html(o.html()),o.remove(),y()})})})}})},f=function(){var e,t=function(){return!r.find(".preview-markdown-frame").hasClass("hidden")};i.session.on("changeScrollTop",function(){!d&&t()&&(c=!0,k(!0),clearTimeout(e),e=!1,e=setTimeout(function(){c=!1},1e3))}),i.on("change",function(){!d&&t()&&(c=!0,y(function(){k(!0),clearTimeout(e),e=!1,e=setTimeout(function(){c=!1},1e3)}))})},h=function(){return},m=[],v=[],g=function(){if(void 0!==i.kod.mode&&"markdown"==i.kod.mode&&window.markdownit){m=[];for(var e="\n...\n"+i.getValue(),t=0,a=window.markdownit(),n=a.parse(e,{references:{}}),o=["h1","h2","h3","h4","h5","h6"],s=0;n.length>s;s++)if($.inArray(n[s].tag,o)>=0&&"heading_open"==n[s].type){var r=i.session.documentToScreenPosition(n[s].map[0]-1,2),l=r.row*i.renderer.lineHeight;m.push({start:t,end:l,height:l-t}),t=l}}},b=function(){if(r&&0!=r.length){v=[];var e=0,t=r.scrollTop();s.find("h1,h2,h3,h4,h5,h6").each(function(){var a=$(this).position().top+t+parseInt($(this).css("margin-top"));v.push({start:e,end:a,height:a-e}),e=a})}},y=function(e){clearTimeout(l),l=!1,l=setTimeout(function(){g(),b(),"function"==typeof e&&e()},200)},k=function(e){var t=i.session.getScrollTop(),a=r.scrollTop(),n=function(e,t,a,i){for(var n,o=-1,s=0;e.length>s&&(o=s,n=e[s],!(e[s].end>t));s++);if(!(-1===o||o>=a.length)){var r=(t-n.start)/n.height,l=a[o],c=l.start+l.height*r;o==e.length-1&&t>=n.end-5&&(c=l.end),i(c)}};e?n(m,t,v,function(e){r.stop(!0).animate({scrollTop:e},100,"linear")}):a+r.height()>=r.prop("scrollHeight")-5?i.gotoLine(i.session.getLength()):n(v,a,m,function(e){i.session.setScrollTop(e)})};return p(),{refresh:u,refreshScroll:y,markdownMenu:t.getMenu,markdown2html:n,markdownDownload:o}}}),define("app/src/edit/previewMarkdownParse",[],function(e){var t={},a=[],i=function(e,i){var n=t,o=a,s=100;if(void 0==i){if(n[e]){var r=lodash.findIndex(o,{key:e});return o[r]={key:e,time:timeFloat()},n[e]}return!1}if(lodash.size(n)>=s){for(var l=lodash.sortBy(o,"time").reverse(),c=lodash.map(l,"key"),d=c.length-1;d>s-1;d--){var p=c[d];delete n[p]}o=l.slice(0,s-1)}return n[e]=i,o.push({key:e,time:timeFloat()}),!0},n=function(e){var t="";return e.find("h1,h2,h3,h4,h5,h6").each(function(){var e="markdown-"+$(this).text().replace(/\s+/g,"-"),a="markdown-menu-"+$(this)[0].tagName.toLowerCase();$(this).attr("data-link","#"+e),t+='","class":"strikethrough"},h1:{type:"head",insert:"# ",title:"Header 1 ","class":"text-height"},h2:{type:"head",insert:"## ",title:"Header 2
"},h3:{type:"head",insert:"### ",title:"Header 3
"},h4:{type:"head",insert:"#### ",title:"Header 4
"},h5:{type:"head",insert:"###### ",title:"Header 5
"},quote:{type:"head",insert:"> ",title:"Quote
(Ctrl-Q)","class":"quote-left"},list_order:{type:"head",insert:" 1. ",title:"Unordered list
(Ctrl-O)","class":"list-ol"},list_unorder:{type:"head",insert:" - ",title:"Ordered list
(Ctrl-U)","class":"list-ul"},list_task:{type:"head",insert:"- [ ] ",title:"Incomplete task list","class":"check-empty"},list_task_complete:{type:"head",insert:"- [x] ",title:"Complete task list","class":"check"},line:{type:"insert",insert:"\n\n\n----\n$1",title:"Line
","class":"minus"},link:{type:"insert",insert:"[${1:}](http://$2)",title:"Link (Ctrl-L)","class":"link"},image:{type:"image",insert:"",title:"Image (Ctrl-G)","class":"picture"},table:{type:"insert",insert:"\n\n\n| header 1 | header 2 |\n| ----------- | ----------- |\n| row 1 col 1 | row 1 col 2 |\n| row 2 col 1 | row 2 col 2 |\n\n",title:"Table
","class":"table"},code:{type:"inlineBlock",title:"Code
(Ctrl-K)","class":"code",inline:{tag:"`",insert:"`${1:Code}`"},block:{tag:"\n```\n",insert:"\n```\n${1:code}\n```\n"}},math:{type:"inlineBlock",title:"Math (Ctrl-M)","class":"superscript",inline:{tag:"$$",insert:"$$${1:Math}$$"},block:{tag:"\n```\n",insert:"\n```math\n${1:}\n```\n"}},flowchart:{type:"insert",title:"flowchart diagram","class":"long-arrow-right",insert:"\n```mermaid\ngraph LR\nA-->B\n```\n"},sequence:{type:"insert",title:"Sequence diagram","class":"exchange",insert:"\n```mermaid\nsequenceDiagram\nA->>B: How are you?\nB->>A: Great!\n```\n"},gantt:{type:"insert",title:"Gantt diagram","class":"tasks",insert:"\n```mermaid\ngantt\ndateFormat YYYY-MM-DD\nsection S1\nT1: 2014-01-01, 9d\nsection S2\nT2: 2014-01-11, 9d\nsection S3\nT3: 2014-01-02, 9d\n```\n"},classDiagram:{type:"insert",title:"classDiagram diagram","class":"sitemap",insert:"\n```mermaid\nclassDiagram\nBaseClass <|-- AveryLongClass : Cool\nBaseClass : size()\nBaseClass : int chimp\nBaseClass : int gorilla\n```\n"},gitGraph:{type:"insert",title:"gitGraph diagram","class":"sitemap",insert:"\n```mermaid\nclassDiagram\nBaseClass <|-- AveryLongClass : Cool\nBaseClass : size()\nBaseClass : int chimp\nBaseClass : int gorilla\n```\n"}},a=function(e,t){var a=e.session.getTextRange(e.getSelectionRange()),i=t.insert;if(""!==a&&(i=i.replace(/\{1:.*\}/g,"{1:"+a+"}")),""!==a){var n=e.getSelectionRange(),o={start:{row:n.start.row,column:n.start.column-t.tag.length},end:n.start},s={start:n.end,end:{row:n.end.row,column:n.end.column+t.tag.length}};e.session.getTextRange(o)==t.tag&&e.session.getTextRange(s)==t.tag&&(e.selection.setSelectionRange({start:o.start,end:s.end}),i="${1:"+a+"}")}ace.snippetManager.insertSnippet(e,i)},i=function(e,t){for(var a=e.getSelectionRange(),i=[],n=a.end.row-a.start.row+1,o=0,s=0;n>s;s++){var r={start:{row:a.start.row+s,column:0},end:{row:a.start.row+s,column:t.insert.length}};i.push(r),e.session.getTextRange(r)==t.insert&&o++}for(var s=0;n>s;s++){var l=i[s];n==o?e.session.doc.remove(l):e.session.doc.insert({row:l.start.row,column:0},t.insert)}},n=function(e,t){var a=e.session.getTextRange(e.getSelectionRange()),i=t.insert;""!==a&&(i=i.replace(/\{1:.*\}/g,"{1:"+a+"}")),ace.snippetManager.insertSnippet(e,i)},o=function(e,t){var i=e.session.getTextRange(e.getSelectionRange()),n=e.getSelectionRange(),o=e.session.getLine(n.start.row),s={type:"inline",tag:t.inline.tag,insert:t.inline.insert,title:t.title};(n.start.row!=n.end.row||i===o.replace(/(^\s*)|(\s*$)/g,""))&&(s={type:"inline",tag:t.block.tag,insert:t.block.insert,title:t.title}),a(e,s)},s=function(){var e=["bold","italic","strikethrough","|","h1","line","quote","list_order","list_unorder","|","link","image","code","table","|","math","flowchart","sequence","gantt","classDiagram","|"],a="";return $.each(e,function(e,i){if("|"==i)a+="|";else{var n=t[i],o="class='md-tools md-tools-"+i+" "+(n["class"]?"icon-"+n["class"]:"")+"' ";a+=""}}),a},r=function(e){var t={type:"file",title:LNG.path_api_select_image,allowExt:"png|jpg|bmp|gif|jpeg|ico|svg|tiff"};core.api.pathSelect(t,function(t){core.fileLink(t,function(a){var i=core.pathThis(t),n="";ace.snippetManager.insertSnippet(e,n)})})},l=function(s){var l=t[s],c=e();if(l&&c){switch(l.type){case"inline":a(c,l,s);break;case"head":i(c,l,s);break;case"insert":n(c,l,s);break;case"inlineBlock":o(c,l,s);break;case"image":r(c);break;default:}e().focus()}},c=function(e){e.find(".md-tools[data-action]").bind("click",function(){var e=$(this).attr("data-action");l(e)})},d=function(e){$.each(t,function(a){var i=t[a];if(i.title&&i.title.match(/\((.*)\)/)){var n=i.title.match(/\((.*)\)/)[1],o=n.replace("Ctrl","Command");e.commands.addCommand({name:a,bindKey:{win:n,mac:o},exec:function(e){"ace/mode/markdown"==e.session.$modeId&&l(a)}})}})};return{bindEvent:function(e,t){e.find(".toolbar .content").html(s()),c(e),"ace/mode/markdown"==t.session.$modeId&&d(t)},doAction:l}}),define("app/src/edit/tpl/markdownHelpCN.html",[],'
1.标题与文字格式
\n\n# 一级标题\n## 二级标题\n### 三级标题\n#### 四级标题\n##### 五级标题\n
\n\n*斜体*\n**粗体**\n***粗斜体*** \n~~删除线~~\n
\n\n--- \n
\n了解更多\n2.列表
\n\n- item 1\n- item 2\n* item 3\n(可以是[减号,星号,加号]+空格)\n
\n\n1. item 1 [数字+空格]\n2. item 2\n3. item 3\n - child 1\n - child 2\n
\n3.其他
\n\n\n
\n\n\n[链接名称](http://链接网址)\n<http://链接网址>\n
\n\n\n> 引用\n> 折行可以不加,新起一行要加\n
\n\n\n行内代码:`code`\n```\nvar msg = "多行代码";\nalert(msg);\n```\n
\n\n\n行内公式 $$E=mc^2$$ ;\n\n多行公式\n$$E=mc^2$$\n\n多行公式2\n```math\nE=mc^2\n```\n
\n编辑器 | \n公式教程
\n流程图 | 时序图 | 甘特图 | 类图
\n1.Headers and Emphasis
\n\n# Header 1\n## Header 2\n### Header 3\n#### Header 4\n##### Header 5\n
\n\n*Emphasis*\n**Strong**\n***Emphasis Strong*** \n~~Strikethrough~~\n
\n\n--- \n
\nLearn More\n2.Lists
\n\n- item 1\n- item 2\n* item 3\n(also[- ,* ,+ )\n
\n\n1. item 1\n2. item 2\n3. item 3\n - child 1\n - child 2\n
\n3.Others
\n\n\n
\n\n\n[Link text](http://url)\n<http://url>\n
\n\n\n> Are you \n> ok ?\n
\n\n\ninline code:`code`\n```\nvar msg = "Block code";\nalert(msg);\n```\n
\n\n\ninline $$E=mc^2$$ ;\n\nblock\n$$E=mc^2$$\n\nblock2\n```math\nE=mc^2\n```\n
\nMath Editor \nFlowcharts \n