From 3cc77d34a41912d37ec9a3399d24a5c2e3557362 Mon Sep 17 00:00:00 2001 From: warlee <824691958@qq.com> Date: Sat, 26 Aug 2017 17:16:57 +0800 Subject: [PATCH] version 4.05; --- ChangeLog.md | 28 +++ app/api/sso.class.php | 58 ++++++ app/api/sso.php | 50 ----- app/controller/explorer.class.php | 2 +- app/controller/pluginApp.class.php | 4 +- app/controller/user.class.php | 82 ++++---- app/controller/util.php | 4 +- app/desktop_app.php | 59 ++++++ app/function/helper.function.php | 20 +- app/kod/.cache_data | 4 +- app/kod/Hook.class.php | 10 +- app/kod/ImageThumb.class.php | 21 +- app/kod/PluginBase.class.php | 3 +- app/template/common/footer.html | 23 ++- app/template/desktop/index.html | 10 +- app/template/explorer/explorerWap.html | 36 +++- app/template/user/install.html | 2 +- app/template/user/login.html | 20 +- app/template/user/loginWap.html | 27 ++- app/update.php | 5 +- config/config.php | 19 +- config/i18n/.4686f38f62.log | 1 + config/i18n/.a96aca3653.log | 1 - config/i18n/ar/main.php | 12 +- config/i18n/bg/main.php | 12 +- config/i18n/bn/main.php | 12 +- config/i18n/ca/main.php | 12 +- config/i18n/cs/main.php | Bin 53657 -> 54109 bytes config/i18n/da/main.php | Bin 52041 -> 52426 bytes config/i18n/de/main.php | Bin 54913 -> 55329 bytes config/i18n/el/main.php | 12 +- config/i18n/en/main.php | 12 +- config/i18n/es/main.php | 12 +- config/i18n/et/main.php | Bin 51323 -> 51757 bytes config/i18n/fa/main.php | 12 +- config/i18n/fi/main.php | Bin 52796 -> 53236 bytes config/i18n/fr/main.php | Bin 56227 -> 56711 bytes config/i18n/gl/main.php | Bin 54126 -> 54602 bytes config/i18n/hi/main.php | 12 +- config/i18n/hr/main.php | Bin 52871 -> 53311 bytes config/i18n/hu/main.php | Bin 54735 -> 55197 bytes config/i18n/id/main.php | Bin 52235 -> 52639 bytes config/i18n/it/main.php | Bin 54751 -> 55281 bytes config/i18n/ja/main.php | 12 +- config/i18n/ko/main.php | Bin 54949 -> 55388 bytes config/i18n/lt/main.php | Bin 54357 -> 54824 bytes config/i18n/nl/main.php | Bin 53360 -> 53806 bytes config/i18n/no/main.php | Bin 52118 -> 52512 bytes config/i18n/pl/main.php | Bin 54225 -> 54648 bytes config/i18n/pt/main.php | Bin 54624 -> 55102 bytes config/i18n/ro/main.php | Bin 55352 -> 55866 bytes config/i18n/ru/main.php | 12 +- config/i18n/si/main.php | 12 +- config/i18n/sk/main.php | Bin 53914 -> 54344 bytes config/i18n/sl/main.php | Bin 52119 -> 52550 bytes config/i18n/sr/main.php | 12 +- config/i18n/sv/main.php | Bin 52720 -> 53108 bytes config/i18n/ta/main.php | 12 +- config/i18n/th/main.php | 12 +- config/i18n/tr/main.php | Bin 52702 -> 53149 bytes config/i18n/uk/main.php | 12 +- config/i18n/uz/main.php | Bin 53361 -> 53809 bytes config/i18n/vi/main.php | Bin 58072 -> 58534 bytes config/i18n/zh-CN/main.php | 12 +- config/i18n/zh-TW/main.php | 12 +- config/version.php | 2 +- plugins/adminer/adminer/index.php | 5 +- plugins/adminer/adminer/sso2.php | 5 + plugins/adminer/app.php | 5 +- plugins/photoSwipe/static/page.js | 129 ++++++------ plugins/simpleClock/static/main.js | 7 +- plugins/toolsCommon/static/main.js | 3 + plugins/yzOffice/package.json | 2 +- plugins/zipView/app.php | 9 + plugins/zipView/static/zipView.js | 57 +++--- static/js/app/src/api/view/main.js | 8 +- static/js/app/src/app/main.js | 8 +- static/js/app/src/desktop/main.js | 16 +- static/js/app/src/edit/main.js | 10 +- static/js/app/src/editor/main.js | 12 +- static/js/app/src/explorer/main.js | 16 +- static/js/app/src/explorerWap/main.js | 12 +- static/js/app/src/plugins/main.js | 8 +- static/js/app/src/plugins/tpl/main.js | 2 +- static/js/app/src/setting/main.js | 8 +- static/js/app/src/shareEditor/main.js | 10 +- static/js/app/src/shareExplorer/main.js | 14 +- static/js/app/src/shareIndex/main.js | 8 +- static/js/app/src/user/main.js | 6 +- static/js/lib/artDialog/jquery-artDialog.js | 37 +++- static/js/lib/util.js | 39 +++- static/style/login.css | 45 +++- 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 | 6 +- 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 | 4 +- static/style/wap/app_explorer.css | 215 +++++++++++++++++++- static/style/wap/login.css | 64 +++++- 111 files changed, 1091 insertions(+), 476 deletions(-) create mode 100755 app/api/sso.class.php delete mode 100755 app/api/sso.php create mode 100755 app/desktop_app.php create mode 100755 config/i18n/.4686f38f62.log delete mode 100755 config/i18n/.a96aca3653.log create mode 100755 plugins/adminer/adminer/sso2.php diff --git a/ChangeLog.md b/ChangeLog.md index dfcdebd..54d4269 100755 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,31 @@ +### ver4.05 `2017/8/26` +----- +#### update: +- 4.0稳定优化版 +- 登陆开放接口;优化提供认证登陆给其他程序优化 +- 开启/关闭 图片略缩图功能[] +- 图片幻灯片播放增强:支持文件列表、压缩文件内、搜索结构、编辑器树目录等同级目录的多张图片打开 +- 压缩文件内的压缩文件支持继续打开 +- 文件打开接口hook,target统一设置 +- 桌面图标大小和文件列表图标大小分开 +- 移动端: + - 拖拽兼容触摸事件;宽度调整;对话框拖拽 + - 弹出菜单,点击其他区域默认隐藏 + - 打开图片播放处理 + - 移动端返回:空路径 + - 底部版本展示优化,登陆页样式优化 + - title自适应优化 + +#### fix bug +- 修复头部导航栏下拉菜单被对话框挡住问题解决 +- photoSwipe 图片播放重复打开,蒙版没有消失问题 +- CAD预览水印显示登录信息; +- office在线编辑、授权用户的底部信息会丢失等问题修复 +- 桌面默认图标升级丢失问题 + + + + ### ver4.03 `2017/8/20` ----- #### update: diff --git a/app/api/sso.class.php b/app/api/sso.class.php new file mode 100755 index 0000000..15b0c16 --- /dev/null +++ b/app/api/sso.class.php @@ -0,0 +1,58 @@ +';var_dump($_SESSION);echo '';exit; + return $_SESSION; + } + + /** + * 设置session 认证 + * @param [type] $key [认证key] + */ + static public function sessionSet($key,$value='success'){ + self::init(); + @session_start(); + $_SESSION[$key] = $value; + @session_write_close(); + } + + + static public function sessionCheck($key,$value='success'){ + $session = self::init(); + if( isset($session[$key]) && + $session[$key] == $value){ + return true; + } + return false; + } + + /** + * 直接调用kod的登陆检测(适用于同服务器同域名;) + * @param [type] $kodHost kod的地址;例如 http://test.com/ + * @param [type] $appKey 应用标记 例如 loginCheck + * @param [type] $appUrl 验证后跳转到的url + * @param [type] $auth 验证方式:例如:'check=userName&value=smartx' + * check (userID|userName|roleID|roleName|groupID|groupName) 校验方式,为空则所有登陆用户 + */ + static public function sessionAuth($appKey,$auth,$kodHost,$appUrl=''){ + $authUrl = rtrim($kodHost,'/').'/index.php?user/sso&app='.$appKey.'&'.$auth; + if($appUrl == ''){ + $appUrl = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME']. + ':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; + } + if(!self::sessionCheck($appKey)){ + header('Location: '.$authUrl.'&link='.rawurlencode($appUrl)); + exit; + } + } +} diff --git a/app/api/sso.php b/app/api/sso.php deleted file mode 100755 index e0dbd13..0000000 --- a/app/api/sso.php +++ /dev/null @@ -1,50 +0,0 @@ -path; }else { - $cm=new ImageThumb($image,'file'); + $cm = new ImageThumb($image,'file'); $cm->prorate($imageThumb,250,250);//生成等比例缩略图 } } diff --git a/app/controller/pluginApp.class.php b/app/controller/pluginApp.class.php index e6e122f..ec5f331 100755 --- a/app/controller/pluginApp.class.php +++ b/app/controller/pluginApp.class.php @@ -25,10 +25,10 @@ class pluginApp extends Controller{ } $model = $this->loadModel('Plugin'); if(!$model->checkAuth($route[2])){ - show_tips("Plugin not open,or you have't permission"); + show_tips("Plugin not open,or you have't permission[".$route[2]."]"); } if(!$this->checkAccessPlugin()){ - show_tips("Sorry! You have't permission"); + show_tips("Sorry! You have't permission[".$route[2]."]"); } Hook::apply($route[2].'Plugin.'.$route[3]); } diff --git a/app/controller/user.class.php b/app/controller/user.class.php index 5effd18..be997e8 100755 --- a/app/controller/user.class.php +++ b/app/controller/user.class.php @@ -158,53 +158,51 @@ class user extends Controller{ */ public function sso(){ $result = false; - $error = "not login"; - if(isset($_SESSION) && $_SESSION['kodLogin'] == 1){//避免session不可写导致循环跳转 - $user = $_SESSION['kodUser']; - //admin 或者不填则允许所有kod用户登陆 - if( $user['role'] == '1' || - !isset($this->in['check']) || - !isset($this->in['value']) ){ - $result = true; - } + $error = "未登录!"; + if(!isset($_SESSION) || $_SESSION['kodLogin'] != 1){//避免session不可写导致循环跳转 + $this->login($error); + } + $user = $_SESSION['kodUser']; + //admin 或者不填则允许所有kod用户登陆 + if( $user['role'] == '1' || + !isset($this->in['check']) || + !isset($this->in['value']) ){ + $result = true; + } - $checkValue = false; - switch ($this->in['check']) { - case 'userID':$checkValue = $user['userID'];break; - case 'userName':$checkValue = $user['name'];break; - case 'roleID':$checkValue = $user['role'];break; - case 'roleName': - $role = systemRole::getInfo($user['role']); - $checkValue = $role['name']; - break; - case 'groupID': - $checkValue = array_keys($user['groupInfo']); - break; - case 'groupName': - $checkValue = array(); - foreach ($user['groupInfo'] as $groupID=>$val){ - $item = systemGroup::getInfo($groupID); - $checkValue[] = $item['name']; - } - break; - default:break; - } - if(!$result && $checkValue != false){ - if( (is_string($checkValue) && $checkValue == $this->in['value']) || - (is_array($checkValue) && in_array($this->in['value'],$checkValue)) - ){ - $result = true; - }else{ - $error = $this->in['check'].' not accessed, It\'s must be "'.$this->in['value'].'"'; + $checkValue = false; + switch ($this->in['check']) { + case 'userID':$checkValue = $user['userID'];break; + case 'userName':$checkValue = $user['name'];break; + case 'roleID':$checkValue = $user['role'];break; + case 'roleName': + $role = systemRole::getInfo($user['role']); + $checkValue = $role['name']; + break; + case 'groupID': + $checkValue = array_keys($user['groupInfo']); + break; + case 'groupName': + $checkValue = array(); + foreach ($user['groupInfo'] as $groupID=>$val){ + $item = systemGroup::getInfo($groupID); + $checkValue[] = $item['name']; } + break; + default:break; + } + if(!$result && $checkValue != false){ + if( (is_string($checkValue) && $checkValue == $this->in['value']) || + (is_array($checkValue) && in_array($this->in['value'],$checkValue)) + ){ + $result = true; + }else{ + $error = $this->in['check'].' 没有权限, 配置权限需要为: "'.$this->in['value'].'"'; } } if($result){ - @session_name('KOD_SESSION_SSO'); - @session_id($_COOKIE['KOD_SESSION_SSO']); - @session_start(); - $_SESSION[$this->in['app']] = 'success'; - @session_write_close(); + include(LIB_DIR.'api/sso.class.php'); + SSO::sessionSet($this->in['app']); header('location:'.$this->in['link']); exit; } diff --git a/app/controller/util.php b/app/controller/util.php index a59db81..260cec4 100755 --- a/app/controller/util.php +++ b/app/controller/util.php @@ -1,2 +1,2 @@ -0x001){$GLOBALS[$؂{0x019}]=trim($[0x001]);}else{$GLOBALS[$؂{0x019}]=$؂{0x000017};}break;}}switch($GLOBALS[$؂[0x00016]]){case $؂{0x000017}:$=iconv_system(HOME).$;˼艹Ŕε;break;͉󅇉վѼᾗځԱǧ轣;case KOD_USER_RECYCLE:$GLOBALS[$؂[0x0000018]]=trim(USER_RECYCLE,$؂{0x00011});$GLOBALS[$؂{0x019}]=$؂{0x000017};return iconv_system(USER_RECYCLE).$؂{0x00011}.str_replace(KOD_USER_RECYCLE,$؂{0x000017},$);ф;case KOD_USER_SELF:$GLOBALS[$؂[0x0000018]]=trim(HOME_PATH,$؂{0x00011});$GLOBALS[$؂{0x019}]=$؂{0x000017};;return iconv_system(HOME_PATH).$؂{0x00011}.str_replace(KOD_USER_SELF,$؂{0x000017},$);case KOD_USER_FAV:$GLOBALS[$؂[0x0000018]]=trim(KOD_USER_FAV,$؂{0x00011});٭˶Ɏ쿦Ҥ;$GLOBALS[$؂{0x019}]=$؂{0x000017};䵣Ιؽе旡☄;return KOD_USER_FAV;Ǧē辊ëż;case KOD_GROUP_ROOT_SELF:$GLOBALS[$؂[0x0000018]]=trim(KOD_GROUP_ROOT_SELF,$؂{0x00011});;$GLOBALS[$؂{0x019}]=$؂{0x000017};return KOD_GROUP_ROOT_SELF;;case KOD_GROUP_ROOT_ALL:$GLOBALS[$؂[0x0000018]]=trim(KOD_GROUP_ROOT_ALL,$؂{0x00011});$GLOBALS[$؂{0x019}]=$؂{0x000017};return KOD_GROUP_ROOT_ALL;case KOD_GROUP_PATH:$=systemGroup::getInfo($GLOBALS[$؂{0x019}]);if(!$GLOBALS[$؂{0x019}]|| !$)return !1;owner_group_check($GLOBALS[$؂{0x019}]);$GLOBALS[$؂[0x0000018]]=group_home_path($);$=iconv_system($GLOBALS[$؂[0x0000018]]).$;Ԡ䃨؉㮑ϖɔݑ騯;break;case KOD_GROUP_SHARE:$=systemGroup::getInfo($GLOBALS[$؂{0x019}]);if(!$GLOBALS[$؂{0x019}]|| !$)return !1;owner_group_check($GLOBALS[$؂{0x019}]);ضίŎ俰㌴;$GLOBALS[$؂[0x0000018]]=group_home_path($).$؂[0x00001c];$=iconv_system($GLOBALS[$؂[0x0000018]]).$;break;;case KOD_USER_SHARE:$=systemMember::getInfo($GLOBALS[$؂{0x019}]);딩ŀߣ̔ĕ;if(!$GLOBALS[$؂{0x019}]|| !$)return !1;if($GLOBALS[$؂{0x019}]!=$_SESSION[$؂{0x000001d}][$؂[0x01e]]){$=$GLOBALS[$؂{0x001f}][$؂[0x00020]][$؂{0x000021}][$؂[0x0000022]];path_role_check($);}$GLOBALS[$؂[0x0000018]]=$؂{0x000017};$GLOBALS[$؂[0x001a]]=$;Г;if($==$؂{0x000017}){return $;}else{$߹=explode($؂{0x00011},$);$߹[0]=iconv_app($߹[0]);$=systemMember::userShareGet($GLOBALS[$؂{0x019}],$߹[0]);$GLOBALS[$؂{0x023}]=$;$GLOBALS[$؂[0x001a]]=KOD_USER_SHARE.$؂{0x0001b}.$GLOBALS[$؂{0x019}].$؂{0x00011}.$߹[0].$؂{0x00011};unset($߹[0]);if(!$)return !1;$׆=rtrim($[$؂[0x0024]],$؂{0x00011}).$؂{0x00011}.iconv_app(implode($؂{0x00011},$߹));if($[$؂{0x00025}]!=$؂{0x000021}){$֔=user_home_path($);$GLOBALS[$؂[0x0000018]]=$֔.rtrim($[$؂[0x0024]],$؂{0x00011}).$؂{0x00011};$=$֔.$׆;}else{$GLOBALS[$؂[0x0000018]]=$[$؂[0x0024]];$=$׆;}if($[$؂[0x000026]]==$؂{0x0000027}){$GLOBALS[$؂[0x001a]]=rtrim($GLOBALS[$؂[0x001a]],$؂{0x00011});$GLOBALS[$؂[0x0000018]]=rtrim($GLOBALS[$؂[0x0000018]],$؂{0x00011});}$=iconv_system($);}break;;default:break;ٟ¹󶗜Ũ➮瞑吭ێ̵;}if($!=$؂{0x00011}){$=rtrim($,$؂{0x00011});if(is_dir($))$=$.$؂{0x00011};}return $;}function _DIR_OUT($){$㙣=&$GLOBALS{};if(is_array($)){foreach($[$㙣[0x028]] as $ݤ=>&$){$[$㙣[0x0024]]=preClear($[$㙣[0x0024]]);}foreach($[$㙣{0x0029}] as $ݤ=>&$){$[$㙣[0x0024]]=preClear(rtrim($[$㙣[0x0024]],$㙣{0x00011}).$㙣{0x00011});}}else{$=preClear($);}return $;}function preClear($){$Κ=&$GLOBALS{};$Ǥ=$GLOBALS[$Κ[0x00016]];;$=rtrim($GLOBALS[$Κ[0x0000018]],$Κ{0x00011});$=array(KOD_USER_FAV,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL);if(isset($GLOBALS[$Κ[0x00016]])&& in_array($GLOBALS[$Κ[0x00016]],$)){return $;}if(ST==$Κ[0x0002a]){return str_replace($,$Κ{0x000017},$);}if($GLOBALS[$Κ{0x019}]!=$Κ{0x000017}){$Ǥ.=$Κ{0x0001b}.$GLOBALS[$Κ{0x019}].$Κ{0x00011};}if(isset($GLOBALS[$Κ[0x001a]])){$Ǥ=$GLOBALS[$Κ[0x001a]];}$=$Ǥ.str_replace($,$Κ{0x000017},$);$=str_replace($Κ{0x00002b},$Κ{0x00011},$);return $;ď靖ϱ޻;}include(CLASS_DIR.$GLOBALS{}[0x000002c]);function owner_group_check($){$=&$GLOBALS{};if(!$)show_json(LNG(${0x02d}).$,!1);if($GLOBALS[${0x0000013}]||(isset($GLOBALS[$[0x002e]])&& $GLOBALS[$[0x002e]]===!0)){return;}$=systemMember::userAuthGroup($);if($==!1){if($GLOBALS[$[0x00016]]==KOD_GROUP_PATH){show_json(LNG(${0x0002f}),!1);}else if($GLOBALS[$[0x00016]]==KOD_GROUP_SHARE){$=$GLOBALS[${0x001f}][$[0x00020]][${0x000021}];}}else{$=$GLOBALS[${0x001f}][$[0x000030]][$];ц߃;}path_role_check($[$[0x0000022]]);㤄;}function path_role_check($){$Ӿ=&$GLOBALS{};if($GLOBALS[$Ӿ{0x0000013}]||(isset($GLOBALS[$Ӿ[0x002e]])&& $GLOBALS[$Ӿ[0x002e]]===!0)){return;}$=role_permission_arr($);if(!isset($[ST.$Ӿ{0x0000031}.ACT])&& ST!=$Ӿ[0x0002a]){show_json(LNG($Ӿ[0x032]),!1);}}function role_permission_arr($¸){$=&$GLOBALS{};$=array();ΓǨ;$=$GLOBALS[${0x001f}][${0x0033}];Լуܪԙ;foreach($¸ as $=>$){if(!$)continue;$=explode(${0x0001b},$);΄ʔ;if(count($)==0x0002&& is_array($[$[0]])&& is_array($[$[0]][$[0x001]])){$=array_merge($,$[$[0]][$[0x001]]);}}$=array();Ψʅ™ᱯ榩;foreach($ as $){$[$]=${0x000021};}return $;ۻ㴳;}function space_size_use_check(){$=&$GLOBALS{};if(!system_space())return;if($GLOBALS[${0x0000013}]==0x001)return;if(isset($GLOBALS[$[0x00034]])&& isset($GLOBALS[${0x019}])&& $GLOBALS[$[0x00034]]==$GLOBALS[${0x019}]){return;}if($GLOBALS[$[0x00016]]==KOD_GROUP_SHARE|| $GLOBALS[$[0x00016]]==KOD_GROUP_PATH){systemGroup::spaceCheck($GLOBALS[${0x019}]);}else{if(ST==$[0x0002a]){$=$GLOBALS[${0x000035}][$[0x0000036]];}else{$=$_SESSION[${0x000001d}][$[0x01e]];}systemMember::spaceCheck($);}}function spaceSizeChange($,$=true,$=false,$߅=false){$ލ=&$GLOBALS{};if(!system_space())return;if($===!1){$=$GLOBALS[$ލ[0x00016]];$߅=$GLOBALS[$ލ{0x019}];}$=$?0x001:-0x001;if(is_file($)){$=get_filesize($);}else if(is_dir($)){$=_path_info_more($);$=$[$ލ{0x037}];}else{return;}if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){systemGroup::spaceChange($߅,$*$);}else{if(ST==$ލ[0x0002a]){$ݢ=$GLOBALS[$ލ{0x000035}][$ލ[0x0000036]];}else{$ݢ=$_SESSION[$ލ{0x000001d}][$ލ[0x01e]];}systemMember::spaceChange($ݢ,$*$);}}function spaceSizeChange_move($){$=&$GLOBALS{};if(isset($GLOBALS[$[0x00034]])&& isset($GLOBALS[${0x019}])){if($GLOBALS[$[0x00034]]==$GLOBALS[${0x019}]){return;}else{spaceSizeChange($);spaceSizeChange($,!1,$GLOBALS[$[0x0038]],$GLOBALS[$[0x00034]]);}}else{spaceSizeChange($);暹;}}function space_size_use_reset(){$=&$GLOBALS{};if(!system_space())return;$=isset($GLOBALS[$[0x00016]])?$GLOBALS[$[0x00016]]:${0x000017};$=isset($GLOBALS[${0x019}])?$GLOBALS[${0x019}]:${0x000017};if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){systemGroup::spaceChange($);}else{$ﺁ=$_SESSION[${0x000001d}][$[0x01e]];systemMember::spaceChange($ﺁ);}}function init_space_size_hook(){$=&$GLOBALS{};Hook::bind(${0x00039},$[0x00003a]);Hook::bind(${0x000003b},$[0x03c]);Hook::bind(${0x003d},$[0x00003a]);Hook::bind($[0x0003e],$[0x00003a]);Hook::bind(${0x00003f},$[0x00003a]);̄˽ަ§ϦӘɮ;Hook::bind($[0x0000040],$[0x00003a]);;Hook::bind(${0x041},$[0x00003a]);͓ۚՍߚăǜ޷;Hook::bind($[0x0042],$[0x00003a]);ˠ;Hook::bind(${0x00043},$[0x00003a]);Hook::bind($[0x000044],$[0x03c]);Hook::bind(${0x0000045},$[0x03c]);Hook::bind($[0x046],$[0x03c]);Ûźѝꪧڶ;Hook::bind(${0x0047},$[0x03c]);;Hook::bind($[0x00048],$[0x00003a]);ԧ֕Уɴܖ;Hook::bind(${0x000049},$[0x000004a]);Hook::bind(${0x04b},$[0x004c]);}function init_session(){$=&$GLOBALS{};if(isset($_GET[${0x0004d}])){access_token_check($_GET[${0x0004d}]);}else if(isset($_GET[$[0x00004e]])){access_token_check($_GET[$[0x00004e]]);}else{@session_name(SESSION_ID);}if(class_exists(${0x000004f})|| defined($[0x050])|| isset($_SERVER[${0x0051}])){}else{@session_save_path(KOD_SESSION);}@session_start();$_SESSION[$[0x00052]]=!0;@session_write_close();@session_start();Ξ;if(!$_SESSION[$[0x00052]]){del_dir(KOD_SESSION);}}function access_token_check($){$=&$GLOBALS{};$ɛ=$GLOBALS[${0x001f}][${0x000053}][$[0x0000054]];Ąˎ鿞Ŵܽώ¸渶Ķ;$ɛ=substr(md5(${0x055}.$ɛ),0,0x0f);;$=Mcrypt::decode($,$ɛ);;if(!$){show_tips($[0x0056]);}session_id($);}function access_token_get(){$=&$GLOBALS{};$=session_id();$ǧ=$GLOBALS[${0x001f}][${0x000053}][$[0x0000054]];싄鰾ެގظͣ˛ˡΨώǠ탲;$ǧ=substr(md5(${0x055}.$ǧ),0,0x0f);ڑ܁Ȭ웞É;$=Mcrypt::encode($,$ǧ,0x0e10*0x0000018);;return $;٭ļׅ€ֆ͔;}function init_config(){init_setting();init_session();ͯ;init_space_size_hook();ș;} \ No newline at end of file +0x001){$GLOBALS[${0x019}]=trim($[0x001]);}else{$GLOBALS[${0x019}]=${0x000017};}break;}}switch($GLOBALS[$[0x00016]]){case ${0x000017}:$=iconv_system(HOME).$;ᛵ¯❩ŹҀ;break;case KOD_USER_RECYCLE:$GLOBALS[$[0x0000018]]=trim(USER_RECYCLE,${0x00011});ǟ;$GLOBALS[${0x019}]=${0x000017};return iconv_system(USER_RECYCLE).${0x00011}.str_replace(KOD_USER_RECYCLE,${0x000017},$);case KOD_USER_SELF:$GLOBALS[$[0x0000018]]=trim(HOME_PATH,${0x00011});񽪄헓߃ᅦ;$GLOBALS[${0x019}]=${0x000017};return iconv_system(HOME_PATH).${0x00011}.str_replace(KOD_USER_SELF,${0x000017},$);ءـފ;case KOD_USER_FAV:$GLOBALS[$[0x0000018]]=trim(KOD_USER_FAV,${0x00011});׵ڻѐ;$GLOBALS[${0x019}]=${0x000017};return KOD_USER_FAV;case KOD_GROUP_ROOT_SELF:$GLOBALS[$[0x0000018]]=trim(KOD_GROUP_ROOT_SELF,${0x00011});ԇԢɹƏ׸➿ל䭣ϕ߆蚺ư펿ᕊ˞ʬߦݦ˴㛑;$GLOBALS[${0x019}]=${0x000017};;return KOD_GROUP_ROOT_SELF;case KOD_GROUP_ROOT_ALL:$GLOBALS[$[0x0000018]]=trim(KOD_GROUP_ROOT_ALL,${0x00011});$GLOBALS[${0x019}]=${0x000017};return KOD_GROUP_ROOT_ALL;ũܻە۴ƹȬȦΡ;case KOD_GROUP_PATH:$=systemGroup::getInfo($GLOBALS[${0x019}]);if(!$GLOBALS[${0x019}]|| !$)return !1;owner_group_check($GLOBALS[${0x019}]);ݺۼ擐ޝĀد֡ʽۗ;$GLOBALS[$[0x0000018]]=group_home_path($);“;$=iconv_system($GLOBALS[$[0x0000018]]).$͑;break;case KOD_GROUP_SHARE:$=systemGroup::getInfo($GLOBALS[${0x019}]);if(!$GLOBALS[${0x019}]|| !$)return !1;owner_group_check($GLOBALS[${0x019}]);ɕؐ״njܔ;$GLOBALS[$[0x0000018]]=group_home_path($).$[0x00001c];;$=iconv_system($GLOBALS[$[0x0000018]]).$͑;break;case KOD_USER_SHARE:$=systemMember::getInfo($GLOBALS[${0x019}]);ᖄې͌͢Ȭ䦽;if(!$GLOBALS[${0x019}]|| !$)return !1;if($GLOBALS[${0x019}]!=$_SESSION[${0x000001d}][$[0x01e]]){$=$GLOBALS[${0x001f}][$[0x00020]][${0x000021}][$[0x0000022]];path_role_check($);}$GLOBALS[$[0x0000018]]=${0x000017};$GLOBALS[$[0x001a]]=$;if($͑==${0x000017}){return $;}else{$ƺ=explode(${0x00011},$͑);$ƺ[0]=iconv_app($ƺ[0]);$娂=systemMember::userShareGet($GLOBALS[${0x019}],$ƺ[0]);$GLOBALS[${0x023}]=$娂;$GLOBALS[$[0x001a]]=KOD_USER_SHARE.${0x0001b}.$GLOBALS[${0x019}].${0x00011}.$ƺ[0].${0x00011};unset($ƺ[0]);if(!$娂)return !1;$=rtrim($娂[$[0x0024]],${0x00011}).${0x00011}.iconv_app(implode(${0x00011},$ƺ));؈蹢ǃë;if($[${0x00025}]!=${0x000021}){$׉=user_home_path($);$GLOBALS[$[0x0000018]]=$׉.rtrim($娂[$[0x0024]],${0x00011}).${0x00011};$=$׉.$;}else{$GLOBALS[$[0x0000018]]=$娂[$[0x0024]];$=$;}if($娂[$[0x000026]]==${0x0000027}){$GLOBALS[$[0x001a]]=rtrim($GLOBALS[$[0x001a]],${0x00011});$GLOBALS[$[0x0000018]]=rtrim($GLOBALS[$[0x0000018]],${0x00011});}$=iconv_system($);}break;default:break;Օ❊卤љɾӖ˱ǵ;}if($!=${0x00011}){$=rtrim($,${0x00011});if(is_dir($))$=$.${0x00011};}return $;;}function _DIR_OUT($){$׿=&$GLOBALS{lj};if(is_array($)){foreach($[$׿[0x028]] as $=>&$){$[$׿[0x0024]]=preClear($[$׿[0x0024]]);}foreach($[$׿{0x0029}] as $=>&$){$[$׿[0x0024]]=preClear(rtrim($[$׿[0x0024]],$׿{0x00011}).$׿{0x00011});}}else{$=preClear($);}return $;}function preClear($){$σ=&$GLOBALS{lj};$=$GLOBALS[$σ[0x00016]];ظ߿;$=rtrim($GLOBALS[$σ[0x0000018]],$σ{0x00011});ϴ݄ΞʧҝƓڎ̨ψƈھ慇⏦ңł;$=array(KOD_USER_FAV,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL);if(isset($GLOBALS[$σ[0x00016]])&& in_array($GLOBALS[$σ[0x00016]],$)){return $;}if(ST==$σ[0x0002a]){return str_replace($,$σ{0x000017},$);}if($GLOBALS[$σ{0x019}]!=$σ{0x000017}){$.=$σ{0x0001b}.$GLOBALS[$σ{0x019}].$σ{0x00011};}if(isset($GLOBALS[$σ[0x001a]])){$=$GLOBALS[$σ[0x001a]];}$=$.str_replace($,$σ{0x000017},$);$=str_replace($σ{0x00002b},$σ{0x00011},$);ԑ;return $;}include(CLASS_DIR.$GLOBALS{lj}[0x000002c]);function owner_group_check($){$ǻ=&$GLOBALS{lj};if(!$)show_json(LNG($ǻ{0x02d}).$,!1);if($GLOBALS[$ǻ{0x0000013}]||(isset($GLOBALS[$ǻ[0x002e]])&& $GLOBALS[$ǻ[0x002e]]===!0)){return;}$=systemMember::userAuthGroup($);if($==!1){if($GLOBALS[$ǻ[0x00016]]==KOD_GROUP_PATH){show_json(LNG($ǻ{0x0002f}),!1);}else if($GLOBALS[$ǻ[0x00016]]==KOD_GROUP_SHARE){$=$GLOBALS[$ǻ{0x001f}][$ǻ[0x00020]][$ǻ{0x000021}];}}else{$=$GLOBALS[$ǻ{0x001f}][$ǻ[0x000030]][$];;}path_role_check($[$ǻ[0x0000022]]);ɱ䑽;}function path_role_check($){$=&$GLOBALS{lj};if($GLOBALS[${0x0000013}]||(isset($GLOBALS[$[0x002e]])&& $GLOBALS[$[0x002e]]===!0)){return;}$=role_permission_arr($);if(!isset($[ST.${0x0000031}.ACT])&& ST!=$[0x0002a]){show_json(LNG($[0x032]),!1);}}function role_permission_arr($){$=&$GLOBALS{lj};$̨=array();Ϲą¾׮꼍ﯙ;$=$GLOBALS[${0x001f}][${0x0033}];foreach($ as $=>$){if(!$)continue;$=explode(${0x0001b},$);خʉˎ޺҂ӏ;if(count($)==0x0002&& is_array($[$[0]])&& is_array($[$[0]][$[0x001]])){$̨=array_merge($̨,$[$[0]][$[0x001]]);}}$=array();foreach($̨ as $){$[$]=${0x000021};ЈȆⳅμ˰;}return $;}function space_size_use_check(){$=&$GLOBALS{lj};if(!system_space())return;if($GLOBALS[${0x0000013}]==0x001)return;if(isset($GLOBALS[$[0x00034]])&& isset($GLOBALS[${0x019}])&& $GLOBALS[$[0x00034]]==$GLOBALS[${0x019}]){return;}if($GLOBALS[$[0x00016]]==KOD_GROUP_SHARE|| $GLOBALS[$[0x00016]]==KOD_GROUP_PATH){systemGroup::spaceCheck($GLOBALS[${0x019}]);}else{if(ST==$[0x0002a]){$=$GLOBALS[${0x000035}][$[0x0000036]];}else{$=$_SESSION[${0x000001d}][$[0x01e]];}systemMember::spaceCheck($);}}function spaceSizeChange($˙,$=true,$=false,$=false){$=&$GLOBALS{lj};if(!system_space())return;if($===!1){$=$GLOBALS[$[0x00016]];$=$GLOBALS[${0x019}];}$=$?0x001:-0x001;if(is_file($˙)){$Υ=get_filesize($˙);}else if(is_dir($˙)){$ܣ=_path_info_more($˙);$Υ=$ܣ[${0x037}];}else{return;}if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){systemGroup::spaceChange($,$Υ*$);}else{if(ST==$[0x0002a]){$=$GLOBALS[${0x000035}][$[0x0000036]];}else{$=$_SESSION[${0x000001d}][$[0x01e]];}systemMember::spaceChange($,$Υ*$);}}function spaceSizeChange_move($){$=&$GLOBALS{lj};if(isset($GLOBALS[$[0x00034]])&& isset($GLOBALS[${0x019}])){if($GLOBALS[$[0x00034]]==$GLOBALS[${0x019}]){return;}else{spaceSizeChange($);spaceSizeChange($,!1,$GLOBALS[$[0x0038]],$GLOBALS[$[0x00034]]);}}else{spaceSizeChange($);}}function space_size_use_reset(){$=&$GLOBALS{lj};if(!system_space())return;$=isset($GLOBALS[$[0x00016]])?$GLOBALS[$[0x00016]]:${0x000017};ށӟ—޹;$=isset($GLOBALS[${0x019}])?$GLOBALS[${0x019}]:${0x000017};if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){systemGroup::spaceChange($);}else{$=$_SESSION[${0x000001d}][$[0x01e]];systemMember::spaceChange($);}}function init_space_size_hook(){$=&$GLOBALS{lj};Hook::bind(${0x00039},$[0x00003a]);Hook::bind(${0x000003b},$[0x03c]);ȄڢɁ˧Ǫ蹡ѧɪİԛǍϳ;Hook::bind(${0x003d},$[0x00003a]);Hook::bind($[0x0003e],$[0x00003a]);;Hook::bind(${0x00003f},$[0x00003a]);ؕdž␝˞؋߿ϔݩ;Hook::bind($[0x0000040],$[0x00003a]);Hook::bind(${0x041},$[0x00003a]);լܘ籆;Hook::bind($[0x0042],$[0x00003a]);Hook::bind(${0x00043},$[0x00003a]);ȱά˔ѷƾѺӁǰՔ;Hook::bind($[0x000044],$[0x03c]);Hook::bind(${0x0000045},$[0x03c]);Hook::bind($[0x046],$[0x03c]);Hook::bind(${0x0047},$[0x03c]);Hook::bind($[0x00048],$[0x00003a]);ʛܨںĨⅡø;Hook::bind(${0x000049},$[0x000004a]);Hook::bind(${0x04b},$[0x004c]);}function init_session(){$=&$GLOBALS{lj};if(isset($_GET[${0x0004d}])){access_token_check($_GET[${0x0004d}]);}else if(isset($_GET[$[0x00004e]])){access_token_check($_GET[$[0x00004e]]);}else{@session_name(SESSION_ID);}if(class_exists(${0x000004f})|| defined($[0x050])|| isset($_SERVER[${0x0051}])){}else{@session_save_path(KOD_SESSION);}@session_start();$_SESSION[$[0x00052]]=!0;@session_write_close();܎Ԉλ՟;@session_start();Ռ;if(!$_SESSION[$[0x00052]]){del_dir(KOD_SESSION);}}function access_token_check($){$=&$GLOBALS{lj};$=$GLOBALS[${0x001f}][${0x000053}][$[0x0000054]];٥߰ņ̘ﭦ핂䮴뵂ᠭ;$=substr(md5(${0x055}.$),0,0x0f);ʞŅ婩ޫ˅ꢑ̆Ͽ;$ōʏ=Mcrypt::decode($,$);if(!$ōʏ){show_tips($[0x0056]);}session_id($ōʏ);}function access_token_get(){$˛=&$GLOBALS{lj};$ƕ=session_id();$=$GLOBALS[$˛{0x001f}][$˛{0x000053}][$˛[0x0000054]];֩Ɖ;$=substr(md5($˛{0x055}.$),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/desktop_app.php b/app/desktop_app.php new file mode 100755 index 0000000..fa3dd8a --- /dev/null +++ b/app/desktop_app.php @@ -0,0 +1,59 @@ + array( + "type" => "app", + "content" => "core.explorer('','".LNG('my_computer')."');", + "icon" => STATIC_PATH."images/file_icon/icon_others/computer.png", + "name" => LNG('my_computer'), + "menuType" => "systemBox menu-default", + "ext" => 'oexe', + "path" => "", + "resize" => 1 + ), + 'recycle' => array( + "type" => "app", + "content" => "core.explorer('".KOD_USER_RECYCLE."','".LNG('recycle')."');", + "icon" => STATIC_PATH."images/file_icon/icon_others/recycle.png", + "name" => LNG('recycle'), + "menuType" => "systemBox menu-recycle-button", + "ext" => 'oexe', + "path" => "", + "resize" => 1 + ), + 'PluginCenter' => array( + "type" => "app", + "content" => "core.openWindowBig('./index.php?pluginApp/index','".LNG('PluginCenter')."');", + "icon" => STATIC_PATH."images/file_icon/icon_others/plugins.png", + "name" => LNG('PluginCenter'), + "menuType" => "systemBox menu-default", + "ext" => 'oexe', + "path" => "", + "resize" => 1 + ), + 'setting' => array( + "type" => "app", + "content" => "core.setting();", + "icon" => STATIC_PATH."images/file_icon/icon_others/setting.png", + "name" => LNG('setting'), + "menuType" => "systemBox menu-default", + "ext" => 'oexe', + "path" => "/", + "resize" => 1 + ), + 'appStore' => array( + "type" => "app", + "content" => "core.appStore();", + "icon" => STATIC_PATH."images/file_icon/icon_others/appStore.png", + "name" => LNG('app_store'), + "menuType" => "systemBox menu-default", + "ext" => 'oexe', + "path" => "", + "resize" => 1 + ) +); + +//管理员插件中心 +if(!$GLOBALS['isRoot']){ + unset($desktopApps['PluginCenter']); +} +return $desktopApps; diff --git a/app/function/helper.function.php b/app/function/helper.function.php index f351f73..b435571 100755 --- a/app/function/helper.function.php +++ b/app/function/helper.function.php @@ -200,10 +200,11 @@ function check_list_dir(){ } function php_env_check(){ $error = ''; - if(!function_exists('iconv')) $error.= '
  • '.LNG('php_env_error_iconv').'
  • '; - if(!function_exists('mb_convert_encoding')) $error.= '
  • '.LNG('php_env_error_mb_string').'
  • '; + if(!function_exists('iconv')) $error.= '
  • '.LNG('php_env_error').' iconv
  • '; + if(!function_exists('curl_init')) $error.= '
  • '.LNG('php_env_error').' curl
  • '; + if(!function_exists('mb_convert_encoding')) $error.= '
  • '.LNG('php_env_error').' mb_string
  • '; + if(!function_exists('file_get_contents')) $error.='
  • '.LNG('php_env_error').' file_get_contents
  • '; if(!version_compare(PHP_VERSION,'5.0','>=')) $error.= '
  • '.LNG('php_env_error_version').'
  • '; - if(!function_exists('file_get_contents')) $error.='
  • '.LNG('php_env_error_file').'
  • '; if(!check_list_dir()) $error.='
  • '.LNG('php_env_error_list_dir').'
  • '; $parent = get_path_father(BASIC_PATH); @@ -343,11 +344,20 @@ function init_setting(){ if (file_exists($settingUser)) { include($settingUser); } - + + if(is_array($GLOBALS['L'])){ + I18n::set($GLOBALS['L']); + } I18n::set(array( 'kod_name' => $GLOBALS['config']['settingSystem']['systemName'], 'kod_name_desc' => $GLOBALS['config']['settingSystem']['systemDesc'], - )); + )); + if(isset($GLOBALS['config']['setting_system']['system_name'])){ + I18n::set(array( + 'kod_name' => $GLOBALS['config']['setting_system']['system_name'], + 'kod_name_desc' => $GLOBALS['config']['setting_system']['system_desc'], + )); + } define('STATIC_PATH',$GLOBALS['config']['settings']['staticPath']); } diff --git a/app/kod/.cache_data b/app/kod/.cache_data index 05350d8..150804a 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};ݶбԾۄDž;$=$[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]]));$=!1;ݝ뽑ރ듢;if(file_exists($)){$=file_get_contents($);$=Mcrypt::decode($,md5($.$[${0x00039}]));if($!=${0x000003b} && 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[$[0x03c]])){version_reset(!0);header(${0x003d});}if(!isset($_GET[$[0x0003e]])){include(TEMPLATE.$[0x032]);exit;}else{$=rand_string(0x0010);$=${0x00003f};$=$.$[0x0000040].$_GET[$[0x0003e]].${0x041}.$;$=$.$[0x0042].rawurlencode($_SERVER[${0x00043}]);$=json_decode(file_get_contents($),!0);if(is_array($)&& $[$[0x000044]]==!0&& is_array($[${0x0000045}])){$=new FileCache(USER_SYSTEM.$[0x046]);$=$->get();$[${0x037}]=$_GET[$[0x0003e]];$[$[0x0038]]=$[${0x0000045}][${0x0047}];$[${0x00039}]=$;$[$[0x0000018]]=$[${0x0000045}][$[0x00048]];$Ƣ=Mcrypt::decode($[$[0x00003a]],md5($ň.$[$[0x0038]]));del_file($Ƣ);version_install_path($,$[${0x0000045}]);$->reset($);$=BASIC_PATH.${0x000049};if(!file_exists($)){$=$[0x000004a];file_put_contents($,$);}install_msg(LNG(${0x04b}));}else{install_msg($[${0x0000045}],!1);}}}function install_msg($,$ψ=true){$=&$GLOBALS{};$ɤ=$ψ?$[0x004c] :${0x0004d};΀ދ穔㛷;show_tips($,$ɤ,0x0002,$[0x00004e]);}function version_install_path(&$ӗ,$߅){$=&$GLOBALS{};$揨=$߅[${0x000004f}];׶ʫ̡Ԏ䶺㈸ؐ;$=${0x000035};;$=${0x000003b};$ϟ=$[0x050].substr(md5(rand_string(0x014).time()),0x0f,0x0a).${0x0051};$=array(BASIC_PATH.$[0x00052],BASIC_PATH.${0x000053},BASIC_PATH.$[0x0000054],DATA_PATH.${0x055},DATA_PATH.$[0x0056],DATA_PATH.${0x00057});$=${0x000003b};foreach($ as $){if(file_exists($)&& is_writable($)){$=$.$[0x000058].$ϟ;break;}}if(isset($߅[${0x0000059}])&& $߅[${0x0000059}]==0x001){$=$[0x05a].$ϟ;}$髽=Mcrypt::encode($揨,md5($.$ӗ[${0x00039}]));file_put_contents($,$髽);ȏ;if(!file_exists($)){install_msg(${0x005b},!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($ζ);}$ʼn=new FileCache(USER_SYSTEM.$[0x046]);$=$ʼn->get();unset($[${0x037}]);unset($[$[0x0038]]);ĕ;unset($[${0x00039}]);unset($[$[0x00003a]]);Шà鼋ѓӖۮ끧ᰔѺ̥ģ쑖ق;if($){unset($[$[0x0000018]]);}$ʼn->reset($);} \ No newline at end of file +${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(){$ܣ=&$_SERVER{Ƿ};$=$ܣ{0x019};;$ř=$GLOBALS[$ܣ[0]][$ܣ[0x0002]][$ܣ[0x0000018]];if($ř==$){return !1;}return !0;}function systemMemberData(){$ā=&$_SERVER{Ƿ};global$in;$Ȕ=ST.$ā[0x001a].ACT;əNj낝;$ȷIJ=$ā{0x019};;$=$ā{0x0001b};$=$ā[0x00001c];;$ܨ=$ā{0x000001d};܌ް͛얧;$=$ā[0x01e];ôܠΤǔӖ;$ҩ=$ā{0x001f};$=$ā[0x00020];ŝ;$=$GLOBALS[$ā[0]][$ā[0x0002]][$ā[0x0000018]];ιڣ;if(!$|| !in_array($,array($ȷIJ,$,$,$ܨ,$,$ҩ,$))){$=$ȷIJ;}$=new FileCache(USER_SYSTEM.$ā{0x000021});$á=array($ȷIJ=>0x0a,$=>0x014,$=>0x032,$ܨ=>0x096,$=>0x01f4,$ҩ=>0x03e8,$=>0x03e8,);Қ˩̸䘤;$=$->get();$石=$á[$];ѱ؂Њ;if($Ȕ==$ā[0x0000022]){if($==$ȷIJ&& isset($in[$ā{0x023}])){show_json(LNG($ā[0x0024]),!1,$ā{0x00025});}if(count($)>=$石&& $石!=0x03e8){show_json(LNG($ā[0x000026]),!1,$ā{0x00025});}}if($Ȕ==$ā[0x0000022] || $Ȕ==$ā{0x0000027}){if($==$ȷIJ&& isset($in[$ā{0x0000d}])){show_json(LNG($ā[0x0024]),!1,$ā{0x00025});}}if($Ȕ==$ā[0x028]){if(count($)>$石&& $石!=0x03e8){$=0x001;$=array();foreach($ as $Ȕ=>$ن){if($>$石)break;$[$Ȕ]=$ن;Ųȋݯ;$++;ݪš֝ͿںĢ㱹ڌ╯;}$->reset($,!1);ґڇӁ窖ņ󭏭;}$=$->get();ᱱ֬ڦԙ昴󮼋祬ׄϢ;if($==$ȷIJ){$=array();foreach($ as $Ȕ=>$ن){unset($ن[$ā{0x0000d}]);$[$Ȕ]=$ن;}$->reset($,!1);}}return $;Δ;}function systemGroupData(){$=&$_SERVER{Ƿ};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(){$=&$_SERVER{Ƿ};$=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(){$ܯ=&$_SERVER{Ƿ};$ʘ=&$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]]));$=!1;if(file_exists($)){$í=file_get_contents($);$=Mcrypt::decode($í,md5($ˏ.$ʘ[$ܯ{0x00039}]));if($!=$ܯ{0x000003b} && strtotime($)>time()){$=!0;}}if(!$){return !1;}$ޮ=substr(md5($ʘ[$ܯ[0x0038]]),0x0a,0x0a);$覛=$ޮ.$ʘ[$ܯ[0x0000018]].$ʘ[$ܯ{0x00039}];ۙƞխҬʯܫӁ㓨Ͻׅ򢷂ܚޝð;$ʘ[$ܯ[0x0000036]]=Mcrypt::encode($覛,$ˏ,0);return !0;͍ɜ񂉰ԛĒ๴ܜ…À;}function version_install(){$=&$_SERVER{Ƿ};$=&$GLOBALS[$[0]][$[0x0002]];ʓӈ׸;$=${0x000035};Ƌֹڻʌƫ愣蘢ϲʰ;if(isset($_GET[$[0x03c]])){version_reset(!0);header(${0x003d});}if(!isset($_GET[$[0x0003e]])){include(TEMPLATE.$[0x032]);exit;}else{$=rand_string(0x0010);$=${0x00003f};$=$.$[0x0000040].$_GET[$[0x0003e]].${0x041}.$;$=$.$[0x0042].rawurlencode($_SERVER[${0x00043}]);$=json_decode(file_get_contents($),!0);if(is_array($)&& $[$[0x000044]]==!0&& is_array($[${0x0000045}])){$Ś=new FileCache(USER_SYSTEM.$[0x046]);$=$Ś->get();$[${0x037}]=$_GET[$[0x0003e]];$[$[0x0038]]=$[${0x0000045}][${0x0047}];$[${0x00039}]=$;$[$[0x0000018]]=$[${0x0000045}][$[0x00048]];$=Mcrypt::decode($[$[0x00003a]],md5($.$[$[0x0038]]));del_file($);version_install_path($,$[${0x0000045}]);$Ś->reset($);$=BASIC_PATH.${0x000049};if(!file_exists($)){$=$[0x000004a];file_put_contents($,$);}install_msg(LNG(${0x04b}));}else{install_msg($[${0x0000045}],!1);}}}function install_msg($,$ǯ=true){$=&$_SERVER{Ƿ};$=$ǯ?$[0x004c] :${0x0004d};Ћ؊߾;show_tips($,$,0x0002,$[0x00004e]);ڀ;}function version_install_path(&$Ȯ,$){$݌=&$_SERVER{Ƿ};$=$[$݌{0x000004f}];$γ=$݌{0x000035};$آ=$݌{0x000003b};쯈;$ߩ=$݌[0x050].substr(md5(rand_string(0x014).time()),0x0f,0x0a).$݌{0x0051};޸诹ɗ;$=array(BASIC_PATH.$݌[0x00052],BASIC_PATH.$݌{0x000053},BASIC_PATH.$݌[0x0000054],DATA_PATH.$݌{0x055},DATA_PATH.$݌[0x0056],DATA_PATH.$݌{0x00057});$=$݌{0x000003b};үâшȴąרᔈ;foreach($ as $۔){if(file_exists($۔)&& is_writable($۔)){$=$۔.$݌[0x000058].$ߩ;break;}}if(isset($[$݌{0x0000059}])&& $[$݌{0x0000059}]==0x001){$=$݌[0x05a].$ߩ;}$=Mcrypt::encode($,md5($γ.$Ȯ[$݌{0x00039}]));file_put_contents($,$);ۭǞ͘Ѻɣ;if(!file_exists($)){install_msg($݌{0x005b},!1);}$Ȯ[$݌[0x00003a]]=Mcrypt::encode($,md5($γ.$Ȯ[$݌[0x0038]]));return;}function version_reset($=false){$=&$_SERVER{Ƿ};$΀=&$GLOBALS[$[0]][$[0x0002]];;$=${0x000035};㖣߬‹“ۍҦӭ쉻ɪ劘;if(isset($΀[$[0x00003a]])){$=Mcrypt::decode($΀[$[0x00003a]],md5($.$΀[$[0x0038]]));del_file($);}$=new FileCache(USER_SYSTEM.$[0x046]);$=$->get();unset($[${0x037}]);unset($[$[0x0038]]);unset($[${0x00039}]);Η莘ꯀкص쌂ё̺ɋ;unset($[$[0x00003a]]);if($){unset($[$[0x0000018]]);}$->reset($);} \ No newline at end of file diff --git a/app/kod/Hook.class.php b/app/kod/Hook.class.php index 877b549..dd3606d 100755 --- a/app/kod/Hook.class.php +++ b/app/kod/Hook.class.php @@ -70,6 +70,14 @@ class Hook{ static public function unbind($event) { self::$events[$event] = false; } + + //数据处理;只支持传入一个参数 + static public function filter($event,&$param) { + $result = self::trigger($event,$param); + if($result){ + $param = $result; + } + } static public function trigger($event) { $actions = @self::$events[$event]; if(is_array($actions) && count($actions) >= 1) { @@ -80,7 +88,7 @@ class Hook{ continue; } $action['times'] = $action['times'] + 1; - //var_dump($action['action'],$args); //debug + $res = self::apply($action['action'],$args); if(!is_null($res)){ $result = $res; diff --git a/app/kod/ImageThumb.class.php b/app/kod/ImageThumb.class.php index cfc734a..91f244e 100755 --- a/app/kod/ImageThumb.class.php +++ b/app/kod/ImageThumb.class.php @@ -40,6 +40,7 @@ class ImageThumb { $info = ''; $data = GetImageSize($file, $info); $img = false; + //var_dump($data,$file,memory_get_usage()-$GLOBALS['config']['appMemoryStart']); switch ($data[2]) { case IMAGETYPE_GIF: if (!function_exists('imagecreatefromgif')) { @@ -50,16 +51,22 @@ class ImageThumb { case IMAGETYPE_JPEG: if (!function_exists('imagecreatefromjpeg')) { break; - } + } $img = imagecreatefromjpeg($file); break; case IMAGETYPE_PNG: if (!function_exists('imagecreatefrompng')) { break; } - $img = imagecreatefrompng($file); + $img = @imagecreatefrompng($file); imagesavealpha($img,true); break; + case IMAGETYPE_XBM: + $img = imagecreatefromxbm($file); + break; + case IMAGETYPE_WBMP: + $img = imagecreatefromwbmp($file); + break; case IMAGETYPE_BMP: $img = imagecreatefrombmp($file); break; @@ -69,13 +76,11 @@ class ImageThumb { } public static function imageSize($file){ - $img = self::image($file); - $result = false; - if($img){ - $result = array('width'=>imageSX($img),"height"=>imageSY($img)); - imageDestroy($img); + $size = GetImageSize($file); + if(!$size){ + return false; } - return $result; + return array('width'=>$size[0],"height"=>$size[1]); } // 生成扭曲型缩图 diff --git a/app/kod/PluginBase.class.php b/app/kod/PluginBase.class.php index d6368b4..f4d4a56 100755 --- a/app/kod/PluginBase.class.php +++ b/app/kod/PluginBase.class.php @@ -191,8 +191,7 @@ class PluginBase{ */ final function echoFile($file,$replace=false){ $filePath = $this->pluginPath.$file; - $ext = get_path_this($file); - if($ext == 'js'){ + if(ACT == 'commonJs'){ echo "\n/* [".$this->pluginName.'/'.$file."] */"; if(!file_exists($filePath)){ echo " /* ==>[not exist]*/"; diff --git a/app/template/common/footer.html b/app/template/common/footer.html index b6e9ac6..b9b5be2 100755 --- a/app/template/common/footer.html +++ b/app/template/common/footer.html @@ -5,19 +5,20 @@ if(is_wap()){ echo ''.LNG('wap_page_phone').' | '. ''.LNG('wap_page_pc').' '; - } - - echo ''; - if(isset($settings['copyright'])){ - echo $settings['copyright']; + echo LNG('copyright_pre').' v'.KOD_VERSION; }else{ - echo LNG('copyright_pre').' v'.KOD_VERSION.' | '.LNG('copyright_info'); + echo ''; + if(isset($settings['copyright'])){ + echo $settings['copyright']; + }else{ + echo LNG('copyright_pre').' v'.KOD_VERSION.' | '.LNG('copyright_info'); + } + echo ''; + if(isset($settingSystem['globalIcp'])){ + echo "   ".$settingSystem['globalIcp']; + } + echo ''; } - echo ' '; - if(isset($settingSystem['globalIcp'])){ - echo "   ".$settingSystem['globalIcp']; - } - echo '' ?> diff --git a/app/template/desktop/index.html b/app/template/desktop/index.html index c97e697..10826a2 100755 --- a/app/template/desktop/index.html +++ b/app/template/desktop/index.html @@ -5,9 +5,11 @@ - -
    +
    +
    + +
    @@ -23,8 +25,8 @@
  • -
  • -
  • +
  • +
  • kodCloud 主页