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.= '