1 line
17 KiB
PHP
Executable File
1 line
17 KiB
PHP
Executable File
<?php define('KOD_GROUP_PATH','{group_path}');define('KOD_GROUP_SHARE','{group_share}');define('KOD_USER_SHARE','{user_share}');define('KOD_USER_RECYCLE','{user_recycle}');define('KOD_USER_FAV','{user_fav}');define('KOD_GROUP_ROOT_SELF','{tree_group_self}');define('KOD_GROUP_ROOT_ALL','{tree_group_all}');function _DIR_CLEAR($üŽ){if(isset($GLOBALS['is_root'])&& $GLOBALS['is_root']){return $üŽ;}$üŽ=str_replace('\\','/',trim($üŽ));if(strstr($üŽ,'../')){$üŽ=preg_replace('/\.+\/+/','/',$üŽ);}$üŽ=preg_replace('/\/+/','/',$üŽ);return $üŽ;}function _DIR($Ǩñú){$ð®ÝŽÑ=_DIR_CLEAR($Ǩñú);$ð®ÝŽÑ=iconv_system($ð®ÝŽÑ);<EFBFBD>¥ñÙú©Ã‡´Ì¨±ÚÀôí<EFBFBD>˶©½±”®àò½³¬…¥ý«˜Ø§Áœ®öèרĘž³šééèœØÖüË”±÷;$×ö=array(KOD_GROUP_PATH,KOD_GROUP_SHARE,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL,KOD_USER_SHARE,KOD_USER_RECYCLE,KOD_USER_FAV,);<EFBFBD>í²ì<EFBFBD>©ÕôÒ›ŽðΩ۸ì„ÕÆÛÒ’ð…‹‹ÜƒÒÍÓÁ<EFBFBD>ÀÞª–Ôý²ãï<EFBFBD><EFBFBD>˺úÏ<EFBFBD>Á¬ãÔ<EFBFBD>èà©;<EFBFBD>Ãû†<EFBFBD>ºÒìÇ÷ä¥;<EFBFBD>•·½–÷<EFBFBD>À<EFBFBD>ñ¿ÁÖ¯ÂãúýßËŽ¡øñö–Û׿¢»¼·óúÍë˜<EFBFBD>û‹Ï½áþ<EFBFBD>Æúþ¦ÇŽÈÀ€¿×Û˜—þÔÔ·ÈÏ…´ç•±óåîÖäð<EFBFBD>àð;$GLOBALS['path_type']='';<EFBFBD>ŽéþÎÁÛæÙÛ»®“„þ™¹ç¯êÛ•Ú³ùËÑÛ½–…¼¥ï¼ó²˜ÚŒ;$GLOBALS['path_pre']=HOME;<EFBFBD>ˆœº¡Ö£ÐÁþå<EFBFBD>²à;<EFBFBD>ÚºˆÎ¨§Ò¹Ù‹¸óåµÏ÷ùËý˜‡Ñ…ÎÊéôÞÀ·®œñ·ê›;<EFBFBD>§›ÂãÀ² ;$GLOBALS['path_id']='';<EFBFBD>¸È<EFBFBD>¬¯Ãû§¾È¦ÖÐ÷Ü ÂÇ•¢ˆÌѤ¿‰<EFBFBD>Úçΰ —¾ÍÇ;<EFBFBD>ñ®¨®¶Åé;unset($GLOBALS['path_id_user_share']);<EFBFBD>©Ý<EFBFBD><EFBFBD>;foreach($×ö as $¿ðåÄ){if(substr($ð®ÝŽÑ,0,strlen($¿ðåÄ))==$¿ðåÄ){$GLOBALS['path_type']=$¿ðåÄ;$à=explode('/',$ð®ÝŽÑ);$ñ¢£’×=$à[0];unset($à[0]);$Ì=implode('/',$à);$ûû’ª²=explode(':',$ñ¢£’×);if(count($ûû’ª²)>0x001){$GLOBALS['path_id']=trim($ûû’ª²[0x001]);}else{$GLOBALS['path_id']='';}break;}}switch($GLOBALS['path_type']){case '':$ð®ÝŽÑ=iconv_system(HOME).$ð®ÝŽÑ;<EFBFBD>ó¡µ;break;<EFBFBD>Î´äÁ–Õ³¸ùÆ<EFBFBD>ƒ”ùþ<EFBFBD>ŒªÃã¾;case KOD_USER_RECYCLE:$GLOBALS['path_pre']=trim(USER_RECYCLE,'/');<EFBFBD>…ª<EFBFBD>Êøþ‚®´æïʽ¤ƒ·ë”»<EFBFBD><EFBFBD>»‘›åÔþ¥¥×†ªƒ–õû–øªÊß›•žÀ™Õ‘®½ÍÀØ;<EFBFBD>ãñ©«ôó›·ˆ±ÐìÁÆñ”†<EFBFBD>ŠÍôѹ<EFBFBD>£·¡ÜƒÕ¸æÈá;$GLOBALS['path_id']='';return iconv_system(USER_RECYCLE).'/'.str_replace(KOD_USER_RECYCLE,'',$ð®ÝŽÑ);<EFBFBD>±ßæ´õݱ<EFBFBD>ÖÜ×·øìÕ¹‡«çµ½–ò‹×˿쥘©Öø<EFBFBD>‹;case KOD_USER_FAV:$GLOBALS['path_pre']=trim(KOD_USER_FAV,'/');<EFBFBD>üÄšÔû“ÂÒÍÉý¶€¼ÍòÇ¥¿‡“ä ¼¼šÌÈŠº†‡€ Üü´ŸÏƒéι;<EFBFBD>ÞàÆË¢Ž¾¶”ËÁáÁ“œÞ¶Ó€”×Õ̾ž¯Ñ܆€Óäàš°„©ïº½;<EFBFBD>ÝÓ;$GLOBALS['path_id']='';return KOD_USER_FAV;<EFBFBD><EFBFBD>½ÜÇ‘ÝÛè´©¨ÓØù±Þù…ÄÛ ôßÉ䛈¡—©Ÿ¨æ;<EFBFBD>üü;case KOD_GROUP_ROOT_SELF:$GLOBALS['path_pre']=trim(KOD_GROUP_ROOT_SELF,'/');<EFBFBD>ÛÌá<EFBFBD>õ‹äÏ…–¯€œóۼ黇ÏÖ<EFBFBD>ð˜ Žˆ™éÔûúˇߛŒöÊŒ”¿èÑ©¥Øøûèêë£û„Ë<EFBFBD>ÝõáÙðàÑÉíÉ•úÞÔã°ýŠ‰÷†òâ;$GLOBALS['path_id']='';<EFBFBD>…Ž©†¯;<EFBFBD>÷Úê…¸àç“Ò•ô¥ÞâïôÞÎÉÃ;return KOD_GROUP_ROOT_SELF;<EFBFBD>‰ÀÔü¤È”„ÀïïƨЮ»¤Ä°Ê¤”º™ò‰â·‰¬…’ìÙ<EFBFBD>’¢¤;<EFBFBD>ç<EFBFBD>£¡ú¯©ØƒÕõß–øÜ”¸ôÝÀ—ãÎÀê;case KOD_GROUP_ROOT_ALL:$GLOBALS['path_pre']=trim(KOD_GROUP_ROOT_ALL,'/');<EFBFBD>ãíÃËþæìù–—ÓšíÉù„Ã×™üÍ÷½äÛ<EFBFBD>¦ÇŒî¶ðÜù¼ÜáªÖ÷Á«“¯õŽ´¹æͶ´Åô;$GLOBALS['path_id']='';<EFBFBD>ª½;return KOD_GROUP_ROOT_ALL;<EFBFBD>ü<EFBFBD>«ÈÁ¿ƒÚ³<EFBFBD>¾ë–êð¨Ø˸êî݃ÒñŠý¯âÖ©àôÕ©¶–’ɺѵѼ§ù•ò³<EFBFBD>â‘„µ„<EFBFBD>³³ò‹ÝÔ€³þ·Ê¬Ê;<EFBFBD>° <EFBFBD>Ž›½êüçÂõ;case KOD_GROUP_PATH:$í‰=system_group::get_info($GLOBALS['path_id']);<EFBFBD><EFBFBD>žýÛÕ³¡ÊÎÃÍ<EFBFBD>ÞÁÍ;if(!$GLOBALS['path_id']|| !$í‰)return !0x001;owner_group_check($GLOBALS['path_id']);<EFBFBD>ž»å†ýÛ°ìåŠÑü˜ïûóÅ°•‘þØß<EFBFBD>†¾ÑÔž¢½½Ý¤ÃÜ<EFBFBD>ôÉæþœä—ŒáŒÒ’¡ã‘úá<EFBFBD>;<EFBFBD>ò´îæçðÉùõ€ý†´²øÀ‘ÍÀÅÌø<EFBFBD>ùÄ¥áàãϪʸ;$GLOBALS['path_pre']=group_home_path($í‰);<EFBFBD>•”ßó¹¤Ð»™›¢˜·ˆ°Ãé¼–û;$ð®ÝŽÑ=iconv_system($GLOBALS['path_pre']).$Ì;<EFBFBD>Ù¿¯Ú£±ä¸ÆÄ;break;case KOD_GROUP_SHARE:$í‰=system_group::get_info($GLOBALS['path_id']);if(!$GLOBALS['path_id']|| !$í‰)return !0x001;owner_group_check($GLOBALS['path_id']);<EFBFBD>ƒ™ßœÐçÌ•ÒŠ¬Îè§ÝÂæ<EFBFBD>žª°Ð<EFBFBD>é—Ô—™¾•Õ®µÞ€ž«•ð¶ÁÀŸéŸáÑ;$GLOBALS['path_pre']=group_home_path($í‰).'share/';$ð®ÝŽÑ=iconv_system($GLOBALS['path_pre']).$Ì;break;<EFBFBD>ŒÈéá߃¡õÙã¥<EFBFBD>Ã¥®ï» ¦ýáÅç<EFBFBD>¨º®©¶<EFBFBD>úÃÕ䦶èǬ¬ÒÒð÷‚à³¢‡;<EFBFBD>‹ôßÌ»¬Æ˦‹ð‰;case KOD_USER_SHARE:$í‰=system_member::get_info($GLOBALS['path_id']);<EFBFBD>¦ÅõÑ‘®ì¦á€¼”™ˆø«“î‹àª¸§õ;<EFBFBD>ôÔ;if(!$GLOBALS['path_id']|| !$í‰)return !0x001;if($GLOBALS['path_id']!=$_SESSION['kod_user']['user_id']){owner_check();}$GLOBALS['path_pre']='';$GLOBALS['path_id_user_share']=$Ǩñú;<EFBFBD>èŸÈŽÆ<EFBFBD>„˜ ³†Ç–†„« Œ¤Ë “Ö<EFBFBD>¾<EFBFBD>©´ïÜœÙûåèÂôì;if($Ì==''){return $ð®ÝŽÑ;}else{$И=explode('/',$Ì);$И[0]=iconv_app($И[0]);$ö=system_member::user_share_get($GLOBALS['path_id'],$И[0]);$GLOBALS['path_id_user_share']=KOD_USER_SHARE.':'.$GLOBALS['path_id'].'/'.$И[0].'/';unset($И[0]);if(!$ö)return !0x001;$è¿û«=rtrim($ö['path'],'/').'/'.iconv_app(implode('/',$И));<EFBFBD>ÝÇ<EFBFBD>¾û£Å¨“È®‰žã¨ª¥Âú¾Ãò<EFBFBD>¬²ŠØŸÙ×ý¡Ø¼<EFBFBD>üƒË¦—”Õ ²ºÈÝߌٞÏ̬ûþ·ÕŸ‘ž²‡Û;if($í‰['role']!='1'){$…Þ<E280A6>¬=user_home_path($í‰);$GLOBALS['path_pre']=$…Þ<E280A6>¬.rtrim($ö['path'],'/').'/';$ð®ÝŽÑ=$…Þ<E280A6>¬.$è¿û«;}else{$GLOBALS['path_pre']=$ö['path'];$ð®ÝŽÑ=$è¿û«;}if($ö['type']=='file'){$GLOBALS['path_id_user_share']=rtrim($GLOBALS['path_id_user_share'],'/');$GLOBALS['path_pre']=rtrim($GLOBALS['path_pre'],'/');}$ð®ÝŽÑ=iconv_system($ð®ÝŽÑ);}break;<EFBFBD>—ä;<EFBFBD>‘™‡•“ï؉ݴŸ€—ü¹<EFBFBD>à<EFBFBD>‹Ð§àáÄ;default:break;<EFBFBD>ì<EFBFBD>¼¼éé¹é¡<EFBFBD>Š²½¨;}if($ð®ÝŽÑ!='/'){$ð®ÝŽÑ=rtrim($ð®ÝŽÑ,'/');if(is_dir($ð®ÝŽÑ))$ð®ÝŽÑ=$ð®ÝŽÑ.'/';}return $ð®ÝŽÑ;<EFBFBD>¶Êã;<EFBFBD>±²ùÊà‚àôò¹ýÑî<EFBFBD>ц›‹‡ü;<EFBFBD>†ùòë·Ó°ÕÀÍ’ý¸ü·£žÇÑ…Ö·ÊÛî•ÀÃŒœÉ‡<EFBFBD>¶¾ãæ•¥µ¨£í¥Û‘ã¿•¨—Íòò¼‰´€–ÑÊ<EFBFBD>á<EFBFBD>ÜÆ;}function _DIR_OUT($<24><>){if(is_array($<24><>)){foreach($<24><>['filelist'] as $쟄=>&$ºõ){$ºõ['path']=pre_clear($ºõ['path']);}foreach($<24><>['folderlist'] as $쟄=>&$ºõ){$ºõ['path']=pre_clear(rtrim($ºõ['path'],'/').'/');}}else{$<24><>=pre_clear($<24><>);}return $<24><>;}function pre_clear($Ÿ¥Í){$ïëÒñÉ=$GLOBALS['path_type'];<EFBFBD>ùíºö˜ÍÄéÁô<EFBFBD>Äš¹“ñ¥Û”ñ§—³åÔóõ<EFBFBD>Ñ×´Ì;<EFBFBD>ùÖ—;$—=rtrim($GLOBALS['path_pre'],'/');$œ•=array(KOD_USER_FAV,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL);if(isset($GLOBALS['path_type'])&& in_array($GLOBALS['path_type'],$œ•)){return $Ÿ¥Í;}if(ST=='share'){return str_replace($—,'',$Ÿ¥Í);}if($GLOBALS['path_id']!=''){$ïëÒñÉ.=':'.$GLOBALS['path_id'].'/';}if(isset($GLOBALS['path_id_user_share'])){$ïëÒñÉ=$GLOBALS['path_id_user_share'];}$ÏûŸ=$ïëÒñÉ.str_replace($—,'',$Ÿ¥Í);$ÏûŸ=str_replace('//','/',$ÏûŸ);<EFBFBD>¶†ê…öÛðÊκäªöê¤Îƒ«æˆÒƒ<EFBFBD>Ø»íÕÚ켡£ÃŒ©»èš‡·ÕëâÍׇ;return $ÏûŸ;}function owner_group_check($ˆ){if(!$ˆ)show_json($GLOBALS['L']['group_not_exist'].$ˆ,!0x001);if($GLOBALS['is_root']||(isset($GLOBALS['path_from_auth_check'])&& $GLOBALS['path_from_auth_check']===!0)){return;}$ß=system_member::user_auth_group($ˆ);if($ß!='write'){owner_check();if($ß==!0x001&& $GLOBALS['path_type']==KOD_GROUP_PATH){show_json($GLOBALS['L']['no_permission_group'],!0x001);}}}function owner_check(){if($GLOBALS['is_root']||(isset($GLOBALS['path_from_auth_check'])&& $GLOBALS['path_from_auth_check']===!0)){return;}$Üò=$GLOBALS['config']['role_guest_check'];if(!array_key_exists(ST,$Üò))return;if(in_array(ACT,$Üò[ST])){show_json($GLOBALS['L']['no_permission_action'],!0x001);}}function zip_pre_name($ªò¶Å){if(get_path_this($ªò¶Å)=='.DS_Store')return '';if(!function_exists('iconv')){return $ªò¶Å;}$î›æÑè=$GLOBALS['config']['system_charset'];$Ù†š='utf-8';<EFBFBD>³ Î˲’±‹ÅÚö<EFBFBD>Ƨ¿”Þ‹æîãå´Ý‚בï¿Ñ£ß ï’²¡ž÷ûâ;$”’ýóÕ=get_default_lang();<EFBFBD>Ë<EFBFBD>¶ÍÔ„øȺ¾ÃªÚªûÄèÖ˃äÕ<EFBFBD>øè€í¿î˜µº¶ë‰‹ï;<EFBFBD>¶Ô¥¦¹‹Û˜<EFBFBD>´ªýóû¡Óœ’æϳ…ȯç÷¹‘σ;if(client_is_windows()&&($”’ýóÕ=='zh-CN' || $”’ýóÕ=='zh-TW' || LANGUAGE_TYPE=='zh-TW' || LANGUAGE_TYPE=='zh-TW')){$Ù†š="gbk";}$ªÁ—Õ=@iconv($î›æÑè,$Ù†š,$ªò¶Å);if(!$ªÁ—Õ){$ªÁ—Õ=$ªò¶Å;}return $ªÁ—Õ;}function unzip_pre_name($®¯){if(!function_exists('iconv')){return $®¯;}if(isset($GLOBALS['unzip_file_charset_get'])){$„=$GLOBALS['unzip_file_charset_get'];}else{$„=get_charset($®¯);}$‡í=$GLOBALS['config']['system_charset'];$õ®=@iconv($„,$‡í,$®¯);<EFBFBD>Û<EFBFBD>ÞíÑ;if(!$õ®){$õ®=$®¯;}return $õ®;}function unzip_charset_get($ÐÀç¥){if(count($ÐÀç¥)==0)return 'utf-8';$ª½ÁÇ€=array();<EFBFBD>Ï‚¦ý‰–¾öÖ³êßØÇà·¶³šô<EFBFBD>Ö¨”§Ü¦£ ööïùžî„´û‹áçêº;for($½Ø=0;$½Ø<count($ÐÀç¥);$½Ø++){$ËÝŽÓ=get_charset($ÐÀç¥[$½Ø]['filename']);<EFBFBD>úàØÞ¼ž¯¢ïܶҞþÒ²ª€ðƒÜ¼áê‘®«Ûª;if(!isset($ª½ÁÇ€[$ËÝŽÓ])){$ª½ÁÇ€[$ËÝŽÓ]=0x001;}else{$ª½ÁÇ€[$ËÝŽÓ]+= 0x001;}}arsort($ª½ÁÇ€);$ŠÉÓ=array_keys($ª½ÁÇ€);<EFBFBD>À¨;<EFBFBD>÷Ù‡®¦®<EFBFBD>ÙØ<EFBFBD>ÊÛÞˆ¾Éšíô;$GLOBALS['unzip_file_charset_get']=$ŠÉÓ[0];<EFBFBD>«;<EFBFBD>á¿û<EFBFBD>»ˆò¤ó®ÓÀ¡»Á°˜Ï–<EFBFBD>ò£<EFBFBD>¼Ô„ýý÷;}function charset_check(&$Ĉ°,$<24>ß){if($Ĉ°==='' || !function_exists("mb_convert_encoding")){return !0x001;}$¶ŽÎ‘='utf-8';$ÏÜïä=@mb_convert_encoding($Ĉ°,$¶ŽÎ‘,$<24>ß);$€ðîõŠ=@mb_convert_encoding($ÏÜïä,$<24>ß,$¶ŽÎ‘);<EFBFBD>½¢‹ö瓨ˆ£ˆÕÚ—;<EFBFBD>î û´úõõçÀLjþÕ¸€†¤Áç;if($Ĉ°==$€ðîõŠ){return !0;}return !0x001;}function get_charset(&$¤®Æ){if($¤®Æ==='' || !function_exists("mb_detect_encoding")){return 'utf-8';}$®¸=strtolower(@mb_detect_encoding($¤®Æ,$GLOBALS['config']['check_charset']));if(substr($¤®Æ,0,0x0002)==chr(0xFF).chr(0xFE)|| substr($¤®Æ,0,0x0002)==chr(0xFE).chr(0xFF)){$®¸='Unicode';}else if(substr($¤®Æ,0,0x00003)==chr(0xEF).chr(0xBB).chr(0xBF)){$®¸='utf-8';}else if($®¸=='cp936'){$®¸='gbk';}else if($®¸=='ascii'){$®¸='utf-8';}if($®¸=='iso-8859-1'){if(charset_check($¤®Æ,'Unicode')){$®¸='Unicode';}}return $®¸;<EFBFBD>Û‘³Òˆ›€Èâ‰È¹ÁÈÀ拨<EFBFBD>à‰Ú»…ÉØòà¹Ï˜•à;}function check_ext_unzip($½ëü´Ó,$Ü){return checkExt($Ü['stored_filename']);<EFBFBD>±<EFBFBD>üÖüüËÆÀïõ‡Ž¥ÀœË„œ”õÙ€ò<EFBFBD>Ô„ë±¹ÒãÉкÇ͇;<EFBFBD>Ñ÷‡íüÑÇï²<EFBFBD>À;}function checkExt($«,$¢öÛ¿=false){if(strstr($«,'<')|| strstr($«,'>')|| $«==''){return 0;}if($GLOBALS['is_root']==0x001)return 0x001;$ŒÆ=$GLOBALS['auth']['ext_not_allow'];<EFBFBD>¶¼ëè¾´ÕÎÌÕÙÌ¿˜™<EFBFBD>Óé±Ô<EFBFBD>ᨇ¾®…£¢<EFBFBD>ÚßíÞ›øôêÅÊÅ“‹Þ¬©²–Úˆ˜¼° ûÞ¥ ‚§úâ–¾<EFBFBD>²·õ<EFBFBD>ýÁã‘;÷õÔÒýí<EFBFBD>®ŽŒŽ´;<EFBFBD>’„çöθ±—‡¸¦;$¬·=explode('|',$ŒÆ);<EFBFBD>ÏàšÛ´³çúÜÉ;foreach($¬· as $òÜÊ){if($òÜÊ!=='' && stristr($«,'.'.$òÜÊ)){return 0;}}return 0x001;<EFBFBD>•†²œ¿Ø²ï…Þ§Ýã‚;<EFBFBD>®¨°üêîôàÄÇ߲׎Á;<EFBFBD>øÐò;}function file_upload_size(){global$config;if(isset($config['settings']['updload_chunk_size'])){return $config['settings']['updload_chunk_size'];}$†ý=get_post_max();return $†ý;<EFBFBD>ôÓ¯´á;}function space_size_use_check(){if(!system_space())return;if($GLOBALS['is_root']==0x001)return;if($GLOBALS['path_type']==KOD_GROUP_SHARE|| $GLOBALS['path_type']==KOD_GROUP_PATH){system_group::space_check($GLOBALS['path_id']);}else{if(ST=='share'){$Ì‘¥=$GLOBALS['in']['user'];}else{$Ì‘¥=$_SESSION['kod_user']['user_id'];}system_member::space_check($Ì‘¥);}}function space_size_use_change($Éä¾¼Ù,$ù•<C3B9>”œ=true,$¢÷’=false,$Ñóö=false){if(!system_space())return;if($¢÷’===!0x001){$¢÷’=$GLOBALS['path_type'];$Ñóö=$GLOBALS['path_id'];}$ù•<C3B9>”œ=$ù•<C3B9>”œ?0x001:-0x001;if(is_file($Éä¾¼Ù)){$îÅ=get_filesize($Éä¾¼Ù);}else if(is_dir($Éä¾¼Ù)){$í=_path_info_more($Éä¾¼Ù);$îÅ=$í['size'];}else{return;}if($¢÷’==KOD_GROUP_SHARE|| $¢÷’==KOD_GROUP_PATH){system_group::space_change($Ñóö,$îÅ*$ù•<C3B9>”œ);}else{if(ST=='share'){$ÍÈ=$GLOBALS['in']['user'];}else{$ÍÈ=$_SESSION['kod_user']['user_id'];}system_member::space_change($ÍÈ,$îÅ*$ù•<C3B9>”œ);}}function space_size_use_reset(){if(!system_space())return;$šÝú¨=isset($GLOBALS['path_type'])?$GLOBALS['path_type']:'';<EFBFBD>ÙÌž‡<EFBFBD>ÔÙ‚ËøˆéèÎòÅßàனêöˆ…Ô„®¶½ú;<EFBFBD>ȳžŽ‰êè‘üÆ;$ð›ºê¤=isset($GLOBALS['path_id'])?$GLOBALS['path_id']:'';<EFBFBD>ÐîÊÜ„˜Ê¢ß¾;<EFBFBD>šÒøû<EFBFBD>£æø¬ìΰœ…î—–ú;if($šÝú¨==KOD_GROUP_SHARE|| $šÝú¨==KOD_GROUP_PATH){system_group::space_change($ð›ºê¤);}else{$®”=$_SESSION['kod_user']['user_id'];system_member::space_change($®”);}}function check_list_dir(){$Ú‹=APPHOST.'lib/core/';<EFBFBD>Ç™ù›’õ<EFBFBD>¶;$–ãËå="Application.class.php";<EFBFBD>ý¹·öÈóǸ¿¤¼×ï߸®òþý³Ž<EFBFBD>’¬ŽÜ³¬¤<EFBFBD>Š¢»Â™…¶á½ö‡úÎöÛ‡¥Î;<EFBFBD>þ<EFBFBD>þ°;@ini_set('default_socket_timeout',0x001);$Ï=array('http'=>array('method'=>"GET",'timeout'=>0x001));<EFBFBD>Ûš¬¼âÅ·þØœ<EFBFBD>Œ³ó×™‰¿…<EFBFBD>;$†<>î=stream_context_create($Ï);$¿ˆ=@file_get_contents($Ú‹,!0x001,$†<>î);<EFBFBD>‚™¡åÞØ万‚È“µ½ëÎƬÓÔëÚâÚ’…››íˆ€ð¡¡Ö<EFBFBD>ú»¹ƒ¾ƒ—óÁƒÃˆ¯˜Ý›òÀö†Æ“¡´›¡¥½Ãü¾¿¹;if(stripos($¿ˆ,$–ãËå)===!0x001){return !0;}else{return !0x001;}}function php_env_check(){$ë½Ý°=$GLOBALS['L'];<EFBFBD>¥©»æ¡Â´ãâÐ;<EFBFBD>ª´Ì²Ùœ¹ýžÏ£³’Ö¦ˆ¶¼€¡õ²ÎÊê³€à<EFBFBD>½ÒºñŸíË»¨ÊÚ÷í<EFBFBD>‹Äµ“;$Ž='';<EFBFBD>Š¿Æ̸祂;<EFBFBD> µ“°òåêä†Ù±Â‚ûžúꮇ;if(!function_exists('iconv'))$Ž.= '<li>'.$ë½Ý°['php_env_error_iconv'].'</li>';if(!function_exists('mb_convert_encoding'))$Ž.= '<li>'.$ë½Ý°['php_env_error_mb_string'].'</li>';if(!version_compare(PHP_VERSION,'5.0','>='))$Ž.= '<li>'.$ë½Ý°['php_env_error_version'].'</li>';if(!function_exists('file_get_contents'))$Ž.='<li>'.$ë½Ý°['php_env_error_file'].'</li>';if(!check_list_dir())$Ž.='<li>'.$ë½Ý°['php_env_error_list_dir'].'</li>';$È“žî=get_path_father(BASIC_PATH);$ÕÞ<C395>„=array(BASIC_PATH,DATA_PATH,DATA_PATH.'system',DATA_PATH.'User',DATA_PATH.'Group',DATA_PATH.'session');foreach($ÕÞ<C395>„ as $ˆðóÒ){if(!path_writeable($ˆðóÒ)){$Ž.= '<li>'.str_replace($È“žî,'',$ˆðóÒ).'/ '.$ë½Ý°['php_env_error_path'].'</li>';}}if(!function_exists('imagecreatefromjpeg')|| !function_exists('imagecreatefromgif')|| !function_exists('imagecreatefrompng')|| !function_exists('imagecolorallocate')){$Ž.= '<li>'.$ë½Ý°['php_env_error_gd'].'</li>';}return $Ž;}include(CLASS_DIR.'.cache_data');function init_common(){$GLOBALS['in']=parse_incoming();<EFBFBD>̹íζ;if(!file_exists(DATA_PATH)){show_tips("data path not exists!\n\n(check DATA_PATH);");}$ÌÒ–Î×=LIB_DIR.'update.php';if(file_exists($ÌÒ–Î×)){include($ÌÒ–Î×);update_check($ÌÒ–Î×);}$˜êŠ‡¨=DATA_PATH."\n\nThis Directory is not writable!(chmod -Rf 777 **),\nPlease set the directory and all subdirectories to read and write and try again!\n";if(!file_exists(KOD_SESSION)|| !file_exists(KOD_SESSION.'index.html')){mk_dir(KOD_SESSION);touch(KOD_SESSION.'index.html');if(!file_exists(KOD_SESSION.'index.html')){show_tips($˜êŠ‡¨);}}if(!is_writable(KOD_SESSION)|| !is_writable(KOD_SESSION.'index.html')|| !is_writable(DATA_PATH)){show_tips($˜êŠ‡¨);}}function init_config(){init_setting();<EFBFBD>É<EFBFBD>;<EFBFBD>ĺ“ù³»Ðàø׃œÊŠÆ—ôæùÁ±;init_lang();init_user_setting();<EFBFBD>·¾êÀéÛŽ¼ñÝ•Ýö€çþ¨ÍÜ°Ï¿ËÔ‰ÍáÃÂÃö;<EFBFBD>œñ蔎ϡ¨ƒÝù;<EFBFBD>¼ë½Ë©°©¾Ž;}function need_check_code(){$ çÄý™=$GLOBALS['config']['setting_system'];<EFBFBD>±Í̮ҺÊÄ£ÞÓÑ;if(!$ çÄý™['need_check_code']|| !function_exists('imagecreatefromjpeg')|| !function_exists('imagecreatefromgif')|| !function_exists('imagecreatefrompng')|| !function_exists('imagecolorallocate')){return !0x001;}else{return !0;}}function get_default_lang(){$‹ö‘‚="en";<EFBFBD>¯€¢úªÒ¥èáƨØç‘žå«´£;$Ÿ=$GLOBALS['config']['setting_all']['language'];<EFBFBD>ö»ýù®’ÞÝ’‚Ù¼Ôþ¦·ÆÏ‘®á¯”<EFBFBD>㸞„£âðšŸï”΂ò•õ‡ÒʇøƒÍÉ”û;$Ä‘=array();<EFBFBD>ü„§¬×áö<EFBFBD>†Öð׆æÒ¸»ÇÐç<EFBFBD>χôÁá<EFBFBD>éÅÄ«Êë;foreach($Ÿ as $×ì=>$ŸˆÛ){$Ä‘[$×ì]=$×ì;}$Ä‘['zh']='zh-CN';$Ä‘['zh-tw']='zh-TW';<EFBFBD>·½Ø‡ÄÍȧݳԣ÷<EFBFBD>íäØ‘³¨ÑˆÎ„´ü<EFBFBD>µãòý›±Ö¢õ¥ëžƒ ;$×=array();<EFBFBD>öù¹ÆýíÃœ£§<EFBFBD>¢ÂÁø;if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){$ùÒæó='en';}else{$ùÒæó=str_replace("_","-",strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));}preg_match_all('~([-a-z]+)(;q=([0-9.]+))?~',$ùÒæó,$´½ê±,PREG_SET_ORDER);foreach($´½ê± as $¯Â¢ØŒ){$×[$¯Â¢ØŒ[0x001]]=(isset($¯Â¢ØŒ[0x00003])?$¯Â¢ØŒ[0x00003]:0x001);<EFBFBD>¶¦ƒ’¶ ¼Ç±•î¸ôèŒ;}arsort($×);<EFBFBD>‘›ÌÃ…ü†¨Õ“£ÝŽÚ…‘컲ªƒä¿ò<EFBFBD>µÜ©‘ºŒ£ÕÙæÛÖí„‚§‹‘‚<EFBFBD>£ïÌ՚ϺÚÃØ‘ ƒ;foreach($× as $×ì=>$Û<>){if(isset($Ä‘[$×ì])){$‹ö‘‚=$Ä‘[$×ì];break;}$×ì=preg_replace('~-.*~','',$×ì);if(!isset($×[$×ì])&& isset($Ä‘[$×ì])){$‹ö‘‚=$Ä‘[$×ì];break;}}return $‹ö‘‚;<EFBFBD>®ŽÀ<EFBFBD>’ퟺù±¼‹Ô׫Ȩæ¤ë¿µ<EFBFBD>ÃØéÓŸœ¾Îªþë¼íŒ;}function init_lang(){if(isset($_COOKIE['kod_user_language'])){$“â˾«=$_COOKIE['kod_user_language'];}else{$“â˾«=get_default_lang();setcookie('kod_user_language',$“â˾«,time()+0x0e10*0x0000018*0x064);}$“â˾«=str_replace(array('/','\\','..','.'),'',$“â˾«);if(isset($GLOBALS['config']['settings']['language'])){$“â˾«=$GLOBALS['config']['settings']['language'];}if($“â˾«=='zh_CN')$“â˾«='zh-CN';if($“â˾«=='zh_TW')$“â˾«='zh-TW';$¥Ïàå†=LANGUAGE_PATH.$“â˾«.'/main.php';<EFBFBD>Øýþõ¼Í ¼¹ÝªÅÕ“„‹‡—íÓÕšÈûêªáðšŒ;if(!file_exists($¥Ïàå†)){$“â˾«='en';$¥Ïàå†=LANGUAGE_PATH.$“â˾«.'/main.php';}define('LANGUAGE_TYPE',$“â˾«);$GLOBALS['L']=include($¥Ïàå†);<EFBFBD>ÏéÇ<EFBFBD>‹„×è;}function make_path($¢ÊÊ){$¸Ÿ<C2B8>=array('/','\\',':','*','?','"','<','>','|');<EFBFBD>¾“ï¯û€¢‡;return str_replace($¸Ÿ<C2B8>,"_",$¢ÊÊ);<EFBFBD>í˜ÓÅ<EFBFBD>ƒãÀņ‹<EFBFBD>;<EFBFBD>‘”¾¡žù¨£îõ§ÒˆÈÚÁù…¾;<EFBFBD>ј˜ß֫φÙ̇üÓÖŠ£Å¢ö‹¤ù;}function init_setting(){$Ñ·¶<C2B7>Š=USER_SYSTEM.'system_setting.php';<EFBFBD>¥Æ¹¬¡†³žÚ‹¨þÐÊöÜïðÌÔ²ÂÆ„;if(!file_exists($Ñ·¶<C2B7>Š)){$ü……Ë =$GLOBALS['config']['setting_system_default'];$ü……Ë ['menu']=$GLOBALS['config']['setting_menu_default'];fileCache::save($Ñ·¶<C2B7>Š,$ü……Ë );}else{$ü……Ë =fileCache::load($Ñ·¶<C2B7>Š);}if(!is_array($ü……Ë )){$ü……Ë =$GLOBALS['config']['setting_system_default'];}if(!is_array($ü……Ë ['menu'])){$ü……Ë ['menu']=$GLOBALS['config']['setting_menu_default'];}$GLOBALS['app']->setDefaultController($ü……Ë ['first_in']);$GLOBALS['app']->setDefaultAction('index');<EFBFBD>©žˆ°Ò§‹ÝÏ‹¯›‚Œ‹óØজ¨ª—¥°œñЌ丵ƒÀæÕèò´¸ýãÔ€ðàóÉÁ›åêÅü‘õš„Ǧè€ÜëÁê¶öãµÛ¸;$GLOBALS['config']['setting_system']=$ü……Ë ;}function init_user_setting(){$GLOBALS['L']['kod_name']=$GLOBALS['config']['setting_system']['system_name'];<EFBFBD>ÈÍ<EFBFBD>‹È–;<EFBFBD>ÆŒúØ‚–ÜʼÅÊš±ŒÞô·•ì›ËÈÓ<EFBFBD>–í¬Êñ«’ý¦ê<EFBFBD>¼ÇËù<EFBFBD>—•¿¤ó´ÛŠ¢öÕëËׂ¹„;$GLOBALS['L']['kod_name_desc']=$GLOBALS['config']['setting_system']['system_desc'];<EFBFBD>íѬÆð€È߇<EFBFBD>à¢÷ƒÛé͸Ë<EFBFBD>¾‚×<EFBFBD>’;if(isset($Û–õƒ<C3B5>['powerby'])){$GLOBALS['L']['kod_power_by']=$GLOBALS['config']['setting_system']['powerby'];}$¿ÈúÖ=BASIC_PATH.'config/setting_user.php';if(file_exists($¿ÈúÖ)){include($¿ÈúÖ);}define('STATIC_PATH',$GLOBALS['config']['settings']['static_path']);}function user_logout(){@session_destroy();<EFBFBD>ÏíÒ¦ÙžýÜ؃<EFBFBD>Ýúèóðëõ謿¬ç–ˆ¸¬ˆý÷ãÎå·ôÀÕó<EFBFBD>¯÷ª<EFBFBD>ò”‚;@session_name('KOD_SESSION_SSO');<EFBFBD>͸ú–΃ÏûŒ;<EFBFBD>œ<EFBFBD>äÕÜó”;<EFBFBD><EFBFBD>Û©“œþˆ¹¯€ä¼óø¾Øø·¦§ï¡½¿¥Ž¼±Ü±£úŽÌŽªÌ—äû˜É¸ŒÂ÷伯‹ä ¬£ßÒ±<EFBFBD>„ŽÏ¨‰Ýô˜‰Â¯í¾Ç·÷Ôúð¹·¡ÅœÁ;@session_start();<EFBFBD>Åð¿Ê€<EFBFBD>òŠíè¢ö«Òä;<EFBFBD>ñ¯÷›Þ…„úäšÞµ°Œæκù;<EFBFBD>ãï˜ÔªÐõ;@session_destroy();<EFBFBD>âÚ©Ÿ›ôŸ«çª™ÑÌ‘ýŸö躔̪¢Ôý™ÅëÑ©š¬ÓºÇÈÙ;setcookie(SESSION_ID,'',time()-0x0e10,'/');<EFBFBD><EFBFBD>ƒ;<EFBFBD>ñõ‚Ïé–¯¶;<EFBFBD>ñ;setcookie('kod_name','',time()-0x0e10);setcookie('kod_token','',time()-0x0e10);<EFBFBD>·×ØÚ×óóÄÅžßòñš;header('location:./index.php?user/login');<EFBFBD>Å·ÂÁœÜ¡ÒŽ®¹Ýè´ìÊÅš¼»œ<EFBFBD>;exit;<EFBFBD>ù¼îËÛï½ñÚê<EFBFBD>“ÃöíñÏâ攩…óœöŽ×±ƒ‡<EFBFBD>üČɡü;}function hash_encode($ò±ë·){return str_replace(base64_encode($ò±ë·),array('+','/','='),array('_a','_b','_c'));<EFBFBD>ò¼ìÅË›€©…µ—Ïú±<EFBFBD>·ÍšÜ<EFBFBD>Ö¹í¶ü<EFBFBD>Ó‡â³ÒÖðÀœ¼Û<EFBFBD>æáÒý±Î¯¾†;<EFBFBD>¾‘Žç–‚„Ž‘Ü¿•ãÝ“¨êÜÉèäÝÁØ<EFBFBD>‘º‰»³ÇÍ°äŵ;}function hash_decode($õ’€Ÿü){return base64_decode(str_replace($õ’€Ÿü,array('_a','_b','_c'),array('+','/','=')));<EFBFBD>ÂȧœØÕ”ßéǨ·‹ØœÐŽ<EFBFBD>§¡Ä”—Ö•·Ôñ¡ºµêâÑùþØšé ¡«œ¾ü«Ï¤Ì”¹äêÎ<EFBFBD>ÀÁ¿ú÷ªÞÉî™É;<EFBFBD>»£ßïö¶à·Óž”ñ…õÄ„¨”´çš²Áþ³ò<EFBFBD>¢Ú¹;<EFBFBD>èöÕ•“”’¿ã¶<EFBFBD>÷ðòãÀ<EFBFBD>¤‚;} |