1 line
33 KiB
PHP
Executable File
1 line
33 KiB
PHP
Executable File
<?php class explorer extends Controller{public $path;public $user;public function __construct(){parent::__construct();$this->tpl=TEMPLATE.'explorer/';<EFBFBD>¸¾¸<EFBFBD>÷º Ä¡ô¿—ä‹Ûý—¯ö‹Þ¥;$this->user=$_SESSION['kod_user'];if(isset($this->in['path'])){$this->path=_DIR($this->in['path']);$this->check_system_path();}}public function index(){$ȶä='';if(isset($this->in['path'])&& $this->in['path']!=''){$ȶä=_DIR_CLEAR($_GET['path']);$ȶä=rtrim($ȶä,'/').'/';}$this->assign('dir',$ȶä);if($this->config['forceWap']){$this->display('index_wap.php');}else{$this->display('index.php');}}private function check_system_path(){if(!in_array(ACT,array('mkfile','mkdir','search','pathCuteDrag','pathCopyDrag','pathPast','fileDownload'))){return;}if($GLOBALS['path_type']==KOD_USER_SHARE&& !strstr(trim($this->in['path'],'/'),'/')){show_json($this->L['error'],!1);}if(in_array($GLOBALS['path_type'],array(KOD_USER_FAV,KOD_GROUP_ROOT_ALL,KOD_GROUP_ROOT_SELF))){show_json($this->L['system_path_not_change'],!1);}}public function pathInfo(){$Ñ錊=json_decode($this->in['list'],!0);<EFBFBD>ŒÉæ<EFBFBD>‰þæÌ;if(!$Ñ錊){show_json($this->L['error'],!1);}foreach($Ñ錊 as &$Â){$Â['path']=_DIR($Â['path']);}$£òÂ=path_info_muti($Ñ錊,$this->L['time_type_info']);if(!$£òÂ){show_json($this->L['not_exists'],!1);}if(count($Ñ錊)==0x001&& $Ñ錊[0]['type']!='folder'){if($GLOBALS['is_root']|| $GLOBALS['auth']['explorer:fileDownload']==0x001){$£òÂ['download_path']=_make_file_proxy($Ñ錊[0]['path']);}$Ñç=$Ñ錊[0]['path'];if($£òÂ['size']<0x064*0x00000400*0x00000400|| isset($this->in['get_md5'])){$£òÂ['file_md5']=@md5_file($Ñç);}else{$£òÂ['file_md5']="...";}$†°<E280A0>êâ=get_path_ext($Ñç);if(in_array($†°<E280A0>êâ,array('jpg','gif','png','jpeg','bmp'))){load_class('imageThumb');$½Ì÷ǹ=imageThumb::imageSize($Ñç);if($½Ì÷ǹ){$£òÂ['image_size']=$½Ì÷ǹ;}}}$£òÂ['path']=_DIR_OUT($£òÂ['path']);<EFBFBD>ÆõÇÐô®<EFBFBD><EFBFBD>ñè¤;show_json($£òÂ);<EFBFBD>¸“º¾Äت§Äçô¼°¯¹¾ô<EFBFBD>´½Ñªìï¬ÞØ;}public function pathChmod(){$Å…¤ý=json_decode($this->in['list'],!0);if(!$Å…¤ý){show_json($this->L['error'],!1);}$½Ý¸è=octdec('0'.$this->in['mod']);$ü=0;<EFBFBD>‚«ôÁ¡õöÞȢ˸Ϋ’Ÿñ—Äï°¤®<EFBFBD>Ý—–Ûè“–ë¿‹®à<EFBFBD>¦ÀÊÈ<EFBFBD>ƒ—¹;$·=0;foreach($Å…¤ý as $üœ){$¡Êî€=_DIR($üœ['path']);<EFBFBD>Ì™ñ¹ØüçºþŽú;if(chmod_path($¡Êî€,$½Ý¸è)){$ü++;}else{$·++;}}$Ö‰Î=$·==0?!0:!1;<EFBFBD>§í“¤‹ñÆÕáÆ¹ç¢†<EFBFBD>•¿Ú’§•’¶‘ÝŽ›¬ýÝ‘¥Ì¤É×—<EFBFBD>øÖæàùíâ;$=$ü.' success,'.$·.' error';if(count($Å…¤ý)==0x001&& $·==0){$=$this->L['success'];}show_json($,$Ö‰Î);}public function mkfile(){$ÕÓ=BASIC_PATH.'static/others/newfile-tpl/';space_size_use_check();$“›<E2809C>¿='skip';if(isset($this->in['repeat_type'])){$“›<E2809C>¿=$this->in['repeat_type'];}$Ѿ«õ=rtrim($this->path,'/');$Ѿ«õ=get_filename_auto($Ѿ«õ,'',$“›<E2809C>¿);if(@touch($Ѿ«õ)){chmod_path($Ѿ«õ,0777);if(isset($this->in['content'])){file_put_contents($Ѿ«õ,$this->in['content']);}else{$Ž=get_path_ext($Ѿ«õ);$²ˆ=$ÕÓ.'newfile.'.$Ž;if(file_exists($²ˆ)){$šéëˆÌ=file_get_contents($²ˆ);file_put_contents($Ѿ«õ,$šéëˆÌ);}}space_size_use_change($Ѿ«õ);<EFBFBD>žŒÞÔ™;show_json($this->L['create_success'],!0,_DIR_OUT(iconv_app($Ѿ«õ)));<EFBFBD>ŨΥùŽÑï—Õþ±ˆ‡¤¢ð<EFBFBD>ª¾<EFBFBD>àÉ«í¨€‡íè¼´‘‹Ù;}else{show_json($this->L['create_error'],!1);}}public function mkdir(){space_size_use_check();$û±='skip';if(isset($this->in['repeat_type'])){$û±=$this->in['repeat_type'];}$㊃ˆ=rtrim($this->path,'/');$㊃ˆ=get_filename_auto($㊃ˆ,'',$û±);<EFBFBD>²¦ºüÒ¨¦Ó°”¼íÉÎø¤Ù“ÐÖ;if(mk_dir($㊃ˆ,0777)){chmod_path($㊃ˆ,0777);show_json($this->L['create_success'],!0,_DIR_OUT(iconv_app($㊃ˆ)));}else{show_json($this->L['create_error'],!1);}}public function pathRname(){$ÒÒª=_DIR($this->in['rname_to']);<EFBFBD>ŒÉÌäüó úÆÈ¡šù¶×瀦á¤<EFBFBD>õõػȫæ§;if(file_exist_case($ÒÒª)){show_json($this->L['name_isexists'],!1);}if(@rename($this->path,$ÒÒª)){show_json($this->L['rname_success'],!0,_DIR_OUT(iconv_app($ÒÒª)));}else{show_json($this->L['no_permission_write_all'],!1);}}public function search(){if(!isset($this->in['search']))show_json($this->L['please_inpute_search_words'],!1);$š=intval($this->in['is_content']);$æ™É=intval($this->in['is_case']);<EFBFBD>¢ƒå½ýœ•å<EFBFBD>¼È¾¾¸—ú<EFBFBD>Âá©ÄûÝ<EFBFBD>ãöÙ;$±žá=trim($this->in['ext']);if($GLOBALS['path_type']==KOD_USER_SHARE&& strstr($this->path,KOD_USER_SHARE)){show_json($this->L['path_cannot_search'],!1);}$Ÿ=path_search($this->path,iconv_system(rawurldecode($this->in['search'])),$š,$±žá,$æ™É);show_json(_DIR_OUT($Ÿ));}public function pathList(){$µ™=$this->in['path'];if($µ™=="")$µ™='/';$Ⴒ¡º=$this->path($this->path);<EFBFBD><EFBFBD>ýåÒúÃâÞ»½žìÛ€¢;if($this->path== MYHOME|| $this->path==HOME){$this->_self_root_load($Ⴒ¡º['folderlist']);}if($Ⴒ¡º['info']['path_type']==KOD_GROUP_PATH&& !strstr(trim(_DIR_CLEAR($this->in['path']),'/'),'/')){$this->_self_group_load($Ⴒ¡º['folderlist']);}$Ⴒ¡º['user_space']=$this->user['config'];show_json($Ⴒ¡º);<EFBFBD>„ÕïÃÉÒÅû󀯑¼Ô<EFBFBD>£§‹æ‹ê¢È;}public function treeList(){$<24>=$this->in['app'];if(isset($this->in['type'])&& $this->in['type']=='init'){$this->_tree_init($<24>);}switch(trim(rawurldecode($this->in['path']))){case KOD_USER_FAV:show_json($this->_tree_fav(),!0);break;case KOD_GROUP_ROOT_SELF:show_json($this->_group_self(),!0);break;case KOD_GROUP_ROOT_ALL:show_json($this->_group_tree('1'),!0);break;default:break;}if((isset($this->in['tree_icon'])&& $this->in['tree_icon']!='groupPublic')&& !strstr(trim(rawurldecode($this->in['path']),'/'),'/')&&($GLOBALS['path_type']==KOD_GROUP_PATH|| $GLOBALS['path_type']==KOD_GROUP_SHARE)){$²=$this->_group_tree($GLOBALS['path_id']);show_json($²,!0);return;}$ª=_DIR($this->in['path']);if(!is_readable($ª))show_json($this->L['no_permission_read'],!1);$Œ=($<24>=='editor'?!0:!1);$²=$this->path($ª,$Œ,!0);<EFBFBD>Ì•ÇÀ–<EFBFBD>ÑÒäâõ<EFBFBD>íÝ™Ø<EFBFBD>â⑈ìÄ‘˜Î<EFBFBD>šÇì唃ՙ½¨ë¢;function sort_by_key($â,$ùÁ){if($â['name']==$ùÁ['name'])return 0;return($â['name']>$ùÁ['name'])?0x001:-0x001;}usort($²['folderlist'],"sort_by_key");<EFBFBD>¬¶Ôµ¤šÆ¼èãֱѼÆÔêœí©ÅÙÌнüËþÇŸÂóÖ˜©ú²;usort($²['filelist'],"sort_by_key");<EFBFBD>Ô<EFBFBD>͔ͧû¹±éâö;if($ª==MYHOME|| $ª==HOME){}if($<24>=='editor'){$°È‚=array_merge($²['folderlist'],$²['filelist']);show_json($°È‚,!0);}else{show_json($²['folderlist'],!0);}}private function _self_group_load(&$”‚){foreach($”‚ as $´Äé‹Ü=>$‡){if($‡['name']=='share'){$”‚[$´Äé‹Ü]=array('name' =>$this->L['group_share'],'menuType' =>"menufolder folderBox",'ext' =>"folder_share",'isParent' =>!0,'is_readable' =>!0,'is_writeable' =>!0,'path' =>KOD_GROUP_PATH.':'.$GLOBALS['path_id'].'/share/','type' =>'folder','open' =>!1,'isParent' =>!1);break;}}$”‚=array_values($”‚);}private function _self_root_load(&$¿){foreach($¿ as $ÚÐ=>$‚žŽý×){if($‚žŽý×['name']=='share'){$¿[$ÚÐ]=array('name' =>$this->L['my_share'],'menuType' =>"menuTreeUser",'ext' =>"folder_share",'isParent' =>!0,'is_readable' =>!0,'is_writeable' =>!0,'path' =>KOD_USER_SHARE.':'.$this->user["user_id"].'/','type' =>'folder','open' =>!1,'isParent' =>!1);break;}}$¿=array_values($¿);<EFBFBD>·ë€¯š•±<EFBFBD>ÊöùÕÓ<EFBFBD>Ý㔞<EFBFBD>ïî‹ò<EFBFBD>™ñäÙÚ¡’ˆ<EFBFBD>“¸§©ê·;if($this->config['user']['recycle_open']=="1"){}}private function _tree_fav(){$á±Ê¶À=($this->in['app']=='editor'?!0:!1);$ÕÆ=new fileCache(USER.'data/fav.php');$µ·º=$ÕÆ->get();<EFBFBD>©¬‡Ê¾<EFBFBD>×ÑÈþú´·ï–éºÍ«ãè<EFBFBD>«•;$à̓=array();$GLOBALS['path_from_auth_check']=!0;foreach($µ·º as $ÍË=>$™‹È){$Ý’ðØÆ=path_haschildren(_DIR($™‹È['path']),$á±Ê¶À);if(!isset($™‹È['type'])){$™‹È['type']='folder';}if(in_array($™‹È['type'],array('group'))){$Ý’ðØÆ=!0;}$Ý’„=array('name' =>$™‹È['name'],'ext' =>$™‹È['ext'],'menuType' =>"menuTreeFav",'path' =>$™‹È['path'],'type' =>$™‹È['type'],'open' =>!1,'isParent' =>$Ý’ðØÆ);if(isset($™‹È['type'])&& $™‹È['type']!='folder'){$Ý’„['ext']=$™‹È['type'];}$à̓[]=$Ý’„;}$GLOBALS['path_from_auth_check']=!1;return $à̓;}private function _tree_init($”¿”ª‰){if($”¿”ª‰=='editor' && isset($this->in['project'])){$øŒš™¼=$this->path(_DIR($this->in['project']),!0,!0);$åô‚ð½=array_merge($øŒš™¼['folderlist'],$øŒš™¼['filelist']);$ÎÏ䨗=array(array('name'=> get_path_this($this->in['project']),'children' =>$åô‚ð½,'menuType' =>"menuTreeRoot",'ext' =>"folder",'path' =>$this->in['project'],'type' =>'folder','open' =>!0,'isParent' =>count($åô‚ð½)>0?!0:!1));show_json($ÎÏ䨗);return;}$ñ=($”¿”ª‰=='editor'?!0:!1);$¡ö Þß=$this->_tree_fav($”¿”ª‰);$ôà=KOD_GROUP_PATH.':1/';if(system_member::user_auth_group(0x001)==!1){$ôà=KOD_GROUP_SHARE.':1/';}$Úµ…óñ=$this->path(_DIR($ôà),$ñ,!0);$ÙçñË¥=$this->path(_DIR(MYHOME),$ñ,!0);<EFBFBD>ËÃ<EFBFBD>Úµƒû¤ÛŽÙúƒ»¤í–ÚóŠÍããµÕ¯;if($ñ){$¼Êщ=array_merge($ÙçñË¥['folderlist'],$ÙçñË¥['filelist']);$ß=array_merge($Úµ…óñ['folderlist'],$Úµ…óñ['filelist']);}else{$¼Êщ=$ÙçñË¥['folderlist'];$ß=$Úµ…óñ['folderlist'];}$Äâßò=count($¼Êщ)>0?!0:!1;$»=count($ß)>0?!0:!1;$ÎÏ䨗=array('webroot'=>array(),'fav'=>array('name' =>$this->L['fav'],'ext' =>"treeFav",'menuType' =>"menuTreeFavRoot",'children' =>$¡ö Þß,'path' =>KOD_USER_FAV,'type' =>'folder','open' =>!0,'isParent' =>count($¡ö Þß)>0?!0:!1),'my_home'=>array('name' =>$this->L['root_path'],'menuType' =>"menuTreeRoot",'ext' =>"treeSelf",'children' =>$¼Êщ,'path' =>MYHOME,'type' =>'folder','open' =>!0,'isParent' =>$Äâßò),'public'=>array('name' =>$this->L['public_path'],'menuType' =>"menuTreeGroupRoot",'ext' =>"groupPublic",'children' =>$ß,'path' =>$ôà,'type' =>'folder','open' =>!0,'isParent' =>$»),'my_group'=>array('name' =>$this->L['my_kod_group'],'menuType' =>"menuTreeGroupRoot",'ext' =>"groupSelfRoot",'children' =>$this->_group_self(),'path' =>KOD_GROUP_ROOT_SELF,'type' =>'folder','open' =>!0,'isParent' =>!0),'group'=>array('name' =>$this->L['kod_group'],'menuType' =>"menuTreeGroupRoot",'ext' =>"groupRoot",'children' =>$this->_group_tree('1'),'path' =>KOD_GROUP_ROOT_ALL,'type' =>'folder','open' =>!0,'isParent' =>!0),);<EFBFBD><EFBFBD>Û;if($”¿”ª‰=='editor'){unset($ÎÏ䨗['my_group']);unset($ÎÏ䨗['group']);unset($ÎÏ䨗['public']);if($GLOBALS['is_root']==0x001){$´¶æ¾„=$this->path(_DIR(WEB_ROOT),$ñ,!0);$£º¡=array_merge($´¶æ¾„['folderlist'],$´¶æ¾„['filelist']);$ÎÏ䨗['webroot']=array('name' =>"webroot",'menuType' =>"menuTreeRoot",'ext' =>"folder",'children' =>$£º¡,'path' =>WEB_ROOT,'type' =>'folder','open' =>!0,'isParent' =>!0);}}else{unset($ÎÏ䨗['webroot']);<EFBFBD>ŸççÈËò¬¬å´çæ—Ÿë´ûÞ;}$³Æ¨¸‘=array();<EFBFBD> ‰‘¿ñùí»ÅàçòÇ<EFBFBD>Ú¯´ú›é÷úÓ¬ÁûäÓÈØ‡é♩ԓ;foreach($ÎÏ䨗 as $øøÌÁ=>$¨){if(count($¨['children'])<0x001&& in_array($øøÌÁ,array('my_group','group'))){continue;}$³Æ¨¸‘[]=$¨;}show_json($³Æ¨¸‘);<EFBFBD><EFBFBD>´œ‰ˆÉÊ…®ŸÎˆ¦¸êÀâ¿;}private function _group_tree($úÐô){$ú¶ß=system_group::load_data();$«È=$ú¶ß->get(array('parent_id',$úÐô));$å¾è¯=$this->_make_node_list($«È);$Þ©¼æÐ=array();<EFBFBD>Ø’äÔâ“É<EFBFBD><EFBFBD>;if($úÐô!='1'){$³=system_member::get_user_at_group($úÐô);foreach($³ as $¹û=>$™áž‚){$ïÒ×£='user';if($™áž‚['user_id']==$this->user['user_id']){$ïÒ×£='userSelf';}$Þ©¼æÐ[]=array('name' =>$™áž‚['name'],'menuType' =>"menuTreeUser",'ext' =>$ïÒ×£,'path' =>KOD_USER_SHARE.':'.$™áž‚['user_id'].'/','type' =>'folder','open' =>!1,'isParent' =>!1);}}$©µ=array_merge($å¾è¯,$Þ©¼æÐ);<EFBFBD>Ñ ®›Í¾<EFBFBD>ÛñÆ–í;return $©µ;}private function _group_self(){$ÐÄ=array();foreach($this->user['group_info'] as $í£ÓÁ=>$«äõÕ){if($í£ÓÁ=='1')continue;$ò’=system_group::get_info($í£ÓÁ);if($ò’){$ÐÄ[]=$ò’;}}return $this->_make_node_list($ÐÄ);<EFBFBD>á<EFBFBD>¤þÝ–Åó…ì¤Ö²Ö¹ ú<EFBFBD>â̹ÈÃ<EFBFBD>ã¶¢šüÕ€Þפݵ»;}private function _make_node_list($ªÁ){$Ï=array();if(!is_array($ªÁ)){return $Ï;}foreach($ªÁ as $¦Òå=>$ßÈ){$™‘³©ô=KOD_GROUP_PATH;$Ë<>ç¡<C3A7>=system_member::user_auth_group($ßÈ['group_id']);if($Ë<>ç¡<C3A7>==!1){$™‘³©ô=KOD_GROUP_SHARE;$ùµ¥='groupGuest';}else if($Ë<>ç¡<C3A7>=='read'){$ùµ¥='groupSelf';}else{$ùµ¥='groupSelfOwner';}$ñÉ=!0;$´ÛªÌ=system_member::get_user_at_group($ßÈ['group_id']);if(count($´ÛªÌ)==0&& $ßÈ['children']==''){$ñÉ=!1;}$Ï[]=array('name' =>$ßÈ['name'],'type' =>'folder','path' =>$™‘³©ô.':'.$ßÈ['group_id'].'/','ext' =>$ùµ¥,'tree_icon' =>$ùµ¥,'menuType' =>"menuTreeGroup",'isParent' =>$ñÉ);}return $Ï;<EFBFBD>ô€;}public function pathDelete(){$äšá™=json_decode($this->in['list'],!0);<EFBFBD><EFBFBD>çë;if(!is_dir(USER_RECYCLE)){mk_dir(USER_RECYCLE);}$÷³=$this->config['user']['recycle_open'];if(!path_writeable(USER_RECYCLE)){$÷³='0';}$®Ø=0;$¡£¸Õ=0;foreach($äšá™ as $£¡¶Â){$«Ã=_DIR($£¡¶Â['path']);<EFBFBD>Úª¢²®²š›ä“Α¨íãË;if($÷³!="1" || $GLOBALS['path_type']==KOD_GROUP_SHARE|| $GLOBALS['path_type']==KOD_GROUP_PATH|| $GLOBALS['path_type']==KOD_USER_RECYCLE){if($£¡¶Â['type']=='folder'){if(del_dir($«Ã))$®Ø++;else $¡£¸Õ++;}else{if(del_file($«Ã))$®Ø++;else $¡£¸Õ++;}space_size_use_reset();<EFBFBD>íÁ —íã<EFBFBD>þÂê©äžØ;}else{$¸=USER_RECYCLE.get_path_this($«Ã);<EFBFBD>Ã<EFBFBD><EFBFBD>ëûò¸£…¯‹óñ«‹ß<EFBFBD>›ßӇЏ¥âÐÞÖÌ«šÚ»‡×¯¿ûÜū繞”Äþ¥àÞøèé±<EFBFBD>Ì‚í;$¸=get_filename_auto($¸,date('-h:i:s'),'folder_rename');if(@rename($«Ã,$¸)){$®Ø++;}else{$¡£¸Õ++;}}}$š¿«Ö=$¡£¸Õ==0?!0:!1;<EFBFBD>‡;$âͫˇ=$®Ø.' success,'.$¡£¸Õ.' error';<EFBFBD>Ɇ®©þ—“±¦ß³•…„¯Ä¯†‹³<EFBFBD>“³ðà޼語¶ó¤äž¤ü²Õ£’Џ˜Žèܾ;if($¡£¸Õ==0){$âͫˇ=$this->L['remove_success'];}show_json($âͫˇ,$š¿«Ö);}private function clearTemp(){$èñüû¥=USER_TEMP;<EFBFBD>«Æ¯É;$¤îâÓ=@filemtime($èñüû¥);<EFBFBD>„‰ó½¡ƒ¦ýÁ–æ´”ãÙ‚Á߉<EFBFBD>÷ˆ´æê÷úËíäÐöØŽ™Ü´—ŸËþÓàâ®â¥Ž‘¯žŠ·Òð£Ëìï¹ÑÀ±«Îʈ„â¨Ðáû±Åª;if(time()-$¤îâÓ>0x0258){del_dir($èñüû¥);mk_dir($èñüû¥);}}public function pathDeleteRecycle(){if(!isset($this->in['list'])){if(!del_dir(USER_RECYCLE)){show_json($this->L['remove_fali'],!1);}else{mkdir(USER_RECYCLE);$this->clearTemp();space_size_use_reset();show_json($this->L['recycle_clear_success'],!0);}}$ë=json_decode($this->in['list'],!0);$œ×=0;$«£÷ö=0;foreach($ë as $±â©ãŽ){$¯—ý’À=_DIR($±â©ãŽ['path']);<EFBFBD>€ºç–§¡½Ãøî˜¤’<EFBFBD>œ£ù͆£±•<EFBFBD>à›óíêèªë¤“‚Ë´¿<EFBFBD>¯§ÒÁ¸;if($±â©ãŽ['type']=='folder'){if(del_dir($¯—ý’À))$œ×++;else $«£÷ö++;<EFBFBD>½ëÖî‚ôЯ<EFBFBD>Åžú®ÉçÒÜ韑ª®¿ÙÖ’›<EFBFBD>‚<EFBFBD>¿í;}else{if(del_file($¯—ý’À))$œ×++;else $«£÷ö++;}}space_size_use_reset();if(count($ë)==0x001){if($œ×)show_json($this->L['remove_success']);else show_json($this->L['remove_fali'],!1);<EFBFBD> ;}else{$ƾ=$«£÷ö==0?!0:!1;show_json($this->L['remove_success'].$œ×.'success,'.$«£÷ö.'error',$ƾ);<EFBFBD>É;}}public function pathCopy(){session_start();<EFBFBD>ö˜—¶òîÉŽþË<EFBFBD>ÂŒþܼîì½<EFBFBD><EFBFBD>„Ϊù׮ü<EFBFBD>´¶Åê©´´¸³<EFBFBD>Éö<EFBFBD>ÈÓʸÁˆÈÎ<EFBFBD>˜øˆï¨ÌÆùáü¿Í§ô‚ß©„ª;$’ò=json_decode($this->in['list'],!0);<EFBFBD>µäõ…òŽþúþ¨ÇîÁ<EFBFBD>ì‚Ý”ößô äŸÀö;$_SESSION['path_copy']=json_encode($’ò);$_SESSION['path_copy_type']='copy';show_json($this->L['copy_success'],ture,$_SESSION);<EFBFBD>¹¶ð¬Åð¨Ä™ïòˆ²ƒô´àЬÁþ̦žŽž²Ãòñ¯¨¡Úî’ƒ³¬ó¦´¦ªªÛ;}public function pathCute(){session_start();$ˆÌ³=json_decode($this->in['list'],!0);<EFBFBD>ã’…¨…÷س¡úŽ<EFBFBD><EFBFBD>‘ĺ…ëﬖšˆ¡Ï‘í„æáÖËôÜóúÔÌ®õȼ‡ÖÎˑԷ<EFBFBD><EFBFBD>Í›Šîë›Ýï‚;foreach($ˆÌ³ as $ÆÍ¶=>&$±){$±['path']=rawurldecode($±['path']);<EFBFBD>ïØ<EFBFBD>ö¯ìÃÀÁúÂÃÉÞ͸;_DIR($±['path']);<EFBFBD>ºëØ‚º<EFBFBD>¦ýÁŸŽ¡<EFBFBD>翇;}$_SESSION['path_copy']=json_encode($ˆÌ³);$_SESSION['path_copy_type']='cute';show_json($this->L['cute_success']);<EFBFBD>Æ›³<EFBFBD>ù<EFBFBD>ÉÄêá€×»‚“ʨ‘ŒÈ ®Øˆîà ›¬ù‹ò–¾„‘ÀÎÖ¬°Ö…ëØ˜·<EFBFBD>ªÄÉËò£Ôâ„ôþ°ïФ†;}public function pathCuteDrag(){$¨—Š=json_decode($this->in['list'],!0);<EFBFBD>©Ä»•žÔÍ €’êË†Ž è’–çÆòç<EFBFBD>¼‘¤Ç‰“ý²×ºÈö<EFBFBD>–;$‚Ü=$this->path;$£”=$GLOBALS['path_type'];$šõϧ³=$GLOBALS['path_id'];<EFBFBD>éßø<EFBFBD>¸´å¯ÅüÆÖ¦É³×Ú±ñþÅôæà궉Ÿ˜Õšƒ¶” îȇž<EFBFBD>„åå«°™„‹Ëõ‹‘êòñÖ©ûõÂÒ‘;if(!path_writeable($this->path))show_json($this->L['no_permission_write'],!1);$‰¥æ=0;<EFBFBD>—ýòý㟮ý£ºÉ™ÅÛ…¸ÎÜâÊÓ¥<EFBFBD>ä릊ҟùÀ¶÷´´ÜÓãÛöž¦‘ã‚–<EFBFBD>Ðò<EFBFBD>œÇ§¹¬“à·æ<EFBFBD>±¨¸ªÜ툰Ñã¨ï‹¹Ô<EFBFBD>Ï;$ÞÃóú‹=0;$¸°—=array();<EFBFBD>¢¿ÑÌ<EFBFBD>¿;foreach($¨—Š as $Α¹ö){$Å=_DIR($Α¹ö['path']);$Ò<>ɲ=get_path_this($Å);<EFBFBD>ÑÚ䊋ûú£•<EFBFBD>ãæê<EFBFBD>¦ÀϸúÇ;$Àø‘=get_filename_auto($‚Ü.$Ò<>ɲ,'',$this->config['user']['file_repeat']);if($šõϧ³!=$GLOBALS['path_id']){space_size_use_check();}if(move_path($Å,$Àø‘,'',$this->config['user']['file_repeat'])){$‰¥æ++;if($šõϧ³!=$GLOBALS['path_id']){space_size_use_change($Àø‘);space_size_use_change($Àø‘,!1,$£”,$šõϧ³);}$¸°—[]=_DIR_OUT(iconv_app($Àø‘));}else{$ÞÃóú‹++;<EFBFBD>Àšô“õÙž‚Ö™¥ì·‰Ó¢‹úâڳݢ<EFBFBD>³—Üù×÷ïëîʊ𢤗;}}$Û=$ÞÃóú‹==0?!0:!1;$ý¬Þà=$‰¥æ.' success,'.$ÞÃóú‹.' error';if($ÞÃóú‹==0){$ý¬Þà=$this->L['success'];}show_json($ý¬Þà,$Û,$¸°—);}public function pathCopyDrag(){$ƒÞ=json_decode($this->in['list'],!0);<EFBFBD>Þà;$ü£ÈÈ=$this->path;$êÒÑ=$GLOBALS['path_type'];<EFBFBD>Þ¬Ÿ¾Ž§ÒÍÒÕ¬šÚ¿ø»Ì°•ÉÔÞ“ƒ™þÕêù„ÝÙ±ý˜¿¦ëŽ;$Á»”œú=$GLOBALS['path_id'];space_size_use_check();<EFBFBD>ͦ—ç¥ìÒŸð±ø¢¯’âÕýðÏÀäݨò·ð²;if(!path_writeable($this->path))show_json($this->L['no_permission_write'],!1);$„Æ=0;<EFBFBD>ÜÐʰð¼áéÞ’üÂèû´¸¼ážšŠ‘ÑûÄø<EFBFBD>‹î«;$Ìü´üí=0;<EFBFBD>ÐñÕ”ÚÑÈ”<EFBFBD>ª²©µÄû±‰õ²•åÞþ²Û´°Ê¦<EFBFBD>£÷ƒøŒÝËÔòÚ€¦…µê‚çô÷›‹Ýú‹‘;$¿Á¢å=array();<EFBFBD>վ괋¿§å¿Íêõ¹ìݯåù»ÄôÆÕ̆˜îìê´ÊÀó¶ôþõ<EFBFBD>å¶êÐ¥;foreach($ƒÞ as $‹Õ¤){$‘=_DIR($‹Õ¤['path']);<EFBFBD>¿ÇÞØ¶ËÃë—„ßÍùßÄ—Åúƒ—©©Õ´þúº<EFBFBD>äµè¥ýÇý´“Á ªÆ<EFBFBD>÷Áá¼Ø§¸Ü¿á†•—…‘Ò–ö‰þœ‡Æ›¼;$ÝÝ…¥=get_path_this($‘);<EFBFBD>Á»Àéô<EFBFBD>©×£¿î©Ð¿ÇË¿äÓ†<EFBFBD><EFBFBD>àÞíæ„Íåê<EFBFBD>¡«ø–É¢íìâÝ—³¡Öûí–áÁ<EFBFBD>âÑþÁÀæÅŽÌ±žíÝ—…§ºó”<EFBFBD>Ò«ÑóƒÎâš;$¤·=get_filename_auto($ü£ÈÈ.$ÝÝ…¥,'',$this->config['user']['file_repeat']);if($this->in['filename_auto']==0x001&& trim($¤·,'/')==trim($‘,'/')){$¤·=get_filename_auto($ü£ÈÈ.$ÝÝ…¥,'','folder_rename');}if(copy_dir($‘,$¤·)){$„Æ++;space_size_use_change($ÝÝ…¥);$¿Á¢å[]=_DIR_OUT(iconv_app($¤·));}else{$Ìü´üí++;}}$¶Õ·<C395>œ=$Ìü´üí==0?!0:!1;<EFBFBD>äÙ«üÞÒ·ÓçÕ¦”¨›˜öý²§£é»š¡‘Ò¿™ªûý„§úãú³·âŠÞ÷²ù<EFBFBD>©øÂÑœ¬<EFBFBD>;$ΟŠ=$„Æ.' success,'.$Ìü´üí.' error';if($Ìü´üí==0){$ΟŠ=$this->L['success'];}show_json($ΟŠ,$¶Õ·<C395>œ,$¿Á¢å);}public function clipboard(){$£¹É¡=json_decode($_SESSION['path_copy'],!0);if(!$£¹É¡){$£¹É¡=array();}show_json($£¹É¡,!0,$_SESSION['path_copy_type']);}public function pathPast(){if(!isset($_SESSION['path_copy'])){show_json($this->L['clipboard_null'],!1,array());}$<24>¡ëÑÙ=$this->path;session_start();<EFBFBD>Ç<EFBFBD>³×¹›ŒÊÈš‚—¹Œ¦‡¯ßÑÑ<EFBFBD>Ãï¿°Áš€žÓÈ®ˆ;$èµ='';$€†<E282AC>‚<EFBFBD>=array();<EFBFBD>о¤£‘Áæ<EFBFBD>‚—Ã;$˜á=json_decode($_SESSION['path_copy'],!0);<EFBFBD>øƒù®Àî¯Æþ²ã;$Á¨™=$_SESSION['path_copy_type'];$¼’<C2BC>¤=$GLOBALS['path_type'];$¯Ó¹ =$GLOBALS['path_id'];if(!path_writeable($<24>¡ëÑÙ))show_json($this->L['no_permission_write'],!1,$€†<E282AC>‚<EFBFBD>);$GLOBALS['path_from_auth_check']=!0;<EFBFBD>ÅÉøµø¿´¬¤üíÍ—;$›Ó<E280BA>«÷=count($˜á);if($›Ó<E280BA>«÷==0){show_json($this->L['clipboard_null'],!1,$€†<E282AC>‚<EFBFBD>);}for($´ëî=0;$´ëî<$›Ó<E280BA>«÷;$´ëî++){$¥=_DIR($˜á[$´ëî]['path']);_DIR($this->in['path']);$ªö¶óï=get_path_this($¥);<EFBFBD>¡šÕž‰¤µ÷¿Šùëƒ<EFBFBD>ª·û™À¡©þ“ÓöÊÈæ·¶˜ÙÐî;$Ù“®ÒÒ=iconv_app($ªö¶óï);if(!file_exists($¥)){$èµ.= "<li>{$Ù“®ÒÒ}".$this->L['copy_not_exists']."</li>";continue;<EFBFBD>ÝéõÙƒ·û¬¶<EFBFBD><EFBFBD>ÙÉ•’<EFBFBD>®ëÒ<EFBFBD>ä°”€„;}if($˜á[$´ëî]['type']=='folder'){if($¥==substr($<24>¡ëÑÙ,0,strlen($¥))){$èµ.="<em style='color:#fff;'>{$Ù“®ÒÒ}".$this->L['current_has_parent']."</em>";continue;<EFBFBD>Œ¬¬‚†°¹‚Ýð‘ޟ멵ýªãêü<EFBFBD>Ϫ²ä«¶³ùø¿§¦Â;}}$×û=get_filename_auto($<24>¡ëÑÙ.$ªö¶óï,'',$this->config['user']['file_repeat']);$ªö¶óï=get_path_this($×û);if($Á¨™=='copy'){space_size_use_check();copy_dir($¥,$×û);space_size_use_change($ªö¶óï);}else{if($¯Ó¹ !=$GLOBALS['path_id']){space_size_use_check();}move_path($¥,$×û,'',$this->config['user']['file_repeat']);if($¯Ó¹ !=$GLOBALS['path_id']){space_size_use_change($ªö¶óï);space_size_use_change($ªö¶óï,!1,$¼’<C2BC>¤,$¯Ó¹ );}}$€†<E282AC>‚<EFBFBD>[]=_DIR_OUT(iconv_app($×û));<EFBFBD><EFBFBD>¿Â¬ê§˜ç¨;}if($Á¨™=='copy'){$“ÚÍ¿’=$this->L['past_success'].$èµ;}else{$_SESSION['path_copy']=json_encode(array());$_SESSION['path_copy_type']='';$“ÚÍ¿’=$this->L['cute_past_success'].$èµ;}$º=($èµ==''?!0:!1);show_json($“ÚÍ¿’,$º,$€†<E282AC>‚<EFBFBD>);}public function fileDownload(){file_put_out($this->path,!0);<EFBFBD>ƒ<EFBFBD>‹€¿Àî<EFBFBD>Öü¯–ÀÜ<EFBFBD>çôé‘Ýý쬽þø‹îÚ¾ò;}public function fileDownloadRemove(){$ÉóªŠâ=rawurldecode(_DIR_CLEAR($this->in['path']));$ÉóªŠâ=USER_TEMP.iconv_system($ÉóªŠâ);<EFBFBD>÷ ¹øˆ®âš<EFBFBD>à‡¹Ÿ†ç˜‘ÖóÏÊÞš¾Š¤¡¶†‚“þ£Ì÷¬ûÛÆ‰½ÍÃÜÓ«õåƒé¶ÍÉÐŒÓõ;space_size_use_change($ÉóªŠâ,!1);file_put_out($ÉóªŠâ,!0);del_file($ÉóªŠâ);<EFBFBD>ûÔëô<EFBFBD>èÐÇòŽ•¶;}public function zipDownload(){if(!file_exists(USER_TEMP)){mkdir(USER_TEMP);}else{$éââÐæ=path_list(USER_TEMP,!0,!1);$‡µ—×=0x0e10*0x0000018;if($éââÐæ['filelist']>=0x001){for($êÎð=0;$êÎð<count($éââÐæ['filelist']);$êÎð++){$Ë£–È÷=$éââÐæ['filelist'][$êÎð]['mtime'];if(time()-$Ë£–È÷>$‡µ—×){del_file($éââÐæ['filelist'][$êÎð]['path'].$éââÐæ['filelist'][$êÎð]['name']);}}}}$½=$this->zip(USER_TEMP);<EFBFBD>ÁßžÖ—ŠÁúí’á;show_json($this->L['zip_success'],!0,get_path_this($½));}public function zip($˜Ñ=''){load_class('pclzip');<EFBFBD>Á̵ŽïÌÖçϕἤ£œÂù´Í¼¯»Ï‘öé©ÉÜ„ˆžÑ½¬Á‹;ini_set('memory_limit','2028M');$Û™=json_decode($this->in['list'],!0);$µ<>=count($Û™);for($Îæš‹¶=0;$Îæš‹¶<$µ<>;$Îæš‹¶++){$Û™[$Îæš‹¶]['path']=rtrim(_DIR($Û™[$Îæš‹¶]['path']),'/');}$¡=$˜Ñ;<EFBFBD>ÚÔ<EFBFBD>¬“ÉîŸÎ™ú祔¥Ôʧ€µöæÏ‚žû…¿ÑѾ¬§ÛÙ»¦ÈÚôâÕ܈êƒÝµªÝê¡Å»¤ã·©¤‰ûⶤ;if($˜Ñ==''){$¡=get_path_father($Û™[0]['path']);}if(!is_writeable($¡)){show_json($this->L['no_permission_write'],!1);}if($µ<>==0x001){$<24>àå=get_path_this($Û™[0]['path']);}else{$<24>àå=get_path_this(get_path_father($Û™[0]['path']));}$»Ú¼’=$¡.$<24>àå.'.zip';$»Ú¼’=get_filename_auto($»Ú¼’,'',$this->config['user']['file_repeat']);space_size_use_check();<EFBFBD>£³å‚žˆÇÙ¬¬‘ÖЛӴÑ÷óâÙÙ½•´ù¨ìÀ¦¨ãÙŽæø–®ÓÃÛäš<EFBFBD>í;$ÓæÖ¶=array();<EFBFBD>ÖåîþÓ¯¥û”€Šúø¡ªÌ䆲€³³î–‡Õì¾—Ÿ³í…£íÙÒ”Õç”à;for($Îæš‹¶=0;$Îæš‹¶<$µ<>;$Îæš‹¶++){if(file_exists($Û™[$Îæš‹¶]['path'])){$ÓæÖ¶[]=$Û™[$Îæš‹¶]['path'];}}if(count($ÓæÖ¶)==0){show_json($this->L['not_exists'],!1);}$ŽƒŽÚ=new PclZip($»Ú¼’);foreach($ÓæÖ¶ as $•ŽèÉÂ=>$ßÉ®Í){$½´òà£=_DIR_CLEAR(get_path_father($ßÉ®Í));<EFBFBD>£œÍ„<EFBFBD>Û‡<EFBFBD>·ï¥ÅØïˆ±ÏÒßžÜ;if($•ŽèÉÂ==0){$Œš=$ŽƒŽÚ->create($ßÉ®Í,PCLZIP_OPT_REMOVE_PATH,$½´òà£,PCLZIP_CB_PRE_FILE_NAME,'zip_pre_name');continue;}$Œš=$ŽƒŽÚ->add($ßÉ®Í,PCLZIP_OPT_REMOVE_PATH,$½´òà£,PCLZIP_CB_PRE_FILE_NAME,'zip_pre_name');}space_size_use_change($»Ú¼’);<EFBFBD>ý̯¶ïÌ„ôÎßüÞ˜ì…ÝÆôå÷Ź×ã–ýï°Øï¬Ö¼ÜŽ©’£÷ò ׋<EFBFBD>ÜèÔÑÏÍ—‰¥ûŸ£ëÐüÜüÓšÚáÇ„ôêüçŒÕòš²Ü¼œ¶â˜Ö‡…§„á¥Øü€»;if($Œš==0){show_json("Create error!",!1);}$…°°=$this->L['zip_success'].$this->L['size'].":".size_format(filesize($»Ú¼’));if($˜Ñ==''){show_json($…°°,!0,_DIR_OUT(iconv_app($»Ú¼’)));}else{return iconv_app($»Ú¼’);}}public function unzip(){ini_set('memory_limit','2028M');$Œ×Œè=$this->path;<EFBFBD>„Ìç;$¤îÌ=get_path_this($Œ×Œè);<EFBFBD>ñ̬òˆñø¹£ûÒàÕÞ¸áÈ€óÞ…¡¬ìèÐÛµ<EFBFBD>Ïä<EFBFBD><EFBFBD>‘ƒ;$¤îÌ=substr($¤îÌ,0,strrpos($¤îÌ,'.'));$û=get_path_ext($Œ×Œè);<EFBFBD>²ˆÎ‘À±ÙÁ¥¹ÆÇæ³±·<EFBFBD>æÕàÌåýÞè¤á儉޶‘®ÇÒ;$¢”†Ü=get_path_father($Œ×Œè).$¤îÌ;<EFBFBD><EFBFBD><EFBFBD>ûŸçÑ€µ·þ”¡£öˆ§<EFBFBD>æÞ“–§åöÉúý§ÖÍëåÎç…·;if(isset($this->in['to_this'])){$¢”†Ü=get_path_father($Œ×Œè);}if(isset($this->in['path_to'])){$¢”†Ü=_DIR($this->in['path_to']);}if(!is_writeable(get_path_father($Œ×Œè))){show_json($this->L['no_permission_write'],!1);}space_size_use_check();load_class('pclzip');$ì=new PclZip($Œ×Œè);<EFBFBD>”;$øœ=$ì->extract(PCLZIP_OPT_PATH,$¢”†Ü,PCLZIP_OPT_SET_CHMOD,0777,PCLZIP_CB_PRE_FILE_NAME,'unzip_pre_name',PCLZIP_CB_PRE_EXTRACT,"check_ext_unzip",PCLZIP_OPT_REPLACE_NEWER);<EFBFBD>¯<EFBFBD>šÖ;if($øœ==0){show_json("Error : ".$ì->errorInfo(!0),fasle);}else{space_size_use_change($Œ×Œè);show_json($this->L['unzip_success']);}}public function imageRotate(){load_class('imageThumb');<EFBFBD>î<EFBFBD>ÉÅݵ;$¬<>=new imageThumb($this->path,'file');$׸ÑÊ=$¬<>->imgRotate($this->path,intval($this->in['rotate']));if($׸ÑÊ){show_json($this->L['success']);}else{show_json($this->L['error'],!1);}}public function image(){if(filesize($this->path)<=0x00000400*0x014|| !function_exists('imagecolorallocate')){file_put_out($this->path);return;}if(!is_dir(DATA_THUMB)){mk_dir(DATA_THUMB);}load_class('imageThumb');$ÞçÌú=$this->path;$þéÔ=@md5_file($ÞçÌú);if(strlen($þéÔ)<0x05){$þéÔ=md5($ÞçÌú);}$É«ã=DATA_THUMB.$þéÔ.'.png';if(!file_exists($É«ã)){if(get_path_father($ÞçÌú)==DATA_THUMB){$É«ã=$this->path;}else{$»þ=new imageThumb($ÞçÌú,'file');$»þ->prorate($É«ã,0x0fa,0x0fa);}}if(!file_exists($É«ã)|| filesize($É«ã)<0x064){$É«ã=$this->path;}file_put_out($É«ã);}public function serverDownload(){set_time_limit(0);$«Æ‚Ý='download_'.$this->in['uuid'];if($this->in['type']=='percent'){if(isset($_SESSION[$«Æ‚Ý])){$–ý¥Õ=$_SESSION[$«Æ‚Ý];$„½Ÿ€=array('uuid' =>$this->in['uuid'],'length' =>(int)$–ý¥Õ['length'],'name' =>$–ý¥Õ['name'],'size' =>(int)@filesize(iconv_system($–ý¥Õ['path'])),'time' =>mtime());show_json($„½Ÿ€);}else{show_json('',!1);}}else if($this->in['type']=='remove'){del_file($_SESSION[$«Æ‚Ý]['path']);unset($_SESSION[$«Æ‚Ý]);show_json('',!1);}$æ€á¼š=_DIR($this->in['save_path']);if(!is_writeable($æ€á¼š)){show_json($this->L['no_permission_write'],!1);}$†Å=rawurldecode($this->in['url']);$µ=url_header($†Å);if(!$µ){show_json($this->L['download_error_exists'],!1);}$æ€á¼š=$æ€á¼š.$µ['name'];if(!checkExt($æ€á¼š)){$æ€á¼š=_DIR($this->in['save_path']).date('-h:i:s').'.txt';}space_size_use_check();$æ€á¼š=get_filename_auto(iconv_system($æ€á¼š),'',$this->config['user']['file_repeat']);$ê=$æ€á¼š.'.downloading';<EFBFBD><EFBFBD>õߎ›¶à ó€ ëæ Î£º;session_start();<EFBFBD>ø;$_SESSION[$«Æ‚Ý]=array('length'=> $µ['length'],'path' =>$ê,'name' =>get_path_this($æ€á¼š));<EFBFBD>¨ È”…;session_write_close();<EFBFBD>Ù½¤ôó…•è…¶ÕëÖ¤;if(file_download_this($†Å,$ê,$µ['length'])){session_start();unset($_SESSION[$«Æ‚Ý]);session_write_close();if(@rename($ê,$æ€á¼š)){$’=get_path_this(iconv_app($æ€á¼š));space_size_use_change($æ€á¼š);show_json($this->L['download_success'],!0,_DIR_OUT(iconv_app($æ€á¼š)));}else{show_json($this->L['download_error_create'],!1);}}else{session_start();unset($_SESSION[$«Æ‚Ý]);session_write_close();show_json($this->L['download_error_create'],!1);}}public function officeView(){if(!file_exists($this->path)){show_tips($this->L['not_exists']);}$˜¿=get_path_ext($this->path);$¸ˆà=_make_file_proxy($this->path);if(defined("OFFICE_KOD_SERVER")){$¾ÓÆûø=APPHOST.'index.php?explorer/fileProxy&path='.$this->in['path'];$ðýÑ='&appMode=edit&access_token='.session_id();if(OFFICE_KOD_ACTION=='read'){$ðýÑ='&appMode=view';$¾ÓÆûø=_make_file_proxy($this->path);}$ƒˆ°ï=$_SESSION['kod_user'];$Õ€òì=rand_string(0x0a);$ý=OFFICE_KOD_SERVER.rawurlencode($¾ÓÆûø).'&lang='.LANGUAGE_TYPE.'&appType=desktop'.$ðýÑ.'&file_time='.@filemtime($this->path).'&user_id='.$ƒˆ°ï['user_id'].'&user_name='.$ƒˆ°ï['name'].'&app_id='.OFFICE_KOD_APP_ID.'&app_s='.$Õ€òì.'&app_v='.md5($Õ€òì.OFFICE_KOD_APP_KEY);<EFBFBD>ª×Æ‹—³ÉêúÆã·¸â‰“;header("location:".$ý);<EFBFBD>Öñ›×䈒ë†ïŒÄ›;exit;<EFBFBD>ûÀð绸;}if(file_exists(PLUGIN_DIR.'officeView')){if(isset($_GET['is_edit'])|| !isset($this->config['settings']['office_server_doc2pdf'])){include(PLUGIN_DIR.'officeView/index.php');}else{include(PLUGIN_DIR.'officeView/flexpapper.php');}exit;}$òð¯=$_SERVER['HTTP_HOST'];<EFBFBD><EFBFBD>Êí;if(strpos(OFFICE_SERVER,'view.officeapps.live.com')===-0x001|| strstr($òð¯,'10.10.')|| strstr($òð¯,'192.168.')|| strstr($òð¯,'127.0.')|| !strstr($òð¯,'.')){$å=$this->L['unknow_file_office'];show_tips($å);}else{$ý=OFFICE_SERVER.rawurlencode($¸ˆà);header("location:".$ý);}}public function officeSave(){$çíØ=_DIR($this->in['path']);<EFBFBD>áºäÆÆŒÂ‡üªÃµö·§§µ¾Å÷¬ÈÝó±Ì̇–èüú¯Ã‡òË…<EFBFBD><EFBFBD>»•Çã¼ü‘û‰©‹;if(isset($this->in['from_activex'])){if($_FILES["file"]["error"]>0){echo "Return Code: ".$_FILES["file"]["error"];}else{move_uploaded_file($_FILES["file"]["tmp_name"],$this->path);echo 'succeed';}exit;}if(!is_writeable($çíØ)){$this->json_putout(array('error'=>'no_permission_write'));}if(($<24>½µéÄ=file_get_contents('php://input'))===!1){$this->json_putout(array('error'=>'Bad Request'));}$€õûÜ=json_decode($<24>½µéÄ,!0);if($€õûÜ===NULL){$this->json_putout(array('error'=>'Bad Response'));}$„φ=array(0=>'NotFound',0x001=>'Editing',0x0002=>'MustSave',0x00003=>'Corrupted',0x000004=>'Closed');$í=array('error'=>0,'action'=>$„φ[$€õûÜ["status"]]);switch($„φ[$€õûÜ["status"]]){case "MustSave":case "Corrupted":$í["c"]="saved";<EFBFBD>©ÁÚº½<EFBFBD>Äæ©;$í['status']='0';if(file_download_this($€õûÜ["url"],$çíØ)){$í['status']='success';}break;default:break;<EFBFBD>«ÜïÙÒë¶<EFBFBD>ð‡“úõ©Àùˆê»â¦ù€êઙå‘üÔ½ÙÅ—±Îº£ÖÎžÌøÞÇ<EFBFBD>Ê„ãðýäÛß<EFBFBD>õÆ¢òœßÍá÷ú”ƶ·;}$this->json_putout($í);}private function json_putout($Õ){@header('Content-Type: application/json; charset==utf-8');<EFBFBD>³<EFBFBD>€·äð¶ÊÍ—ÚÃÝü·úÝ…ÜÕ<EFBFBD>ð<EFBFBD>·¨»½þ§½´Ú¾µ“£§Êîôáʹ;@header('X-Robots-Tag: noindex');<EFBFBD>»¦ö™üøŠš±²Õî±ü¬æØêœì<EFBFBD>÷þ¹šÉóۓ嘹ܱ¶Ö»Ñˆî§÷¡¥¤ˆþ<EFBFBD>¥ë é¤ ;@header('X-Content-Type-Options: nosniff');echo json_encode($Õ);exit;<EFBFBD>ýý³·Ûä;}public function fileProxy(){$²¡À»<C380>=isset($this->in['download']);<EFBFBD><EFBFBD>غŽéßúŠÉŸªíÞ–‡ù”…;file_put_out($this->path,$²¡À»<C380>);}public function fileUpload(){$à“»=_DIR($this->in['upload_to']);if(!is_writeable($à“»))show_json($this->in['upload_to'],!1);if($à“»=='')show_json($this->L['upload_error_big'],!1);if(strlen($this->in['fullPath'])>0x001){$ûÏÅ=_DIR_CLEAR(rawurldecode($this->in['fullPath']));$ûÏÅ=get_path_father($ûÏÅ);$ûÏÅ=iconv_system($ûÏÅ);if(mk_dir($à“».$ûÏÅ)){$à“»=$à“».$ûÏÅ;}}$ƒöôÛ=$this->config['user']['file_repeat'];$€=USER_TEMP;<EFBFBD>ûËþ’Òù¦×¨ò¸»®Ì𫜶‘ ;mk_dir($€);if(!is_writeable($€))show_json($this->L['no_permission_write'],!1);upload_chunk('file',$à“»,$€,$ƒöôÛ);}private function path_share(&$àŒÂòŒ){$<24>›=explode(',',$GLOBALS['path_id']);$í¦=system_member::user_share_list($<24>›[0]);<EFBFBD>»€‹êÍû—곩‹á°ˆÂ½Ê¶É݆õí¢¢<EFBFBD>‘ÈÙ×—–Ø£<EFBFBD>¦ ™;$Ó=$GLOBALS['path_id_user_share'];<EFBFBD>ó¥ù±ï°úηñ½Ú•;foreach($í¦ as $ëݧÄ=>$½<>™¿Ä){$ØÖŽ=_DIR(KOD_USER_SHARE.':'.$<24>›[0].'/'.$½<>™¿Ä['name']);$½<>™¿Ä['path']=$½<>™¿Ä['name'];<EFBFBD>™¿ÂŠð¾Ù©;$½<>™¿Ä['atime']='';$½<>™¿Ä['ctime']='';$½<>™¿Ä['mode']='';$½<>™¿Ä['is_readable']=0x001;<EFBFBD>¤<EFBFBD>µ›ËÓµŒ™ïäïþ<EFBFBD>ãÄ’ý…Ô‰ö“â Äú¥‹à–¯îÌ˺¡<EFBFBD>ƺñ¬ªð®<EFBFBD>µÀ<EFBFBD>º–—±ªùÒîô÷úÖŽ«ÅÛö€üøÇ·êó;$½<>™¿Ä['is_writable']=0x001;<EFBFBD>ñ’ã€Íú—€¥’Ò•‡Ë<EFBFBD>ÝÚ¼¤¶³;$½<>™¿Ä['exists']=intval(file_exists($ØÖŽ));$½<>™¿Ä['meta_info']='path_self_share';$½<>™¿Ä['menuType']="menuSharePath";if(get_path_ext($½<>™¿Ä['name'])=='oexe'){$ë˜àÎô=json_decode(@file_get_contents($ØÖŽ),!0);if(is_array($ë˜àÎô))$½<>™¿Ä=array_merge($½<>™¿Ä,$ë˜àÎô);}if($½<>™¿Ä['type']=='folder'){$½<>™¿Ä['ext']='folder';$àŒÂòŒ['folderlist'][]=$½<>™¿Ä;}else{$àŒÂòŒ['filelist'][]=$½<>™¿Ä;}}$àŒÂòŒ['path_read_write']='readable';$GLOBALS['path_id_user_share']=$Ó;<EFBFBD>ÁÕãØÕŠê© òô±Ñ;if($<24>›[0]==$this->user['user_id']){$àŒÂòŒ['share_list']=$í¦;}return $àŒÂòŒ;}private function path_fav(&$íõ†¢){$ºÏ=new fileCache(USER.'data/fav.php');$çé=$ºÏ->get();<EFBFBD>¶å×÷»»Ñ‘ƽºæ±¯˜ƒþ‡ù†©–ÀøžæáˆÜ¿ö”¥Î<EFBFBD>á‹ÞòÑ<EFBFBD>®¹ÎÝÒÒÝÙÌä„â¥ü‚<EFBFBD>ßŠê ‚þÆÐ<EFBFBD>;$GLOBALS['path_from_auth_check']=!0;foreach($çé as $뜮Š=>$çØ©){$«‡•=_DIR($çØ©['path']);<EFBFBD>Ü’˜ß ÷ê‹™ì‹ß½˜‰š„¥;$<24>ð±=path_haschildren($«‡•,$šì”¡ƒ);if(!isset($çØ©['type'])){$çØ©['type']='folder';}if($çØ©['type']=='folder' && $çØ©['ext']!='treeFav'){$<24>ð±=!0;}$<24>=array('name' =>$çØ©['name'],'ext' =>$çØ©['ext'],'menuType' =>"menuFavPath",'atime' =>'','ctime' =>'','mode' =>'','is_readable' =>0x001,'is_writeable' =>0x001,'exists' =>intval(file_exists($«‡•)),'meta_info' =>'treeFav','path' =>$çØ©['path'],'type' =>$çØ©['type'],'open' =>!1,'isParent' =>!1);if(strstr($çØ©['path'],KOD_USER_SHARE)|| strstr($çØ©['path'],KOD_USER_FAV)|| strstr($çØ©['path'],KOD_GROUP_ROOT_SELF)|| strstr($çØ©['path'],KOD_GROUP_ROOT_ALL)){$<24>['exists']=0x001;}if(get_path_ext($çØ©['name'])=='oexe'){$¡µÊÁ®=json_decode(@file_get_contents($«‡•),!0);if(is_array($¡µÊÁ®))$çØ©=array_merge($çØ©,$¡µÊÁ®);}if($çØ©['type']=='folder'){$íõ†¢['folderlist'][]=$<24>;}else{$íõ†¢['filelist'][]=$<24>;}}$GLOBALS['path_from_auth_check']=!1;$GLOBALS['path_type']=KOD_USER_FAV;<EFBFBD>רàï²ûôØÄ„Éõìäã<EFBFBD>†;$íõ†¢['path_read_write']='writeable';<EFBFBD>„ú¶º;return $íõ†¢;<EFBFBD>üŲ¡žÚƒ<EFBFBD>Žþ„çɱºö–ž÷<EFBFBD>†‰³‹„êÆËã°ÉªâêȾî×ÌíÜ´²ææíÝýŒÖ›“ßÏžãºä°ž•úÉøæ’·Õê„Ãǹõ® 䌞;}private function path_group(&$⺅Š,$§Å){if($§Å==KOD_GROUP_ROOT_SELF){$Ø=$this->_group_self();}else{$Ø=$this->_group_tree('1');}$GLOBALS['path_from_auth_check']=!0;foreach($Ø as $ŸÓ®˜=>$ÁÏ‘){$ÔÕ=array('name' =>$ÁÏ‘['name'],'menuType' =>"menuGroupRoot",'atime' =>'','ctime' =>'','mode' =>'','is_readable' =>0x001,'is_writeable' =>0x001,'exists' =>0x001,'path' =>$ÁÏ‘['path'],'ext' =>$ÁÏ‘['ext'],'type' =>'folder','open' =>!1,'isParent' =>!1);<EFBFBD>£¯±¯Î£“‰¨Ö”Ì;if($ÁÏ‘['type']=='folder'){$⺅Š['folderlist'][]=$ÔÕ;}else{$⺅Š['filelist'][]=$ÔÕ;}}$GLOBALS['path_from_auth_check']=!1;<EFBFBD>׿õ¬îŽç°ÞùܳÏÑœôñͤÀñ¸Êš<EFBFBD>߿޻½åû´“êÃû›¢õøÖÆÊ™â¿Œ±ä;$GLOBALS['path_type']=$§Å;<EFBFBD>˜¾ø¦»´ä¢;$⺅Š['path_read_write']='writeable';return $⺅Š;}private function path($œÜ²,$€¨±=true,$îüðÒ=false){$ü…£=explode(',',$this->config['setting_system']['path_hidden']);<EFBFBD>ãçîÜŽª’òÌÂ<EFBFBD>ƒß궘êÞÉÂ;$dz¢…=_DIR_OUT(iconv_app($œÜ²));if($GLOBALS['path_type']==KOD_USER_SHARE&& strpos(trim($œÜ²,'/'),'/')===!1){$dz¢…=$œÜ²;}$¨ú=array('folderlist' =>array(),'filelist' =>array(),'info' =>array(),'path_read_write' =>'not_exists','this_path' =>$dz¢…);if(!file_exists($œÜ²)){$¨ú['path_read_write']="not_exists";}else if(path_writeable($œÜ²)){$¨ú['path_read_write']='writeable';}else if(path_writeable($œÜ²)){$¨ú['path_read_write']='readable';}else{$¨ú['path_read_write']='not_readable';}if($œÜ²===!1){return $¨ú;}else if($GLOBALS['path_type']==KOD_USER_SHARE&& !strstr(trim($this->in['path'],'/'),'/')){$¨ú=$this->path_share($¨ú);}else if($GLOBALS['path_type']==KOD_USER_FAV){$¨ú=$this->path_fav($¨ú);}else if($GLOBALS['path_type']==KOD_GROUP_ROOT_SELF){$¨ú=$this->path_group($¨ú,$GLOBALS['path_type']);}else if($GLOBALS['path_type']==KOD_GROUP_ROOT_ALL){$¨ú=$this->path_group($¨ú,$GLOBALS['path_type']);}else{$€¨±=path_list($œÜ²,$€¨±,!0);$¨ú['folderlist']=$€¨±['folderlist'];$¨ú['filelist']=$€¨±['filelist'];}$éÞ¸Ø=array();$Ç„Î=array();foreach($¨ú['filelist'] as $’ÈÕñ=>$ŒŠž){if(in_array($ŒŠž['name'],$ü…£))continue;$ŒŠž['ext']=get_path_ext($ŒŠž['name']);<EFBFBD>»œ•ݢņËÁÖ¶¡<EFBFBD><EFBFBD>Ý×”¬“å¿Û»±<EFBFBD>ȼ¯´‘‘ﮦÍÑìÔ<EFBFBD>®«Ôϼ䮕øÛ©ß›†œ;if($ŒŠž['ext']=='oexe' && !isset($ŒŠž['content'])){$–äŠÅ=iconv_system($ŒŠž['path']);$›Ö=json_decode(@file_get_contents($–äŠÅ),!0);if(is_array($›Ö))$ŒŠž=array_merge($ŒŠž,$›Ö);}$éÞ¸Ø[]=$ŒŠž;}foreach($¨ú['folderlist'] as $’ÈÕñ=>$ŒŠž){if(in_array($ŒŠž['name'],$ü…£))continue;$Ç„Î[]=$ŒŠž;<EFBFBD>œêºšÙ<EFBFBD>ê—ô™¬îõÖΑÜëÞóÐé¹ê†‘õÐ<EFBFBD>Îíúü©–׸<EFBFBD>î®›œ<EFBFBD>’òì£Ï؃Īìþ–ó<EFBFBD>ŒÄ¡Û³<EFBFBD>Ùܳ±•;}$¨ú['filelist']=$éÞ¸Ø;$¨ú['folderlist']=$Ç„Î;$¨ú=_DIR_OUT($¨ú);<EFBFBD>áã¯Îˆ€¨ŒÄÒøÃèìÔõ²öÑ唫ÂÈÝØýý<EFBFBD>л€´;$this->_role_check_info($¨ú);<EFBFBD>ë÷ȱËÂõµ°Ë«ãÂýÊÖª<EFBFBD>Ÿˆæž‡…îÂ…£®Õà›;return $¨ú;<EFBFBD>šíÃП<EFBFBD>ûƒÑúÍ©¦ÛɯÂç¶È×øÎû¨;}private function _role_check_info(&$ÝÃ){if(!$GLOBALS['path_type']){$ÝÃ['info']=array("path_type"=>'',"role"=>'',"id"=>'','name'=>'');return;}$ÝÃ['info']=array("path_type" =>$GLOBALS['path_type'],"role" =>$GLOBALS['is_root']?'owner':'guest',"id" =>$GLOBALS['path_id'],'name' =>'',);if($GLOBALS['path_type']==KOD_USER_SHARE){$GLOBALS['path_id']=explode(':',$GLOBALS['path_id']);$GLOBALS['path_id']=$GLOBALS['path_id'][0];$ÝÃ['info']['id']=$GLOBALS['path_id'];$ˆ‘ŽõÔ=system_member::get_info($GLOBALS['path_id']);$ÝÃ['info']['name']=$ˆ‘ŽõÔ['name'];if($GLOBALS['is_root']){$ÝÃ['info']['admin_real_path']=USER_PATH.$ˆ‘ŽõÔ['path'].'/home/';}}if($GLOBALS['path_type']==KOD_GROUP_PATH|| $GLOBALS['path_type']==KOD_GROUP_SHARE){$–ãÛ™=system_group::get_info($GLOBALS['path_id']);$ÝÃ['info']['name']=$–ãÛ™['name'];$×çà=system_member::user_auth_group($GLOBALS['path_id']);if($×çà=='write' || $GLOBALS['is_root']){$ÝÃ['info']['role']='owner';$ÝÃ['group_space_use']=$–ãÛ™['config'];}if($GLOBALS['is_root']){$ÝÃ['info']['admin_real_path']=GROUP_PATH.$–ãÛ™['path'].'/home/';}}}} |